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