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