001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.
052 */
053@ResourceDef(name="Group", profile="http://hl7.org/fhir/StructureDefinition/Group")
054public class Group extends DomainResource {
055
056    public enum GroupMembershipBasis {
057        /**
058         * The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.
059         */
060        DEFINITIONAL, 
061        /**
062         * The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.
063         */
064        ENUMERATED, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static GroupMembershipBasis fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("definitional".equals(codeString))
073          return DEFINITIONAL;
074        if ("enumerated".equals(codeString))
075          return ENUMERATED;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown GroupMembershipBasis code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case DEFINITIONAL: return "definitional";
084            case ENUMERATED: return "enumerated";
085            case NULL: return null;
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case DEFINITIONAL: return "http://hl7.org/fhir/group-membership-basis";
092            case ENUMERATED: return "http://hl7.org/fhir/group-membership-basis";
093            case NULL: return null;
094            default: return "?";
095          }
096        }
097        public String getDefinition() {
098          switch (this) {
099            case DEFINITIONAL: return "The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.";
100            case ENUMERATED: return "The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDisplay() {
106          switch (this) {
107            case DEFINITIONAL: return "Definitional";
108            case ENUMERATED: return "Enumerated";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113    }
114
115  public static class GroupMembershipBasisEnumFactory implements EnumFactory<GroupMembershipBasis> {
116    public GroupMembershipBasis fromCode(String codeString) throws IllegalArgumentException {
117      if (codeString == null || "".equals(codeString))
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("definitional".equals(codeString))
121          return GroupMembershipBasis.DEFINITIONAL;
122        if ("enumerated".equals(codeString))
123          return GroupMembershipBasis.ENUMERATED;
124        throw new IllegalArgumentException("Unknown GroupMembershipBasis code '"+codeString+"'");
125        }
126        public Enumeration<GroupMembershipBasis> fromType(PrimitiveType<?> code) throws FHIRException {
127          if (code == null)
128            return null;
129          if (code.isEmpty())
130            return new Enumeration<GroupMembershipBasis>(this, GroupMembershipBasis.NULL, code);
131          String codeString = ((PrimitiveType) code).asStringValue();
132          if (codeString == null || "".equals(codeString))
133            return new Enumeration<GroupMembershipBasis>(this, GroupMembershipBasis.NULL, code);
134        if ("definitional".equals(codeString))
135          return new Enumeration<GroupMembershipBasis>(this, GroupMembershipBasis.DEFINITIONAL, code);
136        if ("enumerated".equals(codeString))
137          return new Enumeration<GroupMembershipBasis>(this, GroupMembershipBasis.ENUMERATED, code);
138        throw new FHIRException("Unknown GroupMembershipBasis code '"+codeString+"'");
139        }
140    public String toCode(GroupMembershipBasis code) {
141      if (code == GroupMembershipBasis.DEFINITIONAL)
142        return "definitional";
143      if (code == GroupMembershipBasis.ENUMERATED)
144        return "enumerated";
145      return "?";
146      }
147    public String toSystem(GroupMembershipBasis code) {
148      return code.getSystem();
149      }
150    }
151
152    public enum GroupType {
153        /**
154         * Group contains \"person\" Patient resources.
155         */
156        PERSON, 
157        /**
158         * Group contains \"animal\" Patient resources.
159         */
160        ANIMAL, 
161        /**
162         * Group contains healthcare practitioner resources (Practitioner or PractitionerRole).
163         */
164        PRACTITIONER, 
165        /**
166         * Group contains Device resources.
167         */
168        DEVICE, 
169        /**
170         * Group contains CareTeam resources.
171         */
172        CARETEAM, 
173        /**
174         * Group contains HealthcareService resources.
175         */
176        HEALTHCARESERVICE, 
177        /**
178         * Group contains Location resources.
179         */
180        LOCATION, 
181        /**
182         * Group contains Organization resources.
183         */
184        ORGANIZATION, 
185        /**
186         * Group contains RelatedPerson resources.
187         */
188        RELATEDPERSON, 
189        /**
190         * Group contains Specimen resources.
191         */
192        SPECIMEN, 
193        /**
194         * added to help the parsers with the generic types
195         */
196        NULL;
197        public static GroupType fromCode(String codeString) throws FHIRException {
198            if (codeString == null || "".equals(codeString))
199                return null;
200        if ("person".equals(codeString))
201          return PERSON;
202        if ("animal".equals(codeString))
203          return ANIMAL;
204        if ("practitioner".equals(codeString))
205          return PRACTITIONER;
206        if ("device".equals(codeString))
207          return DEVICE;
208        if ("careteam".equals(codeString))
209          return CARETEAM;
210        if ("healthcareservice".equals(codeString))
211          return HEALTHCARESERVICE;
212        if ("location".equals(codeString))
213          return LOCATION;
214        if ("organization".equals(codeString))
215          return ORGANIZATION;
216        if ("relatedperson".equals(codeString))
217          return RELATEDPERSON;
218        if ("specimen".equals(codeString))
219          return SPECIMEN;
220        if (Configuration.isAcceptInvalidEnums())
221          return null;
222        else
223          throw new FHIRException("Unknown GroupType code '"+codeString+"'");
224        }
225        public String toCode() {
226          switch (this) {
227            case PERSON: return "person";
228            case ANIMAL: return "animal";
229            case PRACTITIONER: return "practitioner";
230            case DEVICE: return "device";
231            case CARETEAM: return "careteam";
232            case HEALTHCARESERVICE: return "healthcareservice";
233            case LOCATION: return "location";
234            case ORGANIZATION: return "organization";
235            case RELATEDPERSON: return "relatedperson";
236            case SPECIMEN: return "specimen";
237            case NULL: return null;
238            default: return "?";
239          }
240        }
241        public String getSystem() {
242          switch (this) {
243            case PERSON: return "http://hl7.org/fhir/group-type";
244            case ANIMAL: return "http://hl7.org/fhir/group-type";
245            case PRACTITIONER: return "http://hl7.org/fhir/group-type";
246            case DEVICE: return "http://hl7.org/fhir/group-type";
247            case CARETEAM: return "http://hl7.org/fhir/group-type";
248            case HEALTHCARESERVICE: return "http://hl7.org/fhir/group-type";
249            case LOCATION: return "http://hl7.org/fhir/group-type";
250            case ORGANIZATION: return "http://hl7.org/fhir/group-type";
251            case RELATEDPERSON: return "http://hl7.org/fhir/group-type";
252            case SPECIMEN: return "http://hl7.org/fhir/group-type";
253            case NULL: return null;
254            default: return "?";
255          }
256        }
257        public String getDefinition() {
258          switch (this) {
259            case PERSON: return "Group contains \"person\" Patient resources.";
260            case ANIMAL: return "Group contains \"animal\" Patient resources.";
261            case PRACTITIONER: return "Group contains healthcare practitioner resources (Practitioner or PractitionerRole).";
262            case DEVICE: return "Group contains Device resources.";
263            case CARETEAM: return "Group contains CareTeam resources.";
264            case HEALTHCARESERVICE: return "Group contains HealthcareService resources.";
265            case LOCATION: return "Group contains Location resources.";
266            case ORGANIZATION: return "Group contains Organization resources.";
267            case RELATEDPERSON: return "Group contains RelatedPerson resources.";
268            case SPECIMEN: return "Group contains Specimen resources.";
269            case NULL: return null;
270            default: return "?";
271          }
272        }
273        public String getDisplay() {
274          switch (this) {
275            case PERSON: return "Person";
276            case ANIMAL: return "Animal";
277            case PRACTITIONER: return "Practitioner";
278            case DEVICE: return "Device";
279            case CARETEAM: return "CareTeam";
280            case HEALTHCARESERVICE: return "HealthcareService";
281            case LOCATION: return "Location";
282            case ORGANIZATION: return "Organization";
283            case RELATEDPERSON: return "RelatedPerson";
284            case SPECIMEN: return "Specimen";
285            case NULL: return null;
286            default: return "?";
287          }
288        }
289    }
290
291  public static class GroupTypeEnumFactory implements EnumFactory<GroupType> {
292    public GroupType fromCode(String codeString) throws IllegalArgumentException {
293      if (codeString == null || "".equals(codeString))
294            if (codeString == null || "".equals(codeString))
295                return null;
296        if ("person".equals(codeString))
297          return GroupType.PERSON;
298        if ("animal".equals(codeString))
299          return GroupType.ANIMAL;
300        if ("practitioner".equals(codeString))
301          return GroupType.PRACTITIONER;
302        if ("device".equals(codeString))
303          return GroupType.DEVICE;
304        if ("careteam".equals(codeString))
305          return GroupType.CARETEAM;
306        if ("healthcareservice".equals(codeString))
307          return GroupType.HEALTHCARESERVICE;
308        if ("location".equals(codeString))
309          return GroupType.LOCATION;
310        if ("organization".equals(codeString))
311          return GroupType.ORGANIZATION;
312        if ("relatedperson".equals(codeString))
313          return GroupType.RELATEDPERSON;
314        if ("specimen".equals(codeString))
315          return GroupType.SPECIMEN;
316        throw new IllegalArgumentException("Unknown GroupType code '"+codeString+"'");
317        }
318        public Enumeration<GroupType> fromType(PrimitiveType<?> code) throws FHIRException {
319          if (code == null)
320            return null;
321          if (code.isEmpty())
322            return new Enumeration<GroupType>(this, GroupType.NULL, code);
323          String codeString = ((PrimitiveType) code).asStringValue();
324          if (codeString == null || "".equals(codeString))
325            return new Enumeration<GroupType>(this, GroupType.NULL, code);
326        if ("person".equals(codeString))
327          return new Enumeration<GroupType>(this, GroupType.PERSON, code);
328        if ("animal".equals(codeString))
329          return new Enumeration<GroupType>(this, GroupType.ANIMAL, code);
330        if ("practitioner".equals(codeString))
331          return new Enumeration<GroupType>(this, GroupType.PRACTITIONER, code);
332        if ("device".equals(codeString))
333          return new Enumeration<GroupType>(this, GroupType.DEVICE, code);
334        if ("careteam".equals(codeString))
335          return new Enumeration<GroupType>(this, GroupType.CARETEAM, code);
336        if ("healthcareservice".equals(codeString))
337          return new Enumeration<GroupType>(this, GroupType.HEALTHCARESERVICE, code);
338        if ("location".equals(codeString))
339          return new Enumeration<GroupType>(this, GroupType.LOCATION, code);
340        if ("organization".equals(codeString))
341          return new Enumeration<GroupType>(this, GroupType.ORGANIZATION, code);
342        if ("relatedperson".equals(codeString))
343          return new Enumeration<GroupType>(this, GroupType.RELATEDPERSON, code);
344        if ("specimen".equals(codeString))
345          return new Enumeration<GroupType>(this, GroupType.SPECIMEN, code);
346        throw new FHIRException("Unknown GroupType code '"+codeString+"'");
347        }
348    public String toCode(GroupType code) {
349      if (code == GroupType.PERSON)
350        return "person";
351      if (code == GroupType.ANIMAL)
352        return "animal";
353      if (code == GroupType.PRACTITIONER)
354        return "practitioner";
355      if (code == GroupType.DEVICE)
356        return "device";
357      if (code == GroupType.CARETEAM)
358        return "careteam";
359      if (code == GroupType.HEALTHCARESERVICE)
360        return "healthcareservice";
361      if (code == GroupType.LOCATION)
362        return "location";
363      if (code == GroupType.ORGANIZATION)
364        return "organization";
365      if (code == GroupType.RELATEDPERSON)
366        return "relatedperson";
367      if (code == GroupType.SPECIMEN)
368        return "specimen";
369      return "?";
370      }
371    public String toSystem(GroupType code) {
372      return code.getSystem();
373      }
374    }
375
376    @Block()
377    public static class GroupCharacteristicComponent extends BackboneElement implements IBaseBackboneElement {
378        /**
379         * A code that identifies the kind of trait being asserted.
380         */
381        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=true)
382        @Description(shortDefinition="Kind of characteristic", formalDefinition="A code that identifies the kind of trait being asserted." )
383        protected CodeableConcept code;
384
385        /**
386         * The value of the trait that holds (or does not hold - see 'exclude') for members of the group.
387         */
388        @Child(name = "value", type = {CodeableConcept.class, BooleanType.class, Quantity.class, Range.class, Reference.class}, order=2, min=1, max=1, modifier=false, summary=true)
389        @Description(shortDefinition="Value held by characteristic", formalDefinition="The value of the trait that holds (or does not hold - see 'exclude') for members of the group." )
390        protected DataType value;
391
392        /**
393         * If true, indicates the characteristic is one that is NOT held by members of the group.
394         */
395        @Child(name = "exclude", type = {BooleanType.class}, order=3, min=1, max=1, modifier=false, summary=true)
396        @Description(shortDefinition="Group includes or excludes", formalDefinition="If true, indicates the characteristic is one that is NOT held by members of the group." )
397        protected BooleanType exclude;
398
399        /**
400         * The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.
401         */
402        @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false)
403        @Description(shortDefinition="Period over which characteristic is tested", formalDefinition="The period over which the characteristic is tested; e.g. the patient had an operation during the month of June." )
404        protected Period period;
405
406        private static final long serialVersionUID = 279867823L;
407
408    /**
409     * Constructor
410     */
411      public GroupCharacteristicComponent() {
412        super();
413      }
414
415    /**
416     * Constructor
417     */
418      public GroupCharacteristicComponent(CodeableConcept code, DataType value, boolean exclude) {
419        super();
420        this.setCode(code);
421        this.setValue(value);
422        this.setExclude(exclude);
423      }
424
425        /**
426         * @return {@link #code} (A code that identifies the kind of trait being asserted.)
427         */
428        public CodeableConcept getCode() { 
429          if (this.code == null)
430            if (Configuration.errorOnAutoCreate())
431              throw new Error("Attempt to auto-create GroupCharacteristicComponent.code");
432            else if (Configuration.doAutoCreate())
433              this.code = new CodeableConcept(); // cc
434          return this.code;
435        }
436
437        public boolean hasCode() { 
438          return this.code != null && !this.code.isEmpty();
439        }
440
441        /**
442         * @param value {@link #code} (A code that identifies the kind of trait being asserted.)
443         */
444        public GroupCharacteristicComponent setCode(CodeableConcept value) { 
445          this.code = value;
446          return this;
447        }
448
449        /**
450         * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.)
451         */
452        public DataType getValue() { 
453          return this.value;
454        }
455
456        /**
457         * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.)
458         */
459        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
460          if (this.value == null)
461            this.value = new CodeableConcept();
462          if (!(this.value instanceof CodeableConcept))
463            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
464          return (CodeableConcept) this.value;
465        }
466
467        public boolean hasValueCodeableConcept() { 
468          return this != null && this.value instanceof CodeableConcept;
469        }
470
471        /**
472         * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.)
473         */
474        public BooleanType getValueBooleanType() throws FHIRException { 
475          if (this.value == null)
476            this.value = new BooleanType();
477          if (!(this.value instanceof BooleanType))
478            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
479          return (BooleanType) this.value;
480        }
481
482        public boolean hasValueBooleanType() { 
483          return this != null && this.value instanceof BooleanType;
484        }
485
486        /**
487         * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.)
488         */
489        public Quantity getValueQuantity() throws FHIRException { 
490          if (this.value == null)
491            this.value = new Quantity();
492          if (!(this.value instanceof Quantity))
493            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
494          return (Quantity) this.value;
495        }
496
497        public boolean hasValueQuantity() { 
498          return this != null && this.value instanceof Quantity;
499        }
500
501        /**
502         * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.)
503         */
504        public Range getValueRange() throws FHIRException { 
505          if (this.value == null)
506            this.value = new Range();
507          if (!(this.value instanceof Range))
508            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
509          return (Range) this.value;
510        }
511
512        public boolean hasValueRange() { 
513          return this != null && this.value instanceof Range;
514        }
515
516        /**
517         * @return {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.)
518         */
519        public Reference getValueReference() throws FHIRException { 
520          if (this.value == null)
521            this.value = new Reference();
522          if (!(this.value instanceof Reference))
523            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
524          return (Reference) this.value;
525        }
526
527        public boolean hasValueReference() { 
528          return this != null && this.value instanceof Reference;
529        }
530
531        public boolean hasValue() { 
532          return this.value != null && !this.value.isEmpty();
533        }
534
535        /**
536         * @param value {@link #value} (The value of the trait that holds (or does not hold - see 'exclude') for members of the group.)
537         */
538        public GroupCharacteristicComponent setValue(DataType value) { 
539          if (value != null && !(value instanceof CodeableConcept || value instanceof BooleanType || value instanceof Quantity || value instanceof Range || value instanceof Reference))
540            throw new FHIRException("Not the right type for Group.characteristic.value[x]: "+value.fhirType());
541          this.value = value;
542          return this;
543        }
544
545        /**
546         * @return {@link #exclude} (If true, indicates the characteristic is one that is NOT held by members of the group.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value
547         */
548        public BooleanType getExcludeElement() { 
549          if (this.exclude == null)
550            if (Configuration.errorOnAutoCreate())
551              throw new Error("Attempt to auto-create GroupCharacteristicComponent.exclude");
552            else if (Configuration.doAutoCreate())
553              this.exclude = new BooleanType(); // bb
554          return this.exclude;
555        }
556
557        public boolean hasExcludeElement() { 
558          return this.exclude != null && !this.exclude.isEmpty();
559        }
560
561        public boolean hasExclude() { 
562          return this.exclude != null && !this.exclude.isEmpty();
563        }
564
565        /**
566         * @param value {@link #exclude} (If true, indicates the characteristic is one that is NOT held by members of the group.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value
567         */
568        public GroupCharacteristicComponent setExcludeElement(BooleanType value) { 
569          this.exclude = value;
570          return this;
571        }
572
573        /**
574         * @return If true, indicates the characteristic is one that is NOT held by members of the group.
575         */
576        public boolean getExclude() { 
577          return this.exclude == null || this.exclude.isEmpty() ? false : this.exclude.getValue();
578        }
579
580        /**
581         * @param value If true, indicates the characteristic is one that is NOT held by members of the group.
582         */
583        public GroupCharacteristicComponent setExclude(boolean value) { 
584            if (this.exclude == null)
585              this.exclude = new BooleanType();
586            this.exclude.setValue(value);
587          return this;
588        }
589
590        /**
591         * @return {@link #period} (The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.)
592         */
593        public Period getPeriod() { 
594          if (this.period == null)
595            if (Configuration.errorOnAutoCreate())
596              throw new Error("Attempt to auto-create GroupCharacteristicComponent.period");
597            else if (Configuration.doAutoCreate())
598              this.period = new Period(); // cc
599          return this.period;
600        }
601
602        public boolean hasPeriod() { 
603          return this.period != null && !this.period.isEmpty();
604        }
605
606        /**
607         * @param value {@link #period} (The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.)
608         */
609        public GroupCharacteristicComponent setPeriod(Period value) { 
610          this.period = value;
611          return this;
612        }
613
614        protected void listChildren(List<Property> children) {
615          super.listChildren(children);
616          children.add(new Property("code", "CodeableConcept", "A code that identifies the kind of trait being asserted.", 0, 1, code));
617          children.add(new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value));
618          children.add(new Property("exclude", "boolean", "If true, indicates the characteristic is one that is NOT held by members of the group.", 0, 1, exclude));
619          children.add(new Property("period", "Period", "The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.", 0, 1, period));
620        }
621
622        @Override
623        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
624          switch (_hash) {
625          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code that identifies the kind of trait being asserted.", 0, 1, code);
626          case -1410166417: /*value[x]*/  return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value);
627          case 111972721: /*value*/  return new Property("value[x]", "CodeableConcept|boolean|Quantity|Range|Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value);
628          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value);
629          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value);
630          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value);
631          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value);
632          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference", "The value of the trait that holds (or does not hold - see 'exclude') for members of the group.", 0, 1, value);
633          case -1321148966: /*exclude*/  return new Property("exclude", "boolean", "If true, indicates the characteristic is one that is NOT held by members of the group.", 0, 1, exclude);
634          case -991726143: /*period*/  return new Property("period", "Period", "The period over which the characteristic is tested; e.g. the patient had an operation during the month of June.", 0, 1, period);
635          default: return super.getNamedProperty(_hash, _name, _checkValid);
636          }
637
638        }
639
640      @Override
641      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
642        switch (hash) {
643        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
644        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
645        case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : new Base[] {this.exclude}; // BooleanType
646        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
647        default: return super.getProperty(hash, name, checkValid);
648        }
649
650      }
651
652      @Override
653      public Base setProperty(int hash, String name, Base value) throws FHIRException {
654        switch (hash) {
655        case 3059181: // code
656          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
657          return value;
658        case 111972721: // value
659          this.value = TypeConvertor.castToType(value); // DataType
660          return value;
661        case -1321148966: // exclude
662          this.exclude = TypeConvertor.castToBoolean(value); // BooleanType
663          return value;
664        case -991726143: // period
665          this.period = TypeConvertor.castToPeriod(value); // Period
666          return value;
667        default: return super.setProperty(hash, name, value);
668        }
669
670      }
671
672      @Override
673      public Base setProperty(String name, Base value) throws FHIRException {
674        if (name.equals("code")) {
675          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
676        } else if (name.equals("value[x]")) {
677          this.value = TypeConvertor.castToType(value); // DataType
678        } else if (name.equals("exclude")) {
679          this.exclude = TypeConvertor.castToBoolean(value); // BooleanType
680        } else if (name.equals("period")) {
681          this.period = TypeConvertor.castToPeriod(value); // Period
682        } else
683          return super.setProperty(name, value);
684        return value;
685      }
686
687  @Override
688  public void removeChild(String name, Base value) throws FHIRException {
689        if (name.equals("code")) {
690          this.code = null;
691        } else if (name.equals("value[x]")) {
692          this.value = null;
693        } else if (name.equals("exclude")) {
694          this.exclude = null;
695        } else if (name.equals("period")) {
696          this.period = null;
697        } else
698          super.removeChild(name, value);
699        
700      }
701
702      @Override
703      public Base makeProperty(int hash, String name) throws FHIRException {
704        switch (hash) {
705        case 3059181:  return getCode();
706        case -1410166417:  return getValue();
707        case 111972721:  return getValue();
708        case -1321148966:  return getExcludeElement();
709        case -991726143:  return getPeriod();
710        default: return super.makeProperty(hash, name);
711        }
712
713      }
714
715      @Override
716      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
717        switch (hash) {
718        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
719        case 111972721: /*value*/ return new String[] {"CodeableConcept", "boolean", "Quantity", "Range", "Reference"};
720        case -1321148966: /*exclude*/ return new String[] {"boolean"};
721        case -991726143: /*period*/ return new String[] {"Period"};
722        default: return super.getTypesForProperty(hash, name);
723        }
724
725      }
726
727      @Override
728      public Base addChild(String name) throws FHIRException {
729        if (name.equals("code")) {
730          this.code = new CodeableConcept();
731          return this.code;
732        }
733        else if (name.equals("valueCodeableConcept")) {
734          this.value = new CodeableConcept();
735          return this.value;
736        }
737        else if (name.equals("valueBoolean")) {
738          this.value = new BooleanType();
739          return this.value;
740        }
741        else if (name.equals("valueQuantity")) {
742          this.value = new Quantity();
743          return this.value;
744        }
745        else if (name.equals("valueRange")) {
746          this.value = new Range();
747          return this.value;
748        }
749        else if (name.equals("valueReference")) {
750          this.value = new Reference();
751          return this.value;
752        }
753        else if (name.equals("exclude")) {
754          throw new FHIRException("Cannot call addChild on a singleton property Group.characteristic.exclude");
755        }
756        else if (name.equals("period")) {
757          this.period = new Period();
758          return this.period;
759        }
760        else
761          return super.addChild(name);
762      }
763
764      public GroupCharacteristicComponent copy() {
765        GroupCharacteristicComponent dst = new GroupCharacteristicComponent();
766        copyValues(dst);
767        return dst;
768      }
769
770      public void copyValues(GroupCharacteristicComponent dst) {
771        super.copyValues(dst);
772        dst.code = code == null ? null : code.copy();
773        dst.value = value == null ? null : value.copy();
774        dst.exclude = exclude == null ? null : exclude.copy();
775        dst.period = period == null ? null : period.copy();
776      }
777
778      @Override
779      public boolean equalsDeep(Base other_) {
780        if (!super.equalsDeep(other_))
781          return false;
782        if (!(other_ instanceof GroupCharacteristicComponent))
783          return false;
784        GroupCharacteristicComponent o = (GroupCharacteristicComponent) other_;
785        return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(exclude, o.exclude, true)
786           && compareDeep(period, o.period, true);
787      }
788
789      @Override
790      public boolean equalsShallow(Base other_) {
791        if (!super.equalsShallow(other_))
792          return false;
793        if (!(other_ instanceof GroupCharacteristicComponent))
794          return false;
795        GroupCharacteristicComponent o = (GroupCharacteristicComponent) other_;
796        return compareValues(exclude, o.exclude, true);
797      }
798
799      public boolean isEmpty() {
800        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value, exclude, period
801          );
802      }
803
804  public String fhirType() {
805    return "Group.characteristic";
806
807  }
808
809  }
810
811    @Block()
812    public static class GroupMemberComponent extends BackboneElement implements IBaseBackboneElement {
813        /**
814         * A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.
815         */
816        @Child(name = "entity", type = {CareTeam.class, Device.class, Group.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Specimen.class}, order=1, min=1, max=1, modifier=false, summary=false)
817        @Description(shortDefinition="Reference to the group member", formalDefinition="A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same." )
818        protected Reference entity;
819
820        /**
821         * The period that the member was in the group, if known.
822         */
823        @Child(name = "period", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=false)
824        @Description(shortDefinition="Period member belonged to the group", formalDefinition="The period that the member was in the group, if known." )
825        protected Period period;
826
827        /**
828         * A flag to indicate that the member is no longer in the group, but previously may have been a member.
829         */
830        @Child(name = "inactive", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
831        @Description(shortDefinition="If member is no longer in group", formalDefinition="A flag to indicate that the member is no longer in the group, but previously may have been a member." )
832        protected BooleanType inactive;
833
834        private static final long serialVersionUID = -1206153083L;
835
836    /**
837     * Constructor
838     */
839      public GroupMemberComponent() {
840        super();
841      }
842
843    /**
844     * Constructor
845     */
846      public GroupMemberComponent(Reference entity) {
847        super();
848        this.setEntity(entity);
849      }
850
851        /**
852         * @return {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.)
853         */
854        public Reference getEntity() { 
855          if (this.entity == null)
856            if (Configuration.errorOnAutoCreate())
857              throw new Error("Attempt to auto-create GroupMemberComponent.entity");
858            else if (Configuration.doAutoCreate())
859              this.entity = new Reference(); // cc
860          return this.entity;
861        }
862
863        public boolean hasEntity() { 
864          return this.entity != null && !this.entity.isEmpty();
865        }
866
867        /**
868         * @param value {@link #entity} (A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.)
869         */
870        public GroupMemberComponent setEntity(Reference value) { 
871          this.entity = value;
872          return this;
873        }
874
875        /**
876         * @return {@link #period} (The period that the member was in the group, if known.)
877         */
878        public Period getPeriod() { 
879          if (this.period == null)
880            if (Configuration.errorOnAutoCreate())
881              throw new Error("Attempt to auto-create GroupMemberComponent.period");
882            else if (Configuration.doAutoCreate())
883              this.period = new Period(); // cc
884          return this.period;
885        }
886
887        public boolean hasPeriod() { 
888          return this.period != null && !this.period.isEmpty();
889        }
890
891        /**
892         * @param value {@link #period} (The period that the member was in the group, if known.)
893         */
894        public GroupMemberComponent setPeriod(Period value) { 
895          this.period = value;
896          return this;
897        }
898
899        /**
900         * @return {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
901         */
902        public BooleanType getInactiveElement() { 
903          if (this.inactive == null)
904            if (Configuration.errorOnAutoCreate())
905              throw new Error("Attempt to auto-create GroupMemberComponent.inactive");
906            else if (Configuration.doAutoCreate())
907              this.inactive = new BooleanType(); // bb
908          return this.inactive;
909        }
910
911        public boolean hasInactiveElement() { 
912          return this.inactive != null && !this.inactive.isEmpty();
913        }
914
915        public boolean hasInactive() { 
916          return this.inactive != null && !this.inactive.isEmpty();
917        }
918
919        /**
920         * @param value {@link #inactive} (A flag to indicate that the member is no longer in the group, but previously may have been a member.). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
921         */
922        public GroupMemberComponent setInactiveElement(BooleanType value) { 
923          this.inactive = value;
924          return this;
925        }
926
927        /**
928         * @return A flag to indicate that the member is no longer in the group, but previously may have been a member.
929         */
930        public boolean getInactive() { 
931          return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue();
932        }
933
934        /**
935         * @param value A flag to indicate that the member is no longer in the group, but previously may have been a member.
936         */
937        public GroupMemberComponent setInactive(boolean value) { 
938            if (this.inactive == null)
939              this.inactive = new BooleanType();
940            this.inactive.setValue(value);
941          return this;
942        }
943
944        protected void listChildren(List<Property> children) {
945          super.listChildren(children);
946          children.add(new Property("entity", "Reference(CareTeam|Device|Group|HealthcareService|Location|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson|Specimen)", "A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.", 0, 1, entity));
947          children.add(new Property("period", "Period", "The period that the member was in the group, if known.", 0, 1, period));
948          children.add(new Property("inactive", "boolean", "A flag to indicate that the member is no longer in the group, but previously may have been a member.", 0, 1, inactive));
949        }
950
951        @Override
952        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
953          switch (_hash) {
954          case -1298275357: /*entity*/  return new Property("entity", "Reference(CareTeam|Device|Group|HealthcareService|Location|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson|Specimen)", "A reference to the entity that is a member of the group. Must be consistent with Group.type. If the entity is another group, then the type must be the same.", 0, 1, entity);
955          case -991726143: /*period*/  return new Property("period", "Period", "The period that the member was in the group, if known.", 0, 1, period);
956          case 24665195: /*inactive*/  return new Property("inactive", "boolean", "A flag to indicate that the member is no longer in the group, but previously may have been a member.", 0, 1, inactive);
957          default: return super.getNamedProperty(_hash, _name, _checkValid);
958          }
959
960        }
961
962      @Override
963      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
964        switch (hash) {
965        case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : new Base[] {this.entity}; // Reference
966        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
967        case 24665195: /*inactive*/ return this.inactive == null ? new Base[0] : new Base[] {this.inactive}; // BooleanType
968        default: return super.getProperty(hash, name, checkValid);
969        }
970
971      }
972
973      @Override
974      public Base setProperty(int hash, String name, Base value) throws FHIRException {
975        switch (hash) {
976        case -1298275357: // entity
977          this.entity = TypeConvertor.castToReference(value); // Reference
978          return value;
979        case -991726143: // period
980          this.period = TypeConvertor.castToPeriod(value); // Period
981          return value;
982        case 24665195: // inactive
983          this.inactive = TypeConvertor.castToBoolean(value); // BooleanType
984          return value;
985        default: return super.setProperty(hash, name, value);
986        }
987
988      }
989
990      @Override
991      public Base setProperty(String name, Base value) throws FHIRException {
992        if (name.equals("entity")) {
993          this.entity = TypeConvertor.castToReference(value); // Reference
994        } else if (name.equals("period")) {
995          this.period = TypeConvertor.castToPeriod(value); // Period
996        } else if (name.equals("inactive")) {
997          this.inactive = TypeConvertor.castToBoolean(value); // BooleanType
998        } else
999          return super.setProperty(name, value);
1000        return value;
1001      }
1002
1003  @Override
1004  public void removeChild(String name, Base value) throws FHIRException {
1005        if (name.equals("entity")) {
1006          this.entity = null;
1007        } else if (name.equals("period")) {
1008          this.period = null;
1009        } else if (name.equals("inactive")) {
1010          this.inactive = null;
1011        } else
1012          super.removeChild(name, value);
1013        
1014      }
1015
1016      @Override
1017      public Base makeProperty(int hash, String name) throws FHIRException {
1018        switch (hash) {
1019        case -1298275357:  return getEntity();
1020        case -991726143:  return getPeriod();
1021        case 24665195:  return getInactiveElement();
1022        default: return super.makeProperty(hash, name);
1023        }
1024
1025      }
1026
1027      @Override
1028      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1029        switch (hash) {
1030        case -1298275357: /*entity*/ return new String[] {"Reference"};
1031        case -991726143: /*period*/ return new String[] {"Period"};
1032        case 24665195: /*inactive*/ return new String[] {"boolean"};
1033        default: return super.getTypesForProperty(hash, name);
1034        }
1035
1036      }
1037
1038      @Override
1039      public Base addChild(String name) throws FHIRException {
1040        if (name.equals("entity")) {
1041          this.entity = new Reference();
1042          return this.entity;
1043        }
1044        else if (name.equals("period")) {
1045          this.period = new Period();
1046          return this.period;
1047        }
1048        else if (name.equals("inactive")) {
1049          throw new FHIRException("Cannot call addChild on a singleton property Group.member.inactive");
1050        }
1051        else
1052          return super.addChild(name);
1053      }
1054
1055      public GroupMemberComponent copy() {
1056        GroupMemberComponent dst = new GroupMemberComponent();
1057        copyValues(dst);
1058        return dst;
1059      }
1060
1061      public void copyValues(GroupMemberComponent dst) {
1062        super.copyValues(dst);
1063        dst.entity = entity == null ? null : entity.copy();
1064        dst.period = period == null ? null : period.copy();
1065        dst.inactive = inactive == null ? null : inactive.copy();
1066      }
1067
1068      @Override
1069      public boolean equalsDeep(Base other_) {
1070        if (!super.equalsDeep(other_))
1071          return false;
1072        if (!(other_ instanceof GroupMemberComponent))
1073          return false;
1074        GroupMemberComponent o = (GroupMemberComponent) other_;
1075        return compareDeep(entity, o.entity, true) && compareDeep(period, o.period, true) && compareDeep(inactive, o.inactive, true)
1076          ;
1077      }
1078
1079      @Override
1080      public boolean equalsShallow(Base other_) {
1081        if (!super.equalsShallow(other_))
1082          return false;
1083        if (!(other_ instanceof GroupMemberComponent))
1084          return false;
1085        GroupMemberComponent o = (GroupMemberComponent) other_;
1086        return compareValues(inactive, o.inactive, true);
1087      }
1088
1089      public boolean isEmpty() {
1090        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(entity, period, inactive
1091          );
1092      }
1093
1094  public String fhirType() {
1095    return "Group.member";
1096
1097  }
1098
1099  }
1100
1101    /**
1102     * Business identifiers assigned to this participant by one of the applications involved.  These identifiers remain constant as the resource is updated and propagates from server to server.
1103     */
1104    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1105    @Description(shortDefinition="Business Identifier for this Group", formalDefinition="Business identifiers assigned to this participant by one of the applications involved.  These identifiers remain constant as the resource is updated and propagates from server to server." )
1106    protected List<Identifier> identifier;
1107
1108    /**
1109     * Indicates whether the record for the group is available for use or is merely being retained for historical purposes.
1110     */
1111    @Child(name = "active", type = {BooleanType.class}, order=1, min=0, max=1, modifier=true, summary=true)
1112    @Description(shortDefinition="Whether this group's record is in active use", formalDefinition="Indicates whether the record for the group is available for use or is merely being retained for historical purposes." )
1113    protected BooleanType active;
1114
1115    /**
1116     * Identifies the broad classification of the kind of resources the group includes.
1117     */
1118    @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1119    @Description(shortDefinition="person | animal | practitioner | device | careteam | healthcareservice | location | organization | relatedperson | specimen", formalDefinition="Identifies the broad classification of the kind of resources the group includes." )
1120    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/group-type")
1121    protected Enumeration<GroupType> type;
1122
1123    /**
1124     * Basis for membership in the Group:
1125
1126* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.
1127* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.
1128     */
1129    @Child(name = "membership", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1130    @Description(shortDefinition="definitional | enumerated", formalDefinition="Basis for membership in the Group:\n\n* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.\n* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member." )
1131    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/group-membership-basis")
1132    protected Enumeration<GroupMembershipBasis> membership;
1133
1134    /**
1135     * Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.
1136     */
1137    @Child(name = "code", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
1138    @Description(shortDefinition="Kind of Group members", formalDefinition="Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc." )
1139    protected CodeableConcept code;
1140
1141    /**
1142     * A label assigned to the group for human identification and communication.
1143     */
1144    @Child(name = "name", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1145    @Description(shortDefinition="Label for Group", formalDefinition="A label assigned to the group for human identification and communication." )
1146    protected StringType name;
1147
1148    /**
1149     * Explanation of what the group represents and how it is intended to be used.
1150     */
1151    @Child(name = "description", type = {MarkdownType.class}, order=6, min=0, max=1, modifier=false, summary=false)
1152    @Description(shortDefinition="Natural language description of the group", formalDefinition="Explanation of what the group represents and how it is intended to be used." )
1153    protected MarkdownType description;
1154
1155    /**
1156     * A count of the number of resource instances that are part of the group.
1157     */
1158    @Child(name = "quantity", type = {UnsignedIntType.class}, order=7, min=0, max=1, modifier=false, summary=true)
1159    @Description(shortDefinition="Number of members", formalDefinition="A count of the number of resource instances that are part of the group." )
1160    protected UnsignedIntType quantity;
1161
1162    /**
1163     * Entity responsible for defining and maintaining Group characteristics and/or registered members.
1164     */
1165    @Child(name = "managingEntity", type = {Organization.class, RelatedPerson.class, Practitioner.class, PractitionerRole.class}, order=8, min=0, max=1, modifier=false, summary=true)
1166    @Description(shortDefinition="Entity that is the custodian of the Group's definition", formalDefinition="Entity responsible for defining and maintaining Group characteristics and/or registered members." )
1167    protected Reference managingEntity;
1168
1169    /**
1170     * Identifies traits whose presence r absence is shared by members of the group.
1171     */
1172    @Child(name = "characteristic", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1173    @Description(shortDefinition="Include / Exclude group members by Trait", formalDefinition="Identifies traits whose presence r absence is shared by members of the group." )
1174    protected List<GroupCharacteristicComponent> characteristic;
1175
1176    /**
1177     * Identifies the resource instances that are members of the group.
1178     */
1179    @Child(name = "member", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1180    @Description(shortDefinition="Who or what is in group", formalDefinition="Identifies the resource instances that are members of the group." )
1181    protected List<GroupMemberComponent> member;
1182
1183    private static final long serialVersionUID = -39542514L;
1184
1185  /**
1186   * Constructor
1187   */
1188    public Group() {
1189      super();
1190    }
1191
1192  /**
1193   * Constructor
1194   */
1195    public Group(GroupType type, GroupMembershipBasis membership) {
1196      super();
1197      this.setType(type);
1198      this.setMembership(membership);
1199    }
1200
1201    /**
1202     * @return {@link #identifier} (Business identifiers assigned to this participant by one of the applications involved.  These identifiers remain constant as the resource is updated and propagates from server to server.)
1203     */
1204    public List<Identifier> getIdentifier() { 
1205      if (this.identifier == null)
1206        this.identifier = new ArrayList<Identifier>();
1207      return this.identifier;
1208    }
1209
1210    /**
1211     * @return Returns a reference to <code>this</code> for easy method chaining
1212     */
1213    public Group setIdentifier(List<Identifier> theIdentifier) { 
1214      this.identifier = theIdentifier;
1215      return this;
1216    }
1217
1218    public boolean hasIdentifier() { 
1219      if (this.identifier == null)
1220        return false;
1221      for (Identifier item : this.identifier)
1222        if (!item.isEmpty())
1223          return true;
1224      return false;
1225    }
1226
1227    public Identifier addIdentifier() { //3
1228      Identifier t = new Identifier();
1229      if (this.identifier == null)
1230        this.identifier = new ArrayList<Identifier>();
1231      this.identifier.add(t);
1232      return t;
1233    }
1234
1235    public Group addIdentifier(Identifier t) { //3
1236      if (t == null)
1237        return this;
1238      if (this.identifier == null)
1239        this.identifier = new ArrayList<Identifier>();
1240      this.identifier.add(t);
1241      return this;
1242    }
1243
1244    /**
1245     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1246     */
1247    public Identifier getIdentifierFirstRep() { 
1248      if (getIdentifier().isEmpty()) {
1249        addIdentifier();
1250      }
1251      return getIdentifier().get(0);
1252    }
1253
1254    /**
1255     * @return {@link #active} (Indicates whether the record for the group is available for use or is merely being retained for historical purposes.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1256     */
1257    public BooleanType getActiveElement() { 
1258      if (this.active == null)
1259        if (Configuration.errorOnAutoCreate())
1260          throw new Error("Attempt to auto-create Group.active");
1261        else if (Configuration.doAutoCreate())
1262          this.active = new BooleanType(); // bb
1263      return this.active;
1264    }
1265
1266    public boolean hasActiveElement() { 
1267      return this.active != null && !this.active.isEmpty();
1268    }
1269
1270    public boolean hasActive() { 
1271      return this.active != null && !this.active.isEmpty();
1272    }
1273
1274    /**
1275     * @param value {@link #active} (Indicates whether the record for the group is available for use or is merely being retained for historical purposes.). This is the underlying object with id, value and extensions. The accessor "getActive" gives direct access to the value
1276     */
1277    public Group setActiveElement(BooleanType value) { 
1278      this.active = value;
1279      return this;
1280    }
1281
1282    /**
1283     * @return Indicates whether the record for the group is available for use or is merely being retained for historical purposes.
1284     */
1285    public boolean getActive() { 
1286      return this.active == null || this.active.isEmpty() ? false : this.active.getValue();
1287    }
1288
1289    /**
1290     * @param value Indicates whether the record for the group is available for use or is merely being retained for historical purposes.
1291     */
1292    public Group setActive(boolean value) { 
1293        if (this.active == null)
1294          this.active = new BooleanType();
1295        this.active.setValue(value);
1296      return this;
1297    }
1298
1299    /**
1300     * @return {@link #type} (Identifies the broad classification of the kind of resources the group includes.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1301     */
1302    public Enumeration<GroupType> getTypeElement() { 
1303      if (this.type == null)
1304        if (Configuration.errorOnAutoCreate())
1305          throw new Error("Attempt to auto-create Group.type");
1306        else if (Configuration.doAutoCreate())
1307          this.type = new Enumeration<GroupType>(new GroupTypeEnumFactory()); // bb
1308      return this.type;
1309    }
1310
1311    public boolean hasTypeElement() { 
1312      return this.type != null && !this.type.isEmpty();
1313    }
1314
1315    public boolean hasType() { 
1316      return this.type != null && !this.type.isEmpty();
1317    }
1318
1319    /**
1320     * @param value {@link #type} (Identifies the broad classification of the kind of resources the group includes.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1321     */
1322    public Group setTypeElement(Enumeration<GroupType> value) { 
1323      this.type = value;
1324      return this;
1325    }
1326
1327    /**
1328     * @return Identifies the broad classification of the kind of resources the group includes.
1329     */
1330    public GroupType getType() { 
1331      return this.type == null ? null : this.type.getValue();
1332    }
1333
1334    /**
1335     * @param value Identifies the broad classification of the kind of resources the group includes.
1336     */
1337    public Group setType(GroupType value) { 
1338        if (this.type == null)
1339          this.type = new Enumeration<GroupType>(new GroupTypeEnumFactory());
1340        this.type.setValue(value);
1341      return this;
1342    }
1343
1344    /**
1345     * @return {@link #membership} (Basis for membership in the Group:
1346
1347* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.
1348* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.). This is the underlying object with id, value and extensions. The accessor "getMembership" gives direct access to the value
1349     */
1350    public Enumeration<GroupMembershipBasis> getMembershipElement() { 
1351      if (this.membership == null)
1352        if (Configuration.errorOnAutoCreate())
1353          throw new Error("Attempt to auto-create Group.membership");
1354        else if (Configuration.doAutoCreate())
1355          this.membership = new Enumeration<GroupMembershipBasis>(new GroupMembershipBasisEnumFactory()); // bb
1356      return this.membership;
1357    }
1358
1359    public boolean hasMembershipElement() { 
1360      return this.membership != null && !this.membership.isEmpty();
1361    }
1362
1363    public boolean hasMembership() { 
1364      return this.membership != null && !this.membership.isEmpty();
1365    }
1366
1367    /**
1368     * @param value {@link #membership} (Basis for membership in the Group:
1369
1370* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.
1371* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.). This is the underlying object with id, value and extensions. The accessor "getMembership" gives direct access to the value
1372     */
1373    public Group setMembershipElement(Enumeration<GroupMembershipBasis> value) { 
1374      this.membership = value;
1375      return this;
1376    }
1377
1378    /**
1379     * @return Basis for membership in the Group:
1380
1381* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.
1382* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.
1383     */
1384    public GroupMembershipBasis getMembership() { 
1385      return this.membership == null ? null : this.membership.getValue();
1386    }
1387
1388    /**
1389     * @param value Basis for membership in the Group:
1390
1391* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.
1392* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.
1393     */
1394    public Group setMembership(GroupMembershipBasis value) { 
1395        if (this.membership == null)
1396          this.membership = new Enumeration<GroupMembershipBasis>(new GroupMembershipBasisEnumFactory());
1397        this.membership.setValue(value);
1398      return this;
1399    }
1400
1401    /**
1402     * @return {@link #code} (Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.)
1403     */
1404    public CodeableConcept getCode() { 
1405      if (this.code == null)
1406        if (Configuration.errorOnAutoCreate())
1407          throw new Error("Attempt to auto-create Group.code");
1408        else if (Configuration.doAutoCreate())
1409          this.code = new CodeableConcept(); // cc
1410      return this.code;
1411    }
1412
1413    public boolean hasCode() { 
1414      return this.code != null && !this.code.isEmpty();
1415    }
1416
1417    /**
1418     * @param value {@link #code} (Provides a specific type of resource the group includes; e.g. "cow", "syringe", etc.)
1419     */
1420    public Group setCode(CodeableConcept value) { 
1421      this.code = value;
1422      return this;
1423    }
1424
1425    /**
1426     * @return {@link #name} (A label assigned to the group for human identification and communication.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1427     */
1428    public StringType getNameElement() { 
1429      if (this.name == null)
1430        if (Configuration.errorOnAutoCreate())
1431          throw new Error("Attempt to auto-create Group.name");
1432        else if (Configuration.doAutoCreate())
1433          this.name = new StringType(); // bb
1434      return this.name;
1435    }
1436
1437    public boolean hasNameElement() { 
1438      return this.name != null && !this.name.isEmpty();
1439    }
1440
1441    public boolean hasName() { 
1442      return this.name != null && !this.name.isEmpty();
1443    }
1444
1445    /**
1446     * @param value {@link #name} (A label assigned to the group for human identification and communication.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1447     */
1448    public Group setNameElement(StringType value) { 
1449      this.name = value;
1450      return this;
1451    }
1452
1453    /**
1454     * @return A label assigned to the group for human identification and communication.
1455     */
1456    public String getName() { 
1457      return this.name == null ? null : this.name.getValue();
1458    }
1459
1460    /**
1461     * @param value A label assigned to the group for human identification and communication.
1462     */
1463    public Group setName(String value) { 
1464      if (Utilities.noString(value))
1465        this.name = null;
1466      else {
1467        if (this.name == null)
1468          this.name = new StringType();
1469        this.name.setValue(value);
1470      }
1471      return this;
1472    }
1473
1474    /**
1475     * @return {@link #description} (Explanation of what the group represents and how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1476     */
1477    public MarkdownType getDescriptionElement() { 
1478      if (this.description == null)
1479        if (Configuration.errorOnAutoCreate())
1480          throw new Error("Attempt to auto-create Group.description");
1481        else if (Configuration.doAutoCreate())
1482          this.description = new MarkdownType(); // bb
1483      return this.description;
1484    }
1485
1486    public boolean hasDescriptionElement() { 
1487      return this.description != null && !this.description.isEmpty();
1488    }
1489
1490    public boolean hasDescription() { 
1491      return this.description != null && !this.description.isEmpty();
1492    }
1493
1494    /**
1495     * @param value {@link #description} (Explanation of what the group represents and how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1496     */
1497    public Group setDescriptionElement(MarkdownType value) { 
1498      this.description = value;
1499      return this;
1500    }
1501
1502    /**
1503     * @return Explanation of what the group represents and how it is intended to be used.
1504     */
1505    public String getDescription() { 
1506      return this.description == null ? null : this.description.getValue();
1507    }
1508
1509    /**
1510     * @param value Explanation of what the group represents and how it is intended to be used.
1511     */
1512    public Group setDescription(String value) { 
1513      if (Utilities.noString(value))
1514        this.description = null;
1515      else {
1516        if (this.description == null)
1517          this.description = new MarkdownType();
1518        this.description.setValue(value);
1519      }
1520      return this;
1521    }
1522
1523    /**
1524     * @return {@link #quantity} (A count of the number of resource instances that are part of the group.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value
1525     */
1526    public UnsignedIntType getQuantityElement() { 
1527      if (this.quantity == null)
1528        if (Configuration.errorOnAutoCreate())
1529          throw new Error("Attempt to auto-create Group.quantity");
1530        else if (Configuration.doAutoCreate())
1531          this.quantity = new UnsignedIntType(); // bb
1532      return this.quantity;
1533    }
1534
1535    public boolean hasQuantityElement() { 
1536      return this.quantity != null && !this.quantity.isEmpty();
1537    }
1538
1539    public boolean hasQuantity() { 
1540      return this.quantity != null && !this.quantity.isEmpty();
1541    }
1542
1543    /**
1544     * @param value {@link #quantity} (A count of the number of resource instances that are part of the group.). This is the underlying object with id, value and extensions. The accessor "getQuantity" gives direct access to the value
1545     */
1546    public Group setQuantityElement(UnsignedIntType value) { 
1547      this.quantity = value;
1548      return this;
1549    }
1550
1551    /**
1552     * @return A count of the number of resource instances that are part of the group.
1553     */
1554    public int getQuantity() { 
1555      return this.quantity == null || this.quantity.isEmpty() ? 0 : this.quantity.getValue();
1556    }
1557
1558    /**
1559     * @param value A count of the number of resource instances that are part of the group.
1560     */
1561    public Group setQuantity(int value) { 
1562        if (this.quantity == null)
1563          this.quantity = new UnsignedIntType();
1564        this.quantity.setValue(value);
1565      return this;
1566    }
1567
1568    /**
1569     * @return {@link #managingEntity} (Entity responsible for defining and maintaining Group characteristics and/or registered members.)
1570     */
1571    public Reference getManagingEntity() { 
1572      if (this.managingEntity == null)
1573        if (Configuration.errorOnAutoCreate())
1574          throw new Error("Attempt to auto-create Group.managingEntity");
1575        else if (Configuration.doAutoCreate())
1576          this.managingEntity = new Reference(); // cc
1577      return this.managingEntity;
1578    }
1579
1580    public boolean hasManagingEntity() { 
1581      return this.managingEntity != null && !this.managingEntity.isEmpty();
1582    }
1583
1584    /**
1585     * @param value {@link #managingEntity} (Entity responsible for defining and maintaining Group characteristics and/or registered members.)
1586     */
1587    public Group setManagingEntity(Reference value) { 
1588      this.managingEntity = value;
1589      return this;
1590    }
1591
1592    /**
1593     * @return {@link #characteristic} (Identifies traits whose presence r absence is shared by members of the group.)
1594     */
1595    public List<GroupCharacteristicComponent> getCharacteristic() { 
1596      if (this.characteristic == null)
1597        this.characteristic = new ArrayList<GroupCharacteristicComponent>();
1598      return this.characteristic;
1599    }
1600
1601    /**
1602     * @return Returns a reference to <code>this</code> for easy method chaining
1603     */
1604    public Group setCharacteristic(List<GroupCharacteristicComponent> theCharacteristic) { 
1605      this.characteristic = theCharacteristic;
1606      return this;
1607    }
1608
1609    public boolean hasCharacteristic() { 
1610      if (this.characteristic == null)
1611        return false;
1612      for (GroupCharacteristicComponent item : this.characteristic)
1613        if (!item.isEmpty())
1614          return true;
1615      return false;
1616    }
1617
1618    public GroupCharacteristicComponent addCharacteristic() { //3
1619      GroupCharacteristicComponent t = new GroupCharacteristicComponent();
1620      if (this.characteristic == null)
1621        this.characteristic = new ArrayList<GroupCharacteristicComponent>();
1622      this.characteristic.add(t);
1623      return t;
1624    }
1625
1626    public Group addCharacteristic(GroupCharacteristicComponent t) { //3
1627      if (t == null)
1628        return this;
1629      if (this.characteristic == null)
1630        this.characteristic = new ArrayList<GroupCharacteristicComponent>();
1631      this.characteristic.add(t);
1632      return this;
1633    }
1634
1635    /**
1636     * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3}
1637     */
1638    public GroupCharacteristicComponent getCharacteristicFirstRep() { 
1639      if (getCharacteristic().isEmpty()) {
1640        addCharacteristic();
1641      }
1642      return getCharacteristic().get(0);
1643    }
1644
1645    /**
1646     * @return {@link #member} (Identifies the resource instances that are members of the group.)
1647     */
1648    public List<GroupMemberComponent> getMember() { 
1649      if (this.member == null)
1650        this.member = new ArrayList<GroupMemberComponent>();
1651      return this.member;
1652    }
1653
1654    /**
1655     * @return Returns a reference to <code>this</code> for easy method chaining
1656     */
1657    public Group setMember(List<GroupMemberComponent> theMember) { 
1658      this.member = theMember;
1659      return this;
1660    }
1661
1662    public boolean hasMember() { 
1663      if (this.member == null)
1664        return false;
1665      for (GroupMemberComponent item : this.member)
1666        if (!item.isEmpty())
1667          return true;
1668      return false;
1669    }
1670
1671    public GroupMemberComponent addMember() { //3
1672      GroupMemberComponent t = new GroupMemberComponent();
1673      if (this.member == null)
1674        this.member = new ArrayList<GroupMemberComponent>();
1675      this.member.add(t);
1676      return t;
1677    }
1678
1679    public Group addMember(GroupMemberComponent t) { //3
1680      if (t == null)
1681        return this;
1682      if (this.member == null)
1683        this.member = new ArrayList<GroupMemberComponent>();
1684      this.member.add(t);
1685      return this;
1686    }
1687
1688    /**
1689     * @return The first repetition of repeating field {@link #member}, creating it if it does not already exist {3}
1690     */
1691    public GroupMemberComponent getMemberFirstRep() { 
1692      if (getMember().isEmpty()) {
1693        addMember();
1694      }
1695      return getMember().get(0);
1696    }
1697
1698      protected void listChildren(List<Property> children) {
1699        super.listChildren(children);
1700        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this participant by one of the applications involved.  These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1701        children.add(new Property("active", "boolean", "Indicates whether the record for the group is available for use or is merely being retained for historical purposes.", 0, 1, active));
1702        children.add(new Property("type", "code", "Identifies the broad classification of the kind of resources the group includes.", 0, 1, type));
1703        children.add(new Property("membership", "code", "Basis for membership in the Group:\n\n* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.\n* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.", 0, 1, membership));
1704        children.add(new Property("code", "CodeableConcept", "Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc.", 0, 1, code));
1705        children.add(new Property("name", "string", "A label assigned to the group for human identification and communication.", 0, 1, name));
1706        children.add(new Property("description", "markdown", "Explanation of what the group represents and how it is intended to be used.", 0, 1, description));
1707        children.add(new Property("quantity", "unsignedInt", "A count of the number of resource instances that are part of the group.", 0, 1, quantity));
1708        children.add(new Property("managingEntity", "Reference(Organization|RelatedPerson|Practitioner|PractitionerRole)", "Entity responsible for defining and maintaining Group characteristics and/or registered members.", 0, 1, managingEntity));
1709        children.add(new Property("characteristic", "", "Identifies traits whose presence r absence is shared by members of the group.", 0, java.lang.Integer.MAX_VALUE, characteristic));
1710        children.add(new Property("member", "", "Identifies the resource instances that are members of the group.", 0, java.lang.Integer.MAX_VALUE, member));
1711      }
1712
1713      @Override
1714      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1715        switch (_hash) {
1716        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this participant by one of the applications involved.  These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
1717        case -1422950650: /*active*/  return new Property("active", "boolean", "Indicates whether the record for the group is available for use or is merely being retained for historical purposes.", 0, 1, active);
1718        case 3575610: /*type*/  return new Property("type", "code", "Identifies the broad classification of the kind of resources the group includes.", 0, 1, type);
1719        case -1340241962: /*membership*/  return new Property("membership", "code", "Basis for membership in the Group:\n\n* 'definitional': The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete.\n* 'enumerated': The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member.", 0, 1, membership);
1720        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Provides a specific type of resource the group includes; e.g. \"cow\", \"syringe\", etc.", 0, 1, code);
1721        case 3373707: /*name*/  return new Property("name", "string", "A label assigned to the group for human identification and communication.", 0, 1, name);
1722        case -1724546052: /*description*/  return new Property("description", "markdown", "Explanation of what the group represents and how it is intended to be used.", 0, 1, description);
1723        case -1285004149: /*quantity*/  return new Property("quantity", "unsignedInt", "A count of the number of resource instances that are part of the group.", 0, 1, quantity);
1724        case -988474523: /*managingEntity*/  return new Property("managingEntity", "Reference(Organization|RelatedPerson|Practitioner|PractitionerRole)", "Entity responsible for defining and maintaining Group characteristics and/or registered members.", 0, 1, managingEntity);
1725        case 366313883: /*characteristic*/  return new Property("characteristic", "", "Identifies traits whose presence r absence is shared by members of the group.", 0, java.lang.Integer.MAX_VALUE, characteristic);
1726        case -1077769574: /*member*/  return new Property("member", "", "Identifies the resource instances that are members of the group.", 0, java.lang.Integer.MAX_VALUE, member);
1727        default: return super.getNamedProperty(_hash, _name, _checkValid);
1728        }
1729
1730      }
1731
1732      @Override
1733      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1734        switch (hash) {
1735        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1736        case -1422950650: /*active*/ return this.active == null ? new Base[0] : new Base[] {this.active}; // BooleanType
1737        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<GroupType>
1738        case -1340241962: /*membership*/ return this.membership == null ? new Base[0] : new Base[] {this.membership}; // Enumeration<GroupMembershipBasis>
1739        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1740        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1741        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1742        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // UnsignedIntType
1743        case -988474523: /*managingEntity*/ return this.managingEntity == null ? new Base[0] : new Base[] {this.managingEntity}; // Reference
1744        case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // GroupCharacteristicComponent
1745        case -1077769574: /*member*/ return this.member == null ? new Base[0] : this.member.toArray(new Base[this.member.size()]); // GroupMemberComponent
1746        default: return super.getProperty(hash, name, checkValid);
1747        }
1748
1749      }
1750
1751      @Override
1752      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1753        switch (hash) {
1754        case -1618432855: // identifier
1755          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1756          return value;
1757        case -1422950650: // active
1758          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1759          return value;
1760        case 3575610: // type
1761          value = new GroupTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1762          this.type = (Enumeration) value; // Enumeration<GroupType>
1763          return value;
1764        case -1340241962: // membership
1765          value = new GroupMembershipBasisEnumFactory().fromType(TypeConvertor.castToCode(value));
1766          this.membership = (Enumeration) value; // Enumeration<GroupMembershipBasis>
1767          return value;
1768        case 3059181: // code
1769          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1770          return value;
1771        case 3373707: // name
1772          this.name = TypeConvertor.castToString(value); // StringType
1773          return value;
1774        case -1724546052: // description
1775          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1776          return value;
1777        case -1285004149: // quantity
1778          this.quantity = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1779          return value;
1780        case -988474523: // managingEntity
1781          this.managingEntity = TypeConvertor.castToReference(value); // Reference
1782          return value;
1783        case 366313883: // characteristic
1784          this.getCharacteristic().add((GroupCharacteristicComponent) value); // GroupCharacteristicComponent
1785          return value;
1786        case -1077769574: // member
1787          this.getMember().add((GroupMemberComponent) value); // GroupMemberComponent
1788          return value;
1789        default: return super.setProperty(hash, name, value);
1790        }
1791
1792      }
1793
1794      @Override
1795      public Base setProperty(String name, Base value) throws FHIRException {
1796        if (name.equals("identifier")) {
1797          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1798        } else if (name.equals("active")) {
1799          this.active = TypeConvertor.castToBoolean(value); // BooleanType
1800        } else if (name.equals("type")) {
1801          value = new GroupTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1802          this.type = (Enumeration) value; // Enumeration<GroupType>
1803        } else if (name.equals("membership")) {
1804          value = new GroupMembershipBasisEnumFactory().fromType(TypeConvertor.castToCode(value));
1805          this.membership = (Enumeration) value; // Enumeration<GroupMembershipBasis>
1806        } else if (name.equals("code")) {
1807          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1808        } else if (name.equals("name")) {
1809          this.name = TypeConvertor.castToString(value); // StringType
1810        } else if (name.equals("description")) {
1811          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1812        } else if (name.equals("quantity")) {
1813          this.quantity = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1814        } else if (name.equals("managingEntity")) {
1815          this.managingEntity = TypeConvertor.castToReference(value); // Reference
1816        } else if (name.equals("characteristic")) {
1817          this.getCharacteristic().add((GroupCharacteristicComponent) value);
1818        } else if (name.equals("member")) {
1819          this.getMember().add((GroupMemberComponent) value);
1820        } else
1821          return super.setProperty(name, value);
1822        return value;
1823      }
1824
1825  @Override
1826  public void removeChild(String name, Base value) throws FHIRException {
1827        if (name.equals("identifier")) {
1828          this.getIdentifier().remove(value);
1829        } else if (name.equals("active")) {
1830          this.active = null;
1831        } else if (name.equals("type")) {
1832          value = new GroupTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1833          this.type = (Enumeration) value; // Enumeration<GroupType>
1834        } else if (name.equals("membership")) {
1835          value = new GroupMembershipBasisEnumFactory().fromType(TypeConvertor.castToCode(value));
1836          this.membership = (Enumeration) value; // Enumeration<GroupMembershipBasis>
1837        } else if (name.equals("code")) {
1838          this.code = null;
1839        } else if (name.equals("name")) {
1840          this.name = null;
1841        } else if (name.equals("description")) {
1842          this.description = null;
1843        } else if (name.equals("quantity")) {
1844          this.quantity = null;
1845        } else if (name.equals("managingEntity")) {
1846          this.managingEntity = null;
1847        } else if (name.equals("characteristic")) {
1848          this.getCharacteristic().remove((GroupCharacteristicComponent) value);
1849        } else if (name.equals("member")) {
1850          this.getMember().remove((GroupMemberComponent) value);
1851        } else
1852          super.removeChild(name, value);
1853        
1854      }
1855
1856      @Override
1857      public Base makeProperty(int hash, String name) throws FHIRException {
1858        switch (hash) {
1859        case -1618432855:  return addIdentifier(); 
1860        case -1422950650:  return getActiveElement();
1861        case 3575610:  return getTypeElement();
1862        case -1340241962:  return getMembershipElement();
1863        case 3059181:  return getCode();
1864        case 3373707:  return getNameElement();
1865        case -1724546052:  return getDescriptionElement();
1866        case -1285004149:  return getQuantityElement();
1867        case -988474523:  return getManagingEntity();
1868        case 366313883:  return addCharacteristic(); 
1869        case -1077769574:  return addMember(); 
1870        default: return super.makeProperty(hash, name);
1871        }
1872
1873      }
1874
1875      @Override
1876      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1877        switch (hash) {
1878        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1879        case -1422950650: /*active*/ return new String[] {"boolean"};
1880        case 3575610: /*type*/ return new String[] {"code"};
1881        case -1340241962: /*membership*/ return new String[] {"code"};
1882        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
1883        case 3373707: /*name*/ return new String[] {"string"};
1884        case -1724546052: /*description*/ return new String[] {"markdown"};
1885        case -1285004149: /*quantity*/ return new String[] {"unsignedInt"};
1886        case -988474523: /*managingEntity*/ return new String[] {"Reference"};
1887        case 366313883: /*characteristic*/ return new String[] {};
1888        case -1077769574: /*member*/ return new String[] {};
1889        default: return super.getTypesForProperty(hash, name);
1890        }
1891
1892      }
1893
1894      @Override
1895      public Base addChild(String name) throws FHIRException {
1896        if (name.equals("identifier")) {
1897          return addIdentifier();
1898        }
1899        else if (name.equals("active")) {
1900          throw new FHIRException("Cannot call addChild on a singleton property Group.active");
1901        }
1902        else if (name.equals("type")) {
1903          throw new FHIRException("Cannot call addChild on a singleton property Group.type");
1904        }
1905        else if (name.equals("membership")) {
1906          throw new FHIRException("Cannot call addChild on a singleton property Group.membership");
1907        }
1908        else if (name.equals("code")) {
1909          this.code = new CodeableConcept();
1910          return this.code;
1911        }
1912        else if (name.equals("name")) {
1913          throw new FHIRException("Cannot call addChild on a singleton property Group.name");
1914        }
1915        else if (name.equals("description")) {
1916          throw new FHIRException("Cannot call addChild on a singleton property Group.description");
1917        }
1918        else if (name.equals("quantity")) {
1919          throw new FHIRException("Cannot call addChild on a singleton property Group.quantity");
1920        }
1921        else if (name.equals("managingEntity")) {
1922          this.managingEntity = new Reference();
1923          return this.managingEntity;
1924        }
1925        else if (name.equals("characteristic")) {
1926          return addCharacteristic();
1927        }
1928        else if (name.equals("member")) {
1929          return addMember();
1930        }
1931        else
1932          return super.addChild(name);
1933      }
1934
1935  public String fhirType() {
1936    return "Group";
1937
1938  }
1939
1940      public Group copy() {
1941        Group dst = new Group();
1942        copyValues(dst);
1943        return dst;
1944      }
1945
1946      public void copyValues(Group dst) {
1947        super.copyValues(dst);
1948        if (identifier != null) {
1949          dst.identifier = new ArrayList<Identifier>();
1950          for (Identifier i : identifier)
1951            dst.identifier.add(i.copy());
1952        };
1953        dst.active = active == null ? null : active.copy();
1954        dst.type = type == null ? null : type.copy();
1955        dst.membership = membership == null ? null : membership.copy();
1956        dst.code = code == null ? null : code.copy();
1957        dst.name = name == null ? null : name.copy();
1958        dst.description = description == null ? null : description.copy();
1959        dst.quantity = quantity == null ? null : quantity.copy();
1960        dst.managingEntity = managingEntity == null ? null : managingEntity.copy();
1961        if (characteristic != null) {
1962          dst.characteristic = new ArrayList<GroupCharacteristicComponent>();
1963          for (GroupCharacteristicComponent i : characteristic)
1964            dst.characteristic.add(i.copy());
1965        };
1966        if (member != null) {
1967          dst.member = new ArrayList<GroupMemberComponent>();
1968          for (GroupMemberComponent i : member)
1969            dst.member.add(i.copy());
1970        };
1971      }
1972
1973      protected Group typedCopy() {
1974        return copy();
1975      }
1976
1977      @Override
1978      public boolean equalsDeep(Base other_) {
1979        if (!super.equalsDeep(other_))
1980          return false;
1981        if (!(other_ instanceof Group))
1982          return false;
1983        Group o = (Group) other_;
1984        return compareDeep(identifier, o.identifier, true) && compareDeep(active, o.active, true) && compareDeep(type, o.type, true)
1985           && compareDeep(membership, o.membership, true) && compareDeep(code, o.code, true) && compareDeep(name, o.name, true)
1986           && compareDeep(description, o.description, true) && compareDeep(quantity, o.quantity, true) && compareDeep(managingEntity, o.managingEntity, true)
1987           && compareDeep(characteristic, o.characteristic, true) && compareDeep(member, o.member, true);
1988      }
1989
1990      @Override
1991      public boolean equalsShallow(Base other_) {
1992        if (!super.equalsShallow(other_))
1993          return false;
1994        if (!(other_ instanceof Group))
1995          return false;
1996        Group o = (Group) other_;
1997        return compareValues(active, o.active, true) && compareValues(type, o.type, true) && compareValues(membership, o.membership, true)
1998           && compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(quantity, o.quantity, true)
1999          ;
2000      }
2001
2002      public boolean isEmpty() {
2003        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, active, type
2004          , membership, code, name, description, quantity, managingEntity, characteristic
2005          , member);
2006      }
2007
2008  @Override
2009  public ResourceType getResourceType() {
2010    return ResourceType.Group;
2011   }
2012
2013 /**
2014   * Search parameter: <b>characteristic-reference</b>
2015   * <p>
2016   * Description: <b>An entity referenced in a characteristic</b><br>
2017   * Type: <b>reference</b><br>
2018   * Path: <b>(Group.characteristic.value.ofType(Reference))</b><br>
2019   * </p>
2020   */
2021  @SearchParamDefinition(name="characteristic-reference", path="(Group.characteristic.value.ofType(Reference))", description="An entity referenced in a characteristic", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2022  public static final String SP_CHARACTERISTIC_REFERENCE = "characteristic-reference";
2023 /**
2024   * <b>Fluent Client</b> search parameter constant for <b>characteristic-reference</b>
2025   * <p>
2026   * Description: <b>An entity referenced in a characteristic</b><br>
2027   * Type: <b>reference</b><br>
2028   * Path: <b>(Group.characteristic.value.ofType(Reference))</b><br>
2029   * </p>
2030   */
2031  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CHARACTERISTIC_REFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CHARACTERISTIC_REFERENCE);
2032
2033/**
2034   * Constant for fluent queries to be used to add include statements. Specifies
2035   * the path value of "<b>Group:characteristic-reference</b>".
2036   */
2037  public static final ca.uhn.fhir.model.api.Include INCLUDE_CHARACTERISTIC_REFERENCE = new ca.uhn.fhir.model.api.Include("Group:characteristic-reference").toLocked();
2038
2039 /**
2040   * Search parameter: <b>characteristic-value</b>
2041   * <p>
2042   * Description: <b>A composite of both characteristic and value</b><br>
2043   * Type: <b>composite</b><br>
2044   * Path: <b>Group.characteristic</b><br>
2045   * </p>
2046   */
2047  @SearchParamDefinition(name="characteristic-value", path="Group.characteristic", description="A composite of both characteristic and value", type="composite", compositeOf={"characteristic", "value"} )
2048  public static final String SP_CHARACTERISTIC_VALUE = "characteristic-value";
2049 /**
2050   * <b>Fluent Client</b> search parameter constant for <b>characteristic-value</b>
2051   * <p>
2052   * Description: <b>A composite of both characteristic and value</b><br>
2053   * Type: <b>composite</b><br>
2054   * Path: <b>Group.characteristic</b><br>
2055   * </p>
2056   */
2057  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CHARACTERISTIC_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CHARACTERISTIC_VALUE);
2058
2059 /**
2060   * Search parameter: <b>characteristic</b>
2061   * <p>
2062   * Description: <b>Kind of characteristic</b><br>
2063   * Type: <b>token</b><br>
2064   * Path: <b>Group.characteristic.code</b><br>
2065   * </p>
2066   */
2067  @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="Kind of characteristic", type="token" )
2068  public static final String SP_CHARACTERISTIC = "characteristic";
2069 /**
2070   * <b>Fluent Client</b> search parameter constant for <b>characteristic</b>
2071   * <p>
2072   * Description: <b>Kind of characteristic</b><br>
2073   * Type: <b>token</b><br>
2074   * Path: <b>Group.characteristic.code</b><br>
2075   * </p>
2076   */
2077  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CHARACTERISTIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CHARACTERISTIC);
2078
2079 /**
2080   * Search parameter: <b>code</b>
2081   * <p>
2082   * Description: <b>The kind of resources contained</b><br>
2083   * Type: <b>token</b><br>
2084   * Path: <b>Group.code</b><br>
2085   * </p>
2086   */
2087  @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained", type="token" )
2088  public static final String SP_CODE = "code";
2089 /**
2090   * <b>Fluent Client</b> search parameter constant for <b>code</b>
2091   * <p>
2092   * Description: <b>The kind of resources contained</b><br>
2093   * Type: <b>token</b><br>
2094   * Path: <b>Group.code</b><br>
2095   * </p>
2096   */
2097  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
2098
2099 /**
2100   * Search parameter: <b>exclude</b>
2101   * <p>
2102   * Description: <b>Group includes or excludes</b><br>
2103   * Type: <b>token</b><br>
2104   * Path: <b>Group.characteristic.exclude</b><br>
2105   * </p>
2106   */
2107  @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="Group includes or excludes", type="token" )
2108  public static final String SP_EXCLUDE = "exclude";
2109 /**
2110   * <b>Fluent Client</b> search parameter constant for <b>exclude</b>
2111   * <p>
2112   * Description: <b>Group includes or excludes</b><br>
2113   * Type: <b>token</b><br>
2114   * Path: <b>Group.characteristic.exclude</b><br>
2115   * </p>
2116   */
2117  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXCLUDE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXCLUDE);
2118
2119 /**
2120   * Search parameter: <b>identifier</b>
2121   * <p>
2122   * Description: <b>Unique id</b><br>
2123   * Type: <b>token</b><br>
2124   * Path: <b>Group.identifier</b><br>
2125   * </p>
2126   */
2127  @SearchParamDefinition(name="identifier", path="Group.identifier", description="Unique id", type="token" )
2128  public static final String SP_IDENTIFIER = "identifier";
2129 /**
2130   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2131   * <p>
2132   * Description: <b>Unique id</b><br>
2133   * Type: <b>token</b><br>
2134   * Path: <b>Group.identifier</b><br>
2135   * </p>
2136   */
2137  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2138
2139 /**
2140   * Search parameter: <b>managing-entity</b>
2141   * <p>
2142   * Description: <b>Entity that is the custodian of the Group's definition</b><br>
2143   * Type: <b>reference</b><br>
2144   * Path: <b>Group.managingEntity</b><br>
2145   * </p>
2146   */
2147  @SearchParamDefinition(name="managing-entity", path="Group.managingEntity", description="Entity that is the custodian of the Group's definition", type="reference", target={Organization.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2148  public static final String SP_MANAGING_ENTITY = "managing-entity";
2149 /**
2150   * <b>Fluent Client</b> search parameter constant for <b>managing-entity</b>
2151   * <p>
2152   * Description: <b>Entity that is the custodian of the Group's definition</b><br>
2153   * Type: <b>reference</b><br>
2154   * Path: <b>Group.managingEntity</b><br>
2155   * </p>
2156   */
2157  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MANAGING_ENTITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MANAGING_ENTITY);
2158
2159/**
2160   * Constant for fluent queries to be used to add include statements. Specifies
2161   * the path value of "<b>Group:managing-entity</b>".
2162   */
2163  public static final ca.uhn.fhir.model.api.Include INCLUDE_MANAGING_ENTITY = new ca.uhn.fhir.model.api.Include("Group:managing-entity").toLocked();
2164
2165 /**
2166   * Search parameter: <b>member</b>
2167   * <p>
2168   * Description: <b>Reference to the group member</b><br>
2169   * Type: <b>reference</b><br>
2170   * Path: <b>Group.member.entity</b><br>
2171   * </p>
2172   */
2173  @SearchParamDefinition(name="member", path="Group.member.entity", description="Reference to the group member", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={CareTeam.class, Device.class, Group.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class, Specimen.class } )
2174  public static final String SP_MEMBER = "member";
2175 /**
2176   * <b>Fluent Client</b> search parameter constant for <b>member</b>
2177   * <p>
2178   * Description: <b>Reference to the group member</b><br>
2179   * Type: <b>reference</b><br>
2180   * Path: <b>Group.member.entity</b><br>
2181   * </p>
2182   */
2183  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MEMBER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MEMBER);
2184
2185/**
2186   * Constant for fluent queries to be used to add include statements. Specifies
2187   * the path value of "<b>Group:member</b>".
2188   */
2189  public static final ca.uhn.fhir.model.api.Include INCLUDE_MEMBER = new ca.uhn.fhir.model.api.Include("Group:member").toLocked();
2190
2191 /**
2192   * Search parameter: <b>membership</b>
2193   * <p>
2194   * Description: <b>Definitional or enumerated group</b><br>
2195   * Type: <b>token</b><br>
2196   * Path: <b>Group.membership</b><br>
2197   * </p>
2198   */
2199  @SearchParamDefinition(name="membership", path="Group.membership", description="Definitional or enumerated group", type="token" )
2200  public static final String SP_MEMBERSHIP = "membership";
2201 /**
2202   * <b>Fluent Client</b> search parameter constant for <b>membership</b>
2203   * <p>
2204   * Description: <b>Definitional or enumerated group</b><br>
2205   * Type: <b>token</b><br>
2206   * Path: <b>Group.membership</b><br>
2207   * </p>
2208   */
2209  public static final ca.uhn.fhir.rest.gclient.TokenClientParam MEMBERSHIP = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MEMBERSHIP);
2210
2211 /**
2212   * Search parameter: <b>name</b>
2213   * <p>
2214   * Description: <b>A portion of the Group's name</b><br>
2215   * Type: <b>string</b><br>
2216   * Path: <b>Group.name</b><br>
2217   * </p>
2218   */
2219  @SearchParamDefinition(name="name", path="Group.name", description="A portion of the Group's name", type="string" )
2220  public static final String SP_NAME = "name";
2221 /**
2222   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2223   * <p>
2224   * Description: <b>A portion of the Group's name</b><br>
2225   * Type: <b>string</b><br>
2226   * Path: <b>Group.name</b><br>
2227   * </p>
2228   */
2229  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2230
2231 /**
2232   * Search parameter: <b>type</b>
2233   * <p>
2234   * Description: <b>The type of resources the group contains</b><br>
2235   * Type: <b>token</b><br>
2236   * Path: <b>Group.type</b><br>
2237   * </p>
2238   */
2239  @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains", type="token" )
2240  public static final String SP_TYPE = "type";
2241 /**
2242   * <b>Fluent Client</b> search parameter constant for <b>type</b>
2243   * <p>
2244   * Description: <b>The type of resources the group contains</b><br>
2245   * Type: <b>token</b><br>
2246   * Path: <b>Group.type</b><br>
2247   * </p>
2248   */
2249  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
2250
2251 /**
2252   * Search parameter: <b>value</b>
2253   * <p>
2254   * Description: <b>Value held by characteristic</b><br>
2255   * Type: <b>token</b><br>
2256   * Path: <b>(Group.characteristic.value.ofType(CodeableConcept)) | (Group.characteristic.value.ofType(boolean))</b><br>
2257   * </p>
2258   */
2259  @SearchParamDefinition(name="value", path="(Group.characteristic.value.ofType(CodeableConcept)) | (Group.characteristic.value.ofType(boolean))", description="Value held by characteristic", type="token" )
2260  public static final String SP_VALUE = "value";
2261 /**
2262   * <b>Fluent Client</b> search parameter constant for <b>value</b>
2263   * <p>
2264   * Description: <b>Value held by characteristic</b><br>
2265   * Type: <b>token</b><br>
2266   * Path: <b>(Group.characteristic.value.ofType(CodeableConcept)) | (Group.characteristic.value.ofType(boolean))</b><br>
2267   * </p>
2268   */
2269  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VALUE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VALUE);
2270
2271
2272}
2273