001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care.
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(PrimitiveType<?> code) throws FHIRException {
163          if (code == null)
164            return null;
165          if (code.isEmpty())
166            return new Enumeration<CareTeamStatus>(this, CareTeamStatus.NULL, code);
167          String codeString = ((PrimitiveType) code).asStringValue();
168          if (codeString == null || "".equals(codeString))
169            return new Enumeration<CareTeamStatus>(this, CareTeamStatus.NULL, code);
170        if ("proposed".equals(codeString))
171          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.PROPOSED, code);
172        if ("active".equals(codeString))
173          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.ACTIVE, code);
174        if ("suspended".equals(codeString))
175          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.SUSPENDED, code);
176        if ("inactive".equals(codeString))
177          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.INACTIVE, code);
178        if ("entered-in-error".equals(codeString))
179          return new Enumeration<CareTeamStatus>(this, CareTeamStatus.ENTEREDINERROR, code);
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=1, 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/participant-role")
208        protected 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         * When the member is generally available within this care team.
226         */
227        @Child(name = "coverage", type = {Period.class, Timing.class}, order=4, min=0, max=1, modifier=false, summary=false)
228        @Description(shortDefinition="When the member is generally available within this care team", formalDefinition="When the member is generally available within this care team." )
229        protected DataType coverage;
230
231        private static final long serialVersionUID = 192079749L;
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 CodeableConcept getRole() { 
244          if (this.role == null)
245            if (Configuration.errorOnAutoCreate())
246              throw new Error("Attempt to auto-create CareTeamParticipantComponent.role");
247            else if (Configuration.doAutoCreate())
248              this.role = new CodeableConcept(); // cc
249          return this.role;
250        }
251
252        public boolean hasRole() { 
253          return this.role != null && !this.role.isEmpty();
254        }
255
256        /**
257         * @param value {@link #role} (Indicates specific responsibility of an individual within the care team, such as "Primary care physician", "Trained social worker counselor", "Caregiver", etc.)
258         */
259        public CareTeamParticipantComponent setRole(CodeableConcept value) { 
260          this.role = value;
261          return this;
262        }
263
264        /**
265         * @return {@link #member} (The specific person or organization who is participating/expected to participate in the care team.)
266         */
267        public Reference getMember() { 
268          if (this.member == null)
269            if (Configuration.errorOnAutoCreate())
270              throw new Error("Attempt to auto-create CareTeamParticipantComponent.member");
271            else if (Configuration.doAutoCreate())
272              this.member = new Reference(); // cc
273          return this.member;
274        }
275
276        public boolean hasMember() { 
277          return this.member != null && !this.member.isEmpty();
278        }
279
280        /**
281         * @param value {@link #member} (The specific person or organization who is participating/expected to participate in the care team.)
282         */
283        public CareTeamParticipantComponent setMember(Reference value) { 
284          this.member = value;
285          return this;
286        }
287
288        /**
289         * @return {@link #onBehalfOf} (The organization of the practitioner.)
290         */
291        public Reference getOnBehalfOf() { 
292          if (this.onBehalfOf == null)
293            if (Configuration.errorOnAutoCreate())
294              throw new Error("Attempt to auto-create CareTeamParticipantComponent.onBehalfOf");
295            else if (Configuration.doAutoCreate())
296              this.onBehalfOf = new Reference(); // cc
297          return this.onBehalfOf;
298        }
299
300        public boolean hasOnBehalfOf() { 
301          return this.onBehalfOf != null && !this.onBehalfOf.isEmpty();
302        }
303
304        /**
305         * @param value {@link #onBehalfOf} (The organization of the practitioner.)
306         */
307        public CareTeamParticipantComponent setOnBehalfOf(Reference value) { 
308          this.onBehalfOf = value;
309          return this;
310        }
311
312        /**
313         * @return {@link #coverage} (When the member is generally available within this care team.)
314         */
315        public DataType getCoverage() { 
316          return this.coverage;
317        }
318
319        /**
320         * @return {@link #coverage} (When the member is generally available within this care team.)
321         */
322        public Period getCoveragePeriod() throws FHIRException { 
323          if (this.coverage == null)
324            this.coverage = new Period();
325          if (!(this.coverage instanceof Period))
326            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.coverage.getClass().getName()+" was encountered");
327          return (Period) this.coverage;
328        }
329
330        public boolean hasCoveragePeriod() { 
331          return this != null && this.coverage instanceof Period;
332        }
333
334        /**
335         * @return {@link #coverage} (When the member is generally available within this care team.)
336         */
337        public Timing getCoverageTiming() throws FHIRException { 
338          if (this.coverage == null)
339            this.coverage = new Timing();
340          if (!(this.coverage instanceof Timing))
341            throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.coverage.getClass().getName()+" was encountered");
342          return (Timing) this.coverage;
343        }
344
345        public boolean hasCoverageTiming() { 
346          return this != null && this.coverage instanceof Timing;
347        }
348
349        public boolean hasCoverage() { 
350          return this.coverage != null && !this.coverage.isEmpty();
351        }
352
353        /**
354         * @param value {@link #coverage} (When the member is generally available within this care team.)
355         */
356        public CareTeamParticipantComponent setCoverage(DataType value) { 
357          if (value != null && !(value instanceof Period || value instanceof Timing))
358            throw new FHIRException("Not the right type for CareTeam.participant.coverage[x]: "+value.fhirType());
359          this.coverage = value;
360          return this;
361        }
362
363        protected void listChildren(List<Property> children) {
364          super.listChildren(children);
365          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, 1, role));
366          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));
367          children.add(new Property("onBehalfOf", "Reference(Organization)", "The organization of the practitioner.", 0, 1, onBehalfOf));
368          children.add(new Property("coverage[x]", "Period|Timing", "When the member is generally available within this care team.", 0, 1, coverage));
369        }
370
371        @Override
372        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
373          switch (_hash) {
374          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, 1, role);
375          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);
376          case -14402964: /*onBehalfOf*/  return new Property("onBehalfOf", "Reference(Organization)", "The organization of the practitioner.", 0, 1, onBehalfOf);
377          case 227689880: /*coverage[x]*/  return new Property("coverage[x]", "Period|Timing", "When the member is generally available within this care team.", 0, 1, coverage);
378          case -351767064: /*coverage*/  return new Property("coverage[x]", "Period|Timing", "When the member is generally available within this care team.", 0, 1, coverage);
379          case 1024117193: /*coveragePeriod*/  return new Property("coverage[x]", "Period", "When the member is generally available within this care team.", 0, 1, coverage);
380          case 1142178898: /*coverageTiming*/  return new Property("coverage[x]", "Timing", "When the member is generally available within this care team.", 0, 1, coverage);
381          default: return super.getNamedProperty(_hash, _name, _checkValid);
382          }
383
384        }
385
386      @Override
387      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
388        switch (hash) {
389        case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
390        case -1077769574: /*member*/ return this.member == null ? new Base[0] : new Base[] {this.member}; // Reference
391        case -14402964: /*onBehalfOf*/ return this.onBehalfOf == null ? new Base[0] : new Base[] {this.onBehalfOf}; // Reference
392        case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // DataType
393        default: return super.getProperty(hash, name, checkValid);
394        }
395
396      }
397
398      @Override
399      public Base setProperty(int hash, String name, Base value) throws FHIRException {
400        switch (hash) {
401        case 3506294: // role
402          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
403          return value;
404        case -1077769574: // member
405          this.member = TypeConvertor.castToReference(value); // Reference
406          return value;
407        case -14402964: // onBehalfOf
408          this.onBehalfOf = TypeConvertor.castToReference(value); // Reference
409          return value;
410        case -351767064: // coverage
411          this.coverage = TypeConvertor.castToType(value); // DataType
412          return value;
413        default: return super.setProperty(hash, name, value);
414        }
415
416      }
417
418      @Override
419      public Base setProperty(String name, Base value) throws FHIRException {
420        if (name.equals("role")) {
421          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
422        } else if (name.equals("member")) {
423          this.member = TypeConvertor.castToReference(value); // Reference
424        } else if (name.equals("onBehalfOf")) {
425          this.onBehalfOf = TypeConvertor.castToReference(value); // Reference
426        } else if (name.equals("coverage[x]")) {
427          this.coverage = TypeConvertor.castToType(value); // DataType
428        } else
429          return super.setProperty(name, value);
430        return value;
431      }
432
433  @Override
434  public void removeChild(String name, Base value) throws FHIRException {
435        if (name.equals("role")) {
436          this.role = null;
437        } else if (name.equals("member")) {
438          this.member = null;
439        } else if (name.equals("onBehalfOf")) {
440          this.onBehalfOf = null;
441        } else if (name.equals("coverage[x]")) {
442          this.coverage = null;
443        } else
444          super.removeChild(name, value);
445        
446      }
447
448      @Override
449      public Base makeProperty(int hash, String name) throws FHIRException {
450        switch (hash) {
451        case 3506294:  return getRole();
452        case -1077769574:  return getMember();
453        case -14402964:  return getOnBehalfOf();
454        case 227689880:  return getCoverage();
455        case -351767064:  return getCoverage();
456        default: return super.makeProperty(hash, name);
457        }
458
459      }
460
461      @Override
462      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
463        switch (hash) {
464        case 3506294: /*role*/ return new String[] {"CodeableConcept"};
465        case -1077769574: /*member*/ return new String[] {"Reference"};
466        case -14402964: /*onBehalfOf*/ return new String[] {"Reference"};
467        case -351767064: /*coverage*/ return new String[] {"Period", "Timing"};
468        default: return super.getTypesForProperty(hash, name);
469        }
470
471      }
472
473      @Override
474      public Base addChild(String name) throws FHIRException {
475        if (name.equals("role")) {
476          this.role = new CodeableConcept();
477          return this.role;
478        }
479        else if (name.equals("member")) {
480          this.member = new Reference();
481          return this.member;
482        }
483        else if (name.equals("onBehalfOf")) {
484          this.onBehalfOf = new Reference();
485          return this.onBehalfOf;
486        }
487        else if (name.equals("coveragePeriod")) {
488          this.coverage = new Period();
489          return this.coverage;
490        }
491        else if (name.equals("coverageTiming")) {
492          this.coverage = new Timing();
493          return this.coverage;
494        }
495        else
496          return super.addChild(name);
497      }
498
499      public CareTeamParticipantComponent copy() {
500        CareTeamParticipantComponent dst = new CareTeamParticipantComponent();
501        copyValues(dst);
502        return dst;
503      }
504
505      public void copyValues(CareTeamParticipantComponent dst) {
506        super.copyValues(dst);
507        dst.role = role == null ? null : role.copy();
508        dst.member = member == null ? null : member.copy();
509        dst.onBehalfOf = onBehalfOf == null ? null : onBehalfOf.copy();
510        dst.coverage = coverage == null ? null : coverage.copy();
511      }
512
513      @Override
514      public boolean equalsDeep(Base other_) {
515        if (!super.equalsDeep(other_))
516          return false;
517        if (!(other_ instanceof CareTeamParticipantComponent))
518          return false;
519        CareTeamParticipantComponent o = (CareTeamParticipantComponent) other_;
520        return compareDeep(role, o.role, true) && compareDeep(member, o.member, true) && compareDeep(onBehalfOf, o.onBehalfOf, true)
521           && compareDeep(coverage, o.coverage, true);
522      }
523
524      @Override
525      public boolean equalsShallow(Base other_) {
526        if (!super.equalsShallow(other_))
527          return false;
528        if (!(other_ instanceof CareTeamParticipantComponent))
529          return false;
530        CareTeamParticipantComponent o = (CareTeamParticipantComponent) other_;
531        return true;
532      }
533
534      public boolean isEmpty() {
535        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, member, onBehalfOf
536          , coverage);
537      }
538
539  public String fhirType() {
540    return "CareTeam.participant";
541
542  }
543
544  }
545
546    /**
547     * 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.
548     */
549    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
550    @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." )
551    protected List<Identifier> identifier;
552
553    /**
554     * Indicates the current state of the care team.
555     */
556    @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true)
557    @Description(shortDefinition="proposed | active | suspended | inactive | entered-in-error", formalDefinition="Indicates the current state of the care team." )
558    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-team-status")
559    protected Enumeration<CareTeamStatus> status;
560
561    /**
562     * 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.
563     */
564    @Child(name = "category", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
565    @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." )
566    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/care-team-category")
567    protected List<CodeableConcept> category;
568
569    /**
570     * A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.
571     */
572    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
573    @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." )
574    protected StringType name;
575
576    /**
577     * Identifies the patient or group whose intended care is handled by the team.
578     */
579    @Child(name = "subject", type = {Patient.class, Group.class}, order=4, min=0, max=1, modifier=false, summary=true)
580    @Description(shortDefinition="Who care team is for", formalDefinition="Identifies the patient or group whose intended care is handled by the team." )
581    protected Reference subject;
582
583    /**
584     * Indicates when the team did (or is intended to) come into effect and end.
585     */
586    @Child(name = "period", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=true)
587    @Description(shortDefinition="Time period team covers", formalDefinition="Indicates when the team did (or is intended to) come into effect and end." )
588    protected Period period;
589
590    /**
591     * Identifies all people and organizations who are expected to be involved in the care team.
592     */
593    @Child(name = "participant", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
594    @Description(shortDefinition="Members of the team", formalDefinition="Identifies all people and organizations who are expected to be involved in the care team." )
595    protected List<CareTeamParticipantComponent> participant;
596
597    /**
598     * Describes why the care team exists.
599     */
600    @Child(name = "reason", type = {CodeableReference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
601    @Description(shortDefinition="Why the care team exists", formalDefinition="Describes why the care team exists." )
602    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
603    protected List<CodeableReference> reason;
604
605    /**
606     * The organization responsible for the care team.
607     */
608    @Child(name = "managingOrganization", type = {Organization.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
609    @Description(shortDefinition="Organization responsible for the care team", formalDefinition="The organization responsible for the care team." )
610    protected List<Reference> managingOrganization;
611
612    /**
613     * A central contact detail for the care team (that applies to all members).
614     */
615    @Child(name = "telecom", type = {ContactPoint.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
616    @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)." )
617    protected List<ContactPoint> telecom;
618
619    /**
620     * Comments made about the CareTeam.
621     */
622    @Child(name = "note", type = {Annotation.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
623    @Description(shortDefinition="Comments made about the CareTeam", formalDefinition="Comments made about the CareTeam." )
624    protected List<Annotation> note;
625
626    private static final long serialVersionUID = 1147350970L;
627
628  /**
629   * Constructor
630   */
631    public CareTeam() {
632      super();
633    }
634
635    /**
636     * @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.)
637     */
638    public List<Identifier> getIdentifier() { 
639      if (this.identifier == null)
640        this.identifier = new ArrayList<Identifier>();
641      return this.identifier;
642    }
643
644    /**
645     * @return Returns a reference to <code>this</code> for easy method chaining
646     */
647    public CareTeam setIdentifier(List<Identifier> theIdentifier) { 
648      this.identifier = theIdentifier;
649      return this;
650    }
651
652    public boolean hasIdentifier() { 
653      if (this.identifier == null)
654        return false;
655      for (Identifier item : this.identifier)
656        if (!item.isEmpty())
657          return true;
658      return false;
659    }
660
661    public Identifier addIdentifier() { //3
662      Identifier t = new Identifier();
663      if (this.identifier == null)
664        this.identifier = new ArrayList<Identifier>();
665      this.identifier.add(t);
666      return t;
667    }
668
669    public CareTeam addIdentifier(Identifier t) { //3
670      if (t == null)
671        return this;
672      if (this.identifier == null)
673        this.identifier = new ArrayList<Identifier>();
674      this.identifier.add(t);
675      return this;
676    }
677
678    /**
679     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
680     */
681    public Identifier getIdentifierFirstRep() { 
682      if (getIdentifier().isEmpty()) {
683        addIdentifier();
684      }
685      return getIdentifier().get(0);
686    }
687
688    /**
689     * @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
690     */
691    public Enumeration<CareTeamStatus> getStatusElement() { 
692      if (this.status == null)
693        if (Configuration.errorOnAutoCreate())
694          throw new Error("Attempt to auto-create CareTeam.status");
695        else if (Configuration.doAutoCreate())
696          this.status = new Enumeration<CareTeamStatus>(new CareTeamStatusEnumFactory()); // bb
697      return this.status;
698    }
699
700    public boolean hasStatusElement() { 
701      return this.status != null && !this.status.isEmpty();
702    }
703
704    public boolean hasStatus() { 
705      return this.status != null && !this.status.isEmpty();
706    }
707
708    /**
709     * @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
710     */
711    public CareTeam setStatusElement(Enumeration<CareTeamStatus> value) { 
712      this.status = value;
713      return this;
714    }
715
716    /**
717     * @return Indicates the current state of the care team.
718     */
719    public CareTeamStatus getStatus() { 
720      return this.status == null ? null : this.status.getValue();
721    }
722
723    /**
724     * @param value Indicates the current state of the care team.
725     */
726    public CareTeam setStatus(CareTeamStatus value) { 
727      if (value == null)
728        this.status = null;
729      else {
730        if (this.status == null)
731          this.status = new Enumeration<CareTeamStatus>(new CareTeamStatusEnumFactory());
732        this.status.setValue(value);
733      }
734      return this;
735    }
736
737    /**
738     * @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.)
739     */
740    public List<CodeableConcept> getCategory() { 
741      if (this.category == null)
742        this.category = new ArrayList<CodeableConcept>();
743      return this.category;
744    }
745
746    /**
747     * @return Returns a reference to <code>this</code> for easy method chaining
748     */
749    public CareTeam setCategory(List<CodeableConcept> theCategory) { 
750      this.category = theCategory;
751      return this;
752    }
753
754    public boolean hasCategory() { 
755      if (this.category == null)
756        return false;
757      for (CodeableConcept item : this.category)
758        if (!item.isEmpty())
759          return true;
760      return false;
761    }
762
763    public CodeableConcept addCategory() { //3
764      CodeableConcept t = new CodeableConcept();
765      if (this.category == null)
766        this.category = new ArrayList<CodeableConcept>();
767      this.category.add(t);
768      return t;
769    }
770
771    public CareTeam addCategory(CodeableConcept t) { //3
772      if (t == null)
773        return this;
774      if (this.category == null)
775        this.category = new ArrayList<CodeableConcept>();
776      this.category.add(t);
777      return this;
778    }
779
780    /**
781     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
782     */
783    public CodeableConcept getCategoryFirstRep() { 
784      if (getCategory().isEmpty()) {
785        addCategory();
786      }
787      return getCategory().get(0);
788    }
789
790    /**
791     * @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
792     */
793    public StringType getNameElement() { 
794      if (this.name == null)
795        if (Configuration.errorOnAutoCreate())
796          throw new Error("Attempt to auto-create CareTeam.name");
797        else if (Configuration.doAutoCreate())
798          this.name = new StringType(); // bb
799      return this.name;
800    }
801
802    public boolean hasNameElement() { 
803      return this.name != null && !this.name.isEmpty();
804    }
805
806    public boolean hasName() { 
807      return this.name != null && !this.name.isEmpty();
808    }
809
810    /**
811     * @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
812     */
813    public CareTeam setNameElement(StringType value) { 
814      this.name = value;
815      return this;
816    }
817
818    /**
819     * @return A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.
820     */
821    public String getName() { 
822      return this.name == null ? null : this.name.getValue();
823    }
824
825    /**
826     * @param value A label for human use intended to distinguish like teams.  E.g. the "red" vs. "green" trauma teams.
827     */
828    public CareTeam setName(String value) { 
829      if (Utilities.noString(value))
830        this.name = null;
831      else {
832        if (this.name == null)
833          this.name = new StringType();
834        this.name.setValue(value);
835      }
836      return this;
837    }
838
839    /**
840     * @return {@link #subject} (Identifies the patient or group whose intended care is handled by the team.)
841     */
842    public Reference getSubject() { 
843      if (this.subject == null)
844        if (Configuration.errorOnAutoCreate())
845          throw new Error("Attempt to auto-create CareTeam.subject");
846        else if (Configuration.doAutoCreate())
847          this.subject = new Reference(); // cc
848      return this.subject;
849    }
850
851    public boolean hasSubject() { 
852      return this.subject != null && !this.subject.isEmpty();
853    }
854
855    /**
856     * @param value {@link #subject} (Identifies the patient or group whose intended care is handled by the team.)
857     */
858    public CareTeam setSubject(Reference value) { 
859      this.subject = value;
860      return this;
861    }
862
863    /**
864     * @return {@link #period} (Indicates when the team did (or is intended to) come into effect and end.)
865     */
866    public Period getPeriod() { 
867      if (this.period == null)
868        if (Configuration.errorOnAutoCreate())
869          throw new Error("Attempt to auto-create CareTeam.period");
870        else if (Configuration.doAutoCreate())
871          this.period = new Period(); // cc
872      return this.period;
873    }
874
875    public boolean hasPeriod() { 
876      return this.period != null && !this.period.isEmpty();
877    }
878
879    /**
880     * @param value {@link #period} (Indicates when the team did (or is intended to) come into effect and end.)
881     */
882    public CareTeam setPeriod(Period value) { 
883      this.period = value;
884      return this;
885    }
886
887    /**
888     * @return {@link #participant} (Identifies all people and organizations who are expected to be involved in the care team.)
889     */
890    public List<CareTeamParticipantComponent> getParticipant() { 
891      if (this.participant == null)
892        this.participant = new ArrayList<CareTeamParticipantComponent>();
893      return this.participant;
894    }
895
896    /**
897     * @return Returns a reference to <code>this</code> for easy method chaining
898     */
899    public CareTeam setParticipant(List<CareTeamParticipantComponent> theParticipant) { 
900      this.participant = theParticipant;
901      return this;
902    }
903
904    public boolean hasParticipant() { 
905      if (this.participant == null)
906        return false;
907      for (CareTeamParticipantComponent item : this.participant)
908        if (!item.isEmpty())
909          return true;
910      return false;
911    }
912
913    public CareTeamParticipantComponent addParticipant() { //3
914      CareTeamParticipantComponent t = new CareTeamParticipantComponent();
915      if (this.participant == null)
916        this.participant = new ArrayList<CareTeamParticipantComponent>();
917      this.participant.add(t);
918      return t;
919    }
920
921    public CareTeam addParticipant(CareTeamParticipantComponent t) { //3
922      if (t == null)
923        return this;
924      if (this.participant == null)
925        this.participant = new ArrayList<CareTeamParticipantComponent>();
926      this.participant.add(t);
927      return this;
928    }
929
930    /**
931     * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3}
932     */
933    public CareTeamParticipantComponent getParticipantFirstRep() { 
934      if (getParticipant().isEmpty()) {
935        addParticipant();
936      }
937      return getParticipant().get(0);
938    }
939
940    /**
941     * @return {@link #reason} (Describes why the care team exists.)
942     */
943    public List<CodeableReference> getReason() { 
944      if (this.reason == null)
945        this.reason = new ArrayList<CodeableReference>();
946      return this.reason;
947    }
948
949    /**
950     * @return Returns a reference to <code>this</code> for easy method chaining
951     */
952    public CareTeam setReason(List<CodeableReference> theReason) { 
953      this.reason = theReason;
954      return this;
955    }
956
957    public boolean hasReason() { 
958      if (this.reason == null)
959        return false;
960      for (CodeableReference item : this.reason)
961        if (!item.isEmpty())
962          return true;
963      return false;
964    }
965
966    public CodeableReference addReason() { //3
967      CodeableReference t = new CodeableReference();
968      if (this.reason == null)
969        this.reason = new ArrayList<CodeableReference>();
970      this.reason.add(t);
971      return t;
972    }
973
974    public CareTeam addReason(CodeableReference t) { //3
975      if (t == null)
976        return this;
977      if (this.reason == null)
978        this.reason = new ArrayList<CodeableReference>();
979      this.reason.add(t);
980      return this;
981    }
982
983    /**
984     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
985     */
986    public CodeableReference getReasonFirstRep() { 
987      if (getReason().isEmpty()) {
988        addReason();
989      }
990      return getReason().get(0);
991    }
992
993    /**
994     * @return {@link #managingOrganization} (The organization responsible for the care team.)
995     */
996    public List<Reference> getManagingOrganization() { 
997      if (this.managingOrganization == null)
998        this.managingOrganization = new ArrayList<Reference>();
999      return this.managingOrganization;
1000    }
1001
1002    /**
1003     * @return Returns a reference to <code>this</code> for easy method chaining
1004     */
1005    public CareTeam setManagingOrganization(List<Reference> theManagingOrganization) { 
1006      this.managingOrganization = theManagingOrganization;
1007      return this;
1008    }
1009
1010    public boolean hasManagingOrganization() { 
1011      if (this.managingOrganization == null)
1012        return false;
1013      for (Reference item : this.managingOrganization)
1014        if (!item.isEmpty())
1015          return true;
1016      return false;
1017    }
1018
1019    public Reference addManagingOrganization() { //3
1020      Reference t = new Reference();
1021      if (this.managingOrganization == null)
1022        this.managingOrganization = new ArrayList<Reference>();
1023      this.managingOrganization.add(t);
1024      return t;
1025    }
1026
1027    public CareTeam addManagingOrganization(Reference t) { //3
1028      if (t == null)
1029        return this;
1030      if (this.managingOrganization == null)
1031        this.managingOrganization = new ArrayList<Reference>();
1032      this.managingOrganization.add(t);
1033      return this;
1034    }
1035
1036    /**
1037     * @return The first repetition of repeating field {@link #managingOrganization}, creating it if it does not already exist {3}
1038     */
1039    public Reference getManagingOrganizationFirstRep() { 
1040      if (getManagingOrganization().isEmpty()) {
1041        addManagingOrganization();
1042      }
1043      return getManagingOrganization().get(0);
1044    }
1045
1046    /**
1047     * @return {@link #telecom} (A central contact detail for the care team (that applies to all members).)
1048     */
1049    public List<ContactPoint> getTelecom() { 
1050      if (this.telecom == null)
1051        this.telecom = new ArrayList<ContactPoint>();
1052      return this.telecom;
1053    }
1054
1055    /**
1056     * @return Returns a reference to <code>this</code> for easy method chaining
1057     */
1058    public CareTeam setTelecom(List<ContactPoint> theTelecom) { 
1059      this.telecom = theTelecom;
1060      return this;
1061    }
1062
1063    public boolean hasTelecom() { 
1064      if (this.telecom == null)
1065        return false;
1066      for (ContactPoint item : this.telecom)
1067        if (!item.isEmpty())
1068          return true;
1069      return false;
1070    }
1071
1072    public ContactPoint addTelecom() { //3
1073      ContactPoint t = new ContactPoint();
1074      if (this.telecom == null)
1075        this.telecom = new ArrayList<ContactPoint>();
1076      this.telecom.add(t);
1077      return t;
1078    }
1079
1080    public CareTeam addTelecom(ContactPoint t) { //3
1081      if (t == null)
1082        return this;
1083      if (this.telecom == null)
1084        this.telecom = new ArrayList<ContactPoint>();
1085      this.telecom.add(t);
1086      return this;
1087    }
1088
1089    /**
1090     * @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist {3}
1091     */
1092    public ContactPoint getTelecomFirstRep() { 
1093      if (getTelecom().isEmpty()) {
1094        addTelecom();
1095      }
1096      return getTelecom().get(0);
1097    }
1098
1099    /**
1100     * @return {@link #note} (Comments made about the CareTeam.)
1101     */
1102    public List<Annotation> getNote() { 
1103      if (this.note == null)
1104        this.note = new ArrayList<Annotation>();
1105      return this.note;
1106    }
1107
1108    /**
1109     * @return Returns a reference to <code>this</code> for easy method chaining
1110     */
1111    public CareTeam setNote(List<Annotation> theNote) { 
1112      this.note = theNote;
1113      return this;
1114    }
1115
1116    public boolean hasNote() { 
1117      if (this.note == null)
1118        return false;
1119      for (Annotation item : this.note)
1120        if (!item.isEmpty())
1121          return true;
1122      return false;
1123    }
1124
1125    public Annotation addNote() { //3
1126      Annotation t = new Annotation();
1127      if (this.note == null)
1128        this.note = new ArrayList<Annotation>();
1129      this.note.add(t);
1130      return t;
1131    }
1132
1133    public CareTeam addNote(Annotation t) { //3
1134      if (t == null)
1135        return this;
1136      if (this.note == null)
1137        this.note = new ArrayList<Annotation>();
1138      this.note.add(t);
1139      return this;
1140    }
1141
1142    /**
1143     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1144     */
1145    public Annotation getNoteFirstRep() { 
1146      if (getNote().isEmpty()) {
1147        addNote();
1148      }
1149      return getNote().get(0);
1150    }
1151
1152      protected void listChildren(List<Property> children) {
1153        super.listChildren(children);
1154        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));
1155        children.add(new Property("status", "code", "Indicates the current state of the care team.", 0, 1, status));
1156        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));
1157        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));
1158        children.add(new Property("subject", "Reference(Patient|Group)", "Identifies the patient or group whose intended care is handled by the team.", 0, 1, subject));
1159        children.add(new Property("period", "Period", "Indicates when the team did (or is intended to) come into effect and end.", 0, 1, period));
1160        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));
1161        children.add(new Property("reason", "CodeableReference(Condition)", "Describes why the care team exists.", 0, java.lang.Integer.MAX_VALUE, reason));
1162        children.add(new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the care team.", 0, java.lang.Integer.MAX_VALUE, managingOrganization));
1163        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));
1164        children.add(new Property("note", "Annotation", "Comments made about the CareTeam.", 0, java.lang.Integer.MAX_VALUE, note));
1165      }
1166
1167      @Override
1168      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1169        switch (_hash) {
1170        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);
1171        case -892481550: /*status*/  return new Property("status", "code", "Indicates the current state of the care team.", 0, 1, status);
1172        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);
1173        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);
1174        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);
1175        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);
1176        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);
1177        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Condition)", "Describes why the care team exists.", 0, java.lang.Integer.MAX_VALUE, reason);
1178        case -2058947787: /*managingOrganization*/  return new Property("managingOrganization", "Reference(Organization)", "The organization responsible for the care team.", 0, java.lang.Integer.MAX_VALUE, managingOrganization);
1179        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);
1180        case 3387378: /*note*/  return new Property("note", "Annotation", "Comments made about the CareTeam.", 0, java.lang.Integer.MAX_VALUE, note);
1181        default: return super.getNamedProperty(_hash, _name, _checkValid);
1182        }
1183
1184      }
1185
1186      @Override
1187      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1188        switch (hash) {
1189        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1190        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<CareTeamStatus>
1191        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1192        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1193        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1194        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
1195        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // CareTeamParticipantComponent
1196        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
1197        case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : this.managingOrganization.toArray(new Base[this.managingOrganization.size()]); // Reference
1198        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
1199        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1200        default: return super.getProperty(hash, name, checkValid);
1201        }
1202
1203      }
1204
1205      @Override
1206      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1207        switch (hash) {
1208        case -1618432855: // identifier
1209          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1210          return value;
1211        case -892481550: // status
1212          value = new CareTeamStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1213          this.status = (Enumeration) value; // Enumeration<CareTeamStatus>
1214          return value;
1215        case 50511102: // category
1216          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1217          return value;
1218        case 3373707: // name
1219          this.name = TypeConvertor.castToString(value); // StringType
1220          return value;
1221        case -1867885268: // subject
1222          this.subject = TypeConvertor.castToReference(value); // Reference
1223          return value;
1224        case -991726143: // period
1225          this.period = TypeConvertor.castToPeriod(value); // Period
1226          return value;
1227        case 767422259: // participant
1228          this.getParticipant().add((CareTeamParticipantComponent) value); // CareTeamParticipantComponent
1229          return value;
1230        case -934964668: // reason
1231          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1232          return value;
1233        case -2058947787: // managingOrganization
1234          this.getManagingOrganization().add(TypeConvertor.castToReference(value)); // Reference
1235          return value;
1236        case -1429363305: // telecom
1237          this.getTelecom().add(TypeConvertor.castToContactPoint(value)); // ContactPoint
1238          return value;
1239        case 3387378: // note
1240          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1241          return value;
1242        default: return super.setProperty(hash, name, value);
1243        }
1244
1245      }
1246
1247      @Override
1248      public Base setProperty(String name, Base value) throws FHIRException {
1249        if (name.equals("identifier")) {
1250          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1251        } else if (name.equals("status")) {
1252          value = new CareTeamStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1253          this.status = (Enumeration) value; // Enumeration<CareTeamStatus>
1254        } else if (name.equals("category")) {
1255          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
1256        } else if (name.equals("name")) {
1257          this.name = TypeConvertor.castToString(value); // StringType
1258        } else if (name.equals("subject")) {
1259          this.subject = TypeConvertor.castToReference(value); // Reference
1260        } else if (name.equals("period")) {
1261          this.period = TypeConvertor.castToPeriod(value); // Period
1262        } else if (name.equals("participant")) {
1263          this.getParticipant().add((CareTeamParticipantComponent) value);
1264        } else if (name.equals("reason")) {
1265          this.getReason().add(TypeConvertor.castToCodeableReference(value));
1266        } else if (name.equals("managingOrganization")) {
1267          this.getManagingOrganization().add(TypeConvertor.castToReference(value));
1268        } else if (name.equals("telecom")) {
1269          this.getTelecom().add(TypeConvertor.castToContactPoint(value));
1270        } else if (name.equals("note")) {
1271          this.getNote().add(TypeConvertor.castToAnnotation(value));
1272        } else
1273          return super.setProperty(name, value);
1274        return value;
1275      }
1276
1277  @Override
1278  public void removeChild(String name, Base value) throws FHIRException {
1279        if (name.equals("identifier")) {
1280          this.getIdentifier().remove(value);
1281        } else if (name.equals("status")) {
1282          value = new CareTeamStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1283          this.status = (Enumeration) value; // Enumeration<CareTeamStatus>
1284        } else if (name.equals("category")) {
1285          this.getCategory().remove(value);
1286        } else if (name.equals("name")) {
1287          this.name = null;
1288        } else if (name.equals("subject")) {
1289          this.subject = null;
1290        } else if (name.equals("period")) {
1291          this.period = null;
1292        } else if (name.equals("participant")) {
1293          this.getParticipant().remove((CareTeamParticipantComponent) value);
1294        } else if (name.equals("reason")) {
1295          this.getReason().remove(value);
1296        } else if (name.equals("managingOrganization")) {
1297          this.getManagingOrganization().remove(value);
1298        } else if (name.equals("telecom")) {
1299          this.getTelecom().remove(value);
1300        } else if (name.equals("note")) {
1301          this.getNote().remove(value);
1302        } else
1303          super.removeChild(name, value);
1304        
1305      }
1306
1307      @Override
1308      public Base makeProperty(int hash, String name) throws FHIRException {
1309        switch (hash) {
1310        case -1618432855:  return addIdentifier(); 
1311        case -892481550:  return getStatusElement();
1312        case 50511102:  return addCategory(); 
1313        case 3373707:  return getNameElement();
1314        case -1867885268:  return getSubject();
1315        case -991726143:  return getPeriod();
1316        case 767422259:  return addParticipant(); 
1317        case -934964668:  return addReason(); 
1318        case -2058947787:  return addManagingOrganization(); 
1319        case -1429363305:  return addTelecom(); 
1320        case 3387378:  return addNote(); 
1321        default: return super.makeProperty(hash, name);
1322        }
1323
1324      }
1325
1326      @Override
1327      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1328        switch (hash) {
1329        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1330        case -892481550: /*status*/ return new String[] {"code"};
1331        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1332        case 3373707: /*name*/ return new String[] {"string"};
1333        case -1867885268: /*subject*/ return new String[] {"Reference"};
1334        case -991726143: /*period*/ return new String[] {"Period"};
1335        case 767422259: /*participant*/ return new String[] {};
1336        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
1337        case -2058947787: /*managingOrganization*/ return new String[] {"Reference"};
1338        case -1429363305: /*telecom*/ return new String[] {"ContactPoint"};
1339        case 3387378: /*note*/ return new String[] {"Annotation"};
1340        default: return super.getTypesForProperty(hash, name);
1341        }
1342
1343      }
1344
1345      @Override
1346      public Base addChild(String name) throws FHIRException {
1347        if (name.equals("identifier")) {
1348          return addIdentifier();
1349        }
1350        else if (name.equals("status")) {
1351          throw new FHIRException("Cannot call addChild on a singleton property CareTeam.status");
1352        }
1353        else if (name.equals("category")) {
1354          return addCategory();
1355        }
1356        else if (name.equals("name")) {
1357          throw new FHIRException("Cannot call addChild on a singleton property CareTeam.name");
1358        }
1359        else if (name.equals("subject")) {
1360          this.subject = new Reference();
1361          return this.subject;
1362        }
1363        else if (name.equals("period")) {
1364          this.period = new Period();
1365          return this.period;
1366        }
1367        else if (name.equals("participant")) {
1368          return addParticipant();
1369        }
1370        else if (name.equals("reason")) {
1371          return addReason();
1372        }
1373        else if (name.equals("managingOrganization")) {
1374          return addManagingOrganization();
1375        }
1376        else if (name.equals("telecom")) {
1377          return addTelecom();
1378        }
1379        else if (name.equals("note")) {
1380          return addNote();
1381        }
1382        else
1383          return super.addChild(name);
1384      }
1385
1386  public String fhirType() {
1387    return "CareTeam";
1388
1389  }
1390
1391      public CareTeam copy() {
1392        CareTeam dst = new CareTeam();
1393        copyValues(dst);
1394        return dst;
1395      }
1396
1397      public void copyValues(CareTeam dst) {
1398        super.copyValues(dst);
1399        if (identifier != null) {
1400          dst.identifier = new ArrayList<Identifier>();
1401          for (Identifier i : identifier)
1402            dst.identifier.add(i.copy());
1403        };
1404        dst.status = status == null ? null : status.copy();
1405        if (category != null) {
1406          dst.category = new ArrayList<CodeableConcept>();
1407          for (CodeableConcept i : category)
1408            dst.category.add(i.copy());
1409        };
1410        dst.name = name == null ? null : name.copy();
1411        dst.subject = subject == null ? null : subject.copy();
1412        dst.period = period == null ? null : period.copy();
1413        if (participant != null) {
1414          dst.participant = new ArrayList<CareTeamParticipantComponent>();
1415          for (CareTeamParticipantComponent i : participant)
1416            dst.participant.add(i.copy());
1417        };
1418        if (reason != null) {
1419          dst.reason = new ArrayList<CodeableReference>();
1420          for (CodeableReference i : reason)
1421            dst.reason.add(i.copy());
1422        };
1423        if (managingOrganization != null) {
1424          dst.managingOrganization = new ArrayList<Reference>();
1425          for (Reference i : managingOrganization)
1426            dst.managingOrganization.add(i.copy());
1427        };
1428        if (telecom != null) {
1429          dst.telecom = new ArrayList<ContactPoint>();
1430          for (ContactPoint i : telecom)
1431            dst.telecom.add(i.copy());
1432        };
1433        if (note != null) {
1434          dst.note = new ArrayList<Annotation>();
1435          for (Annotation i : note)
1436            dst.note.add(i.copy());
1437        };
1438      }
1439
1440      protected CareTeam typedCopy() {
1441        return copy();
1442      }
1443
1444      @Override
1445      public boolean equalsDeep(Base other_) {
1446        if (!super.equalsDeep(other_))
1447          return false;
1448        if (!(other_ instanceof CareTeam))
1449          return false;
1450        CareTeam o = (CareTeam) other_;
1451        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(category, o.category, true)
1452           && compareDeep(name, o.name, true) && compareDeep(subject, o.subject, true) && compareDeep(period, o.period, true)
1453           && compareDeep(participant, o.participant, true) && compareDeep(reason, o.reason, true) && compareDeep(managingOrganization, o.managingOrganization, true)
1454           && compareDeep(telecom, o.telecom, true) && compareDeep(note, o.note, true);
1455      }
1456
1457      @Override
1458      public boolean equalsShallow(Base other_) {
1459        if (!super.equalsShallow(other_))
1460          return false;
1461        if (!(other_ instanceof CareTeam))
1462          return false;
1463        CareTeam o = (CareTeam) other_;
1464        return compareValues(status, o.status, true) && compareValues(name, o.name, true);
1465      }
1466
1467      public boolean isEmpty() {
1468        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, category
1469          , name, subject, period, participant, reason, managingOrganization, telecom, note
1470          );
1471      }
1472
1473  @Override
1474  public ResourceType getResourceType() {
1475    return ResourceType.CareTeam;
1476   }
1477
1478 /**
1479   * Search parameter: <b>category</b>
1480   * <p>
1481   * Description: <b>Type of team</b><br>
1482   * Type: <b>token</b><br>
1483   * Path: <b>CareTeam.category</b><br>
1484   * </p>
1485   */
1486  @SearchParamDefinition(name="category", path="CareTeam.category", description="Type of team", type="token" )
1487  public static final String SP_CATEGORY = "category";
1488 /**
1489   * <b>Fluent Client</b> search parameter constant for <b>category</b>
1490   * <p>
1491   * Description: <b>Type of team</b><br>
1492   * Type: <b>token</b><br>
1493   * Path: <b>CareTeam.category</b><br>
1494   * </p>
1495   */
1496  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
1497
1498 /**
1499   * Search parameter: <b>name</b>
1500   * <p>
1501   * Description: <b>Name of the team, such as crisis assessment team</b><br>
1502   * Type: <b>string</b><br>
1503   * Path: <b>CareTeam.name | CareTeam.extension('http://hl7.org/fhir/StructureDefinition/careteam-alias').value</b><br>
1504   * </p>
1505   */
1506  @SearchParamDefinition(name="name", path="CareTeam.name | CareTeam.extension('http://hl7.org/fhir/StructureDefinition/careteam-alias').value", description="Name of the team, such as crisis assessment team", type="string" )
1507  public static final String SP_NAME = "name";
1508 /**
1509   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1510   * <p>
1511   * Description: <b>Name of the team, such as crisis assessment team</b><br>
1512   * Type: <b>string</b><br>
1513   * Path: <b>CareTeam.name | CareTeam.extension('http://hl7.org/fhir/StructureDefinition/careteam-alias').value</b><br>
1514   * </p>
1515   */
1516  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1517
1518 /**
1519   * Search parameter: <b>participant</b>
1520   * <p>
1521   * Description: <b>Who is involved</b><br>
1522   * Type: <b>reference</b><br>
1523   * Path: <b>CareTeam.participant.member</b><br>
1524   * </p>
1525   */
1526  @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 } )
1527  public static final String SP_PARTICIPANT = "participant";
1528 /**
1529   * <b>Fluent Client</b> search parameter constant for <b>participant</b>
1530   * <p>
1531   * Description: <b>Who is involved</b><br>
1532   * Type: <b>reference</b><br>
1533   * Path: <b>CareTeam.participant.member</b><br>
1534   * </p>
1535   */
1536  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARTICIPANT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARTICIPANT);
1537
1538/**
1539   * Constant for fluent queries to be used to add include statements. Specifies
1540   * the path value of "<b>CareTeam:participant</b>".
1541   */
1542  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARTICIPANT = new ca.uhn.fhir.model.api.Include("CareTeam:participant").toLocked();
1543
1544 /**
1545   * Search parameter: <b>status</b>
1546   * <p>
1547   * Description: <b>proposed | active | suspended | inactive | entered-in-error</b><br>
1548   * Type: <b>token</b><br>
1549   * Path: <b>CareTeam.status</b><br>
1550   * </p>
1551   */
1552  @SearchParamDefinition(name="status", path="CareTeam.status", description="proposed | active | suspended | inactive | entered-in-error", type="token" )
1553  public static final String SP_STATUS = "status";
1554 /**
1555   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1556   * <p>
1557   * Description: <b>proposed | active | suspended | inactive | entered-in-error</b><br>
1558   * Type: <b>token</b><br>
1559   * Path: <b>CareTeam.status</b><br>
1560   * </p>
1561   */
1562  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1563
1564 /**
1565   * Search parameter: <b>subject</b>
1566   * <p>
1567   * Description: <b>Who care team is for</b><br>
1568   * Type: <b>reference</b><br>
1569   * Path: <b>CareTeam.subject</b><br>
1570   * </p>
1571   */
1572  @SearchParamDefinition(name="subject", path="CareTeam.subject", description="Who care team is for", type="reference", target={Group.class, Patient.class } )
1573  public static final String SP_SUBJECT = "subject";
1574 /**
1575   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1576   * <p>
1577   * Description: <b>Who care team is for</b><br>
1578   * Type: <b>reference</b><br>
1579   * Path: <b>CareTeam.subject</b><br>
1580   * </p>
1581   */
1582  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1583
1584/**
1585   * Constant for fluent queries to be used to add include statements. Specifies
1586   * the path value of "<b>CareTeam:subject</b>".
1587   */
1588  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("CareTeam:subject").toLocked();
1589
1590 /**
1591   * Search parameter: <b>date</b>
1592   * <p>
1593   * Description: <b>Multiple Resources: 
1594
1595* [AdverseEvent](adverseevent.html): When the event occurred
1596* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1597* [Appointment](appointment.html): Appointment date/time.
1598* [AuditEvent](auditevent.html): Time when the event was recorded
1599* [CarePlan](careplan.html): Time period plan covers
1600* [CareTeam](careteam.html): A date within the coverage time period.
1601* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1602* [Composition](composition.html): Composition editing time
1603* [Consent](consent.html): When consent was agreed to
1604* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1605* [DocumentReference](documentreference.html): When this document reference was created
1606* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1607* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1608* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1609* [Flag](flag.html): Time period when flag is active
1610* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1611* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
1612* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
1613* [Invoice](invoice.html): Invoice date / posting date
1614* [List](list.html): When the list was prepared
1615* [MeasureReport](measurereport.html): The date of the measure report
1616* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
1617* [Observation](observation.html): Clinically relevant time/time-period for observation
1618* [Procedure](procedure.html): When the procedure occurred or is occurring
1619* [ResearchSubject](researchsubject.html): Start and end of participation
1620* [RiskAssessment](riskassessment.html): When was assessment made?
1621* [SupplyRequest](supplyrequest.html): When the request was made
1622</b><br>
1623   * Type: <b>date</b><br>
1624   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
1625   * </p>
1626   */
1627  @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
1628  public static final String SP_DATE = "date";
1629 /**
1630   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1631   * <p>
1632   * Description: <b>Multiple Resources: 
1633
1634* [AdverseEvent](adverseevent.html): When the event occurred
1635* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1636* [Appointment](appointment.html): Appointment date/time.
1637* [AuditEvent](auditevent.html): Time when the event was recorded
1638* [CarePlan](careplan.html): Time period plan covers
1639* [CareTeam](careteam.html): A date within the coverage time period.
1640* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1641* [Composition](composition.html): Composition editing time
1642* [Consent](consent.html): When consent was agreed to
1643* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1644* [DocumentReference](documentreference.html): When this document reference was created
1645* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1646* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1647* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1648* [Flag](flag.html): Time period when flag is active
1649* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1650* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
1651* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
1652* [Invoice](invoice.html): Invoice date / posting date
1653* [List](list.html): When the list was prepared
1654* [MeasureReport](measurereport.html): The date of the measure report
1655* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
1656* [Observation](observation.html): Clinically relevant time/time-period for observation
1657* [Procedure](procedure.html): When the procedure occurred or is occurring
1658* [ResearchSubject](researchsubject.html): Start and end of participation
1659* [RiskAssessment](riskassessment.html): When was assessment made?
1660* [SupplyRequest](supplyrequest.html): When the request was made
1661</b><br>
1662   * Type: <b>date</b><br>
1663   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
1664   * </p>
1665   */
1666  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1667
1668 /**
1669   * Search parameter: <b>identifier</b>
1670   * <p>
1671   * Description: <b>Multiple Resources: 
1672
1673* [Account](account.html): Account number
1674* [AdverseEvent](adverseevent.html): Business identifier for the event
1675* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1676* [Appointment](appointment.html): An Identifier of the Appointment
1677* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1678* [Basic](basic.html): Business identifier
1679* [BodyStructure](bodystructure.html): Bodystructure identifier
1680* [CarePlan](careplan.html): External Ids for this plan
1681* [CareTeam](careteam.html): External Ids for this team
1682* [ChargeItem](chargeitem.html): Business Identifier for item
1683* [Claim](claim.html): The primary identifier of the financial resource
1684* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1685* [ClinicalImpression](clinicalimpression.html): Business identifier
1686* [Communication](communication.html): Unique identifier
1687* [CommunicationRequest](communicationrequest.html): Unique identifier
1688* [Composition](composition.html): Version-independent identifier for the Composition
1689* [Condition](condition.html): A unique identifier of the condition record
1690* [Consent](consent.html): Identifier for this record (external references)
1691* [Contract](contract.html): The identity of the contract
1692* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1693* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1694* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1695* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1696* [DeviceRequest](devicerequest.html): Business identifier for request/order
1697* [DeviceUsage](deviceusage.html): Search by identifier
1698* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1699* [DocumentReference](documentreference.html): Identifier of the attachment binary
1700* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1701* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1702* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1703* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1704* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1705* [Flag](flag.html): Business identifier
1706* [Goal](goal.html): External Ids for this goal
1707* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1708* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1709* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1710* [Immunization](immunization.html): Business identifier
1711* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1712* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1713* [Invoice](invoice.html): Business Identifier for item
1714* [List](list.html): Business identifier
1715* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1716* [Medication](medication.html): Returns medications with this external identifier
1717* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1718* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1719* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1720* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1721* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1722* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1723* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1724* [Observation](observation.html): The unique id for a particular observation
1725* [Person](person.html): A person Identifier
1726* [Procedure](procedure.html): A unique identifier for a procedure
1727* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1728* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1729* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1730* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1731* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1732* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1733* [Specimen](specimen.html): The unique identifier associated with the specimen
1734* [SupplyDelivery](supplydelivery.html): External identifier
1735* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1736* [Task](task.html): Search for a task instance by its business identifier
1737* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1738</b><br>
1739   * Type: <b>token</b><br>
1740   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
1741   * </p>
1742   */
1743  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
1744  public static final String SP_IDENTIFIER = "identifier";
1745 /**
1746   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1747   * <p>
1748   * Description: <b>Multiple Resources: 
1749
1750* [Account](account.html): Account number
1751* [AdverseEvent](adverseevent.html): Business identifier for the event
1752* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1753* [Appointment](appointment.html): An Identifier of the Appointment
1754* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1755* [Basic](basic.html): Business identifier
1756* [BodyStructure](bodystructure.html): Bodystructure identifier
1757* [CarePlan](careplan.html): External Ids for this plan
1758* [CareTeam](careteam.html): External Ids for this team
1759* [ChargeItem](chargeitem.html): Business Identifier for item
1760* [Claim](claim.html): The primary identifier of the financial resource
1761* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1762* [ClinicalImpression](clinicalimpression.html): Business identifier
1763* [Communication](communication.html): Unique identifier
1764* [CommunicationRequest](communicationrequest.html): Unique identifier
1765* [Composition](composition.html): Version-independent identifier for the Composition
1766* [Condition](condition.html): A unique identifier of the condition record
1767* [Consent](consent.html): Identifier for this record (external references)
1768* [Contract](contract.html): The identity of the contract
1769* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1770* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1771* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1772* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1773* [DeviceRequest](devicerequest.html): Business identifier for request/order
1774* [DeviceUsage](deviceusage.html): Search by identifier
1775* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1776* [DocumentReference](documentreference.html): Identifier of the attachment binary
1777* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1778* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1779* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1780* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1781* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1782* [Flag](flag.html): Business identifier
1783* [Goal](goal.html): External Ids for this goal
1784* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1785* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1786* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1787* [Immunization](immunization.html): Business identifier
1788* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1789* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1790* [Invoice](invoice.html): Business Identifier for item
1791* [List](list.html): Business identifier
1792* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1793* [Medication](medication.html): Returns medications with this external identifier
1794* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1795* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1796* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1797* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1798* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1799* [NutritionIntake](nutritionintake.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* [Person](person.html): A person Identifier
1803* [Procedure](procedure.html): A unique identifier for a procedure
1804* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1805* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1806* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1807* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1808* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1809* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1810* [Specimen](specimen.html): The unique identifier associated with the specimen
1811* [SupplyDelivery](supplydelivery.html): External identifier
1812* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1813* [Task](task.html): Search for a task instance by its business identifier
1814* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1815</b><br>
1816   * Type: <b>token</b><br>
1817   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
1818   * </p>
1819   */
1820  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1821
1822 /**
1823   * Search parameter: <b>patient</b>
1824   * <p>
1825   * Description: <b>Multiple Resources: 
1826
1827* [Account](account.html): The entity that caused the expenses
1828* [AdverseEvent](adverseevent.html): Subject impacted by event
1829* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1830* [Appointment](appointment.html): One of the individuals of the appointment is this patient
1831* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
1832* [AuditEvent](auditevent.html): Where the activity involved patient data
1833* [Basic](basic.html): Identifies the focus of this resource
1834* [BodyStructure](bodystructure.html): Who this is about
1835* [CarePlan](careplan.html): Who the care plan is for
1836* [CareTeam](careteam.html): Who care team is for
1837* [ChargeItem](chargeitem.html): Individual service was done for/to
1838* [Claim](claim.html): Patient receiving the products or services
1839* [ClaimResponse](claimresponse.html): The subject of care
1840* [ClinicalImpression](clinicalimpression.html): Patient assessed
1841* [Communication](communication.html): Focus of message
1842* [CommunicationRequest](communicationrequest.html): Focus of message
1843* [Composition](composition.html): Who and/or what the composition is about
1844* [Condition](condition.html): Who has the condition?
1845* [Consent](consent.html): Who the consent applies to
1846* [Contract](contract.html): The identity of the subject of the contract (if a patient)
1847* [Coverage](coverage.html): Retrieve coverages for a patient
1848* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
1849* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
1850* [DetectedIssue](detectedissue.html): Associated patient
1851* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1852* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1853* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1854* [DocumentReference](documentreference.html): Who/what is the subject of the document
1855* [Encounter](encounter.html): The patient present at the encounter
1856* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
1857* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1858* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
1859* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1860* [Flag](flag.html): The identity of a subject to list flags for
1861* [Goal](goal.html): Who this goal is intended for
1862* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
1863* [ImagingSelection](imagingselection.html): Who the study is about
1864* [ImagingStudy](imagingstudy.html): Who the study is about
1865* [Immunization](immunization.html): The patient for the vaccination record
1866* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
1867* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
1868* [Invoice](invoice.html): Recipient(s) of goods and services
1869* [List](list.html): If all resources have the same subject
1870* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
1871* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1872* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1873* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1874* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1875* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
1876* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
1877* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
1878* [Observation](observation.html): The subject that the observation is about (if patient)
1879* [Person](person.html): The Person links to this Patient
1880* [Procedure](procedure.html): Search by subject - a patient
1881* [Provenance](provenance.html): Where the activity involved patient data
1882* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
1883* [RelatedPerson](relatedperson.html): The patient this related person is related to
1884* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
1885* [ResearchSubject](researchsubject.html): Who or what is part of study
1886* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1887* [ServiceRequest](servicerequest.html): Search by subject - a patient
1888* [Specimen](specimen.html): The patient the specimen comes from
1889* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1890* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
1891* [Task](task.html): Search by patient
1892* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1893</b><br>
1894   * Type: <b>reference</b><br>
1895   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
1896   * </p>
1897   */
1898  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
1899  public static final String SP_PATIENT = "patient";
1900 /**
1901   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1902   * <p>
1903   * Description: <b>Multiple Resources: 
1904
1905* [Account](account.html): The entity that caused the expenses
1906* [AdverseEvent](adverseevent.html): Subject impacted by event
1907* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1908* [Appointment](appointment.html): One of the individuals of the appointment is this patient
1909* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
1910* [AuditEvent](auditevent.html): Where the activity involved patient data
1911* [Basic](basic.html): Identifies the focus of this resource
1912* [BodyStructure](bodystructure.html): Who this is about
1913* [CarePlan](careplan.html): Who the care plan is for
1914* [CareTeam](careteam.html): Who care team is for
1915* [ChargeItem](chargeitem.html): Individual service was done for/to
1916* [Claim](claim.html): Patient receiving the products or services
1917* [ClaimResponse](claimresponse.html): The subject of care
1918* [ClinicalImpression](clinicalimpression.html): Patient assessed
1919* [Communication](communication.html): Focus of message
1920* [CommunicationRequest](communicationrequest.html): Focus of message
1921* [Composition](composition.html): Who and/or what the composition is about
1922* [Condition](condition.html): Who has the condition?
1923* [Consent](consent.html): Who the consent applies to
1924* [Contract](contract.html): The identity of the subject of the contract (if a patient)
1925* [Coverage](coverage.html): Retrieve coverages for a patient
1926* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
1927* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
1928* [DetectedIssue](detectedissue.html): Associated patient
1929* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1930* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1931* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1932* [DocumentReference](documentreference.html): Who/what is the subject of the document
1933* [Encounter](encounter.html): The patient present at the encounter
1934* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
1935* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1936* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
1937* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1938* [Flag](flag.html): The identity of a subject to list flags for
1939* [Goal](goal.html): Who this goal is intended for
1940* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
1941* [ImagingSelection](imagingselection.html): Who the study is about
1942* [ImagingStudy](imagingstudy.html): Who the study is about
1943* [Immunization](immunization.html): The patient for the vaccination record
1944* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
1945* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
1946* [Invoice](invoice.html): Recipient(s) of goods and services
1947* [List](list.html): If all resources have the same subject
1948* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
1949* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1950* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1951* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1952* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1953* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
1954* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
1955* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
1956* [Observation](observation.html): The subject that the observation is about (if patient)
1957* [Person](person.html): The Person links to this Patient
1958* [Procedure](procedure.html): Search by subject - a patient
1959* [Provenance](provenance.html): Where the activity involved patient data
1960* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
1961* [RelatedPerson](relatedperson.html): The patient this related person is related to
1962* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
1963* [ResearchSubject](researchsubject.html): Who or what is part of study
1964* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1965* [ServiceRequest](servicerequest.html): Search by subject - a patient
1966* [Specimen](specimen.html): The patient the specimen comes from
1967* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1968* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
1969* [Task](task.html): Search by patient
1970* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1971</b><br>
1972   * Type: <b>reference</b><br>
1973   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
1974   * </p>
1975   */
1976  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1977
1978/**
1979   * Constant for fluent queries to be used to add include statements. Specifies
1980   * the path value of "<b>CareTeam:patient</b>".
1981   */
1982  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("CareTeam:patient").toLocked();
1983
1984
1985}
1986