001package org.hl7.fhir.r4b.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 Fri, Dec 31, 2021 05:58+1100 for FHIR v4.3.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r4b.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
052 */
053@ResourceDef(name="CareTeam", profile="http://hl7.org/fhir/StructureDefinition/CareTeam")
054public class CareTeam extends DomainResource {
055
056    public enum CareTeamStatus {
057        /**
058         * The care team has been drafted and proposed, but not yet participating in the coordination and delivery of patient care.
059         */
060        PROPOSED, 
061        /**
062         * The care team is currently participating in the coordination and delivery of care.
063         */
064        ACTIVE, 
065        /**
066         * The care team is temporarily on hold or suspended and not participating in the coordination and delivery of care.
067         */
068        SUSPENDED, 
069        /**
070         * The care team was, but is no longer, participating in the coordination and delivery of care.
071         */
072        INACTIVE, 
073        /**
074         * The care team should have never existed.
075         */
076        ENTEREDINERROR, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static CareTeamStatus fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("proposed".equals(codeString))
085          return PROPOSED;
086        if ("active".equals(codeString))
087          return ACTIVE;
088        if ("suspended".equals(codeString))
089          return SUSPENDED;
090        if ("inactive".equals(codeString))
091          return INACTIVE;
092        if ("entered-in-error".equals(codeString))
093          return ENTEREDINERROR;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown CareTeamStatus code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case PROPOSED: return "proposed";
102            case ACTIVE: return "active";
103            case SUSPENDED: return "suspended";
104            case INACTIVE: return "inactive";
105            case ENTEREDINERROR: return "entered-in-error";
106            case NULL: return null;
107            default: return "?";
108          }
109        }
110        public String getSystem() {
111          switch (this) {
112            case PROPOSED: return "http://hl7.org/fhir/care-team-status";
113            case ACTIVE: return "http://hl7.org/fhir/care-team-status";
114            case SUSPENDED: return "http://hl7.org/fhir/care-team-status";
115            case INACTIVE: return "http://hl7.org/fhir/care-team-status";
116            case ENTEREDINERROR: return "http://hl7.org/fhir/care-team-status";
117            case NULL: return null;
118            default: return "?";
119          }
120        }
121        public String getDefinition() {
122          switch (this) {
123            case PROPOSED: return "The care team has been drafted and proposed, but not yet participating in the coordination and delivery of patient care.";
124            case ACTIVE: return "The care team is currently participating in the coordination and delivery of care.";
125            case SUSPENDED: return "The care team is temporarily on hold or suspended and not participating in the coordination and delivery of care.";
126            case INACTIVE: return "The care team was, but is no longer, participating in the coordination and delivery of care.";
127            case ENTEREDINERROR: return "The care team should have never existed.";
128            case NULL: return null;
129            default: return "?";
130          }
131        }
132        public String getDisplay() {
133          switch (this) {
134            case PROPOSED: return "Proposed";
135            case ACTIVE: return "Active";
136            case SUSPENDED: return "Suspended";
137            case INACTIVE: return "Inactive";
138            case ENTEREDINERROR: return "Entered in Error";
139            case NULL: return null;
140            default: return "?";
141          }
142        }
143    }
144
145  public static class CareTeamStatusEnumFactory implements EnumFactory<CareTeamStatus> {
146    public CareTeamStatus fromCode(String codeString) throws IllegalArgumentException {
147      if (codeString == null || "".equals(codeString))
148            if (codeString == null || "".equals(codeString))
149                return null;
150        if ("proposed".equals(codeString))
151          return CareTeamStatus.PROPOSED;
152        if ("active".equals(codeString))
153          return CareTeamStatus.ACTIVE;
154        if ("suspended".equals(codeString))
155          return CareTeamStatus.SUSPENDED;
156        if ("inactive".equals(codeString))
157          return CareTeamStatus.INACTIVE;
158        if ("entered-in-error".equals(codeString))
159          return CareTeamStatus.ENTEREDINERROR;
160        throw new IllegalArgumentException("Unknown CareTeamStatus code '"+codeString+"'");
161        }
162        public Enumeration<CareTeamStatus> fromType(Base code) throws FHIRException {
163          if (code == null)
164            return null;
165          if (code.isEmpty())
166            return new Enumeration<CareTeamStatus>(this);
167          String codeString = ((PrimitiveType) code).asStringValue();
168          if (codeString == null || "".equals(codeString))
169            return null;
170        if ("proposed".equals(codeString))
171          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.PROPOSED);
172        if ("active".equals(codeString))
173          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.ACTIVE);
174        if ("suspended".equals(codeString))
175          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.SUSPENDED);
176        if ("inactive".equals(codeString))
177          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.INACTIVE);
178        if ("entered-in-error".equals(codeString))
179          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.ENTEREDINERROR);
180        throw new FHIRException("Unknown CareTeamStatus code '"+codeString+"'");
181        }
182    public String toCode(CareTeamStatus code) {
183      if (code == CareTeamStatus.PROPOSED)
184        return "proposed";
185      if (code == CareTeamStatus.ACTIVE)
186        return "active";
187      if (code == CareTeamStatus.SUSPENDED)
188        return "suspended";
189      if (code == CareTeamStatus.INACTIVE)
190        return "inactive";
191      if (code == CareTeamStatus.ENTEREDINERROR)
192        return "entered-in-error";
193      return "?";
194      }
195    public String toSystem(CareTeamStatus code) {
196      return code.getSystem();
197      }
198    }
199
200    @Block()
201    public static class CareTeamParticipantComponent extends BackboneElement implements IBaseBackboneElement {
202        /**
203         * Indicates specific responsibility of an individual within the care team, such as "Primary care physician", "Trained social worker counselor", "Caregiver", etc.
204         */
205        @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
206        @Description(shortDefinition="Type of involvement", formalDefinition="Indicates specific responsibility of an individual within the care team, such as \"Primary care physician\", \"Trained social worker counselor\", \"Caregiver\", etc." )
207        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/careteam-participant-role")
208        protected List<CodeableConcept> role;
209
210        /**
211         * The specific person or organization who is participating/expected to participate in the care team.
212         */
213        @Child(name = "member", type = {Practitioner.class, PractitionerRole.class, RelatedPerson.class, Patient.class, Organization.class, CareTeam.class}, order=2, min=0, max=1, modifier=false, summary=true)
214        @Description(shortDefinition="Who is involved", formalDefinition="The specific person or organization who is participating/expected to participate in the care team." )
215        protected Reference member;
216
217        /**
218         * The organization of the practitioner.
219         */
220        @Child(name = "onBehalfOf", type = {Organization.class}, order=3, min=0, max=1, modifier=false, summary=true)
221        @Description(shortDefinition="Organization of the practitioner", formalDefinition="The organization of the practitioner." )
222        protected Reference onBehalfOf;
223
224        /**
225         * Indicates when the specific member or organization did (or is intended to) come into effect and end.
226         */
227        @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false)
228        @Description(shortDefinition="Time period of participant", formalDefinition="Indicates when the specific member or organization did (or is intended to) come into effect and end." )
229        protected Period period;
230
231        private static final long serialVersionUID = -718903773L;
232
233    /**
234     * Constructor
235     */
236      public CareTeamParticipantComponent() {
237        super();
238      }
239
240        /**
241         * @return {@link #role} (Indicates specific responsibility of an individual within the care team, such as "Primary care physician", "Trained social worker counselor", "Caregiver", etc.)
242         */
243        public List<CodeableConcept> getRole() { 
244          if (this.role == null)
245            this.role = new ArrayList<CodeableConcept>();
246          return this.role;
247        }
248
249        /**
250         * @return Returns a reference to <code>this</code> for easy method chaining
251         */
252        public CareTeamParticipantComponent setRole(List<CodeableConcept> theRole) { 
253          this.role = theRole;
254          return this;
255        }
256
257        public boolean hasRole() { 
258          if (this.role == null)
259            return false;
260          for (CodeableConcept item : this.role)
261            if (!item.isEmpty())
262              return true;
263          return false;
264        }
265
266        public CodeableConcept addRole() { //3
267          CodeableConcept t = new CodeableConcept();
268          if (this.role == null)
269            this.role = new ArrayList<CodeableConcept>();
270          this.role.add(t);
271          return t;
272        }
273
274        public CareTeamParticipantComponent addRole(CodeableConcept t) { //3
275          if (t == null)
276            return this;
277          if (this.role == null)
278            this.role = new ArrayList<CodeableConcept>();
279          this.role.add(t);
280          return this;
281        }
282
283        /**
284         * @return The first repetition of repeating field {@link #role}, creating it if it does not already exist {3}
285         */
286        public CodeableConcept getRoleFirstRep() { 
287          if (getRole().isEmpty()) {
288            addRole();
289          }
290          return getRole().get(0);
291        }
292
293        /**
294         * @return {@link #member} (The specific person or organization who is participating/expected to participate in the care team.)
295         */
296        public Reference getMember() { 
297          if (this.member == null)
298            if (Configuration.errorOnAutoCreate())
299              throw new Error("Attempt to auto-create CareTeamParticipantComponent.member");
300            else if (Configuration.doAutoCreate())
301              this.member = new Reference(); // cc
302          return this.member;
303        }
304
305        public boolean hasMember() { 
306          return this.member != null && !this.member.isEmpty();
307        }
308
309        /**
310         * @param value {@link #member} (The specific person or organization who is participating/expected to participate in the care team.)
311         */
312        public CareTeamParticipantComponent setMember(Reference value) { 
313          this.member = value;
314          return this;
315        }
316
317        /**
318         * @return {@link #onBehalfOf} (The organization of the practitioner.)
319         */
320        public Reference getOnBehalfOf() { 
321          if (this.onBehalfOf == null)
322            if (Configuration.errorOnAutoCreate())
323              throw new Error("Attempt to auto-create CareTeamParticipantComponent.onBehalfOf");
324            else if (Configuration.doAutoCreate())
325              this.onBehalfOf = new Reference(); // cc
326          return this.onBehalfOf;
327        }
328
329        public boolean hasOnBehalfOf() { 
330          return this.onBehalfOf != null && !this.onBehalfOf.isEmpty();
331        }
332
333        /**
334         * @param value {@link #onBehalfOf} (The organization of the practitioner.)
335         */
336        public CareTeamParticipantComponent setOnBehalfOf(Reference value) { 
337          this.onBehalfOf = value;
338          return this;
339        }
340
341        /**
342         * @return {@link #period} (Indicates when the specific member or organization did (or is intended to) come into effect and end.)
343         */
344        public Period getPeriod() { 
345          if (this.period == null)
346            if (Configuration.errorOnAutoCreate())
347              throw new Error("Attempt to auto-create CareTeamParticipantComponent.period");
348            else if (Configuration.doAutoCreate())
349              this.period = new Period(); // cc
350          return this.period;
351        }
352
353        public boolean hasPeriod() { 
354          return this.period != null && !this.period.isEmpty();
355        }
356
357        /**
358         * @param value {@link #period} (Indicates when the specific member or organization did (or is intended to) come into effect and end.)
359         */
360        public CareTeamParticipantComponent setPeriod(Period value) { 
361          this.period = value;
362          return this;
363        }
364
365        protected void listChildren(List<Property> children) {
366          super.listChildren(children);
367          children.add(new Property("role", "CodeableConcept", "Indicates specific responsibility of an individual within the care team, such as \"Primary care physician\", \"Trained social worker counselor\", \"Caregiver\", etc.", 0, java.lang.Integer.MAX_VALUE, role));
368          children.add(new Property("member", "Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Organization|CareTeam)", "The specific person or organization who is participating/expected to participate in the care team.", 0, 1, member));
369          children.add(new Property("onBehalfOf", "Reference(Organization)", "The organization of the practitioner.", 0, 1, onBehalfOf));
370          children.add(new Property("period", "Period", "Indicates when the specific member or organization did (or is intended to) come into effect and end.", 0, 1, period));
371        }
372
373        @Override
374        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
375          switch (_hash) {
376          case 3506294: /*role*/  return new Property("role", "CodeableConcept", "Indicates specific responsibility of an individual within the care team, such as \"Primary care physician\", \"Trained social worker counselor\", \"Caregiver\", etc.", 0, java.lang.Integer.MAX_VALUE, role);
377          case -1077769574: /*member*/  return new Property("member", "Reference(Practitioner|PractitionerRole|RelatedPerson|Patient|Organization|CareTeam)", "The specific person or organization who is participating/expected to participate in the care team.", 0, 1, member);
378          case -14402964: /*onBehalfOf*/  return new Property("onBehalfOf", "Reference(Organization)", "The organization of the practitioner.", 0, 1, onBehalfOf);
379          case -991726143: /*period*/  return new Property("period", "Period", "Indicates when the specific member or organization did (or is intended to) come into effect and end.", 0, 1, period);
380          default: return super.getNamedProperty(_hash, _name, _checkValid);
381          }
382
383        }
384
385      @Override
386      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
387        switch (hash) {
388        case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept
389        case -1077769574: /*member*/ return this.member == null ? new Base[0] : new Base[] {this.member}; // Reference
390        case -14402964: /*onBehalfOf*/ return this.onBehalfOf == null ? new Base[0] : new Base[] {this.onBehalfOf}; // Reference
391        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
392        default: return super.getProperty(hash, name, checkValid);
393        }
394
395      }
396
397      @Override
398      public Base setProperty(int hash, String name, Base value) throws FHIRException {
399        switch (hash) {
400        case 3506294: // role
401          this.getRole().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
402          return value;
403        case -1077769574: // member
404          this.member = TypeConvertor.castToReference(value); // Reference
405          return value;
406        case -14402964: // onBehalfOf
407          this.onBehalfOf = TypeConvertor.castToReference(value); // Reference
408          return value;
409        case -991726143: // period
410          this.period = TypeConvertor.castToPeriod(value); // Period
411          return value;
412        default: return super.setProperty(hash, name, value);
413        }
414
415      }
416
417      @Override
418      public Base setProperty(String name, Base value) throws FHIRException {
419        if (name.equals("role")) {
420          this.getRole().add(TypeConvertor.castToCodeableConcept(value));
421        } else if (name.equals("member")) {
422          this.member = TypeConvertor.castToReference(value); // Reference
423        } else if (name.equals("onBehalfOf")) {
424          this.onBehalfOf = TypeConvertor.castToReference(value); // Reference
425        } else if (name.equals("period")) {
426          this.period = TypeConvertor.castToPeriod(value); // Period
427        } else
428          return super.setProperty(name, value);
429        return value;
430      }
431
432      @Override
433      public Base makeProperty(int hash, String name) throws FHIRException {
434        switch (hash) {
435        case 3506294:  return addRole(); 
436        case -1077769574:  return getMember();
437        case -14402964:  return getOnBehalfOf();
438        case -991726143:  return getPeriod();
439        default: return super.makeProperty(hash, name);
440        }
441
442      }
443
444      @Override
445      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
446        switch (hash) {
447        case 3506294: /*role*/ return new String[] {"CodeableConcept"};
448        case -1077769574: /*member*/ return new String[] {"Reference"};
449        case -14402964: /*onBehalfOf*/ return new String[] {"Reference"};
450        case -991726143: /*period*/ return new String[] {"Period"};
451        default: return super.getTypesForProperty(hash, name);
452        }
453
454      }
455
456      @Override
457      public Base addChild(String name) throws FHIRException {
458        if (name.equals("role")) {
459          return addRole();
460        }
461        else if (name.equals("member")) {
462          this.member = new Reference();
463          return this.member;
464        }
465        else if (name.equals("onBehalfOf")) {
466          this.onBehalfOf = new Reference();
467          return this.onBehalfOf;
468        }
469        else if (name.equals("period")) {
470          this.period = new Period();
471          return this.period;
472        }
473        else
474          return super.addChild(name);
475      }
476
477      public CareTeamParticipantComponent copy() {
478        CareTeamParticipantComponent dst = new CareTeamParticipantComponent();
479        copyValues(dst);
480        return dst;
481      }
482
483      public void copyValues(CareTeamParticipantComponent dst) {
484        super.copyValues(dst);
485        if (role != null) {
486          dst.role = new ArrayList<CodeableConcept>();
487          for (CodeableConcept i : role)
488            dst.role.add(i.copy());
489        };
490        dst.member = member == null ? null : member.copy();
491        dst.onBehalfOf = onBehalfOf == null ? null : onBehalfOf.copy();
492        dst.period = period == null ? null : period.copy();
493      }
494
495      @Override
496      public boolean equalsDeep(Base other_) {
497        if (!super.equalsDeep(other_))
498          return false;
499        if (!(other_ instanceof CareTeamParticipantComponent))
500          return false;
501        CareTeamParticipantComponent o = (CareTeamParticipantComponent) other_;
502        return compareDeep(role, o.role, true) && compareDeep(member, o.member, true) && compareDeep(onBehalfOf, o.onBehalfOf, true)
503           && compareDeep(period, o.period, true);
504      }
505
506      @Override
507      public boolean equalsShallow(Base other_) {
508        if (!super.equalsShallow(other_))
509          return false;
510        if (!(other_ instanceof CareTeamParticipantComponent))
511          return false;
512        CareTeamParticipantComponent o = (CareTeamParticipantComponent) other_;
513        return true;
514      }
515
516      public boolean isEmpty() {
517        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, member, onBehalfOf
518          , period);
519      }
520
521  public String fhirType() {
522    return "CareTeam.participant";
523
524  }
525
526  }
527
528    /**
529     * Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.
530     */
531    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
532    @Description(shortDefinition="External Ids for this team", formalDefinition="Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server." )
533    protected List<Identifier> identifier;
534
535    /**
536     * Indicates the current state of the care team.
537     */
538    @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true)
539    @Description(shortDefinition="proposed | active | suspended | inactive | entered-in-error", formalDefinition="Indicates the current state of the care team." )
540    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-team-status")
541    protected Enumeration<CareTeamStatus> status;
542
543    /**
544     * Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.
545     */
546    @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
547    @Description(shortDefinition="Type of team", formalDefinition="Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team." )
548    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-team-category")
549    protected List<CodeableConcept> category;
550
551    /**
552     * A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.
553     */
554    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
555    @Description(shortDefinition="Name of the team, such as crisis assessment team", formalDefinition="A label for human use intended to distinguish like teams.  E.g. the \"red\" vs. \"green\" trauma teams." )
556    protected StringType name;
557
558    /**
559     * Identifies the patient or group whose intended care is handled by the team.
560     */
561    @Child(name = "subject", type = {Patient.class, Group.class}, order=4, min=0, max=1, modifier=false, summary=true)
562    @Description(shortDefinition="Who care team is for", formalDefinition="Identifies the patient or group whose intended care is handled by the team." )
563    protected Reference subject;
564
565    /**
566     * The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.
567     */
568    @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=true)
569    @Description(shortDefinition="Encounter created as part of", formalDefinition="The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated." )
570    protected Reference encounter;
571
572    /**
573     * Indicates when the team did (or is intended to) come into effect and end.
574     */
575    @Child(name = "period", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true)
576    @Description(shortDefinition="Time period team covers", formalDefinition="Indicates when the team did (or is intended to) come into effect and end." )
577    protected Period period;
578
579    /**
580     * Identifies all people and organizations who are expected to be involved in the care team.
581     */
582    @Child(name = "participant", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
583    @Description(shortDefinition="Members of the team", formalDefinition="Identifies all people and organizations who are expected to be involved in the care team." )
584    protected List<CareTeamParticipantComponent> participant;
585
586    /**
587     * Describes why the care team exists.
588     */
589    @Child(name = "reasonCode", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
590    @Description(shortDefinition="Why the care team exists", formalDefinition="Describes why the care team exists." )
591    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
592    protected List<CodeableConcept> reasonCode;
593
594    /**
595     * Condition(s) that this care team addresses.
596     */
597    @Child(name = "reasonReference", type = {Condition.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
598    @Description(shortDefinition="Why the care team exists", formalDefinition="Condition(s) that this care team addresses." )
599    protected List<Reference> reasonReference;
600
601    /**
602     * The organization responsible for the care team.
603     */
604    @Child(name = "managingOrganization", type = {Organization.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
605    @Description(shortDefinition="Organization responsible for the care team", formalDefinition="The organization responsible for the care team." )
606    protected List<Reference> managingOrganization;
607
608    /**
609     * A central contact detail for the care team (that applies to all members).
610     */
611    @Child(name = "telecom", type = {ContactPoint.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
612    @Description(shortDefinition="A contact detail for the care team (that applies to all members)", formalDefinition="A central contact detail for the care team (that applies to all members)." )
613    protected List<ContactPoint> telecom;
614
615    /**
616     * Comments made about the CareTeam.
617     */
618    @Child(name = "note", type = {Annotation.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
619    @Description(shortDefinition="Comments made about the CareTeam", formalDefinition="Comments made about the CareTeam." )
620    protected List<Annotation> note;
621
622    private static final long serialVersionUID = 1473088622L;
623
624  /**
625   * Constructor
626   */
627    public CareTeam() {
628      super();
629    }
630
631    /**
632     * @return {@link #identifier} (Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.)
633     */
634    public List<Identifier> getIdentifier() { 
635      if (this.identifier == null)
636        this.identifier = new ArrayList<Identifier>();
637      return this.identifier;
638    }
639
640    /**
641     * @return Returns a reference to <code>this</code> for easy method chaining
642     */
643    public CareTeam setIdentifier(List<Identifier> theIdentifier) { 
644      this.identifier = theIdentifier;
645      return this;
646    }
647
648    public boolean hasIdentifier() { 
649      if (this.identifier == null)
650        return false;
651      for (Identifier item : this.identifier)
652        if (!item.isEmpty())
653          return true;
654      return false;
655    }
656
657    public Identifier addIdentifier() { //3
658      Identifier t = new Identifier();
659      if (this.identifier == null)
660        this.identifier = new ArrayList<Identifier>();
661      this.identifier.add(t);
662      return t;
663    }
664
665    public CareTeam addIdentifier(Identifier t) { //3
666      if (t == null)
667        return this;
668      if (this.identifier == null)
669        this.identifier = new ArrayList<Identifier>();
670      this.identifier.add(t);
671      return this;
672    }
673
674    /**
675     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
676     */
677    public Identifier getIdentifierFirstRep() { 
678      if (getIdentifier().isEmpty()) {
679        addIdentifier();
680      }
681      return getIdentifier().get(0);
682    }
683
684    /**
685     * @return {@link #status} (Indicates the current state of the care team.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
686     */
687    public Enumeration<CareTeamStatus> getStatusElement() { 
688      if (this.status == null)
689        if (Configuration.errorOnAutoCreate())
690          throw new Error("Attempt to auto-create CareTeam.status");
691        else if (Configuration.doAutoCreate())
692          this.status = new Enumeration<CareTeamStatus>(new CareTeamStatusEnumFactory()); // bb
693      return this.status;
694    }
695
696    public boolean hasStatusElement() { 
697      return this.status != null && !this.status.isEmpty();
698    }
699
700    public boolean hasStatus() { 
701      return this.status != null && !this.status.isEmpty();
702    }
703
704    /**
705     * @param value {@link #status} (Indicates the current state of the care team.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
706     */
707    public CareTeam setStatusElement(Enumeration<CareTeamStatus> value) { 
708      this.status = value;
709      return this;
710    }
711
712    /**
713     * @return Indicates the current state of the care team.
714     */
715    public CareTeamStatus getStatus() { 
716      return this.status == null ? null : this.status.getValue();
717    }
718
719    /**
720     * @param value Indicates the current state of the care team.
721     */
722    public CareTeam setStatus(CareTeamStatus value) { 
723      if (value == null)
724        this.status = null;
725      else {
726        if (this.status == null)
727          this.status = new Enumeration<CareTeamStatus>(new CareTeamStatusEnumFactory());
728        this.status.setValue(value);
729      }
730      return this;
731    }
732
733    /**
734     * @return {@link #category} (Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.)
735     */
736    public List<CodeableConcept> getCategory() { 
737      if (this.category == null)
738        this.category = new ArrayList<CodeableConcept>();
739      return this.category;
740    }
741
742    /**
743     * @return Returns a reference to <code>this</code> for easy method chaining
744     */
745    public CareTeam setCategory(List<CodeableConcept> theCategory) { 
746      this.category = theCategory;
747      return this;
748    }
749
750    public boolean hasCategory() { 
751      if (this.category == null)
752        return false;
753      for (CodeableConcept item : this.category)
754        if (!item.isEmpty())
755          return true;
756      return false;
757    }
758
759    public CodeableConcept addCategory() { //3
760      CodeableConcept t = new CodeableConcept();
761      if (this.category == null)
762        this.category = new ArrayList<CodeableConcept>();
763      this.category.add(t);
764      return t;
765    }
766
767    public CareTeam addCategory(CodeableConcept t) { //3
768      if (t == null)
769        return this;
770      if (this.category == null)
771        this.category = new ArrayList<CodeableConcept>();
772      this.category.add(t);
773      return this;
774    }
775
776    /**
777     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
778     */
779    public CodeableConcept getCategoryFirstRep() { 
780      if (getCategory().isEmpty()) {
781        addCategory();
782      }
783      return getCategory().get(0);
784    }
785
786    /**
787     * @return {@link #name} (A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
788     */
789    public StringType getNameElement() { 
790      if (this.name == null)
791        if (Configuration.errorOnAutoCreate())
792          throw new Error("Attempt to auto-create CareTeam.name");
793        else if (Configuration.doAutoCreate())
794          this.name = new StringType(); // bb
795      return this.name;
796    }
797
798    public boolean hasNameElement() { 
799      return this.name != null && !this.name.isEmpty();
800    }
801
802    public boolean hasName() { 
803      return this.name != null && !this.name.isEmpty();
804    }
805
806    /**
807     * @param value {@link #name} (A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
808     */
809    public CareTeam setNameElement(StringType value) { 
810      this.name = value;
811      return this;
812    }
813
814    /**
815     * @return A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.
816     */
817    public String getName() { 
818      return this.name == null ? null : this.name.getValue();
819    }
820
821    /**
822     * @param value A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.
823     */
824    public CareTeam setName(String value) { 
825      if (Utilities.noString(value))
826        this.name = null;
827      else {
828        if (this.name == null)
829          this.name = new StringType();
830        this.name.setValue(value);
831      }
832      return this;
833    }
834
835    /**
836     * @return {@link #subject} (Identifies the patient or group whose intended care is handled by the team.)
837     */
838    public Reference getSubject() { 
839      if (this.subject == null)
840        if (Configuration.errorOnAutoCreate())
841          throw new Error("Attempt to auto-create CareTeam.subject");
842        else if (Configuration.doAutoCreate())
843          this.subject = new Reference(); // cc
844      return this.subject;
845    }
846
847    public boolean hasSubject() { 
848      return this.subject != null && !this.subject.isEmpty();
849    }
850
851    /**
852     * @param value {@link #subject} (Identifies the patient or group whose intended care is handled by the team.)
853     */
854    public CareTeam setSubject(Reference value) { 
855      this.subject = value;
856      return this;
857    }
858
859    /**
860     * @return {@link #encounter} (The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.)
861     */
862    public Reference getEncounter() { 
863      if (this.encounter == null)
864        if (Configuration.errorOnAutoCreate())
865          throw new Error("Attempt to auto-create CareTeam.encounter");
866        else if (Configuration.doAutoCreate())
867          this.encounter = new Reference(); // cc
868      return this.encounter;
869    }
870
871    public boolean hasEncounter() { 
872      return this.encounter != null && !this.encounter.isEmpty();
873    }
874
875    /**
876     * @param value {@link #encounter} (The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.)
877     */
878    public CareTeam setEncounter(Reference value) { 
879      this.encounter = value;
880      return this;
881    }
882
883    /**
884     * @return {@link #period} (Indicates when the team did (or is intended to) come into effect and end.)
885     */
886    public Period getPeriod() { 
887      if (this.period == null)
888        if (Configuration.errorOnAutoCreate())
889          throw new Error("Attempt to auto-create CareTeam.period");
890        else if (Configuration.doAutoCreate())
891          this.period = new Period(); // cc
892      return this.period;
893    }
894
895    public boolean hasPeriod() { 
896      return this.period != null && !this.period.isEmpty();
897    }
898
899    /**
900     * @param value {@link #period} (Indicates when the team did (or is intended to) come into effect and end.)
901     */
902    public CareTeam setPeriod(Period value) { 
903      this.period = value;
904      return this;
905    }
906
907    /**
908     * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care team.)
909     */
910    public List<CareTeamParticipantComponent> getParticipant() { 
911      if (this.participant == null)
912        this.participant = new ArrayList<CareTeamParticipantComponent>();
913      return this.participant;
914    }
915
916    /**
917     * @return Returns a reference to <code>this</code> for easy method chaining
918     */
919    public CareTeam setParticipant(List<CareTeamParticipantComponent> theParticipant) { 
920      this.participant = theParticipant;
921      return this;
922    }
923
924    public boolean hasParticipant() { 
925      if (this.participant == null)
926        return false;
927      for (CareTeamParticipantComponent item : this.participant)
928        if (!item.isEmpty())
929          return true;
930      return false;
931    }
932
933    public CareTeamParticipantComponent addParticipant() { //3
934      CareTeamParticipantComponent t = new CareTeamParticipantComponent();
935      if (this.participant == null)
936        this.participant = new ArrayList<CareTeamParticipantComponent>();
937      this.participant.add(t);
938      return t;
939    }
940
941    public CareTeam addParticipant(CareTeamParticipantComponent t) { //3
942      if (t == null)
943        return this;
944      if (this.participant == null)
945        this.participant = new ArrayList<CareTeamParticipantComponent>();
946      this.participant.add(t);
947      return this;
948    }
949
950    /**
951     * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3}
952     */
953    public CareTeamParticipantComponent getParticipantFirstRep() { 
954      if (getParticipant().isEmpty()) {
955        addParticipant();
956      }
957      return getParticipant().get(0);
958    }
959
960    /**
961     * @return {@link #reasonCode} (Describes why the care team exists.)
962     */
963    public List<CodeableConcept> getReasonCode() { 
964      if (this.reasonCode == null)
965        this.reasonCode = new ArrayList<CodeableConcept>();
966      return this.reasonCode;
967    }
968
969    /**
970     * @return Returns a reference to <code>this</code> for easy method chaining
971     */
972    public CareTeam setReasonCode(List<CodeableConcept> theReasonCode) { 
973      this.reasonCode = theReasonCode;
974      return this;
975    }
976
977    public boolean hasReasonCode() { 
978      if (this.reasonCode == null)
979        return false;
980      for (CodeableConcept item : this.reasonCode)
981        if (!item.isEmpty())
982          return true;
983      return false;
984    }
985
986    public CodeableConcept addReasonCode() { //3
987      CodeableConcept t = new CodeableConcept();
988      if (this.reasonCode == null)
989        this.reasonCode = new ArrayList<CodeableConcept>();
990      this.reasonCode.add(t);
991      return t;
992    }
993
994    public CareTeam addReasonCode(CodeableConcept t) { //3
995      if (t == null)
996        return this;
997      if (this.reasonCode == null)
998        this.reasonCode = new ArrayList<CodeableConcept>();
999      this.reasonCode.add(t);
1000      return this;
1001    }
1002
1003    /**
1004     * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist {3}
1005     */
1006    public CodeableConcept getReasonCodeFirstRep() { 
1007      if (getReasonCode().isEmpty()) {
1008        addReasonCode();
1009      }
1010      return getReasonCode().get(0);
1011    }
1012
1013    /**
1014     * @return {@link #reasonReference} (Condition(s) that this care team addresses.)
1015     */
1016    public List<Reference> getReasonReference() { 
1017      if (this.reasonReference == null)
1018        this.reasonReference = new ArrayList<Reference>();
1019      return this.reasonReference;
1020    }
1021
1022    /**
1023     * @return Returns a reference to <code>this</code> for easy method chaining
1024     */
1025    public CareTeam setReasonReference(List<Reference> theReasonReference) { 
1026      this.reasonReference = theReasonReference;
1027      return this;
1028    }
1029
1030    public boolean hasReasonReference() { 
1031      if (this.reasonReference == null)
1032        return false;
1033      for (Reference item : this.reasonReference)
1034        if (!item.isEmpty())
1035          return true;
1036      return false;
1037    }
1038
1039    public Reference addReasonReference() { //3
1040      Reference t = new Reference();
1041      if (this.reasonReference == null)
1042        this.reasonReference = new ArrayList<Reference>();
1043      this.reasonReference.add(t);
1044      return t;
1045    }
1046
1047    public CareTeam addReasonReference(Reference t) { //3
1048      if (t == null)
1049        return this;
1050      if (this.reasonReference == null)
1051        this.reasonReference = new ArrayList<Reference>();
1052      this.reasonReference.add(t);
1053      return this;
1054    }
1055
1056    /**
1057     * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist {3}
1058     */
1059    public Reference getReasonReferenceFirstRep() { 
1060      if (getReasonReference().isEmpty()) {
1061        addReasonReference();
1062      }
1063      return getReasonReference().get(0);
1064    }
1065
1066    /**
1067     * @return {@link #managingOrganization} (The organization responsible for the care team.)
1068     */
1069    public List<Reference> getManagingOrganization() { 
1070      if (this.managingOrganization == null)
1071        this.managingOrganization = new ArrayList<Reference>();
1072      return this.managingOrganization;
1073    }
1074
1075    /**
1076     * @return Returns a reference to <code>this</code> for easy method chaining
1077     */
1078    public CareTeam setManagingOrganization(List<Reference> theManagingOrganization) { 
1079      this.managingOrganization = theManagingOrganization;
1080      return this;
1081    }
1082
1083    public boolean hasManagingOrganization() { 
1084      if (this.managingOrganization == null)
1085        return false;
1086      for (Reference item : this.managingOrganization)
1087        if (!item.isEmpty())
1088          return true;
1089      return false;
1090    }
1091
1092    public Reference addManagingOrganization() { //3
1093      Reference t = new Reference();
1094      if (this.managingOrganization == null)
1095        this.managingOrganization = new ArrayList<Reference>();
1096      this.managingOrganization.add(t);
1097      return t;
1098    }
1099
1100    public CareTeam addManagingOrganization(Reference t) { //3
1101      if (t == null)
1102        return this;
1103      if (this.managingOrganization == null)
1104        this.managingOrganization = new ArrayList<Reference>();
1105      this.managingOrganization.add(t);
1106      return this;
1107    }
1108
1109    /**
1110     * @return The first repetition of repeating field {@link #managingOrganization}, creating it if it does not already exist {3}
1111     */
1112    public Reference getManagingOrganizationFirstRep() { 
1113      if (getManagingOrganization().isEmpty()) {
1114        addManagingOrganization();
1115      }
1116      return getManagingOrganization().get(0);
1117    }
1118
1119    /**
1120     * @return {@link #telecom} (A central contact detail for the care team (that applies to all members).)
1121     */
1122    public List<ContactPoint> getTelecom() { 
1123      if (this.telecom == null)
1124        this.telecom = new ArrayList<ContactPoint>();
1125      return this.telecom;
1126    }
1127
1128    /**
1129     * @return Returns a reference to <code>this</code> for easy method chaining
1130     */
1131    public CareTeam setTelecom(List<ContactPoint> theTelecom) { 
1132      this.telecom = theTelecom;
1133      return this;
1134    }
1135
1136    public boolean hasTelecom() { 
1137      if (this.telecom == null)
1138        return false;
1139      for (ContactPoint item : this.telecom)
1140        if (!item.isEmpty())
1141          return true;
1142      return false;
1143    }
1144
1145    public ContactPoint addTelecom() { //3
1146      ContactPoint t = new ContactPoint();
1147      if (this.telecom == null)
1148        this.telecom = new ArrayList<ContactPoint>();
1149      this.telecom.add(t);
1150      return t;
1151    }
1152
1153    public CareTeam addTelecom(ContactPoint t) { //3
1154      if (t == null)
1155        return this;
1156      if (this.telecom == null)
1157        this.telecom = new ArrayList<ContactPoint>();
1158      this.telecom.add(t);
1159      return this;
1160    }
1161
1162    /**
1163     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist {3}
1164     */
1165    public ContactPoint getTelecomFirstRep() { 
1166      if (getTelecom().isEmpty()) {
1167        addTelecom();
1168      }
1169      return getTelecom().get(0);
1170    }
1171
1172    /**
1173     * @return {@link #note} (Comments made about the CareTeam.)
1174     */
1175    public List<Annotation> getNote() { 
1176      if (this.note == null)
1177        this.note = new ArrayList<Annotation>();
1178      return this.note;
1179    }
1180
1181    /**
1182     * @return Returns a reference to <code>this</code> for easy method chaining
1183     */
1184    public CareTeam setNote(List<Annotation> theNote) { 
1185      this.note = theNote;
1186      return this;
1187    }
1188
1189    public boolean hasNote() { 
1190      if (this.note == null)
1191        return false;
1192      for (Annotation item : this.note)
1193        if (!item.isEmpty())
1194          return true;
1195      return false;
1196    }
1197
1198    public Annotation addNote() { //3
1199      Annotation t = new Annotation();
1200      if (this.note == null)
1201        this.note = new ArrayList<Annotation>();
1202      this.note.add(t);
1203      return t;
1204    }
1205
1206    public CareTeam addNote(Annotation t) { //3
1207      if (t == null)
1208        return this;
1209      if (this.note == null)
1210        this.note = new ArrayList<Annotation>();
1211      this.note.add(t);
1212      return this;
1213    }
1214
1215    /**
1216     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1217     */
1218    public Annotation getNoteFirstRep() { 
1219      if (getNote().isEmpty()) {
1220        addNote();
1221      }
1222      return getNote().get(0);
1223    }
1224
1225      protected void listChildren(List<Property> children) {
1226        super.listChildren(children);
1227        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1228        children.add(new Property("status", "code", "Indicates the current state of the care team.", 0, 1, status));
1229        children.add(new Property("category", "CodeableConcept", "Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.", 0, java.lang.Integer.MAX_VALUE, category));
1230        children.add(new Property("name", "string", "A label for human use intended to distinguish like teams.  E.g. the \"red\" vs. \"green\" trauma teams.", 0, 1, name));
1231        children.add(new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is handled by the team.", 0, 1, subject));
1232        children.add(new Property("encounter", "Reference(Encounter)", "The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.", 0, 1, encounter));
1233        children.add(new Property("period", "Period", "Indicates when the team did (or is intended to) come into effect and end.", 0, 1, period));
1234        children.add(new Property("participant", "", "Identifies all people and organizations who are expected to be involved in the care team.", 0, java.lang.Integer.MAX_VALUE, participant));
1235        children.add(new Property("reasonCode", "CodeableConcept", "Describes why the care team exists.", 0, java.lang.Integer.MAX_VALUE, reasonCode));
1236        children.add(new Property("reasonReference", "Reference(Condition)", "Condition(s) that this care team addresses.", 0, java.lang.Integer.MAX_VALUE, reasonReference));
1237        children.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the care team.", 0, java.lang.Integer.MAX_VALUE, managingOrganization));
1238        children.add(new Property("telecom", "ContactPoint", "A central contact detail for the care team (that applies to all members).", 0, java.lang.Integer.MAX_VALUE, telecom));
1239        children.add(new Property("note", "Annotation", "Comments made about the CareTeam.", 0, java.lang.Integer.MAX_VALUE, note));
1240      }
1241
1242      @Override
1243      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1244        switch (_hash) {
1245        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
1246        case -892481550: /*status*/  return new Property("status", "code", "Indicates the current state of the care team.", 0, 1, status);
1247        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Identifies what kind of team.  This is to support differentiation between multiple co-existing teams, such as care plan team, episode of care team, longitudinal care team.", 0, java.lang.Integer.MAX_VALUE, category);
1248        case 3373707: /*name*/  return new Property("name", "string", "A label for human use intended to distinguish like teams.  E.g. the \"red\" vs. \"green\" trauma teams.", 0, 1, name);
1249        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is handled by the team.", 0, 1, subject);
1250        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The Encounter during which this CareTeam was created or to which the creation of this record is tightly associated.", 0, 1, encounter);
1251        case -991726143: /*period*/  return new Property("period", "Period", "Indicates when the team did (or is intended to) come into effect and end.", 0, 1, period);
1252        case 767422259: /*participant*/  return new Property("participant", "", "Identifies all people and organizations who are expected to be involved in the care team.", 0, java.lang.Integer.MAX_VALUE, participant);
1253        case 722137681: /*reasonCode*/  return new Property("reasonCode", "CodeableConcept", "Describes why the care team exists.", 0, java.lang.Integer.MAX_VALUE, reasonCode);
1254        case -1146218137: /*reasonReference*/  return new Property("reasonReference", "Reference(Condition)", "Condition(s) that this care team addresses.", 0, java.lang.Integer.MAX_VALUE, reasonReference);
1255        case -2058947787: /*managingOrganization*/  return new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the care team.", 0, java.lang.Integer.MAX_VALUE, managingOrganization);
1256        case -1429363305: /*telecom*/  return new Property("telecom", "ContactPoint", "A central contact detail for the care team (that applies to all members).", 0, java.lang.Integer.MAX_VALUE, telecom);
1257        case 3387378: /*note*/  return new Property("note", "Annotation", "Comments made about the CareTeam.", 0, java.lang.Integer.MAX_VALUE, note);
1258        default: return super.getNamedProperty(_hash, _name, _checkValid);
1259        }
1260
1261      }
1262
1263      @Override
1264      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1265        switch (hash) {
1266        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1267        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CareTeamStatus>
1268        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1269        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1270        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1271        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1272        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
1273        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // CareTeamParticipantComponent
1274        case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept
1275        case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference
1276        case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : this.managingOrganization.toArray(new Base[this.managingOrganization.size()]); // Reference
1277        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
1278        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1279        default: return super.getProperty(hash, name, checkValid);
1280        }
1281
1282      }
1283
1284      @Override
1285      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1286        switch (hash) {
1287        case -1618432855: // identifier
1288          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1289          return value;
1290        case -892481550: // status
1291          value = new CareTeamStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1292          this.status = (Enumeration) value; // Enumeration<CareTeamStatus>
1293          return value;
1294        case 50511102: // category
1295          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1296          return value;
1297        case 3373707: // name
1298          this.name = TypeConvertor.castToString(value); // StringType
1299          return value;
1300        case -1867885268: // subject
1301          this.subject = TypeConvertor.castToReference(value); // Reference
1302          return value;
1303        case 1524132147: // encounter
1304          this.encounter = TypeConvertor.castToReference(value); // Reference
1305          return value;
1306        case -991726143: // period
1307          this.period = TypeConvertor.castToPeriod(value); // Period
1308          return value;
1309        case 767422259: // participant
1310          this.getParticipant().add((CareTeamParticipantComponent) value); // CareTeamParticipantComponent
1311          return value;
1312        case 722137681: // reasonCode
1313          this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1314          return value;
1315        case -1146218137: // reasonReference
1316          this.getReasonReference().add(TypeConvertor.castToReference(value)); // Reference
1317          return value;
1318        case -2058947787: // managingOrganization
1319          this.getManagingOrganization().add(TypeConvertor.castToReference(value)); // Reference
1320          return value;
1321        case -1429363305: // telecom
1322          this.getTelecom().add(TypeConvertor.castToContactPoint(value)); // ContactPoint
1323          return value;
1324        case 3387378: // note
1325          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1326          return value;
1327        default: return super.setProperty(hash, name, value);
1328        }
1329
1330      }
1331
1332      @Override
1333      public Base setProperty(String name, Base value) throws FHIRException {
1334        if (name.equals("identifier")) {
1335          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1336        } else if (name.equals("status")) {
1337          value = new CareTeamStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1338          this.status = (Enumeration) value; // Enumeration<CareTeamStatus>
1339        } else if (name.equals("category")) {
1340          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
1341        } else if (name.equals("name")) {
1342          this.name = TypeConvertor.castToString(value); // StringType
1343        } else if (name.equals("subject")) {
1344          this.subject = TypeConvertor.castToReference(value); // Reference
1345        } else if (name.equals("encounter")) {
1346          this.encounter = TypeConvertor.castToReference(value); // Reference
1347        } else if (name.equals("period")) {
1348          this.period = TypeConvertor.castToPeriod(value); // Period
1349        } else if (name.equals("participant")) {
1350          this.getParticipant().add((CareTeamParticipantComponent) value);
1351        } else if (name.equals("reasonCode")) {
1352          this.getReasonCode().add(TypeConvertor.castToCodeableConcept(value));
1353        } else if (name.equals("reasonReference")) {
1354          this.getReasonReference().add(TypeConvertor.castToReference(value));
1355        } else if (name.equals("managingOrganization")) {
1356          this.getManagingOrganization().add(TypeConvertor.castToReference(value));
1357        } else if (name.equals("telecom")) {
1358          this.getTelecom().add(TypeConvertor.castToContactPoint(value));
1359        } else if (name.equals("note")) {
1360          this.getNote().add(TypeConvertor.castToAnnotation(value));
1361        } else
1362          return super.setProperty(name, value);
1363        return value;
1364      }
1365
1366      @Override
1367      public Base makeProperty(int hash, String name) throws FHIRException {
1368        switch (hash) {
1369        case -1618432855:  return addIdentifier(); 
1370        case -892481550:  return getStatusElement();
1371        case 50511102:  return addCategory(); 
1372        case 3373707:  return getNameElement();
1373        case -1867885268:  return getSubject();
1374        case 1524132147:  return getEncounter();
1375        case -991726143:  return getPeriod();
1376        case 767422259:  return addParticipant(); 
1377        case 722137681:  return addReasonCode(); 
1378        case -1146218137:  return addReasonReference(); 
1379        case -2058947787:  return addManagingOrganization(); 
1380        case -1429363305:  return addTelecom(); 
1381        case 3387378:  return addNote(); 
1382        default: return super.makeProperty(hash, name);
1383        }
1384
1385      }
1386
1387      @Override
1388      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1389        switch (hash) {
1390        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1391        case -892481550: /*status*/ return new String[] {"code"};
1392        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1393        case 3373707: /*name*/ return new String[] {"string"};
1394        case -1867885268: /*subject*/ return new String[] {"Reference"};
1395        case 1524132147: /*encounter*/ return new String[] {"Reference"};
1396        case -991726143: /*period*/ return new String[] {"Period"};
1397        case 767422259: /*participant*/ return new String[] {};
1398        case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"};
1399        case -1146218137: /*reasonReference*/ return new String[] {"Reference"};
1400        case -2058947787: /*managingOrganization*/ return new String[] {"Reference"};
1401        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
1402        case 3387378: /*note*/ return new String[] {"Annotation"};
1403        default: return super.getTypesForProperty(hash, name);
1404        }
1405
1406      }
1407
1408      @Override
1409      public Base addChild(String name) throws FHIRException {
1410        if (name.equals("identifier")) {
1411          return addIdentifier();
1412        }
1413        else if (name.equals("status")) {
1414          throw new FHIRException("Cannot call addChild on a primitive type CareTeam.status");
1415        }
1416        else if (name.equals("category")) {
1417          return addCategory();
1418        }
1419        else if (name.equals("name")) {
1420          throw new FHIRException("Cannot call addChild on a primitive type CareTeam.name");
1421        }
1422        else if (name.equals("subject")) {
1423          this.subject = new Reference();
1424          return this.subject;
1425        }
1426        else if (name.equals("encounter")) {
1427          this.encounter = new Reference();
1428          return this.encounter;
1429        }
1430        else if (name.equals("period")) {
1431          this.period = new Period();
1432          return this.period;
1433        }
1434        else if (name.equals("participant")) {
1435          return addParticipant();
1436        }
1437        else if (name.equals("reasonCode")) {
1438          return addReasonCode();
1439        }
1440        else if (name.equals("reasonReference")) {
1441          return addReasonReference();
1442        }
1443        else if (name.equals("managingOrganization")) {
1444          return addManagingOrganization();
1445        }
1446        else if (name.equals("telecom")) {
1447          return addTelecom();
1448        }
1449        else if (name.equals("note")) {
1450          return addNote();
1451        }
1452        else
1453          return super.addChild(name);
1454      }
1455
1456  public String fhirType() {
1457    return "CareTeam";
1458
1459  }
1460
1461      public CareTeam copy() {
1462        CareTeam dst = new CareTeam();
1463        copyValues(dst);
1464        return dst;
1465      }
1466
1467      public void copyValues(CareTeam dst) {
1468        super.copyValues(dst);
1469        if (identifier != null) {
1470          dst.identifier = new ArrayList<Identifier>();
1471          for (Identifier i : identifier)
1472            dst.identifier.add(i.copy());
1473        };
1474        dst.status = status == null ? null : status.copy();
1475        if (category != null) {
1476          dst.category = new ArrayList<CodeableConcept>();
1477          for (CodeableConcept i : category)
1478            dst.category.add(i.copy());
1479        };
1480        dst.name = name == null ? null : name.copy();
1481        dst.subject = subject == null ? null : subject.copy();
1482        dst.encounter = encounter == null ? null : encounter.copy();
1483        dst.period = period == null ? null : period.copy();
1484        if (participant != null) {
1485          dst.participant = new ArrayList<CareTeamParticipantComponent>();
1486          for (CareTeamParticipantComponent i : participant)
1487            dst.participant.add(i.copy());
1488        };
1489        if (reasonCode != null) {
1490          dst.reasonCode = new ArrayList<CodeableConcept>();
1491          for (CodeableConcept i : reasonCode)
1492            dst.reasonCode.add(i.copy());
1493        };
1494        if (reasonReference != null) {
1495          dst.reasonReference = new ArrayList<Reference>();
1496          for (Reference i : reasonReference)
1497            dst.reasonReference.add(i.copy());
1498        };
1499        if (managingOrganization != null) {
1500          dst.managingOrganization = new ArrayList<Reference>();
1501          for (Reference i : managingOrganization)
1502            dst.managingOrganization.add(i.copy());
1503        };
1504        if (telecom != null) {
1505          dst.telecom = new ArrayList<ContactPoint>();
1506          for (ContactPoint i : telecom)
1507            dst.telecom.add(i.copy());
1508        };
1509        if (note != null) {
1510          dst.note = new ArrayList<Annotation>();
1511          for (Annotation i : note)
1512            dst.note.add(i.copy());
1513        };
1514      }
1515
1516      protected CareTeam typedCopy() {
1517        return copy();
1518      }
1519
1520      @Override
1521      public boolean equalsDeep(Base other_) {
1522        if (!super.equalsDeep(other_))
1523          return false;
1524        if (!(other_ instanceof CareTeam))
1525          return false;
1526        CareTeam o = (CareTeam) other_;
1527        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(category, o.category, true)
1528           && compareDeep(name, o.name, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true)
1529           && compareDeep(period, o.period, true) && compareDeep(participant, o.participant, true) && compareDeep(reasonCode, o.reasonCode, true)
1530           && compareDeep(reasonReference, o.reasonReference, true) && compareDeep(managingOrganization, o.managingOrganization, true)
1531           && compareDeep(telecom, o.telecom, true) && compareDeep(note, o.note, true);
1532      }
1533
1534      @Override
1535      public boolean equalsShallow(Base other_) {
1536        if (!super.equalsShallow(other_))
1537          return false;
1538        if (!(other_ instanceof CareTeam))
1539          return false;
1540        CareTeam o = (CareTeam) other_;
1541        return compareValues(status, o.status, true) && compareValues(name, o.name, true);
1542      }
1543
1544      public boolean isEmpty() {
1545        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, category
1546          , name, subject, encounter, period, participant, reasonCode, reasonReference, managingOrganization
1547          , telecom, note);
1548      }
1549
1550  @Override
1551  public ResourceType getResourceType() {
1552    return ResourceType.CareTeam;
1553   }
1554
1555 /**
1556   * Search parameter: <b>category</b>
1557   * <p>
1558   * Description: <b>Type of team</b><br>
1559   * Type: <b>token</b><br>
1560   * Path: <b>CareTeam.category</b><br>
1561   * </p>
1562   */
1563  @SearchParamDefinition(name="category", path="CareTeam.category", description="Type of team", type="token" )
1564  public static final String SP_CATEGORY = "category";
1565 /**
1566   * <b>Fluent Client</b> search parameter constant for <b>category</b>
1567   * <p>
1568   * Description: <b>Type of team</b><br>
1569   * Type: <b>token</b><br>
1570   * Path: <b>CareTeam.category</b><br>
1571   * </p>
1572   */
1573  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
1574
1575 /**
1576   * Search parameter: <b>encounter</b>
1577   * <p>
1578   * Description: <b>Encounter created as part of</b><br>
1579   * Type: <b>reference</b><br>
1580   * Path: <b>CareTeam.encounter</b><br>
1581   * </p>
1582   */
1583  @SearchParamDefinition(name="encounter", path="CareTeam.encounter", description="Encounter created as part of", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
1584  public static final String SP_ENCOUNTER = "encounter";
1585 /**
1586   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
1587   * <p>
1588   * Description: <b>Encounter created as part of</b><br>
1589   * Type: <b>reference</b><br>
1590   * Path: <b>CareTeam.encounter</b><br>
1591   * </p>
1592   */
1593  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
1594
1595/**
1596   * Constant for fluent queries to be used to add include statements. Specifies
1597   * the path value of "<b>CareTeam:encounter</b>".
1598   */
1599  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("CareTeam:encounter").toLocked();
1600
1601 /**
1602   * Search parameter: <b>participant</b>
1603   * <p>
1604   * Description: <b>Who is involved</b><br>
1605   * Type: <b>reference</b><br>
1606   * Path: <b>CareTeam.participant.member</b><br>
1607   * </p>
1608   */
1609  @SearchParamDefinition(name="participant", path="CareTeam.participant.member", description="Who is involved", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
1610  public static final String SP_PARTICIPANT = "participant";
1611 /**
1612   * <b>Fluent Client</b> search parameter constant for <b>participant</b>
1613   * <p>
1614   * Description: <b>Who is involved</b><br>
1615   * Type: <b>reference</b><br>
1616   * Path: <b>CareTeam.participant.member</b><br>
1617   * </p>
1618   */
1619  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT);
1620
1621/**
1622   * Constant for fluent queries to be used to add include statements. Specifies
1623   * the path value of "<b>CareTeam:participant</b>".
1624   */
1625  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("CareTeam:participant").toLocked();
1626
1627 /**
1628   * Search parameter: <b>status</b>
1629   * <p>
1630   * Description: <b>proposed | active | suspended | inactive | entered-in-error</b><br>
1631   * Type: <b>token</b><br>
1632   * Path: <b>CareTeam.status</b><br>
1633   * </p>
1634   */
1635  @SearchParamDefinition(name="status", path="CareTeam.status", description="proposed | active | suspended | inactive | entered-in-error", type="token" )
1636  public static final String SP_STATUS = "status";
1637 /**
1638   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1639   * <p>
1640   * Description: <b>proposed | active | suspended | inactive | entered-in-error</b><br>
1641   * Type: <b>token</b><br>
1642   * Path: <b>CareTeam.status</b><br>
1643   * </p>
1644   */
1645  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1646
1647 /**
1648   * Search parameter: <b>subject</b>
1649   * <p>
1650   * Description: <b>Who care team is for</b><br>
1651   * Type: <b>reference</b><br>
1652   * Path: <b>CareTeam.subject</b><br>
1653   * </p>
1654   */
1655  @SearchParamDefinition(name="subject", path="CareTeam.subject", description="Who care team is for", type="reference", target={Group.class, Patient.class } )
1656  public static final String SP_SUBJECT = "subject";
1657 /**
1658   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1659   * <p>
1660   * Description: <b>Who care team is for</b><br>
1661   * Type: <b>reference</b><br>
1662   * Path: <b>CareTeam.subject</b><br>
1663   * </p>
1664   */
1665  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1666
1667/**
1668   * Constant for fluent queries to be used to add include statements. Specifies
1669   * the path value of "<b>CareTeam:subject</b>".
1670   */
1671  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("CareTeam:subject").toLocked();
1672
1673 /**
1674   * Search parameter: <b>date</b>
1675   * <p>
1676   * Description: <b>Multiple Resources: 
1677
1678* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1679* [CarePlan](careplan.html): Time period plan covers
1680* [CareTeam](careteam.html): Time period team covers
1681* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1682* [Composition](composition.html): Composition editing time
1683* [Consent](consent.html): When this Consent was created or indexed
1684* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1685* [Encounter](encounter.html): A date within the period the Encounter lasted
1686* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1687* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1688* [Flag](flag.html): Time period when flag is active
1689* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1690* [List](list.html): When the list was prepared
1691* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
1692* [Procedure](procedure.html): When the procedure was performed
1693* [RiskAssessment](riskassessment.html): When was assessment made?
1694* [SupplyRequest](supplyrequest.html): When the request was made
1695</b><br>
1696   * Type: <b>date</b><br>
1697   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
1698   * </p>
1699   */
1700  @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): Time period team covers\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When this Consent was created or indexed\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [Encounter](encounter.html): A date within the period 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* [List](list.html): When the list was prepared\r\n* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period\r\n* [Procedure](procedure.html): When the procedure was performed\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
1701  public static final String SP_DATE = "date";
1702 /**
1703   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1704   * <p>
1705   * Description: <b>Multiple Resources: 
1706
1707* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1708* [CarePlan](careplan.html): Time period plan covers
1709* [CareTeam](careteam.html): Time period team covers
1710* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1711* [Composition](composition.html): Composition editing time
1712* [Consent](consent.html): When this Consent was created or indexed
1713* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1714* [Encounter](encounter.html): A date within the period the Encounter lasted
1715* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1716* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1717* [Flag](flag.html): Time period when flag is active
1718* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1719* [List](list.html): When the list was prepared
1720* [Observation](observation.html): Obtained date/time. If the obtained element is a period, a date that falls in the period
1721* [Procedure](procedure.html): When the procedure was performed
1722* [RiskAssessment](riskassessment.html): When was assessment made?
1723* [SupplyRequest](supplyrequest.html): When the request was made
1724</b><br>
1725   * Type: <b>date</b><br>
1726   * Path: <b>AllergyIntolerance.recordedDate | CarePlan.period | CareTeam.period | ClinicalImpression.date | Composition.date | Consent.dateTime | DiagnosticReport.effective | Encounter.period | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | Immunization.occurrence | List.date | Observation.effective | Procedure.performed | (RiskAssessment.occurrence as dateTime) | SupplyRequest.authoredOn</b><br>
1727   * </p>
1728   */
1729  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1730
1731 /**
1732   * Search parameter: <b>identifier</b>
1733   * <p>
1734   * Description: <b>Multiple Resources: 
1735
1736* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1737* [CarePlan](careplan.html): External Ids for this plan
1738* [CareTeam](careteam.html): External Ids for this team
1739* [Composition](composition.html): Version-independent identifier for the Composition
1740* [Condition](condition.html): A unique identifier of the condition record
1741* [Consent](consent.html): Identifier for this record (external references)
1742* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1743* [DeviceRequest](devicerequest.html): Business identifier for request/order
1744* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1745* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
1746* [DocumentReference](documentreference.html): Master Version Specific Identifier
1747* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1748* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1749* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1750* [Goal](goal.html): External Ids for this goal
1751* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number
1752* [Immunization](immunization.html): Business identifier
1753* [List](list.html): Business identifier
1754* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1755* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1756* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1757* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1758* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1759* [Observation](observation.html): The unique id for a particular observation
1760* [Procedure](procedure.html): A unique identifier for a procedure
1761* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1762* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1763* [SupplyDelivery](supplydelivery.html): External identifier
1764* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1765* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1766</b><br>
1767   * Type: <b>token</b><br>
1768   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
1769   * </p>
1770   */
1771  @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\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* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business 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* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
1772  public static final String SP_IDENTIFIER = "identifier";
1773 /**
1774   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1775   * <p>
1776   * Description: <b>Multiple Resources: 
1777
1778* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1779* [CarePlan](careplan.html): External Ids for this plan
1780* [CareTeam](careteam.html): External Ids for this team
1781* [Composition](composition.html): Version-independent identifier for the Composition
1782* [Condition](condition.html): A unique identifier of the condition record
1783* [Consent](consent.html): Identifier for this record (external references)
1784* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1785* [DeviceRequest](devicerequest.html): Business identifier for request/order
1786* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1787* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
1788* [DocumentReference](documentreference.html): Master Version Specific Identifier
1789* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1790* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1791* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1792* [Goal](goal.html): External Ids for this goal
1793* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number
1794* [Immunization](immunization.html): Business identifier
1795* [List](list.html): Business identifier
1796* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1797* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1798* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1799* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1800* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1801* [Observation](observation.html): The unique id for a particular observation
1802* [Procedure](procedure.html): A unique identifier for a procedure
1803* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1804* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1805* [SupplyDelivery](supplydelivery.html): External identifier
1806* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1807* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1808</b><br>
1809   * Type: <b>token</b><br>
1810   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
1811   * </p>
1812   */
1813  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1814
1815 /**
1816   * Search parameter: <b>patient</b>
1817   * <p>
1818   * Description: <b>Multiple Resources: 
1819
1820* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1821* [CarePlan](careplan.html): Who the care plan is for
1822* [CareTeam](careteam.html): Who care team is for
1823* [ClinicalImpression](clinicalimpression.html): Patient or group assessed
1824* [Composition](composition.html): Who and/or what the composition is about
1825* [Condition](condition.html): Who has the condition?
1826* [Consent](consent.html): Who the consent applies to
1827* [DetectedIssue](detectedissue.html): Associated patient
1828* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1829* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient
1830* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1831* [DocumentManifest](documentmanifest.html): The subject of the set of documents
1832* [DocumentReference](documentreference.html): Who/what is the subject of the document
1833* [Encounter](encounter.html): The patient or group present at the encounter
1834* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1835* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1836* [Flag](flag.html): The identity of a subject to list flags for
1837* [Goal](goal.html): Who this goal is intended for
1838* [ImagingStudy](imagingstudy.html): Who the study is about
1839* [Immunization](immunization.html): The patient for the vaccination record
1840* [List](list.html): If all resources have the same subject
1841* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1842* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1843* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1844* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1845* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
1846* [Observation](observation.html): The subject that the observation is about (if patient)
1847* [Procedure](procedure.html): Search by subject - a patient
1848* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1849* [ServiceRequest](servicerequest.html): Search by subject - a patient
1850* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1851* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1852</b><br>
1853   * Type: <b>reference</b><br>
1854   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject.where(resolve() is Patient) | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.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) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
1855   * </p>
1856   */
1857  @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject.where(resolve() is Patient) | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.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) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\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* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\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* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\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* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\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={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, CatalogEntry.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceMetric.class, DeviceRequest.class, DeviceUseStatement.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Media.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchDefinition.class, ResearchElementDefinition.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
1858  public static final String SP_PATIENT = "patient";
1859 /**
1860   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1861   * <p>
1862   * Description: <b>Multiple Resources: 
1863
1864* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1865* [CarePlan](careplan.html): Who the care plan is for
1866* [CareTeam](careteam.html): Who care team is for
1867* [ClinicalImpression](clinicalimpression.html): Patient or group assessed
1868* [Composition](composition.html): Who and/or what the composition is about
1869* [Condition](condition.html): Who has the condition?
1870* [Consent](consent.html): Who the consent applies to
1871* [DetectedIssue](detectedissue.html): Associated patient
1872* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1873* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient
1874* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1875* [DocumentManifest](documentmanifest.html): The subject of the set of documents
1876* [DocumentReference](documentreference.html): Who/what is the subject of the document
1877* [Encounter](encounter.html): The patient or group present at the encounter
1878* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1879* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1880* [Flag](flag.html): The identity of a subject to list flags for
1881* [Goal](goal.html): Who this goal is intended for
1882* [ImagingStudy](imagingstudy.html): Who the study is about
1883* [Immunization](immunization.html): The patient for the vaccination record
1884* [List](list.html): If all resources have the same subject
1885* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1886* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1887* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1888* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1889* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
1890* [Observation](observation.html): The subject that the observation is about (if patient)
1891* [Procedure](procedure.html): Search by subject - a patient
1892* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1893* [ServiceRequest](servicerequest.html): Search by subject - a patient
1894* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1895* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1896</b><br>
1897   * Type: <b>reference</b><br>
1898   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject.where(resolve() is Patient) | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.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) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
1899   * </p>
1900   */
1901  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1902
1903/**
1904   * Constant for fluent queries to be used to add include statements. Specifies
1905   * the path value of "<b>CareTeam:patient</b>".
1906   */
1907  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CareTeam:patient").toLocked();
1908
1909
1910}
1911