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