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 * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.
052 */
053@ResourceDef(name="EpisodeOfCare", profile="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare")
054public class EpisodeOfCare extends DomainResource {
055
056    public enum EpisodeOfCareStatus {
057        /**
058         * This episode of care is planned to start at the date specified in the period.start. During this status, an organization may perform assessments to determine if the patient is eligible to receive services, or be organizing to make resources available to provide care services.
059         */
060        PLANNED, 
061        /**
062         * This episode has been placed on a waitlist, pending the episode being made active (or cancelled).
063         */
064        WAITLIST, 
065        /**
066         * This episode of care is current.
067         */
068        ACTIVE, 
069        /**
070         * This episode of care is on hold; the organization has limited responsibility for the patient (such as while on respite).
071         */
072        ONHOLD, 
073        /**
074         * This episode of care is finished and the organization is not expecting to be providing further care to the patient. Can also be known as \"closed\", \"completed\" or other similar terms.
075         */
076        FINISHED, 
077        /**
078         * The episode of care was cancelled, or withdrawn from service, often selected during the planned stage as the patient may have gone elsewhere, or the circumstances have changed and the organization is unable to provide the care. It indicates that services terminated outside the planned/expected workflow.
079         */
080        CANCELLED, 
081        /**
082         * This instance should not have been part of this patient's medical record.
083         */
084        ENTEREDINERROR, 
085        /**
086         * added to help the parsers with the generic types
087         */
088        NULL;
089        public static EpisodeOfCareStatus fromCode(String codeString) throws FHIRException {
090            if (codeString == null || "".equals(codeString))
091                return null;
092        if ("planned".equals(codeString))
093          return PLANNED;
094        if ("waitlist".equals(codeString))
095          return WAITLIST;
096        if ("active".equals(codeString))
097          return ACTIVE;
098        if ("onhold".equals(codeString))
099          return ONHOLD;
100        if ("finished".equals(codeString))
101          return FINISHED;
102        if ("cancelled".equals(codeString))
103          return CANCELLED;
104        if ("entered-in-error".equals(codeString))
105          return ENTEREDINERROR;
106        if (Configuration.isAcceptInvalidEnums())
107          return null;
108        else
109          throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'");
110        }
111        public String toCode() {
112          switch (this) {
113            case PLANNED: return "planned";
114            case WAITLIST: return "waitlist";
115            case ACTIVE: return "active";
116            case ONHOLD: return "onhold";
117            case FINISHED: return "finished";
118            case CANCELLED: return "cancelled";
119            case ENTEREDINERROR: return "entered-in-error";
120            case NULL: return null;
121            default: return "?";
122          }
123        }
124        public String getSystem() {
125          switch (this) {
126            case PLANNED: return "http://hl7.org/fhir/episode-of-care-status";
127            case WAITLIST: return "http://hl7.org/fhir/episode-of-care-status";
128            case ACTIVE: return "http://hl7.org/fhir/episode-of-care-status";
129            case ONHOLD: return "http://hl7.org/fhir/episode-of-care-status";
130            case FINISHED: return "http://hl7.org/fhir/episode-of-care-status";
131            case CANCELLED: return "http://hl7.org/fhir/episode-of-care-status";
132            case ENTEREDINERROR: return "http://hl7.org/fhir/episode-of-care-status";
133            case NULL: return null;
134            default: return "?";
135          }
136        }
137        public String getDefinition() {
138          switch (this) {
139            case PLANNED: return "This episode of care is planned to start at the date specified in the period.start. During this status, an organization may perform assessments to determine if the patient is eligible to receive services, or be organizing to make resources available to provide care services.";
140            case WAITLIST: return "This episode has been placed on a waitlist, pending the episode being made active (or cancelled).";
141            case ACTIVE: return "This episode of care is current.";
142            case ONHOLD: return "This episode of care is on hold; the organization has limited responsibility for the patient (such as while on respite).";
143            case FINISHED: return "This episode of care is finished and the organization is not expecting to be providing further care to the patient. Can also be known as \"closed\", \"completed\" or other similar terms.";
144            case CANCELLED: return "The episode of care was cancelled, or withdrawn from service, often selected during the planned stage as the patient may have gone elsewhere, or the circumstances have changed and the organization is unable to provide the care. It indicates that services terminated outside the planned/expected workflow.";
145            case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record.";
146            case NULL: return null;
147            default: return "?";
148          }
149        }
150        public String getDisplay() {
151          switch (this) {
152            case PLANNED: return "Planned";
153            case WAITLIST: return "Waitlist";
154            case ACTIVE: return "Active";
155            case ONHOLD: return "On Hold";
156            case FINISHED: return "Finished";
157            case CANCELLED: return "Cancelled";
158            case ENTEREDINERROR: return "Entered in Error";
159            case NULL: return null;
160            default: return "?";
161          }
162        }
163    }
164
165  public static class EpisodeOfCareStatusEnumFactory implements EnumFactory<EpisodeOfCareStatus> {
166    public EpisodeOfCareStatus fromCode(String codeString) throws IllegalArgumentException {
167      if (codeString == null || "".equals(codeString))
168            if (codeString == null || "".equals(codeString))
169                return null;
170        if ("planned".equals(codeString))
171          return EpisodeOfCareStatus.PLANNED;
172        if ("waitlist".equals(codeString))
173          return EpisodeOfCareStatus.WAITLIST;
174        if ("active".equals(codeString))
175          return EpisodeOfCareStatus.ACTIVE;
176        if ("onhold".equals(codeString))
177          return EpisodeOfCareStatus.ONHOLD;
178        if ("finished".equals(codeString))
179          return EpisodeOfCareStatus.FINISHED;
180        if ("cancelled".equals(codeString))
181          return EpisodeOfCareStatus.CANCELLED;
182        if ("entered-in-error".equals(codeString))
183          return EpisodeOfCareStatus.ENTEREDINERROR;
184        throw new IllegalArgumentException("Unknown EpisodeOfCareStatus code '"+codeString+"'");
185        }
186        public Enumeration<EpisodeOfCareStatus> fromType(PrimitiveType<?> code) throws FHIRException {
187          if (code == null)
188            return null;
189          if (code.isEmpty())
190            return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.NULL, code);
191          String codeString = ((PrimitiveType) code).asStringValue();
192          if (codeString == null || "".equals(codeString))
193            return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.NULL, code);
194        if ("planned".equals(codeString))
195          return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.PLANNED, code);
196        if ("waitlist".equals(codeString))
197          return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.WAITLIST, code);
198        if ("active".equals(codeString))
199          return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.ACTIVE, code);
200        if ("onhold".equals(codeString))
201          return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.ONHOLD, code);
202        if ("finished".equals(codeString))
203          return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.FINISHED, code);
204        if ("cancelled".equals(codeString))
205          return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.CANCELLED, code);
206        if ("entered-in-error".equals(codeString))
207          return new Enumeration<EpisodeOfCareStatus>(this, EpisodeOfCareStatus.ENTEREDINERROR, code);
208        throw new FHIRException("Unknown EpisodeOfCareStatus code '"+codeString+"'");
209        }
210    public String toCode(EpisodeOfCareStatus code) {
211      if (code == EpisodeOfCareStatus.PLANNED)
212        return "planned";
213      if (code == EpisodeOfCareStatus.WAITLIST)
214        return "waitlist";
215      if (code == EpisodeOfCareStatus.ACTIVE)
216        return "active";
217      if (code == EpisodeOfCareStatus.ONHOLD)
218        return "onhold";
219      if (code == EpisodeOfCareStatus.FINISHED)
220        return "finished";
221      if (code == EpisodeOfCareStatus.CANCELLED)
222        return "cancelled";
223      if (code == EpisodeOfCareStatus.ENTEREDINERROR)
224        return "entered-in-error";
225      return "?";
226      }
227    public String toSystem(EpisodeOfCareStatus code) {
228      return code.getSystem();
229      }
230    }
231
232    @Block()
233    public static class EpisodeOfCareStatusHistoryComponent extends BackboneElement implements IBaseBackboneElement {
234        /**
235         * planned | waitlist | active | onhold | finished | cancelled.
236         */
237        @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
238        @Description(shortDefinition="planned | waitlist | active | onhold | finished | cancelled | entered-in-error", formalDefinition="planned | waitlist | active | onhold | finished | cancelled." )
239        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/episode-of-care-status")
240        protected Enumeration<EpisodeOfCareStatus> status;
241
242        /**
243         * The period during this EpisodeOfCare that the specific status applied.
244         */
245        @Child(name = "period", type = {Period.class}, order=2, min=1, max=1, modifier=false, summary=false)
246        @Description(shortDefinition="Duration the EpisodeOfCare was in the specified status", formalDefinition="The period during this EpisodeOfCare that the specific status applied." )
247        protected Period period;
248
249        private static final long serialVersionUID = -1192432864L;
250
251    /**
252     * Constructor
253     */
254      public EpisodeOfCareStatusHistoryComponent() {
255        super();
256      }
257
258    /**
259     * Constructor
260     */
261      public EpisodeOfCareStatusHistoryComponent(EpisodeOfCareStatus status, Period period) {
262        super();
263        this.setStatus(status);
264        this.setPeriod(period);
265      }
266
267        /**
268         * @return {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
269         */
270        public Enumeration<EpisodeOfCareStatus> getStatusElement() { 
271          if (this.status == null)
272            if (Configuration.errorOnAutoCreate())
273              throw new Error("Attempt to auto-create EpisodeOfCareStatusHistoryComponent.status");
274            else if (Configuration.doAutoCreate())
275              this.status = new Enumeration<EpisodeOfCareStatus>(new EpisodeOfCareStatusEnumFactory()); // bb
276          return this.status;
277        }
278
279        public boolean hasStatusElement() { 
280          return this.status != null && !this.status.isEmpty();
281        }
282
283        public boolean hasStatus() { 
284          return this.status != null && !this.status.isEmpty();
285        }
286
287        /**
288         * @param value {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
289         */
290        public EpisodeOfCareStatusHistoryComponent setStatusElement(Enumeration<EpisodeOfCareStatus> value) { 
291          this.status = value;
292          return this;
293        }
294
295        /**
296         * @return planned | waitlist | active | onhold | finished | cancelled.
297         */
298        public EpisodeOfCareStatus getStatus() { 
299          return this.status == null ? null : this.status.getValue();
300        }
301
302        /**
303         * @param value planned | waitlist | active | onhold | finished | cancelled.
304         */
305        public EpisodeOfCareStatusHistoryComponent setStatus(EpisodeOfCareStatus value) { 
306            if (this.status == null)
307              this.status = new Enumeration<EpisodeOfCareStatus>(new EpisodeOfCareStatusEnumFactory());
308            this.status.setValue(value);
309          return this;
310        }
311
312        /**
313         * @return {@link #period} (The period during this EpisodeOfCare that the specific status applied.)
314         */
315        public Period getPeriod() { 
316          if (this.period == null)
317            if (Configuration.errorOnAutoCreate())
318              throw new Error("Attempt to auto-create EpisodeOfCareStatusHistoryComponent.period");
319            else if (Configuration.doAutoCreate())
320              this.period = new Period(); // cc
321          return this.period;
322        }
323
324        public boolean hasPeriod() { 
325          return this.period != null && !this.period.isEmpty();
326        }
327
328        /**
329         * @param value {@link #period} (The period during this EpisodeOfCare that the specific status applied.)
330         */
331        public EpisodeOfCareStatusHistoryComponent setPeriod(Period value) { 
332          this.period = value;
333          return this;
334        }
335
336        protected void listChildren(List<Property> children) {
337          super.listChildren(children);
338          children.add(new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, 1, status));
339          children.add(new Property("period", "Period", "The period during this EpisodeOfCare that the specific status applied.", 0, 1, period));
340        }
341
342        @Override
343        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
344          switch (_hash) {
345          case -892481550: /*status*/  return new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, 1, status);
346          case -991726143: /*period*/  return new Property("period", "Period", "The period during this EpisodeOfCare that the specific status applied.", 0, 1, period);
347          default: return super.getNamedProperty(_hash, _name, _checkValid);
348          }
349
350        }
351
352      @Override
353      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
354        switch (hash) {
355        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EpisodeOfCareStatus>
356        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
357        default: return super.getProperty(hash, name, checkValid);
358        }
359
360      }
361
362      @Override
363      public Base setProperty(int hash, String name, Base value) throws FHIRException {
364        switch (hash) {
365        case -892481550: // status
366          value = new EpisodeOfCareStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
367          this.status = (Enumeration) value; // Enumeration<EpisodeOfCareStatus>
368          return value;
369        case -991726143: // period
370          this.period = TypeConvertor.castToPeriod(value); // Period
371          return value;
372        default: return super.setProperty(hash, name, value);
373        }
374
375      }
376
377      @Override
378      public Base setProperty(String name, Base value) throws FHIRException {
379        if (name.equals("status")) {
380          value = new EpisodeOfCareStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
381          this.status = (Enumeration) value; // Enumeration<EpisodeOfCareStatus>
382        } else if (name.equals("period")) {
383          this.period = TypeConvertor.castToPeriod(value); // Period
384        } else
385          return super.setProperty(name, value);
386        return value;
387      }
388
389  @Override
390  public void removeChild(String name, Base value) throws FHIRException {
391        if (name.equals("status")) {
392          value = new EpisodeOfCareStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
393          this.status = (Enumeration) value; // Enumeration<EpisodeOfCareStatus>
394        } else if (name.equals("period")) {
395          this.period = null;
396        } else
397          super.removeChild(name, value);
398        
399      }
400
401      @Override
402      public Base makeProperty(int hash, String name) throws FHIRException {
403        switch (hash) {
404        case -892481550:  return getStatusElement();
405        case -991726143:  return getPeriod();
406        default: return super.makeProperty(hash, name);
407        }
408
409      }
410
411      @Override
412      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
413        switch (hash) {
414        case -892481550: /*status*/ return new String[] {"code"};
415        case -991726143: /*period*/ return new String[] {"Period"};
416        default: return super.getTypesForProperty(hash, name);
417        }
418
419      }
420
421      @Override
422      public Base addChild(String name) throws FHIRException {
423        if (name.equals("status")) {
424          throw new FHIRException("Cannot call addChild on a singleton property EpisodeOfCare.statusHistory.status");
425        }
426        else if (name.equals("period")) {
427          this.period = new Period();
428          return this.period;
429        }
430        else
431          return super.addChild(name);
432      }
433
434      public EpisodeOfCareStatusHistoryComponent copy() {
435        EpisodeOfCareStatusHistoryComponent dst = new EpisodeOfCareStatusHistoryComponent();
436        copyValues(dst);
437        return dst;
438      }
439
440      public void copyValues(EpisodeOfCareStatusHistoryComponent dst) {
441        super.copyValues(dst);
442        dst.status = status == null ? null : status.copy();
443        dst.period = period == null ? null : period.copy();
444      }
445
446      @Override
447      public boolean equalsDeep(Base other_) {
448        if (!super.equalsDeep(other_))
449          return false;
450        if (!(other_ instanceof EpisodeOfCareStatusHistoryComponent))
451          return false;
452        EpisodeOfCareStatusHistoryComponent o = (EpisodeOfCareStatusHistoryComponent) other_;
453        return compareDeep(status, o.status, true) && compareDeep(period, o.period, true);
454      }
455
456      @Override
457      public boolean equalsShallow(Base other_) {
458        if (!super.equalsShallow(other_))
459          return false;
460        if (!(other_ instanceof EpisodeOfCareStatusHistoryComponent))
461          return false;
462        EpisodeOfCareStatusHistoryComponent o = (EpisodeOfCareStatusHistoryComponent) other_;
463        return compareValues(status, o.status, true);
464      }
465
466      public boolean isEmpty() {
467        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, period);
468      }
469
470  public String fhirType() {
471    return "EpisodeOfCare.statusHistory";
472
473  }
474
475  }
476
477    @Block()
478    public static class ReasonComponent extends BackboneElement implements IBaseBackboneElement {
479        /**
480         * What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).
481         */
482        @Child(name = "use", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
483        @Description(shortDefinition="What the reason value should be used for/as", formalDefinition="What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening)." )
484        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason-use")
485        protected CodeableConcept use;
486
487        /**
488         * The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource.
489         */
490        @Child(name = "value", type = {CodeableReference.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
491        @Description(shortDefinition="Medical reason to be addressed", formalDefinition="The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource." )
492        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-reason")
493        protected List<CodeableReference> value;
494
495        private static final long serialVersionUID = 322767075L;
496
497    /**
498     * Constructor
499     */
500      public ReasonComponent() {
501        super();
502      }
503
504        /**
505         * @return {@link #use} (What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).)
506         */
507        public CodeableConcept getUse() { 
508          if (this.use == null)
509            if (Configuration.errorOnAutoCreate())
510              throw new Error("Attempt to auto-create ReasonComponent.use");
511            else if (Configuration.doAutoCreate())
512              this.use = new CodeableConcept(); // cc
513          return this.use;
514        }
515
516        public boolean hasUse() { 
517          return this.use != null && !this.use.isEmpty();
518        }
519
520        /**
521         * @param value {@link #use} (What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).)
522         */
523        public ReasonComponent setUse(CodeableConcept value) { 
524          this.use = value;
525          return this;
526        }
527
528        /**
529         * @return {@link #value} (The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource.)
530         */
531        public List<CodeableReference> getValue() { 
532          if (this.value == null)
533            this.value = new ArrayList<CodeableReference>();
534          return this.value;
535        }
536
537        /**
538         * @return Returns a reference to <code>this</code> for easy method chaining
539         */
540        public ReasonComponent setValue(List<CodeableReference> theValue) { 
541          this.value = theValue;
542          return this;
543        }
544
545        public boolean hasValue() { 
546          if (this.value == null)
547            return false;
548          for (CodeableReference item : this.value)
549            if (!item.isEmpty())
550              return true;
551          return false;
552        }
553
554        public CodeableReference addValue() { //3
555          CodeableReference t = new CodeableReference();
556          if (this.value == null)
557            this.value = new ArrayList<CodeableReference>();
558          this.value.add(t);
559          return t;
560        }
561
562        public ReasonComponent addValue(CodeableReference t) { //3
563          if (t == null)
564            return this;
565          if (this.value == null)
566            this.value = new ArrayList<CodeableReference>();
567          this.value.add(t);
568          return this;
569        }
570
571        /**
572         * @return The first repetition of repeating field {@link #value}, creating it if it does not already exist {3}
573         */
574        public CodeableReference getValueFirstRep() { 
575          if (getValue().isEmpty()) {
576            addValue();
577          }
578          return getValue().get(0);
579        }
580
581        protected void listChildren(List<Property> children) {
582          super.listChildren(children);
583          children.add(new Property("use", "CodeableConcept", "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).", 0, 1, use));
584          children.add(new Property("value", "CodeableReference(Condition|Procedure|Observation|HealthcareService)", "The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource.", 0, java.lang.Integer.MAX_VALUE, value));
585        }
586
587        @Override
588        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
589          switch (_hash) {
590          case 116103: /*use*/  return new Property("use", "CodeableConcept", "What the reason value should be used as e.g. Chief Complaint, Health Concern, Health Maintenance (including screening).", 0, 1, use);
591          case 111972721: /*value*/  return new Property("value", "CodeableReference(Condition|Procedure|Observation|HealthcareService)", "The medical reason that is expected to be addressed during the episode of care, expressed as a text, code or a reference to another resource.", 0, java.lang.Integer.MAX_VALUE, value);
592          default: return super.getNamedProperty(_hash, _name, _checkValid);
593          }
594
595        }
596
597      @Override
598      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
599        switch (hash) {
600        case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // CodeableConcept
601        case 111972721: /*value*/ return this.value == null ? new Base[0] : this.value.toArray(new Base[this.value.size()]); // CodeableReference
602        default: return super.getProperty(hash, name, checkValid);
603        }
604
605      }
606
607      @Override
608      public Base setProperty(int hash, String name, Base value) throws FHIRException {
609        switch (hash) {
610        case 116103: // use
611          this.use = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
612          return value;
613        case 111972721: // value
614          this.getValue().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
615          return value;
616        default: return super.setProperty(hash, name, value);
617        }
618
619      }
620
621      @Override
622      public Base setProperty(String name, Base value) throws FHIRException {
623        if (name.equals("use")) {
624          this.use = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
625        } else if (name.equals("value")) {
626          this.getValue().add(TypeConvertor.castToCodeableReference(value));
627        } else
628          return super.setProperty(name, value);
629        return value;
630      }
631
632  @Override
633  public void removeChild(String name, Base value) throws FHIRException {
634        if (name.equals("use")) {
635          this.use = null;
636        } else if (name.equals("value")) {
637          this.getValue().remove(value);
638        } else
639          super.removeChild(name, value);
640        
641      }
642
643      @Override
644      public Base makeProperty(int hash, String name) throws FHIRException {
645        switch (hash) {
646        case 116103:  return getUse();
647        case 111972721:  return addValue(); 
648        default: return super.makeProperty(hash, name);
649        }
650
651      }
652
653      @Override
654      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
655        switch (hash) {
656        case 116103: /*use*/ return new String[] {"CodeableConcept"};
657        case 111972721: /*value*/ return new String[] {"CodeableReference"};
658        default: return super.getTypesForProperty(hash, name);
659        }
660
661      }
662
663      @Override
664      public Base addChild(String name) throws FHIRException {
665        if (name.equals("use")) {
666          this.use = new CodeableConcept();
667          return this.use;
668        }
669        else if (name.equals("value")) {
670          return addValue();
671        }
672        else
673          return super.addChild(name);
674      }
675
676      public ReasonComponent copy() {
677        ReasonComponent dst = new ReasonComponent();
678        copyValues(dst);
679        return dst;
680      }
681
682      public void copyValues(ReasonComponent dst) {
683        super.copyValues(dst);
684        dst.use = use == null ? null : use.copy();
685        if (value != null) {
686          dst.value = new ArrayList<CodeableReference>();
687          for (CodeableReference i : value)
688            dst.value.add(i.copy());
689        };
690      }
691
692      @Override
693      public boolean equalsDeep(Base other_) {
694        if (!super.equalsDeep(other_))
695          return false;
696        if (!(other_ instanceof ReasonComponent))
697          return false;
698        ReasonComponent o = (ReasonComponent) other_;
699        return compareDeep(use, o.use, true) && compareDeep(value, o.value, true);
700      }
701
702      @Override
703      public boolean equalsShallow(Base other_) {
704        if (!super.equalsShallow(other_))
705          return false;
706        if (!(other_ instanceof ReasonComponent))
707          return false;
708        ReasonComponent o = (ReasonComponent) other_;
709        return true;
710      }
711
712      public boolean isEmpty() {
713        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(use, value);
714      }
715
716  public String fhirType() {
717    return "EpisodeOfCare.reason";
718
719  }
720
721  }
722
723    @Block()
724    public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement {
725        /**
726         * The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource.
727         */
728        @Child(name = "condition", type = {CodeableReference.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
729        @Description(shortDefinition="The medical condition that was addressed during the episode of care", formalDefinition="The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource." )
730        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
731        protected List<CodeableReference> condition;
732
733        /**
734         * Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge ?).
735         */
736        @Child(name = "use", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
737        @Description(shortDefinition="Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge ?)", formalDefinition="Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge ?)." )
738        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diagnosis-use")
739        protected CodeableConcept use;
740
741        private static final long serialVersionUID = -1997962887L;
742
743    /**
744     * Constructor
745     */
746      public DiagnosisComponent() {
747        super();
748      }
749
750        /**
751         * @return {@link #condition} (The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource.)
752         */
753        public List<CodeableReference> getCondition() { 
754          if (this.condition == null)
755            this.condition = new ArrayList<CodeableReference>();
756          return this.condition;
757        }
758
759        /**
760         * @return Returns a reference to <code>this</code> for easy method chaining
761         */
762        public DiagnosisComponent setCondition(List<CodeableReference> theCondition) { 
763          this.condition = theCondition;
764          return this;
765        }
766
767        public boolean hasCondition() { 
768          if (this.condition == null)
769            return false;
770          for (CodeableReference item : this.condition)
771            if (!item.isEmpty())
772              return true;
773          return false;
774        }
775
776        public CodeableReference addCondition() { //3
777          CodeableReference t = new CodeableReference();
778          if (this.condition == null)
779            this.condition = new ArrayList<CodeableReference>();
780          this.condition.add(t);
781          return t;
782        }
783
784        public DiagnosisComponent addCondition(CodeableReference t) { //3
785          if (t == null)
786            return this;
787          if (this.condition == null)
788            this.condition = new ArrayList<CodeableReference>();
789          this.condition.add(t);
790          return this;
791        }
792
793        /**
794         * @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist {3}
795         */
796        public CodeableReference getConditionFirstRep() { 
797          if (getCondition().isEmpty()) {
798            addCondition();
799          }
800          return getCondition().get(0);
801        }
802
803        /**
804         * @return {@link #use} (Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge ?).)
805         */
806        public CodeableConcept getUse() { 
807          if (this.use == null)
808            if (Configuration.errorOnAutoCreate())
809              throw new Error("Attempt to auto-create DiagnosisComponent.use");
810            else if (Configuration.doAutoCreate())
811              this.use = new CodeableConcept(); // cc
812          return this.use;
813        }
814
815        public boolean hasUse() { 
816          return this.use != null && !this.use.isEmpty();
817        }
818
819        /**
820         * @param value {@link #use} (Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge ?).)
821         */
822        public DiagnosisComponent setUse(CodeableConcept value) { 
823          this.use = value;
824          return this;
825        }
826
827        protected void listChildren(List<Property> children) {
828          super.listChildren(children);
829          children.add(new Property("condition", "CodeableReference(Condition)", "The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource.", 0, java.lang.Integer.MAX_VALUE, condition));
830          children.add(new Property("use", "CodeableConcept", "Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge ?).", 0, 1, use));
831        }
832
833        @Override
834        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
835          switch (_hash) {
836          case -861311717: /*condition*/  return new Property("condition", "CodeableReference(Condition)", "The medical condition that was addressed during the episode of care, expressed as a text, code or a reference to another resource.", 0, java.lang.Integer.MAX_VALUE, condition);
837          case 116103: /*use*/  return new Property("use", "CodeableConcept", "Role that this diagnosis has within the episode of care (e.g. admission, billing, discharge ?).", 0, 1, use);
838          default: return super.getNamedProperty(_hash, _name, _checkValid);
839          }
840
841        }
842
843      @Override
844      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
845        switch (hash) {
846        case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // CodeableReference
847        case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // CodeableConcept
848        default: return super.getProperty(hash, name, checkValid);
849        }
850
851      }
852
853      @Override
854      public Base setProperty(int hash, String name, Base value) throws FHIRException {
855        switch (hash) {
856        case -861311717: // condition
857          this.getCondition().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
858          return value;
859        case 116103: // use
860          this.use = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
861          return value;
862        default: return super.setProperty(hash, name, value);
863        }
864
865      }
866
867      @Override
868      public Base setProperty(String name, Base value) throws FHIRException {
869        if (name.equals("condition")) {
870          this.getCondition().add(TypeConvertor.castToCodeableReference(value));
871        } else if (name.equals("use")) {
872          this.use = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
873        } else
874          return super.setProperty(name, value);
875        return value;
876      }
877
878  @Override
879  public void removeChild(String name, Base value) throws FHIRException {
880        if (name.equals("condition")) {
881          this.getCondition().remove(value);
882        } else if (name.equals("use")) {
883          this.use = null;
884        } else
885          super.removeChild(name, value);
886        
887      }
888
889      @Override
890      public Base makeProperty(int hash, String name) throws FHIRException {
891        switch (hash) {
892        case -861311717:  return addCondition(); 
893        case 116103:  return getUse();
894        default: return super.makeProperty(hash, name);
895        }
896
897      }
898
899      @Override
900      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
901        switch (hash) {
902        case -861311717: /*condition*/ return new String[] {"CodeableReference"};
903        case 116103: /*use*/ return new String[] {"CodeableConcept"};
904        default: return super.getTypesForProperty(hash, name);
905        }
906
907      }
908
909      @Override
910      public Base addChild(String name) throws FHIRException {
911        if (name.equals("condition")) {
912          return addCondition();
913        }
914        else if (name.equals("use")) {
915          this.use = new CodeableConcept();
916          return this.use;
917        }
918        else
919          return super.addChild(name);
920      }
921
922      public DiagnosisComponent copy() {
923        DiagnosisComponent dst = new DiagnosisComponent();
924        copyValues(dst);
925        return dst;
926      }
927
928      public void copyValues(DiagnosisComponent dst) {
929        super.copyValues(dst);
930        if (condition != null) {
931          dst.condition = new ArrayList<CodeableReference>();
932          for (CodeableReference i : condition)
933            dst.condition.add(i.copy());
934        };
935        dst.use = use == null ? null : use.copy();
936      }
937
938      @Override
939      public boolean equalsDeep(Base other_) {
940        if (!super.equalsDeep(other_))
941          return false;
942        if (!(other_ instanceof DiagnosisComponent))
943          return false;
944        DiagnosisComponent o = (DiagnosisComponent) other_;
945        return compareDeep(condition, o.condition, true) && compareDeep(use, o.use, true);
946      }
947
948      @Override
949      public boolean equalsShallow(Base other_) {
950        if (!super.equalsShallow(other_))
951          return false;
952        if (!(other_ instanceof DiagnosisComponent))
953          return false;
954        DiagnosisComponent o = (DiagnosisComponent) other_;
955        return true;
956      }
957
958      public boolean isEmpty() {
959        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(condition, use);
960      }
961
962  public String fhirType() {
963    return "EpisodeOfCare.diagnosis";
964
965  }
966
967  }
968
969    /**
970     * The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.
971     */
972    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
973    @Description(shortDefinition="Business Identifier(s) relevant for this EpisodeOfCare", formalDefinition="The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes." )
974    protected List<Identifier> identifier;
975
976    /**
977     * planned | waitlist | active | onhold | finished | cancelled.
978     */
979    @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true)
980    @Description(shortDefinition="planned | waitlist | active | onhold | finished | cancelled | entered-in-error", formalDefinition="planned | waitlist | active | onhold | finished | cancelled." )
981    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/episode-of-care-status")
982    protected Enumeration<EpisodeOfCareStatus> status;
983
984    /**
985     * The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).
986     */
987    @Child(name = "statusHistory", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
988    @Description(shortDefinition="Past list of status codes (the current status may be included to cover the start date of the status)", formalDefinition="The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource)." )
989    protected List<EpisodeOfCareStatusHistoryComponent> statusHistory;
990
991    /**
992     * A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.
993     */
994    @Child(name = "type", type = {CodeableConcept.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
995    @Description(shortDefinition="Type/class  - e.g. specialist referral, disease management", formalDefinition="A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care." )
996    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/episodeofcare-type")
997    protected List<CodeableConcept> type;
998
999    /**
1000     * The list of medical reasons that are expected to be addressed during the episode of care.
1001     */
1002    @Child(name = "reason", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1003    @Description(shortDefinition="The list of medical reasons that are expected to be addressed during the episode of care", formalDefinition="The list of medical reasons that are expected to be addressed during the episode of care." )
1004    protected List<ReasonComponent> reason;
1005
1006    /**
1007     * The list of medical conditions that were addressed during the episode of care.
1008     */
1009    @Child(name = "diagnosis", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1010    @Description(shortDefinition="The list of medical conditions that were addressed during the episode of care", formalDefinition="The list of medical conditions that were addressed during the episode of care." )
1011    protected List<DiagnosisComponent> diagnosis;
1012
1013    /**
1014     * The patient who is the focus of this episode of care.
1015     */
1016    @Child(name = "patient", type = {Patient.class}, order=6, min=1, max=1, modifier=false, summary=true)
1017    @Description(shortDefinition="The patient who is the focus of this episode of care", formalDefinition="The patient who is the focus of this episode of care." )
1018    protected Reference patient;
1019
1020    /**
1021     * The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration.
1022     */
1023    @Child(name = "managingOrganization", type = {Organization.class}, order=7, min=0, max=1, modifier=false, summary=true)
1024    @Description(shortDefinition="Organization that assumes responsibility for care coordination", formalDefinition="The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration." )
1025    protected Reference managingOrganization;
1026
1027    /**
1028     * The interval during which the managing organization assumes the defined responsibility.
1029     */
1030    @Child(name = "period", type = {Period.class}, order=8, min=0, max=1, modifier=false, summary=true)
1031    @Description(shortDefinition="Interval during responsibility is assumed", formalDefinition="The interval during which the managing organization assumes the defined responsibility." )
1032    protected Period period;
1033
1034    /**
1035     * Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.
1036     */
1037    @Child(name = "referralRequest", type = {ServiceRequest.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1038    @Description(shortDefinition="Originating Referral Request(s)", formalDefinition="Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals." )
1039    protected List<Reference> referralRequest;
1040
1041    /**
1042     * The practitioner that is the care manager/care coordinator for this patient.
1043     */
1044    @Child(name = "careManager", type = {Practitioner.class, PractitionerRole.class}, order=10, min=0, max=1, modifier=false, summary=false)
1045    @Description(shortDefinition="Care manager/care coordinator for the patient", formalDefinition="The practitioner that is the care manager/care coordinator for this patient." )
1046    protected Reference careManager;
1047
1048    /**
1049     * The list of practitioners that may be facilitating this episode of care for specific purposes.
1050     */
1051    @Child(name = "careTeam", type = {CareTeam.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1052    @Description(shortDefinition="Other practitioners facilitating this episode of care", formalDefinition="The list of practitioners that may be facilitating this episode of care for specific purposes." )
1053    protected List<Reference> careTeam;
1054
1055    /**
1056     * The set of accounts that may be used for billing for this EpisodeOfCare.
1057     */
1058    @Child(name = "account", type = {Account.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1059    @Description(shortDefinition="The set of accounts that may be used for billing for this EpisodeOfCare", formalDefinition="The set of accounts that may be used for billing for this EpisodeOfCare." )
1060    protected List<Reference> account;
1061
1062    private static final long serialVersionUID = 678200746L;
1063
1064  /**
1065   * Constructor
1066   */
1067    public EpisodeOfCare() {
1068      super();
1069    }
1070
1071  /**
1072   * Constructor
1073   */
1074    public EpisodeOfCare(EpisodeOfCareStatus status, Reference patient) {
1075      super();
1076      this.setStatus(status);
1077      this.setPatient(patient);
1078    }
1079
1080    /**
1081     * @return {@link #identifier} (The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.)
1082     */
1083    public List<Identifier> getIdentifier() { 
1084      if (this.identifier == null)
1085        this.identifier = new ArrayList<Identifier>();
1086      return this.identifier;
1087    }
1088
1089    /**
1090     * @return Returns a reference to <code>this</code> for easy method chaining
1091     */
1092    public EpisodeOfCare setIdentifier(List<Identifier> theIdentifier) { 
1093      this.identifier = theIdentifier;
1094      return this;
1095    }
1096
1097    public boolean hasIdentifier() { 
1098      if (this.identifier == null)
1099        return false;
1100      for (Identifier item : this.identifier)
1101        if (!item.isEmpty())
1102          return true;
1103      return false;
1104    }
1105
1106    public Identifier addIdentifier() { //3
1107      Identifier t = new Identifier();
1108      if (this.identifier == null)
1109        this.identifier = new ArrayList<Identifier>();
1110      this.identifier.add(t);
1111      return t;
1112    }
1113
1114    public EpisodeOfCare addIdentifier(Identifier t) { //3
1115      if (t == null)
1116        return this;
1117      if (this.identifier == null)
1118        this.identifier = new ArrayList<Identifier>();
1119      this.identifier.add(t);
1120      return this;
1121    }
1122
1123    /**
1124     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1125     */
1126    public Identifier getIdentifierFirstRep() { 
1127      if (getIdentifier().isEmpty()) {
1128        addIdentifier();
1129      }
1130      return getIdentifier().get(0);
1131    }
1132
1133    /**
1134     * @return {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1135     */
1136    public Enumeration<EpisodeOfCareStatus> getStatusElement() { 
1137      if (this.status == null)
1138        if (Configuration.errorOnAutoCreate())
1139          throw new Error("Attempt to auto-create EpisodeOfCare.status");
1140        else if (Configuration.doAutoCreate())
1141          this.status = new Enumeration<EpisodeOfCareStatus>(new EpisodeOfCareStatusEnumFactory()); // bb
1142      return this.status;
1143    }
1144
1145    public boolean hasStatusElement() { 
1146      return this.status != null && !this.status.isEmpty();
1147    }
1148
1149    public boolean hasStatus() { 
1150      return this.status != null && !this.status.isEmpty();
1151    }
1152
1153    /**
1154     * @param value {@link #status} (planned | waitlist | active | onhold | finished | cancelled.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1155     */
1156    public EpisodeOfCare setStatusElement(Enumeration<EpisodeOfCareStatus> value) { 
1157      this.status = value;
1158      return this;
1159    }
1160
1161    /**
1162     * @return planned | waitlist | active | onhold | finished | cancelled.
1163     */
1164    public EpisodeOfCareStatus getStatus() { 
1165      return this.status == null ? null : this.status.getValue();
1166    }
1167
1168    /**
1169     * @param value planned | waitlist | active | onhold | finished | cancelled.
1170     */
1171    public EpisodeOfCare setStatus(EpisodeOfCareStatus value) { 
1172        if (this.status == null)
1173          this.status = new Enumeration<EpisodeOfCareStatus>(new EpisodeOfCareStatusEnumFactory());
1174        this.status.setValue(value);
1175      return this;
1176    }
1177
1178    /**
1179     * @return {@link #statusHistory} (The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).)
1180     */
1181    public List<EpisodeOfCareStatusHistoryComponent> getStatusHistory() { 
1182      if (this.statusHistory == null)
1183        this.statusHistory = new ArrayList<EpisodeOfCareStatusHistoryComponent>();
1184      return this.statusHistory;
1185    }
1186
1187    /**
1188     * @return Returns a reference to <code>this</code> for easy method chaining
1189     */
1190    public EpisodeOfCare setStatusHistory(List<EpisodeOfCareStatusHistoryComponent> theStatusHistory) { 
1191      this.statusHistory = theStatusHistory;
1192      return this;
1193    }
1194
1195    public boolean hasStatusHistory() { 
1196      if (this.statusHistory == null)
1197        return false;
1198      for (EpisodeOfCareStatusHistoryComponent item : this.statusHistory)
1199        if (!item.isEmpty())
1200          return true;
1201      return false;
1202    }
1203
1204    public EpisodeOfCareStatusHistoryComponent addStatusHistory() { //3
1205      EpisodeOfCareStatusHistoryComponent t = new EpisodeOfCareStatusHistoryComponent();
1206      if (this.statusHistory == null)
1207        this.statusHistory = new ArrayList<EpisodeOfCareStatusHistoryComponent>();
1208      this.statusHistory.add(t);
1209      return t;
1210    }
1211
1212    public EpisodeOfCare addStatusHistory(EpisodeOfCareStatusHistoryComponent t) { //3
1213      if (t == null)
1214        return this;
1215      if (this.statusHistory == null)
1216        this.statusHistory = new ArrayList<EpisodeOfCareStatusHistoryComponent>();
1217      this.statusHistory.add(t);
1218      return this;
1219    }
1220
1221    /**
1222     * @return The first repetition of repeating field {@link #statusHistory}, creating it if it does not already exist {3}
1223     */
1224    public EpisodeOfCareStatusHistoryComponent getStatusHistoryFirstRep() { 
1225      if (getStatusHistory().isEmpty()) {
1226        addStatusHistory();
1227      }
1228      return getStatusHistory().get(0);
1229    }
1230
1231    /**
1232     * @return {@link #type} (A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.)
1233     */
1234    public List<CodeableConcept> getType() { 
1235      if (this.type == null)
1236        this.type = new ArrayList<CodeableConcept>();
1237      return this.type;
1238    }
1239
1240    /**
1241     * @return Returns a reference to <code>this</code> for easy method chaining
1242     */
1243    public EpisodeOfCare setType(List<CodeableConcept> theType) { 
1244      this.type = theType;
1245      return this;
1246    }
1247
1248    public boolean hasType() { 
1249      if (this.type == null)
1250        return false;
1251      for (CodeableConcept item : this.type)
1252        if (!item.isEmpty())
1253          return true;
1254      return false;
1255    }
1256
1257    public CodeableConcept addType() { //3
1258      CodeableConcept t = new CodeableConcept();
1259      if (this.type == null)
1260        this.type = new ArrayList<CodeableConcept>();
1261      this.type.add(t);
1262      return t;
1263    }
1264
1265    public EpisodeOfCare addType(CodeableConcept t) { //3
1266      if (t == null)
1267        return this;
1268      if (this.type == null)
1269        this.type = new ArrayList<CodeableConcept>();
1270      this.type.add(t);
1271      return this;
1272    }
1273
1274    /**
1275     * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3}
1276     */
1277    public CodeableConcept getTypeFirstRep() { 
1278      if (getType().isEmpty()) {
1279        addType();
1280      }
1281      return getType().get(0);
1282    }
1283
1284    /**
1285     * @return {@link #reason} (The list of medical reasons that are expected to be addressed during the episode of care.)
1286     */
1287    public List<ReasonComponent> getReason() { 
1288      if (this.reason == null)
1289        this.reason = new ArrayList<ReasonComponent>();
1290      return this.reason;
1291    }
1292
1293    /**
1294     * @return Returns a reference to <code>this</code> for easy method chaining
1295     */
1296    public EpisodeOfCare setReason(List<ReasonComponent> theReason) { 
1297      this.reason = theReason;
1298      return this;
1299    }
1300
1301    public boolean hasReason() { 
1302      if (this.reason == null)
1303        return false;
1304      for (ReasonComponent item : this.reason)
1305        if (!item.isEmpty())
1306          return true;
1307      return false;
1308    }
1309
1310    public ReasonComponent addReason() { //3
1311      ReasonComponent t = new ReasonComponent();
1312      if (this.reason == null)
1313        this.reason = new ArrayList<ReasonComponent>();
1314      this.reason.add(t);
1315      return t;
1316    }
1317
1318    public EpisodeOfCare addReason(ReasonComponent t) { //3
1319      if (t == null)
1320        return this;
1321      if (this.reason == null)
1322        this.reason = new ArrayList<ReasonComponent>();
1323      this.reason.add(t);
1324      return this;
1325    }
1326
1327    /**
1328     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
1329     */
1330    public ReasonComponent getReasonFirstRep() { 
1331      if (getReason().isEmpty()) {
1332        addReason();
1333      }
1334      return getReason().get(0);
1335    }
1336
1337    /**
1338     * @return {@link #diagnosis} (The list of medical conditions that were addressed during the episode of care.)
1339     */
1340    public List<DiagnosisComponent> getDiagnosis() { 
1341      if (this.diagnosis == null)
1342        this.diagnosis = new ArrayList<DiagnosisComponent>();
1343      return this.diagnosis;
1344    }
1345
1346    /**
1347     * @return Returns a reference to <code>this</code> for easy method chaining
1348     */
1349    public EpisodeOfCare setDiagnosis(List<DiagnosisComponent> theDiagnosis) { 
1350      this.diagnosis = theDiagnosis;
1351      return this;
1352    }
1353
1354    public boolean hasDiagnosis() { 
1355      if (this.diagnosis == null)
1356        return false;
1357      for (DiagnosisComponent item : this.diagnosis)
1358        if (!item.isEmpty())
1359          return true;
1360      return false;
1361    }
1362
1363    public DiagnosisComponent addDiagnosis() { //3
1364      DiagnosisComponent t = new DiagnosisComponent();
1365      if (this.diagnosis == null)
1366        this.diagnosis = new ArrayList<DiagnosisComponent>();
1367      this.diagnosis.add(t);
1368      return t;
1369    }
1370
1371    public EpisodeOfCare addDiagnosis(DiagnosisComponent t) { //3
1372      if (t == null)
1373        return this;
1374      if (this.diagnosis == null)
1375        this.diagnosis = new ArrayList<DiagnosisComponent>();
1376      this.diagnosis.add(t);
1377      return this;
1378    }
1379
1380    /**
1381     * @return The first repetition of repeating field {@link #diagnosis}, creating it if it does not already exist {3}
1382     */
1383    public DiagnosisComponent getDiagnosisFirstRep() { 
1384      if (getDiagnosis().isEmpty()) {
1385        addDiagnosis();
1386      }
1387      return getDiagnosis().get(0);
1388    }
1389
1390    /**
1391     * @return {@link #patient} (The patient who is the focus of this episode of care.)
1392     */
1393    public Reference getPatient() { 
1394      if (this.patient == null)
1395        if (Configuration.errorOnAutoCreate())
1396          throw new Error("Attempt to auto-create EpisodeOfCare.patient");
1397        else if (Configuration.doAutoCreate())
1398          this.patient = new Reference(); // cc
1399      return this.patient;
1400    }
1401
1402    public boolean hasPatient() { 
1403      return this.patient != null && !this.patient.isEmpty();
1404    }
1405
1406    /**
1407     * @param value {@link #patient} (The patient who is the focus of this episode of care.)
1408     */
1409    public EpisodeOfCare setPatient(Reference value) { 
1410      this.patient = value;
1411      return this;
1412    }
1413
1414    /**
1415     * @return {@link #managingOrganization} (The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration.)
1416     */
1417    public Reference getManagingOrganization() { 
1418      if (this.managingOrganization == null)
1419        if (Configuration.errorOnAutoCreate())
1420          throw new Error("Attempt to auto-create EpisodeOfCare.managingOrganization");
1421        else if (Configuration.doAutoCreate())
1422          this.managingOrganization = new Reference(); // cc
1423      return this.managingOrganization;
1424    }
1425
1426    public boolean hasManagingOrganization() { 
1427      return this.managingOrganization != null && !this.managingOrganization.isEmpty();
1428    }
1429
1430    /**
1431     * @param value {@link #managingOrganization} (The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration.)
1432     */
1433    public EpisodeOfCare setManagingOrganization(Reference value) { 
1434      this.managingOrganization = value;
1435      return this;
1436    }
1437
1438    /**
1439     * @return {@link #period} (The interval during which the managing organization assumes the defined responsibility.)
1440     */
1441    public Period getPeriod() { 
1442      if (this.period == null)
1443        if (Configuration.errorOnAutoCreate())
1444          throw new Error("Attempt to auto-create EpisodeOfCare.period");
1445        else if (Configuration.doAutoCreate())
1446          this.period = new Period(); // cc
1447      return this.period;
1448    }
1449
1450    public boolean hasPeriod() { 
1451      return this.period != null && !this.period.isEmpty();
1452    }
1453
1454    /**
1455     * @param value {@link #period} (The interval during which the managing organization assumes the defined responsibility.)
1456     */
1457    public EpisodeOfCare setPeriod(Period value) { 
1458      this.period = value;
1459      return this;
1460    }
1461
1462    /**
1463     * @return {@link #referralRequest} (Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.)
1464     */
1465    public List<Reference> getReferralRequest() { 
1466      if (this.referralRequest == null)
1467        this.referralRequest = new ArrayList<Reference>();
1468      return this.referralRequest;
1469    }
1470
1471    /**
1472     * @return Returns a reference to <code>this</code> for easy method chaining
1473     */
1474    public EpisodeOfCare setReferralRequest(List<Reference> theReferralRequest) { 
1475      this.referralRequest = theReferralRequest;
1476      return this;
1477    }
1478
1479    public boolean hasReferralRequest() { 
1480      if (this.referralRequest == null)
1481        return false;
1482      for (Reference item : this.referralRequest)
1483        if (!item.isEmpty())
1484          return true;
1485      return false;
1486    }
1487
1488    public Reference addReferralRequest() { //3
1489      Reference t = new Reference();
1490      if (this.referralRequest == null)
1491        this.referralRequest = new ArrayList<Reference>();
1492      this.referralRequest.add(t);
1493      return t;
1494    }
1495
1496    public EpisodeOfCare addReferralRequest(Reference t) { //3
1497      if (t == null)
1498        return this;
1499      if (this.referralRequest == null)
1500        this.referralRequest = new ArrayList<Reference>();
1501      this.referralRequest.add(t);
1502      return this;
1503    }
1504
1505    /**
1506     * @return The first repetition of repeating field {@link #referralRequest}, creating it if it does not already exist {3}
1507     */
1508    public Reference getReferralRequestFirstRep() { 
1509      if (getReferralRequest().isEmpty()) {
1510        addReferralRequest();
1511      }
1512      return getReferralRequest().get(0);
1513    }
1514
1515    /**
1516     * @return {@link #careManager} (The practitioner that is the care manager/care coordinator for this patient.)
1517     */
1518    public Reference getCareManager() { 
1519      if (this.careManager == null)
1520        if (Configuration.errorOnAutoCreate())
1521          throw new Error("Attempt to auto-create EpisodeOfCare.careManager");
1522        else if (Configuration.doAutoCreate())
1523          this.careManager = new Reference(); // cc
1524      return this.careManager;
1525    }
1526
1527    public boolean hasCareManager() { 
1528      return this.careManager != null && !this.careManager.isEmpty();
1529    }
1530
1531    /**
1532     * @param value {@link #careManager} (The practitioner that is the care manager/care coordinator for this patient.)
1533     */
1534    public EpisodeOfCare setCareManager(Reference value) { 
1535      this.careManager = value;
1536      return this;
1537    }
1538
1539    /**
1540     * @return {@link #careTeam} (The list of practitioners that may be facilitating this episode of care for specific purposes.)
1541     */
1542    public List<Reference> getCareTeam() { 
1543      if (this.careTeam == null)
1544        this.careTeam = new ArrayList<Reference>();
1545      return this.careTeam;
1546    }
1547
1548    /**
1549     * @return Returns a reference to <code>this</code> for easy method chaining
1550     */
1551    public EpisodeOfCare setCareTeam(List<Reference> theCareTeam) { 
1552      this.careTeam = theCareTeam;
1553      return this;
1554    }
1555
1556    public boolean hasCareTeam() { 
1557      if (this.careTeam == null)
1558        return false;
1559      for (Reference item : this.careTeam)
1560        if (!item.isEmpty())
1561          return true;
1562      return false;
1563    }
1564
1565    public Reference addCareTeam() { //3
1566      Reference t = new Reference();
1567      if (this.careTeam == null)
1568        this.careTeam = new ArrayList<Reference>();
1569      this.careTeam.add(t);
1570      return t;
1571    }
1572
1573    public EpisodeOfCare addCareTeam(Reference t) { //3
1574      if (t == null)
1575        return this;
1576      if (this.careTeam == null)
1577        this.careTeam = new ArrayList<Reference>();
1578      this.careTeam.add(t);
1579      return this;
1580    }
1581
1582    /**
1583     * @return The first repetition of repeating field {@link #careTeam}, creating it if it does not already exist {3}
1584     */
1585    public Reference getCareTeamFirstRep() { 
1586      if (getCareTeam().isEmpty()) {
1587        addCareTeam();
1588      }
1589      return getCareTeam().get(0);
1590    }
1591
1592    /**
1593     * @return {@link #account} (The set of accounts that may be used for billing for this EpisodeOfCare.)
1594     */
1595    public List<Reference> getAccount() { 
1596      if (this.account == null)
1597        this.account = new ArrayList<Reference>();
1598      return this.account;
1599    }
1600
1601    /**
1602     * @return Returns a reference to <code>this</code> for easy method chaining
1603     */
1604    public EpisodeOfCare setAccount(List<Reference> theAccount) { 
1605      this.account = theAccount;
1606      return this;
1607    }
1608
1609    public boolean hasAccount() { 
1610      if (this.account == null)
1611        return false;
1612      for (Reference item : this.account)
1613        if (!item.isEmpty())
1614          return true;
1615      return false;
1616    }
1617
1618    public Reference addAccount() { //3
1619      Reference t = new Reference();
1620      if (this.account == null)
1621        this.account = new ArrayList<Reference>();
1622      this.account.add(t);
1623      return t;
1624    }
1625
1626    public EpisodeOfCare addAccount(Reference t) { //3
1627      if (t == null)
1628        return this;
1629      if (this.account == null)
1630        this.account = new ArrayList<Reference>();
1631      this.account.add(t);
1632      return this;
1633    }
1634
1635    /**
1636     * @return The first repetition of repeating field {@link #account}, creating it if it does not already exist {3}
1637     */
1638    public Reference getAccountFirstRep() { 
1639      if (getAccount().isEmpty()) {
1640        addAccount();
1641      }
1642      return getAccount().get(0);
1643    }
1644
1645      protected void listChildren(List<Property> children) {
1646        super.listChildren(children);
1647        children.add(new Property("identifier", "Identifier", "The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.", 0, java.lang.Integer.MAX_VALUE, identifier));
1648        children.add(new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, 1, status));
1649        children.add(new Property("statusHistory", "", "The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).", 0, java.lang.Integer.MAX_VALUE, statusHistory));
1650        children.add(new Property("type", "CodeableConcept", "A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.", 0, java.lang.Integer.MAX_VALUE, type));
1651        children.add(new Property("reason", "", "The list of medical reasons that are expected to be addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, reason));
1652        children.add(new Property("diagnosis", "", "The list of medical conditions that were addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, diagnosis));
1653        children.add(new Property("patient", "Reference(Patient)", "The patient who is the focus of this episode of care.", 0, 1, patient));
1654        children.add(new Property("managingOrganization", "Reference(Organization)", "The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration.", 0, 1, managingOrganization));
1655        children.add(new Property("period", "Period", "The interval during which the managing organization assumes the defined responsibility.", 0, 1, period));
1656        children.add(new Property("referralRequest", "Reference(ServiceRequest)", "Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.", 0, java.lang.Integer.MAX_VALUE, referralRequest));
1657        children.add(new Property("careManager", "Reference(Practitioner|PractitionerRole)", "The practitioner that is the care manager/care coordinator for this patient.", 0, 1, careManager));
1658        children.add(new Property("careTeam", "Reference(CareTeam)", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, careTeam));
1659        children.add(new Property("account", "Reference(Account)", "The set of accounts that may be used for billing for this EpisodeOfCare.", 0, java.lang.Integer.MAX_VALUE, account));
1660      }
1661
1662      @Override
1663      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1664        switch (_hash) {
1665        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes.", 0, java.lang.Integer.MAX_VALUE, identifier);
1666        case -892481550: /*status*/  return new Property("status", "code", "planned | waitlist | active | onhold | finished | cancelled.", 0, 1, status);
1667        case -986695614: /*statusHistory*/  return new Property("statusHistory", "", "The history of statuses that the EpisodeOfCare has been through (without requiring processing the history of the resource).", 0, java.lang.Integer.MAX_VALUE, statusHistory);
1668        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "A classification of the type of episode of care; e.g. specialist referral, disease management, type of funded care.", 0, java.lang.Integer.MAX_VALUE, type);
1669        case -934964668: /*reason*/  return new Property("reason", "", "The list of medical reasons that are expected to be addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, reason);
1670        case 1196993265: /*diagnosis*/  return new Property("diagnosis", "", "The list of medical conditions that were addressed during the episode of care.", 0, java.lang.Integer.MAX_VALUE, diagnosis);
1671        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "The patient who is the focus of this episode of care.", 0, 1, patient);
1672        case -2058947787: /*managingOrganization*/  return new Property("managingOrganization", "Reference(Organization)", "The organization that has assumed the specific responsibilities for care coordination, care delivery, or other services for the specified duration.", 0, 1, managingOrganization);
1673        case -991726143: /*period*/  return new Property("period", "Period", "The interval during which the managing organization assumes the defined responsibility.", 0, 1, period);
1674        case -310299598: /*referralRequest*/  return new Property("referralRequest", "Reference(ServiceRequest)", "Referral Request(s) that are fulfilled by this EpisodeOfCare, incoming referrals.", 0, java.lang.Integer.MAX_VALUE, referralRequest);
1675        case -1147746468: /*careManager*/  return new Property("careManager", "Reference(Practitioner|PractitionerRole)", "The practitioner that is the care manager/care coordinator for this patient.", 0, 1, careManager);
1676        case -7323378: /*careTeam*/  return new Property("careTeam", "Reference(CareTeam)", "The list of practitioners that may be facilitating this episode of care for specific purposes.", 0, java.lang.Integer.MAX_VALUE, careTeam);
1677        case -1177318867: /*account*/  return new Property("account", "Reference(Account)", "The set of accounts that may be used for billing for this EpisodeOfCare.", 0, java.lang.Integer.MAX_VALUE, account);
1678        default: return super.getNamedProperty(_hash, _name, _checkValid);
1679        }
1680
1681      }
1682
1683      @Override
1684      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1685        switch (hash) {
1686        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1687        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EpisodeOfCareStatus>
1688        case -986695614: /*statusHistory*/ return this.statusHistory == null ? new Base[0] : this.statusHistory.toArray(new Base[this.statusHistory.size()]); // EpisodeOfCareStatusHistoryComponent
1689        case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept
1690        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // ReasonComponent
1691        case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // DiagnosisComponent
1692        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
1693        case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference
1694        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
1695        case -310299598: /*referralRequest*/ return this.referralRequest == null ? new Base[0] : this.referralRequest.toArray(new Base[this.referralRequest.size()]); // Reference
1696        case -1147746468: /*careManager*/ return this.careManager == null ? new Base[0] : new Base[] {this.careManager}; // Reference
1697        case -7323378: /*careTeam*/ return this.careTeam == null ? new Base[0] : this.careTeam.toArray(new Base[this.careTeam.size()]); // Reference
1698        case -1177318867: /*account*/ return this.account == null ? new Base[0] : this.account.toArray(new Base[this.account.size()]); // Reference
1699        default: return super.getProperty(hash, name, checkValid);
1700        }
1701
1702      }
1703
1704      @Override
1705      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1706        switch (hash) {
1707        case -1618432855: // identifier
1708          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1709          return value;
1710        case -892481550: // status
1711          value = new EpisodeOfCareStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1712          this.status = (Enumeration) value; // Enumeration<EpisodeOfCareStatus>
1713          return value;
1714        case -986695614: // statusHistory
1715          this.getStatusHistory().add((EpisodeOfCareStatusHistoryComponent) value); // EpisodeOfCareStatusHistoryComponent
1716          return value;
1717        case 3575610: // type
1718          this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1719          return value;
1720        case -934964668: // reason
1721          this.getReason().add((ReasonComponent) value); // ReasonComponent
1722          return value;
1723        case 1196993265: // diagnosis
1724          this.getDiagnosis().add((DiagnosisComponent) value); // DiagnosisComponent
1725          return value;
1726        case -791418107: // patient
1727          this.patient = TypeConvertor.castToReference(value); // Reference
1728          return value;
1729        case -2058947787: // managingOrganization
1730          this.managingOrganization = TypeConvertor.castToReference(value); // Reference
1731          return value;
1732        case -991726143: // period
1733          this.period = TypeConvertor.castToPeriod(value); // Period
1734          return value;
1735        case -310299598: // referralRequest
1736          this.getReferralRequest().add(TypeConvertor.castToReference(value)); // Reference
1737          return value;
1738        case -1147746468: // careManager
1739          this.careManager = TypeConvertor.castToReference(value); // Reference
1740          return value;
1741        case -7323378: // careTeam
1742          this.getCareTeam().add(TypeConvertor.castToReference(value)); // Reference
1743          return value;
1744        case -1177318867: // account
1745          this.getAccount().add(TypeConvertor.castToReference(value)); // Reference
1746          return value;
1747        default: return super.setProperty(hash, name, value);
1748        }
1749
1750      }
1751
1752      @Override
1753      public Base setProperty(String name, Base value) throws FHIRException {
1754        if (name.equals("identifier")) {
1755          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1756        } else if (name.equals("status")) {
1757          value = new EpisodeOfCareStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1758          this.status = (Enumeration) value; // Enumeration<EpisodeOfCareStatus>
1759        } else if (name.equals("statusHistory")) {
1760          this.getStatusHistory().add((EpisodeOfCareStatusHistoryComponent) value);
1761        } else if (name.equals("type")) {
1762          this.getType().add(TypeConvertor.castToCodeableConcept(value));
1763        } else if (name.equals("reason")) {
1764          this.getReason().add((ReasonComponent) value);
1765        } else if (name.equals("diagnosis")) {
1766          this.getDiagnosis().add((DiagnosisComponent) value);
1767        } else if (name.equals("patient")) {
1768          this.patient = TypeConvertor.castToReference(value); // Reference
1769        } else if (name.equals("managingOrganization")) {
1770          this.managingOrganization = TypeConvertor.castToReference(value); // Reference
1771        } else if (name.equals("period")) {
1772          this.period = TypeConvertor.castToPeriod(value); // Period
1773        } else if (name.equals("referralRequest")) {
1774          this.getReferralRequest().add(TypeConvertor.castToReference(value));
1775        } else if (name.equals("careManager")) {
1776          this.careManager = TypeConvertor.castToReference(value); // Reference
1777        } else if (name.equals("careTeam")) {
1778          this.getCareTeam().add(TypeConvertor.castToReference(value));
1779        } else if (name.equals("account")) {
1780          this.getAccount().add(TypeConvertor.castToReference(value));
1781        } else
1782          return super.setProperty(name, value);
1783        return value;
1784      }
1785
1786  @Override
1787  public void removeChild(String name, Base value) throws FHIRException {
1788        if (name.equals("identifier")) {
1789          this.getIdentifier().remove(value);
1790        } else if (name.equals("status")) {
1791          value = new EpisodeOfCareStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1792          this.status = (Enumeration) value; // Enumeration<EpisodeOfCareStatus>
1793        } else if (name.equals("statusHistory")) {
1794          this.getStatusHistory().remove((EpisodeOfCareStatusHistoryComponent) value);
1795        } else if (name.equals("type")) {
1796          this.getType().remove(value);
1797        } else if (name.equals("reason")) {
1798          this.getReason().remove((ReasonComponent) value);
1799        } else if (name.equals("diagnosis")) {
1800          this.getDiagnosis().remove((DiagnosisComponent) value);
1801        } else if (name.equals("patient")) {
1802          this.patient = null;
1803        } else if (name.equals("managingOrganization")) {
1804          this.managingOrganization = null;
1805        } else if (name.equals("period")) {
1806          this.period = null;
1807        } else if (name.equals("referralRequest")) {
1808          this.getReferralRequest().remove(value);
1809        } else if (name.equals("careManager")) {
1810          this.careManager = null;
1811        } else if (name.equals("careTeam")) {
1812          this.getCareTeam().remove(value);
1813        } else if (name.equals("account")) {
1814          this.getAccount().remove(value);
1815        } else
1816          super.removeChild(name, value);
1817        
1818      }
1819
1820      @Override
1821      public Base makeProperty(int hash, String name) throws FHIRException {
1822        switch (hash) {
1823        case -1618432855:  return addIdentifier(); 
1824        case -892481550:  return getStatusElement();
1825        case -986695614:  return addStatusHistory(); 
1826        case 3575610:  return addType(); 
1827        case -934964668:  return addReason(); 
1828        case 1196993265:  return addDiagnosis(); 
1829        case -791418107:  return getPatient();
1830        case -2058947787:  return getManagingOrganization();
1831        case -991726143:  return getPeriod();
1832        case -310299598:  return addReferralRequest(); 
1833        case -1147746468:  return getCareManager();
1834        case -7323378:  return addCareTeam(); 
1835        case -1177318867:  return addAccount(); 
1836        default: return super.makeProperty(hash, name);
1837        }
1838
1839      }
1840
1841      @Override
1842      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1843        switch (hash) {
1844        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1845        case -892481550: /*status*/ return new String[] {"code"};
1846        case -986695614: /*statusHistory*/ return new String[] {};
1847        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1848        case -934964668: /*reason*/ return new String[] {};
1849        case 1196993265: /*diagnosis*/ return new String[] {};
1850        case -791418107: /*patient*/ return new String[] {"Reference"};
1851        case -2058947787: /*managingOrganization*/ return new String[] {"Reference"};
1852        case -991726143: /*period*/ return new String[] {"Period"};
1853        case -310299598: /*referralRequest*/ return new String[] {"Reference"};
1854        case -1147746468: /*careManager*/ return new String[] {"Reference"};
1855        case -7323378: /*careTeam*/ return new String[] {"Reference"};
1856        case -1177318867: /*account*/ return new String[] {"Reference"};
1857        default: return super.getTypesForProperty(hash, name);
1858        }
1859
1860      }
1861
1862      @Override
1863      public Base addChild(String name) throws FHIRException {
1864        if (name.equals("identifier")) {
1865          return addIdentifier();
1866        }
1867        else if (name.equals("status")) {
1868          throw new FHIRException("Cannot call addChild on a singleton property EpisodeOfCare.status");
1869        }
1870        else if (name.equals("statusHistory")) {
1871          return addStatusHistory();
1872        }
1873        else if (name.equals("type")) {
1874          return addType();
1875        }
1876        else if (name.equals("reason")) {
1877          return addReason();
1878        }
1879        else if (name.equals("diagnosis")) {
1880          return addDiagnosis();
1881        }
1882        else if (name.equals("patient")) {
1883          this.patient = new Reference();
1884          return this.patient;
1885        }
1886        else if (name.equals("managingOrganization")) {
1887          this.managingOrganization = new Reference();
1888          return this.managingOrganization;
1889        }
1890        else if (name.equals("period")) {
1891          this.period = new Period();
1892          return this.period;
1893        }
1894        else if (name.equals("referralRequest")) {
1895          return addReferralRequest();
1896        }
1897        else if (name.equals("careManager")) {
1898          this.careManager = new Reference();
1899          return this.careManager;
1900        }
1901        else if (name.equals("careTeam")) {
1902          return addCareTeam();
1903        }
1904        else if (name.equals("account")) {
1905          return addAccount();
1906        }
1907        else
1908          return super.addChild(name);
1909      }
1910
1911  public String fhirType() {
1912    return "EpisodeOfCare";
1913
1914  }
1915
1916      public EpisodeOfCare copy() {
1917        EpisodeOfCare dst = new EpisodeOfCare();
1918        copyValues(dst);
1919        return dst;
1920      }
1921
1922      public void copyValues(EpisodeOfCare dst) {
1923        super.copyValues(dst);
1924        if (identifier != null) {
1925          dst.identifier = new ArrayList<Identifier>();
1926          for (Identifier i : identifier)
1927            dst.identifier.add(i.copy());
1928        };
1929        dst.status = status == null ? null : status.copy();
1930        if (statusHistory != null) {
1931          dst.statusHistory = new ArrayList<EpisodeOfCareStatusHistoryComponent>();
1932          for (EpisodeOfCareStatusHistoryComponent i : statusHistory)
1933            dst.statusHistory.add(i.copy());
1934        };
1935        if (type != null) {
1936          dst.type = new ArrayList<CodeableConcept>();
1937          for (CodeableConcept i : type)
1938            dst.type.add(i.copy());
1939        };
1940        if (reason != null) {
1941          dst.reason = new ArrayList<ReasonComponent>();
1942          for (ReasonComponent i : reason)
1943            dst.reason.add(i.copy());
1944        };
1945        if (diagnosis != null) {
1946          dst.diagnosis = new ArrayList<DiagnosisComponent>();
1947          for (DiagnosisComponent i : diagnosis)
1948            dst.diagnosis.add(i.copy());
1949        };
1950        dst.patient = patient == null ? null : patient.copy();
1951        dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy();
1952        dst.period = period == null ? null : period.copy();
1953        if (referralRequest != null) {
1954          dst.referralRequest = new ArrayList<Reference>();
1955          for (Reference i : referralRequest)
1956            dst.referralRequest.add(i.copy());
1957        };
1958        dst.careManager = careManager == null ? null : careManager.copy();
1959        if (careTeam != null) {
1960          dst.careTeam = new ArrayList<Reference>();
1961          for (Reference i : careTeam)
1962            dst.careTeam.add(i.copy());
1963        };
1964        if (account != null) {
1965          dst.account = new ArrayList<Reference>();
1966          for (Reference i : account)
1967            dst.account.add(i.copy());
1968        };
1969      }
1970
1971      protected EpisodeOfCare typedCopy() {
1972        return copy();
1973      }
1974
1975      @Override
1976      public boolean equalsDeep(Base other_) {
1977        if (!super.equalsDeep(other_))
1978          return false;
1979        if (!(other_ instanceof EpisodeOfCare))
1980          return false;
1981        EpisodeOfCare o = (EpisodeOfCare) other_;
1982        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(statusHistory, o.statusHistory, true)
1983           && compareDeep(type, o.type, true) && compareDeep(reason, o.reason, true) && compareDeep(diagnosis, o.diagnosis, true)
1984           && compareDeep(patient, o.patient, true) && compareDeep(managingOrganization, o.managingOrganization, true)
1985           && compareDeep(period, o.period, true) && compareDeep(referralRequest, o.referralRequest, true)
1986           && compareDeep(careManager, o.careManager, true) && compareDeep(careTeam, o.careTeam, true) && compareDeep(account, o.account, true)
1987          ;
1988      }
1989
1990      @Override
1991      public boolean equalsShallow(Base other_) {
1992        if (!super.equalsShallow(other_))
1993          return false;
1994        if (!(other_ instanceof EpisodeOfCare))
1995          return false;
1996        EpisodeOfCare o = (EpisodeOfCare) other_;
1997        return compareValues(status, o.status, true);
1998      }
1999
2000      public boolean isEmpty() {
2001        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, statusHistory
2002          , type, reason, diagnosis, patient, managingOrganization, period, referralRequest
2003          , careManager, careTeam, account);
2004      }
2005
2006  @Override
2007  public ResourceType getResourceType() {
2008    return ResourceType.EpisodeOfCare;
2009   }
2010
2011 /**
2012   * Search parameter: <b>care-manager</b>
2013   * <p>
2014   * Description: <b>Care manager/care coordinator for the patient</b><br>
2015   * Type: <b>reference</b><br>
2016   * Path: <b>EpisodeOfCare.careManager.where(resolve() is Practitioner)</b><br>
2017   * </p>
2018   */
2019  @SearchParamDefinition(name="care-manager", path="EpisodeOfCare.careManager.where(resolve() is Practitioner)", description="Care manager/care coordinator for the patient", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class } )
2020  public static final String SP_CARE_MANAGER = "care-manager";
2021 /**
2022   * <b>Fluent Client</b> search parameter constant for <b>care-manager</b>
2023   * <p>
2024   * Description: <b>Care manager/care coordinator for the patient</b><br>
2025   * Type: <b>reference</b><br>
2026   * Path: <b>EpisodeOfCare.careManager.where(resolve() is Practitioner)</b><br>
2027   * </p>
2028   */
2029  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CARE_MANAGER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CARE_MANAGER);
2030
2031/**
2032   * Constant for fluent queries to be used to add include statements. Specifies
2033   * the path value of "<b>EpisodeOfCare:care-manager</b>".
2034   */
2035  public static final ca.uhn.fhir.model.api.Include INCLUDE_CARE_MANAGER = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:care-manager").toLocked();
2036
2037 /**
2038   * Search parameter: <b>diagnosis-code</b>
2039   * <p>
2040   * Description: <b>Conditions/problems/diagnoses this episode of care is for (coded)</b><br>
2041   * Type: <b>token</b><br>
2042   * Path: <b>EpisodeOfCare.diagnosis.condition.concept</b><br>
2043   * </p>
2044   */
2045  @SearchParamDefinition(name="diagnosis-code", path="EpisodeOfCare.diagnosis.condition.concept", description="Conditions/problems/diagnoses this episode of care is for (coded)", type="token" )
2046  public static final String SP_DIAGNOSIS_CODE = "diagnosis-code";
2047 /**
2048   * <b>Fluent Client</b> search parameter constant for <b>diagnosis-code</b>
2049   * <p>
2050   * Description: <b>Conditions/problems/diagnoses this episode of care is for (coded)</b><br>
2051   * Type: <b>token</b><br>
2052   * Path: <b>EpisodeOfCare.diagnosis.condition.concept</b><br>
2053   * </p>
2054   */
2055  public static final ca.uhn.fhir.rest.gclient.TokenClientParam DIAGNOSIS_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DIAGNOSIS_CODE);
2056
2057 /**
2058   * Search parameter: <b>diagnosis-reference</b>
2059   * <p>
2060   * Description: <b>Conditions/problems/diagnoses this episode of care is for (resource reference)</b><br>
2061   * Type: <b>reference</b><br>
2062   * Path: <b>EpisodeOfCare.diagnosis.condition.reference</b><br>
2063   * </p>
2064   */
2065  @SearchParamDefinition(name="diagnosis-reference", path="EpisodeOfCare.diagnosis.condition.reference", description="Conditions/problems/diagnoses this episode of care is for (resource reference)", type="reference", target={Condition.class } )
2066  public static final String SP_DIAGNOSIS_REFERENCE = "diagnosis-reference";
2067 /**
2068   * <b>Fluent Client</b> search parameter constant for <b>diagnosis-reference</b>
2069   * <p>
2070   * Description: <b>Conditions/problems/diagnoses this episode of care is for (resource reference)</b><br>
2071   * Type: <b>reference</b><br>
2072   * Path: <b>EpisodeOfCare.diagnosis.condition.reference</b><br>
2073   * </p>
2074   */
2075  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DIAGNOSIS_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DIAGNOSIS_REFERENCE);
2076
2077/**
2078   * Constant for fluent queries to be used to add include statements. Specifies
2079   * the path value of "<b>EpisodeOfCare:diagnosis-reference</b>".
2080   */
2081  public static final ca.uhn.fhir.model.api.Include INCLUDE_DIAGNOSIS_REFERENCE = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:diagnosis-reference").toLocked();
2082
2083 /**
2084   * Search parameter: <b>incoming-referral</b>
2085   * <p>
2086   * Description: <b>Incoming Referral Request</b><br>
2087   * Type: <b>reference</b><br>
2088   * Path: <b>EpisodeOfCare.referralRequest</b><br>
2089   * </p>
2090   */
2091  @SearchParamDefinition(name="incoming-referral", path="EpisodeOfCare.referralRequest", description="Incoming Referral Request", type="reference", target={ServiceRequest.class } )
2092  public static final String SP_INCOMING_REFERRAL = "incoming-referral";
2093 /**
2094   * <b>Fluent Client</b> search parameter constant for <b>incoming-referral</b>
2095   * <p>
2096   * Description: <b>Incoming Referral Request</b><br>
2097   * Type: <b>reference</b><br>
2098   * Path: <b>EpisodeOfCare.referralRequest</b><br>
2099   * </p>
2100   */
2101  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INCOMING_REFERRAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INCOMING_REFERRAL);
2102
2103/**
2104   * Constant for fluent queries to be used to add include statements. Specifies
2105   * the path value of "<b>EpisodeOfCare:incoming-referral</b>".
2106   */
2107  public static final ca.uhn.fhir.model.api.Include INCLUDE_INCOMING_REFERRAL = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:incoming-referral").toLocked();
2108
2109 /**
2110   * Search parameter: <b>organization</b>
2111   * <p>
2112   * Description: <b>The organization that has assumed the specific responsibilities of this EpisodeOfCare</b><br>
2113   * Type: <b>reference</b><br>
2114   * Path: <b>EpisodeOfCare.managingOrganization</b><br>
2115   * </p>
2116   */
2117  @SearchParamDefinition(name="organization", path="EpisodeOfCare.managingOrganization", description="The organization that has assumed the specific responsibilities of this EpisodeOfCare", type="reference", target={Organization.class } )
2118  public static final String SP_ORGANIZATION = "organization";
2119 /**
2120   * <b>Fluent Client</b> search parameter constant for <b>organization</b>
2121   * <p>
2122   * Description: <b>The organization that has assumed the specific responsibilities of this EpisodeOfCare</b><br>
2123   * Type: <b>reference</b><br>
2124   * Path: <b>EpisodeOfCare.managingOrganization</b><br>
2125   * </p>
2126   */
2127  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION);
2128
2129/**
2130   * Constant for fluent queries to be used to add include statements. Specifies
2131   * the path value of "<b>EpisodeOfCare:organization</b>".
2132   */
2133  public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:organization").toLocked();
2134
2135 /**
2136   * Search parameter: <b>reason-code</b>
2137   * <p>
2138   * Description: <b>Reference to a concept (coded)</b><br>
2139   * Type: <b>token</b><br>
2140   * Path: <b>EpisodeOfCare.reason.value.concept</b><br>
2141   * </p>
2142   */
2143  @SearchParamDefinition(name="reason-code", path="EpisodeOfCare.reason.value.concept", description="Reference to a concept (coded)", type="token" )
2144  public static final String SP_REASON_CODE = "reason-code";
2145 /**
2146   * <b>Fluent Client</b> search parameter constant for <b>reason-code</b>
2147   * <p>
2148   * Description: <b>Reference to a concept (coded)</b><br>
2149   * Type: <b>token</b><br>
2150   * Path: <b>EpisodeOfCare.reason.value.concept</b><br>
2151   * </p>
2152   */
2153  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON_CODE);
2154
2155 /**
2156   * Search parameter: <b>reason-reference</b>
2157   * <p>
2158   * Description: <b>Reference to a resource (resource reference)</b><br>
2159   * Type: <b>reference</b><br>
2160   * Path: <b>EpisodeOfCare.reason.value.reference</b><br>
2161   * </p>
2162   */
2163  @SearchParamDefinition(name="reason-reference", path="EpisodeOfCare.reason.value.reference", description="Reference to a resource (resource reference)", type="reference", target={Condition.class, HealthcareService.class, Observation.class, Procedure.class } )
2164  public static final String SP_REASON_REFERENCE = "reason-reference";
2165 /**
2166   * <b>Fluent Client</b> search parameter constant for <b>reason-reference</b>
2167   * <p>
2168   * Description: <b>Reference to a resource (resource reference)</b><br>
2169   * Type: <b>reference</b><br>
2170   * Path: <b>EpisodeOfCare.reason.value.reference</b><br>
2171   * </p>
2172   */
2173  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REASON_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REASON_REFERENCE);
2174
2175/**
2176   * Constant for fluent queries to be used to add include statements. Specifies
2177   * the path value of "<b>EpisodeOfCare:reason-reference</b>".
2178   */
2179  public static final ca.uhn.fhir.model.api.Include INCLUDE_REASON_REFERENCE = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:reason-reference").toLocked();
2180
2181 /**
2182   * Search parameter: <b>status</b>
2183   * <p>
2184   * Description: <b>The current status of the Episode of Care as provided (does not check the status history collection)</b><br>
2185   * Type: <b>token</b><br>
2186   * Path: <b>EpisodeOfCare.status</b><br>
2187   * </p>
2188   */
2189  @SearchParamDefinition(name="status", path="EpisodeOfCare.status", description="The current status of the Episode of Care as provided (does not check the status history collection)", type="token" )
2190  public static final String SP_STATUS = "status";
2191 /**
2192   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2193   * <p>
2194   * Description: <b>The current status of the Episode of Care as provided (does not check the status history collection)</b><br>
2195   * Type: <b>token</b><br>
2196   * Path: <b>EpisodeOfCare.status</b><br>
2197   * </p>
2198   */
2199  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2200
2201 /**
2202   * Search parameter: <b>date</b>
2203   * <p>
2204   * Description: <b>Multiple Resources: 
2205
2206* [AdverseEvent](adverseevent.html): When the event occurred
2207* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2208* [Appointment](appointment.html): Appointment date/time.
2209* [AuditEvent](auditevent.html): Time when the event was recorded
2210* [CarePlan](careplan.html): Time period plan covers
2211* [CareTeam](careteam.html): A date within the coverage time period.
2212* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2213* [Composition](composition.html): Composition editing time
2214* [Consent](consent.html): When consent was agreed to
2215* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2216* [DocumentReference](documentreference.html): When this document reference was created
2217* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2218* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2219* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2220* [Flag](flag.html): Time period when flag is active
2221* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2222* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2223* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2224* [Invoice](invoice.html): Invoice date / posting date
2225* [List](list.html): When the list was prepared
2226* [MeasureReport](measurereport.html): The date of the measure report
2227* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2228* [Observation](observation.html): Clinically relevant time/time-period for observation
2229* [Procedure](procedure.html): When the procedure occurred or is occurring
2230* [ResearchSubject](researchsubject.html): Start and end of participation
2231* [RiskAssessment](riskassessment.html): When was assessment made?
2232* [SupplyRequest](supplyrequest.html): When the request was made
2233</b><br>
2234   * Type: <b>date</b><br>
2235   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2236   * </p>
2237   */
2238  @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
2239  public static final String SP_DATE = "date";
2240 /**
2241   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2242   * <p>
2243   * Description: <b>Multiple Resources: 
2244
2245* [AdverseEvent](adverseevent.html): When the event occurred
2246* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
2247* [Appointment](appointment.html): Appointment date/time.
2248* [AuditEvent](auditevent.html): Time when the event was recorded
2249* [CarePlan](careplan.html): Time period plan covers
2250* [CareTeam](careteam.html): A date within the coverage time period.
2251* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
2252* [Composition](composition.html): Composition editing time
2253* [Consent](consent.html): When consent was agreed to
2254* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
2255* [DocumentReference](documentreference.html): When this document reference was created
2256* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
2257* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
2258* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
2259* [Flag](flag.html): Time period when flag is active
2260* [Immunization](immunization.html): Vaccination  (non)-Administration Date
2261* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
2262* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
2263* [Invoice](invoice.html): Invoice date / posting date
2264* [List](list.html): When the list was prepared
2265* [MeasureReport](measurereport.html): The date of the measure report
2266* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
2267* [Observation](observation.html): Clinically relevant time/time-period for observation
2268* [Procedure](procedure.html): When the procedure occurred or is occurring
2269* [ResearchSubject](researchsubject.html): Start and end of participation
2270* [RiskAssessment](riskassessment.html): When was assessment made?
2271* [SupplyRequest](supplyrequest.html): When the request was made
2272</b><br>
2273   * Type: <b>date</b><br>
2274   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
2275   * </p>
2276   */
2277  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2278
2279 /**
2280   * Search parameter: <b>identifier</b>
2281   * <p>
2282   * Description: <b>Multiple Resources: 
2283
2284* [Account](account.html): Account number
2285* [AdverseEvent](adverseevent.html): Business identifier for the event
2286* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2287* [Appointment](appointment.html): An Identifier of the Appointment
2288* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2289* [Basic](basic.html): Business identifier
2290* [BodyStructure](bodystructure.html): Bodystructure identifier
2291* [CarePlan](careplan.html): External Ids for this plan
2292* [CareTeam](careteam.html): External Ids for this team
2293* [ChargeItem](chargeitem.html): Business Identifier for item
2294* [Claim](claim.html): The primary identifier of the financial resource
2295* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2296* [ClinicalImpression](clinicalimpression.html): Business identifier
2297* [Communication](communication.html): Unique identifier
2298* [CommunicationRequest](communicationrequest.html): Unique identifier
2299* [Composition](composition.html): Version-independent identifier for the Composition
2300* [Condition](condition.html): A unique identifier of the condition record
2301* [Consent](consent.html): Identifier for this record (external references)
2302* [Contract](contract.html): The identity of the contract
2303* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2304* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2305* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2306* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2307* [DeviceRequest](devicerequest.html): Business identifier for request/order
2308* [DeviceUsage](deviceusage.html): Search by identifier
2309* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2310* [DocumentReference](documentreference.html): Identifier of the attachment binary
2311* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2312* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2313* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2314* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2315* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2316* [Flag](flag.html): Business identifier
2317* [Goal](goal.html): External Ids for this goal
2318* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2319* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2320* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2321* [Immunization](immunization.html): Business identifier
2322* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2323* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2324* [Invoice](invoice.html): Business Identifier for item
2325* [List](list.html): Business identifier
2326* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2327* [Medication](medication.html): Returns medications with this external identifier
2328* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2329* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2330* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2331* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2332* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2333* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2334* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2335* [Observation](observation.html): The unique id for a particular observation
2336* [Person](person.html): A person Identifier
2337* [Procedure](procedure.html): A unique identifier for a procedure
2338* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2339* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2340* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2341* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2342* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2343* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2344* [Specimen](specimen.html): The unique identifier associated with the specimen
2345* [SupplyDelivery](supplydelivery.html): External identifier
2346* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2347* [Task](task.html): Search for a task instance by its business identifier
2348* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2349</b><br>
2350   * Type: <b>token</b><br>
2351   * 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>
2352   * </p>
2353   */
2354  @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" )
2355  public static final String SP_IDENTIFIER = "identifier";
2356 /**
2357   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2358   * <p>
2359   * Description: <b>Multiple Resources: 
2360
2361* [Account](account.html): Account number
2362* [AdverseEvent](adverseevent.html): Business identifier for the event
2363* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2364* [Appointment](appointment.html): An Identifier of the Appointment
2365* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2366* [Basic](basic.html): Business identifier
2367* [BodyStructure](bodystructure.html): Bodystructure identifier
2368* [CarePlan](careplan.html): External Ids for this plan
2369* [CareTeam](careteam.html): External Ids for this team
2370* [ChargeItem](chargeitem.html): Business Identifier for item
2371* [Claim](claim.html): The primary identifier of the financial resource
2372* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2373* [ClinicalImpression](clinicalimpression.html): Business identifier
2374* [Communication](communication.html): Unique identifier
2375* [CommunicationRequest](communicationrequest.html): Unique identifier
2376* [Composition](composition.html): Version-independent identifier for the Composition
2377* [Condition](condition.html): A unique identifier of the condition record
2378* [Consent](consent.html): Identifier for this record (external references)
2379* [Contract](contract.html): The identity of the contract
2380* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2381* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2382* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2383* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2384* [DeviceRequest](devicerequest.html): Business identifier for request/order
2385* [DeviceUsage](deviceusage.html): Search by identifier
2386* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2387* [DocumentReference](documentreference.html): Identifier of the attachment binary
2388* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2389* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2390* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2391* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2392* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2393* [Flag](flag.html): Business identifier
2394* [Goal](goal.html): External Ids for this goal
2395* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2396* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2397* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2398* [Immunization](immunization.html): Business identifier
2399* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2400* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2401* [Invoice](invoice.html): Business Identifier for item
2402* [List](list.html): Business identifier
2403* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2404* [Medication](medication.html): Returns medications with this external identifier
2405* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2406* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2407* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2408* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2409* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2410* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2411* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2412* [Observation](observation.html): The unique id for a particular observation
2413* [Person](person.html): A person Identifier
2414* [Procedure](procedure.html): A unique identifier for a procedure
2415* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2416* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2417* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2418* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2419* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2420* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2421* [Specimen](specimen.html): The unique identifier associated with the specimen
2422* [SupplyDelivery](supplydelivery.html): External identifier
2423* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2424* [Task](task.html): Search for a task instance by its business identifier
2425* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2426</b><br>
2427   * Type: <b>token</b><br>
2428   * 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>
2429   * </p>
2430   */
2431  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2432
2433 /**
2434   * Search parameter: <b>patient</b>
2435   * <p>
2436   * Description: <b>Multiple Resources: 
2437
2438* [Account](account.html): The entity that caused the expenses
2439* [AdverseEvent](adverseevent.html): Subject impacted by event
2440* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2441* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2442* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2443* [AuditEvent](auditevent.html): Where the activity involved patient data
2444* [Basic](basic.html): Identifies the focus of this resource
2445* [BodyStructure](bodystructure.html): Who this is about
2446* [CarePlan](careplan.html): Who the care plan is for
2447* [CareTeam](careteam.html): Who care team is for
2448* [ChargeItem](chargeitem.html): Individual service was done for/to
2449* [Claim](claim.html): Patient receiving the products or services
2450* [ClaimResponse](claimresponse.html): The subject of care
2451* [ClinicalImpression](clinicalimpression.html): Patient assessed
2452* [Communication](communication.html): Focus of message
2453* [CommunicationRequest](communicationrequest.html): Focus of message
2454* [Composition](composition.html): Who and/or what the composition is about
2455* [Condition](condition.html): Who has the condition?
2456* [Consent](consent.html): Who the consent applies to
2457* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2458* [Coverage](coverage.html): Retrieve coverages for a patient
2459* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2460* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2461* [DetectedIssue](detectedissue.html): Associated patient
2462* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2463* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2464* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2465* [DocumentReference](documentreference.html): Who/what is the subject of the document
2466* [Encounter](encounter.html): The patient present at the encounter
2467* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2468* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2469* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2470* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2471* [Flag](flag.html): The identity of a subject to list flags for
2472* [Goal](goal.html): Who this goal is intended for
2473* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2474* [ImagingSelection](imagingselection.html): Who the study is about
2475* [ImagingStudy](imagingstudy.html): Who the study is about
2476* [Immunization](immunization.html): The patient for the vaccination record
2477* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2478* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2479* [Invoice](invoice.html): Recipient(s) of goods and services
2480* [List](list.html): If all resources have the same subject
2481* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2482* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2483* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2484* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2485* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2486* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2487* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2488* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2489* [Observation](observation.html): The subject that the observation is about (if patient)
2490* [Person](person.html): The Person links to this Patient
2491* [Procedure](procedure.html): Search by subject - a patient
2492* [Provenance](provenance.html): Where the activity involved patient data
2493* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2494* [RelatedPerson](relatedperson.html): The patient this related person is related to
2495* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2496* [ResearchSubject](researchsubject.html): Who or what is part of study
2497* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2498* [ServiceRequest](servicerequest.html): Search by subject - a patient
2499* [Specimen](specimen.html): The patient the specimen comes from
2500* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2501* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2502* [Task](task.html): Search by patient
2503* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2504</b><br>
2505   * Type: <b>reference</b><br>
2506   * 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>
2507   * </p>
2508   */
2509  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
2510  public static final String SP_PATIENT = "patient";
2511 /**
2512   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2513   * <p>
2514   * Description: <b>Multiple Resources: 
2515
2516* [Account](account.html): The entity that caused the expenses
2517* [AdverseEvent](adverseevent.html): Subject impacted by event
2518* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2519* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2520* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2521* [AuditEvent](auditevent.html): Where the activity involved patient data
2522* [Basic](basic.html): Identifies the focus of this resource
2523* [BodyStructure](bodystructure.html): Who this is about
2524* [CarePlan](careplan.html): Who the care plan is for
2525* [CareTeam](careteam.html): Who care team is for
2526* [ChargeItem](chargeitem.html): Individual service was done for/to
2527* [Claim](claim.html): Patient receiving the products or services
2528* [ClaimResponse](claimresponse.html): The subject of care
2529* [ClinicalImpression](clinicalimpression.html): Patient assessed
2530* [Communication](communication.html): Focus of message
2531* [CommunicationRequest](communicationrequest.html): Focus of message
2532* [Composition](composition.html): Who and/or what the composition is about
2533* [Condition](condition.html): Who has the condition?
2534* [Consent](consent.html): Who the consent applies to
2535* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2536* [Coverage](coverage.html): Retrieve coverages for a patient
2537* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2538* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2539* [DetectedIssue](detectedissue.html): Associated patient
2540* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2541* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2542* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2543* [DocumentReference](documentreference.html): Who/what is the subject of the document
2544* [Encounter](encounter.html): The patient present at the encounter
2545* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2546* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2547* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2548* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2549* [Flag](flag.html): The identity of a subject to list flags for
2550* [Goal](goal.html): Who this goal is intended for
2551* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2552* [ImagingSelection](imagingselection.html): Who the study is about
2553* [ImagingStudy](imagingstudy.html): Who the study is about
2554* [Immunization](immunization.html): The patient for the vaccination record
2555* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2556* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2557* [Invoice](invoice.html): Recipient(s) of goods and services
2558* [List](list.html): If all resources have the same subject
2559* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2560* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2561* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2562* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2563* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2564* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2565* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2566* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2567* [Observation](observation.html): The subject that the observation is about (if patient)
2568* [Person](person.html): The Person links to this Patient
2569* [Procedure](procedure.html): Search by subject - a patient
2570* [Provenance](provenance.html): Where the activity involved patient data
2571* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2572* [RelatedPerson](relatedperson.html): The patient this related person is related to
2573* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2574* [ResearchSubject](researchsubject.html): Who or what is part of study
2575* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2576* [ServiceRequest](servicerequest.html): Search by subject - a patient
2577* [Specimen](specimen.html): The patient the specimen comes from
2578* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2579* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2580* [Task](task.html): Search by patient
2581* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2582</b><br>
2583   * Type: <b>reference</b><br>
2584   * 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>
2585   * </p>
2586   */
2587  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2588
2589/**
2590   * Constant for fluent queries to be used to add include statements. Specifies
2591   * the path value of "<b>EpisodeOfCare:patient</b>".
2592   */
2593  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("EpisodeOfCare:patient").toLocked();
2594
2595 /**
2596   * Search parameter: <b>type</b>
2597   * <p>
2598   * Description: <b>Multiple Resources: 
2599
2600* [Account](account.html): E.g. patient, expense, depreciation
2601* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
2602* [Composition](composition.html): Kind of composition (LOINC if possible)
2603* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
2604* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
2605* [Encounter](encounter.html): Specific type of encounter
2606* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
2607* [Invoice](invoice.html): Type of Invoice
2608* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
2609* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
2610* [Specimen](specimen.html): The specimen type
2611</b><br>
2612   * Type: <b>token</b><br>
2613   * 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>
2614   * </p>
2615   */
2616  @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" )
2617  public static final String SP_TYPE = "type";
2618 /**
2619   * <b>Fluent Client</b> search parameter constant for <b>type</b>
2620   * <p>
2621   * Description: <b>Multiple Resources: 
2622
2623* [Account](account.html): E.g. patient, expense, depreciation
2624* [AllergyIntolerance](allergyintolerance.html): allergy | intolerance - Underlying mechanism (if known)
2625* [Composition](composition.html): Kind of composition (LOINC if possible)
2626* [Coverage](coverage.html): The kind of coverage (health plan, auto, Workers Compensation)
2627* [DocumentReference](documentreference.html): Kind of document (LOINC if possible)
2628* [Encounter](encounter.html): Specific type of encounter
2629* [EpisodeOfCare](episodeofcare.html): Type/class  - e.g. specialist referral, disease management
2630* [Invoice](invoice.html): Type of Invoice
2631* [MedicationDispense](medicationdispense.html): Returns dispenses of a specific type
2632* [MolecularSequence](molecularsequence.html): Amino Acid Sequence/ DNA Sequence / RNA Sequence
2633* [Specimen](specimen.html): The specimen type
2634</b><br>
2635   * Type: <b>token</b><br>
2636   * 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>
2637   * </p>
2638   */
2639  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
2640
2641
2642}
2643