001package org.hl7.fhir.dstu2016may.model;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036import java.util.ArrayList;
037import java.util.Date;
038import java.util.List;
039
040import org.hl7.fhir.dstu2016may.model.Enumerations.RemittanceOutcome;
041import org.hl7.fhir.dstu2016may.model.Enumerations.RemittanceOutcomeEnumFactory;
042import org.hl7.fhir.exceptions.FHIRException;
043import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
044import org.hl7.fhir.utilities.Utilities;
045
046import ca.uhn.fhir.model.api.annotation.Block;
047import ca.uhn.fhir.model.api.annotation.Child;
048import ca.uhn.fhir.model.api.annotation.Description;
049import ca.uhn.fhir.model.api.annotation.ResourceDef;
050import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
051/**
052 * This resource provides eligibility and plan details from the processing of an Eligibility resource.
053 */
054@ResourceDef(name="EligibilityResponse", profile="http://hl7.org/fhir/Profile/EligibilityResponse")
055public class EligibilityResponse extends DomainResource {
056
057    @Block()
058    public static class BenefitsComponent extends BackboneElement implements IBaseBackboneElement {
059        /**
060         * Dental, Vision, Medical, Pharmacy, Rehab etc.
061         */
062        @Child(name = "category", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true)
063        @Description(shortDefinition="Benefit Category", formalDefinition="Dental, Vision, Medical, Pharmacy, Rehab etc." )
064        protected Coding category;
065
066        /**
067         * Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.
068         */
069        @Child(name = "subCategory", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true)
070        @Description(shortDefinition="Benefit SubCategory", formalDefinition="Dental: basic, major, ortho; Vision exam, glasses, contacts; etc." )
071        protected Coding subCategory;
072
073        /**
074         * Network designation.
075         */
076        @Child(name = "network", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true)
077        @Description(shortDefinition="In or out of network", formalDefinition="Network designation." )
078        protected Coding network;
079
080        /**
081         * Unit designation: individual or family.
082         */
083        @Child(name = "unit", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true)
084        @Description(shortDefinition="Individual or family", formalDefinition="Unit designation: individual or family." )
085        protected Coding unit;
086
087        /**
088         * The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.
089         */
090        @Child(name = "term", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true)
091        @Description(shortDefinition="Annual or lifetime", formalDefinition="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'." )
092        protected Coding term;
093
094        /**
095         * Benefits Used to date.
096         */
097        @Child(name = "financial", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
098        @Description(shortDefinition="Benefit Summary", formalDefinition="Benefits Used to date." )
099        protected List<BenefitComponent> financial;
100
101        private static final long serialVersionUID = 1708176773L;
102
103    /**
104     * Constructor
105     */
106      public BenefitsComponent() {
107        super();
108      }
109
110    /**
111     * Constructor
112     */
113      public BenefitsComponent(Coding category) {
114        super();
115        this.category = category;
116      }
117
118        /**
119         * @return {@link #category} (Dental, Vision, Medical, Pharmacy, Rehab etc.)
120         */
121        public Coding getCategory() { 
122          if (this.category == null)
123            if (Configuration.errorOnAutoCreate())
124              throw new Error("Attempt to auto-create BenefitsComponent.category");
125            else if (Configuration.doAutoCreate())
126              this.category = new Coding(); // cc
127          return this.category;
128        }
129
130        public boolean hasCategory() { 
131          return this.category != null && !this.category.isEmpty();
132        }
133
134        /**
135         * @param value {@link #category} (Dental, Vision, Medical, Pharmacy, Rehab etc.)
136         */
137        public BenefitsComponent setCategory(Coding value) { 
138          this.category = value;
139          return this;
140        }
141
142        /**
143         * @return {@link #subCategory} (Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.)
144         */
145        public Coding getSubCategory() { 
146          if (this.subCategory == null)
147            if (Configuration.errorOnAutoCreate())
148              throw new Error("Attempt to auto-create BenefitsComponent.subCategory");
149            else if (Configuration.doAutoCreate())
150              this.subCategory = new Coding(); // cc
151          return this.subCategory;
152        }
153
154        public boolean hasSubCategory() { 
155          return this.subCategory != null && !this.subCategory.isEmpty();
156        }
157
158        /**
159         * @param value {@link #subCategory} (Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.)
160         */
161        public BenefitsComponent setSubCategory(Coding value) { 
162          this.subCategory = value;
163          return this;
164        }
165
166        /**
167         * @return {@link #network} (Network designation.)
168         */
169        public Coding getNetwork() { 
170          if (this.network == null)
171            if (Configuration.errorOnAutoCreate())
172              throw new Error("Attempt to auto-create BenefitsComponent.network");
173            else if (Configuration.doAutoCreate())
174              this.network = new Coding(); // cc
175          return this.network;
176        }
177
178        public boolean hasNetwork() { 
179          return this.network != null && !this.network.isEmpty();
180        }
181
182        /**
183         * @param value {@link #network} (Network designation.)
184         */
185        public BenefitsComponent setNetwork(Coding value) { 
186          this.network = value;
187          return this;
188        }
189
190        /**
191         * @return {@link #unit} (Unit designation: individual or family.)
192         */
193        public Coding getUnit() { 
194          if (this.unit == null)
195            if (Configuration.errorOnAutoCreate())
196              throw new Error("Attempt to auto-create BenefitsComponent.unit");
197            else if (Configuration.doAutoCreate())
198              this.unit = new Coding(); // cc
199          return this.unit;
200        }
201
202        public boolean hasUnit() { 
203          return this.unit != null && !this.unit.isEmpty();
204        }
205
206        /**
207         * @param value {@link #unit} (Unit designation: individual or family.)
208         */
209        public BenefitsComponent setUnit(Coding value) { 
210          this.unit = value;
211          return this;
212        }
213
214        /**
215         * @return {@link #term} (The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.)
216         */
217        public Coding getTerm() { 
218          if (this.term == null)
219            if (Configuration.errorOnAutoCreate())
220              throw new Error("Attempt to auto-create BenefitsComponent.term");
221            else if (Configuration.doAutoCreate())
222              this.term = new Coding(); // cc
223          return this.term;
224        }
225
226        public boolean hasTerm() { 
227          return this.term != null && !this.term.isEmpty();
228        }
229
230        /**
231         * @param value {@link #term} (The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.)
232         */
233        public BenefitsComponent setTerm(Coding value) { 
234          this.term = value;
235          return this;
236        }
237
238        /**
239         * @return {@link #financial} (Benefits Used to date.)
240         */
241        public List<BenefitComponent> getFinancial() { 
242          if (this.financial == null)
243            this.financial = new ArrayList<BenefitComponent>();
244          return this.financial;
245        }
246
247        public boolean hasFinancial() { 
248          if (this.financial == null)
249            return false;
250          for (BenefitComponent item : this.financial)
251            if (!item.isEmpty())
252              return true;
253          return false;
254        }
255
256        /**
257         * @return {@link #financial} (Benefits Used to date.)
258         */
259    // syntactic sugar
260        public BenefitComponent addFinancial() { //3
261          BenefitComponent t = new BenefitComponent();
262          if (this.financial == null)
263            this.financial = new ArrayList<BenefitComponent>();
264          this.financial.add(t);
265          return t;
266        }
267
268    // syntactic sugar
269        public BenefitsComponent addFinancial(BenefitComponent t) { //3
270          if (t == null)
271            return this;
272          if (this.financial == null)
273            this.financial = new ArrayList<BenefitComponent>();
274          this.financial.add(t);
275          return this;
276        }
277
278        protected void listChildren(List<Property> childrenList) {
279          super.listChildren(childrenList);
280          childrenList.add(new Property("category", "Coding", "Dental, Vision, Medical, Pharmacy, Rehab etc.", 0, java.lang.Integer.MAX_VALUE, category));
281          childrenList.add(new Property("subCategory", "Coding", "Dental: basic, major, ortho; Vision exam, glasses, contacts; etc.", 0, java.lang.Integer.MAX_VALUE, subCategory));
282          childrenList.add(new Property("network", "Coding", "Network designation.", 0, java.lang.Integer.MAX_VALUE, network));
283          childrenList.add(new Property("unit", "Coding", "Unit designation: individual or family.", 0, java.lang.Integer.MAX_VALUE, unit));
284          childrenList.add(new Property("term", "Coding", "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual vistis'.", 0, java.lang.Integer.MAX_VALUE, term));
285          childrenList.add(new Property("financial", "", "Benefits Used to date.", 0, java.lang.Integer.MAX_VALUE, financial));
286        }
287
288      @Override
289      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
290        switch (hash) {
291        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // Coding
292        case 1365024606: /*subCategory*/ return this.subCategory == null ? new Base[0] : new Base[] {this.subCategory}; // Coding
293        case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // Coding
294        case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // Coding
295        case 3556460: /*term*/ return this.term == null ? new Base[0] : new Base[] {this.term}; // Coding
296        case 357555337: /*financial*/ return this.financial == null ? new Base[0] : this.financial.toArray(new Base[this.financial.size()]); // BenefitComponent
297        default: return super.getProperty(hash, name, checkValid);
298        }
299
300      }
301
302      @Override
303      public void setProperty(int hash, String name, Base value) throws FHIRException {
304        switch (hash) {
305        case 50511102: // category
306          this.category = castToCoding(value); // Coding
307          break;
308        case 1365024606: // subCategory
309          this.subCategory = castToCoding(value); // Coding
310          break;
311        case 1843485230: // network
312          this.network = castToCoding(value); // Coding
313          break;
314        case 3594628: // unit
315          this.unit = castToCoding(value); // Coding
316          break;
317        case 3556460: // term
318          this.term = castToCoding(value); // Coding
319          break;
320        case 357555337: // financial
321          this.getFinancial().add((BenefitComponent) value); // BenefitComponent
322          break;
323        default: super.setProperty(hash, name, value);
324        }
325
326      }
327
328      @Override
329      public void setProperty(String name, Base value) throws FHIRException {
330        if (name.equals("category"))
331          this.category = castToCoding(value); // Coding
332        else if (name.equals("subCategory"))
333          this.subCategory = castToCoding(value); // Coding
334        else if (name.equals("network"))
335          this.network = castToCoding(value); // Coding
336        else if (name.equals("unit"))
337          this.unit = castToCoding(value); // Coding
338        else if (name.equals("term"))
339          this.term = castToCoding(value); // Coding
340        else if (name.equals("financial"))
341          this.getFinancial().add((BenefitComponent) value);
342        else
343          super.setProperty(name, value);
344      }
345
346      @Override
347      public Base makeProperty(int hash, String name) throws FHIRException {
348        switch (hash) {
349        case 50511102:  return getCategory(); // Coding
350        case 1365024606:  return getSubCategory(); // Coding
351        case 1843485230:  return getNetwork(); // Coding
352        case 3594628:  return getUnit(); // Coding
353        case 3556460:  return getTerm(); // Coding
354        case 357555337:  return addFinancial(); // BenefitComponent
355        default: return super.makeProperty(hash, name);
356        }
357
358      }
359
360      @Override
361      public Base addChild(String name) throws FHIRException {
362        if (name.equals("category")) {
363          this.category = new Coding();
364          return this.category;
365        }
366        else if (name.equals("subCategory")) {
367          this.subCategory = new Coding();
368          return this.subCategory;
369        }
370        else if (name.equals("network")) {
371          this.network = new Coding();
372          return this.network;
373        }
374        else if (name.equals("unit")) {
375          this.unit = new Coding();
376          return this.unit;
377        }
378        else if (name.equals("term")) {
379          this.term = new Coding();
380          return this.term;
381        }
382        else if (name.equals("financial")) {
383          return addFinancial();
384        }
385        else
386          return super.addChild(name);
387      }
388
389      public BenefitsComponent copy() {
390        BenefitsComponent dst = new BenefitsComponent();
391        copyValues(dst);
392        dst.category = category == null ? null : category.copy();
393        dst.subCategory = subCategory == null ? null : subCategory.copy();
394        dst.network = network == null ? null : network.copy();
395        dst.unit = unit == null ? null : unit.copy();
396        dst.term = term == null ? null : term.copy();
397        if (financial != null) {
398          dst.financial = new ArrayList<BenefitComponent>();
399          for (BenefitComponent i : financial)
400            dst.financial.add(i.copy());
401        };
402        return dst;
403      }
404
405      @Override
406      public boolean equalsDeep(Base other) {
407        if (!super.equalsDeep(other))
408          return false;
409        if (!(other instanceof BenefitsComponent))
410          return false;
411        BenefitsComponent o = (BenefitsComponent) other;
412        return compareDeep(category, o.category, true) && compareDeep(subCategory, o.subCategory, true)
413           && compareDeep(network, o.network, true) && compareDeep(unit, o.unit, true) && compareDeep(term, o.term, true)
414           && compareDeep(financial, o.financial, true);
415      }
416
417      @Override
418      public boolean equalsShallow(Base other) {
419        if (!super.equalsShallow(other))
420          return false;
421        if (!(other instanceof BenefitsComponent))
422          return false;
423        BenefitsComponent o = (BenefitsComponent) other;
424        return true;
425      }
426
427      public boolean isEmpty() {
428        return super.isEmpty() && (category == null || category.isEmpty()) && (subCategory == null || subCategory.isEmpty())
429           && (network == null || network.isEmpty()) && (unit == null || unit.isEmpty()) && (term == null || term.isEmpty())
430           && (financial == null || financial.isEmpty());
431      }
432
433  public String fhirType() {
434    return "EligibilityResponse.benefitBalance";
435
436  }
437
438  }
439
440    @Block()
441    public static class BenefitComponent extends BackboneElement implements IBaseBackboneElement {
442        /**
443         * Deductable, visits, benefit amount.
444         */
445        @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true)
446        @Description(shortDefinition="Deductable, visits, benefit amount", formalDefinition="Deductable, visits, benefit amount." )
447        protected Coding type;
448
449        /**
450         * Benefits allowed.
451         */
452        @Child(name = "benefit", type = {UnsignedIntType.class, Money.class}, order=2, min=0, max=1, modifier=false, summary=true)
453        @Description(shortDefinition="Benefits allowed", formalDefinition="Benefits allowed." )
454        protected Type benefit;
455
456        /**
457         * Benefits used.
458         */
459        @Child(name = "benefitUsed", type = {UnsignedIntType.class, Money.class}, order=3, min=0, max=1, modifier=false, summary=true)
460        @Description(shortDefinition="Benefits used", formalDefinition="Benefits used." )
461        protected Type benefitUsed;
462
463        private static final long serialVersionUID = 1742418909L;
464
465    /**
466     * Constructor
467     */
468      public BenefitComponent() {
469        super();
470      }
471
472    /**
473     * Constructor
474     */
475      public BenefitComponent(Coding type) {
476        super();
477        this.type = type;
478      }
479
480        /**
481         * @return {@link #type} (Deductable, visits, benefit amount.)
482         */
483        public Coding getType() { 
484          if (this.type == null)
485            if (Configuration.errorOnAutoCreate())
486              throw new Error("Attempt to auto-create BenefitComponent.type");
487            else if (Configuration.doAutoCreate())
488              this.type = new Coding(); // cc
489          return this.type;
490        }
491
492        public boolean hasType() { 
493          return this.type != null && !this.type.isEmpty();
494        }
495
496        /**
497         * @param value {@link #type} (Deductable, visits, benefit amount.)
498         */
499        public BenefitComponent setType(Coding value) { 
500          this.type = value;
501          return this;
502        }
503
504        /**
505         * @return {@link #benefit} (Benefits allowed.)
506         */
507        public Type getBenefit() { 
508          return this.benefit;
509        }
510
511        /**
512         * @return {@link #benefit} (Benefits allowed.)
513         */
514        public UnsignedIntType getBenefitUnsignedIntType() throws FHIRException { 
515          if (!(this.benefit instanceof UnsignedIntType))
516            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.benefit.getClass().getName()+" was encountered");
517          return (UnsignedIntType) this.benefit;
518        }
519
520        public boolean hasBenefitUnsignedIntType() { 
521          return this.benefit instanceof UnsignedIntType;
522        }
523
524        /**
525         * @return {@link #benefit} (Benefits allowed.)
526         */
527        public Money getBenefitMoney() throws FHIRException { 
528          if (!(this.benefit instanceof Money))
529            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.benefit.getClass().getName()+" was encountered");
530          return (Money) this.benefit;
531        }
532
533        public boolean hasBenefitMoney() { 
534          return this.benefit instanceof Money;
535        }
536
537        public boolean hasBenefit() { 
538          return this.benefit != null && !this.benefit.isEmpty();
539        }
540
541        /**
542         * @param value {@link #benefit} (Benefits allowed.)
543         */
544        public BenefitComponent setBenefit(Type value) { 
545          this.benefit = value;
546          return this;
547        }
548
549        /**
550         * @return {@link #benefitUsed} (Benefits used.)
551         */
552        public Type getBenefitUsed() { 
553          return this.benefitUsed;
554        }
555
556        /**
557         * @return {@link #benefitUsed} (Benefits used.)
558         */
559        public UnsignedIntType getBenefitUsedUnsignedIntType() throws FHIRException { 
560          if (!(this.benefitUsed instanceof UnsignedIntType))
561            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.benefitUsed.getClass().getName()+" was encountered");
562          return (UnsignedIntType) this.benefitUsed;
563        }
564
565        public boolean hasBenefitUsedUnsignedIntType() { 
566          return this.benefitUsed instanceof UnsignedIntType;
567        }
568
569        /**
570         * @return {@link #benefitUsed} (Benefits used.)
571         */
572        public Money getBenefitUsedMoney() throws FHIRException { 
573          if (!(this.benefitUsed instanceof Money))
574            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.benefitUsed.getClass().getName()+" was encountered");
575          return (Money) this.benefitUsed;
576        }
577
578        public boolean hasBenefitUsedMoney() { 
579          return this.benefitUsed instanceof Money;
580        }
581
582        public boolean hasBenefitUsed() { 
583          return this.benefitUsed != null && !this.benefitUsed.isEmpty();
584        }
585
586        /**
587         * @param value {@link #benefitUsed} (Benefits used.)
588         */
589        public BenefitComponent setBenefitUsed(Type value) { 
590          this.benefitUsed = value;
591          return this;
592        }
593
594        protected void listChildren(List<Property> childrenList) {
595          super.listChildren(childrenList);
596          childrenList.add(new Property("type", "Coding", "Deductable, visits, benefit amount.", 0, java.lang.Integer.MAX_VALUE, type));
597          childrenList.add(new Property("benefit[x]", "unsignedInt|Money", "Benefits allowed.", 0, java.lang.Integer.MAX_VALUE, benefit));
598          childrenList.add(new Property("benefitUsed[x]", "unsignedInt|Money", "Benefits used.", 0, java.lang.Integer.MAX_VALUE, benefitUsed));
599        }
600
601      @Override
602      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
603        switch (hash) {
604        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
605        case -222710633: /*benefit*/ return this.benefit == null ? new Base[0] : new Base[] {this.benefit}; // Type
606        case -549981964: /*benefitUsed*/ return this.benefitUsed == null ? new Base[0] : new Base[] {this.benefitUsed}; // Type
607        default: return super.getProperty(hash, name, checkValid);
608        }
609
610      }
611
612      @Override
613      public void setProperty(int hash, String name, Base value) throws FHIRException {
614        switch (hash) {
615        case 3575610: // type
616          this.type = castToCoding(value); // Coding
617          break;
618        case -222710633: // benefit
619          this.benefit = (Type) value; // Type
620          break;
621        case -549981964: // benefitUsed
622          this.benefitUsed = (Type) value; // Type
623          break;
624        default: super.setProperty(hash, name, value);
625        }
626
627      }
628
629      @Override
630      public void setProperty(String name, Base value) throws FHIRException {
631        if (name.equals("type"))
632          this.type = castToCoding(value); // Coding
633        else if (name.equals("benefit[x]"))
634          this.benefit = (Type) value; // Type
635        else if (name.equals("benefitUsed[x]"))
636          this.benefitUsed = (Type) value; // Type
637        else
638          super.setProperty(name, value);
639      }
640
641      @Override
642      public Base makeProperty(int hash, String name) throws FHIRException {
643        switch (hash) {
644        case 3575610:  return getType(); // Coding
645        case 952095881:  return getBenefit(); // Type
646        case 787635980:  return getBenefitUsed(); // Type
647        default: return super.makeProperty(hash, name);
648        }
649
650      }
651
652      @Override
653      public Base addChild(String name) throws FHIRException {
654        if (name.equals("type")) {
655          this.type = new Coding();
656          return this.type;
657        }
658        else if (name.equals("benefitUnsignedInt")) {
659          this.benefit = new UnsignedIntType();
660          return this.benefit;
661        }
662        else if (name.equals("benefitMoney")) {
663          this.benefit = new Money();
664          return this.benefit;
665        }
666        else if (name.equals("benefitUsedUnsignedInt")) {
667          this.benefitUsed = new UnsignedIntType();
668          return this.benefitUsed;
669        }
670        else if (name.equals("benefitUsedMoney")) {
671          this.benefitUsed = new Money();
672          return this.benefitUsed;
673        }
674        else
675          return super.addChild(name);
676      }
677
678      public BenefitComponent copy() {
679        BenefitComponent dst = new BenefitComponent();
680        copyValues(dst);
681        dst.type = type == null ? null : type.copy();
682        dst.benefit = benefit == null ? null : benefit.copy();
683        dst.benefitUsed = benefitUsed == null ? null : benefitUsed.copy();
684        return dst;
685      }
686
687      @Override
688      public boolean equalsDeep(Base other) {
689        if (!super.equalsDeep(other))
690          return false;
691        if (!(other instanceof BenefitComponent))
692          return false;
693        BenefitComponent o = (BenefitComponent) other;
694        return compareDeep(type, o.type, true) && compareDeep(benefit, o.benefit, true) && compareDeep(benefitUsed, o.benefitUsed, true)
695          ;
696      }
697
698      @Override
699      public boolean equalsShallow(Base other) {
700        if (!super.equalsShallow(other))
701          return false;
702        if (!(other instanceof BenefitComponent))
703          return false;
704        BenefitComponent o = (BenefitComponent) other;
705        return true;
706      }
707
708      public boolean isEmpty() {
709        return super.isEmpty() && (type == null || type.isEmpty()) && (benefit == null || benefit.isEmpty())
710           && (benefitUsed == null || benefitUsed.isEmpty());
711      }
712
713  public String fhirType() {
714    return "EligibilityResponse.benefitBalance.financial";
715
716  }
717
718  }
719
720    @Block()
721    public static class ErrorsComponent extends BackboneElement implements IBaseBackboneElement {
722        /**
723         * An error code,from a specified code system, which details why the eligibility check could not be performed.
724         */
725        @Child(name = "code", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true)
726        @Description(shortDefinition="Error code detailing processing issues", formalDefinition="An error code,from a specified code system, which details why the eligibility check could not be performed." )
727        protected Coding code;
728
729        private static final long serialVersionUID = -739538393L;
730
731    /**
732     * Constructor
733     */
734      public ErrorsComponent() {
735        super();
736      }
737
738    /**
739     * Constructor
740     */
741      public ErrorsComponent(Coding code) {
742        super();
743        this.code = code;
744      }
745
746        /**
747         * @return {@link #code} (An error code,from a specified code system, which details why the eligibility check could not be performed.)
748         */
749        public Coding getCode() { 
750          if (this.code == null)
751            if (Configuration.errorOnAutoCreate())
752              throw new Error("Attempt to auto-create ErrorsComponent.code");
753            else if (Configuration.doAutoCreate())
754              this.code = new Coding(); // cc
755          return this.code;
756        }
757
758        public boolean hasCode() { 
759          return this.code != null && !this.code.isEmpty();
760        }
761
762        /**
763         * @param value {@link #code} (An error code,from a specified code system, which details why the eligibility check could not be performed.)
764         */
765        public ErrorsComponent setCode(Coding value) { 
766          this.code = value;
767          return this;
768        }
769
770        protected void listChildren(List<Property> childrenList) {
771          super.listChildren(childrenList);
772          childrenList.add(new Property("code", "Coding", "An error code,from a specified code system, which details why the eligibility check could not be performed.", 0, java.lang.Integer.MAX_VALUE, code));
773        }
774
775      @Override
776      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
777        switch (hash) {
778        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Coding
779        default: return super.getProperty(hash, name, checkValid);
780        }
781
782      }
783
784      @Override
785      public void setProperty(int hash, String name, Base value) throws FHIRException {
786        switch (hash) {
787        case 3059181: // code
788          this.code = castToCoding(value); // Coding
789          break;
790        default: super.setProperty(hash, name, value);
791        }
792
793      }
794
795      @Override
796      public void setProperty(String name, Base value) throws FHIRException {
797        if (name.equals("code"))
798          this.code = castToCoding(value); // Coding
799        else
800          super.setProperty(name, value);
801      }
802
803      @Override
804      public Base makeProperty(int hash, String name) throws FHIRException {
805        switch (hash) {
806        case 3059181:  return getCode(); // Coding
807        default: return super.makeProperty(hash, name);
808        }
809
810      }
811
812      @Override
813      public Base addChild(String name) throws FHIRException {
814        if (name.equals("code")) {
815          this.code = new Coding();
816          return this.code;
817        }
818        else
819          return super.addChild(name);
820      }
821
822      public ErrorsComponent copy() {
823        ErrorsComponent dst = new ErrorsComponent();
824        copyValues(dst);
825        dst.code = code == null ? null : code.copy();
826        return dst;
827      }
828
829      @Override
830      public boolean equalsDeep(Base other) {
831        if (!super.equalsDeep(other))
832          return false;
833        if (!(other instanceof ErrorsComponent))
834          return false;
835        ErrorsComponent o = (ErrorsComponent) other;
836        return compareDeep(code, o.code, true);
837      }
838
839      @Override
840      public boolean equalsShallow(Base other) {
841        if (!super.equalsShallow(other))
842          return false;
843        if (!(other instanceof ErrorsComponent))
844          return false;
845        ErrorsComponent o = (ErrorsComponent) other;
846        return true;
847      }
848
849      public boolean isEmpty() {
850        return super.isEmpty() && (code == null || code.isEmpty());
851      }
852
853  public String fhirType() {
854    return "EligibilityResponse.error";
855
856  }
857
858  }
859
860    /**
861     * The Response business identifier.
862     */
863    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
864    @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." )
865    protected List<Identifier> identifier;
866
867    /**
868     * Original request resource reference.
869     */
870    @Child(name = "request", type = {Identifier.class, EligibilityRequest.class}, order=1, min=0, max=1, modifier=false, summary=true)
871    @Description(shortDefinition="Claim reference", formalDefinition="Original request resource reference." )
872    protected Type request;
873
874    /**
875     * Transaction status: error, complete.
876     */
877    @Child(name = "outcome", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=true)
878    @Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." )
879    protected Enumeration<RemittanceOutcome> outcome;
880
881    /**
882     * A description of the status of the adjudication.
883     */
884    @Child(name = "disposition", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
885    @Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." )
886    protected StringType disposition;
887
888    /**
889     * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.
890     */
891    @Child(name = "ruleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true)
892    @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." )
893    protected Coding ruleset;
894
895    /**
896     * The style (standard) and version of the original material which was converted into this resource.
897     */
898    @Child(name = "originalRuleset", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true)
899    @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." )
900    protected Coding originalRuleset;
901
902    /**
903     * The date when the enclosed suite of services were performed or completed.
904     */
905    @Child(name = "created", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true)
906    @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." )
907    protected DateTimeType created;
908
909    /**
910     * The Insurer who produced this adjudicated response.
911     */
912    @Child(name = "organization", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true)
913    @Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." )
914    protected Type organization;
915
916    /**
917     * The practitioner who is responsible for the services rendered to the patient.
918     */
919    @Child(name = "requestProvider", type = {Identifier.class, Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true)
920    @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." )
921    protected Type requestProvider;
922
923    /**
924     * The organization which is responsible for the services rendered to the patient.
925     */
926    @Child(name = "requestOrganization", type = {Identifier.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=true)
927    @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." )
928    protected Type requestOrganization;
929
930    /**
931     * Flag indicating if the coverage provided is inforce currently  if no service date(s) specified or for the whole duration of the service dates.
932     */
933    @Child(name = "inforce", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=true)
934    @Description(shortDefinition="Coverage inforce", formalDefinition="Flag indicating if the coverage provided is inforce currently  if no service date(s) specified or for the whole duration of the service dates." )
935    protected BooleanType inforce;
936
937    /**
938     * The contract resource which may provide more detailed information.
939     */
940    @Child(name = "contract", type = {Contract.class}, order=11, min=0, max=1, modifier=false, summary=true)
941    @Description(shortDefinition="Contract details", formalDefinition="The contract resource which may provide more detailed information." )
942    protected Reference contract;
943
944    /**
945     * The actual object that is the target of the reference (The contract resource which may provide more detailed information.)
946     */
947    protected Contract contractTarget;
948
949    /**
950     * The form to be used for printing the content.
951     */
952    @Child(name = "form", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true)
953    @Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." )
954    protected Coding form;
955
956    /**
957     * Benefits and optionally current balances by Category.
958     */
959    @Child(name = "benefitBalance", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
960    @Description(shortDefinition="Benefits by Category", formalDefinition="Benefits and optionally current balances by Category." )
961    protected List<BenefitsComponent> benefitBalance;
962
963    /**
964     * Mutually exclusive with Services Provided (Item).
965     */
966    @Child(name = "error", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
967    @Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." )
968    protected List<ErrorsComponent> error;
969
970    private static final long serialVersionUID = -674605791L;
971
972  /**
973   * Constructor
974   */
975    public EligibilityResponse() {
976      super();
977    }
978
979    /**
980     * @return {@link #identifier} (The Response business identifier.)
981     */
982    public List<Identifier> getIdentifier() { 
983      if (this.identifier == null)
984        this.identifier = new ArrayList<Identifier>();
985      return this.identifier;
986    }
987
988    public boolean hasIdentifier() { 
989      if (this.identifier == null)
990        return false;
991      for (Identifier item : this.identifier)
992        if (!item.isEmpty())
993          return true;
994      return false;
995    }
996
997    /**
998     * @return {@link #identifier} (The Response business identifier.)
999     */
1000    // syntactic sugar
1001    public Identifier addIdentifier() { //3
1002      Identifier t = new Identifier();
1003      if (this.identifier == null)
1004        this.identifier = new ArrayList<Identifier>();
1005      this.identifier.add(t);
1006      return t;
1007    }
1008
1009    // syntactic sugar
1010    public EligibilityResponse addIdentifier(Identifier t) { //3
1011      if (t == null)
1012        return this;
1013      if (this.identifier == null)
1014        this.identifier = new ArrayList<Identifier>();
1015      this.identifier.add(t);
1016      return this;
1017    }
1018
1019    /**
1020     * @return {@link #request} (Original request resource reference.)
1021     */
1022    public Type getRequest() { 
1023      return this.request;
1024    }
1025
1026    /**
1027     * @return {@link #request} (Original request resource reference.)
1028     */
1029    public Identifier getRequestIdentifier() throws FHIRException { 
1030      if (!(this.request instanceof Identifier))
1031        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered");
1032      return (Identifier) this.request;
1033    }
1034
1035    public boolean hasRequestIdentifier() { 
1036      return this.request instanceof Identifier;
1037    }
1038
1039    /**
1040     * @return {@link #request} (Original request resource reference.)
1041     */
1042    public Reference getRequestReference() throws FHIRException { 
1043      if (!(this.request instanceof Reference))
1044        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered");
1045      return (Reference) this.request;
1046    }
1047
1048    public boolean hasRequestReference() { 
1049      return this.request instanceof Reference;
1050    }
1051
1052    public boolean hasRequest() { 
1053      return this.request != null && !this.request.isEmpty();
1054    }
1055
1056    /**
1057     * @param value {@link #request} (Original request resource reference.)
1058     */
1059    public EligibilityResponse setRequest(Type value) { 
1060      this.request = value;
1061      return this;
1062    }
1063
1064    /**
1065     * @return {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
1066     */
1067    public Enumeration<RemittanceOutcome> getOutcomeElement() { 
1068      if (this.outcome == null)
1069        if (Configuration.errorOnAutoCreate())
1070          throw new Error("Attempt to auto-create EligibilityResponse.outcome");
1071        else if (Configuration.doAutoCreate())
1072          this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory()); // bb
1073      return this.outcome;
1074    }
1075
1076    public boolean hasOutcomeElement() { 
1077      return this.outcome != null && !this.outcome.isEmpty();
1078    }
1079
1080    public boolean hasOutcome() { 
1081      return this.outcome != null && !this.outcome.isEmpty();
1082    }
1083
1084    /**
1085     * @param value {@link #outcome} (Transaction status: error, complete.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
1086     */
1087    public EligibilityResponse setOutcomeElement(Enumeration<RemittanceOutcome> value) { 
1088      this.outcome = value;
1089      return this;
1090    }
1091
1092    /**
1093     * @return Transaction status: error, complete.
1094     */
1095    public RemittanceOutcome getOutcome() { 
1096      return this.outcome == null ? null : this.outcome.getValue();
1097    }
1098
1099    /**
1100     * @param value Transaction status: error, complete.
1101     */
1102    public EligibilityResponse setOutcome(RemittanceOutcome value) { 
1103      if (value == null)
1104        this.outcome = null;
1105      else {
1106        if (this.outcome == null)
1107          this.outcome = new Enumeration<RemittanceOutcome>(new RemittanceOutcomeEnumFactory());
1108        this.outcome.setValue(value);
1109      }
1110      return this;
1111    }
1112
1113    /**
1114     * @return {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
1115     */
1116    public StringType getDispositionElement() { 
1117      if (this.disposition == null)
1118        if (Configuration.errorOnAutoCreate())
1119          throw new Error("Attempt to auto-create EligibilityResponse.disposition");
1120        else if (Configuration.doAutoCreate())
1121          this.disposition = new StringType(); // bb
1122      return this.disposition;
1123    }
1124
1125    public boolean hasDispositionElement() { 
1126      return this.disposition != null && !this.disposition.isEmpty();
1127    }
1128
1129    public boolean hasDisposition() { 
1130      return this.disposition != null && !this.disposition.isEmpty();
1131    }
1132
1133    /**
1134     * @param value {@link #disposition} (A description of the status of the adjudication.). This is the underlying object with id, value and extensions. The accessor "getDisposition" gives direct access to the value
1135     */
1136    public EligibilityResponse setDispositionElement(StringType value) { 
1137      this.disposition = value;
1138      return this;
1139    }
1140
1141    /**
1142     * @return A description of the status of the adjudication.
1143     */
1144    public String getDisposition() { 
1145      return this.disposition == null ? null : this.disposition.getValue();
1146    }
1147
1148    /**
1149     * @param value A description of the status of the adjudication.
1150     */
1151    public EligibilityResponse setDisposition(String value) { 
1152      if (Utilities.noString(value))
1153        this.disposition = null;
1154      else {
1155        if (this.disposition == null)
1156          this.disposition = new StringType();
1157        this.disposition.setValue(value);
1158      }
1159      return this;
1160    }
1161
1162    /**
1163     * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.)
1164     */
1165    public Coding getRuleset() { 
1166      if (this.ruleset == null)
1167        if (Configuration.errorOnAutoCreate())
1168          throw new Error("Attempt to auto-create EligibilityResponse.ruleset");
1169        else if (Configuration.doAutoCreate())
1170          this.ruleset = new Coding(); // cc
1171      return this.ruleset;
1172    }
1173
1174    public boolean hasRuleset() { 
1175      return this.ruleset != null && !this.ruleset.isEmpty();
1176    }
1177
1178    /**
1179     * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.)
1180     */
1181    public EligibilityResponse setRuleset(Coding value) { 
1182      this.ruleset = value;
1183      return this;
1184    }
1185
1186    /**
1187     * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.)
1188     */
1189    public Coding getOriginalRuleset() { 
1190      if (this.originalRuleset == null)
1191        if (Configuration.errorOnAutoCreate())
1192          throw new Error("Attempt to auto-create EligibilityResponse.originalRuleset");
1193        else if (Configuration.doAutoCreate())
1194          this.originalRuleset = new Coding(); // cc
1195      return this.originalRuleset;
1196    }
1197
1198    public boolean hasOriginalRuleset() { 
1199      return this.originalRuleset != null && !this.originalRuleset.isEmpty();
1200    }
1201
1202    /**
1203     * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.)
1204     */
1205    public EligibilityResponse setOriginalRuleset(Coding value) { 
1206      this.originalRuleset = value;
1207      return this;
1208    }
1209
1210    /**
1211     * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1212     */
1213    public DateTimeType getCreatedElement() { 
1214      if (this.created == null)
1215        if (Configuration.errorOnAutoCreate())
1216          throw new Error("Attempt to auto-create EligibilityResponse.created");
1217        else if (Configuration.doAutoCreate())
1218          this.created = new DateTimeType(); // bb
1219      return this.created;
1220    }
1221
1222    public boolean hasCreatedElement() { 
1223      return this.created != null && !this.created.isEmpty();
1224    }
1225
1226    public boolean hasCreated() { 
1227      return this.created != null && !this.created.isEmpty();
1228    }
1229
1230    /**
1231     * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
1232     */
1233    public EligibilityResponse setCreatedElement(DateTimeType value) { 
1234      this.created = value;
1235      return this;
1236    }
1237
1238    /**
1239     * @return The date when the enclosed suite of services were performed or completed.
1240     */
1241    public Date getCreated() { 
1242      return this.created == null ? null : this.created.getValue();
1243    }
1244
1245    /**
1246     * @param value The date when the enclosed suite of services were performed or completed.
1247     */
1248    public EligibilityResponse setCreated(Date value) { 
1249      if (value == null)
1250        this.created = null;
1251      else {
1252        if (this.created == null)
1253          this.created = new DateTimeType();
1254        this.created.setValue(value);
1255      }
1256      return this;
1257    }
1258
1259    /**
1260     * @return {@link #organization} (The Insurer who produced this adjudicated response.)
1261     */
1262    public Type getOrganization() { 
1263      return this.organization;
1264    }
1265
1266    /**
1267     * @return {@link #organization} (The Insurer who produced this adjudicated response.)
1268     */
1269    public Identifier getOrganizationIdentifier() throws FHIRException { 
1270      if (!(this.organization instanceof Identifier))
1271        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered");
1272      return (Identifier) this.organization;
1273    }
1274
1275    public boolean hasOrganizationIdentifier() { 
1276      return this.organization instanceof Identifier;
1277    }
1278
1279    /**
1280     * @return {@link #organization} (The Insurer who produced this adjudicated response.)
1281     */
1282    public Reference getOrganizationReference() throws FHIRException { 
1283      if (!(this.organization instanceof Reference))
1284        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered");
1285      return (Reference) this.organization;
1286    }
1287
1288    public boolean hasOrganizationReference() { 
1289      return this.organization instanceof Reference;
1290    }
1291
1292    public boolean hasOrganization() { 
1293      return this.organization != null && !this.organization.isEmpty();
1294    }
1295
1296    /**
1297     * @param value {@link #organization} (The Insurer who produced this adjudicated response.)
1298     */
1299    public EligibilityResponse setOrganization(Type value) { 
1300      this.organization = value;
1301      return this;
1302    }
1303
1304    /**
1305     * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1306     */
1307    public Type getRequestProvider() { 
1308      return this.requestProvider;
1309    }
1310
1311    /**
1312     * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1313     */
1314    public Identifier getRequestProviderIdentifier() throws FHIRException { 
1315      if (!(this.requestProvider instanceof Identifier))
1316        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestProvider.getClass().getName()+" was encountered");
1317      return (Identifier) this.requestProvider;
1318    }
1319
1320    public boolean hasRequestProviderIdentifier() { 
1321      return this.requestProvider instanceof Identifier;
1322    }
1323
1324    /**
1325     * @return {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1326     */
1327    public Reference getRequestProviderReference() throws FHIRException { 
1328      if (!(this.requestProvider instanceof Reference))
1329        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestProvider.getClass().getName()+" was encountered");
1330      return (Reference) this.requestProvider;
1331    }
1332
1333    public boolean hasRequestProviderReference() { 
1334      return this.requestProvider instanceof Reference;
1335    }
1336
1337    public boolean hasRequestProvider() { 
1338      return this.requestProvider != null && !this.requestProvider.isEmpty();
1339    }
1340
1341    /**
1342     * @param value {@link #requestProvider} (The practitioner who is responsible for the services rendered to the patient.)
1343     */
1344    public EligibilityResponse setRequestProvider(Type value) { 
1345      this.requestProvider = value;
1346      return this;
1347    }
1348
1349    /**
1350     * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1351     */
1352    public Type getRequestOrganization() { 
1353      return this.requestOrganization;
1354    }
1355
1356    /**
1357     * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1358     */
1359    public Identifier getRequestOrganizationIdentifier() throws FHIRException { 
1360      if (!(this.requestOrganization instanceof Identifier))
1361        throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.requestOrganization.getClass().getName()+" was encountered");
1362      return (Identifier) this.requestOrganization;
1363    }
1364
1365    public boolean hasRequestOrganizationIdentifier() { 
1366      return this.requestOrganization instanceof Identifier;
1367    }
1368
1369    /**
1370     * @return {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1371     */
1372    public Reference getRequestOrganizationReference() throws FHIRException { 
1373      if (!(this.requestOrganization instanceof Reference))
1374        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.requestOrganization.getClass().getName()+" was encountered");
1375      return (Reference) this.requestOrganization;
1376    }
1377
1378    public boolean hasRequestOrganizationReference() { 
1379      return this.requestOrganization instanceof Reference;
1380    }
1381
1382    public boolean hasRequestOrganization() { 
1383      return this.requestOrganization != null && !this.requestOrganization.isEmpty();
1384    }
1385
1386    /**
1387     * @param value {@link #requestOrganization} (The organization which is responsible for the services rendered to the patient.)
1388     */
1389    public EligibilityResponse setRequestOrganization(Type value) { 
1390      this.requestOrganization = value;
1391      return this;
1392    }
1393
1394    /**
1395     * @return {@link #inforce} (Flag indicating if the coverage provided is inforce currently  if no service date(s) specified or for the whole duration of the service dates.). This is the underlying object with id, value and extensions. The accessor "getInforce" gives direct access to the value
1396     */
1397    public BooleanType getInforceElement() { 
1398      if (this.inforce == null)
1399        if (Configuration.errorOnAutoCreate())
1400          throw new Error("Attempt to auto-create EligibilityResponse.inforce");
1401        else if (Configuration.doAutoCreate())
1402          this.inforce = new BooleanType(); // bb
1403      return this.inforce;
1404    }
1405
1406    public boolean hasInforceElement() { 
1407      return this.inforce != null && !this.inforce.isEmpty();
1408    }
1409
1410    public boolean hasInforce() { 
1411      return this.inforce != null && !this.inforce.isEmpty();
1412    }
1413
1414    /**
1415     * @param value {@link #inforce} (Flag indicating if the coverage provided is inforce currently  if no service date(s) specified or for the whole duration of the service dates.). This is the underlying object with id, value and extensions. The accessor "getInforce" gives direct access to the value
1416     */
1417    public EligibilityResponse setInforceElement(BooleanType value) { 
1418      this.inforce = value;
1419      return this;
1420    }
1421
1422    /**
1423     * @return Flag indicating if the coverage provided is inforce currently  if no service date(s) specified or for the whole duration of the service dates.
1424     */
1425    public boolean getInforce() { 
1426      return this.inforce == null || this.inforce.isEmpty() ? false : this.inforce.getValue();
1427    }
1428
1429    /**
1430     * @param value Flag indicating if the coverage provided is inforce currently  if no service date(s) specified or for the whole duration of the service dates.
1431     */
1432    public EligibilityResponse setInforce(boolean value) { 
1433        if (this.inforce == null)
1434          this.inforce = new BooleanType();
1435        this.inforce.setValue(value);
1436      return this;
1437    }
1438
1439    /**
1440     * @return {@link #contract} (The contract resource which may provide more detailed information.)
1441     */
1442    public Reference getContract() { 
1443      if (this.contract == null)
1444        if (Configuration.errorOnAutoCreate())
1445          throw new Error("Attempt to auto-create EligibilityResponse.contract");
1446        else if (Configuration.doAutoCreate())
1447          this.contract = new Reference(); // cc
1448      return this.contract;
1449    }
1450
1451    public boolean hasContract() { 
1452      return this.contract != null && !this.contract.isEmpty();
1453    }
1454
1455    /**
1456     * @param value {@link #contract} (The contract resource which may provide more detailed information.)
1457     */
1458    public EligibilityResponse setContract(Reference value) { 
1459      this.contract = value;
1460      return this;
1461    }
1462
1463    /**
1464     * @return {@link #contract} 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 contract resource which may provide more detailed information.)
1465     */
1466    public Contract getContractTarget() { 
1467      if (this.contractTarget == null)
1468        if (Configuration.errorOnAutoCreate())
1469          throw new Error("Attempt to auto-create EligibilityResponse.contract");
1470        else if (Configuration.doAutoCreate())
1471          this.contractTarget = new Contract(); // aa
1472      return this.contractTarget;
1473    }
1474
1475    /**
1476     * @param value {@link #contract} 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 contract resource which may provide more detailed information.)
1477     */
1478    public EligibilityResponse setContractTarget(Contract value) { 
1479      this.contractTarget = value;
1480      return this;
1481    }
1482
1483    /**
1484     * @return {@link #form} (The form to be used for printing the content.)
1485     */
1486    public Coding getForm() { 
1487      if (this.form == null)
1488        if (Configuration.errorOnAutoCreate())
1489          throw new Error("Attempt to auto-create EligibilityResponse.form");
1490        else if (Configuration.doAutoCreate())
1491          this.form = new Coding(); // cc
1492      return this.form;
1493    }
1494
1495    public boolean hasForm() { 
1496      return this.form != null && !this.form.isEmpty();
1497    }
1498
1499    /**
1500     * @param value {@link #form} (The form to be used for printing the content.)
1501     */
1502    public EligibilityResponse setForm(Coding value) { 
1503      this.form = value;
1504      return this;
1505    }
1506
1507    /**
1508     * @return {@link #benefitBalance} (Benefits and optionally current balances by Category.)
1509     */
1510    public List<BenefitsComponent> getBenefitBalance() { 
1511      if (this.benefitBalance == null)
1512        this.benefitBalance = new ArrayList<BenefitsComponent>();
1513      return this.benefitBalance;
1514    }
1515
1516    public boolean hasBenefitBalance() { 
1517      if (this.benefitBalance == null)
1518        return false;
1519      for (BenefitsComponent item : this.benefitBalance)
1520        if (!item.isEmpty())
1521          return true;
1522      return false;
1523    }
1524
1525    /**
1526     * @return {@link #benefitBalance} (Benefits and optionally current balances by Category.)
1527     */
1528    // syntactic sugar
1529    public BenefitsComponent addBenefitBalance() { //3
1530      BenefitsComponent t = new BenefitsComponent();
1531      if (this.benefitBalance == null)
1532        this.benefitBalance = new ArrayList<BenefitsComponent>();
1533      this.benefitBalance.add(t);
1534      return t;
1535    }
1536
1537    // syntactic sugar
1538    public EligibilityResponse addBenefitBalance(BenefitsComponent t) { //3
1539      if (t == null)
1540        return this;
1541      if (this.benefitBalance == null)
1542        this.benefitBalance = new ArrayList<BenefitsComponent>();
1543      this.benefitBalance.add(t);
1544      return this;
1545    }
1546
1547    /**
1548     * @return {@link #error} (Mutually exclusive with Services Provided (Item).)
1549     */
1550    public List<ErrorsComponent> getError() { 
1551      if (this.error == null)
1552        this.error = new ArrayList<ErrorsComponent>();
1553      return this.error;
1554    }
1555
1556    public boolean hasError() { 
1557      if (this.error == null)
1558        return false;
1559      for (ErrorsComponent item : this.error)
1560        if (!item.isEmpty())
1561          return true;
1562      return false;
1563    }
1564
1565    /**
1566     * @return {@link #error} (Mutually exclusive with Services Provided (Item).)
1567     */
1568    // syntactic sugar
1569    public ErrorsComponent addError() { //3
1570      ErrorsComponent t = new ErrorsComponent();
1571      if (this.error == null)
1572        this.error = new ArrayList<ErrorsComponent>();
1573      this.error.add(t);
1574      return t;
1575    }
1576
1577    // syntactic sugar
1578    public EligibilityResponse addError(ErrorsComponent t) { //3
1579      if (t == null)
1580        return this;
1581      if (this.error == null)
1582        this.error = new ArrayList<ErrorsComponent>();
1583      this.error.add(t);
1584      return this;
1585    }
1586
1587      protected void listChildren(List<Property> childrenList) {
1588        super.listChildren(childrenList);
1589        childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier));
1590        childrenList.add(new Property("request[x]", "Identifier|Reference(EligibilityRequest)", "Original request resource reference.", 0, java.lang.Integer.MAX_VALUE, request));
1591        childrenList.add(new Property("outcome", "code", "Transaction status: error, complete.", 0, java.lang.Integer.MAX_VALUE, outcome));
1592        childrenList.add(new Property("disposition", "string", "A description of the status of the adjudication.", 0, java.lang.Integer.MAX_VALUE, disposition));
1593        childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset));
1594        childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset));
1595        childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created));
1596        childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The Insurer who produced this adjudicated response.", 0, java.lang.Integer.MAX_VALUE, organization));
1597        childrenList.add(new Property("requestProvider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestProvider));
1598        childrenList.add(new Property("requestOrganization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, requestOrganization));
1599        childrenList.add(new Property("inforce", "boolean", "Flag indicating if the coverage provided is inforce currently  if no service date(s) specified or for the whole duration of the service dates.", 0, java.lang.Integer.MAX_VALUE, inforce));
1600        childrenList.add(new Property("contract", "Reference(Contract)", "The contract resource which may provide more detailed information.", 0, java.lang.Integer.MAX_VALUE, contract));
1601        childrenList.add(new Property("form", "Coding", "The form to be used for printing the content.", 0, java.lang.Integer.MAX_VALUE, form));
1602        childrenList.add(new Property("benefitBalance", "", "Benefits and optionally current balances by Category.", 0, java.lang.Integer.MAX_VALUE, benefitBalance));
1603        childrenList.add(new Property("error", "", "Mutually exclusive with Services Provided (Item).", 0, java.lang.Integer.MAX_VALUE, error));
1604      }
1605
1606      @Override
1607      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1608        switch (hash) {
1609        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1610        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Type
1611        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<RemittanceOutcome>
1612        case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType
1613        case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding
1614        case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding
1615        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
1616        case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Type
1617        case 1601527200: /*requestProvider*/ return this.requestProvider == null ? new Base[0] : new Base[] {this.requestProvider}; // Type
1618        case 599053666: /*requestOrganization*/ return this.requestOrganization == null ? new Base[0] : new Base[] {this.requestOrganization}; // Type
1619        case 1945431270: /*inforce*/ return this.inforce == null ? new Base[0] : new Base[] {this.inforce}; // BooleanType
1620        case -566947566: /*contract*/ return this.contract == null ? new Base[0] : new Base[] {this.contract}; // Reference
1621        case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // Coding
1622        case 596003397: /*benefitBalance*/ return this.benefitBalance == null ? new Base[0] : this.benefitBalance.toArray(new Base[this.benefitBalance.size()]); // BenefitsComponent
1623        case 96784904: /*error*/ return this.error == null ? new Base[0] : this.error.toArray(new Base[this.error.size()]); // ErrorsComponent
1624        default: return super.getProperty(hash, name, checkValid);
1625        }
1626
1627      }
1628
1629      @Override
1630      public void setProperty(int hash, String name, Base value) throws FHIRException {
1631        switch (hash) {
1632        case -1618432855: // identifier
1633          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1634          break;
1635        case 1095692943: // request
1636          this.request = (Type) value; // Type
1637          break;
1638        case -1106507950: // outcome
1639          this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration<RemittanceOutcome>
1640          break;
1641        case 583380919: // disposition
1642          this.disposition = castToString(value); // StringType
1643          break;
1644        case 1548678118: // ruleset
1645          this.ruleset = castToCoding(value); // Coding
1646          break;
1647        case 1089373397: // originalRuleset
1648          this.originalRuleset = castToCoding(value); // Coding
1649          break;
1650        case 1028554472: // created
1651          this.created = castToDateTime(value); // DateTimeType
1652          break;
1653        case 1178922291: // organization
1654          this.organization = (Type) value; // Type
1655          break;
1656        case 1601527200: // requestProvider
1657          this.requestProvider = (Type) value; // Type
1658          break;
1659        case 599053666: // requestOrganization
1660          this.requestOrganization = (Type) value; // Type
1661          break;
1662        case 1945431270: // inforce
1663          this.inforce = castToBoolean(value); // BooleanType
1664          break;
1665        case -566947566: // contract
1666          this.contract = castToReference(value); // Reference
1667          break;
1668        case 3148996: // form
1669          this.form = castToCoding(value); // Coding
1670          break;
1671        case 596003397: // benefitBalance
1672          this.getBenefitBalance().add((BenefitsComponent) value); // BenefitsComponent
1673          break;
1674        case 96784904: // error
1675          this.getError().add((ErrorsComponent) value); // ErrorsComponent
1676          break;
1677        default: super.setProperty(hash, name, value);
1678        }
1679
1680      }
1681
1682      @Override
1683      public void setProperty(String name, Base value) throws FHIRException {
1684        if (name.equals("identifier"))
1685          this.getIdentifier().add(castToIdentifier(value));
1686        else if (name.equals("request[x]"))
1687          this.request = (Type) value; // Type
1688        else if (name.equals("outcome"))
1689          this.outcome = new RemittanceOutcomeEnumFactory().fromType(value); // Enumeration<RemittanceOutcome>
1690        else if (name.equals("disposition"))
1691          this.disposition = castToString(value); // StringType
1692        else if (name.equals("ruleset"))
1693          this.ruleset = castToCoding(value); // Coding
1694        else if (name.equals("originalRuleset"))
1695          this.originalRuleset = castToCoding(value); // Coding
1696        else if (name.equals("created"))
1697          this.created = castToDateTime(value); // DateTimeType
1698        else if (name.equals("organization[x]"))
1699          this.organization = (Type) value; // Type
1700        else if (name.equals("requestProvider[x]"))
1701          this.requestProvider = (Type) value; // Type
1702        else if (name.equals("requestOrganization[x]"))
1703          this.requestOrganization = (Type) value; // Type
1704        else if (name.equals("inforce"))
1705          this.inforce = castToBoolean(value); // BooleanType
1706        else if (name.equals("contract"))
1707          this.contract = castToReference(value); // Reference
1708        else if (name.equals("form"))
1709          this.form = castToCoding(value); // Coding
1710        else if (name.equals("benefitBalance"))
1711          this.getBenefitBalance().add((BenefitsComponent) value);
1712        else if (name.equals("error"))
1713          this.getError().add((ErrorsComponent) value);
1714        else
1715          super.setProperty(name, value);
1716      }
1717
1718      @Override
1719      public Base makeProperty(int hash, String name) throws FHIRException {
1720        switch (hash) {
1721        case -1618432855:  return addIdentifier(); // Identifier
1722        case 37106577:  return getRequest(); // Type
1723        case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Enumeration<RemittanceOutcome>
1724        case 583380919: throw new FHIRException("Cannot make property disposition as it is not a complex type"); // StringType
1725        case 1548678118:  return getRuleset(); // Coding
1726        case 1089373397:  return getOriginalRuleset(); // Coding
1727        case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType
1728        case 1326483053:  return getOrganization(); // Type
1729        case -1694784800:  return getRequestProvider(); // Type
1730        case 818740190:  return getRequestOrganization(); // Type
1731        case 1945431270: throw new FHIRException("Cannot make property inforce as it is not a complex type"); // BooleanType
1732        case -566947566:  return getContract(); // Reference
1733        case 3148996:  return getForm(); // Coding
1734        case 596003397:  return addBenefitBalance(); // BenefitsComponent
1735        case 96784904:  return addError(); // ErrorsComponent
1736        default: return super.makeProperty(hash, name);
1737        }
1738
1739      }
1740
1741      @Override
1742      public Base addChild(String name) throws FHIRException {
1743        if (name.equals("identifier")) {
1744          return addIdentifier();
1745        }
1746        else if (name.equals("requestIdentifier")) {
1747          this.request = new Identifier();
1748          return this.request;
1749        }
1750        else if (name.equals("requestReference")) {
1751          this.request = new Reference();
1752          return this.request;
1753        }
1754        else if (name.equals("outcome")) {
1755          throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.outcome");
1756        }
1757        else if (name.equals("disposition")) {
1758          throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.disposition");
1759        }
1760        else if (name.equals("ruleset")) {
1761          this.ruleset = new Coding();
1762          return this.ruleset;
1763        }
1764        else if (name.equals("originalRuleset")) {
1765          this.originalRuleset = new Coding();
1766          return this.originalRuleset;
1767        }
1768        else if (name.equals("created")) {
1769          throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.created");
1770        }
1771        else if (name.equals("organizationIdentifier")) {
1772          this.organization = new Identifier();
1773          return this.organization;
1774        }
1775        else if (name.equals("organizationReference")) {
1776          this.organization = new Reference();
1777          return this.organization;
1778        }
1779        else if (name.equals("requestProviderIdentifier")) {
1780          this.requestProvider = new Identifier();
1781          return this.requestProvider;
1782        }
1783        else if (name.equals("requestProviderReference")) {
1784          this.requestProvider = new Reference();
1785          return this.requestProvider;
1786        }
1787        else if (name.equals("requestOrganizationIdentifier")) {
1788          this.requestOrganization = new Identifier();
1789          return this.requestOrganization;
1790        }
1791        else if (name.equals("requestOrganizationReference")) {
1792          this.requestOrganization = new Reference();
1793          return this.requestOrganization;
1794        }
1795        else if (name.equals("inforce")) {
1796          throw new FHIRException("Cannot call addChild on a primitive type EligibilityResponse.inforce");
1797        }
1798        else if (name.equals("contract")) {
1799          this.contract = new Reference();
1800          return this.contract;
1801        }
1802        else if (name.equals("form")) {
1803          this.form = new Coding();
1804          return this.form;
1805        }
1806        else if (name.equals("benefitBalance")) {
1807          return addBenefitBalance();
1808        }
1809        else if (name.equals("error")) {
1810          return addError();
1811        }
1812        else
1813          return super.addChild(name);
1814      }
1815
1816  public String fhirType() {
1817    return "EligibilityResponse";
1818
1819  }
1820
1821      public EligibilityResponse copy() {
1822        EligibilityResponse dst = new EligibilityResponse();
1823        copyValues(dst);
1824        if (identifier != null) {
1825          dst.identifier = new ArrayList<Identifier>();
1826          for (Identifier i : identifier)
1827            dst.identifier.add(i.copy());
1828        };
1829        dst.request = request == null ? null : request.copy();
1830        dst.outcome = outcome == null ? null : outcome.copy();
1831        dst.disposition = disposition == null ? null : disposition.copy();
1832        dst.ruleset = ruleset == null ? null : ruleset.copy();
1833        dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy();
1834        dst.created = created == null ? null : created.copy();
1835        dst.organization = organization == null ? null : organization.copy();
1836        dst.requestProvider = requestProvider == null ? null : requestProvider.copy();
1837        dst.requestOrganization = requestOrganization == null ? null : requestOrganization.copy();
1838        dst.inforce = inforce == null ? null : inforce.copy();
1839        dst.contract = contract == null ? null : contract.copy();
1840        dst.form = form == null ? null : form.copy();
1841        if (benefitBalance != null) {
1842          dst.benefitBalance = new ArrayList<BenefitsComponent>();
1843          for (BenefitsComponent i : benefitBalance)
1844            dst.benefitBalance.add(i.copy());
1845        };
1846        if (error != null) {
1847          dst.error = new ArrayList<ErrorsComponent>();
1848          for (ErrorsComponent i : error)
1849            dst.error.add(i.copy());
1850        };
1851        return dst;
1852      }
1853
1854      protected EligibilityResponse typedCopy() {
1855        return copy();
1856      }
1857
1858      @Override
1859      public boolean equalsDeep(Base other) {
1860        if (!super.equalsDeep(other))
1861          return false;
1862        if (!(other instanceof EligibilityResponse))
1863          return false;
1864        EligibilityResponse o = (EligibilityResponse) other;
1865        return compareDeep(identifier, o.identifier, true) && compareDeep(request, o.request, true) && compareDeep(outcome, o.outcome, true)
1866           && compareDeep(disposition, o.disposition, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true)
1867           && compareDeep(created, o.created, true) && compareDeep(organization, o.organization, true) && compareDeep(requestProvider, o.requestProvider, true)
1868           && compareDeep(requestOrganization, o.requestOrganization, true) && compareDeep(inforce, o.inforce, true)
1869           && compareDeep(contract, o.contract, true) && compareDeep(form, o.form, true) && compareDeep(benefitBalance, o.benefitBalance, true)
1870           && compareDeep(error, o.error, true);
1871      }
1872
1873      @Override
1874      public boolean equalsShallow(Base other) {
1875        if (!super.equalsShallow(other))
1876          return false;
1877        if (!(other instanceof EligibilityResponse))
1878          return false;
1879        EligibilityResponse o = (EligibilityResponse) other;
1880        return compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(created, o.created, true)
1881           && compareValues(inforce, o.inforce, true);
1882      }
1883
1884      public boolean isEmpty() {
1885        return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (request == null || request.isEmpty())
1886           && (outcome == null || outcome.isEmpty()) && (disposition == null || disposition.isEmpty())
1887           && (ruleset == null || ruleset.isEmpty()) && (originalRuleset == null || originalRuleset.isEmpty())
1888           && (created == null || created.isEmpty()) && (organization == null || organization.isEmpty())
1889           && (requestProvider == null || requestProvider.isEmpty()) && (requestOrganization == null || requestOrganization.isEmpty())
1890           && (inforce == null || inforce.isEmpty()) && (contract == null || contract.isEmpty()) && (form == null || form.isEmpty())
1891           && (benefitBalance == null || benefitBalance.isEmpty()) && (error == null || error.isEmpty())
1892          ;
1893      }
1894
1895  @Override
1896  public ResourceType getResourceType() {
1897    return ResourceType.EligibilityResponse;
1898   }
1899
1900 /**
1901   * Search parameter: <b>requestorganizationreference</b>
1902   * <p>
1903   * Description: <b>The EligibilityRequest organization</b><br>
1904   * Type: <b>reference</b><br>
1905   * Path: <b>EligibilityResponse.requestOrganizationReference</b><br>
1906   * </p>
1907   */
1908  @SearchParamDefinition(name="requestorganizationreference", path="EligibilityResponse.requestOrganization.as(Reference)", description="The EligibilityRequest organization", type="reference" )
1909  public static final String SP_REQUESTORGANIZATIONREFERENCE = "requestorganizationreference";
1910 /**
1911   * <b>Fluent Client</b> search parameter constant for <b>requestorganizationreference</b>
1912   * <p>
1913   * Description: <b>The EligibilityRequest organization</b><br>
1914   * Type: <b>reference</b><br>
1915   * Path: <b>EligibilityResponse.requestOrganizationReference</b><br>
1916   * </p>
1917   */
1918  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTORGANIZATIONREFERENCE);
1919
1920/**
1921   * Constant for fluent queries to be used to add include statements. Specifies
1922   * the path value of "<b>EligibilityResponse:requestorganizationreference</b>".
1923   */
1924  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestorganizationreference").toLocked();
1925
1926 /**
1927   * Search parameter: <b>created</b>
1928   * <p>
1929   * Description: <b>The creation date</b><br>
1930   * Type: <b>date</b><br>
1931   * Path: <b>EligibilityResponse.created</b><br>
1932   * </p>
1933   */
1934  @SearchParamDefinition(name="created", path="EligibilityResponse.created", description="The creation date", type="date" )
1935  public static final String SP_CREATED = "created";
1936 /**
1937   * <b>Fluent Client</b> search parameter constant for <b>created</b>
1938   * <p>
1939   * Description: <b>The creation date</b><br>
1940   * Type: <b>date</b><br>
1941   * Path: <b>EligibilityResponse.created</b><br>
1942   * </p>
1943   */
1944  public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED);
1945
1946 /**
1947   * Search parameter: <b>requestorganizationidentifier</b>
1948   * <p>
1949   * Description: <b>The EligibilityRequest organization</b><br>
1950   * Type: <b>token</b><br>
1951   * Path: <b>EligibilityResponse.requestOrganizationIdentifier</b><br>
1952   * </p>
1953   */
1954  @SearchParamDefinition(name="requestorganizationidentifier", path="EligibilityResponse.requestOrganization.as(Identifier)", description="The EligibilityRequest organization", type="token" )
1955  public static final String SP_REQUESTORGANIZATIONIDENTIFIER = "requestorganizationidentifier";
1956 /**
1957   * <b>Fluent Client</b> search parameter constant for <b>requestorganizationidentifier</b>
1958   * <p>
1959   * Description: <b>The EligibilityRequest organization</b><br>
1960   * Type: <b>token</b><br>
1961   * Path: <b>EligibilityResponse.requestOrganizationIdentifier</b><br>
1962   * </p>
1963   */
1964  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTORGANIZATIONIDENTIFIER);
1965
1966 /**
1967   * Search parameter: <b>requestprovideridentifier</b>
1968   * <p>
1969   * Description: <b>The EligibilityRequest provider</b><br>
1970   * Type: <b>token</b><br>
1971   * Path: <b>EligibilityResponse.requestProviderIdentifier</b><br>
1972   * </p>
1973   */
1974  @SearchParamDefinition(name="requestprovideridentifier", path="EligibilityResponse.requestProvider.as(Identifier)", description="The EligibilityRequest provider", type="token" )
1975  public static final String SP_REQUESTPROVIDERIDENTIFIER = "requestprovideridentifier";
1976 /**
1977   * <b>Fluent Client</b> search parameter constant for <b>requestprovideridentifier</b>
1978   * <p>
1979   * Description: <b>The EligibilityRequest provider</b><br>
1980   * Type: <b>token</b><br>
1981   * Path: <b>EligibilityResponse.requestProviderIdentifier</b><br>
1982   * </p>
1983   */
1984  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTPROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTPROVIDERIDENTIFIER);
1985
1986 /**
1987   * Search parameter: <b>requestidentifier</b>
1988   * <p>
1989   * Description: <b>The EligibilityRequest reference</b><br>
1990   * Type: <b>token</b><br>
1991   * Path: <b>EligibilityResponse.requestIdentifier</b><br>
1992   * </p>
1993   */
1994  @SearchParamDefinition(name="requestidentifier", path="EligibilityResponse.request.as(Identifier)", description="The EligibilityRequest reference", type="token" )
1995  public static final String SP_REQUESTIDENTIFIER = "requestidentifier";
1996 /**
1997   * <b>Fluent Client</b> search parameter constant for <b>requestidentifier</b>
1998   * <p>
1999   * Description: <b>The EligibilityRequest reference</b><br>
2000   * Type: <b>token</b><br>
2001   * Path: <b>EligibilityResponse.requestIdentifier</b><br>
2002   * </p>
2003   */
2004  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER);
2005
2006 /**
2007   * Search parameter: <b>requestreference</b>
2008   * <p>
2009   * Description: <b>The EligibilityRequest reference</b><br>
2010   * Type: <b>reference</b><br>
2011   * Path: <b>EligibilityResponse.requestReference</b><br>
2012   * </p>
2013   */
2014  @SearchParamDefinition(name="requestreference", path="EligibilityResponse.request.as(Reference)", description="The EligibilityRequest reference", type="reference" )
2015  public static final String SP_REQUESTREFERENCE = "requestreference";
2016 /**
2017   * <b>Fluent Client</b> search parameter constant for <b>requestreference</b>
2018   * <p>
2019   * Description: <b>The EligibilityRequest reference</b><br>
2020   * Type: <b>reference</b><br>
2021   * Path: <b>EligibilityResponse.requestReference</b><br>
2022   * </p>
2023   */
2024  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE);
2025
2026/**
2027   * Constant for fluent queries to be used to add include statements. Specifies
2028   * the path value of "<b>EligibilityResponse:requestreference</b>".
2029   */
2030  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestreference").toLocked();
2031
2032 /**
2033   * Search parameter: <b>organizationidentifier</b>
2034   * <p>
2035   * Description: <b>The organization which generated this resource</b><br>
2036   * Type: <b>token</b><br>
2037   * Path: <b>EligibilityResponse.organizationIdentifier</b><br>
2038   * </p>
2039   */
2040  @SearchParamDefinition(name="organizationidentifier", path="EligibilityResponse.organization.as(Identifier)", description="The organization which generated this resource", type="token" )
2041  public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier";
2042 /**
2043   * <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b>
2044   * <p>
2045   * Description: <b>The organization which generated this resource</b><br>
2046   * Type: <b>token</b><br>
2047   * Path: <b>EligibilityResponse.organizationIdentifier</b><br>
2048   * </p>
2049   */
2050  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER);
2051
2052 /**
2053   * Search parameter: <b>requestproviderreference</b>
2054   * <p>
2055   * Description: <b>The EligibilityRequest provider</b><br>
2056   * Type: <b>reference</b><br>
2057   * Path: <b>EligibilityResponse.requestProviderReference</b><br>
2058   * </p>
2059   */
2060  @SearchParamDefinition(name="requestproviderreference", path="EligibilityResponse.requestProvider.as(Reference)", description="The EligibilityRequest provider", type="reference" )
2061  public static final String SP_REQUESTPROVIDERREFERENCE = "requestproviderreference";
2062 /**
2063   * <b>Fluent Client</b> search parameter constant for <b>requestproviderreference</b>
2064   * <p>
2065   * Description: <b>The EligibilityRequest provider</b><br>
2066   * Type: <b>reference</b><br>
2067   * Path: <b>EligibilityResponse.requestProviderReference</b><br>
2068   * </p>
2069   */
2070  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTPROVIDERREFERENCE);
2071
2072/**
2073   * Constant for fluent queries to be used to add include statements. Specifies
2074   * the path value of "<b>EligibilityResponse:requestproviderreference</b>".
2075   */
2076  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTPROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:requestproviderreference").toLocked();
2077
2078 /**
2079   * Search parameter: <b>organizationreference</b>
2080   * <p>
2081   * Description: <b>The organization which generated this resource</b><br>
2082   * Type: <b>reference</b><br>
2083   * Path: <b>EligibilityResponse.organizationReference</b><br>
2084   * </p>
2085   */
2086  @SearchParamDefinition(name="organizationreference", path="EligibilityResponse.organization.as(Reference)", description="The organization which generated this resource", type="reference" )
2087  public static final String SP_ORGANIZATIONREFERENCE = "organizationreference";
2088 /**
2089   * <b>Fluent Client</b> search parameter constant for <b>organizationreference</b>
2090   * <p>
2091   * Description: <b>The organization which generated this resource</b><br>
2092   * Type: <b>reference</b><br>
2093   * Path: <b>EligibilityResponse.organizationReference</b><br>
2094   * </p>
2095   */
2096  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE);
2097
2098/**
2099   * Constant for fluent queries to be used to add include statements. Specifies
2100   * the path value of "<b>EligibilityResponse:organizationreference</b>".
2101   */
2102  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("EligibilityResponse:organizationreference").toLocked();
2103
2104 /**
2105   * Search parameter: <b>outcome</b>
2106   * <p>
2107   * Description: <b>The processing outcome</b><br>
2108   * Type: <b>token</b><br>
2109   * Path: <b>EligibilityResponse.outcome</b><br>
2110   * </p>
2111   */
2112  @SearchParamDefinition(name="outcome", path="EligibilityResponse.outcome", description="The processing outcome", type="token" )
2113  public static final String SP_OUTCOME = "outcome";
2114 /**
2115   * <b>Fluent Client</b> search parameter constant for <b>outcome</b>
2116   * <p>
2117   * Description: <b>The processing outcome</b><br>
2118   * Type: <b>token</b><br>
2119   * Path: <b>EligibilityResponse.outcome</b><br>
2120   * </p>
2121   */
2122  public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME);
2123
2124 /**
2125   * Search parameter: <b>identifier</b>
2126   * <p>
2127   * Description: <b>The business identifier</b><br>
2128   * Type: <b>token</b><br>
2129   * Path: <b>EligibilityResponse.identifier</b><br>
2130   * </p>
2131   */
2132  @SearchParamDefinition(name="identifier", path="EligibilityResponse.identifier", description="The business identifier", type="token" )
2133  public static final String SP_IDENTIFIER = "identifier";
2134 /**
2135   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2136   * <p>
2137   * Description: <b>The business identifier</b><br>
2138   * Type: <b>token</b><br>
2139   * Path: <b>EligibilityResponse.identifier</b><br>
2140   * </p>
2141   */
2142  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2143
2144 /**
2145   * Search parameter: <b>disposition</b>
2146   * <p>
2147   * Description: <b>The contents of the disposition message</b><br>
2148   * Type: <b>string</b><br>
2149   * Path: <b>EligibilityResponse.disposition</b><br>
2150   * </p>
2151   */
2152  @SearchParamDefinition(name="disposition", path="EligibilityResponse.disposition", description="The contents of the disposition message", type="string" )
2153  public static final String SP_DISPOSITION = "disposition";
2154 /**
2155   * <b>Fluent Client</b> search parameter constant for <b>disposition</b>
2156   * <p>
2157   * Description: <b>The contents of the disposition message</b><br>
2158   * Type: <b>string</b><br>
2159   * Path: <b>EligibilityResponse.disposition</b><br>
2160   * </p>
2161   */
2162  public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION);
2163
2164
2165}