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