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