001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
052 */
053@ResourceDef(name="CoverageEligibilityResponse", profile="http://hl7.org/fhir/StructureDefinition/CoverageEligibilityResponse")
054public class CoverageEligibilityResponse extends DomainResource {
055
056    public enum EligibilityOutcome {
057        /**
058         * The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.
059         */
060        QUEUED, 
061        /**
062         * The processing has completed without errors
063         */
064        COMPLETE, 
065        /**
066         * One or more errors have been detected in the Claim
067         */
068        ERROR, 
069        /**
070         * No errors have been detected in the Claim and some of the adjudication has been performed.
071         */
072        PARTIAL, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static EligibilityOutcome fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("queued".equals(codeString))
081          return QUEUED;
082        if ("complete".equals(codeString))
083          return COMPLETE;
084        if ("error".equals(codeString))
085          return ERROR;
086        if ("partial".equals(codeString))
087          return PARTIAL;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown EligibilityOutcome code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case QUEUED: return "queued";
096            case COMPLETE: return "complete";
097            case ERROR: return "error";
098            case PARTIAL: return "partial";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case QUEUED: return "http://hl7.org/fhir/eligibility-outcome";
106            case COMPLETE: return "http://hl7.org/fhir/eligibility-outcome";
107            case ERROR: return "http://hl7.org/fhir/eligibility-outcome";
108            case PARTIAL: return "http://hl7.org/fhir/eligibility-outcome";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            case QUEUED: return "The Claim/Pre-authorization/Pre-determination has been received but processing has not begun.";
116            case COMPLETE: return "The processing has completed without errors";
117            case ERROR: return "One or more errors have been detected in the Claim";
118            case PARTIAL: return "No errors have been detected in the Claim and some of the adjudication has been performed.";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case QUEUED: return "Queued";
126            case COMPLETE: return "Processing Complete";
127            case ERROR: return "Error";
128            case PARTIAL: return "Partial Processing";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class EligibilityOutcomeEnumFactory implements EnumFactory<EligibilityOutcome> {
136    public EligibilityOutcome fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("queued".equals(codeString))
141          return EligibilityOutcome.QUEUED;
142        if ("complete".equals(codeString))
143          return EligibilityOutcome.COMPLETE;
144        if ("error".equals(codeString))
145          return EligibilityOutcome.ERROR;
146        if ("partial".equals(codeString))
147          return EligibilityOutcome.PARTIAL;
148        throw new IllegalArgumentException("Unknown EligibilityOutcome code '"+codeString+"'");
149        }
150        public Enumeration<EligibilityOutcome> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<EligibilityOutcome>(this, EligibilityOutcome.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<EligibilityOutcome>(this, EligibilityOutcome.NULL, code);
158        if ("queued".equals(codeString))
159          return new Enumeration<EligibilityOutcome>(this, EligibilityOutcome.QUEUED, code);
160        if ("complete".equals(codeString))
161          return new Enumeration<EligibilityOutcome>(this, EligibilityOutcome.COMPLETE, code);
162        if ("error".equals(codeString))
163          return new Enumeration<EligibilityOutcome>(this, EligibilityOutcome.ERROR, code);
164        if ("partial".equals(codeString))
165          return new Enumeration<EligibilityOutcome>(this, EligibilityOutcome.PARTIAL, code);
166        throw new FHIRException("Unknown EligibilityOutcome code '"+codeString+"'");
167        }
168    public String toCode(EligibilityOutcome code) {
169      if (code == EligibilityOutcome.QUEUED)
170        return "queued";
171      if (code == EligibilityOutcome.COMPLETE)
172        return "complete";
173      if (code == EligibilityOutcome.ERROR)
174        return "error";
175      if (code == EligibilityOutcome.PARTIAL)
176        return "partial";
177      return "?";
178      }
179    public String toSystem(EligibilityOutcome code) {
180      return code.getSystem();
181      }
182    }
183
184    public enum EligibilityResponsePurpose {
185        /**
186         * The prior authorization requirements for the listed, or discovered if specified, converages for the categories of service and/or specifed biling codes are requested.
187         */
188        AUTHREQUIREMENTS, 
189        /**
190         * The plan benefits and optionally benefits consumed  for the listed, or discovered if specified, converages are requested.
191         */
192        BENEFITS, 
193        /**
194         * The insurer is requested to report on any coverages which they are aware of in addition to any specifed.
195         */
196        DISCOVERY, 
197        /**
198         * A check that the specified coverages are in-force is requested.
199         */
200        VALIDATION, 
201        /**
202         * added to help the parsers with the generic types
203         */
204        NULL;
205        public static EligibilityResponsePurpose fromCode(String codeString) throws FHIRException {
206            if (codeString == null || "".equals(codeString))
207                return null;
208        if ("auth-requirements".equals(codeString))
209          return AUTHREQUIREMENTS;
210        if ("benefits".equals(codeString))
211          return BENEFITS;
212        if ("discovery".equals(codeString))
213          return DISCOVERY;
214        if ("validation".equals(codeString))
215          return VALIDATION;
216        if (Configuration.isAcceptInvalidEnums())
217          return null;
218        else
219          throw new FHIRException("Unknown EligibilityResponsePurpose code '"+codeString+"'");
220        }
221        public String toCode() {
222          switch (this) {
223            case AUTHREQUIREMENTS: return "auth-requirements";
224            case BENEFITS: return "benefits";
225            case DISCOVERY: return "discovery";
226            case VALIDATION: return "validation";
227            case NULL: return null;
228            default: return "?";
229          }
230        }
231        public String getSystem() {
232          switch (this) {
233            case AUTHREQUIREMENTS: return "http://hl7.org/fhir/eligibilityresponse-purpose";
234            case BENEFITS: return "http://hl7.org/fhir/eligibilityresponse-purpose";
235            case DISCOVERY: return "http://hl7.org/fhir/eligibilityresponse-purpose";
236            case VALIDATION: return "http://hl7.org/fhir/eligibilityresponse-purpose";
237            case NULL: return null;
238            default: return "?";
239          }
240        }
241        public String getDefinition() {
242          switch (this) {
243            case AUTHREQUIREMENTS: return "The prior authorization requirements for the listed, or discovered if specified, converages for the categories of service and/or specifed biling codes are requested.";
244            case BENEFITS: return "The plan benefits and optionally benefits consumed  for the listed, or discovered if specified, converages are requested.";
245            case DISCOVERY: return "The insurer is requested to report on any coverages which they are aware of in addition to any specifed.";
246            case VALIDATION: return "A check that the specified coverages are in-force is requested.";
247            case NULL: return null;
248            default: return "?";
249          }
250        }
251        public String getDisplay() {
252          switch (this) {
253            case AUTHREQUIREMENTS: return "Coverage auth-requirements";
254            case BENEFITS: return "Coverage benefits";
255            case DISCOVERY: return "Coverage Discovery";
256            case VALIDATION: return "Coverage Validation";
257            case NULL: return null;
258            default: return "?";
259          }
260        }
261    }
262
263  public static class EligibilityResponsePurposeEnumFactory implements EnumFactory<EligibilityResponsePurpose> {
264    public EligibilityResponsePurpose fromCode(String codeString) throws IllegalArgumentException {
265      if (codeString == null || "".equals(codeString))
266            if (codeString == null || "".equals(codeString))
267                return null;
268        if ("auth-requirements".equals(codeString))
269          return EligibilityResponsePurpose.AUTHREQUIREMENTS;
270        if ("benefits".equals(codeString))
271          return EligibilityResponsePurpose.BENEFITS;
272        if ("discovery".equals(codeString))
273          return EligibilityResponsePurpose.DISCOVERY;
274        if ("validation".equals(codeString))
275          return EligibilityResponsePurpose.VALIDATION;
276        throw new IllegalArgumentException("Unknown EligibilityResponsePurpose code '"+codeString+"'");
277        }
278        public Enumeration<EligibilityResponsePurpose> fromType(PrimitiveType<?> code) throws FHIRException {
279          if (code == null)
280            return null;
281          if (code.isEmpty())
282            return new Enumeration<EligibilityResponsePurpose>(this, EligibilityResponsePurpose.NULL, code);
283          String codeString = ((PrimitiveType) code).asStringValue();
284          if (codeString == null || "".equals(codeString))
285            return new Enumeration<EligibilityResponsePurpose>(this, EligibilityResponsePurpose.NULL, code);
286        if ("auth-requirements".equals(codeString))
287          return new Enumeration<EligibilityResponsePurpose>(this, EligibilityResponsePurpose.AUTHREQUIREMENTS, code);
288        if ("benefits".equals(codeString))
289          return new Enumeration<EligibilityResponsePurpose>(this, EligibilityResponsePurpose.BENEFITS, code);
290        if ("discovery".equals(codeString))
291          return new Enumeration<EligibilityResponsePurpose>(this, EligibilityResponsePurpose.DISCOVERY, code);
292        if ("validation".equals(codeString))
293          return new Enumeration<EligibilityResponsePurpose>(this, EligibilityResponsePurpose.VALIDATION, code);
294        throw new FHIRException("Unknown EligibilityResponsePurpose code '"+codeString+"'");
295        }
296    public String toCode(EligibilityResponsePurpose code) {
297      if (code == EligibilityResponsePurpose.AUTHREQUIREMENTS)
298        return "auth-requirements";
299      if (code == EligibilityResponsePurpose.BENEFITS)
300        return "benefits";
301      if (code == EligibilityResponsePurpose.DISCOVERY)
302        return "discovery";
303      if (code == EligibilityResponsePurpose.VALIDATION)
304        return "validation";
305      return "?";
306      }
307    public String toSystem(EligibilityResponsePurpose code) {
308      return code.getSystem();
309      }
310    }
311
312    @Block()
313    public static class CoverageEligibilityResponseEventComponent extends BackboneElement implements IBaseBackboneElement {
314        /**
315         * A coded event such as when a service is expected or a card printed.
316         */
317        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
318        @Description(shortDefinition="Specific event", formalDefinition="A coded event such as when a service is expected or a card printed." )
319        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/datestype")
320        protected CodeableConcept type;
321
322        /**
323         * A date or period in the past or future indicating when the event occurred or is expectd to occur.
324         */
325        @Child(name = "when", type = {DateTimeType.class, Period.class}, order=2, min=1, max=1, modifier=false, summary=false)
326        @Description(shortDefinition="Occurance date or period", formalDefinition="A date or period in the past or future indicating when the event occurred or is expectd to occur." )
327        protected DataType when;
328
329        private static final long serialVersionUID = -634897375L;
330
331    /**
332     * Constructor
333     */
334      public CoverageEligibilityResponseEventComponent() {
335        super();
336      }
337
338    /**
339     * Constructor
340     */
341      public CoverageEligibilityResponseEventComponent(CodeableConcept type, DataType when) {
342        super();
343        this.setType(type);
344        this.setWhen(when);
345      }
346
347        /**
348         * @return {@link #type} (A coded event such as when a service is expected or a card printed.)
349         */
350        public CodeableConcept getType() { 
351          if (this.type == null)
352            if (Configuration.errorOnAutoCreate())
353              throw new Error("Attempt to auto-create CoverageEligibilityResponseEventComponent.type");
354            else if (Configuration.doAutoCreate())
355              this.type = new CodeableConcept(); // cc
356          return this.type;
357        }
358
359        public boolean hasType() { 
360          return this.type != null && !this.type.isEmpty();
361        }
362
363        /**
364         * @param value {@link #type} (A coded event such as when a service is expected or a card printed.)
365         */
366        public CoverageEligibilityResponseEventComponent setType(CodeableConcept value) { 
367          this.type = value;
368          return this;
369        }
370
371        /**
372         * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
373         */
374        public DataType getWhen() { 
375          return this.when;
376        }
377
378        /**
379         * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
380         */
381        public DateTimeType getWhenDateTimeType() throws FHIRException { 
382          if (this.when == null)
383            this.when = new DateTimeType();
384          if (!(this.when instanceof DateTimeType))
385            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.when.getClass().getName()+" was encountered");
386          return (DateTimeType) this.when;
387        }
388
389        public boolean hasWhenDateTimeType() { 
390          return this != null && this.when instanceof DateTimeType;
391        }
392
393        /**
394         * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
395         */
396        public Period getWhenPeriod() throws FHIRException { 
397          if (this.when == null)
398            this.when = new Period();
399          if (!(this.when instanceof Period))
400            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered");
401          return (Period) this.when;
402        }
403
404        public boolean hasWhenPeriod() { 
405          return this != null && this.when instanceof Period;
406        }
407
408        public boolean hasWhen() { 
409          return this.when != null && !this.when.isEmpty();
410        }
411
412        /**
413         * @param value {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
414         */
415        public CoverageEligibilityResponseEventComponent setWhen(DataType value) { 
416          if (value != null && !(value instanceof DateTimeType || value instanceof Period))
417            throw new FHIRException("Not the right type for CoverageEligibilityResponse.event.when[x]: "+value.fhirType());
418          this.when = value;
419          return this;
420        }
421
422        protected void listChildren(List<Property> children) {
423          super.listChildren(children);
424          children.add(new Property("type", "CodeableConcept", "A coded event such as when a service is expected or a card printed.", 0, 1, type));
425          children.add(new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when));
426        }
427
428        @Override
429        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
430          switch (_hash) {
431          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "A coded event such as when a service is expected or a card printed.", 0, 1, type);
432          case 1312831238: /*when[x]*/  return new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
433          case 3648314: /*when*/  return new Property("when[x]", "dateTime|Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
434          case -1785502475: /*whenDateTime*/  return new Property("when[x]", "dateTime", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
435          case 251476379: /*whenPeriod*/  return new Property("when[x]", "Period", "A date or period in the past or future indicating when the event occurred or is expectd to occur.", 0, 1, when);
436          default: return super.getNamedProperty(_hash, _name, _checkValid);
437          }
438
439        }
440
441      @Override
442      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
443        switch (hash) {
444        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
445        case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // DataType
446        default: return super.getProperty(hash, name, checkValid);
447        }
448
449      }
450
451      @Override
452      public Base setProperty(int hash, String name, Base value) throws FHIRException {
453        switch (hash) {
454        case 3575610: // type
455          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
456          return value;
457        case 3648314: // when
458          this.when = TypeConvertor.castToType(value); // DataType
459          return value;
460        default: return super.setProperty(hash, name, value);
461        }
462
463      }
464
465      @Override
466      public Base setProperty(String name, Base value) throws FHIRException {
467        if (name.equals("type")) {
468          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
469        } else if (name.equals("when[x]")) {
470          this.when = TypeConvertor.castToType(value); // DataType
471        } else
472          return super.setProperty(name, value);
473        return value;
474      }
475
476      @Override
477      public Base makeProperty(int hash, String name) throws FHIRException {
478        switch (hash) {
479        case 3575610:  return getType();
480        case 1312831238:  return getWhen();
481        case 3648314:  return getWhen();
482        default: return super.makeProperty(hash, name);
483        }
484
485      }
486
487      @Override
488      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
489        switch (hash) {
490        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
491        case 3648314: /*when*/ return new String[] {"dateTime", "Period"};
492        default: return super.getTypesForProperty(hash, name);
493        }
494
495      }
496
497      @Override
498      public Base addChild(String name) throws FHIRException {
499        if (name.equals("type")) {
500          this.type = new CodeableConcept();
501          return this.type;
502        }
503        else if (name.equals("whenDateTime")) {
504          this.when = new DateTimeType();
505          return this.when;
506        }
507        else if (name.equals("whenPeriod")) {
508          this.when = new Period();
509          return this.when;
510        }
511        else
512          return super.addChild(name);
513      }
514
515      public CoverageEligibilityResponseEventComponent copy() {
516        CoverageEligibilityResponseEventComponent dst = new CoverageEligibilityResponseEventComponent();
517        copyValues(dst);
518        return dst;
519      }
520
521      public void copyValues(CoverageEligibilityResponseEventComponent dst) {
522        super.copyValues(dst);
523        dst.type = type == null ? null : type.copy();
524        dst.when = when == null ? null : when.copy();
525      }
526
527      @Override
528      public boolean equalsDeep(Base other_) {
529        if (!super.equalsDeep(other_))
530          return false;
531        if (!(other_ instanceof CoverageEligibilityResponseEventComponent))
532          return false;
533        CoverageEligibilityResponseEventComponent o = (CoverageEligibilityResponseEventComponent) other_;
534        return compareDeep(type, o.type, true) && compareDeep(when, o.when, true);
535      }
536
537      @Override
538      public boolean equalsShallow(Base other_) {
539        if (!super.equalsShallow(other_))
540          return false;
541        if (!(other_ instanceof CoverageEligibilityResponseEventComponent))
542          return false;
543        CoverageEligibilityResponseEventComponent o = (CoverageEligibilityResponseEventComponent) other_;
544        return true;
545      }
546
547      public boolean isEmpty() {
548        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, when);
549      }
550
551  public String fhirType() {
552    return "CoverageEligibilityResponse.event";
553
554  }
555
556  }
557
558    @Block()
559    public static class InsuranceComponent extends BackboneElement implements IBaseBackboneElement {
560        /**
561         * Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.
562         */
563        @Child(name = "coverage", type = {Coverage.class}, order=1, min=1, max=1, modifier=false, summary=true)
564        @Description(shortDefinition="Insurance information", formalDefinition="Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system." )
565        protected Reference coverage;
566
567        /**
568         * Flag indicating if the coverage provided is inforce currently if no service date(s) specified or for the whole duration of the service dates.
569         */
570        @Child(name = "inforce", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
571        @Description(shortDefinition="Coverage inforce indicator", 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." )
572        protected BooleanType inforce;
573
574        /**
575         * The term of the benefits documented in this response.
576         */
577        @Child(name = "benefitPeriod", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=false)
578        @Description(shortDefinition="When the benefits are applicable", formalDefinition="The term of the benefits documented in this response." )
579        protected Period benefitPeriod;
580
581        /**
582         * Benefits and optionally current balances, and authorization details by category or service.
583         */
584        @Child(name = "item", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
585        @Description(shortDefinition="Benefits and authorization details", formalDefinition="Benefits and optionally current balances, and authorization details by category or service." )
586        protected List<ItemsComponent> item;
587
588        private static final long serialVersionUID = 1473928476L;
589
590    /**
591     * Constructor
592     */
593      public InsuranceComponent() {
594        super();
595      }
596
597    /**
598     * Constructor
599     */
600      public InsuranceComponent(Reference coverage) {
601        super();
602        this.setCoverage(coverage);
603      }
604
605        /**
606         * @return {@link #coverage} (Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.)
607         */
608        public Reference getCoverage() { 
609          if (this.coverage == null)
610            if (Configuration.errorOnAutoCreate())
611              throw new Error("Attempt to auto-create InsuranceComponent.coverage");
612            else if (Configuration.doAutoCreate())
613              this.coverage = new Reference(); // cc
614          return this.coverage;
615        }
616
617        public boolean hasCoverage() { 
618          return this.coverage != null && !this.coverage.isEmpty();
619        }
620
621        /**
622         * @param value {@link #coverage} (Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.)
623         */
624        public InsuranceComponent setCoverage(Reference value) { 
625          this.coverage = value;
626          return this;
627        }
628
629        /**
630         * @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
631         */
632        public BooleanType getInforceElement() { 
633          if (this.inforce == null)
634            if (Configuration.errorOnAutoCreate())
635              throw new Error("Attempt to auto-create InsuranceComponent.inforce");
636            else if (Configuration.doAutoCreate())
637              this.inforce = new BooleanType(); // bb
638          return this.inforce;
639        }
640
641        public boolean hasInforceElement() { 
642          return this.inforce != null && !this.inforce.isEmpty();
643        }
644
645        public boolean hasInforce() { 
646          return this.inforce != null && !this.inforce.isEmpty();
647        }
648
649        /**
650         * @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
651         */
652        public InsuranceComponent setInforceElement(BooleanType value) { 
653          this.inforce = value;
654          return this;
655        }
656
657        /**
658         * @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.
659         */
660        public boolean getInforce() { 
661          return this.inforce == null || this.inforce.isEmpty() ? false : this.inforce.getValue();
662        }
663
664        /**
665         * @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.
666         */
667        public InsuranceComponent setInforce(boolean value) { 
668            if (this.inforce == null)
669              this.inforce = new BooleanType();
670            this.inforce.setValue(value);
671          return this;
672        }
673
674        /**
675         * @return {@link #benefitPeriod} (The term of the benefits documented in this response.)
676         */
677        public Period getBenefitPeriod() { 
678          if (this.benefitPeriod == null)
679            if (Configuration.errorOnAutoCreate())
680              throw new Error("Attempt to auto-create InsuranceComponent.benefitPeriod");
681            else if (Configuration.doAutoCreate())
682              this.benefitPeriod = new Period(); // cc
683          return this.benefitPeriod;
684        }
685
686        public boolean hasBenefitPeriod() { 
687          return this.benefitPeriod != null && !this.benefitPeriod.isEmpty();
688        }
689
690        /**
691         * @param value {@link #benefitPeriod} (The term of the benefits documented in this response.)
692         */
693        public InsuranceComponent setBenefitPeriod(Period value) { 
694          this.benefitPeriod = value;
695          return this;
696        }
697
698        /**
699         * @return {@link #item} (Benefits and optionally current balances, and authorization details by category or service.)
700         */
701        public List<ItemsComponent> getItem() { 
702          if (this.item == null)
703            this.item = new ArrayList<ItemsComponent>();
704          return this.item;
705        }
706
707        /**
708         * @return Returns a reference to <code>this</code> for easy method chaining
709         */
710        public InsuranceComponent setItem(List<ItemsComponent> theItem) { 
711          this.item = theItem;
712          return this;
713        }
714
715        public boolean hasItem() { 
716          if (this.item == null)
717            return false;
718          for (ItemsComponent item : this.item)
719            if (!item.isEmpty())
720              return true;
721          return false;
722        }
723
724        public ItemsComponent addItem() { //3
725          ItemsComponent t = new ItemsComponent();
726          if (this.item == null)
727            this.item = new ArrayList<ItemsComponent>();
728          this.item.add(t);
729          return t;
730        }
731
732        public InsuranceComponent addItem(ItemsComponent t) { //3
733          if (t == null)
734            return this;
735          if (this.item == null)
736            this.item = new ArrayList<ItemsComponent>();
737          this.item.add(t);
738          return this;
739        }
740
741        /**
742         * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist {3}
743         */
744        public ItemsComponent getItemFirstRep() { 
745          if (getItem().isEmpty()) {
746            addItem();
747          }
748          return getItem().get(0);
749        }
750
751        protected void listChildren(List<Property> children) {
752          super.listChildren(children);
753          children.add(new Property("coverage", "Reference(Coverage)", "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", 0, 1, coverage));
754          children.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, 1, inforce));
755          children.add(new Property("benefitPeriod", "Period", "The term of the benefits documented in this response.", 0, 1, benefitPeriod));
756          children.add(new Property("item", "", "Benefits and optionally current balances, and authorization details by category or service.", 0, java.lang.Integer.MAX_VALUE, item));
757        }
758
759        @Override
760        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
761          switch (_hash) {
762          case -351767064: /*coverage*/  return new Property("coverage", "Reference(Coverage)", "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", 0, 1, coverage);
763          case 1945431270: /*inforce*/  return 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, 1, inforce);
764          case -407369416: /*benefitPeriod*/  return new Property("benefitPeriod", "Period", "The term of the benefits documented in this response.", 0, 1, benefitPeriod);
765          case 3242771: /*item*/  return new Property("item", "", "Benefits and optionally current balances, and authorization details by category or service.", 0, java.lang.Integer.MAX_VALUE, item);
766          default: return super.getNamedProperty(_hash, _name, _checkValid);
767          }
768
769        }
770
771      @Override
772      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
773        switch (hash) {
774        case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference
775        case 1945431270: /*inforce*/ return this.inforce == null ? new Base[0] : new Base[] {this.inforce}; // BooleanType
776        case -407369416: /*benefitPeriod*/ return this.benefitPeriod == null ? new Base[0] : new Base[] {this.benefitPeriod}; // Period
777        case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // ItemsComponent
778        default: return super.getProperty(hash, name, checkValid);
779        }
780
781      }
782
783      @Override
784      public Base setProperty(int hash, String name, Base value) throws FHIRException {
785        switch (hash) {
786        case -351767064: // coverage
787          this.coverage = TypeConvertor.castToReference(value); // Reference
788          return value;
789        case 1945431270: // inforce
790          this.inforce = TypeConvertor.castToBoolean(value); // BooleanType
791          return value;
792        case -407369416: // benefitPeriod
793          this.benefitPeriod = TypeConvertor.castToPeriod(value); // Period
794          return value;
795        case 3242771: // item
796          this.getItem().add((ItemsComponent) value); // ItemsComponent
797          return value;
798        default: return super.setProperty(hash, name, value);
799        }
800
801      }
802
803      @Override
804      public Base setProperty(String name, Base value) throws FHIRException {
805        if (name.equals("coverage")) {
806          this.coverage = TypeConvertor.castToReference(value); // Reference
807        } else if (name.equals("inforce")) {
808          this.inforce = TypeConvertor.castToBoolean(value); // BooleanType
809        } else if (name.equals("benefitPeriod")) {
810          this.benefitPeriod = TypeConvertor.castToPeriod(value); // Period
811        } else if (name.equals("item")) {
812          this.getItem().add((ItemsComponent) value);
813        } else
814          return super.setProperty(name, value);
815        return value;
816      }
817
818      @Override
819      public Base makeProperty(int hash, String name) throws FHIRException {
820        switch (hash) {
821        case -351767064:  return getCoverage();
822        case 1945431270:  return getInforceElement();
823        case -407369416:  return getBenefitPeriod();
824        case 3242771:  return addItem(); 
825        default: return super.makeProperty(hash, name);
826        }
827
828      }
829
830      @Override
831      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
832        switch (hash) {
833        case -351767064: /*coverage*/ return new String[] {"Reference"};
834        case 1945431270: /*inforce*/ return new String[] {"boolean"};
835        case -407369416: /*benefitPeriod*/ return new String[] {"Period"};
836        case 3242771: /*item*/ return new String[] {};
837        default: return super.getTypesForProperty(hash, name);
838        }
839
840      }
841
842      @Override
843      public Base addChild(String name) throws FHIRException {
844        if (name.equals("coverage")) {
845          this.coverage = new Reference();
846          return this.coverage;
847        }
848        else if (name.equals("inforce")) {
849          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.insurance.inforce");
850        }
851        else if (name.equals("benefitPeriod")) {
852          this.benefitPeriod = new Period();
853          return this.benefitPeriod;
854        }
855        else if (name.equals("item")) {
856          return addItem();
857        }
858        else
859          return super.addChild(name);
860      }
861
862      public InsuranceComponent copy() {
863        InsuranceComponent dst = new InsuranceComponent();
864        copyValues(dst);
865        return dst;
866      }
867
868      public void copyValues(InsuranceComponent dst) {
869        super.copyValues(dst);
870        dst.coverage = coverage == null ? null : coverage.copy();
871        dst.inforce = inforce == null ? null : inforce.copy();
872        dst.benefitPeriod = benefitPeriod == null ? null : benefitPeriod.copy();
873        if (item != null) {
874          dst.item = new ArrayList<ItemsComponent>();
875          for (ItemsComponent i : item)
876            dst.item.add(i.copy());
877        };
878      }
879
880      @Override
881      public boolean equalsDeep(Base other_) {
882        if (!super.equalsDeep(other_))
883          return false;
884        if (!(other_ instanceof InsuranceComponent))
885          return false;
886        InsuranceComponent o = (InsuranceComponent) other_;
887        return compareDeep(coverage, o.coverage, true) && compareDeep(inforce, o.inforce, true) && compareDeep(benefitPeriod, o.benefitPeriod, true)
888           && compareDeep(item, o.item, true);
889      }
890
891      @Override
892      public boolean equalsShallow(Base other_) {
893        if (!super.equalsShallow(other_))
894          return false;
895        if (!(other_ instanceof InsuranceComponent))
896          return false;
897        InsuranceComponent o = (InsuranceComponent) other_;
898        return compareValues(inforce, o.inforce, true);
899      }
900
901      public boolean isEmpty() {
902        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(coverage, inforce, benefitPeriod
903          , item);
904      }
905
906  public String fhirType() {
907    return "CoverageEligibilityResponse.insurance";
908
909  }
910
911  }
912
913    @Block()
914    public static class ItemsComponent extends BackboneElement implements IBaseBackboneElement {
915        /**
916         * Code to identify the general type of benefits under which products and services are provided.
917         */
918        @Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
919        @Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." )
920        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory")
921        protected CodeableConcept category;
922
923        /**
924         * This contains the product, service, drug or other billing code for the item.
925         */
926        @Child(name = "productOrService", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
927        @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="This contains the product, service, drug or other billing code for the item." )
928        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
929        protected CodeableConcept productOrService;
930
931        /**
932         * Item typification or modifiers codes to convey additional context for the product or service.
933         */
934        @Child(name = "modifier", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
935        @Description(shortDefinition="Product or service billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." )
936        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers")
937        protected List<CodeableConcept> modifier;
938
939        /**
940         * The practitioner who is eligible for the provision of the product or service.
941         */
942        @Child(name = "provider", type = {Practitioner.class, PractitionerRole.class}, order=4, min=0, max=1, modifier=false, summary=false)
943        @Description(shortDefinition="Performing practitioner", formalDefinition="The practitioner who is eligible for the provision of the product or service." )
944        protected Reference provider;
945
946        /**
947         * True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.
948         */
949        @Child(name = "excluded", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false)
950        @Description(shortDefinition="Excluded from the plan", formalDefinition="True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage." )
951        protected BooleanType excluded;
952
953        /**
954         * A short name or tag for the benefit.
955         */
956        @Child(name = "name", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
957        @Description(shortDefinition="Short name for the benefit", formalDefinition="A short name or tag for the benefit." )
958        protected StringType name;
959
960        /**
961         * A richer description of the benefit or services covered.
962         */
963        @Child(name = "description", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
964        @Description(shortDefinition="Description of the benefit or services covered", formalDefinition="A richer description of the benefit or services covered." )
965        protected StringType description;
966
967        /**
968         * Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.
969         */
970        @Child(name = "network", type = {CodeableConcept.class}, order=8, min=0, max=1, modifier=false, summary=false)
971        @Description(shortDefinition="In or out of network", formalDefinition="Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers." )
972        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-network")
973        protected CodeableConcept network;
974
975        /**
976         * Indicates if the benefits apply to an individual or to the family.
977         */
978        @Child(name = "unit", type = {CodeableConcept.class}, order=9, min=0, max=1, modifier=false, summary=false)
979        @Description(shortDefinition="Individual or family", formalDefinition="Indicates if the benefits apply to an individual or to the family." )
980        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-unit")
981        protected CodeableConcept unit;
982
983        /**
984         * The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.
985         */
986        @Child(name = "term", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=false)
987        @Description(shortDefinition="Annual or lifetime", formalDefinition="The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'." )
988        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-term")
989        protected CodeableConcept term;
990
991        /**
992         * Benefits used to date.
993         */
994        @Child(name = "benefit", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
995        @Description(shortDefinition="Benefit Summary", formalDefinition="Benefits used to date." )
996        protected List<BenefitComponent> benefit;
997
998        /**
999         * A boolean flag indicating whether a preauthorization is required prior to actual service delivery.
1000         */
1001        @Child(name = "authorizationRequired", type = {BooleanType.class}, order=12, min=0, max=1, modifier=false, summary=false)
1002        @Description(shortDefinition="Authorization required flag", formalDefinition="A boolean flag indicating whether a preauthorization is required prior to actual service delivery." )
1003        protected BooleanType authorizationRequired;
1004
1005        /**
1006         * Codes or comments regarding information or actions associated with the preauthorization.
1007         */
1008        @Child(name = "authorizationSupporting", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1009        @Description(shortDefinition="Type of required supporting materials", formalDefinition="Codes or comments regarding information or actions associated with the preauthorization." )
1010        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/coverageeligibilityresponse-ex-auth-support")
1011        protected List<CodeableConcept> authorizationSupporting;
1012
1013        /**
1014         * A web location for obtaining requirements or descriptive information regarding the preauthorization.
1015         */
1016        @Child(name = "authorizationUrl", type = {UriType.class}, order=14, min=0, max=1, modifier=false, summary=false)
1017        @Description(shortDefinition="Preauthorization requirements endpoint", formalDefinition="A web location for obtaining requirements or descriptive information regarding the preauthorization." )
1018        protected UriType authorizationUrl;
1019
1020        private static final long serialVersionUID = 1706159945L;
1021
1022    /**
1023     * Constructor
1024     */
1025      public ItemsComponent() {
1026        super();
1027      }
1028
1029        /**
1030         * @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.)
1031         */
1032        public CodeableConcept getCategory() { 
1033          if (this.category == null)
1034            if (Configuration.errorOnAutoCreate())
1035              throw new Error("Attempt to auto-create ItemsComponent.category");
1036            else if (Configuration.doAutoCreate())
1037              this.category = new CodeableConcept(); // cc
1038          return this.category;
1039        }
1040
1041        public boolean hasCategory() { 
1042          return this.category != null && !this.category.isEmpty();
1043        }
1044
1045        /**
1046         * @param value {@link #category} (Code to identify the general type of benefits under which products and services are provided.)
1047         */
1048        public ItemsComponent setCategory(CodeableConcept value) { 
1049          this.category = value;
1050          return this;
1051        }
1052
1053        /**
1054         * @return {@link #productOrService} (This contains the product, service, drug or other billing code for the item.)
1055         */
1056        public CodeableConcept getProductOrService() { 
1057          if (this.productOrService == null)
1058            if (Configuration.errorOnAutoCreate())
1059              throw new Error("Attempt to auto-create ItemsComponent.productOrService");
1060            else if (Configuration.doAutoCreate())
1061              this.productOrService = new CodeableConcept(); // cc
1062          return this.productOrService;
1063        }
1064
1065        public boolean hasProductOrService() { 
1066          return this.productOrService != null && !this.productOrService.isEmpty();
1067        }
1068
1069        /**
1070         * @param value {@link #productOrService} (This contains the product, service, drug or other billing code for the item.)
1071         */
1072        public ItemsComponent setProductOrService(CodeableConcept value) { 
1073          this.productOrService = value;
1074          return this;
1075        }
1076
1077        /**
1078         * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.)
1079         */
1080        public List<CodeableConcept> getModifier() { 
1081          if (this.modifier == null)
1082            this.modifier = new ArrayList<CodeableConcept>();
1083          return this.modifier;
1084        }
1085
1086        /**
1087         * @return Returns a reference to <code>this</code> for easy method chaining
1088         */
1089        public ItemsComponent setModifier(List<CodeableConcept> theModifier) { 
1090          this.modifier = theModifier;
1091          return this;
1092        }
1093
1094        public boolean hasModifier() { 
1095          if (this.modifier == null)
1096            return false;
1097          for (CodeableConcept item : this.modifier)
1098            if (!item.isEmpty())
1099              return true;
1100          return false;
1101        }
1102
1103        public CodeableConcept addModifier() { //3
1104          CodeableConcept t = new CodeableConcept();
1105          if (this.modifier == null)
1106            this.modifier = new ArrayList<CodeableConcept>();
1107          this.modifier.add(t);
1108          return t;
1109        }
1110
1111        public ItemsComponent addModifier(CodeableConcept t) { //3
1112          if (t == null)
1113            return this;
1114          if (this.modifier == null)
1115            this.modifier = new ArrayList<CodeableConcept>();
1116          this.modifier.add(t);
1117          return this;
1118        }
1119
1120        /**
1121         * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3}
1122         */
1123        public CodeableConcept getModifierFirstRep() { 
1124          if (getModifier().isEmpty()) {
1125            addModifier();
1126          }
1127          return getModifier().get(0);
1128        }
1129
1130        /**
1131         * @return {@link #provider} (The practitioner who is eligible for the provision of the product or service.)
1132         */
1133        public Reference getProvider() { 
1134          if (this.provider == null)
1135            if (Configuration.errorOnAutoCreate())
1136              throw new Error("Attempt to auto-create ItemsComponent.provider");
1137            else if (Configuration.doAutoCreate())
1138              this.provider = new Reference(); // cc
1139          return this.provider;
1140        }
1141
1142        public boolean hasProvider() { 
1143          return this.provider != null && !this.provider.isEmpty();
1144        }
1145
1146        /**
1147         * @param value {@link #provider} (The practitioner who is eligible for the provision of the product or service.)
1148         */
1149        public ItemsComponent setProvider(Reference value) { 
1150          this.provider = value;
1151          return this;
1152        }
1153
1154        /**
1155         * @return {@link #excluded} (True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.). This is the underlying object with id, value and extensions. The accessor "getExcluded" gives direct access to the value
1156         */
1157        public BooleanType getExcludedElement() { 
1158          if (this.excluded == null)
1159            if (Configuration.errorOnAutoCreate())
1160              throw new Error("Attempt to auto-create ItemsComponent.excluded");
1161            else if (Configuration.doAutoCreate())
1162              this.excluded = new BooleanType(); // bb
1163          return this.excluded;
1164        }
1165
1166        public boolean hasExcludedElement() { 
1167          return this.excluded != null && !this.excluded.isEmpty();
1168        }
1169
1170        public boolean hasExcluded() { 
1171          return this.excluded != null && !this.excluded.isEmpty();
1172        }
1173
1174        /**
1175         * @param value {@link #excluded} (True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.). This is the underlying object with id, value and extensions. The accessor "getExcluded" gives direct access to the value
1176         */
1177        public ItemsComponent setExcludedElement(BooleanType value) { 
1178          this.excluded = value;
1179          return this;
1180        }
1181
1182        /**
1183         * @return True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.
1184         */
1185        public boolean getExcluded() { 
1186          return this.excluded == null || this.excluded.isEmpty() ? false : this.excluded.getValue();
1187        }
1188
1189        /**
1190         * @param value True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.
1191         */
1192        public ItemsComponent setExcluded(boolean value) { 
1193            if (this.excluded == null)
1194              this.excluded = new BooleanType();
1195            this.excluded.setValue(value);
1196          return this;
1197        }
1198
1199        /**
1200         * @return {@link #name} (A short name or tag for the benefit.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1201         */
1202        public StringType getNameElement() { 
1203          if (this.name == null)
1204            if (Configuration.errorOnAutoCreate())
1205              throw new Error("Attempt to auto-create ItemsComponent.name");
1206            else if (Configuration.doAutoCreate())
1207              this.name = new StringType(); // bb
1208          return this.name;
1209        }
1210
1211        public boolean hasNameElement() { 
1212          return this.name != null && !this.name.isEmpty();
1213        }
1214
1215        public boolean hasName() { 
1216          return this.name != null && !this.name.isEmpty();
1217        }
1218
1219        /**
1220         * @param value {@link #name} (A short name or tag for the benefit.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1221         */
1222        public ItemsComponent setNameElement(StringType value) { 
1223          this.name = value;
1224          return this;
1225        }
1226
1227        /**
1228         * @return A short name or tag for the benefit.
1229         */
1230        public String getName() { 
1231          return this.name == null ? null : this.name.getValue();
1232        }
1233
1234        /**
1235         * @param value A short name or tag for the benefit.
1236         */
1237        public ItemsComponent setName(String value) { 
1238          if (Utilities.noString(value))
1239            this.name = null;
1240          else {
1241            if (this.name == null)
1242              this.name = new StringType();
1243            this.name.setValue(value);
1244          }
1245          return this;
1246        }
1247
1248        /**
1249         * @return {@link #description} (A richer description of the benefit or services covered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1250         */
1251        public StringType getDescriptionElement() { 
1252          if (this.description == null)
1253            if (Configuration.errorOnAutoCreate())
1254              throw new Error("Attempt to auto-create ItemsComponent.description");
1255            else if (Configuration.doAutoCreate())
1256              this.description = new StringType(); // bb
1257          return this.description;
1258        }
1259
1260        public boolean hasDescriptionElement() { 
1261          return this.description != null && !this.description.isEmpty();
1262        }
1263
1264        public boolean hasDescription() { 
1265          return this.description != null && !this.description.isEmpty();
1266        }
1267
1268        /**
1269         * @param value {@link #description} (A richer description of the benefit or services covered.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1270         */
1271        public ItemsComponent setDescriptionElement(StringType value) { 
1272          this.description = value;
1273          return this;
1274        }
1275
1276        /**
1277         * @return A richer description of the benefit or services covered.
1278         */
1279        public String getDescription() { 
1280          return this.description == null ? null : this.description.getValue();
1281        }
1282
1283        /**
1284         * @param value A richer description of the benefit or services covered.
1285         */
1286        public ItemsComponent setDescription(String value) { 
1287          if (Utilities.noString(value))
1288            this.description = null;
1289          else {
1290            if (this.description == null)
1291              this.description = new StringType();
1292            this.description.setValue(value);
1293          }
1294          return this;
1295        }
1296
1297        /**
1298         * @return {@link #network} (Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.)
1299         */
1300        public CodeableConcept getNetwork() { 
1301          if (this.network == null)
1302            if (Configuration.errorOnAutoCreate())
1303              throw new Error("Attempt to auto-create ItemsComponent.network");
1304            else if (Configuration.doAutoCreate())
1305              this.network = new CodeableConcept(); // cc
1306          return this.network;
1307        }
1308
1309        public boolean hasNetwork() { 
1310          return this.network != null && !this.network.isEmpty();
1311        }
1312
1313        /**
1314         * @param value {@link #network} (Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.)
1315         */
1316        public ItemsComponent setNetwork(CodeableConcept value) { 
1317          this.network = value;
1318          return this;
1319        }
1320
1321        /**
1322         * @return {@link #unit} (Indicates if the benefits apply to an individual or to the family.)
1323         */
1324        public CodeableConcept getUnit() { 
1325          if (this.unit == null)
1326            if (Configuration.errorOnAutoCreate())
1327              throw new Error("Attempt to auto-create ItemsComponent.unit");
1328            else if (Configuration.doAutoCreate())
1329              this.unit = new CodeableConcept(); // cc
1330          return this.unit;
1331        }
1332
1333        public boolean hasUnit() { 
1334          return this.unit != null && !this.unit.isEmpty();
1335        }
1336
1337        /**
1338         * @param value {@link #unit} (Indicates if the benefits apply to an individual or to the family.)
1339         */
1340        public ItemsComponent setUnit(CodeableConcept value) { 
1341          this.unit = value;
1342          return this;
1343        }
1344
1345        /**
1346         * @return {@link #term} (The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.)
1347         */
1348        public CodeableConcept getTerm() { 
1349          if (this.term == null)
1350            if (Configuration.errorOnAutoCreate())
1351              throw new Error("Attempt to auto-create ItemsComponent.term");
1352            else if (Configuration.doAutoCreate())
1353              this.term = new CodeableConcept(); // cc
1354          return this.term;
1355        }
1356
1357        public boolean hasTerm() { 
1358          return this.term != null && !this.term.isEmpty();
1359        }
1360
1361        /**
1362         * @param value {@link #term} (The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.)
1363         */
1364        public ItemsComponent setTerm(CodeableConcept value) { 
1365          this.term = value;
1366          return this;
1367        }
1368
1369        /**
1370         * @return {@link #benefit} (Benefits used to date.)
1371         */
1372        public List<BenefitComponent> getBenefit() { 
1373          if (this.benefit == null)
1374            this.benefit = new ArrayList<BenefitComponent>();
1375          return this.benefit;
1376        }
1377
1378        /**
1379         * @return Returns a reference to <code>this</code> for easy method chaining
1380         */
1381        public ItemsComponent setBenefit(List<BenefitComponent> theBenefit) { 
1382          this.benefit = theBenefit;
1383          return this;
1384        }
1385
1386        public boolean hasBenefit() { 
1387          if (this.benefit == null)
1388            return false;
1389          for (BenefitComponent item : this.benefit)
1390            if (!item.isEmpty())
1391              return true;
1392          return false;
1393        }
1394
1395        public BenefitComponent addBenefit() { //3
1396          BenefitComponent t = new BenefitComponent();
1397          if (this.benefit == null)
1398            this.benefit = new ArrayList<BenefitComponent>();
1399          this.benefit.add(t);
1400          return t;
1401        }
1402
1403        public ItemsComponent addBenefit(BenefitComponent t) { //3
1404          if (t == null)
1405            return this;
1406          if (this.benefit == null)
1407            this.benefit = new ArrayList<BenefitComponent>();
1408          this.benefit.add(t);
1409          return this;
1410        }
1411
1412        /**
1413         * @return The first repetition of repeating field {@link #benefit}, creating it if it does not already exist {3}
1414         */
1415        public BenefitComponent getBenefitFirstRep() { 
1416          if (getBenefit().isEmpty()) {
1417            addBenefit();
1418          }
1419          return getBenefit().get(0);
1420        }
1421
1422        /**
1423         * @return {@link #authorizationRequired} (A boolean flag indicating whether a preauthorization is required prior to actual service delivery.). This is the underlying object with id, value and extensions. The accessor "getAuthorizationRequired" gives direct access to the value
1424         */
1425        public BooleanType getAuthorizationRequiredElement() { 
1426          if (this.authorizationRequired == null)
1427            if (Configuration.errorOnAutoCreate())
1428              throw new Error("Attempt to auto-create ItemsComponent.authorizationRequired");
1429            else if (Configuration.doAutoCreate())
1430              this.authorizationRequired = new BooleanType(); // bb
1431          return this.authorizationRequired;
1432        }
1433
1434        public boolean hasAuthorizationRequiredElement() { 
1435          return this.authorizationRequired != null && !this.authorizationRequired.isEmpty();
1436        }
1437
1438        public boolean hasAuthorizationRequired() { 
1439          return this.authorizationRequired != null && !this.authorizationRequired.isEmpty();
1440        }
1441
1442        /**
1443         * @param value {@link #authorizationRequired} (A boolean flag indicating whether a preauthorization is required prior to actual service delivery.). This is the underlying object with id, value and extensions. The accessor "getAuthorizationRequired" gives direct access to the value
1444         */
1445        public ItemsComponent setAuthorizationRequiredElement(BooleanType value) { 
1446          this.authorizationRequired = value;
1447          return this;
1448        }
1449
1450        /**
1451         * @return A boolean flag indicating whether a preauthorization is required prior to actual service delivery.
1452         */
1453        public boolean getAuthorizationRequired() { 
1454          return this.authorizationRequired == null || this.authorizationRequired.isEmpty() ? false : this.authorizationRequired.getValue();
1455        }
1456
1457        /**
1458         * @param value A boolean flag indicating whether a preauthorization is required prior to actual service delivery.
1459         */
1460        public ItemsComponent setAuthorizationRequired(boolean value) { 
1461            if (this.authorizationRequired == null)
1462              this.authorizationRequired = new BooleanType();
1463            this.authorizationRequired.setValue(value);
1464          return this;
1465        }
1466
1467        /**
1468         * @return {@link #authorizationSupporting} (Codes or comments regarding information or actions associated with the preauthorization.)
1469         */
1470        public List<CodeableConcept> getAuthorizationSupporting() { 
1471          if (this.authorizationSupporting == null)
1472            this.authorizationSupporting = new ArrayList<CodeableConcept>();
1473          return this.authorizationSupporting;
1474        }
1475
1476        /**
1477         * @return Returns a reference to <code>this</code> for easy method chaining
1478         */
1479        public ItemsComponent setAuthorizationSupporting(List<CodeableConcept> theAuthorizationSupporting) { 
1480          this.authorizationSupporting = theAuthorizationSupporting;
1481          return this;
1482        }
1483
1484        public boolean hasAuthorizationSupporting() { 
1485          if (this.authorizationSupporting == null)
1486            return false;
1487          for (CodeableConcept item : this.authorizationSupporting)
1488            if (!item.isEmpty())
1489              return true;
1490          return false;
1491        }
1492
1493        public CodeableConcept addAuthorizationSupporting() { //3
1494          CodeableConcept t = new CodeableConcept();
1495          if (this.authorizationSupporting == null)
1496            this.authorizationSupporting = new ArrayList<CodeableConcept>();
1497          this.authorizationSupporting.add(t);
1498          return t;
1499        }
1500
1501        public ItemsComponent addAuthorizationSupporting(CodeableConcept t) { //3
1502          if (t == null)
1503            return this;
1504          if (this.authorizationSupporting == null)
1505            this.authorizationSupporting = new ArrayList<CodeableConcept>();
1506          this.authorizationSupporting.add(t);
1507          return this;
1508        }
1509
1510        /**
1511         * @return The first repetition of repeating field {@link #authorizationSupporting}, creating it if it does not already exist {3}
1512         */
1513        public CodeableConcept getAuthorizationSupportingFirstRep() { 
1514          if (getAuthorizationSupporting().isEmpty()) {
1515            addAuthorizationSupporting();
1516          }
1517          return getAuthorizationSupporting().get(0);
1518        }
1519
1520        /**
1521         * @return {@link #authorizationUrl} (A web location for obtaining requirements or descriptive information regarding the preauthorization.). This is the underlying object with id, value and extensions. The accessor "getAuthorizationUrl" gives direct access to the value
1522         */
1523        public UriType getAuthorizationUrlElement() { 
1524          if (this.authorizationUrl == null)
1525            if (Configuration.errorOnAutoCreate())
1526              throw new Error("Attempt to auto-create ItemsComponent.authorizationUrl");
1527            else if (Configuration.doAutoCreate())
1528              this.authorizationUrl = new UriType(); // bb
1529          return this.authorizationUrl;
1530        }
1531
1532        public boolean hasAuthorizationUrlElement() { 
1533          return this.authorizationUrl != null && !this.authorizationUrl.isEmpty();
1534        }
1535
1536        public boolean hasAuthorizationUrl() { 
1537          return this.authorizationUrl != null && !this.authorizationUrl.isEmpty();
1538        }
1539
1540        /**
1541         * @param value {@link #authorizationUrl} (A web location for obtaining requirements or descriptive information regarding the preauthorization.). This is the underlying object with id, value and extensions. The accessor "getAuthorizationUrl" gives direct access to the value
1542         */
1543        public ItemsComponent setAuthorizationUrlElement(UriType value) { 
1544          this.authorizationUrl = value;
1545          return this;
1546        }
1547
1548        /**
1549         * @return A web location for obtaining requirements or descriptive information regarding the preauthorization.
1550         */
1551        public String getAuthorizationUrl() { 
1552          return this.authorizationUrl == null ? null : this.authorizationUrl.getValue();
1553        }
1554
1555        /**
1556         * @param value A web location for obtaining requirements or descriptive information regarding the preauthorization.
1557         */
1558        public ItemsComponent setAuthorizationUrl(String value) { 
1559          if (Utilities.noString(value))
1560            this.authorizationUrl = null;
1561          else {
1562            if (this.authorizationUrl == null)
1563              this.authorizationUrl = new UriType();
1564            this.authorizationUrl.setValue(value);
1565          }
1566          return this;
1567        }
1568
1569        protected void listChildren(List<Property> children) {
1570          super.listChildren(children);
1571          children.add(new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category));
1572          children.add(new Property("productOrService", "CodeableConcept", "This contains the product, service, drug or other billing code for the item.", 0, 1, productOrService));
1573          children.add(new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier));
1574          children.add(new Property("provider", "Reference(Practitioner|PractitionerRole)", "The practitioner who is eligible for the provision of the product or service.", 0, 1, provider));
1575          children.add(new Property("excluded", "boolean", "True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.", 0, 1, excluded));
1576          children.add(new Property("name", "string", "A short name or tag for the benefit.", 0, 1, name));
1577          children.add(new Property("description", "string", "A richer description of the benefit or services covered.", 0, 1, description));
1578          children.add(new Property("network", "CodeableConcept", "Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.", 0, 1, network));
1579          children.add(new Property("unit", "CodeableConcept", "Indicates if the benefits apply to an individual or to the family.", 0, 1, unit));
1580          children.add(new Property("term", "CodeableConcept", "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", 0, 1, term));
1581          children.add(new Property("benefit", "", "Benefits used to date.", 0, java.lang.Integer.MAX_VALUE, benefit));
1582          children.add(new Property("authorizationRequired", "boolean", "A boolean flag indicating whether a preauthorization is required prior to actual service delivery.", 0, 1, authorizationRequired));
1583          children.add(new Property("authorizationSupporting", "CodeableConcept", "Codes or comments regarding information or actions associated with the preauthorization.", 0, java.lang.Integer.MAX_VALUE, authorizationSupporting));
1584          children.add(new Property("authorizationUrl", "uri", "A web location for obtaining requirements or descriptive information regarding the preauthorization.", 0, 1, authorizationUrl));
1585        }
1586
1587        @Override
1588        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1589          switch (_hash) {
1590          case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category);
1591          case 1957227299: /*productOrService*/  return new Property("productOrService", "CodeableConcept", "This contains the product, service, drug or other billing code for the item.", 0, 1, productOrService);
1592          case -615513385: /*modifier*/  return new Property("modifier", "CodeableConcept", "Item typification or modifiers codes to convey additional context for the product or service.", 0, java.lang.Integer.MAX_VALUE, modifier);
1593          case -987494927: /*provider*/  return new Property("provider", "Reference(Practitioner|PractitionerRole)", "The practitioner who is eligible for the provision of the product or service.", 0, 1, provider);
1594          case 1994055114: /*excluded*/  return new Property("excluded", "boolean", "True if the indicated class of service is excluded from the plan, missing or False indicates the product or service is included in the coverage.", 0, 1, excluded);
1595          case 3373707: /*name*/  return new Property("name", "string", "A short name or tag for the benefit.", 0, 1, name);
1596          case -1724546052: /*description*/  return new Property("description", "string", "A richer description of the benefit or services covered.", 0, 1, description);
1597          case 1843485230: /*network*/  return new Property("network", "CodeableConcept", "Is a flag to indicate whether the benefits refer to in-network providers or out-of-network providers.", 0, 1, network);
1598          case 3594628: /*unit*/  return new Property("unit", "CodeableConcept", "Indicates if the benefits apply to an individual or to the family.", 0, 1, unit);
1599          case 3556460: /*term*/  return new Property("term", "CodeableConcept", "The term or period of the values such as 'maximum lifetime benefit' or 'maximum annual visits'.", 0, 1, term);
1600          case -222710633: /*benefit*/  return new Property("benefit", "", "Benefits used to date.", 0, java.lang.Integer.MAX_VALUE, benefit);
1601          case 374204216: /*authorizationRequired*/  return new Property("authorizationRequired", "boolean", "A boolean flag indicating whether a preauthorization is required prior to actual service delivery.", 0, 1, authorizationRequired);
1602          case -1931146484: /*authorizationSupporting*/  return new Property("authorizationSupporting", "CodeableConcept", "Codes or comments regarding information or actions associated with the preauthorization.", 0, java.lang.Integer.MAX_VALUE, authorizationSupporting);
1603          case 1409445430: /*authorizationUrl*/  return new Property("authorizationUrl", "uri", "A web location for obtaining requirements or descriptive information regarding the preauthorization.", 0, 1, authorizationUrl);
1604          default: return super.getNamedProperty(_hash, _name, _checkValid);
1605          }
1606
1607        }
1608
1609      @Override
1610      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1611        switch (hash) {
1612        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
1613        case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept
1614        case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept
1615        case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference
1616        case 1994055114: /*excluded*/ return this.excluded == null ? new Base[0] : new Base[] {this.excluded}; // BooleanType
1617        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1618        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1619        case 1843485230: /*network*/ return this.network == null ? new Base[0] : new Base[] {this.network}; // CodeableConcept
1620        case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // CodeableConcept
1621        case 3556460: /*term*/ return this.term == null ? new Base[0] : new Base[] {this.term}; // CodeableConcept
1622        case -222710633: /*benefit*/ return this.benefit == null ? new Base[0] : this.benefit.toArray(new Base[this.benefit.size()]); // BenefitComponent
1623        case 374204216: /*authorizationRequired*/ return this.authorizationRequired == null ? new Base[0] : new Base[] {this.authorizationRequired}; // BooleanType
1624        case -1931146484: /*authorizationSupporting*/ return this.authorizationSupporting == null ? new Base[0] : this.authorizationSupporting.toArray(new Base[this.authorizationSupporting.size()]); // CodeableConcept
1625        case 1409445430: /*authorizationUrl*/ return this.authorizationUrl == null ? new Base[0] : new Base[] {this.authorizationUrl}; // UriType
1626        default: return super.getProperty(hash, name, checkValid);
1627        }
1628
1629      }
1630
1631      @Override
1632      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1633        switch (hash) {
1634        case 50511102: // category
1635          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1636          return value;
1637        case 1957227299: // productOrService
1638          this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1639          return value;
1640        case -615513385: // modifier
1641          this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1642          return value;
1643        case -987494927: // provider
1644          this.provider = TypeConvertor.castToReference(value); // Reference
1645          return value;
1646        case 1994055114: // excluded
1647          this.excluded = TypeConvertor.castToBoolean(value); // BooleanType
1648          return value;
1649        case 3373707: // name
1650          this.name = TypeConvertor.castToString(value); // StringType
1651          return value;
1652        case -1724546052: // description
1653          this.description = TypeConvertor.castToString(value); // StringType
1654          return value;
1655        case 1843485230: // network
1656          this.network = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1657          return value;
1658        case 3594628: // unit
1659          this.unit = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1660          return value;
1661        case 3556460: // term
1662          this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1663          return value;
1664        case -222710633: // benefit
1665          this.getBenefit().add((BenefitComponent) value); // BenefitComponent
1666          return value;
1667        case 374204216: // authorizationRequired
1668          this.authorizationRequired = TypeConvertor.castToBoolean(value); // BooleanType
1669          return value;
1670        case -1931146484: // authorizationSupporting
1671          this.getAuthorizationSupporting().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1672          return value;
1673        case 1409445430: // authorizationUrl
1674          this.authorizationUrl = TypeConvertor.castToUri(value); // UriType
1675          return value;
1676        default: return super.setProperty(hash, name, value);
1677        }
1678
1679      }
1680
1681      @Override
1682      public Base setProperty(String name, Base value) throws FHIRException {
1683        if (name.equals("category")) {
1684          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1685        } else if (name.equals("productOrService")) {
1686          this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1687        } else if (name.equals("modifier")) {
1688          this.getModifier().add(TypeConvertor.castToCodeableConcept(value));
1689        } else if (name.equals("provider")) {
1690          this.provider = TypeConvertor.castToReference(value); // Reference
1691        } else if (name.equals("excluded")) {
1692          this.excluded = TypeConvertor.castToBoolean(value); // BooleanType
1693        } else if (name.equals("name")) {
1694          this.name = TypeConvertor.castToString(value); // StringType
1695        } else if (name.equals("description")) {
1696          this.description = TypeConvertor.castToString(value); // StringType
1697        } else if (name.equals("network")) {
1698          this.network = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1699        } else if (name.equals("unit")) {
1700          this.unit = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1701        } else if (name.equals("term")) {
1702          this.term = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1703        } else if (name.equals("benefit")) {
1704          this.getBenefit().add((BenefitComponent) value);
1705        } else if (name.equals("authorizationRequired")) {
1706          this.authorizationRequired = TypeConvertor.castToBoolean(value); // BooleanType
1707        } else if (name.equals("authorizationSupporting")) {
1708          this.getAuthorizationSupporting().add(TypeConvertor.castToCodeableConcept(value));
1709        } else if (name.equals("authorizationUrl")) {
1710          this.authorizationUrl = TypeConvertor.castToUri(value); // UriType
1711        } else
1712          return super.setProperty(name, value);
1713        return value;
1714      }
1715
1716      @Override
1717      public Base makeProperty(int hash, String name) throws FHIRException {
1718        switch (hash) {
1719        case 50511102:  return getCategory();
1720        case 1957227299:  return getProductOrService();
1721        case -615513385:  return addModifier(); 
1722        case -987494927:  return getProvider();
1723        case 1994055114:  return getExcludedElement();
1724        case 3373707:  return getNameElement();
1725        case -1724546052:  return getDescriptionElement();
1726        case 1843485230:  return getNetwork();
1727        case 3594628:  return getUnit();
1728        case 3556460:  return getTerm();
1729        case -222710633:  return addBenefit(); 
1730        case 374204216:  return getAuthorizationRequiredElement();
1731        case -1931146484:  return addAuthorizationSupporting(); 
1732        case 1409445430:  return getAuthorizationUrlElement();
1733        default: return super.makeProperty(hash, name);
1734        }
1735
1736      }
1737
1738      @Override
1739      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1740        switch (hash) {
1741        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1742        case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"};
1743        case -615513385: /*modifier*/ return new String[] {"CodeableConcept"};
1744        case -987494927: /*provider*/ return new String[] {"Reference"};
1745        case 1994055114: /*excluded*/ return new String[] {"boolean"};
1746        case 3373707: /*name*/ return new String[] {"string"};
1747        case -1724546052: /*description*/ return new String[] {"string"};
1748        case 1843485230: /*network*/ return new String[] {"CodeableConcept"};
1749        case 3594628: /*unit*/ return new String[] {"CodeableConcept"};
1750        case 3556460: /*term*/ return new String[] {"CodeableConcept"};
1751        case -222710633: /*benefit*/ return new String[] {};
1752        case 374204216: /*authorizationRequired*/ return new String[] {"boolean"};
1753        case -1931146484: /*authorizationSupporting*/ return new String[] {"CodeableConcept"};
1754        case 1409445430: /*authorizationUrl*/ return new String[] {"uri"};
1755        default: return super.getTypesForProperty(hash, name);
1756        }
1757
1758      }
1759
1760      @Override
1761      public Base addChild(String name) throws FHIRException {
1762        if (name.equals("category")) {
1763          this.category = new CodeableConcept();
1764          return this.category;
1765        }
1766        else if (name.equals("productOrService")) {
1767          this.productOrService = new CodeableConcept();
1768          return this.productOrService;
1769        }
1770        else if (name.equals("modifier")) {
1771          return addModifier();
1772        }
1773        else if (name.equals("provider")) {
1774          this.provider = new Reference();
1775          return this.provider;
1776        }
1777        else if (name.equals("excluded")) {
1778          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.insurance.item.excluded");
1779        }
1780        else if (name.equals("name")) {
1781          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.insurance.item.name");
1782        }
1783        else if (name.equals("description")) {
1784          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.insurance.item.description");
1785        }
1786        else if (name.equals("network")) {
1787          this.network = new CodeableConcept();
1788          return this.network;
1789        }
1790        else if (name.equals("unit")) {
1791          this.unit = new CodeableConcept();
1792          return this.unit;
1793        }
1794        else if (name.equals("term")) {
1795          this.term = new CodeableConcept();
1796          return this.term;
1797        }
1798        else if (name.equals("benefit")) {
1799          return addBenefit();
1800        }
1801        else if (name.equals("authorizationRequired")) {
1802          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.insurance.item.authorizationRequired");
1803        }
1804        else if (name.equals("authorizationSupporting")) {
1805          return addAuthorizationSupporting();
1806        }
1807        else if (name.equals("authorizationUrl")) {
1808          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.insurance.item.authorizationUrl");
1809        }
1810        else
1811          return super.addChild(name);
1812      }
1813
1814      public ItemsComponent copy() {
1815        ItemsComponent dst = new ItemsComponent();
1816        copyValues(dst);
1817        return dst;
1818      }
1819
1820      public void copyValues(ItemsComponent dst) {
1821        super.copyValues(dst);
1822        dst.category = category == null ? null : category.copy();
1823        dst.productOrService = productOrService == null ? null : productOrService.copy();
1824        if (modifier != null) {
1825          dst.modifier = new ArrayList<CodeableConcept>();
1826          for (CodeableConcept i : modifier)
1827            dst.modifier.add(i.copy());
1828        };
1829        dst.provider = provider == null ? null : provider.copy();
1830        dst.excluded = excluded == null ? null : excluded.copy();
1831        dst.name = name == null ? null : name.copy();
1832        dst.description = description == null ? null : description.copy();
1833        dst.network = network == null ? null : network.copy();
1834        dst.unit = unit == null ? null : unit.copy();
1835        dst.term = term == null ? null : term.copy();
1836        if (benefit != null) {
1837          dst.benefit = new ArrayList<BenefitComponent>();
1838          for (BenefitComponent i : benefit)
1839            dst.benefit.add(i.copy());
1840        };
1841        dst.authorizationRequired = authorizationRequired == null ? null : authorizationRequired.copy();
1842        if (authorizationSupporting != null) {
1843          dst.authorizationSupporting = new ArrayList<CodeableConcept>();
1844          for (CodeableConcept i : authorizationSupporting)
1845            dst.authorizationSupporting.add(i.copy());
1846        };
1847        dst.authorizationUrl = authorizationUrl == null ? null : authorizationUrl.copy();
1848      }
1849
1850      @Override
1851      public boolean equalsDeep(Base other_) {
1852        if (!super.equalsDeep(other_))
1853          return false;
1854        if (!(other_ instanceof ItemsComponent))
1855          return false;
1856        ItemsComponent o = (ItemsComponent) other_;
1857        return compareDeep(category, o.category, true) && compareDeep(productOrService, o.productOrService, true)
1858           && compareDeep(modifier, o.modifier, true) && compareDeep(provider, o.provider, true) && compareDeep(excluded, o.excluded, true)
1859           && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(network, o.network, true)
1860           && compareDeep(unit, o.unit, true) && compareDeep(term, o.term, true) && compareDeep(benefit, o.benefit, true)
1861           && compareDeep(authorizationRequired, o.authorizationRequired, true) && compareDeep(authorizationSupporting, o.authorizationSupporting, true)
1862           && compareDeep(authorizationUrl, o.authorizationUrl, true);
1863      }
1864
1865      @Override
1866      public boolean equalsShallow(Base other_) {
1867        if (!super.equalsShallow(other_))
1868          return false;
1869        if (!(other_ instanceof ItemsComponent))
1870          return false;
1871        ItemsComponent o = (ItemsComponent) other_;
1872        return compareValues(excluded, o.excluded, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true)
1873           && compareValues(authorizationRequired, o.authorizationRequired, true) && compareValues(authorizationUrl, o.authorizationUrl, true)
1874          ;
1875      }
1876
1877      public boolean isEmpty() {
1878        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, productOrService
1879          , modifier, provider, excluded, name, description, network, unit, term, benefit
1880          , authorizationRequired, authorizationSupporting, authorizationUrl);
1881      }
1882
1883  public String fhirType() {
1884    return "CoverageEligibilityResponse.insurance.item";
1885
1886  }
1887
1888  }
1889
1890    @Block()
1891    public static class BenefitComponent extends BackboneElement implements IBaseBackboneElement {
1892        /**
1893         * Classification of benefit being provided.
1894         */
1895        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
1896        @Description(shortDefinition="Benefit classification", formalDefinition="Classification of benefit being provided." )
1897        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/benefit-type")
1898        protected CodeableConcept type;
1899
1900        /**
1901         * The quantity of the benefit which is permitted under the coverage.
1902         */
1903        @Child(name = "allowed", type = {UnsignedIntType.class, StringType.class, Money.class}, order=2, min=0, max=1, modifier=false, summary=false)
1904        @Description(shortDefinition="Benefits allowed", formalDefinition="The quantity of the benefit which is permitted under the coverage." )
1905        protected DataType allowed;
1906
1907        /**
1908         * The quantity of the benefit which have been consumed to date.
1909         */
1910        @Child(name = "used", type = {UnsignedIntType.class, StringType.class, Money.class}, order=3, min=0, max=1, modifier=false, summary=false)
1911        @Description(shortDefinition="Benefits used", formalDefinition="The quantity of the benefit which have been consumed to date." )
1912        protected DataType used;
1913
1914        private static final long serialVersionUID = 1900247614L;
1915
1916    /**
1917     * Constructor
1918     */
1919      public BenefitComponent() {
1920        super();
1921      }
1922
1923    /**
1924     * Constructor
1925     */
1926      public BenefitComponent(CodeableConcept type) {
1927        super();
1928        this.setType(type);
1929      }
1930
1931        /**
1932         * @return {@link #type} (Classification of benefit being provided.)
1933         */
1934        public CodeableConcept getType() { 
1935          if (this.type == null)
1936            if (Configuration.errorOnAutoCreate())
1937              throw new Error("Attempt to auto-create BenefitComponent.type");
1938            else if (Configuration.doAutoCreate())
1939              this.type = new CodeableConcept(); // cc
1940          return this.type;
1941        }
1942
1943        public boolean hasType() { 
1944          return this.type != null && !this.type.isEmpty();
1945        }
1946
1947        /**
1948         * @param value {@link #type} (Classification of benefit being provided.)
1949         */
1950        public BenefitComponent setType(CodeableConcept value) { 
1951          this.type = value;
1952          return this;
1953        }
1954
1955        /**
1956         * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.)
1957         */
1958        public DataType getAllowed() { 
1959          return this.allowed;
1960        }
1961
1962        /**
1963         * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.)
1964         */
1965        public UnsignedIntType getAllowedUnsignedIntType() throws FHIRException { 
1966          if (this.allowed == null)
1967            this.allowed = new UnsignedIntType();
1968          if (!(this.allowed instanceof UnsignedIntType))
1969            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.allowed.getClass().getName()+" was encountered");
1970          return (UnsignedIntType) this.allowed;
1971        }
1972
1973        public boolean hasAllowedUnsignedIntType() { 
1974          return this != null && this.allowed instanceof UnsignedIntType;
1975        }
1976
1977        /**
1978         * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.)
1979         */
1980        public StringType getAllowedStringType() throws FHIRException { 
1981          if (this.allowed == null)
1982            this.allowed = new StringType();
1983          if (!(this.allowed instanceof StringType))
1984            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.allowed.getClass().getName()+" was encountered");
1985          return (StringType) this.allowed;
1986        }
1987
1988        public boolean hasAllowedStringType() { 
1989          return this != null && this.allowed instanceof StringType;
1990        }
1991
1992        /**
1993         * @return {@link #allowed} (The quantity of the benefit which is permitted under the coverage.)
1994         */
1995        public Money getAllowedMoney() throws FHIRException { 
1996          if (this.allowed == null)
1997            this.allowed = new Money();
1998          if (!(this.allowed instanceof Money))
1999            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.allowed.getClass().getName()+" was encountered");
2000          return (Money) this.allowed;
2001        }
2002
2003        public boolean hasAllowedMoney() { 
2004          return this != null && this.allowed instanceof Money;
2005        }
2006
2007        public boolean hasAllowed() { 
2008          return this.allowed != null && !this.allowed.isEmpty();
2009        }
2010
2011        /**
2012         * @param value {@link #allowed} (The quantity of the benefit which is permitted under the coverage.)
2013         */
2014        public BenefitComponent setAllowed(DataType value) { 
2015          if (value != null && !(value instanceof UnsignedIntType || value instanceof StringType || value instanceof Money))
2016            throw new FHIRException("Not the right type for CoverageEligibilityResponse.insurance.item.benefit.allowed[x]: "+value.fhirType());
2017          this.allowed = value;
2018          return this;
2019        }
2020
2021        /**
2022         * @return {@link #used} (The quantity of the benefit which have been consumed to date.)
2023         */
2024        public DataType getUsed() { 
2025          return this.used;
2026        }
2027
2028        /**
2029         * @return {@link #used} (The quantity of the benefit which have been consumed to date.)
2030         */
2031        public UnsignedIntType getUsedUnsignedIntType() throws FHIRException { 
2032          if (this.used == null)
2033            this.used = new UnsignedIntType();
2034          if (!(this.used instanceof UnsignedIntType))
2035            throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.used.getClass().getName()+" was encountered");
2036          return (UnsignedIntType) this.used;
2037        }
2038
2039        public boolean hasUsedUnsignedIntType() { 
2040          return this != null && this.used instanceof UnsignedIntType;
2041        }
2042
2043        /**
2044         * @return {@link #used} (The quantity of the benefit which have been consumed to date.)
2045         */
2046        public StringType getUsedStringType() throws FHIRException { 
2047          if (this.used == null)
2048            this.used = new StringType();
2049          if (!(this.used instanceof StringType))
2050            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.used.getClass().getName()+" was encountered");
2051          return (StringType) this.used;
2052        }
2053
2054        public boolean hasUsedStringType() { 
2055          return this != null && this.used instanceof StringType;
2056        }
2057
2058        /**
2059         * @return {@link #used} (The quantity of the benefit which have been consumed to date.)
2060         */
2061        public Money getUsedMoney() throws FHIRException { 
2062          if (this.used == null)
2063            this.used = new Money();
2064          if (!(this.used instanceof Money))
2065            throw new FHIRException("Type mismatch: the type Money was expected, but "+this.used.getClass().getName()+" was encountered");
2066          return (Money) this.used;
2067        }
2068
2069        public boolean hasUsedMoney() { 
2070          return this != null && this.used instanceof Money;
2071        }
2072
2073        public boolean hasUsed() { 
2074          return this.used != null && !this.used.isEmpty();
2075        }
2076
2077        /**
2078         * @param value {@link #used} (The quantity of the benefit which have been consumed to date.)
2079         */
2080        public BenefitComponent setUsed(DataType value) { 
2081          if (value != null && !(value instanceof UnsignedIntType || value instanceof StringType || value instanceof Money))
2082            throw new FHIRException("Not the right type for CoverageEligibilityResponse.insurance.item.benefit.used[x]: "+value.fhirType());
2083          this.used = value;
2084          return this;
2085        }
2086
2087        protected void listChildren(List<Property> children) {
2088          super.listChildren(children);
2089          children.add(new Property("type", "CodeableConcept", "Classification of benefit being provided.", 0, 1, type));
2090          children.add(new Property("allowed[x]", "unsignedInt|string|Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed));
2091          children.add(new Property("used[x]", "unsignedInt|string|Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used));
2092        }
2093
2094        @Override
2095        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2096          switch (_hash) {
2097          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Classification of benefit being provided.", 0, 1, type);
2098          case -1336663592: /*allowed[x]*/  return new Property("allowed[x]", "unsignedInt|string|Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed);
2099          case -911343192: /*allowed*/  return new Property("allowed[x]", "unsignedInt|string|Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed);
2100          case 1668802034: /*allowedUnsignedInt*/  return new Property("allowed[x]", "unsignedInt", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed);
2101          case -2135265319: /*allowedString*/  return new Property("allowed[x]", "string", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed);
2102          case -351668232: /*allowedMoney*/  return new Property("allowed[x]", "Money", "The quantity of the benefit which is permitted under the coverage.", 0, 1, allowed);
2103          case -147553373: /*used[x]*/  return new Property("used[x]", "unsignedInt|string|Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used);
2104          case 3599293: /*used*/  return new Property("used[x]", "unsignedInt|string|Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used);
2105          case 1252740285: /*usedUnsignedInt*/  return new Property("used[x]", "unsignedInt", "The quantity of the benefit which have been consumed to date.", 0, 1, used);
2106          case 2051978798: /*usedString*/  return new Property("used[x]", "string", "The quantity of the benefit which have been consumed to date.", 0, 1, used);
2107          case -78048509: /*usedMoney*/  return new Property("used[x]", "Money", "The quantity of the benefit which have been consumed to date.", 0, 1, used);
2108          default: return super.getNamedProperty(_hash, _name, _checkValid);
2109          }
2110
2111        }
2112
2113      @Override
2114      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2115        switch (hash) {
2116        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
2117        case -911343192: /*allowed*/ return this.allowed == null ? new Base[0] : new Base[] {this.allowed}; // DataType
2118        case 3599293: /*used*/ return this.used == null ? new Base[0] : new Base[] {this.used}; // DataType
2119        default: return super.getProperty(hash, name, checkValid);
2120        }
2121
2122      }
2123
2124      @Override
2125      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2126        switch (hash) {
2127        case 3575610: // type
2128          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2129          return value;
2130        case -911343192: // allowed
2131          this.allowed = TypeConvertor.castToType(value); // DataType
2132          return value;
2133        case 3599293: // used
2134          this.used = TypeConvertor.castToType(value); // DataType
2135          return value;
2136        default: return super.setProperty(hash, name, value);
2137        }
2138
2139      }
2140
2141      @Override
2142      public Base setProperty(String name, Base value) throws FHIRException {
2143        if (name.equals("type")) {
2144          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2145        } else if (name.equals("allowed[x]")) {
2146          this.allowed = TypeConvertor.castToType(value); // DataType
2147        } else if (name.equals("used[x]")) {
2148          this.used = TypeConvertor.castToType(value); // DataType
2149        } else
2150          return super.setProperty(name, value);
2151        return value;
2152      }
2153
2154      @Override
2155      public Base makeProperty(int hash, String name) throws FHIRException {
2156        switch (hash) {
2157        case 3575610:  return getType();
2158        case -1336663592:  return getAllowed();
2159        case -911343192:  return getAllowed();
2160        case -147553373:  return getUsed();
2161        case 3599293:  return getUsed();
2162        default: return super.makeProperty(hash, name);
2163        }
2164
2165      }
2166
2167      @Override
2168      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2169        switch (hash) {
2170        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
2171        case -911343192: /*allowed*/ return new String[] {"unsignedInt", "string", "Money"};
2172        case 3599293: /*used*/ return new String[] {"unsignedInt", "string", "Money"};
2173        default: return super.getTypesForProperty(hash, name);
2174        }
2175
2176      }
2177
2178      @Override
2179      public Base addChild(String name) throws FHIRException {
2180        if (name.equals("type")) {
2181          this.type = new CodeableConcept();
2182          return this.type;
2183        }
2184        else if (name.equals("allowedUnsignedInt")) {
2185          this.allowed = new UnsignedIntType();
2186          return this.allowed;
2187        }
2188        else if (name.equals("allowedString")) {
2189          this.allowed = new StringType();
2190          return this.allowed;
2191        }
2192        else if (name.equals("allowedMoney")) {
2193          this.allowed = new Money();
2194          return this.allowed;
2195        }
2196        else if (name.equals("usedUnsignedInt")) {
2197          this.used = new UnsignedIntType();
2198          return this.used;
2199        }
2200        else if (name.equals("usedString")) {
2201          this.used = new StringType();
2202          return this.used;
2203        }
2204        else if (name.equals("usedMoney")) {
2205          this.used = new Money();
2206          return this.used;
2207        }
2208        else
2209          return super.addChild(name);
2210      }
2211
2212      public BenefitComponent copy() {
2213        BenefitComponent dst = new BenefitComponent();
2214        copyValues(dst);
2215        return dst;
2216      }
2217
2218      public void copyValues(BenefitComponent dst) {
2219        super.copyValues(dst);
2220        dst.type = type == null ? null : type.copy();
2221        dst.allowed = allowed == null ? null : allowed.copy();
2222        dst.used = used == null ? null : used.copy();
2223      }
2224
2225      @Override
2226      public boolean equalsDeep(Base other_) {
2227        if (!super.equalsDeep(other_))
2228          return false;
2229        if (!(other_ instanceof BenefitComponent))
2230          return false;
2231        BenefitComponent o = (BenefitComponent) other_;
2232        return compareDeep(type, o.type, true) && compareDeep(allowed, o.allowed, true) && compareDeep(used, o.used, true)
2233          ;
2234      }
2235
2236      @Override
2237      public boolean equalsShallow(Base other_) {
2238        if (!super.equalsShallow(other_))
2239          return false;
2240        if (!(other_ instanceof BenefitComponent))
2241          return false;
2242        BenefitComponent o = (BenefitComponent) other_;
2243        return true;
2244      }
2245
2246      public boolean isEmpty() {
2247        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, allowed, used);
2248      }
2249
2250  public String fhirType() {
2251    return "CoverageEligibilityResponse.insurance.item.benefit";
2252
2253  }
2254
2255  }
2256
2257    @Block()
2258    public static class ErrorsComponent extends BackboneElement implements IBaseBackboneElement {
2259        /**
2260         * An error code,from a specified code system, which details why the eligibility check could not be performed.
2261         */
2262        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
2263        @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." )
2264        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/adjudication-error")
2265        protected CodeableConcept code;
2266
2267        /**
2268         * A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.
2269         */
2270        @Child(name = "expression", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2271        @Description(shortDefinition="FHIRPath of element(s) related to issue", formalDefinition="A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised." )
2272        protected List<StringType> expression;
2273
2274        private static final long serialVersionUID = -344349215L;
2275
2276    /**
2277     * Constructor
2278     */
2279      public ErrorsComponent() {
2280        super();
2281      }
2282
2283    /**
2284     * Constructor
2285     */
2286      public ErrorsComponent(CodeableConcept code) {
2287        super();
2288        this.setCode(code);
2289      }
2290
2291        /**
2292         * @return {@link #code} (An error code,from a specified code system, which details why the eligibility check could not be performed.)
2293         */
2294        public CodeableConcept getCode() { 
2295          if (this.code == null)
2296            if (Configuration.errorOnAutoCreate())
2297              throw new Error("Attempt to auto-create ErrorsComponent.code");
2298            else if (Configuration.doAutoCreate())
2299              this.code = new CodeableConcept(); // cc
2300          return this.code;
2301        }
2302
2303        public boolean hasCode() { 
2304          return this.code != null && !this.code.isEmpty();
2305        }
2306
2307        /**
2308         * @param value {@link #code} (An error code,from a specified code system, which details why the eligibility check could not be performed.)
2309         */
2310        public ErrorsComponent setCode(CodeableConcept value) { 
2311          this.code = value;
2312          return this;
2313        }
2314
2315        /**
2316         * @return {@link #expression} (A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.)
2317         */
2318        public List<StringType> getExpression() { 
2319          if (this.expression == null)
2320            this.expression = new ArrayList<StringType>();
2321          return this.expression;
2322        }
2323
2324        /**
2325         * @return Returns a reference to <code>this</code> for easy method chaining
2326         */
2327        public ErrorsComponent setExpression(List<StringType> theExpression) { 
2328          this.expression = theExpression;
2329          return this;
2330        }
2331
2332        public boolean hasExpression() { 
2333          if (this.expression == null)
2334            return false;
2335          for (StringType item : this.expression)
2336            if (!item.isEmpty())
2337              return true;
2338          return false;
2339        }
2340
2341        /**
2342         * @return {@link #expression} (A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.)
2343         */
2344        public StringType addExpressionElement() {//2 
2345          StringType t = new StringType();
2346          if (this.expression == null)
2347            this.expression = new ArrayList<StringType>();
2348          this.expression.add(t);
2349          return t;
2350        }
2351
2352        /**
2353         * @param value {@link #expression} (A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.)
2354         */
2355        public ErrorsComponent addExpression(String value) { //1
2356          StringType t = new StringType();
2357          t.setValue(value);
2358          if (this.expression == null)
2359            this.expression = new ArrayList<StringType>();
2360          this.expression.add(t);
2361          return this;
2362        }
2363
2364        /**
2365         * @param value {@link #expression} (A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.)
2366         */
2367        public boolean hasExpression(String value) { 
2368          if (this.expression == null)
2369            return false;
2370          for (StringType v : this.expression)
2371            if (v.getValue().equals(value)) // string
2372              return true;
2373          return false;
2374        }
2375
2376        protected void listChildren(List<Property> children) {
2377          super.listChildren(children);
2378          children.add(new Property("code", "CodeableConcept", "An error code,from a specified code system, which details why the eligibility check could not be performed.", 0, 1, code));
2379          children.add(new Property("expression", "string", "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.", 0, java.lang.Integer.MAX_VALUE, expression));
2380        }
2381
2382        @Override
2383        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2384          switch (_hash) {
2385          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "An error code,from a specified code system, which details why the eligibility check could not be performed.", 0, 1, code);
2386          case -1795452264: /*expression*/  return new Property("expression", "string", "A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.", 0, java.lang.Integer.MAX_VALUE, expression);
2387          default: return super.getNamedProperty(_hash, _name, _checkValid);
2388          }
2389
2390        }
2391
2392      @Override
2393      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2394        switch (hash) {
2395        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
2396        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : this.expression.toArray(new Base[this.expression.size()]); // StringType
2397        default: return super.getProperty(hash, name, checkValid);
2398        }
2399
2400      }
2401
2402      @Override
2403      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2404        switch (hash) {
2405        case 3059181: // code
2406          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2407          return value;
2408        case -1795452264: // expression
2409          this.getExpression().add(TypeConvertor.castToString(value)); // StringType
2410          return value;
2411        default: return super.setProperty(hash, name, value);
2412        }
2413
2414      }
2415
2416      @Override
2417      public Base setProperty(String name, Base value) throws FHIRException {
2418        if (name.equals("code")) {
2419          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2420        } else if (name.equals("expression")) {
2421          this.getExpression().add(TypeConvertor.castToString(value));
2422        } else
2423          return super.setProperty(name, value);
2424        return value;
2425      }
2426
2427      @Override
2428      public Base makeProperty(int hash, String name) throws FHIRException {
2429        switch (hash) {
2430        case 3059181:  return getCode();
2431        case -1795452264:  return addExpressionElement();
2432        default: return super.makeProperty(hash, name);
2433        }
2434
2435      }
2436
2437      @Override
2438      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2439        switch (hash) {
2440        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
2441        case -1795452264: /*expression*/ return new String[] {"string"};
2442        default: return super.getTypesForProperty(hash, name);
2443        }
2444
2445      }
2446
2447      @Override
2448      public Base addChild(String name) throws FHIRException {
2449        if (name.equals("code")) {
2450          this.code = new CodeableConcept();
2451          return this.code;
2452        }
2453        else if (name.equals("expression")) {
2454          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.error.expression");
2455        }
2456        else
2457          return super.addChild(name);
2458      }
2459
2460      public ErrorsComponent copy() {
2461        ErrorsComponent dst = new ErrorsComponent();
2462        copyValues(dst);
2463        return dst;
2464      }
2465
2466      public void copyValues(ErrorsComponent dst) {
2467        super.copyValues(dst);
2468        dst.code = code == null ? null : code.copy();
2469        if (expression != null) {
2470          dst.expression = new ArrayList<StringType>();
2471          for (StringType i : expression)
2472            dst.expression.add(i.copy());
2473        };
2474      }
2475
2476      @Override
2477      public boolean equalsDeep(Base other_) {
2478        if (!super.equalsDeep(other_))
2479          return false;
2480        if (!(other_ instanceof ErrorsComponent))
2481          return false;
2482        ErrorsComponent o = (ErrorsComponent) other_;
2483        return compareDeep(code, o.code, true) && compareDeep(expression, o.expression, true);
2484      }
2485
2486      @Override
2487      public boolean equalsShallow(Base other_) {
2488        if (!super.equalsShallow(other_))
2489          return false;
2490        if (!(other_ instanceof ErrorsComponent))
2491          return false;
2492        ErrorsComponent o = (ErrorsComponent) other_;
2493        return compareValues(expression, o.expression, true);
2494      }
2495
2496      public boolean isEmpty() {
2497        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, expression);
2498      }
2499
2500  public String fhirType() {
2501    return "CoverageEligibilityResponse.error";
2502
2503  }
2504
2505  }
2506
2507    /**
2508     * A unique identifier assigned to this coverage eligiblity request.
2509     */
2510    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2511    @Description(shortDefinition="Business Identifier for coverage eligiblity request", formalDefinition="A unique identifier assigned to this coverage eligiblity request." )
2512    protected List<Identifier> identifier;
2513
2514    /**
2515     * The status of the resource instance.
2516     */
2517    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
2518    @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." )
2519    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status")
2520    protected Enumeration<FinancialResourceStatusCodes> status;
2521
2522    /**
2523     * Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.
2524     */
2525    @Child(name = "purpose", type = {CodeType.class}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2526    @Description(shortDefinition="auth-requirements | benefits | discovery | validation", formalDefinition="Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified." )
2527    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/eligibilityresponse-purpose")
2528    protected List<Enumeration<EligibilityResponsePurpose>> purpose;
2529
2530    /**
2531     * The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.
2532     */
2533    @Child(name = "patient", type = {Patient.class}, order=3, min=1, max=1, modifier=false, summary=true)
2534    @Description(shortDefinition="Intended recipient of products and services", formalDefinition="The party who is the beneficiary of the supplied coverage and for whom eligibility is sought." )
2535    protected Reference patient;
2536
2537    /**
2538     * Information code for an event with a corresponding date or period.
2539     */
2540    @Child(name = "event", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2541    @Description(shortDefinition="Event information", formalDefinition="Information code for an event with a corresponding date or period." )
2542    protected List<CoverageEligibilityResponseEventComponent> event;
2543
2544    /**
2545     * The date or dates when the enclosed suite of services were performed or completed.
2546     */
2547    @Child(name = "serviced", type = {DateType.class, Period.class}, order=5, min=0, max=1, modifier=false, summary=false)
2548    @Description(shortDefinition="Estimated date or dates of service", formalDefinition="The date or dates when the enclosed suite of services were performed or completed." )
2549    protected DataType serviced;
2550
2551    /**
2552     * The date this resource was created.
2553     */
2554    @Child(name = "created", type = {DateTimeType.class}, order=6, min=1, max=1, modifier=false, summary=true)
2555    @Description(shortDefinition="Response creation date", formalDefinition="The date this resource was created." )
2556    protected DateTimeType created;
2557
2558    /**
2559     * The provider which is responsible for the request.
2560     */
2561    @Child(name = "requestor", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=false)
2562    @Description(shortDefinition="Party responsible for the request", formalDefinition="The provider which is responsible for the request." )
2563    protected Reference requestor;
2564
2565    /**
2566     * Reference to the original request resource.
2567     */
2568    @Child(name = "request", type = {CoverageEligibilityRequest.class}, order=8, min=1, max=1, modifier=false, summary=true)
2569    @Description(shortDefinition="Eligibility request reference", formalDefinition="Reference to the original request resource." )
2570    protected Reference request;
2571
2572    /**
2573     * The outcome of the request processing.
2574     */
2575    @Child(name = "outcome", type = {CodeType.class}, order=9, min=1, max=1, modifier=false, summary=true)
2576    @Description(shortDefinition="queued | complete | error | partial", formalDefinition="The outcome of the request processing." )
2577    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/eligibility-outcome")
2578    protected Enumeration<EligibilityOutcome> outcome;
2579
2580    /**
2581     * A human readable description of the status of the adjudication.
2582     */
2583    @Child(name = "disposition", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
2584    @Description(shortDefinition="Disposition Message", formalDefinition="A human readable description of the status of the adjudication." )
2585    protected StringType disposition;
2586
2587    /**
2588     * The Insurer who issued the coverage in question and is the author of the response.
2589     */
2590    @Child(name = "insurer", type = {Organization.class}, order=11, min=1, max=1, modifier=false, summary=true)
2591    @Description(shortDefinition="Coverage issuer", formalDefinition="The Insurer who issued the coverage in question and is the author of the response." )
2592    protected Reference insurer;
2593
2594    /**
2595     * Financial instruments for reimbursement for the health care products and services.
2596     */
2597    @Child(name = "insurance", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2598    @Description(shortDefinition="Patient insurance information", formalDefinition="Financial instruments for reimbursement for the health care products and services." )
2599    protected List<InsuranceComponent> insurance;
2600
2601    /**
2602     * A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.
2603     */
2604    @Child(name = "preAuthRef", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false)
2605    @Description(shortDefinition="Preauthorization reference", formalDefinition="A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred." )
2606    protected StringType preAuthRef;
2607
2608    /**
2609     * A code for the form to be used for printing the content.
2610     */
2611    @Child(name = "form", type = {CodeableConcept.class}, order=14, min=0, max=1, modifier=false, summary=false)
2612    @Description(shortDefinition="Printed form identifier", formalDefinition="A code for the form to be used for printing the content." )
2613    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/forms")
2614    protected CodeableConcept form;
2615
2616    /**
2617     * Errors encountered during the processing of the request.
2618     */
2619    @Child(name = "error", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2620    @Description(shortDefinition="Processing errors", formalDefinition="Errors encountered during the processing of the request." )
2621    protected List<ErrorsComponent> error;
2622
2623    private static final long serialVersionUID = 1099912055L;
2624
2625  /**
2626   * Constructor
2627   */
2628    public CoverageEligibilityResponse() {
2629      super();
2630    }
2631
2632  /**
2633   * Constructor
2634   */
2635    public CoverageEligibilityResponse(FinancialResourceStatusCodes status, EligibilityResponsePurpose purpose, Reference patient, Date created, Reference request, EligibilityOutcome outcome, Reference insurer) {
2636      super();
2637      this.setStatus(status);
2638      this.addPurpose(purpose);
2639      this.setPatient(patient);
2640      this.setCreated(created);
2641      this.setRequest(request);
2642      this.setOutcome(outcome);
2643      this.setInsurer(insurer);
2644    }
2645
2646    /**
2647     * @return {@link #identifier} (A unique identifier assigned to this coverage eligiblity request.)
2648     */
2649    public List<Identifier> getIdentifier() { 
2650      if (this.identifier == null)
2651        this.identifier = new ArrayList<Identifier>();
2652      return this.identifier;
2653    }
2654
2655    /**
2656     * @return Returns a reference to <code>this</code> for easy method chaining
2657     */
2658    public CoverageEligibilityResponse setIdentifier(List<Identifier> theIdentifier) { 
2659      this.identifier = theIdentifier;
2660      return this;
2661    }
2662
2663    public boolean hasIdentifier() { 
2664      if (this.identifier == null)
2665        return false;
2666      for (Identifier item : this.identifier)
2667        if (!item.isEmpty())
2668          return true;
2669      return false;
2670    }
2671
2672    public Identifier addIdentifier() { //3
2673      Identifier t = new Identifier();
2674      if (this.identifier == null)
2675        this.identifier = new ArrayList<Identifier>();
2676      this.identifier.add(t);
2677      return t;
2678    }
2679
2680    public CoverageEligibilityResponse addIdentifier(Identifier t) { //3
2681      if (t == null)
2682        return this;
2683      if (this.identifier == null)
2684        this.identifier = new ArrayList<Identifier>();
2685      this.identifier.add(t);
2686      return this;
2687    }
2688
2689    /**
2690     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
2691     */
2692    public Identifier getIdentifierFirstRep() { 
2693      if (getIdentifier().isEmpty()) {
2694        addIdentifier();
2695      }
2696      return getIdentifier().get(0);
2697    }
2698
2699    /**
2700     * @return {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2701     */
2702    public Enumeration<FinancialResourceStatusCodes> getStatusElement() { 
2703      if (this.status == null)
2704        if (Configuration.errorOnAutoCreate())
2705          throw new Error("Attempt to auto-create CoverageEligibilityResponse.status");
2706        else if (Configuration.doAutoCreate())
2707          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); // bb
2708      return this.status;
2709    }
2710
2711    public boolean hasStatusElement() { 
2712      return this.status != null && !this.status.isEmpty();
2713    }
2714
2715    public boolean hasStatus() { 
2716      return this.status != null && !this.status.isEmpty();
2717    }
2718
2719    /**
2720     * @param value {@link #status} (The status of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2721     */
2722    public CoverageEligibilityResponse setStatusElement(Enumeration<FinancialResourceStatusCodes> value) { 
2723      this.status = value;
2724      return this;
2725    }
2726
2727    /**
2728     * @return The status of the resource instance.
2729     */
2730    public FinancialResourceStatusCodes getStatus() { 
2731      return this.status == null ? null : this.status.getValue();
2732    }
2733
2734    /**
2735     * @param value The status of the resource instance.
2736     */
2737    public CoverageEligibilityResponse setStatus(FinancialResourceStatusCodes value) { 
2738        if (this.status == null)
2739          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory());
2740        this.status.setValue(value);
2741      return this;
2742    }
2743
2744    /**
2745     * @return {@link #purpose} (Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.)
2746     */
2747    public List<Enumeration<EligibilityResponsePurpose>> getPurpose() { 
2748      if (this.purpose == null)
2749        this.purpose = new ArrayList<Enumeration<EligibilityResponsePurpose>>();
2750      return this.purpose;
2751    }
2752
2753    /**
2754     * @return Returns a reference to <code>this</code> for easy method chaining
2755     */
2756    public CoverageEligibilityResponse setPurpose(List<Enumeration<EligibilityResponsePurpose>> thePurpose) { 
2757      this.purpose = thePurpose;
2758      return this;
2759    }
2760
2761    public boolean hasPurpose() { 
2762      if (this.purpose == null)
2763        return false;
2764      for (Enumeration<EligibilityResponsePurpose> item : this.purpose)
2765        if (!item.isEmpty())
2766          return true;
2767      return false;
2768    }
2769
2770    /**
2771     * @return {@link #purpose} (Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.)
2772     */
2773    public Enumeration<EligibilityResponsePurpose> addPurposeElement() {//2 
2774      Enumeration<EligibilityResponsePurpose> t = new Enumeration<EligibilityResponsePurpose>(new EligibilityResponsePurposeEnumFactory());
2775      if (this.purpose == null)
2776        this.purpose = new ArrayList<Enumeration<EligibilityResponsePurpose>>();
2777      this.purpose.add(t);
2778      return t;
2779    }
2780
2781    /**
2782     * @param value {@link #purpose} (Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.)
2783     */
2784    public CoverageEligibilityResponse addPurpose(EligibilityResponsePurpose value) { //1
2785      Enumeration<EligibilityResponsePurpose> t = new Enumeration<EligibilityResponsePurpose>(new EligibilityResponsePurposeEnumFactory());
2786      t.setValue(value);
2787      if (this.purpose == null)
2788        this.purpose = new ArrayList<Enumeration<EligibilityResponsePurpose>>();
2789      this.purpose.add(t);
2790      return this;
2791    }
2792
2793    /**
2794     * @param value {@link #purpose} (Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.)
2795     */
2796    public boolean hasPurpose(EligibilityResponsePurpose value) { 
2797      if (this.purpose == null)
2798        return false;
2799      for (Enumeration<EligibilityResponsePurpose> v : this.purpose)
2800        if (v.getValue().equals(value)) // code
2801          return true;
2802      return false;
2803    }
2804
2805    /**
2806     * @return {@link #patient} (The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.)
2807     */
2808    public Reference getPatient() { 
2809      if (this.patient == null)
2810        if (Configuration.errorOnAutoCreate())
2811          throw new Error("Attempt to auto-create CoverageEligibilityResponse.patient");
2812        else if (Configuration.doAutoCreate())
2813          this.patient = new Reference(); // cc
2814      return this.patient;
2815    }
2816
2817    public boolean hasPatient() { 
2818      return this.patient != null && !this.patient.isEmpty();
2819    }
2820
2821    /**
2822     * @param value {@link #patient} (The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.)
2823     */
2824    public CoverageEligibilityResponse setPatient(Reference value) { 
2825      this.patient = value;
2826      return this;
2827    }
2828
2829    /**
2830     * @return {@link #event} (Information code for an event with a corresponding date or period.)
2831     */
2832    public List<CoverageEligibilityResponseEventComponent> getEvent() { 
2833      if (this.event == null)
2834        this.event = new ArrayList<CoverageEligibilityResponseEventComponent>();
2835      return this.event;
2836    }
2837
2838    /**
2839     * @return Returns a reference to <code>this</code> for easy method chaining
2840     */
2841    public CoverageEligibilityResponse setEvent(List<CoverageEligibilityResponseEventComponent> theEvent) { 
2842      this.event = theEvent;
2843      return this;
2844    }
2845
2846    public boolean hasEvent() { 
2847      if (this.event == null)
2848        return false;
2849      for (CoverageEligibilityResponseEventComponent item : this.event)
2850        if (!item.isEmpty())
2851          return true;
2852      return false;
2853    }
2854
2855    public CoverageEligibilityResponseEventComponent addEvent() { //3
2856      CoverageEligibilityResponseEventComponent t = new CoverageEligibilityResponseEventComponent();
2857      if (this.event == null)
2858        this.event = new ArrayList<CoverageEligibilityResponseEventComponent>();
2859      this.event.add(t);
2860      return t;
2861    }
2862
2863    public CoverageEligibilityResponse addEvent(CoverageEligibilityResponseEventComponent t) { //3
2864      if (t == null)
2865        return this;
2866      if (this.event == null)
2867        this.event = new ArrayList<CoverageEligibilityResponseEventComponent>();
2868      this.event.add(t);
2869      return this;
2870    }
2871
2872    /**
2873     * @return The first repetition of repeating field {@link #event}, creating it if it does not already exist {3}
2874     */
2875    public CoverageEligibilityResponseEventComponent getEventFirstRep() { 
2876      if (getEvent().isEmpty()) {
2877        addEvent();
2878      }
2879      return getEvent().get(0);
2880    }
2881
2882    /**
2883     * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2884     */
2885    public DataType getServiced() { 
2886      return this.serviced;
2887    }
2888
2889    /**
2890     * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2891     */
2892    public DateType getServicedDateType() throws FHIRException { 
2893      if (this.serviced == null)
2894        this.serviced = new DateType();
2895      if (!(this.serviced instanceof DateType))
2896        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.serviced.getClass().getName()+" was encountered");
2897      return (DateType) this.serviced;
2898    }
2899
2900    public boolean hasServicedDateType() { 
2901      return this != null && this.serviced instanceof DateType;
2902    }
2903
2904    /**
2905     * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2906     */
2907    public Period getServicedPeriod() throws FHIRException { 
2908      if (this.serviced == null)
2909        this.serviced = new Period();
2910      if (!(this.serviced instanceof Period))
2911        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.serviced.getClass().getName()+" was encountered");
2912      return (Period) this.serviced;
2913    }
2914
2915    public boolean hasServicedPeriod() { 
2916      return this != null && this.serviced instanceof Period;
2917    }
2918
2919    public boolean hasServiced() { 
2920      return this.serviced != null && !this.serviced.isEmpty();
2921    }
2922
2923    /**
2924     * @param value {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2925     */
2926    public CoverageEligibilityResponse setServiced(DataType value) { 
2927      if (value != null && !(value instanceof DateType || value instanceof Period))
2928        throw new FHIRException("Not the right type for CoverageEligibilityResponse.serviced[x]: "+value.fhirType());
2929      this.serviced = value;
2930      return this;
2931    }
2932
2933    /**
2934     * @return {@link #created} (The date this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
2935     */
2936    public DateTimeType getCreatedElement() { 
2937      if (this.created == null)
2938        if (Configuration.errorOnAutoCreate())
2939          throw new Error("Attempt to auto-create CoverageEligibilityResponse.created");
2940        else if (Configuration.doAutoCreate())
2941          this.created = new DateTimeType(); // bb
2942      return this.created;
2943    }
2944
2945    public boolean hasCreatedElement() { 
2946      return this.created != null && !this.created.isEmpty();
2947    }
2948
2949    public boolean hasCreated() { 
2950      return this.created != null && !this.created.isEmpty();
2951    }
2952
2953    /**
2954     * @param value {@link #created} (The date this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
2955     */
2956    public CoverageEligibilityResponse setCreatedElement(DateTimeType value) { 
2957      this.created = value;
2958      return this;
2959    }
2960
2961    /**
2962     * @return The date this resource was created.
2963     */
2964    public Date getCreated() { 
2965      return this.created == null ? null : this.created.getValue();
2966    }
2967
2968    /**
2969     * @param value The date this resource was created.
2970     */
2971    public CoverageEligibilityResponse setCreated(Date value) { 
2972        if (this.created == null)
2973          this.created = new DateTimeType();
2974        this.created.setValue(value);
2975      return this;
2976    }
2977
2978    /**
2979     * @return {@link #requestor} (The provider which is responsible for the request.)
2980     */
2981    public Reference getRequestor() { 
2982      if (this.requestor == null)
2983        if (Configuration.errorOnAutoCreate())
2984          throw new Error("Attempt to auto-create CoverageEligibilityResponse.requestor");
2985        else if (Configuration.doAutoCreate())
2986          this.requestor = new Reference(); // cc
2987      return this.requestor;
2988    }
2989
2990    public boolean hasRequestor() { 
2991      return this.requestor != null && !this.requestor.isEmpty();
2992    }
2993
2994    /**
2995     * @param value {@link #requestor} (The provider which is responsible for the request.)
2996     */
2997    public CoverageEligibilityResponse setRequestor(Reference value) { 
2998      this.requestor = value;
2999      return this;
3000    }
3001
3002    /**
3003     * @return {@link #request} (Reference to the original request resource.)
3004     */
3005    public Reference getRequest() { 
3006      if (this.request == null)
3007        if (Configuration.errorOnAutoCreate())
3008          throw new Error("Attempt to auto-create CoverageEligibilityResponse.request");
3009        else if (Configuration.doAutoCreate())
3010          this.request = new Reference(); // cc
3011      return this.request;
3012    }
3013
3014    public boolean hasRequest() { 
3015      return this.request != null && !this.request.isEmpty();
3016    }
3017
3018    /**
3019     * @param value {@link #request} (Reference to the original request resource.)
3020     */
3021    public CoverageEligibilityResponse setRequest(Reference value) { 
3022      this.request = value;
3023      return this;
3024    }
3025
3026    /**
3027     * @return {@link #outcome} (The outcome of the request processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
3028     */
3029    public Enumeration<EligibilityOutcome> getOutcomeElement() { 
3030      if (this.outcome == null)
3031        if (Configuration.errorOnAutoCreate())
3032          throw new Error("Attempt to auto-create CoverageEligibilityResponse.outcome");
3033        else if (Configuration.doAutoCreate())
3034          this.outcome = new Enumeration<EligibilityOutcome>(new EligibilityOutcomeEnumFactory()); // bb
3035      return this.outcome;
3036    }
3037
3038    public boolean hasOutcomeElement() { 
3039      return this.outcome != null && !this.outcome.isEmpty();
3040    }
3041
3042    public boolean hasOutcome() { 
3043      return this.outcome != null && !this.outcome.isEmpty();
3044    }
3045
3046    /**
3047     * @param value {@link #outcome} (The outcome of the request processing.). This is the underlying object with id, value and extensions. The accessor "getOutcome" gives direct access to the value
3048     */
3049    public CoverageEligibilityResponse setOutcomeElement(Enumeration<EligibilityOutcome> value) { 
3050      this.outcome = value;
3051      return this;
3052    }
3053
3054    /**
3055     * @return The outcome of the request processing.
3056     */
3057    public EligibilityOutcome getOutcome() { 
3058      return this.outcome == null ? null : this.outcome.getValue();
3059    }
3060
3061    /**
3062     * @param value The outcome of the request processing.
3063     */
3064    public CoverageEligibilityResponse setOutcome(EligibilityOutcome value) { 
3065        if (this.outcome == null)
3066          this.outcome = new Enumeration<EligibilityOutcome>(new EligibilityOutcomeEnumFactory());
3067        this.outcome.setValue(value);
3068      return this;
3069    }
3070
3071    /**
3072     * @return {@link #disposition} (A human readable 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
3073     */
3074    public StringType getDispositionElement() { 
3075      if (this.disposition == null)
3076        if (Configuration.errorOnAutoCreate())
3077          throw new Error("Attempt to auto-create CoverageEligibilityResponse.disposition");
3078        else if (Configuration.doAutoCreate())
3079          this.disposition = new StringType(); // bb
3080      return this.disposition;
3081    }
3082
3083    public boolean hasDispositionElement() { 
3084      return this.disposition != null && !this.disposition.isEmpty();
3085    }
3086
3087    public boolean hasDisposition() { 
3088      return this.disposition != null && !this.disposition.isEmpty();
3089    }
3090
3091    /**
3092     * @param value {@link #disposition} (A human readable 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
3093     */
3094    public CoverageEligibilityResponse setDispositionElement(StringType value) { 
3095      this.disposition = value;
3096      return this;
3097    }
3098
3099    /**
3100     * @return A human readable description of the status of the adjudication.
3101     */
3102    public String getDisposition() { 
3103      return this.disposition == null ? null : this.disposition.getValue();
3104    }
3105
3106    /**
3107     * @param value A human readable description of the status of the adjudication.
3108     */
3109    public CoverageEligibilityResponse setDisposition(String value) { 
3110      if (Utilities.noString(value))
3111        this.disposition = null;
3112      else {
3113        if (this.disposition == null)
3114          this.disposition = new StringType();
3115        this.disposition.setValue(value);
3116      }
3117      return this;
3118    }
3119
3120    /**
3121     * @return {@link #insurer} (The Insurer who issued the coverage in question and is the author of the response.)
3122     */
3123    public Reference getInsurer() { 
3124      if (this.insurer == null)
3125        if (Configuration.errorOnAutoCreate())
3126          throw new Error("Attempt to auto-create CoverageEligibilityResponse.insurer");
3127        else if (Configuration.doAutoCreate())
3128          this.insurer = new Reference(); // cc
3129      return this.insurer;
3130    }
3131
3132    public boolean hasInsurer() { 
3133      return this.insurer != null && !this.insurer.isEmpty();
3134    }
3135
3136    /**
3137     * @param value {@link #insurer} (The Insurer who issued the coverage in question and is the author of the response.)
3138     */
3139    public CoverageEligibilityResponse setInsurer(Reference value) { 
3140      this.insurer = value;
3141      return this;
3142    }
3143
3144    /**
3145     * @return {@link #insurance} (Financial instruments for reimbursement for the health care products and services.)
3146     */
3147    public List<InsuranceComponent> getInsurance() { 
3148      if (this.insurance == null)
3149        this.insurance = new ArrayList<InsuranceComponent>();
3150      return this.insurance;
3151    }
3152
3153    /**
3154     * @return Returns a reference to <code>this</code> for easy method chaining
3155     */
3156    public CoverageEligibilityResponse setInsurance(List<InsuranceComponent> theInsurance) { 
3157      this.insurance = theInsurance;
3158      return this;
3159    }
3160
3161    public boolean hasInsurance() { 
3162      if (this.insurance == null)
3163        return false;
3164      for (InsuranceComponent item : this.insurance)
3165        if (!item.isEmpty())
3166          return true;
3167      return false;
3168    }
3169
3170    public InsuranceComponent addInsurance() { //3
3171      InsuranceComponent t = new InsuranceComponent();
3172      if (this.insurance == null)
3173        this.insurance = new ArrayList<InsuranceComponent>();
3174      this.insurance.add(t);
3175      return t;
3176    }
3177
3178    public CoverageEligibilityResponse addInsurance(InsuranceComponent t) { //3
3179      if (t == null)
3180        return this;
3181      if (this.insurance == null)
3182        this.insurance = new ArrayList<InsuranceComponent>();
3183      this.insurance.add(t);
3184      return this;
3185    }
3186
3187    /**
3188     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist {3}
3189     */
3190    public InsuranceComponent getInsuranceFirstRep() { 
3191      if (getInsurance().isEmpty()) {
3192        addInsurance();
3193      }
3194      return getInsurance().get(0);
3195    }
3196
3197    /**
3198     * @return {@link #preAuthRef} (A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.). This is the underlying object with id, value and extensions. The accessor "getPreAuthRef" gives direct access to the value
3199     */
3200    public StringType getPreAuthRefElement() { 
3201      if (this.preAuthRef == null)
3202        if (Configuration.errorOnAutoCreate())
3203          throw new Error("Attempt to auto-create CoverageEligibilityResponse.preAuthRef");
3204        else if (Configuration.doAutoCreate())
3205          this.preAuthRef = new StringType(); // bb
3206      return this.preAuthRef;
3207    }
3208
3209    public boolean hasPreAuthRefElement() { 
3210      return this.preAuthRef != null && !this.preAuthRef.isEmpty();
3211    }
3212
3213    public boolean hasPreAuthRef() { 
3214      return this.preAuthRef != null && !this.preAuthRef.isEmpty();
3215    }
3216
3217    /**
3218     * @param value {@link #preAuthRef} (A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.). This is the underlying object with id, value and extensions. The accessor "getPreAuthRef" gives direct access to the value
3219     */
3220    public CoverageEligibilityResponse setPreAuthRefElement(StringType value) { 
3221      this.preAuthRef = value;
3222      return this;
3223    }
3224
3225    /**
3226     * @return A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.
3227     */
3228    public String getPreAuthRef() { 
3229      return this.preAuthRef == null ? null : this.preAuthRef.getValue();
3230    }
3231
3232    /**
3233     * @param value A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.
3234     */
3235    public CoverageEligibilityResponse setPreAuthRef(String value) { 
3236      if (Utilities.noString(value))
3237        this.preAuthRef = null;
3238      else {
3239        if (this.preAuthRef == null)
3240          this.preAuthRef = new StringType();
3241        this.preAuthRef.setValue(value);
3242      }
3243      return this;
3244    }
3245
3246    /**
3247     * @return {@link #form} (A code for the form to be used for printing the content.)
3248     */
3249    public CodeableConcept getForm() { 
3250      if (this.form == null)
3251        if (Configuration.errorOnAutoCreate())
3252          throw new Error("Attempt to auto-create CoverageEligibilityResponse.form");
3253        else if (Configuration.doAutoCreate())
3254          this.form = new CodeableConcept(); // cc
3255      return this.form;
3256    }
3257
3258    public boolean hasForm() { 
3259      return this.form != null && !this.form.isEmpty();
3260    }
3261
3262    /**
3263     * @param value {@link #form} (A code for the form to be used for printing the content.)
3264     */
3265    public CoverageEligibilityResponse setForm(CodeableConcept value) { 
3266      this.form = value;
3267      return this;
3268    }
3269
3270    /**
3271     * @return {@link #error} (Errors encountered during the processing of the request.)
3272     */
3273    public List<ErrorsComponent> getError() { 
3274      if (this.error == null)
3275        this.error = new ArrayList<ErrorsComponent>();
3276      return this.error;
3277    }
3278
3279    /**
3280     * @return Returns a reference to <code>this</code> for easy method chaining
3281     */
3282    public CoverageEligibilityResponse setError(List<ErrorsComponent> theError) { 
3283      this.error = theError;
3284      return this;
3285    }
3286
3287    public boolean hasError() { 
3288      if (this.error == null)
3289        return false;
3290      for (ErrorsComponent item : this.error)
3291        if (!item.isEmpty())
3292          return true;
3293      return false;
3294    }
3295
3296    public ErrorsComponent addError() { //3
3297      ErrorsComponent t = new ErrorsComponent();
3298      if (this.error == null)
3299        this.error = new ArrayList<ErrorsComponent>();
3300      this.error.add(t);
3301      return t;
3302    }
3303
3304    public CoverageEligibilityResponse addError(ErrorsComponent t) { //3
3305      if (t == null)
3306        return this;
3307      if (this.error == null)
3308        this.error = new ArrayList<ErrorsComponent>();
3309      this.error.add(t);
3310      return this;
3311    }
3312
3313    /**
3314     * @return The first repetition of repeating field {@link #error}, creating it if it does not already exist {3}
3315     */
3316    public ErrorsComponent getErrorFirstRep() { 
3317      if (getError().isEmpty()) {
3318        addError();
3319      }
3320      return getError().get(0);
3321    }
3322
3323      protected void listChildren(List<Property> children) {
3324        super.listChildren(children);
3325        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this coverage eligiblity request.", 0, java.lang.Integer.MAX_VALUE, identifier));
3326        children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status));
3327        children.add(new Property("purpose", "code", "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", 0, java.lang.Integer.MAX_VALUE, purpose));
3328        children.add(new Property("patient", "Reference(Patient)", "The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.", 0, 1, patient));
3329        children.add(new Property("event", "", "Information code for an event with a corresponding date or period.", 0, java.lang.Integer.MAX_VALUE, event));
3330        children.add(new Property("serviced[x]", "date|Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, 1, serviced));
3331        children.add(new Property("created", "dateTime", "The date this resource was created.", 0, 1, created));
3332        children.add(new Property("requestor", "Reference(Practitioner|PractitionerRole|Organization)", "The provider which is responsible for the request.", 0, 1, requestor));
3333        children.add(new Property("request", "Reference(CoverageEligibilityRequest)", "Reference to the original request resource.", 0, 1, request));
3334        children.add(new Property("outcome", "code", "The outcome of the request processing.", 0, 1, outcome));
3335        children.add(new Property("disposition", "string", "A human readable description of the status of the adjudication.", 0, 1, disposition));
3336        children.add(new Property("insurer", "Reference(Organization)", "The Insurer who issued the coverage in question and is the author of the response.", 0, 1, insurer));
3337        children.add(new Property("insurance", "", "Financial instruments for reimbursement for the health care products and services.", 0, java.lang.Integer.MAX_VALUE, insurance));
3338        children.add(new Property("preAuthRef", "string", "A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.", 0, 1, preAuthRef));
3339        children.add(new Property("form", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, form));
3340        children.add(new Property("error", "", "Errors encountered during the processing of the request.", 0, java.lang.Integer.MAX_VALUE, error));
3341      }
3342
3343      @Override
3344      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3345        switch (_hash) {
3346        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this coverage eligiblity request.", 0, java.lang.Integer.MAX_VALUE, identifier);
3347        case -892481550: /*status*/  return new Property("status", "code", "The status of the resource instance.", 0, 1, status);
3348        case -220463842: /*purpose*/  return new Property("purpose", "code", "Code to specify whether requesting: prior authorization requirements for some service categories or billing codes; benefits for coverages specified or discovered; discovery and return of coverages for the patient; and/or validation that the specified coverage is in-force at the date/period specified or 'now' if not specified.", 0, java.lang.Integer.MAX_VALUE, purpose);
3349        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.", 0, 1, patient);
3350        case 96891546: /*event*/  return new Property("event", "", "Information code for an event with a corresponding date or period.", 0, java.lang.Integer.MAX_VALUE, event);
3351        case -1927922223: /*serviced[x]*/  return new Property("serviced[x]", "date|Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, 1, serviced);
3352        case 1379209295: /*serviced*/  return new Property("serviced[x]", "date|Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, 1, serviced);
3353        case 363246749: /*servicedDate*/  return new Property("serviced[x]", "date", "The date or dates when the enclosed suite of services were performed or completed.", 0, 1, serviced);
3354        case 1534966512: /*servicedPeriod*/  return new Property("serviced[x]", "Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, 1, serviced);
3355        case 1028554472: /*created*/  return new Property("created", "dateTime", "The date this resource was created.", 0, 1, created);
3356        case 693934258: /*requestor*/  return new Property("requestor", "Reference(Practitioner|PractitionerRole|Organization)", "The provider which is responsible for the request.", 0, 1, requestor);
3357        case 1095692943: /*request*/  return new Property("request", "Reference(CoverageEligibilityRequest)", "Reference to the original request resource.", 0, 1, request);
3358        case -1106507950: /*outcome*/  return new Property("outcome", "code", "The outcome of the request processing.", 0, 1, outcome);
3359        case 583380919: /*disposition*/  return new Property("disposition", "string", "A human readable description of the status of the adjudication.", 0, 1, disposition);
3360        case 1957615864: /*insurer*/  return new Property("insurer", "Reference(Organization)", "The Insurer who issued the coverage in question and is the author of the response.", 0, 1, insurer);
3361        case 73049818: /*insurance*/  return new Property("insurance", "", "Financial instruments for reimbursement for the health care products and services.", 0, java.lang.Integer.MAX_VALUE, insurance);
3362        case 522246568: /*preAuthRef*/  return new Property("preAuthRef", "string", "A reference from the Insurer to which these services pertain to be used on further communication and as proof that the request occurred.", 0, 1, preAuthRef);
3363        case 3148996: /*form*/  return new Property("form", "CodeableConcept", "A code for the form to be used for printing the content.", 0, 1, form);
3364        case 96784904: /*error*/  return new Property("error", "", "Errors encountered during the processing of the request.", 0, java.lang.Integer.MAX_VALUE, error);
3365        default: return super.getNamedProperty(_hash, _name, _checkValid);
3366        }
3367
3368      }
3369
3370      @Override
3371      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3372        switch (hash) {
3373        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3374        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FinancialResourceStatusCodes>
3375        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : this.purpose.toArray(new Base[this.purpose.size()]); // Enumeration<EligibilityResponsePurpose>
3376        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
3377        case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // CoverageEligibilityResponseEventComponent
3378        case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // DataType
3379        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
3380        case 693934258: /*requestor*/ return this.requestor == null ? new Base[0] : new Base[] {this.requestor}; // Reference
3381        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Reference
3382        case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Enumeration<EligibilityOutcome>
3383        case 583380919: /*disposition*/ return this.disposition == null ? new Base[0] : new Base[] {this.disposition}; // StringType
3384        case 1957615864: /*insurer*/ return this.insurer == null ? new Base[0] : new Base[] {this.insurer}; // Reference
3385        case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // InsuranceComponent
3386        case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : new Base[] {this.preAuthRef}; // StringType
3387        case 3148996: /*form*/ return this.form == null ? new Base[0] : new Base[] {this.form}; // CodeableConcept
3388        case 96784904: /*error*/ return this.error == null ? new Base[0] : this.error.toArray(new Base[this.error.size()]); // ErrorsComponent
3389        default: return super.getProperty(hash, name, checkValid);
3390        }
3391
3392      }
3393
3394      @Override
3395      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3396        switch (hash) {
3397        case -1618432855: // identifier
3398          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
3399          return value;
3400        case -892481550: // status
3401          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
3402          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
3403          return value;
3404        case -220463842: // purpose
3405          value = new EligibilityResponsePurposeEnumFactory().fromType(TypeConvertor.castToCode(value));
3406          this.getPurpose().add((Enumeration) value); // Enumeration<EligibilityResponsePurpose>
3407          return value;
3408        case -791418107: // patient
3409          this.patient = TypeConvertor.castToReference(value); // Reference
3410          return value;
3411        case 96891546: // event
3412          this.getEvent().add((CoverageEligibilityResponseEventComponent) value); // CoverageEligibilityResponseEventComponent
3413          return value;
3414        case 1379209295: // serviced
3415          this.serviced = TypeConvertor.castToType(value); // DataType
3416          return value;
3417        case 1028554472: // created
3418          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
3419          return value;
3420        case 693934258: // requestor
3421          this.requestor = TypeConvertor.castToReference(value); // Reference
3422          return value;
3423        case 1095692943: // request
3424          this.request = TypeConvertor.castToReference(value); // Reference
3425          return value;
3426        case -1106507950: // outcome
3427          value = new EligibilityOutcomeEnumFactory().fromType(TypeConvertor.castToCode(value));
3428          this.outcome = (Enumeration) value; // Enumeration<EligibilityOutcome>
3429          return value;
3430        case 583380919: // disposition
3431          this.disposition = TypeConvertor.castToString(value); // StringType
3432          return value;
3433        case 1957615864: // insurer
3434          this.insurer = TypeConvertor.castToReference(value); // Reference
3435          return value;
3436        case 73049818: // insurance
3437          this.getInsurance().add((InsuranceComponent) value); // InsuranceComponent
3438          return value;
3439        case 522246568: // preAuthRef
3440          this.preAuthRef = TypeConvertor.castToString(value); // StringType
3441          return value;
3442        case 3148996: // form
3443          this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3444          return value;
3445        case 96784904: // error
3446          this.getError().add((ErrorsComponent) value); // ErrorsComponent
3447          return value;
3448        default: return super.setProperty(hash, name, value);
3449        }
3450
3451      }
3452
3453      @Override
3454      public Base setProperty(String name, Base value) throws FHIRException {
3455        if (name.equals("identifier")) {
3456          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
3457        } else if (name.equals("status")) {
3458          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
3459          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
3460        } else if (name.equals("purpose")) {
3461          value = new EligibilityResponsePurposeEnumFactory().fromType(TypeConvertor.castToCode(value));
3462          this.getPurpose().add((Enumeration) value);
3463        } else if (name.equals("patient")) {
3464          this.patient = TypeConvertor.castToReference(value); // Reference
3465        } else if (name.equals("event")) {
3466          this.getEvent().add((CoverageEligibilityResponseEventComponent) value);
3467        } else if (name.equals("serviced[x]")) {
3468          this.serviced = TypeConvertor.castToType(value); // DataType
3469        } else if (name.equals("created")) {
3470          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
3471        } else if (name.equals("requestor")) {
3472          this.requestor = TypeConvertor.castToReference(value); // Reference
3473        } else if (name.equals("request")) {
3474          this.request = TypeConvertor.castToReference(value); // Reference
3475        } else if (name.equals("outcome")) {
3476          value = new EligibilityOutcomeEnumFactory().fromType(TypeConvertor.castToCode(value));
3477          this.outcome = (Enumeration) value; // Enumeration<EligibilityOutcome>
3478        } else if (name.equals("disposition")) {
3479          this.disposition = TypeConvertor.castToString(value); // StringType
3480        } else if (name.equals("insurer")) {
3481          this.insurer = TypeConvertor.castToReference(value); // Reference
3482        } else if (name.equals("insurance")) {
3483          this.getInsurance().add((InsuranceComponent) value);
3484        } else if (name.equals("preAuthRef")) {
3485          this.preAuthRef = TypeConvertor.castToString(value); // StringType
3486        } else if (name.equals("form")) {
3487          this.form = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3488        } else if (name.equals("error")) {
3489          this.getError().add((ErrorsComponent) value);
3490        } else
3491          return super.setProperty(name, value);
3492        return value;
3493      }
3494
3495      @Override
3496      public Base makeProperty(int hash, String name) throws FHIRException {
3497        switch (hash) {
3498        case -1618432855:  return addIdentifier(); 
3499        case -892481550:  return getStatusElement();
3500        case -220463842:  return addPurposeElement();
3501        case -791418107:  return getPatient();
3502        case 96891546:  return addEvent(); 
3503        case -1927922223:  return getServiced();
3504        case 1379209295:  return getServiced();
3505        case 1028554472:  return getCreatedElement();
3506        case 693934258:  return getRequestor();
3507        case 1095692943:  return getRequest();
3508        case -1106507950:  return getOutcomeElement();
3509        case 583380919:  return getDispositionElement();
3510        case 1957615864:  return getInsurer();
3511        case 73049818:  return addInsurance(); 
3512        case 522246568:  return getPreAuthRefElement();
3513        case 3148996:  return getForm();
3514        case 96784904:  return addError(); 
3515        default: return super.makeProperty(hash, name);
3516        }
3517
3518      }
3519
3520      @Override
3521      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3522        switch (hash) {
3523        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3524        case -892481550: /*status*/ return new String[] {"code"};
3525        case -220463842: /*purpose*/ return new String[] {"code"};
3526        case -791418107: /*patient*/ return new String[] {"Reference"};
3527        case 96891546: /*event*/ return new String[] {};
3528        case 1379209295: /*serviced*/ return new String[] {"date", "Period"};
3529        case 1028554472: /*created*/ return new String[] {"dateTime"};
3530        case 693934258: /*requestor*/ return new String[] {"Reference"};
3531        case 1095692943: /*request*/ return new String[] {"Reference"};
3532        case -1106507950: /*outcome*/ return new String[] {"code"};
3533        case 583380919: /*disposition*/ return new String[] {"string"};
3534        case 1957615864: /*insurer*/ return new String[] {"Reference"};
3535        case 73049818: /*insurance*/ return new String[] {};
3536        case 522246568: /*preAuthRef*/ return new String[] {"string"};
3537        case 3148996: /*form*/ return new String[] {"CodeableConcept"};
3538        case 96784904: /*error*/ return new String[] {};
3539        default: return super.getTypesForProperty(hash, name);
3540        }
3541
3542      }
3543
3544      @Override
3545      public Base addChild(String name) throws FHIRException {
3546        if (name.equals("identifier")) {
3547          return addIdentifier();
3548        }
3549        else if (name.equals("status")) {
3550          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.status");
3551        }
3552        else if (name.equals("purpose")) {
3553          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.purpose");
3554        }
3555        else if (name.equals("patient")) {
3556          this.patient = new Reference();
3557          return this.patient;
3558        }
3559        else if (name.equals("event")) {
3560          return addEvent();
3561        }
3562        else if (name.equals("servicedDate")) {
3563          this.serviced = new DateType();
3564          return this.serviced;
3565        }
3566        else if (name.equals("servicedPeriod")) {
3567          this.serviced = new Period();
3568          return this.serviced;
3569        }
3570        else if (name.equals("created")) {
3571          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.created");
3572        }
3573        else if (name.equals("requestor")) {
3574          this.requestor = new Reference();
3575          return this.requestor;
3576        }
3577        else if (name.equals("request")) {
3578          this.request = new Reference();
3579          return this.request;
3580        }
3581        else if (name.equals("outcome")) {
3582          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.outcome");
3583        }
3584        else if (name.equals("disposition")) {
3585          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.disposition");
3586        }
3587        else if (name.equals("insurer")) {
3588          this.insurer = new Reference();
3589          return this.insurer;
3590        }
3591        else if (name.equals("insurance")) {
3592          return addInsurance();
3593        }
3594        else if (name.equals("preAuthRef")) {
3595          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityResponse.preAuthRef");
3596        }
3597        else if (name.equals("form")) {
3598          this.form = new CodeableConcept();
3599          return this.form;
3600        }
3601        else if (name.equals("error")) {
3602          return addError();
3603        }
3604        else
3605          return super.addChild(name);
3606      }
3607
3608  public String fhirType() {
3609    return "CoverageEligibilityResponse";
3610
3611  }
3612
3613      public CoverageEligibilityResponse copy() {
3614        CoverageEligibilityResponse dst = new CoverageEligibilityResponse();
3615        copyValues(dst);
3616        return dst;
3617      }
3618
3619      public void copyValues(CoverageEligibilityResponse dst) {
3620        super.copyValues(dst);
3621        if (identifier != null) {
3622          dst.identifier = new ArrayList<Identifier>();
3623          for (Identifier i : identifier)
3624            dst.identifier.add(i.copy());
3625        };
3626        dst.status = status == null ? null : status.copy();
3627        if (purpose != null) {
3628          dst.purpose = new ArrayList<Enumeration<EligibilityResponsePurpose>>();
3629          for (Enumeration<EligibilityResponsePurpose> i : purpose)
3630            dst.purpose.add(i.copy());
3631        };
3632        dst.patient = patient == null ? null : patient.copy();
3633        if (event != null) {
3634          dst.event = new ArrayList<CoverageEligibilityResponseEventComponent>();
3635          for (CoverageEligibilityResponseEventComponent i : event)
3636            dst.event.add(i.copy());
3637        };
3638        dst.serviced = serviced == null ? null : serviced.copy();
3639        dst.created = created == null ? null : created.copy();
3640        dst.requestor = requestor == null ? null : requestor.copy();
3641        dst.request = request == null ? null : request.copy();
3642        dst.outcome = outcome == null ? null : outcome.copy();
3643        dst.disposition = disposition == null ? null : disposition.copy();
3644        dst.insurer = insurer == null ? null : insurer.copy();
3645        if (insurance != null) {
3646          dst.insurance = new ArrayList<InsuranceComponent>();
3647          for (InsuranceComponent i : insurance)
3648            dst.insurance.add(i.copy());
3649        };
3650        dst.preAuthRef = preAuthRef == null ? null : preAuthRef.copy();
3651        dst.form = form == null ? null : form.copy();
3652        if (error != null) {
3653          dst.error = new ArrayList<ErrorsComponent>();
3654          for (ErrorsComponent i : error)
3655            dst.error.add(i.copy());
3656        };
3657      }
3658
3659      protected CoverageEligibilityResponse typedCopy() {
3660        return copy();
3661      }
3662
3663      @Override
3664      public boolean equalsDeep(Base other_) {
3665        if (!super.equalsDeep(other_))
3666          return false;
3667        if (!(other_ instanceof CoverageEligibilityResponse))
3668          return false;
3669        CoverageEligibilityResponse o = (CoverageEligibilityResponse) other_;
3670        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(purpose, o.purpose, true)
3671           && compareDeep(patient, o.patient, true) && compareDeep(event, o.event, true) && compareDeep(serviced, o.serviced, true)
3672           && compareDeep(created, o.created, true) && compareDeep(requestor, o.requestor, true) && compareDeep(request, o.request, true)
3673           && compareDeep(outcome, o.outcome, true) && compareDeep(disposition, o.disposition, true) && compareDeep(insurer, o.insurer, true)
3674           && compareDeep(insurance, o.insurance, true) && compareDeep(preAuthRef, o.preAuthRef, true) && compareDeep(form, o.form, true)
3675           && compareDeep(error, o.error, true);
3676      }
3677
3678      @Override
3679      public boolean equalsShallow(Base other_) {
3680        if (!super.equalsShallow(other_))
3681          return false;
3682        if (!(other_ instanceof CoverageEligibilityResponse))
3683          return false;
3684        CoverageEligibilityResponse o = (CoverageEligibilityResponse) other_;
3685        return compareValues(status, o.status, true) && compareValues(purpose, o.purpose, true) && compareValues(created, o.created, true)
3686           && compareValues(outcome, o.outcome, true) && compareValues(disposition, o.disposition, true) && compareValues(preAuthRef, o.preAuthRef, true)
3687          ;
3688      }
3689
3690      public boolean isEmpty() {
3691        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, purpose
3692          , patient, event, serviced, created, requestor, request, outcome, disposition
3693          , insurer, insurance, preAuthRef, form, error);
3694      }
3695
3696  @Override
3697  public ResourceType getResourceType() {
3698    return ResourceType.CoverageEligibilityResponse;
3699   }
3700
3701 /**
3702   * Search parameter: <b>created</b>
3703   * <p>
3704   * Description: <b>The creation date</b><br>
3705   * Type: <b>date</b><br>
3706   * Path: <b>CoverageEligibilityResponse.created</b><br>
3707   * </p>
3708   */
3709  @SearchParamDefinition(name="created", path="CoverageEligibilityResponse.created", description="The creation date", type="date" )
3710  public static final String SP_CREATED = "created";
3711 /**
3712   * <b>Fluent Client</b> search parameter constant for <b>created</b>
3713   * <p>
3714   * Description: <b>The creation date</b><br>
3715   * Type: <b>date</b><br>
3716   * Path: <b>CoverageEligibilityResponse.created</b><br>
3717   * </p>
3718   */
3719  public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED);
3720
3721 /**
3722   * Search parameter: <b>disposition</b>
3723   * <p>
3724   * Description: <b>The contents of the disposition message</b><br>
3725   * Type: <b>string</b><br>
3726   * Path: <b>CoverageEligibilityResponse.disposition</b><br>
3727   * </p>
3728   */
3729  @SearchParamDefinition(name="disposition", path="CoverageEligibilityResponse.disposition", description="The contents of the disposition message", type="string" )
3730  public static final String SP_DISPOSITION = "disposition";
3731 /**
3732   * <b>Fluent Client</b> search parameter constant for <b>disposition</b>
3733   * <p>
3734   * Description: <b>The contents of the disposition message</b><br>
3735   * Type: <b>string</b><br>
3736   * Path: <b>CoverageEligibilityResponse.disposition</b><br>
3737   * </p>
3738   */
3739  public static final ca.uhn.fhir.rest.gclient.StringClientParam DISPOSITION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DISPOSITION);
3740
3741 /**
3742   * Search parameter: <b>insurer</b>
3743   * <p>
3744   * Description: <b>The organization which generated this resource</b><br>
3745   * Type: <b>reference</b><br>
3746   * Path: <b>CoverageEligibilityResponse.insurer</b><br>
3747   * </p>
3748   */
3749  @SearchParamDefinition(name="insurer", path="CoverageEligibilityResponse.insurer", description="The organization which generated this resource", type="reference", target={Organization.class } )
3750  public static final String SP_INSURER = "insurer";
3751 /**
3752   * <b>Fluent Client</b> search parameter constant for <b>insurer</b>
3753   * <p>
3754   * Description: <b>The organization which generated this resource</b><br>
3755   * Type: <b>reference</b><br>
3756   * Path: <b>CoverageEligibilityResponse.insurer</b><br>
3757   * </p>
3758   */
3759  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSURER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSURER);
3760
3761/**
3762   * Constant for fluent queries to be used to add include statements. Specifies
3763   * the path value of "<b>CoverageEligibilityResponse:insurer</b>".
3764   */
3765  public static final ca.uhn.fhir.model.api.Include INCLUDE_INSURER = new ca.uhn.fhir.model.api.Include("CoverageEligibilityResponse:insurer").toLocked();
3766
3767 /**
3768   * Search parameter: <b>outcome</b>
3769   * <p>
3770   * Description: <b>The processing outcome</b><br>
3771   * Type: <b>token</b><br>
3772   * Path: <b>CoverageEligibilityResponse.outcome</b><br>
3773   * </p>
3774   */
3775  @SearchParamDefinition(name="outcome", path="CoverageEligibilityResponse.outcome", description="The processing outcome", type="token" )
3776  public static final String SP_OUTCOME = "outcome";
3777 /**
3778   * <b>Fluent Client</b> search parameter constant for <b>outcome</b>
3779   * <p>
3780   * Description: <b>The processing outcome</b><br>
3781   * Type: <b>token</b><br>
3782   * Path: <b>CoverageEligibilityResponse.outcome</b><br>
3783   * </p>
3784   */
3785  public static final ca.uhn.fhir.rest.gclient.TokenClientParam OUTCOME = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_OUTCOME);
3786
3787 /**
3788   * Search parameter: <b>request</b>
3789   * <p>
3790   * Description: <b>The EligibilityRequest reference</b><br>
3791   * Type: <b>reference</b><br>
3792   * Path: <b>CoverageEligibilityResponse.request</b><br>
3793   * </p>
3794   */
3795  @SearchParamDefinition(name="request", path="CoverageEligibilityResponse.request", description="The EligibilityRequest reference", type="reference", target={CoverageEligibilityRequest.class } )
3796  public static final String SP_REQUEST = "request";
3797 /**
3798   * <b>Fluent Client</b> search parameter constant for <b>request</b>
3799   * <p>
3800   * Description: <b>The EligibilityRequest reference</b><br>
3801   * Type: <b>reference</b><br>
3802   * Path: <b>CoverageEligibilityResponse.request</b><br>
3803   * </p>
3804   */
3805  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST);
3806
3807/**
3808   * Constant for fluent queries to be used to add include statements. Specifies
3809   * the path value of "<b>CoverageEligibilityResponse:request</b>".
3810   */
3811  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("CoverageEligibilityResponse:request").toLocked();
3812
3813 /**
3814   * Search parameter: <b>requestor</b>
3815   * <p>
3816   * Description: <b>The EligibilityRequest provider</b><br>
3817   * Type: <b>reference</b><br>
3818   * Path: <b>CoverageEligibilityResponse.requestor</b><br>
3819   * </p>
3820   */
3821  @SearchParamDefinition(name="requestor", path="CoverageEligibilityResponse.requestor", description="The EligibilityRequest provider", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } )
3822  public static final String SP_REQUESTOR = "requestor";
3823 /**
3824   * <b>Fluent Client</b> search parameter constant for <b>requestor</b>
3825   * <p>
3826   * Description: <b>The EligibilityRequest provider</b><br>
3827   * Type: <b>reference</b><br>
3828   * Path: <b>CoverageEligibilityResponse.requestor</b><br>
3829   * </p>
3830   */
3831  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTOR);
3832
3833/**
3834   * Constant for fluent queries to be used to add include statements. Specifies
3835   * the path value of "<b>CoverageEligibilityResponse:requestor</b>".
3836   */
3837  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTOR = new ca.uhn.fhir.model.api.Include("CoverageEligibilityResponse:requestor").toLocked();
3838
3839 /**
3840   * Search parameter: <b>status</b>
3841   * <p>
3842   * Description: <b>The EligibilityRequest status</b><br>
3843   * Type: <b>token</b><br>
3844   * Path: <b>CoverageEligibilityResponse.status</b><br>
3845   * </p>
3846   */
3847  @SearchParamDefinition(name="status", path="CoverageEligibilityResponse.status", description="The EligibilityRequest status", type="token" )
3848  public static final String SP_STATUS = "status";
3849 /**
3850   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3851   * <p>
3852   * Description: <b>The EligibilityRequest status</b><br>
3853   * Type: <b>token</b><br>
3854   * Path: <b>CoverageEligibilityResponse.status</b><br>
3855   * </p>
3856   */
3857  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3858
3859 /**
3860   * Search parameter: <b>identifier</b>
3861   * <p>
3862   * Description: <b>Multiple Resources: 
3863
3864* [Account](account.html): Account number
3865* [AdverseEvent](adverseevent.html): Business identifier for the event
3866* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3867* [Appointment](appointment.html): An Identifier of the Appointment
3868* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3869* [Basic](basic.html): Business identifier
3870* [BodyStructure](bodystructure.html): Bodystructure identifier
3871* [CarePlan](careplan.html): External Ids for this plan
3872* [CareTeam](careteam.html): External Ids for this team
3873* [ChargeItem](chargeitem.html): Business Identifier for item
3874* [Claim](claim.html): The primary identifier of the financial resource
3875* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3876* [ClinicalImpression](clinicalimpression.html): Business identifier
3877* [Communication](communication.html): Unique identifier
3878* [CommunicationRequest](communicationrequest.html): Unique identifier
3879* [Composition](composition.html): Version-independent identifier for the Composition
3880* [Condition](condition.html): A unique identifier of the condition record
3881* [Consent](consent.html): Identifier for this record (external references)
3882* [Contract](contract.html): The identity of the contract
3883* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3884* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3885* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3886* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3887* [DeviceRequest](devicerequest.html): Business identifier for request/order
3888* [DeviceUsage](deviceusage.html): Search by identifier
3889* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3890* [DocumentReference](documentreference.html): Identifier of the attachment binary
3891* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3892* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3893* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3894* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3895* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3896* [Flag](flag.html): Business identifier
3897* [Goal](goal.html): External Ids for this goal
3898* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3899* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3900* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3901* [Immunization](immunization.html): Business identifier
3902* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3903* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3904* [Invoice](invoice.html): Business Identifier for item
3905* [List](list.html): Business identifier
3906* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3907* [Medication](medication.html): Returns medications with this external identifier
3908* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3909* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3910* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3911* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3912* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3913* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3914* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3915* [Observation](observation.html): The unique id for a particular observation
3916* [Person](person.html): A person Identifier
3917* [Procedure](procedure.html): A unique identifier for a procedure
3918* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3919* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3920* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3921* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3922* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3923* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3924* [Specimen](specimen.html): The unique identifier associated with the specimen
3925* [SupplyDelivery](supplydelivery.html): External identifier
3926* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3927* [Task](task.html): Search for a task instance by its business identifier
3928* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3929</b><br>
3930   * Type: <b>token</b><br>
3931   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
3932   * </p>
3933   */
3934  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
3935  public static final String SP_IDENTIFIER = "identifier";
3936 /**
3937   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3938   * <p>
3939   * Description: <b>Multiple Resources: 
3940
3941* [Account](account.html): Account number
3942* [AdverseEvent](adverseevent.html): Business identifier for the event
3943* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3944* [Appointment](appointment.html): An Identifier of the Appointment
3945* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3946* [Basic](basic.html): Business identifier
3947* [BodyStructure](bodystructure.html): Bodystructure identifier
3948* [CarePlan](careplan.html): External Ids for this plan
3949* [CareTeam](careteam.html): External Ids for this team
3950* [ChargeItem](chargeitem.html): Business Identifier for item
3951* [Claim](claim.html): The primary identifier of the financial resource
3952* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3953* [ClinicalImpression](clinicalimpression.html): Business identifier
3954* [Communication](communication.html): Unique identifier
3955* [CommunicationRequest](communicationrequest.html): Unique identifier
3956* [Composition](composition.html): Version-independent identifier for the Composition
3957* [Condition](condition.html): A unique identifier of the condition record
3958* [Consent](consent.html): Identifier for this record (external references)
3959* [Contract](contract.html): The identity of the contract
3960* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3961* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3962* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3963* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3964* [DeviceRequest](devicerequest.html): Business identifier for request/order
3965* [DeviceUsage](deviceusage.html): Search by identifier
3966* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3967* [DocumentReference](documentreference.html): Identifier of the attachment binary
3968* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3969* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3970* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3971* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3972* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3973* [Flag](flag.html): Business identifier
3974* [Goal](goal.html): External Ids for this goal
3975* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3976* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3977* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3978* [Immunization](immunization.html): Business identifier
3979* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3980* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3981* [Invoice](invoice.html): Business Identifier for item
3982* [List](list.html): Business identifier
3983* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3984* [Medication](medication.html): Returns medications with this external identifier
3985* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3986* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3987* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3988* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3989* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3990* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3991* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3992* [Observation](observation.html): The unique id for a particular observation
3993* [Person](person.html): A person Identifier
3994* [Procedure](procedure.html): A unique identifier for a procedure
3995* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3996* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3997* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3998* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3999* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
4000* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
4001* [Specimen](specimen.html): The unique identifier associated with the specimen
4002* [SupplyDelivery](supplydelivery.html): External identifier
4003* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
4004* [Task](task.html): Search for a task instance by its business identifier
4005* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
4006</b><br>
4007   * Type: <b>token</b><br>
4008   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
4009   * </p>
4010   */
4011  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
4012
4013 /**
4014   * Search parameter: <b>patient</b>
4015   * <p>
4016   * Description: <b>Multiple Resources: 
4017
4018* [Account](account.html): The entity that caused the expenses
4019* [AdverseEvent](adverseevent.html): Subject impacted by event
4020* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
4021* [Appointment](appointment.html): One of the individuals of the appointment is this patient
4022* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
4023* [AuditEvent](auditevent.html): Where the activity involved patient data
4024* [Basic](basic.html): Identifies the focus of this resource
4025* [BodyStructure](bodystructure.html): Who this is about
4026* [CarePlan](careplan.html): Who the care plan is for
4027* [CareTeam](careteam.html): Who care team is for
4028* [ChargeItem](chargeitem.html): Individual service was done for/to
4029* [Claim](claim.html): Patient receiving the products or services
4030* [ClaimResponse](claimresponse.html): The subject of care
4031* [ClinicalImpression](clinicalimpression.html): Patient assessed
4032* [Communication](communication.html): Focus of message
4033* [CommunicationRequest](communicationrequest.html): Focus of message
4034* [Composition](composition.html): Who and/or what the composition is about
4035* [Condition](condition.html): Who has the condition?
4036* [Consent](consent.html): Who the consent applies to
4037* [Contract](contract.html): The identity of the subject of the contract (if a patient)
4038* [Coverage](coverage.html): Retrieve coverages for a patient
4039* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
4040* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
4041* [DetectedIssue](detectedissue.html): Associated patient
4042* [DeviceRequest](devicerequest.html): Individual the service is ordered for
4043* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
4044* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
4045* [DocumentReference](documentreference.html): Who/what is the subject of the document
4046* [Encounter](encounter.html): The patient present at the encounter
4047* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
4048* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
4049* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
4050* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
4051* [Flag](flag.html): The identity of a subject to list flags for
4052* [Goal](goal.html): Who this goal is intended for
4053* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
4054* [ImagingSelection](imagingselection.html): Who the study is about
4055* [ImagingStudy](imagingstudy.html): Who the study is about
4056* [Immunization](immunization.html): The patient for the vaccination record
4057* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
4058* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
4059* [Invoice](invoice.html): Recipient(s) of goods and services
4060* [List](list.html): If all resources have the same subject
4061* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
4062* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
4063* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
4064* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
4065* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
4066* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
4067* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
4068* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
4069* [Observation](observation.html): The subject that the observation is about (if patient)
4070* [Person](person.html): The Person links to this Patient
4071* [Procedure](procedure.html): Search by subject - a patient
4072* [Provenance](provenance.html): Where the activity involved patient data
4073* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
4074* [RelatedPerson](relatedperson.html): The patient this related person is related to
4075* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
4076* [ResearchSubject](researchsubject.html): Who or what is part of study
4077* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
4078* [ServiceRequest](servicerequest.html): Search by subject - a patient
4079* [Specimen](specimen.html): The patient the specimen comes from
4080* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
4081* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
4082* [Task](task.html): Search by patient
4083* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
4084</b><br>
4085   * Type: <b>reference</b><br>
4086   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
4087   * </p>
4088   */
4089  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
4090  public static final String SP_PATIENT = "patient";
4091 /**
4092   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
4093   * <p>
4094   * Description: <b>Multiple Resources: 
4095
4096* [Account](account.html): The entity that caused the expenses
4097* [AdverseEvent](adverseevent.html): Subject impacted by event
4098* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
4099* [Appointment](appointment.html): One of the individuals of the appointment is this patient
4100* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
4101* [AuditEvent](auditevent.html): Where the activity involved patient data
4102* [Basic](basic.html): Identifies the focus of this resource
4103* [BodyStructure](bodystructure.html): Who this is about
4104* [CarePlan](careplan.html): Who the care plan is for
4105* [CareTeam](careteam.html): Who care team is for
4106* [ChargeItem](chargeitem.html): Individual service was done for/to
4107* [Claim](claim.html): Patient receiving the products or services
4108* [ClaimResponse](claimresponse.html): The subject of care
4109* [ClinicalImpression](clinicalimpression.html): Patient assessed
4110* [Communication](communication.html): Focus of message
4111* [CommunicationRequest](communicationrequest.html): Focus of message
4112* [Composition](composition.html): Who and/or what the composition is about
4113* [Condition](condition.html): Who has the condition?
4114* [Consent](consent.html): Who the consent applies to
4115* [Contract](contract.html): The identity of the subject of the contract (if a patient)
4116* [Coverage](coverage.html): Retrieve coverages for a patient
4117* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
4118* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
4119* [DetectedIssue](detectedissue.html): Associated patient
4120* [DeviceRequest](devicerequest.html): Individual the service is ordered for
4121* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
4122* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
4123* [DocumentReference](documentreference.html): Who/what is the subject of the document
4124* [Encounter](encounter.html): The patient present at the encounter
4125* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
4126* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
4127* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
4128* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
4129* [Flag](flag.html): The identity of a subject to list flags for
4130* [Goal](goal.html): Who this goal is intended for
4131* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
4132* [ImagingSelection](imagingselection.html): Who the study is about
4133* [ImagingStudy](imagingstudy.html): Who the study is about
4134* [Immunization](immunization.html): The patient for the vaccination record
4135* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
4136* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
4137* [Invoice](invoice.html): Recipient(s) of goods and services
4138* [List](list.html): If all resources have the same subject
4139* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
4140* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
4141* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
4142* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
4143* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
4144* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
4145* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
4146* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
4147* [Observation](observation.html): The subject that the observation is about (if patient)
4148* [Person](person.html): The Person links to this Patient
4149* [Procedure](procedure.html): Search by subject - a patient
4150* [Provenance](provenance.html): Where the activity involved patient data
4151* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
4152* [RelatedPerson](relatedperson.html): The patient this related person is related to
4153* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
4154* [ResearchSubject](researchsubject.html): Who or what is part of study
4155* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
4156* [ServiceRequest](servicerequest.html): Search by subject - a patient
4157* [Specimen](specimen.html): The patient the specimen comes from
4158* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
4159* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
4160* [Task](task.html): Search by patient
4161* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
4162</b><br>
4163   * Type: <b>reference</b><br>
4164   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
4165   * </p>
4166   */
4167  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
4168
4169/**
4170   * Constant for fluent queries to be used to add include statements. Specifies
4171   * the path value of "<b>CoverageEligibilityResponse:patient</b>".
4172   */
4173  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CoverageEligibilityResponse:patient").toLocked();
4174
4175
4176}
4177