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 * The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
052 */
053@ResourceDef(name="CoverageEligibilityRequest", profile="http://hl7.org/fhir/StructureDefinition/CoverageEligibilityRequest")
054public class CoverageEligibilityRequest extends DomainResource {
055
056    public enum EligibilityRequestPurpose {
057        /**
058         * The prior authorization requirements for the listed, or discovered if specified, converages for the categories of service and/or specifed biling codes are requested.
059         */
060        AUTHREQUIREMENTS, 
061        /**
062         * The plan benefits and optionally benefits consumed  for the listed, or discovered if specified, converages are requested.
063         */
064        BENEFITS, 
065        /**
066         * The insurer is requested to report on any coverages which they are aware of in addition to any specifed.
067         */
068        DISCOVERY, 
069        /**
070         * A check that the specified coverages are in-force is requested.
071         */
072        VALIDATION, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static EligibilityRequestPurpose fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("auth-requirements".equals(codeString))
081          return AUTHREQUIREMENTS;
082        if ("benefits".equals(codeString))
083          return BENEFITS;
084        if ("discovery".equals(codeString))
085          return DISCOVERY;
086        if ("validation".equals(codeString))
087          return VALIDATION;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown EligibilityRequestPurpose code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case AUTHREQUIREMENTS: return "auth-requirements";
096            case BENEFITS: return "benefits";
097            case DISCOVERY: return "discovery";
098            case VALIDATION: return "validation";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case AUTHREQUIREMENTS: return "http://hl7.org/fhir/eligibilityrequest-purpose";
106            case BENEFITS: return "http://hl7.org/fhir/eligibilityrequest-purpose";
107            case DISCOVERY: return "http://hl7.org/fhir/eligibilityrequest-purpose";
108            case VALIDATION: return "http://hl7.org/fhir/eligibilityrequest-purpose";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            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.";
116            case BENEFITS: return "The plan benefits and optionally benefits consumed  for the listed, or discovered if specified, converages are requested.";
117            case DISCOVERY: return "The insurer is requested to report on any coverages which they are aware of in addition to any specifed.";
118            case VALIDATION: return "A check that the specified coverages are in-force is requested.";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case AUTHREQUIREMENTS: return "Coverage auth-requirements";
126            case BENEFITS: return "Coverage benefits";
127            case DISCOVERY: return "Coverage Discovery";
128            case VALIDATION: return "Coverage Validation";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class EligibilityRequestPurposeEnumFactory implements EnumFactory<EligibilityRequestPurpose> {
136    public EligibilityRequestPurpose fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("auth-requirements".equals(codeString))
141          return EligibilityRequestPurpose.AUTHREQUIREMENTS;
142        if ("benefits".equals(codeString))
143          return EligibilityRequestPurpose.BENEFITS;
144        if ("discovery".equals(codeString))
145          return EligibilityRequestPurpose.DISCOVERY;
146        if ("validation".equals(codeString))
147          return EligibilityRequestPurpose.VALIDATION;
148        throw new IllegalArgumentException("Unknown EligibilityRequestPurpose code '"+codeString+"'");
149        }
150        public Enumeration<EligibilityRequestPurpose> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<EligibilityRequestPurpose>(this, EligibilityRequestPurpose.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<EligibilityRequestPurpose>(this, EligibilityRequestPurpose.NULL, code);
158        if ("auth-requirements".equals(codeString))
159          return new Enumeration<EligibilityRequestPurpose>(this, EligibilityRequestPurpose.AUTHREQUIREMENTS, code);
160        if ("benefits".equals(codeString))
161          return new Enumeration<EligibilityRequestPurpose>(this, EligibilityRequestPurpose.BENEFITS, code);
162        if ("discovery".equals(codeString))
163          return new Enumeration<EligibilityRequestPurpose>(this, EligibilityRequestPurpose.DISCOVERY, code);
164        if ("validation".equals(codeString))
165          return new Enumeration<EligibilityRequestPurpose>(this, EligibilityRequestPurpose.VALIDATION, code);
166        throw new FHIRException("Unknown EligibilityRequestPurpose code '"+codeString+"'");
167        }
168    public String toCode(EligibilityRequestPurpose code) {
169      if (code == EligibilityRequestPurpose.AUTHREQUIREMENTS)
170        return "auth-requirements";
171      if (code == EligibilityRequestPurpose.BENEFITS)
172        return "benefits";
173      if (code == EligibilityRequestPurpose.DISCOVERY)
174        return "discovery";
175      if (code == EligibilityRequestPurpose.VALIDATION)
176        return "validation";
177      return "?";
178      }
179    public String toSystem(EligibilityRequestPurpose code) {
180      return code.getSystem();
181      }
182    }
183
184    @Block()
185    public static class CoverageEligibilityRequestEventComponent extends BackboneElement implements IBaseBackboneElement {
186        /**
187         * A coded event such as when a service is expected or a card printed.
188         */
189        @Child(name = "type", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false)
190        @Description(shortDefinition="Specific event", formalDefinition="A coded event such as when a service is expected or a card printed." )
191        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/datestype")
192        protected CodeableConcept type;
193
194        /**
195         * A date or period in the past or future indicating when the event occurred or is expectd to occur.
196         */
197        @Child(name = "when", type = {DateTimeType.class, Period.class}, order=2, min=1, max=1, modifier=false, summary=false)
198        @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." )
199        protected DataType when;
200
201        private static final long serialVersionUID = -634897375L;
202
203    /**
204     * Constructor
205     */
206      public CoverageEligibilityRequestEventComponent() {
207        super();
208      }
209
210    /**
211     * Constructor
212     */
213      public CoverageEligibilityRequestEventComponent(CodeableConcept type, DataType when) {
214        super();
215        this.setType(type);
216        this.setWhen(when);
217      }
218
219        /**
220         * @return {@link #type} (A coded event such as when a service is expected or a card printed.)
221         */
222        public CodeableConcept getType() { 
223          if (this.type == null)
224            if (Configuration.errorOnAutoCreate())
225              throw new Error("Attempt to auto-create CoverageEligibilityRequestEventComponent.type");
226            else if (Configuration.doAutoCreate())
227              this.type = new CodeableConcept(); // cc
228          return this.type;
229        }
230
231        public boolean hasType() { 
232          return this.type != null && !this.type.isEmpty();
233        }
234
235        /**
236         * @param value {@link #type} (A coded event such as when a service is expected or a card printed.)
237         */
238        public CoverageEligibilityRequestEventComponent setType(CodeableConcept value) { 
239          this.type = value;
240          return this;
241        }
242
243        /**
244         * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
245         */
246        public DataType getWhen() { 
247          return this.when;
248        }
249
250        /**
251         * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
252         */
253        public DateTimeType getWhenDateTimeType() throws FHIRException { 
254          if (this.when == null)
255            this.when = new DateTimeType();
256          if (!(this.when instanceof DateTimeType))
257            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.when.getClass().getName()+" was encountered");
258          return (DateTimeType) this.when;
259        }
260
261        public boolean hasWhenDateTimeType() { 
262          return this != null && this.when instanceof DateTimeType;
263        }
264
265        /**
266         * @return {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
267         */
268        public Period getWhenPeriod() throws FHIRException { 
269          if (this.when == null)
270            this.when = new Period();
271          if (!(this.when instanceof Period))
272            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.when.getClass().getName()+" was encountered");
273          return (Period) this.when;
274        }
275
276        public boolean hasWhenPeriod() { 
277          return this != null && this.when instanceof Period;
278        }
279
280        public boolean hasWhen() { 
281          return this.when != null && !this.when.isEmpty();
282        }
283
284        /**
285         * @param value {@link #when} (A date or period in the past or future indicating when the event occurred or is expectd to occur.)
286         */
287        public CoverageEligibilityRequestEventComponent setWhen(DataType value) { 
288          if (value != null && !(value instanceof DateTimeType || value instanceof Period))
289            throw new FHIRException("Not the right type for CoverageEligibilityRequest.event.when[x]: "+value.fhirType());
290          this.when = value;
291          return this;
292        }
293
294        protected void listChildren(List<Property> children) {
295          super.listChildren(children);
296          children.add(new Property("type", "CodeableConcept", "A coded event such as when a service is expected or a card printed.", 0, 1, type));
297          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));
298        }
299
300        @Override
301        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
302          switch (_hash) {
303          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);
304          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);
305          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);
306          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);
307          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);
308          default: return super.getNamedProperty(_hash, _name, _checkValid);
309          }
310
311        }
312
313      @Override
314      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
315        switch (hash) {
316        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
317        case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // DataType
318        default: return super.getProperty(hash, name, checkValid);
319        }
320
321      }
322
323      @Override
324      public Base setProperty(int hash, String name, Base value) throws FHIRException {
325        switch (hash) {
326        case 3575610: // type
327          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
328          return value;
329        case 3648314: // when
330          this.when = TypeConvertor.castToType(value); // DataType
331          return value;
332        default: return super.setProperty(hash, name, value);
333        }
334
335      }
336
337      @Override
338      public Base setProperty(String name, Base value) throws FHIRException {
339        if (name.equals("type")) {
340          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
341        } else if (name.equals("when[x]")) {
342          this.when = TypeConvertor.castToType(value); // DataType
343        } else
344          return super.setProperty(name, value);
345        return value;
346      }
347
348      @Override
349      public Base makeProperty(int hash, String name) throws FHIRException {
350        switch (hash) {
351        case 3575610:  return getType();
352        case 1312831238:  return getWhen();
353        case 3648314:  return getWhen();
354        default: return super.makeProperty(hash, name);
355        }
356
357      }
358
359      @Override
360      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
361        switch (hash) {
362        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
363        case 3648314: /*when*/ return new String[] {"dateTime", "Period"};
364        default: return super.getTypesForProperty(hash, name);
365        }
366
367      }
368
369      @Override
370      public Base addChild(String name) throws FHIRException {
371        if (name.equals("type")) {
372          this.type = new CodeableConcept();
373          return this.type;
374        }
375        else if (name.equals("whenDateTime")) {
376          this.when = new DateTimeType();
377          return this.when;
378        }
379        else if (name.equals("whenPeriod")) {
380          this.when = new Period();
381          return this.when;
382        }
383        else
384          return super.addChild(name);
385      }
386
387      public CoverageEligibilityRequestEventComponent copy() {
388        CoverageEligibilityRequestEventComponent dst = new CoverageEligibilityRequestEventComponent();
389        copyValues(dst);
390        return dst;
391      }
392
393      public void copyValues(CoverageEligibilityRequestEventComponent dst) {
394        super.copyValues(dst);
395        dst.type = type == null ? null : type.copy();
396        dst.when = when == null ? null : when.copy();
397      }
398
399      @Override
400      public boolean equalsDeep(Base other_) {
401        if (!super.equalsDeep(other_))
402          return false;
403        if (!(other_ instanceof CoverageEligibilityRequestEventComponent))
404          return false;
405        CoverageEligibilityRequestEventComponent o = (CoverageEligibilityRequestEventComponent) other_;
406        return compareDeep(type, o.type, true) && compareDeep(when, o.when, true);
407      }
408
409      @Override
410      public boolean equalsShallow(Base other_) {
411        if (!super.equalsShallow(other_))
412          return false;
413        if (!(other_ instanceof CoverageEligibilityRequestEventComponent))
414          return false;
415        CoverageEligibilityRequestEventComponent o = (CoverageEligibilityRequestEventComponent) other_;
416        return true;
417      }
418
419      public boolean isEmpty() {
420        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, when);
421      }
422
423  public String fhirType() {
424    return "CoverageEligibilityRequest.event";
425
426  }
427
428  }
429
430    @Block()
431    public static class SupportingInformationComponent extends BackboneElement implements IBaseBackboneElement {
432        /**
433         * A number to uniquely identify supporting information entries.
434         */
435        @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=false)
436        @Description(shortDefinition="Information instance identifier", formalDefinition="A number to uniquely identify supporting information entries." )
437        protected PositiveIntType sequence;
438
439        /**
440         * Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.
441         */
442        @Child(name = "information", type = {Reference.class}, order=2, min=1, max=1, modifier=false, summary=false)
443        @Description(shortDefinition="Data to be provided", formalDefinition="Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data." )
444        protected Reference information;
445
446        /**
447         * The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.
448         */
449        @Child(name = "appliesToAll", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
450        @Description(shortDefinition="Applies to all items", formalDefinition="The supporting materials are applicable for all detail items, product/servce categories and specific billing codes." )
451        protected BooleanType appliesToAll;
452
453        private static final long serialVersionUID = -1430960090L;
454
455    /**
456     * Constructor
457     */
458      public SupportingInformationComponent() {
459        super();
460      }
461
462    /**
463     * Constructor
464     */
465      public SupportingInformationComponent(int sequence, Reference information) {
466        super();
467        this.setSequence(sequence);
468        this.setInformation(information);
469      }
470
471        /**
472         * @return {@link #sequence} (A number to uniquely identify supporting information entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
473         */
474        public PositiveIntType getSequenceElement() { 
475          if (this.sequence == null)
476            if (Configuration.errorOnAutoCreate())
477              throw new Error("Attempt to auto-create SupportingInformationComponent.sequence");
478            else if (Configuration.doAutoCreate())
479              this.sequence = new PositiveIntType(); // bb
480          return this.sequence;
481        }
482
483        public boolean hasSequenceElement() { 
484          return this.sequence != null && !this.sequence.isEmpty();
485        }
486
487        public boolean hasSequence() { 
488          return this.sequence != null && !this.sequence.isEmpty();
489        }
490
491        /**
492         * @param value {@link #sequence} (A number to uniquely identify supporting information entries.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value
493         */
494        public SupportingInformationComponent setSequenceElement(PositiveIntType value) { 
495          this.sequence = value;
496          return this;
497        }
498
499        /**
500         * @return A number to uniquely identify supporting information entries.
501         */
502        public int getSequence() { 
503          return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue();
504        }
505
506        /**
507         * @param value A number to uniquely identify supporting information entries.
508         */
509        public SupportingInformationComponent setSequence(int value) { 
510            if (this.sequence == null)
511              this.sequence = new PositiveIntType();
512            this.sequence.setValue(value);
513          return this;
514        }
515
516        /**
517         * @return {@link #information} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
518         */
519        public Reference getInformation() { 
520          if (this.information == null)
521            if (Configuration.errorOnAutoCreate())
522              throw new Error("Attempt to auto-create SupportingInformationComponent.information");
523            else if (Configuration.doAutoCreate())
524              this.information = new Reference(); // cc
525          return this.information;
526        }
527
528        public boolean hasInformation() { 
529          return this.information != null && !this.information.isEmpty();
530        }
531
532        /**
533         * @param value {@link #information} (Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.)
534         */
535        public SupportingInformationComponent setInformation(Reference value) { 
536          this.information = value;
537          return this;
538        }
539
540        /**
541         * @return {@link #appliesToAll} (The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.). This is the underlying object with id, value and extensions. The accessor "getAppliesToAll" gives direct access to the value
542         */
543        public BooleanType getAppliesToAllElement() { 
544          if (this.appliesToAll == null)
545            if (Configuration.errorOnAutoCreate())
546              throw new Error("Attempt to auto-create SupportingInformationComponent.appliesToAll");
547            else if (Configuration.doAutoCreate())
548              this.appliesToAll = new BooleanType(); // bb
549          return this.appliesToAll;
550        }
551
552        public boolean hasAppliesToAllElement() { 
553          return this.appliesToAll != null && !this.appliesToAll.isEmpty();
554        }
555
556        public boolean hasAppliesToAll() { 
557          return this.appliesToAll != null && !this.appliesToAll.isEmpty();
558        }
559
560        /**
561         * @param value {@link #appliesToAll} (The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.). This is the underlying object with id, value and extensions. The accessor "getAppliesToAll" gives direct access to the value
562         */
563        public SupportingInformationComponent setAppliesToAllElement(BooleanType value) { 
564          this.appliesToAll = value;
565          return this;
566        }
567
568        /**
569         * @return The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.
570         */
571        public boolean getAppliesToAll() { 
572          return this.appliesToAll == null || this.appliesToAll.isEmpty() ? false : this.appliesToAll.getValue();
573        }
574
575        /**
576         * @param value The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.
577         */
578        public SupportingInformationComponent setAppliesToAll(boolean value) { 
579            if (this.appliesToAll == null)
580              this.appliesToAll = new BooleanType();
581            this.appliesToAll.setValue(value);
582          return this;
583        }
584
585        protected void listChildren(List<Property> children) {
586          super.listChildren(children);
587          children.add(new Property("sequence", "positiveInt", "A number to uniquely identify supporting information entries.", 0, 1, sequence));
588          children.add(new Property("information", "Reference(Any)", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, information));
589          children.add(new Property("appliesToAll", "boolean", "The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.", 0, 1, appliesToAll));
590        }
591
592        @Override
593        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
594          switch (_hash) {
595          case 1349547969: /*sequence*/  return new Property("sequence", "positiveInt", "A number to uniquely identify supporting information entries.", 0, 1, sequence);
596          case 1968600364: /*information*/  return new Property("information", "Reference(Any)", "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", 0, 1, information);
597          case -1096846342: /*appliesToAll*/  return new Property("appliesToAll", "boolean", "The supporting materials are applicable for all detail items, product/servce categories and specific billing codes.", 0, 1, appliesToAll);
598          default: return super.getNamedProperty(_hash, _name, _checkValid);
599          }
600
601        }
602
603      @Override
604      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
605        switch (hash) {
606        case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType
607        case 1968600364: /*information*/ return this.information == null ? new Base[0] : new Base[] {this.information}; // Reference
608        case -1096846342: /*appliesToAll*/ return this.appliesToAll == null ? new Base[0] : new Base[] {this.appliesToAll}; // BooleanType
609        default: return super.getProperty(hash, name, checkValid);
610        }
611
612      }
613
614      @Override
615      public Base setProperty(int hash, String name, Base value) throws FHIRException {
616        switch (hash) {
617        case 1349547969: // sequence
618          this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
619          return value;
620        case 1968600364: // information
621          this.information = TypeConvertor.castToReference(value); // Reference
622          return value;
623        case -1096846342: // appliesToAll
624          this.appliesToAll = TypeConvertor.castToBoolean(value); // BooleanType
625          return value;
626        default: return super.setProperty(hash, name, value);
627        }
628
629      }
630
631      @Override
632      public Base setProperty(String name, Base value) throws FHIRException {
633        if (name.equals("sequence")) {
634          this.sequence = TypeConvertor.castToPositiveInt(value); // PositiveIntType
635        } else if (name.equals("information")) {
636          this.information = TypeConvertor.castToReference(value); // Reference
637        } else if (name.equals("appliesToAll")) {
638          this.appliesToAll = TypeConvertor.castToBoolean(value); // BooleanType
639        } else
640          return super.setProperty(name, value);
641        return value;
642      }
643
644      @Override
645      public Base makeProperty(int hash, String name) throws FHIRException {
646        switch (hash) {
647        case 1349547969:  return getSequenceElement();
648        case 1968600364:  return getInformation();
649        case -1096846342:  return getAppliesToAllElement();
650        default: return super.makeProperty(hash, name);
651        }
652
653      }
654
655      @Override
656      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
657        switch (hash) {
658        case 1349547969: /*sequence*/ return new String[] {"positiveInt"};
659        case 1968600364: /*information*/ return new String[] {"Reference"};
660        case -1096846342: /*appliesToAll*/ return new String[] {"boolean"};
661        default: return super.getTypesForProperty(hash, name);
662        }
663
664      }
665
666      @Override
667      public Base addChild(String name) throws FHIRException {
668        if (name.equals("sequence")) {
669          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.supportingInfo.sequence");
670        }
671        else if (name.equals("information")) {
672          this.information = new Reference();
673          return this.information;
674        }
675        else if (name.equals("appliesToAll")) {
676          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.supportingInfo.appliesToAll");
677        }
678        else
679          return super.addChild(name);
680      }
681
682      public SupportingInformationComponent copy() {
683        SupportingInformationComponent dst = new SupportingInformationComponent();
684        copyValues(dst);
685        return dst;
686      }
687
688      public void copyValues(SupportingInformationComponent dst) {
689        super.copyValues(dst);
690        dst.sequence = sequence == null ? null : sequence.copy();
691        dst.information = information == null ? null : information.copy();
692        dst.appliesToAll = appliesToAll == null ? null : appliesToAll.copy();
693      }
694
695      @Override
696      public boolean equalsDeep(Base other_) {
697        if (!super.equalsDeep(other_))
698          return false;
699        if (!(other_ instanceof SupportingInformationComponent))
700          return false;
701        SupportingInformationComponent o = (SupportingInformationComponent) other_;
702        return compareDeep(sequence, o.sequence, true) && compareDeep(information, o.information, true)
703           && compareDeep(appliesToAll, o.appliesToAll, true);
704      }
705
706      @Override
707      public boolean equalsShallow(Base other_) {
708        if (!super.equalsShallow(other_))
709          return false;
710        if (!(other_ instanceof SupportingInformationComponent))
711          return false;
712        SupportingInformationComponent o = (SupportingInformationComponent) other_;
713        return compareValues(sequence, o.sequence, true) && compareValues(appliesToAll, o.appliesToAll, true)
714          ;
715      }
716
717      public boolean isEmpty() {
718        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(sequence, information, appliesToAll
719          );
720      }
721
722  public String fhirType() {
723    return "CoverageEligibilityRequest.supportingInfo";
724
725  }
726
727  }
728
729    @Block()
730    public static class InsuranceComponent extends BackboneElement implements IBaseBackboneElement {
731        /**
732         * A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.
733         */
734        @Child(name = "focal", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false)
735        @Description(shortDefinition="Applicable coverage", formalDefinition="A flag to indicate that this Coverage is to be used for evaluation of this request when set to true." )
736        protected BooleanType focal;
737
738        /**
739         * 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.
740         */
741        @Child(name = "coverage", type = {Coverage.class}, order=2, min=1, max=1, modifier=false, summary=false)
742        @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." )
743        protected Reference coverage;
744
745        /**
746         * A business agreement number established between the provider and the insurer for special business processing purposes.
747         */
748        @Child(name = "businessArrangement", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
749        @Description(shortDefinition="Additional provider contract number", formalDefinition="A business agreement number established between the provider and the insurer for special business processing purposes." )
750        protected StringType businessArrangement;
751
752        private static final long serialVersionUID = -1656150261L;
753
754    /**
755     * Constructor
756     */
757      public InsuranceComponent() {
758        super();
759      }
760
761    /**
762     * Constructor
763     */
764      public InsuranceComponent(Reference coverage) {
765        super();
766        this.setCoverage(coverage);
767      }
768
769        /**
770         * @return {@link #focal} (A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value
771         */
772        public BooleanType getFocalElement() { 
773          if (this.focal == null)
774            if (Configuration.errorOnAutoCreate())
775              throw new Error("Attempt to auto-create InsuranceComponent.focal");
776            else if (Configuration.doAutoCreate())
777              this.focal = new BooleanType(); // bb
778          return this.focal;
779        }
780
781        public boolean hasFocalElement() { 
782          return this.focal != null && !this.focal.isEmpty();
783        }
784
785        public boolean hasFocal() { 
786          return this.focal != null && !this.focal.isEmpty();
787        }
788
789        /**
790         * @param value {@link #focal} (A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value
791         */
792        public InsuranceComponent setFocalElement(BooleanType value) { 
793          this.focal = value;
794          return this;
795        }
796
797        /**
798         * @return A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.
799         */
800        public boolean getFocal() { 
801          return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue();
802        }
803
804        /**
805         * @param value A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.
806         */
807        public InsuranceComponent setFocal(boolean value) { 
808            if (this.focal == null)
809              this.focal = new BooleanType();
810            this.focal.setValue(value);
811          return this;
812        }
813
814        /**
815         * @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.)
816         */
817        public Reference getCoverage() { 
818          if (this.coverage == null)
819            if (Configuration.errorOnAutoCreate())
820              throw new Error("Attempt to auto-create InsuranceComponent.coverage");
821            else if (Configuration.doAutoCreate())
822              this.coverage = new Reference(); // cc
823          return this.coverage;
824        }
825
826        public boolean hasCoverage() { 
827          return this.coverage != null && !this.coverage.isEmpty();
828        }
829
830        /**
831         * @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.)
832         */
833        public InsuranceComponent setCoverage(Reference value) { 
834          this.coverage = value;
835          return this;
836        }
837
838        /**
839         * @return {@link #businessArrangement} (A business agreement number established between the provider and the insurer for special business processing purposes.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value
840         */
841        public StringType getBusinessArrangementElement() { 
842          if (this.businessArrangement == null)
843            if (Configuration.errorOnAutoCreate())
844              throw new Error("Attempt to auto-create InsuranceComponent.businessArrangement");
845            else if (Configuration.doAutoCreate())
846              this.businessArrangement = new StringType(); // bb
847          return this.businessArrangement;
848        }
849
850        public boolean hasBusinessArrangementElement() { 
851          return this.businessArrangement != null && !this.businessArrangement.isEmpty();
852        }
853
854        public boolean hasBusinessArrangement() { 
855          return this.businessArrangement != null && !this.businessArrangement.isEmpty();
856        }
857
858        /**
859         * @param value {@link #businessArrangement} (A business agreement number established between the provider and the insurer for special business processing purposes.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value
860         */
861        public InsuranceComponent setBusinessArrangementElement(StringType value) { 
862          this.businessArrangement = value;
863          return this;
864        }
865
866        /**
867         * @return A business agreement number established between the provider and the insurer for special business processing purposes.
868         */
869        public String getBusinessArrangement() { 
870          return this.businessArrangement == null ? null : this.businessArrangement.getValue();
871        }
872
873        /**
874         * @param value A business agreement number established between the provider and the insurer for special business processing purposes.
875         */
876        public InsuranceComponent setBusinessArrangement(String value) { 
877          if (Utilities.noString(value))
878            this.businessArrangement = null;
879          else {
880            if (this.businessArrangement == null)
881              this.businessArrangement = new StringType();
882            this.businessArrangement.setValue(value);
883          }
884          return this;
885        }
886
887        protected void listChildren(List<Property> children) {
888          super.listChildren(children);
889          children.add(new Property("focal", "boolean", "A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.", 0, 1, focal));
890          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));
891          children.add(new Property("businessArrangement", "string", "A business agreement number established between the provider and the insurer for special business processing purposes.", 0, 1, businessArrangement));
892        }
893
894        @Override
895        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
896          switch (_hash) {
897          case 97604197: /*focal*/  return new Property("focal", "boolean", "A flag to indicate that this Coverage is to be used for evaluation of this request when set to true.", 0, 1, focal);
898          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);
899          case 259920682: /*businessArrangement*/  return new Property("businessArrangement", "string", "A business agreement number established between the provider and the insurer for special business processing purposes.", 0, 1, businessArrangement);
900          default: return super.getNamedProperty(_hash, _name, _checkValid);
901          }
902
903        }
904
905      @Override
906      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
907        switch (hash) {
908        case 97604197: /*focal*/ return this.focal == null ? new Base[0] : new Base[] {this.focal}; // BooleanType
909        case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Reference
910        case 259920682: /*businessArrangement*/ return this.businessArrangement == null ? new Base[0] : new Base[] {this.businessArrangement}; // StringType
911        default: return super.getProperty(hash, name, checkValid);
912        }
913
914      }
915
916      @Override
917      public Base setProperty(int hash, String name, Base value) throws FHIRException {
918        switch (hash) {
919        case 97604197: // focal
920          this.focal = TypeConvertor.castToBoolean(value); // BooleanType
921          return value;
922        case -351767064: // coverage
923          this.coverage = TypeConvertor.castToReference(value); // Reference
924          return value;
925        case 259920682: // businessArrangement
926          this.businessArrangement = TypeConvertor.castToString(value); // StringType
927          return value;
928        default: return super.setProperty(hash, name, value);
929        }
930
931      }
932
933      @Override
934      public Base setProperty(String name, Base value) throws FHIRException {
935        if (name.equals("focal")) {
936          this.focal = TypeConvertor.castToBoolean(value); // BooleanType
937        } else if (name.equals("coverage")) {
938          this.coverage = TypeConvertor.castToReference(value); // Reference
939        } else if (name.equals("businessArrangement")) {
940          this.businessArrangement = TypeConvertor.castToString(value); // StringType
941        } else
942          return super.setProperty(name, value);
943        return value;
944      }
945
946      @Override
947      public Base makeProperty(int hash, String name) throws FHIRException {
948        switch (hash) {
949        case 97604197:  return getFocalElement();
950        case -351767064:  return getCoverage();
951        case 259920682:  return getBusinessArrangementElement();
952        default: return super.makeProperty(hash, name);
953        }
954
955      }
956
957      @Override
958      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
959        switch (hash) {
960        case 97604197: /*focal*/ return new String[] {"boolean"};
961        case -351767064: /*coverage*/ return new String[] {"Reference"};
962        case 259920682: /*businessArrangement*/ return new String[] {"string"};
963        default: return super.getTypesForProperty(hash, name);
964        }
965
966      }
967
968      @Override
969      public Base addChild(String name) throws FHIRException {
970        if (name.equals("focal")) {
971          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.insurance.focal");
972        }
973        else if (name.equals("coverage")) {
974          this.coverage = new Reference();
975          return this.coverage;
976        }
977        else if (name.equals("businessArrangement")) {
978          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.insurance.businessArrangement");
979        }
980        else
981          return super.addChild(name);
982      }
983
984      public InsuranceComponent copy() {
985        InsuranceComponent dst = new InsuranceComponent();
986        copyValues(dst);
987        return dst;
988      }
989
990      public void copyValues(InsuranceComponent dst) {
991        super.copyValues(dst);
992        dst.focal = focal == null ? null : focal.copy();
993        dst.coverage = coverage == null ? null : coverage.copy();
994        dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy();
995      }
996
997      @Override
998      public boolean equalsDeep(Base other_) {
999        if (!super.equalsDeep(other_))
1000          return false;
1001        if (!(other_ instanceof InsuranceComponent))
1002          return false;
1003        InsuranceComponent o = (InsuranceComponent) other_;
1004        return compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) && compareDeep(businessArrangement, o.businessArrangement, true)
1005          ;
1006      }
1007
1008      @Override
1009      public boolean equalsShallow(Base other_) {
1010        if (!super.equalsShallow(other_))
1011          return false;
1012        if (!(other_ instanceof InsuranceComponent))
1013          return false;
1014        InsuranceComponent o = (InsuranceComponent) other_;
1015        return compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true)
1016          ;
1017      }
1018
1019      public boolean isEmpty() {
1020        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(focal, coverage, businessArrangement
1021          );
1022      }
1023
1024  public String fhirType() {
1025    return "CoverageEligibilityRequest.insurance";
1026
1027  }
1028
1029  }
1030
1031    @Block()
1032    public static class DetailsComponent extends BackboneElement implements IBaseBackboneElement {
1033        /**
1034         * Exceptions, special conditions and supporting information applicable for this service or product line.
1035         */
1036        @Child(name = "supportingInfoSequence", type = {PositiveIntType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1037        @Description(shortDefinition="Applicable exception or supporting information", formalDefinition="Exceptions, special conditions and supporting information applicable for this service or product line." )
1038        protected List<PositiveIntType> supportingInfoSequence;
1039
1040        /**
1041         * Code to identify the general type of benefits under which products and services are provided.
1042         */
1043        @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
1044        @Description(shortDefinition="Benefit classification", formalDefinition="Code to identify the general type of benefits under which products and services are provided." )
1045        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/ex-benefitcategory")
1046        protected CodeableConcept category;
1047
1048        /**
1049         * This contains the product, service, drug or other billing code for the item.
1050         */
1051        @Child(name = "productOrService", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
1052        @Description(shortDefinition="Billing, service, product, or drug code", formalDefinition="This contains the product, service, drug or other billing code for the item." )
1053        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/service-uscls")
1054        protected CodeableConcept productOrService;
1055
1056        /**
1057         * Item typification or modifiers codes to convey additional context for the product or service.
1058         */
1059        @Child(name = "modifier", type = {CodeableConcept.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1060        @Description(shortDefinition="Product or service billing modifiers", formalDefinition="Item typification or modifiers codes to convey additional context for the product or service." )
1061        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/claim-modifiers")
1062        protected List<CodeableConcept> modifier;
1063
1064        /**
1065         * The practitioner who is responsible for the product or service to be rendered to the patient.
1066         */
1067        @Child(name = "provider", type = {Practitioner.class, PractitionerRole.class}, order=5, min=0, max=1, modifier=false, summary=false)
1068        @Description(shortDefinition="Perfoming practitioner", formalDefinition="The practitioner who is responsible for the product or service to be rendered to the patient." )
1069        protected Reference provider;
1070
1071        /**
1072         * The number of repetitions of a service or product.
1073         */
1074        @Child(name = "quantity", type = {Quantity.class}, order=6, min=0, max=1, modifier=false, summary=false)
1075        @Description(shortDefinition="Count of products or services", formalDefinition="The number of repetitions of a service or product." )
1076        protected Quantity quantity;
1077
1078        /**
1079         * The amount charged to the patient by the provider for a single unit.
1080         */
1081        @Child(name = "unitPrice", type = {Money.class}, order=7, min=0, max=1, modifier=false, summary=false)
1082        @Description(shortDefinition="Fee, charge or cost per item", formalDefinition="The amount charged to the patient by the provider for a single unit." )
1083        protected Money unitPrice;
1084
1085        /**
1086         * Facility where the services will be provided.
1087         */
1088        @Child(name = "facility", type = {Location.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=false)
1089        @Description(shortDefinition="Servicing facility", formalDefinition="Facility where the services will be provided." )
1090        protected Reference facility;
1091
1092        /**
1093         * Patient diagnosis for which care is sought.
1094         */
1095        @Child(name = "diagnosis", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1096        @Description(shortDefinition="Applicable diagnosis", formalDefinition="Patient diagnosis for which care is sought." )
1097        protected List<DiagnosisComponent> diagnosis;
1098
1099        /**
1100         * The plan/proposal/order describing the proposed service in detail.
1101         */
1102        @Child(name = "detail", type = {Reference.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1103        @Description(shortDefinition="Product or service details", formalDefinition="The plan/proposal/order describing the proposed service in detail." )
1104        protected List<Reference> detail;
1105
1106        private static final long serialVersionUID = 1615052611L;
1107
1108    /**
1109     * Constructor
1110     */
1111      public DetailsComponent() {
1112        super();
1113      }
1114
1115        /**
1116         * @return {@link #supportingInfoSequence} (Exceptions, special conditions and supporting information applicable for this service or product line.)
1117         */
1118        public List<PositiveIntType> getSupportingInfoSequence() { 
1119          if (this.supportingInfoSequence == null)
1120            this.supportingInfoSequence = new ArrayList<PositiveIntType>();
1121          return this.supportingInfoSequence;
1122        }
1123
1124        /**
1125         * @return Returns a reference to <code>this</code> for easy method chaining
1126         */
1127        public DetailsComponent setSupportingInfoSequence(List<PositiveIntType> theSupportingInfoSequence) { 
1128          this.supportingInfoSequence = theSupportingInfoSequence;
1129          return this;
1130        }
1131
1132        public boolean hasSupportingInfoSequence() { 
1133          if (this.supportingInfoSequence == null)
1134            return false;
1135          for (PositiveIntType item : this.supportingInfoSequence)
1136            if (!item.isEmpty())
1137              return true;
1138          return false;
1139        }
1140
1141        /**
1142         * @return {@link #supportingInfoSequence} (Exceptions, special conditions and supporting information applicable for this service or product line.)
1143         */
1144        public PositiveIntType addSupportingInfoSequenceElement() {//2 
1145          PositiveIntType t = new PositiveIntType();
1146          if (this.supportingInfoSequence == null)
1147            this.supportingInfoSequence = new ArrayList<PositiveIntType>();
1148          this.supportingInfoSequence.add(t);
1149          return t;
1150        }
1151
1152        /**
1153         * @param value {@link #supportingInfoSequence} (Exceptions, special conditions and supporting information applicable for this service or product line.)
1154         */
1155        public DetailsComponent addSupportingInfoSequence(int value) { //1
1156          PositiveIntType t = new PositiveIntType();
1157          t.setValue(value);
1158          if (this.supportingInfoSequence == null)
1159            this.supportingInfoSequence = new ArrayList<PositiveIntType>();
1160          this.supportingInfoSequence.add(t);
1161          return this;
1162        }
1163
1164        /**
1165         * @param value {@link #supportingInfoSequence} (Exceptions, special conditions and supporting information applicable for this service or product line.)
1166         */
1167        public boolean hasSupportingInfoSequence(int value) { 
1168          if (this.supportingInfoSequence == null)
1169            return false;
1170          for (PositiveIntType v : this.supportingInfoSequence)
1171            if (v.getValue().equals(value)) // positiveInt
1172              return true;
1173          return false;
1174        }
1175
1176        /**
1177         * @return {@link #category} (Code to identify the general type of benefits under which products and services are provided.)
1178         */
1179        public CodeableConcept getCategory() { 
1180          if (this.category == null)
1181            if (Configuration.errorOnAutoCreate())
1182              throw new Error("Attempt to auto-create DetailsComponent.category");
1183            else if (Configuration.doAutoCreate())
1184              this.category = new CodeableConcept(); // cc
1185          return this.category;
1186        }
1187
1188        public boolean hasCategory() { 
1189          return this.category != null && !this.category.isEmpty();
1190        }
1191
1192        /**
1193         * @param value {@link #category} (Code to identify the general type of benefits under which products and services are provided.)
1194         */
1195        public DetailsComponent setCategory(CodeableConcept value) { 
1196          this.category = value;
1197          return this;
1198        }
1199
1200        /**
1201         * @return {@link #productOrService} (This contains the product, service, drug or other billing code for the item.)
1202         */
1203        public CodeableConcept getProductOrService() { 
1204          if (this.productOrService == null)
1205            if (Configuration.errorOnAutoCreate())
1206              throw new Error("Attempt to auto-create DetailsComponent.productOrService");
1207            else if (Configuration.doAutoCreate())
1208              this.productOrService = new CodeableConcept(); // cc
1209          return this.productOrService;
1210        }
1211
1212        public boolean hasProductOrService() { 
1213          return this.productOrService != null && !this.productOrService.isEmpty();
1214        }
1215
1216        /**
1217         * @param value {@link #productOrService} (This contains the product, service, drug or other billing code for the item.)
1218         */
1219        public DetailsComponent setProductOrService(CodeableConcept value) { 
1220          this.productOrService = value;
1221          return this;
1222        }
1223
1224        /**
1225         * @return {@link #modifier} (Item typification or modifiers codes to convey additional context for the product or service.)
1226         */
1227        public List<CodeableConcept> getModifier() { 
1228          if (this.modifier == null)
1229            this.modifier = new ArrayList<CodeableConcept>();
1230          return this.modifier;
1231        }
1232
1233        /**
1234         * @return Returns a reference to <code>this</code> for easy method chaining
1235         */
1236        public DetailsComponent setModifier(List<CodeableConcept> theModifier) { 
1237          this.modifier = theModifier;
1238          return this;
1239        }
1240
1241        public boolean hasModifier() { 
1242          if (this.modifier == null)
1243            return false;
1244          for (CodeableConcept item : this.modifier)
1245            if (!item.isEmpty())
1246              return true;
1247          return false;
1248        }
1249
1250        public CodeableConcept addModifier() { //3
1251          CodeableConcept t = new CodeableConcept();
1252          if (this.modifier == null)
1253            this.modifier = new ArrayList<CodeableConcept>();
1254          this.modifier.add(t);
1255          return t;
1256        }
1257
1258        public DetailsComponent addModifier(CodeableConcept t) { //3
1259          if (t == null)
1260            return this;
1261          if (this.modifier == null)
1262            this.modifier = new ArrayList<CodeableConcept>();
1263          this.modifier.add(t);
1264          return this;
1265        }
1266
1267        /**
1268         * @return The first repetition of repeating field {@link #modifier}, creating it if it does not already exist {3}
1269         */
1270        public CodeableConcept getModifierFirstRep() { 
1271          if (getModifier().isEmpty()) {
1272            addModifier();
1273          }
1274          return getModifier().get(0);
1275        }
1276
1277        /**
1278         * @return {@link #provider} (The practitioner who is responsible for the product or service to be rendered to the patient.)
1279         */
1280        public Reference getProvider() { 
1281          if (this.provider == null)
1282            if (Configuration.errorOnAutoCreate())
1283              throw new Error("Attempt to auto-create DetailsComponent.provider");
1284            else if (Configuration.doAutoCreate())
1285              this.provider = new Reference(); // cc
1286          return this.provider;
1287        }
1288
1289        public boolean hasProvider() { 
1290          return this.provider != null && !this.provider.isEmpty();
1291        }
1292
1293        /**
1294         * @param value {@link #provider} (The practitioner who is responsible for the product or service to be rendered to the patient.)
1295         */
1296        public DetailsComponent setProvider(Reference value) { 
1297          this.provider = value;
1298          return this;
1299        }
1300
1301        /**
1302         * @return {@link #quantity} (The number of repetitions of a service or product.)
1303         */
1304        public Quantity getQuantity() { 
1305          if (this.quantity == null)
1306            if (Configuration.errorOnAutoCreate())
1307              throw new Error("Attempt to auto-create DetailsComponent.quantity");
1308            else if (Configuration.doAutoCreate())
1309              this.quantity = new Quantity(); // cc
1310          return this.quantity;
1311        }
1312
1313        public boolean hasQuantity() { 
1314          return this.quantity != null && !this.quantity.isEmpty();
1315        }
1316
1317        /**
1318         * @param value {@link #quantity} (The number of repetitions of a service or product.)
1319         */
1320        public DetailsComponent setQuantity(Quantity value) { 
1321          this.quantity = value;
1322          return this;
1323        }
1324
1325        /**
1326         * @return {@link #unitPrice} (The amount charged to the patient by the provider for a single unit.)
1327         */
1328        public Money getUnitPrice() { 
1329          if (this.unitPrice == null)
1330            if (Configuration.errorOnAutoCreate())
1331              throw new Error("Attempt to auto-create DetailsComponent.unitPrice");
1332            else if (Configuration.doAutoCreate())
1333              this.unitPrice = new Money(); // cc
1334          return this.unitPrice;
1335        }
1336
1337        public boolean hasUnitPrice() { 
1338          return this.unitPrice != null && !this.unitPrice.isEmpty();
1339        }
1340
1341        /**
1342         * @param value {@link #unitPrice} (The amount charged to the patient by the provider for a single unit.)
1343         */
1344        public DetailsComponent setUnitPrice(Money value) { 
1345          this.unitPrice = value;
1346          return this;
1347        }
1348
1349        /**
1350         * @return {@link #facility} (Facility where the services will be provided.)
1351         */
1352        public Reference getFacility() { 
1353          if (this.facility == null)
1354            if (Configuration.errorOnAutoCreate())
1355              throw new Error("Attempt to auto-create DetailsComponent.facility");
1356            else if (Configuration.doAutoCreate())
1357              this.facility = new Reference(); // cc
1358          return this.facility;
1359        }
1360
1361        public boolean hasFacility() { 
1362          return this.facility != null && !this.facility.isEmpty();
1363        }
1364
1365        /**
1366         * @param value {@link #facility} (Facility where the services will be provided.)
1367         */
1368        public DetailsComponent setFacility(Reference value) { 
1369          this.facility = value;
1370          return this;
1371        }
1372
1373        /**
1374         * @return {@link #diagnosis} (Patient diagnosis for which care is sought.)
1375         */
1376        public List<DiagnosisComponent> getDiagnosis() { 
1377          if (this.diagnosis == null)
1378            this.diagnosis = new ArrayList<DiagnosisComponent>();
1379          return this.diagnosis;
1380        }
1381
1382        /**
1383         * @return Returns a reference to <code>this</code> for easy method chaining
1384         */
1385        public DetailsComponent setDiagnosis(List<DiagnosisComponent> theDiagnosis) { 
1386          this.diagnosis = theDiagnosis;
1387          return this;
1388        }
1389
1390        public boolean hasDiagnosis() { 
1391          if (this.diagnosis == null)
1392            return false;
1393          for (DiagnosisComponent item : this.diagnosis)
1394            if (!item.isEmpty())
1395              return true;
1396          return false;
1397        }
1398
1399        public DiagnosisComponent addDiagnosis() { //3
1400          DiagnosisComponent t = new DiagnosisComponent();
1401          if (this.diagnosis == null)
1402            this.diagnosis = new ArrayList<DiagnosisComponent>();
1403          this.diagnosis.add(t);
1404          return t;
1405        }
1406
1407        public DetailsComponent addDiagnosis(DiagnosisComponent t) { //3
1408          if (t == null)
1409            return this;
1410          if (this.diagnosis == null)
1411            this.diagnosis = new ArrayList<DiagnosisComponent>();
1412          this.diagnosis.add(t);
1413          return this;
1414        }
1415
1416        /**
1417         * @return The first repetition of repeating field {@link #diagnosis}, creating it if it does not already exist {3}
1418         */
1419        public DiagnosisComponent getDiagnosisFirstRep() { 
1420          if (getDiagnosis().isEmpty()) {
1421            addDiagnosis();
1422          }
1423          return getDiagnosis().get(0);
1424        }
1425
1426        /**
1427         * @return {@link #detail} (The plan/proposal/order describing the proposed service in detail.)
1428         */
1429        public List<Reference> getDetail() { 
1430          if (this.detail == null)
1431            this.detail = new ArrayList<Reference>();
1432          return this.detail;
1433        }
1434
1435        /**
1436         * @return Returns a reference to <code>this</code> for easy method chaining
1437         */
1438        public DetailsComponent setDetail(List<Reference> theDetail) { 
1439          this.detail = theDetail;
1440          return this;
1441        }
1442
1443        public boolean hasDetail() { 
1444          if (this.detail == null)
1445            return false;
1446          for (Reference item : this.detail)
1447            if (!item.isEmpty())
1448              return true;
1449          return false;
1450        }
1451
1452        public Reference addDetail() { //3
1453          Reference t = new Reference();
1454          if (this.detail == null)
1455            this.detail = new ArrayList<Reference>();
1456          this.detail.add(t);
1457          return t;
1458        }
1459
1460        public DetailsComponent addDetail(Reference t) { //3
1461          if (t == null)
1462            return this;
1463          if (this.detail == null)
1464            this.detail = new ArrayList<Reference>();
1465          this.detail.add(t);
1466          return this;
1467        }
1468
1469        /**
1470         * @return The first repetition of repeating field {@link #detail}, creating it if it does not already exist {3}
1471         */
1472        public Reference getDetailFirstRep() { 
1473          if (getDetail().isEmpty()) {
1474            addDetail();
1475          }
1476          return getDetail().get(0);
1477        }
1478
1479        protected void listChildren(List<Property> children) {
1480          super.listChildren(children);
1481          children.add(new Property("supportingInfoSequence", "positiveInt", "Exceptions, special conditions and supporting information applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, supportingInfoSequence));
1482          children.add(new Property("category", "CodeableConcept", "Code to identify the general type of benefits under which products and services are provided.", 0, 1, category));
1483          children.add(new Property("productOrService", "CodeableConcept", "This contains the product, service, drug or other billing code for the item.", 0, 1, productOrService));
1484          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));
1485          children.add(new Property("provider", "Reference(Practitioner|PractitionerRole)", "The practitioner who is responsible for the product or service to be rendered to the patient.", 0, 1, provider));
1486          children.add(new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity));
1487          children.add(new Property("unitPrice", "Money", "The amount charged to the patient by the provider for a single unit.", 0, 1, unitPrice));
1488          children.add(new Property("facility", "Reference(Location|Organization)", "Facility where the services will be provided.", 0, 1, facility));
1489          children.add(new Property("diagnosis", "", "Patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis));
1490          children.add(new Property("detail", "Reference(Any)", "The plan/proposal/order describing the proposed service in detail.", 0, java.lang.Integer.MAX_VALUE, detail));
1491        }
1492
1493        @Override
1494        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1495          switch (_hash) {
1496          case -595860510: /*supportingInfoSequence*/  return new Property("supportingInfoSequence", "positiveInt", "Exceptions, special conditions and supporting information applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, supportingInfoSequence);
1497          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);
1498          case 1957227299: /*productOrService*/  return new Property("productOrService", "CodeableConcept", "This contains the product, service, drug or other billing code for the item.", 0, 1, productOrService);
1499          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);
1500          case -987494927: /*provider*/  return new Property("provider", "Reference(Practitioner|PractitionerRole)", "The practitioner who is responsible for the product or service to be rendered to the patient.", 0, 1, provider);
1501          case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "The number of repetitions of a service or product.", 0, 1, quantity);
1502          case -486196699: /*unitPrice*/  return new Property("unitPrice", "Money", "The amount charged to the patient by the provider for a single unit.", 0, 1, unitPrice);
1503          case 501116579: /*facility*/  return new Property("facility", "Reference(Location|Organization)", "Facility where the services will be provided.", 0, 1, facility);
1504          case 1196993265: /*diagnosis*/  return new Property("diagnosis", "", "Patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis);
1505          case -1335224239: /*detail*/  return new Property("detail", "Reference(Any)", "The plan/proposal/order describing the proposed service in detail.", 0, java.lang.Integer.MAX_VALUE, detail);
1506          default: return super.getNamedProperty(_hash, _name, _checkValid);
1507          }
1508
1509        }
1510
1511      @Override
1512      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1513        switch (hash) {
1514        case -595860510: /*supportingInfoSequence*/ return this.supportingInfoSequence == null ? new Base[0] : this.supportingInfoSequence.toArray(new Base[this.supportingInfoSequence.size()]); // PositiveIntType
1515        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
1516        case 1957227299: /*productOrService*/ return this.productOrService == null ? new Base[0] : new Base[] {this.productOrService}; // CodeableConcept
1517        case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // CodeableConcept
1518        case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference
1519        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
1520        case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money
1521        case 501116579: /*facility*/ return this.facility == null ? new Base[0] : new Base[] {this.facility}; // Reference
1522        case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // DiagnosisComponent
1523        case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // Reference
1524        default: return super.getProperty(hash, name, checkValid);
1525        }
1526
1527      }
1528
1529      @Override
1530      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1531        switch (hash) {
1532        case -595860510: // supportingInfoSequence
1533          this.getSupportingInfoSequence().add(TypeConvertor.castToPositiveInt(value)); // PositiveIntType
1534          return value;
1535        case 50511102: // category
1536          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1537          return value;
1538        case 1957227299: // productOrService
1539          this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1540          return value;
1541        case -615513385: // modifier
1542          this.getModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1543          return value;
1544        case -987494927: // provider
1545          this.provider = TypeConvertor.castToReference(value); // Reference
1546          return value;
1547        case -1285004149: // quantity
1548          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1549          return value;
1550        case -486196699: // unitPrice
1551          this.unitPrice = TypeConvertor.castToMoney(value); // Money
1552          return value;
1553        case 501116579: // facility
1554          this.facility = TypeConvertor.castToReference(value); // Reference
1555          return value;
1556        case 1196993265: // diagnosis
1557          this.getDiagnosis().add((DiagnosisComponent) value); // DiagnosisComponent
1558          return value;
1559        case -1335224239: // detail
1560          this.getDetail().add(TypeConvertor.castToReference(value)); // Reference
1561          return value;
1562        default: return super.setProperty(hash, name, value);
1563        }
1564
1565      }
1566
1567      @Override
1568      public Base setProperty(String name, Base value) throws FHIRException {
1569        if (name.equals("supportingInfoSequence")) {
1570          this.getSupportingInfoSequence().add(TypeConvertor.castToPositiveInt(value));
1571        } else if (name.equals("category")) {
1572          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1573        } else if (name.equals("productOrService")) {
1574          this.productOrService = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1575        } else if (name.equals("modifier")) {
1576          this.getModifier().add(TypeConvertor.castToCodeableConcept(value));
1577        } else if (name.equals("provider")) {
1578          this.provider = TypeConvertor.castToReference(value); // Reference
1579        } else if (name.equals("quantity")) {
1580          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1581        } else if (name.equals("unitPrice")) {
1582          this.unitPrice = TypeConvertor.castToMoney(value); // Money
1583        } else if (name.equals("facility")) {
1584          this.facility = TypeConvertor.castToReference(value); // Reference
1585        } else if (name.equals("diagnosis")) {
1586          this.getDiagnosis().add((DiagnosisComponent) value);
1587        } else if (name.equals("detail")) {
1588          this.getDetail().add(TypeConvertor.castToReference(value));
1589        } else
1590          return super.setProperty(name, value);
1591        return value;
1592      }
1593
1594      @Override
1595      public Base makeProperty(int hash, String name) throws FHIRException {
1596        switch (hash) {
1597        case -595860510:  return addSupportingInfoSequenceElement();
1598        case 50511102:  return getCategory();
1599        case 1957227299:  return getProductOrService();
1600        case -615513385:  return addModifier(); 
1601        case -987494927:  return getProvider();
1602        case -1285004149:  return getQuantity();
1603        case -486196699:  return getUnitPrice();
1604        case 501116579:  return getFacility();
1605        case 1196993265:  return addDiagnosis(); 
1606        case -1335224239:  return addDetail(); 
1607        default: return super.makeProperty(hash, name);
1608        }
1609
1610      }
1611
1612      @Override
1613      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1614        switch (hash) {
1615        case -595860510: /*supportingInfoSequence*/ return new String[] {"positiveInt"};
1616        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1617        case 1957227299: /*productOrService*/ return new String[] {"CodeableConcept"};
1618        case -615513385: /*modifier*/ return new String[] {"CodeableConcept"};
1619        case -987494927: /*provider*/ return new String[] {"Reference"};
1620        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
1621        case -486196699: /*unitPrice*/ return new String[] {"Money"};
1622        case 501116579: /*facility*/ return new String[] {"Reference"};
1623        case 1196993265: /*diagnosis*/ return new String[] {};
1624        case -1335224239: /*detail*/ return new String[] {"Reference"};
1625        default: return super.getTypesForProperty(hash, name);
1626        }
1627
1628      }
1629
1630      @Override
1631      public Base addChild(String name) throws FHIRException {
1632        if (name.equals("supportingInfoSequence")) {
1633          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.item.supportingInfoSequence");
1634        }
1635        else if (name.equals("category")) {
1636          this.category = new CodeableConcept();
1637          return this.category;
1638        }
1639        else if (name.equals("productOrService")) {
1640          this.productOrService = new CodeableConcept();
1641          return this.productOrService;
1642        }
1643        else if (name.equals("modifier")) {
1644          return addModifier();
1645        }
1646        else if (name.equals("provider")) {
1647          this.provider = new Reference();
1648          return this.provider;
1649        }
1650        else if (name.equals("quantity")) {
1651          this.quantity = new Quantity();
1652          return this.quantity;
1653        }
1654        else if (name.equals("unitPrice")) {
1655          this.unitPrice = new Money();
1656          return this.unitPrice;
1657        }
1658        else if (name.equals("facility")) {
1659          this.facility = new Reference();
1660          return this.facility;
1661        }
1662        else if (name.equals("diagnosis")) {
1663          return addDiagnosis();
1664        }
1665        else if (name.equals("detail")) {
1666          return addDetail();
1667        }
1668        else
1669          return super.addChild(name);
1670      }
1671
1672      public DetailsComponent copy() {
1673        DetailsComponent dst = new DetailsComponent();
1674        copyValues(dst);
1675        return dst;
1676      }
1677
1678      public void copyValues(DetailsComponent dst) {
1679        super.copyValues(dst);
1680        if (supportingInfoSequence != null) {
1681          dst.supportingInfoSequence = new ArrayList<PositiveIntType>();
1682          for (PositiveIntType i : supportingInfoSequence)
1683            dst.supportingInfoSequence.add(i.copy());
1684        };
1685        dst.category = category == null ? null : category.copy();
1686        dst.productOrService = productOrService == null ? null : productOrService.copy();
1687        if (modifier != null) {
1688          dst.modifier = new ArrayList<CodeableConcept>();
1689          for (CodeableConcept i : modifier)
1690            dst.modifier.add(i.copy());
1691        };
1692        dst.provider = provider == null ? null : provider.copy();
1693        dst.quantity = quantity == null ? null : quantity.copy();
1694        dst.unitPrice = unitPrice == null ? null : unitPrice.copy();
1695        dst.facility = facility == null ? null : facility.copy();
1696        if (diagnosis != null) {
1697          dst.diagnosis = new ArrayList<DiagnosisComponent>();
1698          for (DiagnosisComponent i : diagnosis)
1699            dst.diagnosis.add(i.copy());
1700        };
1701        if (detail != null) {
1702          dst.detail = new ArrayList<Reference>();
1703          for (Reference i : detail)
1704            dst.detail.add(i.copy());
1705        };
1706      }
1707
1708      @Override
1709      public boolean equalsDeep(Base other_) {
1710        if (!super.equalsDeep(other_))
1711          return false;
1712        if (!(other_ instanceof DetailsComponent))
1713          return false;
1714        DetailsComponent o = (DetailsComponent) other_;
1715        return compareDeep(supportingInfoSequence, o.supportingInfoSequence, true) && compareDeep(category, o.category, true)
1716           && compareDeep(productOrService, o.productOrService, true) && compareDeep(modifier, o.modifier, true)
1717           && compareDeep(provider, o.provider, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true)
1718           && compareDeep(facility, o.facility, true) && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(detail, o.detail, true)
1719          ;
1720      }
1721
1722      @Override
1723      public boolean equalsShallow(Base other_) {
1724        if (!super.equalsShallow(other_))
1725          return false;
1726        if (!(other_ instanceof DetailsComponent))
1727          return false;
1728        DetailsComponent o = (DetailsComponent) other_;
1729        return compareValues(supportingInfoSequence, o.supportingInfoSequence, true);
1730      }
1731
1732      public boolean isEmpty() {
1733        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(supportingInfoSequence, category
1734          , productOrService, modifier, provider, quantity, unitPrice, facility, diagnosis
1735          , detail);
1736      }
1737
1738  public String fhirType() {
1739    return "CoverageEligibilityRequest.item";
1740
1741  }
1742
1743  }
1744
1745    @Block()
1746    public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement {
1747        /**
1748         * The nature of illness or problem in a coded form or as a reference to an external defined Condition.
1749         */
1750        @Child(name = "diagnosis", type = {CodeableConcept.class, Condition.class}, order=1, min=0, max=1, modifier=false, summary=false)
1751        @Description(shortDefinition="Nature of illness or problem", formalDefinition="The nature of illness or problem in a coded form or as a reference to an external defined Condition." )
1752        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/icd-10")
1753        protected DataType diagnosis;
1754
1755        private static final long serialVersionUID = 947131409L;
1756
1757    /**
1758     * Constructor
1759     */
1760      public DiagnosisComponent() {
1761        super();
1762      }
1763
1764        /**
1765         * @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
1766         */
1767        public DataType getDiagnosis() { 
1768          return this.diagnosis;
1769        }
1770
1771        /**
1772         * @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
1773         */
1774        public CodeableConcept getDiagnosisCodeableConcept() throws FHIRException { 
1775          if (this.diagnosis == null)
1776            this.diagnosis = new CodeableConcept();
1777          if (!(this.diagnosis instanceof CodeableConcept))
1778            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.diagnosis.getClass().getName()+" was encountered");
1779          return (CodeableConcept) this.diagnosis;
1780        }
1781
1782        public boolean hasDiagnosisCodeableConcept() { 
1783          return this != null && this.diagnosis instanceof CodeableConcept;
1784        }
1785
1786        /**
1787         * @return {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
1788         */
1789        public Reference getDiagnosisReference() throws FHIRException { 
1790          if (this.diagnosis == null)
1791            this.diagnosis = new Reference();
1792          if (!(this.diagnosis instanceof Reference))
1793            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.diagnosis.getClass().getName()+" was encountered");
1794          return (Reference) this.diagnosis;
1795        }
1796
1797        public boolean hasDiagnosisReference() { 
1798          return this != null && this.diagnosis instanceof Reference;
1799        }
1800
1801        public boolean hasDiagnosis() { 
1802          return this.diagnosis != null && !this.diagnosis.isEmpty();
1803        }
1804
1805        /**
1806         * @param value {@link #diagnosis} (The nature of illness or problem in a coded form or as a reference to an external defined Condition.)
1807         */
1808        public DiagnosisComponent setDiagnosis(DataType value) { 
1809          if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
1810            throw new FHIRException("Not the right type for CoverageEligibilityRequest.item.diagnosis.diagnosis[x]: "+value.fhirType());
1811          this.diagnosis = value;
1812          return this;
1813        }
1814
1815        protected void listChildren(List<Property> children) {
1816          super.listChildren(children);
1817          children.add(new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis));
1818        }
1819
1820        @Override
1821        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1822          switch (_hash) {
1823          case -1487009809: /*diagnosis[x]*/  return new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
1824          case 1196993265: /*diagnosis*/  return new Property("diagnosis[x]", "CodeableConcept|Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
1825          case 277781616: /*diagnosisCodeableConcept*/  return new Property("diagnosis[x]", "CodeableConcept", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
1826          case 2050454362: /*diagnosisReference*/  return new Property("diagnosis[x]", "Reference(Condition)", "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", 0, 1, diagnosis);
1827          default: return super.getNamedProperty(_hash, _name, _checkValid);
1828          }
1829
1830        }
1831
1832      @Override
1833      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1834        switch (hash) {
1835        case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : new Base[] {this.diagnosis}; // DataType
1836        default: return super.getProperty(hash, name, checkValid);
1837        }
1838
1839      }
1840
1841      @Override
1842      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1843        switch (hash) {
1844        case 1196993265: // diagnosis
1845          this.diagnosis = TypeConvertor.castToType(value); // DataType
1846          return value;
1847        default: return super.setProperty(hash, name, value);
1848        }
1849
1850      }
1851
1852      @Override
1853      public Base setProperty(String name, Base value) throws FHIRException {
1854        if (name.equals("diagnosis[x]")) {
1855          this.diagnosis = TypeConvertor.castToType(value); // DataType
1856        } else
1857          return super.setProperty(name, value);
1858        return value;
1859      }
1860
1861      @Override
1862      public Base makeProperty(int hash, String name) throws FHIRException {
1863        switch (hash) {
1864        case -1487009809:  return getDiagnosis();
1865        case 1196993265:  return getDiagnosis();
1866        default: return super.makeProperty(hash, name);
1867        }
1868
1869      }
1870
1871      @Override
1872      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1873        switch (hash) {
1874        case 1196993265: /*diagnosis*/ return new String[] {"CodeableConcept", "Reference"};
1875        default: return super.getTypesForProperty(hash, name);
1876        }
1877
1878      }
1879
1880      @Override
1881      public Base addChild(String name) throws FHIRException {
1882        if (name.equals("diagnosisCodeableConcept")) {
1883          this.diagnosis = new CodeableConcept();
1884          return this.diagnosis;
1885        }
1886        else if (name.equals("diagnosisReference")) {
1887          this.diagnosis = new Reference();
1888          return this.diagnosis;
1889        }
1890        else
1891          return super.addChild(name);
1892      }
1893
1894      public DiagnosisComponent copy() {
1895        DiagnosisComponent dst = new DiagnosisComponent();
1896        copyValues(dst);
1897        return dst;
1898      }
1899
1900      public void copyValues(DiagnosisComponent dst) {
1901        super.copyValues(dst);
1902        dst.diagnosis = diagnosis == null ? null : diagnosis.copy();
1903      }
1904
1905      @Override
1906      public boolean equalsDeep(Base other_) {
1907        if (!super.equalsDeep(other_))
1908          return false;
1909        if (!(other_ instanceof DiagnosisComponent))
1910          return false;
1911        DiagnosisComponent o = (DiagnosisComponent) other_;
1912        return compareDeep(diagnosis, o.diagnosis, true);
1913      }
1914
1915      @Override
1916      public boolean equalsShallow(Base other_) {
1917        if (!super.equalsShallow(other_))
1918          return false;
1919        if (!(other_ instanceof DiagnosisComponent))
1920          return false;
1921        DiagnosisComponent o = (DiagnosisComponent) other_;
1922        return true;
1923      }
1924
1925      public boolean isEmpty() {
1926        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(diagnosis);
1927      }
1928
1929  public String fhirType() {
1930    return "CoverageEligibilityRequest.item.diagnosis";
1931
1932  }
1933
1934  }
1935
1936    /**
1937     * A unique identifier assigned to this coverage eligiblity request.
1938     */
1939    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1940    @Description(shortDefinition="Business Identifier for coverage eligiblity request", formalDefinition="A unique identifier assigned to this coverage eligiblity request." )
1941    protected List<Identifier> identifier;
1942
1943    /**
1944     * The status of the resource instance.
1945     */
1946    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
1947    @Description(shortDefinition="active | cancelled | draft | entered-in-error", formalDefinition="The status of the resource instance." )
1948    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fm-status")
1949    protected Enumeration<FinancialResourceStatusCodes> status;
1950
1951    /**
1952     * When the requestor expects the processor to complete processing.
1953     */
1954    @Child(name = "priority", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
1955    @Description(shortDefinition="Desired processing priority", formalDefinition="When the requestor expects the processor to complete processing." )
1956    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/process-priority")
1957    protected CodeableConcept priority;
1958
1959    /**
1960     * 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.
1961     */
1962    @Child(name = "purpose", type = {CodeType.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1963    @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." )
1964    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/eligibilityrequest-purpose")
1965    protected List<Enumeration<EligibilityRequestPurpose>> purpose;
1966
1967    /**
1968     * The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.
1969     */
1970    @Child(name = "patient", type = {Patient.class}, order=4, min=1, max=1, modifier=false, summary=true)
1971    @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." )
1972    protected Reference patient;
1973
1974    /**
1975     * Information code for an event with a corresponding date or period.
1976     */
1977    @Child(name = "event", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1978    @Description(shortDefinition="Event information", formalDefinition="Information code for an event with a corresponding date or period." )
1979    protected List<CoverageEligibilityRequestEventComponent> event;
1980
1981    /**
1982     * The date or dates when the enclosed suite of services were performed or completed.
1983     */
1984    @Child(name = "serviced", type = {DateType.class, Period.class}, order=6, min=0, max=1, modifier=false, summary=false)
1985    @Description(shortDefinition="Estimated date or dates of service", formalDefinition="The date or dates when the enclosed suite of services were performed or completed." )
1986    protected DataType serviced;
1987
1988    /**
1989     * The date when this resource was created.
1990     */
1991    @Child(name = "created", type = {DateTimeType.class}, order=7, min=1, max=1, modifier=false, summary=true)
1992    @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." )
1993    protected DateTimeType created;
1994
1995    /**
1996     * Person who created the request.
1997     */
1998    @Child(name = "enterer", type = {Practitioner.class, PractitionerRole.class}, order=8, min=0, max=1, modifier=false, summary=false)
1999    @Description(shortDefinition="Author", formalDefinition="Person who created the request." )
2000    protected Reference enterer;
2001
2002    /**
2003     * The provider which is responsible for the request.
2004     */
2005    @Child(name = "provider", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=false)
2006    @Description(shortDefinition="Party responsible for the request", formalDefinition="The provider which is responsible for the request." )
2007    protected Reference provider;
2008
2009    /**
2010     * The Insurer who issued the coverage in question and is the recipient of the request.
2011     */
2012    @Child(name = "insurer", type = {Organization.class}, order=10, min=1, max=1, modifier=false, summary=true)
2013    @Description(shortDefinition="Coverage issuer", formalDefinition="The Insurer who issued the coverage in question and is the recipient of the request." )
2014    protected Reference insurer;
2015
2016    /**
2017     * Facility where the services are intended to be provided.
2018     */
2019    @Child(name = "facility", type = {Location.class}, order=11, min=0, max=1, modifier=false, summary=false)
2020    @Description(shortDefinition="Servicing facility", formalDefinition="Facility where the services are intended to be provided." )
2021    protected Reference facility;
2022
2023    /**
2024     * Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.
2025     */
2026    @Child(name = "supportingInfo", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2027    @Description(shortDefinition="Supporting information", formalDefinition="Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues." )
2028    protected List<SupportingInformationComponent> supportingInfo;
2029
2030    /**
2031     * Financial instruments for reimbursement for the health care products and services.
2032     */
2033    @Child(name = "insurance", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2034    @Description(shortDefinition="Patient insurance information", formalDefinition="Financial instruments for reimbursement for the health care products and services." )
2035    protected List<InsuranceComponent> insurance;
2036
2037    /**
2038     * Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.
2039     */
2040    @Child(name = "item", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2041    @Description(shortDefinition="Item to be evaluated for eligibiity", formalDefinition="Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor." )
2042    protected List<DetailsComponent> item;
2043
2044    private static final long serialVersionUID = 2008965302L;
2045
2046  /**
2047   * Constructor
2048   */
2049    public CoverageEligibilityRequest() {
2050      super();
2051    }
2052
2053  /**
2054   * Constructor
2055   */
2056    public CoverageEligibilityRequest(FinancialResourceStatusCodes status, EligibilityRequestPurpose purpose, Reference patient, Date created, Reference insurer) {
2057      super();
2058      this.setStatus(status);
2059      this.addPurpose(purpose);
2060      this.setPatient(patient);
2061      this.setCreated(created);
2062      this.setInsurer(insurer);
2063    }
2064
2065    /**
2066     * @return {@link #identifier} (A unique identifier assigned to this coverage eligiblity request.)
2067     */
2068    public List<Identifier> getIdentifier() { 
2069      if (this.identifier == null)
2070        this.identifier = new ArrayList<Identifier>();
2071      return this.identifier;
2072    }
2073
2074    /**
2075     * @return Returns a reference to <code>this</code> for easy method chaining
2076     */
2077    public CoverageEligibilityRequest setIdentifier(List<Identifier> theIdentifier) { 
2078      this.identifier = theIdentifier;
2079      return this;
2080    }
2081
2082    public boolean hasIdentifier() { 
2083      if (this.identifier == null)
2084        return false;
2085      for (Identifier item : this.identifier)
2086        if (!item.isEmpty())
2087          return true;
2088      return false;
2089    }
2090
2091    public Identifier addIdentifier() { //3
2092      Identifier t = new Identifier();
2093      if (this.identifier == null)
2094        this.identifier = new ArrayList<Identifier>();
2095      this.identifier.add(t);
2096      return t;
2097    }
2098
2099    public CoverageEligibilityRequest addIdentifier(Identifier t) { //3
2100      if (t == null)
2101        return this;
2102      if (this.identifier == null)
2103        this.identifier = new ArrayList<Identifier>();
2104      this.identifier.add(t);
2105      return this;
2106    }
2107
2108    /**
2109     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
2110     */
2111    public Identifier getIdentifierFirstRep() { 
2112      if (getIdentifier().isEmpty()) {
2113        addIdentifier();
2114      }
2115      return getIdentifier().get(0);
2116    }
2117
2118    /**
2119     * @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
2120     */
2121    public Enumeration<FinancialResourceStatusCodes> getStatusElement() { 
2122      if (this.status == null)
2123        if (Configuration.errorOnAutoCreate())
2124          throw new Error("Attempt to auto-create CoverageEligibilityRequest.status");
2125        else if (Configuration.doAutoCreate())
2126          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory()); // bb
2127      return this.status;
2128    }
2129
2130    public boolean hasStatusElement() { 
2131      return this.status != null && !this.status.isEmpty();
2132    }
2133
2134    public boolean hasStatus() { 
2135      return this.status != null && !this.status.isEmpty();
2136    }
2137
2138    /**
2139     * @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
2140     */
2141    public CoverageEligibilityRequest setStatusElement(Enumeration<FinancialResourceStatusCodes> value) { 
2142      this.status = value;
2143      return this;
2144    }
2145
2146    /**
2147     * @return The status of the resource instance.
2148     */
2149    public FinancialResourceStatusCodes getStatus() { 
2150      return this.status == null ? null : this.status.getValue();
2151    }
2152
2153    /**
2154     * @param value The status of the resource instance.
2155     */
2156    public CoverageEligibilityRequest setStatus(FinancialResourceStatusCodes value) { 
2157        if (this.status == null)
2158          this.status = new Enumeration<FinancialResourceStatusCodes>(new FinancialResourceStatusCodesEnumFactory());
2159        this.status.setValue(value);
2160      return this;
2161    }
2162
2163    /**
2164     * @return {@link #priority} (When the requestor expects the processor to complete processing.)
2165     */
2166    public CodeableConcept getPriority() { 
2167      if (this.priority == null)
2168        if (Configuration.errorOnAutoCreate())
2169          throw new Error("Attempt to auto-create CoverageEligibilityRequest.priority");
2170        else if (Configuration.doAutoCreate())
2171          this.priority = new CodeableConcept(); // cc
2172      return this.priority;
2173    }
2174
2175    public boolean hasPriority() { 
2176      return this.priority != null && !this.priority.isEmpty();
2177    }
2178
2179    /**
2180     * @param value {@link #priority} (When the requestor expects the processor to complete processing.)
2181     */
2182    public CoverageEligibilityRequest setPriority(CodeableConcept value) { 
2183      this.priority = value;
2184      return this;
2185    }
2186
2187    /**
2188     * @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.)
2189     */
2190    public List<Enumeration<EligibilityRequestPurpose>> getPurpose() { 
2191      if (this.purpose == null)
2192        this.purpose = new ArrayList<Enumeration<EligibilityRequestPurpose>>();
2193      return this.purpose;
2194    }
2195
2196    /**
2197     * @return Returns a reference to <code>this</code> for easy method chaining
2198     */
2199    public CoverageEligibilityRequest setPurpose(List<Enumeration<EligibilityRequestPurpose>> thePurpose) { 
2200      this.purpose = thePurpose;
2201      return this;
2202    }
2203
2204    public boolean hasPurpose() { 
2205      if (this.purpose == null)
2206        return false;
2207      for (Enumeration<EligibilityRequestPurpose> item : this.purpose)
2208        if (!item.isEmpty())
2209          return true;
2210      return false;
2211    }
2212
2213    /**
2214     * @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.)
2215     */
2216    public Enumeration<EligibilityRequestPurpose> addPurposeElement() {//2 
2217      Enumeration<EligibilityRequestPurpose> t = new Enumeration<EligibilityRequestPurpose>(new EligibilityRequestPurposeEnumFactory());
2218      if (this.purpose == null)
2219        this.purpose = new ArrayList<Enumeration<EligibilityRequestPurpose>>();
2220      this.purpose.add(t);
2221      return t;
2222    }
2223
2224    /**
2225     * @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.)
2226     */
2227    public CoverageEligibilityRequest addPurpose(EligibilityRequestPurpose value) { //1
2228      Enumeration<EligibilityRequestPurpose> t = new Enumeration<EligibilityRequestPurpose>(new EligibilityRequestPurposeEnumFactory());
2229      t.setValue(value);
2230      if (this.purpose == null)
2231        this.purpose = new ArrayList<Enumeration<EligibilityRequestPurpose>>();
2232      this.purpose.add(t);
2233      return this;
2234    }
2235
2236    /**
2237     * @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.)
2238     */
2239    public boolean hasPurpose(EligibilityRequestPurpose value) { 
2240      if (this.purpose == null)
2241        return false;
2242      for (Enumeration<EligibilityRequestPurpose> v : this.purpose)
2243        if (v.getValue().equals(value)) // code
2244          return true;
2245      return false;
2246    }
2247
2248    /**
2249     * @return {@link #patient} (The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.)
2250     */
2251    public Reference getPatient() { 
2252      if (this.patient == null)
2253        if (Configuration.errorOnAutoCreate())
2254          throw new Error("Attempt to auto-create CoverageEligibilityRequest.patient");
2255        else if (Configuration.doAutoCreate())
2256          this.patient = new Reference(); // cc
2257      return this.patient;
2258    }
2259
2260    public boolean hasPatient() { 
2261      return this.patient != null && !this.patient.isEmpty();
2262    }
2263
2264    /**
2265     * @param value {@link #patient} (The party who is the beneficiary of the supplied coverage and for whom eligibility is sought.)
2266     */
2267    public CoverageEligibilityRequest setPatient(Reference value) { 
2268      this.patient = value;
2269      return this;
2270    }
2271
2272    /**
2273     * @return {@link #event} (Information code for an event with a corresponding date or period.)
2274     */
2275    public List<CoverageEligibilityRequestEventComponent> getEvent() { 
2276      if (this.event == null)
2277        this.event = new ArrayList<CoverageEligibilityRequestEventComponent>();
2278      return this.event;
2279    }
2280
2281    /**
2282     * @return Returns a reference to <code>this</code> for easy method chaining
2283     */
2284    public CoverageEligibilityRequest setEvent(List<CoverageEligibilityRequestEventComponent> theEvent) { 
2285      this.event = theEvent;
2286      return this;
2287    }
2288
2289    public boolean hasEvent() { 
2290      if (this.event == null)
2291        return false;
2292      for (CoverageEligibilityRequestEventComponent item : this.event)
2293        if (!item.isEmpty())
2294          return true;
2295      return false;
2296    }
2297
2298    public CoverageEligibilityRequestEventComponent addEvent() { //3
2299      CoverageEligibilityRequestEventComponent t = new CoverageEligibilityRequestEventComponent();
2300      if (this.event == null)
2301        this.event = new ArrayList<CoverageEligibilityRequestEventComponent>();
2302      this.event.add(t);
2303      return t;
2304    }
2305
2306    public CoverageEligibilityRequest addEvent(CoverageEligibilityRequestEventComponent t) { //3
2307      if (t == null)
2308        return this;
2309      if (this.event == null)
2310        this.event = new ArrayList<CoverageEligibilityRequestEventComponent>();
2311      this.event.add(t);
2312      return this;
2313    }
2314
2315    /**
2316     * @return The first repetition of repeating field {@link #event}, creating it if it does not already exist {3}
2317     */
2318    public CoverageEligibilityRequestEventComponent getEventFirstRep() { 
2319      if (getEvent().isEmpty()) {
2320        addEvent();
2321      }
2322      return getEvent().get(0);
2323    }
2324
2325    /**
2326     * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2327     */
2328    public DataType getServiced() { 
2329      return this.serviced;
2330    }
2331
2332    /**
2333     * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2334     */
2335    public DateType getServicedDateType() throws FHIRException { 
2336      if (this.serviced == null)
2337        this.serviced = new DateType();
2338      if (!(this.serviced instanceof DateType))
2339        throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.serviced.getClass().getName()+" was encountered");
2340      return (DateType) this.serviced;
2341    }
2342
2343    public boolean hasServicedDateType() { 
2344      return this != null && this.serviced instanceof DateType;
2345    }
2346
2347    /**
2348     * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2349     */
2350    public Period getServicedPeriod() throws FHIRException { 
2351      if (this.serviced == null)
2352        this.serviced = new Period();
2353      if (!(this.serviced instanceof Period))
2354        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.serviced.getClass().getName()+" was encountered");
2355      return (Period) this.serviced;
2356    }
2357
2358    public boolean hasServicedPeriod() { 
2359      return this != null && this.serviced instanceof Period;
2360    }
2361
2362    public boolean hasServiced() { 
2363      return this.serviced != null && !this.serviced.isEmpty();
2364    }
2365
2366    /**
2367     * @param value {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.)
2368     */
2369    public CoverageEligibilityRequest setServiced(DataType value) { 
2370      if (value != null && !(value instanceof DateType || value instanceof Period))
2371        throw new FHIRException("Not the right type for CoverageEligibilityRequest.serviced[x]: "+value.fhirType());
2372      this.serviced = value;
2373      return this;
2374    }
2375
2376    /**
2377     * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
2378     */
2379    public DateTimeType getCreatedElement() { 
2380      if (this.created == null)
2381        if (Configuration.errorOnAutoCreate())
2382          throw new Error("Attempt to auto-create CoverageEligibilityRequest.created");
2383        else if (Configuration.doAutoCreate())
2384          this.created = new DateTimeType(); // bb
2385      return this.created;
2386    }
2387
2388    public boolean hasCreatedElement() { 
2389      return this.created != null && !this.created.isEmpty();
2390    }
2391
2392    public boolean hasCreated() { 
2393      return this.created != null && !this.created.isEmpty();
2394    }
2395
2396    /**
2397     * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value
2398     */
2399    public CoverageEligibilityRequest setCreatedElement(DateTimeType value) { 
2400      this.created = value;
2401      return this;
2402    }
2403
2404    /**
2405     * @return The date when this resource was created.
2406     */
2407    public Date getCreated() { 
2408      return this.created == null ? null : this.created.getValue();
2409    }
2410
2411    /**
2412     * @param value The date when this resource was created.
2413     */
2414    public CoverageEligibilityRequest setCreated(Date value) { 
2415        if (this.created == null)
2416          this.created = new DateTimeType();
2417        this.created.setValue(value);
2418      return this;
2419    }
2420
2421    /**
2422     * @return {@link #enterer} (Person who created the request.)
2423     */
2424    public Reference getEnterer() { 
2425      if (this.enterer == null)
2426        if (Configuration.errorOnAutoCreate())
2427          throw new Error("Attempt to auto-create CoverageEligibilityRequest.enterer");
2428        else if (Configuration.doAutoCreate())
2429          this.enterer = new Reference(); // cc
2430      return this.enterer;
2431    }
2432
2433    public boolean hasEnterer() { 
2434      return this.enterer != null && !this.enterer.isEmpty();
2435    }
2436
2437    /**
2438     * @param value {@link #enterer} (Person who created the request.)
2439     */
2440    public CoverageEligibilityRequest setEnterer(Reference value) { 
2441      this.enterer = value;
2442      return this;
2443    }
2444
2445    /**
2446     * @return {@link #provider} (The provider which is responsible for the request.)
2447     */
2448    public Reference getProvider() { 
2449      if (this.provider == null)
2450        if (Configuration.errorOnAutoCreate())
2451          throw new Error("Attempt to auto-create CoverageEligibilityRequest.provider");
2452        else if (Configuration.doAutoCreate())
2453          this.provider = new Reference(); // cc
2454      return this.provider;
2455    }
2456
2457    public boolean hasProvider() { 
2458      return this.provider != null && !this.provider.isEmpty();
2459    }
2460
2461    /**
2462     * @param value {@link #provider} (The provider which is responsible for the request.)
2463     */
2464    public CoverageEligibilityRequest setProvider(Reference value) { 
2465      this.provider = value;
2466      return this;
2467    }
2468
2469    /**
2470     * @return {@link #insurer} (The Insurer who issued the coverage in question and is the recipient of the request.)
2471     */
2472    public Reference getInsurer() { 
2473      if (this.insurer == null)
2474        if (Configuration.errorOnAutoCreate())
2475          throw new Error("Attempt to auto-create CoverageEligibilityRequest.insurer");
2476        else if (Configuration.doAutoCreate())
2477          this.insurer = new Reference(); // cc
2478      return this.insurer;
2479    }
2480
2481    public boolean hasInsurer() { 
2482      return this.insurer != null && !this.insurer.isEmpty();
2483    }
2484
2485    /**
2486     * @param value {@link #insurer} (The Insurer who issued the coverage in question and is the recipient of the request.)
2487     */
2488    public CoverageEligibilityRequest setInsurer(Reference value) { 
2489      this.insurer = value;
2490      return this;
2491    }
2492
2493    /**
2494     * @return {@link #facility} (Facility where the services are intended to be provided.)
2495     */
2496    public Reference getFacility() { 
2497      if (this.facility == null)
2498        if (Configuration.errorOnAutoCreate())
2499          throw new Error("Attempt to auto-create CoverageEligibilityRequest.facility");
2500        else if (Configuration.doAutoCreate())
2501          this.facility = new Reference(); // cc
2502      return this.facility;
2503    }
2504
2505    public boolean hasFacility() { 
2506      return this.facility != null && !this.facility.isEmpty();
2507    }
2508
2509    /**
2510     * @param value {@link #facility} (Facility where the services are intended to be provided.)
2511     */
2512    public CoverageEligibilityRequest setFacility(Reference value) { 
2513      this.facility = value;
2514      return this;
2515    }
2516
2517    /**
2518     * @return {@link #supportingInfo} (Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.)
2519     */
2520    public List<SupportingInformationComponent> getSupportingInfo() { 
2521      if (this.supportingInfo == null)
2522        this.supportingInfo = new ArrayList<SupportingInformationComponent>();
2523      return this.supportingInfo;
2524    }
2525
2526    /**
2527     * @return Returns a reference to <code>this</code> for easy method chaining
2528     */
2529    public CoverageEligibilityRequest setSupportingInfo(List<SupportingInformationComponent> theSupportingInfo) { 
2530      this.supportingInfo = theSupportingInfo;
2531      return this;
2532    }
2533
2534    public boolean hasSupportingInfo() { 
2535      if (this.supportingInfo == null)
2536        return false;
2537      for (SupportingInformationComponent item : this.supportingInfo)
2538        if (!item.isEmpty())
2539          return true;
2540      return false;
2541    }
2542
2543    public SupportingInformationComponent addSupportingInfo() { //3
2544      SupportingInformationComponent t = new SupportingInformationComponent();
2545      if (this.supportingInfo == null)
2546        this.supportingInfo = new ArrayList<SupportingInformationComponent>();
2547      this.supportingInfo.add(t);
2548      return t;
2549    }
2550
2551    public CoverageEligibilityRequest addSupportingInfo(SupportingInformationComponent t) { //3
2552      if (t == null)
2553        return this;
2554      if (this.supportingInfo == null)
2555        this.supportingInfo = new ArrayList<SupportingInformationComponent>();
2556      this.supportingInfo.add(t);
2557      return this;
2558    }
2559
2560    /**
2561     * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist {3}
2562     */
2563    public SupportingInformationComponent getSupportingInfoFirstRep() { 
2564      if (getSupportingInfo().isEmpty()) {
2565        addSupportingInfo();
2566      }
2567      return getSupportingInfo().get(0);
2568    }
2569
2570    /**
2571     * @return {@link #insurance} (Financial instruments for reimbursement for the health care products and services.)
2572     */
2573    public List<InsuranceComponent> getInsurance() { 
2574      if (this.insurance == null)
2575        this.insurance = new ArrayList<InsuranceComponent>();
2576      return this.insurance;
2577    }
2578
2579    /**
2580     * @return Returns a reference to <code>this</code> for easy method chaining
2581     */
2582    public CoverageEligibilityRequest setInsurance(List<InsuranceComponent> theInsurance) { 
2583      this.insurance = theInsurance;
2584      return this;
2585    }
2586
2587    public boolean hasInsurance() { 
2588      if (this.insurance == null)
2589        return false;
2590      for (InsuranceComponent item : this.insurance)
2591        if (!item.isEmpty())
2592          return true;
2593      return false;
2594    }
2595
2596    public InsuranceComponent addInsurance() { //3
2597      InsuranceComponent t = new InsuranceComponent();
2598      if (this.insurance == null)
2599        this.insurance = new ArrayList<InsuranceComponent>();
2600      this.insurance.add(t);
2601      return t;
2602    }
2603
2604    public CoverageEligibilityRequest addInsurance(InsuranceComponent t) { //3
2605      if (t == null)
2606        return this;
2607      if (this.insurance == null)
2608        this.insurance = new ArrayList<InsuranceComponent>();
2609      this.insurance.add(t);
2610      return this;
2611    }
2612
2613    /**
2614     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist {3}
2615     */
2616    public InsuranceComponent getInsuranceFirstRep() { 
2617      if (getInsurance().isEmpty()) {
2618        addInsurance();
2619      }
2620      return getInsurance().get(0);
2621    }
2622
2623    /**
2624     * @return {@link #item} (Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.)
2625     */
2626    public List<DetailsComponent> getItem() { 
2627      if (this.item == null)
2628        this.item = new ArrayList<DetailsComponent>();
2629      return this.item;
2630    }
2631
2632    /**
2633     * @return Returns a reference to <code>this</code> for easy method chaining
2634     */
2635    public CoverageEligibilityRequest setItem(List<DetailsComponent> theItem) { 
2636      this.item = theItem;
2637      return this;
2638    }
2639
2640    public boolean hasItem() { 
2641      if (this.item == null)
2642        return false;
2643      for (DetailsComponent item : this.item)
2644        if (!item.isEmpty())
2645          return true;
2646      return false;
2647    }
2648
2649    public DetailsComponent addItem() { //3
2650      DetailsComponent t = new DetailsComponent();
2651      if (this.item == null)
2652        this.item = new ArrayList<DetailsComponent>();
2653      this.item.add(t);
2654      return t;
2655    }
2656
2657    public CoverageEligibilityRequest addItem(DetailsComponent t) { //3
2658      if (t == null)
2659        return this;
2660      if (this.item == null)
2661        this.item = new ArrayList<DetailsComponent>();
2662      this.item.add(t);
2663      return this;
2664    }
2665
2666    /**
2667     * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist {3}
2668     */
2669    public DetailsComponent getItemFirstRep() { 
2670      if (getItem().isEmpty()) {
2671        addItem();
2672      }
2673      return getItem().get(0);
2674    }
2675
2676      protected void listChildren(List<Property> children) {
2677        super.listChildren(children);
2678        children.add(new Property("identifier", "Identifier", "A unique identifier assigned to this coverage eligiblity request.", 0, java.lang.Integer.MAX_VALUE, identifier));
2679        children.add(new Property("status", "code", "The status of the resource instance.", 0, 1, status));
2680        children.add(new Property("priority", "CodeableConcept", "When the requestor expects the processor to complete processing.", 0, 1, priority));
2681        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));
2682        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));
2683        children.add(new Property("event", "", "Information code for an event with a corresponding date or period.", 0, java.lang.Integer.MAX_VALUE, event));
2684        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));
2685        children.add(new Property("created", "dateTime", "The date when this resource was created.", 0, 1, created));
2686        children.add(new Property("enterer", "Reference(Practitioner|PractitionerRole)", "Person who created the request.", 0, 1, enterer));
2687        children.add(new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The provider which is responsible for the request.", 0, 1, provider));
2688        children.add(new Property("insurer", "Reference(Organization)", "The Insurer who issued the coverage in question and is the recipient of the request.", 0, 1, insurer));
2689        children.add(new Property("facility", "Reference(Location)", "Facility where the services are intended to be provided.", 0, 1, facility));
2690        children.add(new Property("supportingInfo", "", "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", 0, java.lang.Integer.MAX_VALUE, supportingInfo));
2691        children.add(new Property("insurance", "", "Financial instruments for reimbursement for the health care products and services.", 0, java.lang.Integer.MAX_VALUE, insurance));
2692        children.add(new Property("item", "", "Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.", 0, java.lang.Integer.MAX_VALUE, item));
2693      }
2694
2695      @Override
2696      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2697        switch (_hash) {
2698        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A unique identifier assigned to this coverage eligiblity request.", 0, java.lang.Integer.MAX_VALUE, identifier);
2699        case -892481550: /*status*/  return new Property("status", "code", "The status of the resource instance.", 0, 1, status);
2700        case -1165461084: /*priority*/  return new Property("priority", "CodeableConcept", "When the requestor expects the processor to complete processing.", 0, 1, priority);
2701        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);
2702        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);
2703        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);
2704        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);
2705        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);
2706        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);
2707        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);
2708        case 1028554472: /*created*/  return new Property("created", "dateTime", "The date when this resource was created.", 0, 1, created);
2709        case -1591951995: /*enterer*/  return new Property("enterer", "Reference(Practitioner|PractitionerRole)", "Person who created the request.", 0, 1, enterer);
2710        case -987494927: /*provider*/  return new Property("provider", "Reference(Practitioner|PractitionerRole|Organization)", "The provider which is responsible for the request.", 0, 1, provider);
2711        case 1957615864: /*insurer*/  return new Property("insurer", "Reference(Organization)", "The Insurer who issued the coverage in question and is the recipient of the request.", 0, 1, insurer);
2712        case 501116579: /*facility*/  return new Property("facility", "Reference(Location)", "Facility where the services are intended to be provided.", 0, 1, facility);
2713        case 1922406657: /*supportingInfo*/  return new Property("supportingInfo", "", "Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.", 0, java.lang.Integer.MAX_VALUE, supportingInfo);
2714        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);
2715        case 3242771: /*item*/  return new Property("item", "", "Service categories or billable services for which benefit details and/or an authorization prior to service delivery may be required by the payor.", 0, java.lang.Integer.MAX_VALUE, item);
2716        default: return super.getNamedProperty(_hash, _name, _checkValid);
2717        }
2718
2719      }
2720
2721      @Override
2722      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2723        switch (hash) {
2724        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2725        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<FinancialResourceStatusCodes>
2726        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
2727        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : this.purpose.toArray(new Base[this.purpose.size()]); // Enumeration<EligibilityRequestPurpose>
2728        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
2729        case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // CoverageEligibilityRequestEventComponent
2730        case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // DataType
2731        case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType
2732        case -1591951995: /*enterer*/ return this.enterer == null ? new Base[0] : new Base[] {this.enterer}; // Reference
2733        case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Reference
2734        case 1957615864: /*insurer*/ return this.insurer == null ? new Base[0] : new Base[] {this.insurer}; // Reference
2735        case 501116579: /*facility*/ return this.facility == null ? new Base[0] : new Base[] {this.facility}; // Reference
2736        case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // SupportingInformationComponent
2737        case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // InsuranceComponent
2738        case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // DetailsComponent
2739        default: return super.getProperty(hash, name, checkValid);
2740        }
2741
2742      }
2743
2744      @Override
2745      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2746        switch (hash) {
2747        case -1618432855: // identifier
2748          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2749          return value;
2750        case -892481550: // status
2751          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
2752          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
2753          return value;
2754        case -1165461084: // priority
2755          this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2756          return value;
2757        case -220463842: // purpose
2758          value = new EligibilityRequestPurposeEnumFactory().fromType(TypeConvertor.castToCode(value));
2759          this.getPurpose().add((Enumeration) value); // Enumeration<EligibilityRequestPurpose>
2760          return value;
2761        case -791418107: // patient
2762          this.patient = TypeConvertor.castToReference(value); // Reference
2763          return value;
2764        case 96891546: // event
2765          this.getEvent().add((CoverageEligibilityRequestEventComponent) value); // CoverageEligibilityRequestEventComponent
2766          return value;
2767        case 1379209295: // serviced
2768          this.serviced = TypeConvertor.castToType(value); // DataType
2769          return value;
2770        case 1028554472: // created
2771          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
2772          return value;
2773        case -1591951995: // enterer
2774          this.enterer = TypeConvertor.castToReference(value); // Reference
2775          return value;
2776        case -987494927: // provider
2777          this.provider = TypeConvertor.castToReference(value); // Reference
2778          return value;
2779        case 1957615864: // insurer
2780          this.insurer = TypeConvertor.castToReference(value); // Reference
2781          return value;
2782        case 501116579: // facility
2783          this.facility = TypeConvertor.castToReference(value); // Reference
2784          return value;
2785        case 1922406657: // supportingInfo
2786          this.getSupportingInfo().add((SupportingInformationComponent) value); // SupportingInformationComponent
2787          return value;
2788        case 73049818: // insurance
2789          this.getInsurance().add((InsuranceComponent) value); // InsuranceComponent
2790          return value;
2791        case 3242771: // item
2792          this.getItem().add((DetailsComponent) value); // DetailsComponent
2793          return value;
2794        default: return super.setProperty(hash, name, value);
2795        }
2796
2797      }
2798
2799      @Override
2800      public Base setProperty(String name, Base value) throws FHIRException {
2801        if (name.equals("identifier")) {
2802          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2803        } else if (name.equals("status")) {
2804          value = new FinancialResourceStatusCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
2805          this.status = (Enumeration) value; // Enumeration<FinancialResourceStatusCodes>
2806        } else if (name.equals("priority")) {
2807          this.priority = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2808        } else if (name.equals("purpose")) {
2809          value = new EligibilityRequestPurposeEnumFactory().fromType(TypeConvertor.castToCode(value));
2810          this.getPurpose().add((Enumeration) value);
2811        } else if (name.equals("patient")) {
2812          this.patient = TypeConvertor.castToReference(value); // Reference
2813        } else if (name.equals("event")) {
2814          this.getEvent().add((CoverageEligibilityRequestEventComponent) value);
2815        } else if (name.equals("serviced[x]")) {
2816          this.serviced = TypeConvertor.castToType(value); // DataType
2817        } else if (name.equals("created")) {
2818          this.created = TypeConvertor.castToDateTime(value); // DateTimeType
2819        } else if (name.equals("enterer")) {
2820          this.enterer = TypeConvertor.castToReference(value); // Reference
2821        } else if (name.equals("provider")) {
2822          this.provider = TypeConvertor.castToReference(value); // Reference
2823        } else if (name.equals("insurer")) {
2824          this.insurer = TypeConvertor.castToReference(value); // Reference
2825        } else if (name.equals("facility")) {
2826          this.facility = TypeConvertor.castToReference(value); // Reference
2827        } else if (name.equals("supportingInfo")) {
2828          this.getSupportingInfo().add((SupportingInformationComponent) value);
2829        } else if (name.equals("insurance")) {
2830          this.getInsurance().add((InsuranceComponent) value);
2831        } else if (name.equals("item")) {
2832          this.getItem().add((DetailsComponent) value);
2833        } else
2834          return super.setProperty(name, value);
2835        return value;
2836      }
2837
2838      @Override
2839      public Base makeProperty(int hash, String name) throws FHIRException {
2840        switch (hash) {
2841        case -1618432855:  return addIdentifier(); 
2842        case -892481550:  return getStatusElement();
2843        case -1165461084:  return getPriority();
2844        case -220463842:  return addPurposeElement();
2845        case -791418107:  return getPatient();
2846        case 96891546:  return addEvent(); 
2847        case -1927922223:  return getServiced();
2848        case 1379209295:  return getServiced();
2849        case 1028554472:  return getCreatedElement();
2850        case -1591951995:  return getEnterer();
2851        case -987494927:  return getProvider();
2852        case 1957615864:  return getInsurer();
2853        case 501116579:  return getFacility();
2854        case 1922406657:  return addSupportingInfo(); 
2855        case 73049818:  return addInsurance(); 
2856        case 3242771:  return addItem(); 
2857        default: return super.makeProperty(hash, name);
2858        }
2859
2860      }
2861
2862      @Override
2863      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2864        switch (hash) {
2865        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2866        case -892481550: /*status*/ return new String[] {"code"};
2867        case -1165461084: /*priority*/ return new String[] {"CodeableConcept"};
2868        case -220463842: /*purpose*/ return new String[] {"code"};
2869        case -791418107: /*patient*/ return new String[] {"Reference"};
2870        case 96891546: /*event*/ return new String[] {};
2871        case 1379209295: /*serviced*/ return new String[] {"date", "Period"};
2872        case 1028554472: /*created*/ return new String[] {"dateTime"};
2873        case -1591951995: /*enterer*/ return new String[] {"Reference"};
2874        case -987494927: /*provider*/ return new String[] {"Reference"};
2875        case 1957615864: /*insurer*/ return new String[] {"Reference"};
2876        case 501116579: /*facility*/ return new String[] {"Reference"};
2877        case 1922406657: /*supportingInfo*/ return new String[] {};
2878        case 73049818: /*insurance*/ return new String[] {};
2879        case 3242771: /*item*/ return new String[] {};
2880        default: return super.getTypesForProperty(hash, name);
2881        }
2882
2883      }
2884
2885      @Override
2886      public Base addChild(String name) throws FHIRException {
2887        if (name.equals("identifier")) {
2888          return addIdentifier();
2889        }
2890        else if (name.equals("status")) {
2891          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.status");
2892        }
2893        else if (name.equals("priority")) {
2894          this.priority = new CodeableConcept();
2895          return this.priority;
2896        }
2897        else if (name.equals("purpose")) {
2898          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.purpose");
2899        }
2900        else if (name.equals("patient")) {
2901          this.patient = new Reference();
2902          return this.patient;
2903        }
2904        else if (name.equals("event")) {
2905          return addEvent();
2906        }
2907        else if (name.equals("servicedDate")) {
2908          this.serviced = new DateType();
2909          return this.serviced;
2910        }
2911        else if (name.equals("servicedPeriod")) {
2912          this.serviced = new Period();
2913          return this.serviced;
2914        }
2915        else if (name.equals("created")) {
2916          throw new FHIRException("Cannot call addChild on a singleton property CoverageEligibilityRequest.created");
2917        }
2918        else if (name.equals("enterer")) {
2919          this.enterer = new Reference();
2920          return this.enterer;
2921        }
2922        else if (name.equals("provider")) {
2923          this.provider = new Reference();
2924          return this.provider;
2925        }
2926        else if (name.equals("insurer")) {
2927          this.insurer = new Reference();
2928          return this.insurer;
2929        }
2930        else if (name.equals("facility")) {
2931          this.facility = new Reference();
2932          return this.facility;
2933        }
2934        else if (name.equals("supportingInfo")) {
2935          return addSupportingInfo();
2936        }
2937        else if (name.equals("insurance")) {
2938          return addInsurance();
2939        }
2940        else if (name.equals("item")) {
2941          return addItem();
2942        }
2943        else
2944          return super.addChild(name);
2945      }
2946
2947  public String fhirType() {
2948    return "CoverageEligibilityRequest";
2949
2950  }
2951
2952      public CoverageEligibilityRequest copy() {
2953        CoverageEligibilityRequest dst = new CoverageEligibilityRequest();
2954        copyValues(dst);
2955        return dst;
2956      }
2957
2958      public void copyValues(CoverageEligibilityRequest dst) {
2959        super.copyValues(dst);
2960        if (identifier != null) {
2961          dst.identifier = new ArrayList<Identifier>();
2962          for (Identifier i : identifier)
2963            dst.identifier.add(i.copy());
2964        };
2965        dst.status = status == null ? null : status.copy();
2966        dst.priority = priority == null ? null : priority.copy();
2967        if (purpose != null) {
2968          dst.purpose = new ArrayList<Enumeration<EligibilityRequestPurpose>>();
2969          for (Enumeration<EligibilityRequestPurpose> i : purpose)
2970            dst.purpose.add(i.copy());
2971        };
2972        dst.patient = patient == null ? null : patient.copy();
2973        if (event != null) {
2974          dst.event = new ArrayList<CoverageEligibilityRequestEventComponent>();
2975          for (CoverageEligibilityRequestEventComponent i : event)
2976            dst.event.add(i.copy());
2977        };
2978        dst.serviced = serviced == null ? null : serviced.copy();
2979        dst.created = created == null ? null : created.copy();
2980        dst.enterer = enterer == null ? null : enterer.copy();
2981        dst.provider = provider == null ? null : provider.copy();
2982        dst.insurer = insurer == null ? null : insurer.copy();
2983        dst.facility = facility == null ? null : facility.copy();
2984        if (supportingInfo != null) {
2985          dst.supportingInfo = new ArrayList<SupportingInformationComponent>();
2986          for (SupportingInformationComponent i : supportingInfo)
2987            dst.supportingInfo.add(i.copy());
2988        };
2989        if (insurance != null) {
2990          dst.insurance = new ArrayList<InsuranceComponent>();
2991          for (InsuranceComponent i : insurance)
2992            dst.insurance.add(i.copy());
2993        };
2994        if (item != null) {
2995          dst.item = new ArrayList<DetailsComponent>();
2996          for (DetailsComponent i : item)
2997            dst.item.add(i.copy());
2998        };
2999      }
3000
3001      protected CoverageEligibilityRequest typedCopy() {
3002        return copy();
3003      }
3004
3005      @Override
3006      public boolean equalsDeep(Base other_) {
3007        if (!super.equalsDeep(other_))
3008          return false;
3009        if (!(other_ instanceof CoverageEligibilityRequest))
3010          return false;
3011        CoverageEligibilityRequest o = (CoverageEligibilityRequest) other_;
3012        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(priority, o.priority, true)
3013           && compareDeep(purpose, o.purpose, true) && compareDeep(patient, o.patient, true) && compareDeep(event, o.event, true)
3014           && compareDeep(serviced, o.serviced, true) && compareDeep(created, o.created, true) && compareDeep(enterer, o.enterer, true)
3015           && compareDeep(provider, o.provider, true) && compareDeep(insurer, o.insurer, true) && compareDeep(facility, o.facility, true)
3016           && compareDeep(supportingInfo, o.supportingInfo, true) && compareDeep(insurance, o.insurance, true)
3017           && compareDeep(item, o.item, true);
3018      }
3019
3020      @Override
3021      public boolean equalsShallow(Base other_) {
3022        if (!super.equalsShallow(other_))
3023          return false;
3024        if (!(other_ instanceof CoverageEligibilityRequest))
3025          return false;
3026        CoverageEligibilityRequest o = (CoverageEligibilityRequest) other_;
3027        return compareValues(status, o.status, true) && compareValues(purpose, o.purpose, true) && compareValues(created, o.created, true)
3028          ;
3029      }
3030
3031      public boolean isEmpty() {
3032        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, priority
3033          , purpose, patient, event, serviced, created, enterer, provider, insurer, facility
3034          , supportingInfo, insurance, item);
3035      }
3036
3037  @Override
3038  public ResourceType getResourceType() {
3039    return ResourceType.CoverageEligibilityRequest;
3040   }
3041
3042 /**
3043   * Search parameter: <b>created</b>
3044   * <p>
3045   * Description: <b>The creation date for the EOB</b><br>
3046   * Type: <b>date</b><br>
3047   * Path: <b>CoverageEligibilityRequest.created</b><br>
3048   * </p>
3049   */
3050  @SearchParamDefinition(name="created", path="CoverageEligibilityRequest.created", description="The creation date for the EOB", type="date" )
3051  public static final String SP_CREATED = "created";
3052 /**
3053   * <b>Fluent Client</b> search parameter constant for <b>created</b>
3054   * <p>
3055   * Description: <b>The creation date for the EOB</b><br>
3056   * Type: <b>date</b><br>
3057   * Path: <b>CoverageEligibilityRequest.created</b><br>
3058   * </p>
3059   */
3060  public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED);
3061
3062 /**
3063   * Search parameter: <b>enterer</b>
3064   * <p>
3065   * Description: <b>The party who is responsible for the request</b><br>
3066   * Type: <b>reference</b><br>
3067   * Path: <b>CoverageEligibilityRequest.enterer</b><br>
3068   * </p>
3069   */
3070  @SearchParamDefinition(name="enterer", path="CoverageEligibilityRequest.enterer", description="The party who is responsible for the request", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class, PractitionerRole.class } )
3071  public static final String SP_ENTERER = "enterer";
3072 /**
3073   * <b>Fluent Client</b> search parameter constant for <b>enterer</b>
3074   * <p>
3075   * Description: <b>The party who is responsible for the request</b><br>
3076   * Type: <b>reference</b><br>
3077   * Path: <b>CoverageEligibilityRequest.enterer</b><br>
3078   * </p>
3079   */
3080  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENTERER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENTERER);
3081
3082/**
3083   * Constant for fluent queries to be used to add include statements. Specifies
3084   * the path value of "<b>CoverageEligibilityRequest:enterer</b>".
3085   */
3086  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENTERER = new ca.uhn.fhir.model.api.Include("CoverageEligibilityRequest:enterer").toLocked();
3087
3088 /**
3089   * Search parameter: <b>facility</b>
3090   * <p>
3091   * Description: <b>Facility responsible for the goods and services</b><br>
3092   * Type: <b>reference</b><br>
3093   * Path: <b>CoverageEligibilityRequest.facility</b><br>
3094   * </p>
3095   */
3096  @SearchParamDefinition(name="facility", path="CoverageEligibilityRequest.facility", description="Facility responsible for the goods and services", type="reference", target={Location.class } )
3097  public static final String SP_FACILITY = "facility";
3098 /**
3099   * <b>Fluent Client</b> search parameter constant for <b>facility</b>
3100   * <p>
3101   * Description: <b>Facility responsible for the goods and services</b><br>
3102   * Type: <b>reference</b><br>
3103   * Path: <b>CoverageEligibilityRequest.facility</b><br>
3104   * </p>
3105   */
3106  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITY);
3107
3108/**
3109   * Constant for fluent queries to be used to add include statements. Specifies
3110   * the path value of "<b>CoverageEligibilityRequest:facility</b>".
3111   */
3112  public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITY = new ca.uhn.fhir.model.api.Include("CoverageEligibilityRequest:facility").toLocked();
3113
3114 /**
3115   * Search parameter: <b>provider</b>
3116   * <p>
3117   * Description: <b>The reference to the provider</b><br>
3118   * Type: <b>reference</b><br>
3119   * Path: <b>CoverageEligibilityRequest.provider</b><br>
3120   * </p>
3121   */
3122  @SearchParamDefinition(name="provider", path="CoverageEligibilityRequest.provider", description="The reference to the 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 } )
3123  public static final String SP_PROVIDER = "provider";
3124 /**
3125   * <b>Fluent Client</b> search parameter constant for <b>provider</b>
3126   * <p>
3127   * Description: <b>The reference to the provider</b><br>
3128   * Type: <b>reference</b><br>
3129   * Path: <b>CoverageEligibilityRequest.provider</b><br>
3130   * </p>
3131   */
3132  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER);
3133
3134/**
3135   * Constant for fluent queries to be used to add include statements. Specifies
3136   * the path value of "<b>CoverageEligibilityRequest:provider</b>".
3137   */
3138  public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("CoverageEligibilityRequest:provider").toLocked();
3139
3140 /**
3141   * Search parameter: <b>status</b>
3142   * <p>
3143   * Description: <b>The status of the EligibilityRequest</b><br>
3144   * Type: <b>token</b><br>
3145   * Path: <b>CoverageEligibilityRequest.status</b><br>
3146   * </p>
3147   */
3148  @SearchParamDefinition(name="status", path="CoverageEligibilityRequest.status", description="The status of the EligibilityRequest", type="token" )
3149  public static final String SP_STATUS = "status";
3150 /**
3151   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3152   * <p>
3153   * Description: <b>The status of the EligibilityRequest</b><br>
3154   * Type: <b>token</b><br>
3155   * Path: <b>CoverageEligibilityRequest.status</b><br>
3156   * </p>
3157   */
3158  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3159
3160 /**
3161   * Search parameter: <b>identifier</b>
3162   * <p>
3163   * Description: <b>Multiple Resources: 
3164
3165* [Account](account.html): Account number
3166* [AdverseEvent](adverseevent.html): Business identifier for the event
3167* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3168* [Appointment](appointment.html): An Identifier of the Appointment
3169* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3170* [Basic](basic.html): Business identifier
3171* [BodyStructure](bodystructure.html): Bodystructure identifier
3172* [CarePlan](careplan.html): External Ids for this plan
3173* [CareTeam](careteam.html): External Ids for this team
3174* [ChargeItem](chargeitem.html): Business Identifier for item
3175* [Claim](claim.html): The primary identifier of the financial resource
3176* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3177* [ClinicalImpression](clinicalimpression.html): Business identifier
3178* [Communication](communication.html): Unique identifier
3179* [CommunicationRequest](communicationrequest.html): Unique identifier
3180* [Composition](composition.html): Version-independent identifier for the Composition
3181* [Condition](condition.html): A unique identifier of the condition record
3182* [Consent](consent.html): Identifier for this record (external references)
3183* [Contract](contract.html): The identity of the contract
3184* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3185* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3186* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3187* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3188* [DeviceRequest](devicerequest.html): Business identifier for request/order
3189* [DeviceUsage](deviceusage.html): Search by identifier
3190* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3191* [DocumentReference](documentreference.html): Identifier of the attachment binary
3192* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3193* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3194* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3195* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3196* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3197* [Flag](flag.html): Business identifier
3198* [Goal](goal.html): External Ids for this goal
3199* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3200* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3201* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3202* [Immunization](immunization.html): Business identifier
3203* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3204* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3205* [Invoice](invoice.html): Business Identifier for item
3206* [List](list.html): Business identifier
3207* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3208* [Medication](medication.html): Returns medications with this external identifier
3209* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3210* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3211* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3212* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3213* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3214* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3215* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3216* [Observation](observation.html): The unique id for a particular observation
3217* [Person](person.html): A person Identifier
3218* [Procedure](procedure.html): A unique identifier for a procedure
3219* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3220* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3221* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3222* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3223* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3224* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3225* [Specimen](specimen.html): The unique identifier associated with the specimen
3226* [SupplyDelivery](supplydelivery.html): External identifier
3227* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3228* [Task](task.html): Search for a task instance by its business identifier
3229* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3230</b><br>
3231   * Type: <b>token</b><br>
3232   * 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>
3233   * </p>
3234   */
3235  @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" )
3236  public static final String SP_IDENTIFIER = "identifier";
3237 /**
3238   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3239   * <p>
3240   * Description: <b>Multiple Resources: 
3241
3242* [Account](account.html): Account number
3243* [AdverseEvent](adverseevent.html): Business identifier for the event
3244* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3245* [Appointment](appointment.html): An Identifier of the Appointment
3246* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
3247* [Basic](basic.html): Business identifier
3248* [BodyStructure](bodystructure.html): Bodystructure identifier
3249* [CarePlan](careplan.html): External Ids for this plan
3250* [CareTeam](careteam.html): External Ids for this team
3251* [ChargeItem](chargeitem.html): Business Identifier for item
3252* [Claim](claim.html): The primary identifier of the financial resource
3253* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
3254* [ClinicalImpression](clinicalimpression.html): Business identifier
3255* [Communication](communication.html): Unique identifier
3256* [CommunicationRequest](communicationrequest.html): Unique identifier
3257* [Composition](composition.html): Version-independent identifier for the Composition
3258* [Condition](condition.html): A unique identifier of the condition record
3259* [Consent](consent.html): Identifier for this record (external references)
3260* [Contract](contract.html): The identity of the contract
3261* [Coverage](coverage.html): The primary identifier of the insured and the coverage
3262* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
3263* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
3264* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3265* [DeviceRequest](devicerequest.html): Business identifier for request/order
3266* [DeviceUsage](deviceusage.html): Search by identifier
3267* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3268* [DocumentReference](documentreference.html): Identifier of the attachment binary
3269* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3270* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
3271* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3272* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
3273* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3274* [Flag](flag.html): Business identifier
3275* [Goal](goal.html): External Ids for this goal
3276* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
3277* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
3278* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
3279* [Immunization](immunization.html): Business identifier
3280* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
3281* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
3282* [Invoice](invoice.html): Business Identifier for item
3283* [List](list.html): Business identifier
3284* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
3285* [Medication](medication.html): Returns medications with this external identifier
3286* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3287* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3288* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3289* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
3290* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
3291* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
3292* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3293* [Observation](observation.html): The unique id for a particular observation
3294* [Person](person.html): A person Identifier
3295* [Procedure](procedure.html): A unique identifier for a procedure
3296* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
3297* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
3298* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
3299* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
3300* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3301* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3302* [Specimen](specimen.html): The unique identifier associated with the specimen
3303* [SupplyDelivery](supplydelivery.html): External identifier
3304* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3305* [Task](task.html): Search for a task instance by its business identifier
3306* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3307</b><br>
3308   * Type: <b>token</b><br>
3309   * 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>
3310   * </p>
3311   */
3312  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3313
3314 /**
3315   * Search parameter: <b>patient</b>
3316   * <p>
3317   * Description: <b>Multiple Resources: 
3318
3319* [Account](account.html): The entity that caused the expenses
3320* [AdverseEvent](adverseevent.html): Subject impacted by event
3321* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3322* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3323* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3324* [AuditEvent](auditevent.html): Where the activity involved patient data
3325* [Basic](basic.html): Identifies the focus of this resource
3326* [BodyStructure](bodystructure.html): Who this is about
3327* [CarePlan](careplan.html): Who the care plan is for
3328* [CareTeam](careteam.html): Who care team is for
3329* [ChargeItem](chargeitem.html): Individual service was done for/to
3330* [Claim](claim.html): Patient receiving the products or services
3331* [ClaimResponse](claimresponse.html): The subject of care
3332* [ClinicalImpression](clinicalimpression.html): Patient assessed
3333* [Communication](communication.html): Focus of message
3334* [CommunicationRequest](communicationrequest.html): Focus of message
3335* [Composition](composition.html): Who and/or what the composition is about
3336* [Condition](condition.html): Who has the condition?
3337* [Consent](consent.html): Who the consent applies to
3338* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3339* [Coverage](coverage.html): Retrieve coverages for a patient
3340* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3341* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3342* [DetectedIssue](detectedissue.html): Associated patient
3343* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3344* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3345* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3346* [DocumentReference](documentreference.html): Who/what is the subject of the document
3347* [Encounter](encounter.html): The patient present at the encounter
3348* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3349* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3350* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3351* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3352* [Flag](flag.html): The identity of a subject to list flags for
3353* [Goal](goal.html): Who this goal is intended for
3354* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3355* [ImagingSelection](imagingselection.html): Who the study is about
3356* [ImagingStudy](imagingstudy.html): Who the study is about
3357* [Immunization](immunization.html): The patient for the vaccination record
3358* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3359* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3360* [Invoice](invoice.html): Recipient(s) of goods and services
3361* [List](list.html): If all resources have the same subject
3362* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3363* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3364* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3365* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3366* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3367* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3368* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3369* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3370* [Observation](observation.html): The subject that the observation is about (if patient)
3371* [Person](person.html): The Person links to this Patient
3372* [Procedure](procedure.html): Search by subject - a patient
3373* [Provenance](provenance.html): Where the activity involved patient data
3374* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3375* [RelatedPerson](relatedperson.html): The patient this related person is related to
3376* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3377* [ResearchSubject](researchsubject.html): Who or what is part of study
3378* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3379* [ServiceRequest](servicerequest.html): Search by subject - a patient
3380* [Specimen](specimen.html): The patient the specimen comes from
3381* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3382* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3383* [Task](task.html): Search by patient
3384* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3385</b><br>
3386   * Type: <b>reference</b><br>
3387   * 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>
3388   * </p>
3389   */
3390  @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 } )
3391  public static final String SP_PATIENT = "patient";
3392 /**
3393   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3394   * <p>
3395   * Description: <b>Multiple Resources: 
3396
3397* [Account](account.html): The entity that caused the expenses
3398* [AdverseEvent](adverseevent.html): Subject impacted by event
3399* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3400* [Appointment](appointment.html): One of the individuals of the appointment is this patient
3401* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
3402* [AuditEvent](auditevent.html): Where the activity involved patient data
3403* [Basic](basic.html): Identifies the focus of this resource
3404* [BodyStructure](bodystructure.html): Who this is about
3405* [CarePlan](careplan.html): Who the care plan is for
3406* [CareTeam](careteam.html): Who care team is for
3407* [ChargeItem](chargeitem.html): Individual service was done for/to
3408* [Claim](claim.html): Patient receiving the products or services
3409* [ClaimResponse](claimresponse.html): The subject of care
3410* [ClinicalImpression](clinicalimpression.html): Patient assessed
3411* [Communication](communication.html): Focus of message
3412* [CommunicationRequest](communicationrequest.html): Focus of message
3413* [Composition](composition.html): Who and/or what the composition is about
3414* [Condition](condition.html): Who has the condition?
3415* [Consent](consent.html): Who the consent applies to
3416* [Contract](contract.html): The identity of the subject of the contract (if a patient)
3417* [Coverage](coverage.html): Retrieve coverages for a patient
3418* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
3419* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
3420* [DetectedIssue](detectedissue.html): Associated patient
3421* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3422* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
3423* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3424* [DocumentReference](documentreference.html): Who/what is the subject of the document
3425* [Encounter](encounter.html): The patient present at the encounter
3426* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
3427* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3428* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
3429* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3430* [Flag](flag.html): The identity of a subject to list flags for
3431* [Goal](goal.html): Who this goal is intended for
3432* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
3433* [ImagingSelection](imagingselection.html): Who the study is about
3434* [ImagingStudy](imagingstudy.html): Who the study is about
3435* [Immunization](immunization.html): The patient for the vaccination record
3436* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
3437* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
3438* [Invoice](invoice.html): Recipient(s) of goods and services
3439* [List](list.html): If all resources have the same subject
3440* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
3441* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3442* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3443* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3444* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
3445* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
3446* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
3447* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
3448* [Observation](observation.html): The subject that the observation is about (if patient)
3449* [Person](person.html): The Person links to this Patient
3450* [Procedure](procedure.html): Search by subject - a patient
3451* [Provenance](provenance.html): Where the activity involved patient data
3452* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
3453* [RelatedPerson](relatedperson.html): The patient this related person is related to
3454* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
3455* [ResearchSubject](researchsubject.html): Who or what is part of study
3456* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3457* [ServiceRequest](servicerequest.html): Search by subject - a patient
3458* [Specimen](specimen.html): The patient the specimen comes from
3459* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3460* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
3461* [Task](task.html): Search by patient
3462* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3463</b><br>
3464   * Type: <b>reference</b><br>
3465   * 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>
3466   * </p>
3467   */
3468  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3469
3470/**
3471   * Constant for fluent queries to be used to add include statements. Specifies
3472   * the path value of "<b>CoverageEligibilityRequest:patient</b>".
3473   */
3474  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CoverageEligibilityRequest:patient").toLocked();
3475
3476
3477}
3478