001package org.hl7.fhir.r4.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
035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
036
037import java.util.*;
038
039import org.hl7.fhir.utilities.Utilities;
040import org.hl7.fhir.r4.model.Enumerations.*;
041import ca.uhn.fhir.model.api.annotation.ResourceDef;
042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
043import ca.uhn.fhir.model.api.annotation.Child;
044import ca.uhn.fhir.model.api.annotation.ChildOrder;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047import org.hl7.fhir.instance.model.api.*;
048import org.hl7.fhir.exceptions.FHIRException;
049/**
050 * A compartment definition that defines how resources are accessed on a server.
051 */
052@ResourceDef(name="CompartmentDefinition", profile="http://hl7.org/fhir/StructureDefinition/CompartmentDefinition")
053@ChildOrder(names={"url", "version", "name", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "purpose", "code", "search", "resource"})
054public class CompartmentDefinition extends MetadataResource {
055
056    public enum CompartmentType {
057        /**
058         * The compartment definition is for the patient compartment.
059         */
060        PATIENT, 
061        /**
062         * The compartment definition is for the encounter compartment.
063         */
064        ENCOUNTER, 
065        /**
066         * The compartment definition is for the related-person compartment.
067         */
068        RELATEDPERSON, 
069        /**
070         * The compartment definition is for the practitioner compartment.
071         */
072        PRACTITIONER, 
073        /**
074         * The compartment definition is for the device compartment.
075         */
076        DEVICE, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static CompartmentType fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("Patient".equals(codeString))
085          return PATIENT;
086        if ("Encounter".equals(codeString))
087          return ENCOUNTER;
088        if ("RelatedPerson".equals(codeString))
089          return RELATEDPERSON;
090        if ("Practitioner".equals(codeString))
091          return PRACTITIONER;
092        if ("Device".equals(codeString))
093          return DEVICE;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case PATIENT: return "Patient";
102            case ENCOUNTER: return "Encounter";
103            case RELATEDPERSON: return "RelatedPerson";
104            case PRACTITIONER: return "Practitioner";
105            case DEVICE: return "Device";
106            default: return "?";
107          }
108        }
109        public String getSystem() {
110          switch (this) {
111            case PATIENT: return "http://hl7.org/fhir/compartment-type";
112            case ENCOUNTER: return "http://hl7.org/fhir/compartment-type";
113            case RELATEDPERSON: return "http://hl7.org/fhir/compartment-type";
114            case PRACTITIONER: return "http://hl7.org/fhir/compartment-type";
115            case DEVICE: return "http://hl7.org/fhir/compartment-type";
116            default: return "?";
117          }
118        }
119        public String getDefinition() {
120          switch (this) {
121            case PATIENT: return "The compartment definition is for the patient compartment.";
122            case ENCOUNTER: return "The compartment definition is for the encounter compartment.";
123            case RELATEDPERSON: return "The compartment definition is for the related-person compartment.";
124            case PRACTITIONER: return "The compartment definition is for the practitioner compartment.";
125            case DEVICE: return "The compartment definition is for the device compartment.";
126            default: return "?";
127          }
128        }
129        public String getDisplay() {
130          switch (this) {
131            case PATIENT: return "Patient";
132            case ENCOUNTER: return "Encounter";
133            case RELATEDPERSON: return "RelatedPerson";
134            case PRACTITIONER: return "Practitioner";
135            case DEVICE: return "Device";
136            default: return "?";
137          }
138        }
139    }
140
141  public static class CompartmentTypeEnumFactory implements EnumFactory<CompartmentType> {
142    public CompartmentType fromCode(String codeString) throws IllegalArgumentException {
143      if (codeString == null || "".equals(codeString))
144            if (codeString == null || "".equals(codeString))
145                return null;
146        if ("Patient".equals(codeString))
147          return CompartmentType.PATIENT;
148        if ("Encounter".equals(codeString))
149          return CompartmentType.ENCOUNTER;
150        if ("RelatedPerson".equals(codeString))
151          return CompartmentType.RELATEDPERSON;
152        if ("Practitioner".equals(codeString))
153          return CompartmentType.PRACTITIONER;
154        if ("Device".equals(codeString))
155          return CompartmentType.DEVICE;
156        throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'");
157        }
158        public Enumeration<CompartmentType> fromType(Base code) throws FHIRException {
159          if (code == null)
160            return null;
161          if (code.isEmpty())
162            return new Enumeration<CompartmentType>(this);
163          String codeString = ((PrimitiveType) code).asStringValue();
164          if (codeString == null || "".equals(codeString))
165            return null;
166        if ("Patient".equals(codeString))
167          return new Enumeration<CompartmentType>(this, CompartmentType.PATIENT);
168        if ("Encounter".equals(codeString))
169          return new Enumeration<CompartmentType>(this, CompartmentType.ENCOUNTER);
170        if ("RelatedPerson".equals(codeString))
171          return new Enumeration<CompartmentType>(this, CompartmentType.RELATEDPERSON);
172        if ("Practitioner".equals(codeString))
173          return new Enumeration<CompartmentType>(this, CompartmentType.PRACTITIONER);
174        if ("Device".equals(codeString))
175          return new Enumeration<CompartmentType>(this, CompartmentType.DEVICE);
176        throw new FHIRException("Unknown CompartmentType code '"+codeString+"'");
177        }
178    public String toCode(CompartmentType code) {
179      if (code == CompartmentType.PATIENT)
180        return "Patient";
181      if (code == CompartmentType.ENCOUNTER)
182        return "Encounter";
183      if (code == CompartmentType.RELATEDPERSON)
184        return "RelatedPerson";
185      if (code == CompartmentType.PRACTITIONER)
186        return "Practitioner";
187      if (code == CompartmentType.DEVICE)
188        return "Device";
189      return "?";
190      }
191    public String toSystem(CompartmentType code) {
192      return code.getSystem();
193      }
194    }
195
196    @Block()
197    public static class CompartmentDefinitionResourceComponent extends BackboneElement implements IBaseBackboneElement {
198        /**
199         * The name of a resource supported by the server.
200         */
201        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
202        @Description(shortDefinition="Name of resource type", formalDefinition="The name of a resource supported by the server." )
203        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
204        protected CodeType code;
205
206        /**
207         * The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.
208         */
209        @Child(name = "param", type = {StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
210        @Description(shortDefinition="Search Parameter Name, or chained parameters", formalDefinition="The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,." )
211        protected List<StringType> param;
212
213        /**
214         * Additional documentation about the resource and compartment.
215         */
216        @Child(name = "documentation", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
217        @Description(shortDefinition="Additional documentation about the resource and compartment", formalDefinition="Additional documentation about the resource and compartment." )
218        protected StringType documentation;
219
220        private static final long serialVersionUID = 988080897L;
221
222    /**
223     * Constructor
224     */
225      public CompartmentDefinitionResourceComponent() {
226        super();
227      }
228
229    /**
230     * Constructor
231     */
232      public CompartmentDefinitionResourceComponent(CodeType code) {
233        super();
234        this.code = code;
235      }
236
237        /**
238         * @return {@link #code} (The name of a resource supported by the server.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
239         */
240        public CodeType getCodeElement() { 
241          if (this.code == null)
242            if (Configuration.errorOnAutoCreate())
243              throw new Error("Attempt to auto-create CompartmentDefinitionResourceComponent.code");
244            else if (Configuration.doAutoCreate())
245              this.code = new CodeType(); // bb
246          return this.code;
247        }
248
249        public boolean hasCodeElement() { 
250          return this.code != null && !this.code.isEmpty();
251        }
252
253        public boolean hasCode() { 
254          return this.code != null && !this.code.isEmpty();
255        }
256
257        /**
258         * @param value {@link #code} (The name of a resource supported by the server.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
259         */
260        public CompartmentDefinitionResourceComponent setCodeElement(CodeType value) { 
261          this.code = value;
262          return this;
263        }
264
265        /**
266         * @return The name of a resource supported by the server.
267         */
268        public String getCode() { 
269          return this.code == null ? null : this.code.getValue();
270        }
271
272        /**
273         * @param value The name of a resource supported by the server.
274         */
275        public CompartmentDefinitionResourceComponent setCode(String value) { 
276            if (this.code == null)
277              this.code = new CodeType();
278            this.code.setValue(value);
279          return this;
280        }
281
282        /**
283         * @return {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.)
284         */
285        public List<StringType> getParam() { 
286          if (this.param == null)
287            this.param = new ArrayList<StringType>();
288          return this.param;
289        }
290
291        /**
292         * @return Returns a reference to <code>this</code> for easy method chaining
293         */
294        public CompartmentDefinitionResourceComponent setParam(List<StringType> theParam) { 
295          this.param = theParam;
296          return this;
297        }
298
299        public boolean hasParam() { 
300          if (this.param == null)
301            return false;
302          for (StringType item : this.param)
303            if (!item.isEmpty())
304              return true;
305          return false;
306        }
307
308        /**
309         * @return {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.)
310         */
311        public StringType addParamElement() {//2 
312          StringType t = new StringType();
313          if (this.param == null)
314            this.param = new ArrayList<StringType>();
315          this.param.add(t);
316          return t;
317        }
318
319        /**
320         * @param value {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.)
321         */
322        public CompartmentDefinitionResourceComponent addParam(String value) { //1
323          StringType t = new StringType();
324          t.setValue(value);
325          if (this.param == null)
326            this.param = new ArrayList<StringType>();
327          this.param.add(t);
328          return this;
329        }
330
331        /**
332         * @param value {@link #param} (The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.)
333         */
334        public boolean hasParam(String value) { 
335          if (this.param == null)
336            return false;
337          for (StringType v : this.param)
338            if (v.getValue().equals(value)) // string
339              return true;
340          return false;
341        }
342
343        /**
344         * @return {@link #documentation} (Additional documentation about the resource and compartment.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
345         */
346        public StringType getDocumentationElement() { 
347          if (this.documentation == null)
348            if (Configuration.errorOnAutoCreate())
349              throw new Error("Attempt to auto-create CompartmentDefinitionResourceComponent.documentation");
350            else if (Configuration.doAutoCreate())
351              this.documentation = new StringType(); // bb
352          return this.documentation;
353        }
354
355        public boolean hasDocumentationElement() { 
356          return this.documentation != null && !this.documentation.isEmpty();
357        }
358
359        public boolean hasDocumentation() { 
360          return this.documentation != null && !this.documentation.isEmpty();
361        }
362
363        /**
364         * @param value {@link #documentation} (Additional documentation about the resource and compartment.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
365         */
366        public CompartmentDefinitionResourceComponent setDocumentationElement(StringType value) { 
367          this.documentation = value;
368          return this;
369        }
370
371        /**
372         * @return Additional documentation about the resource and compartment.
373         */
374        public String getDocumentation() { 
375          return this.documentation == null ? null : this.documentation.getValue();
376        }
377
378        /**
379         * @param value Additional documentation about the resource and compartment.
380         */
381        public CompartmentDefinitionResourceComponent setDocumentation(String value) { 
382          if (Utilities.noString(value))
383            this.documentation = null;
384          else {
385            if (this.documentation == null)
386              this.documentation = new StringType();
387            this.documentation.setValue(value);
388          }
389          return this;
390        }
391
392        protected void listChildren(List<Property> children) {
393          super.listChildren(children);
394          children.add(new Property("code", "code", "The name of a resource supported by the server.", 0, 1, code));
395          children.add(new Property("param", "string", "The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.", 0, java.lang.Integer.MAX_VALUE, param));
396          children.add(new Property("documentation", "string", "Additional documentation about the resource and compartment.", 0, 1, documentation));
397        }
398
399        @Override
400        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
401          switch (_hash) {
402          case 3059181: /*code*/  return new Property("code", "code", "The name of a resource supported by the server.", 0, 1, code);
403          case 106436749: /*param*/  return new Property("param", "string", "The name of a search parameter that represents the link to the compartment. More than one may be listed because a resource may be linked to a compartment in more than one way,.", 0, java.lang.Integer.MAX_VALUE, param);
404          case 1587405498: /*documentation*/  return new Property("documentation", "string", "Additional documentation about the resource and compartment.", 0, 1, documentation);
405          default: return super.getNamedProperty(_hash, _name, _checkValid);
406          }
407
408        }
409
410      @Override
411      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
412        switch (hash) {
413        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
414        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // StringType
415        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
416        default: return super.getProperty(hash, name, checkValid);
417        }
418
419      }
420
421      @Override
422      public Base setProperty(int hash, String name, Base value) throws FHIRException {
423        switch (hash) {
424        case 3059181: // code
425          this.code = castToCode(value); // CodeType
426          return value;
427        case 106436749: // param
428          this.getParam().add(castToString(value)); // StringType
429          return value;
430        case 1587405498: // documentation
431          this.documentation = castToString(value); // StringType
432          return value;
433        default: return super.setProperty(hash, name, value);
434        }
435
436      }
437
438      @Override
439      public Base setProperty(String name, Base value) throws FHIRException {
440        if (name.equals("code")) {
441          this.code = castToCode(value); // CodeType
442        } else if (name.equals("param")) {
443          this.getParam().add(castToString(value));
444        } else if (name.equals("documentation")) {
445          this.documentation = castToString(value); // StringType
446        } else
447          return super.setProperty(name, value);
448        return value;
449      }
450
451      @Override
452      public Base makeProperty(int hash, String name) throws FHIRException {
453        switch (hash) {
454        case 3059181:  return getCodeElement();
455        case 106436749:  return addParamElement();
456        case 1587405498:  return getDocumentationElement();
457        default: return super.makeProperty(hash, name);
458        }
459
460      }
461
462      @Override
463      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
464        switch (hash) {
465        case 3059181: /*code*/ return new String[] {"code"};
466        case 106436749: /*param*/ return new String[] {"string"};
467        case 1587405498: /*documentation*/ return new String[] {"string"};
468        default: return super.getTypesForProperty(hash, name);
469        }
470
471      }
472
473      @Override
474      public Base addChild(String name) throws FHIRException {
475        if (name.equals("code")) {
476          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.code");
477        }
478        else if (name.equals("param")) {
479          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.param");
480        }
481        else if (name.equals("documentation")) {
482          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.documentation");
483        }
484        else
485          return super.addChild(name);
486      }
487
488      public CompartmentDefinitionResourceComponent copy() {
489        CompartmentDefinitionResourceComponent dst = new CompartmentDefinitionResourceComponent();
490        copyValues(dst);
491        return dst;
492      }
493
494      public void copyValues(CompartmentDefinitionResourceComponent dst) {
495        super.copyValues(dst);
496        dst.code = code == null ? null : code.copy();
497        if (param != null) {
498          dst.param = new ArrayList<StringType>();
499          for (StringType i : param)
500            dst.param.add(i.copy());
501        };
502        dst.documentation = documentation == null ? null : documentation.copy();
503      }
504
505      @Override
506      public boolean equalsDeep(Base other_) {
507        if (!super.equalsDeep(other_))
508          return false;
509        if (!(other_ instanceof CompartmentDefinitionResourceComponent))
510          return false;
511        CompartmentDefinitionResourceComponent o = (CompartmentDefinitionResourceComponent) other_;
512        return compareDeep(code, o.code, true) && compareDeep(param, o.param, true) && compareDeep(documentation, o.documentation, true)
513          ;
514      }
515
516      @Override
517      public boolean equalsShallow(Base other_) {
518        if (!super.equalsShallow(other_))
519          return false;
520        if (!(other_ instanceof CompartmentDefinitionResourceComponent))
521          return false;
522        CompartmentDefinitionResourceComponent o = (CompartmentDefinitionResourceComponent) other_;
523        return compareValues(code, o.code, true) && compareValues(param, o.param, true) && compareValues(documentation, o.documentation, true)
524          ;
525      }
526
527      public boolean isEmpty() {
528        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, param, documentation
529          );
530      }
531
532  public String fhirType() {
533    return "CompartmentDefinition.resource";
534
535  }
536
537  }
538
539    /**
540     * Explanation of why this compartment definition is needed and why it has been designed as it has.
541     */
542    @Child(name = "purpose", type = {MarkdownType.class}, order=0, min=0, max=1, modifier=false, summary=false)
543    @Description(shortDefinition="Why this compartment definition is defined", formalDefinition="Explanation of why this compartment definition is needed and why it has been designed as it has." )
544    protected MarkdownType purpose;
545
546    /**
547     * Which compartment this definition describes.
548     */
549    @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
550    @Description(shortDefinition="Patient | Encounter | RelatedPerson | Practitioner | Device", formalDefinition="Which compartment this definition describes." )
551    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/compartment-type")
552    protected Enumeration<CompartmentType> code;
553
554    /**
555     * Whether the search syntax is supported,.
556     */
557    @Child(name = "search", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=true)
558    @Description(shortDefinition="Whether the search syntax is supported", formalDefinition="Whether the search syntax is supported,." )
559    protected BooleanType search;
560
561    /**
562     * Information about how a resource is related to the compartment.
563     */
564    @Child(name = "resource", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
565    @Description(shortDefinition="How a resource is related to the compartment", formalDefinition="Information about how a resource is related to the compartment." )
566    protected List<CompartmentDefinitionResourceComponent> resource;
567
568    private static final long serialVersionUID = -1159172945L;
569
570  /**
571   * Constructor
572   */
573    public CompartmentDefinition() {
574      super();
575    }
576
577  /**
578   * Constructor
579   */
580    public CompartmentDefinition(UriType url, StringType name, Enumeration<PublicationStatus> status, Enumeration<CompartmentType> code, BooleanType search) {
581      super();
582      this.url = url;
583      this.name = name;
584      this.status = status;
585      this.code = code;
586      this.search = search;
587    }
588
589    /**
590     * @return {@link #url} (An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
591     */
592    public UriType getUrlElement() { 
593      if (this.url == null)
594        if (Configuration.errorOnAutoCreate())
595          throw new Error("Attempt to auto-create CompartmentDefinition.url");
596        else if (Configuration.doAutoCreate())
597          this.url = new UriType(); // bb
598      return this.url;
599    }
600
601    public boolean hasUrlElement() { 
602      return this.url != null && !this.url.isEmpty();
603    }
604
605    public boolean hasUrl() { 
606      return this.url != null && !this.url.isEmpty();
607    }
608
609    /**
610     * @param value {@link #url} (An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
611     */
612    public CompartmentDefinition setUrlElement(UriType value) { 
613      this.url = value;
614      return this;
615    }
616
617    /**
618     * @return An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.
619     */
620    public String getUrl() { 
621      return this.url == null ? null : this.url.getValue();
622    }
623
624    /**
625     * @param value An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.
626     */
627    public CompartmentDefinition setUrl(String value) { 
628        if (this.url == null)
629          this.url = new UriType();
630        this.url.setValue(value);
631      return this;
632    }
633
634    /**
635     * @return {@link #version} (The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
636     */
637    public StringType getVersionElement() { 
638      if (this.version == null)
639        if (Configuration.errorOnAutoCreate())
640          throw new Error("Attempt to auto-create CompartmentDefinition.version");
641        else if (Configuration.doAutoCreate())
642          this.version = new StringType(); // bb
643      return this.version;
644    }
645
646    public boolean hasVersionElement() { 
647      return this.version != null && !this.version.isEmpty();
648    }
649
650    public boolean hasVersion() { 
651      return this.version != null && !this.version.isEmpty();
652    }
653
654    /**
655     * @param value {@link #version} (The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
656     */
657    public CompartmentDefinition setVersionElement(StringType value) { 
658      this.version = value;
659      return this;
660    }
661
662    /**
663     * @return The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
664     */
665    public String getVersion() { 
666      return this.version == null ? null : this.version.getValue();
667    }
668
669    /**
670     * @param value The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
671     */
672    public CompartmentDefinition setVersion(String value) { 
673      if (Utilities.noString(value))
674        this.version = null;
675      else {
676        if (this.version == null)
677          this.version = new StringType();
678        this.version.setValue(value);
679      }
680      return this;
681    }
682
683    /**
684     * @return {@link #name} (A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
685     */
686    public StringType getNameElement() { 
687      if (this.name == null)
688        if (Configuration.errorOnAutoCreate())
689          throw new Error("Attempt to auto-create CompartmentDefinition.name");
690        else if (Configuration.doAutoCreate())
691          this.name = new StringType(); // bb
692      return this.name;
693    }
694
695    public boolean hasNameElement() { 
696      return this.name != null && !this.name.isEmpty();
697    }
698
699    public boolean hasName() { 
700      return this.name != null && !this.name.isEmpty();
701    }
702
703    /**
704     * @param value {@link #name} (A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
705     */
706    public CompartmentDefinition setNameElement(StringType value) { 
707      this.name = value;
708      return this;
709    }
710
711    /**
712     * @return A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
713     */
714    public String getName() { 
715      return this.name == null ? null : this.name.getValue();
716    }
717
718    /**
719     * @param value A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
720     */
721    public CompartmentDefinition setName(String value) { 
722        if (this.name == null)
723          this.name = new StringType();
724        this.name.setValue(value);
725      return this;
726    }
727
728    /**
729     * @return {@link #status} (The status of this compartment definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
730     */
731    public Enumeration<PublicationStatus> getStatusElement() { 
732      if (this.status == null)
733        if (Configuration.errorOnAutoCreate())
734          throw new Error("Attempt to auto-create CompartmentDefinition.status");
735        else if (Configuration.doAutoCreate())
736          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
737      return this.status;
738    }
739
740    public boolean hasStatusElement() { 
741      return this.status != null && !this.status.isEmpty();
742    }
743
744    public boolean hasStatus() { 
745      return this.status != null && !this.status.isEmpty();
746    }
747
748    /**
749     * @param value {@link #status} (The status of this compartment definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
750     */
751    public CompartmentDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
752      this.status = value;
753      return this;
754    }
755
756    /**
757     * @return The status of this compartment definition. Enables tracking the life-cycle of the content.
758     */
759    public PublicationStatus getStatus() { 
760      return this.status == null ? null : this.status.getValue();
761    }
762
763    /**
764     * @param value The status of this compartment definition. Enables tracking the life-cycle of the content.
765     */
766    public CompartmentDefinition setStatus(PublicationStatus value) { 
767        if (this.status == null)
768          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
769        this.status.setValue(value);
770      return this;
771    }
772
773    /**
774     * @return {@link #experimental} (A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
775     */
776    public BooleanType getExperimentalElement() { 
777      if (this.experimental == null)
778        if (Configuration.errorOnAutoCreate())
779          throw new Error("Attempt to auto-create CompartmentDefinition.experimental");
780        else if (Configuration.doAutoCreate())
781          this.experimental = new BooleanType(); // bb
782      return this.experimental;
783    }
784
785    public boolean hasExperimentalElement() { 
786      return this.experimental != null && !this.experimental.isEmpty();
787    }
788
789    public boolean hasExperimental() { 
790      return this.experimental != null && !this.experimental.isEmpty();
791    }
792
793    /**
794     * @param value {@link #experimental} (A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
795     */
796    public CompartmentDefinition setExperimentalElement(BooleanType value) { 
797      this.experimental = value;
798      return this;
799    }
800
801    /**
802     * @return A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
803     */
804    public boolean getExperimental() { 
805      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
806    }
807
808    /**
809     * @param value A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
810     */
811    public CompartmentDefinition setExperimental(boolean value) { 
812        if (this.experimental == null)
813          this.experimental = new BooleanType();
814        this.experimental.setValue(value);
815      return this;
816    }
817
818    /**
819     * @return {@link #date} (The date  (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
820     */
821    public DateTimeType getDateElement() { 
822      if (this.date == null)
823        if (Configuration.errorOnAutoCreate())
824          throw new Error("Attempt to auto-create CompartmentDefinition.date");
825        else if (Configuration.doAutoCreate())
826          this.date = new DateTimeType(); // bb
827      return this.date;
828    }
829
830    public boolean hasDateElement() { 
831      return this.date != null && !this.date.isEmpty();
832    }
833
834    public boolean hasDate() { 
835      return this.date != null && !this.date.isEmpty();
836    }
837
838    /**
839     * @param value {@link #date} (The date  (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
840     */
841    public CompartmentDefinition setDateElement(DateTimeType value) { 
842      this.date = value;
843      return this;
844    }
845
846    /**
847     * @return The date  (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.
848     */
849    public Date getDate() { 
850      return this.date == null ? null : this.date.getValue();
851    }
852
853    /**
854     * @param value The date  (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.
855     */
856    public CompartmentDefinition setDate(Date value) { 
857      if (value == null)
858        this.date = null;
859      else {
860        if (this.date == null)
861          this.date = new DateTimeType();
862        this.date.setValue(value);
863      }
864      return this;
865    }
866
867    /**
868     * @return {@link #publisher} (The name of the organization or individual that published the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
869     */
870    public StringType getPublisherElement() { 
871      if (this.publisher == null)
872        if (Configuration.errorOnAutoCreate())
873          throw new Error("Attempt to auto-create CompartmentDefinition.publisher");
874        else if (Configuration.doAutoCreate())
875          this.publisher = new StringType(); // bb
876      return this.publisher;
877    }
878
879    public boolean hasPublisherElement() { 
880      return this.publisher != null && !this.publisher.isEmpty();
881    }
882
883    public boolean hasPublisher() { 
884      return this.publisher != null && !this.publisher.isEmpty();
885    }
886
887    /**
888     * @param value {@link #publisher} (The name of the organization or individual that published the compartment definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
889     */
890    public CompartmentDefinition setPublisherElement(StringType value) { 
891      this.publisher = value;
892      return this;
893    }
894
895    /**
896     * @return The name of the organization or individual that published the compartment definition.
897     */
898    public String getPublisher() { 
899      return this.publisher == null ? null : this.publisher.getValue();
900    }
901
902    /**
903     * @param value The name of the organization or individual that published the compartment definition.
904     */
905    public CompartmentDefinition setPublisher(String value) { 
906      if (Utilities.noString(value))
907        this.publisher = null;
908      else {
909        if (this.publisher == null)
910          this.publisher = new StringType();
911        this.publisher.setValue(value);
912      }
913      return this;
914    }
915
916    /**
917     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
918     */
919    public List<ContactDetail> getContact() { 
920      if (this.contact == null)
921        this.contact = new ArrayList<ContactDetail>();
922      return this.contact;
923    }
924
925    /**
926     * @return Returns a reference to <code>this</code> for easy method chaining
927     */
928    public CompartmentDefinition setContact(List<ContactDetail> theContact) { 
929      this.contact = theContact;
930      return this;
931    }
932
933    public boolean hasContact() { 
934      if (this.contact == null)
935        return false;
936      for (ContactDetail item : this.contact)
937        if (!item.isEmpty())
938          return true;
939      return false;
940    }
941
942    public ContactDetail addContact() { //3
943      ContactDetail t = new ContactDetail();
944      if (this.contact == null)
945        this.contact = new ArrayList<ContactDetail>();
946      this.contact.add(t);
947      return t;
948    }
949
950    public CompartmentDefinition addContact(ContactDetail t) { //3
951      if (t == null)
952        return this;
953      if (this.contact == null)
954        this.contact = new ArrayList<ContactDetail>();
955      this.contact.add(t);
956      return this;
957    }
958
959    /**
960     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
961     */
962    public ContactDetail getContactFirstRep() { 
963      if (getContact().isEmpty()) {
964        addContact();
965      }
966      return getContact().get(0);
967    }
968
969    /**
970     * @return {@link #description} (A free text natural language description of the compartment definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
971     */
972    public MarkdownType getDescriptionElement() { 
973      if (this.description == null)
974        if (Configuration.errorOnAutoCreate())
975          throw new Error("Attempt to auto-create CompartmentDefinition.description");
976        else if (Configuration.doAutoCreate())
977          this.description = new MarkdownType(); // bb
978      return this.description;
979    }
980
981    public boolean hasDescriptionElement() { 
982      return this.description != null && !this.description.isEmpty();
983    }
984
985    public boolean hasDescription() { 
986      return this.description != null && !this.description.isEmpty();
987    }
988
989    /**
990     * @param value {@link #description} (A free text natural language description of the compartment definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
991     */
992    public CompartmentDefinition setDescriptionElement(MarkdownType value) { 
993      this.description = value;
994      return this;
995    }
996
997    /**
998     * @return A free text natural language description of the compartment definition from a consumer's perspective.
999     */
1000    public String getDescription() { 
1001      return this.description == null ? null : this.description.getValue();
1002    }
1003
1004    /**
1005     * @param value A free text natural language description of the compartment definition from a consumer's perspective.
1006     */
1007    public CompartmentDefinition setDescription(String value) { 
1008      if (value == null)
1009        this.description = null;
1010      else {
1011        if (this.description == null)
1012          this.description = new MarkdownType();
1013        this.description.setValue(value);
1014      }
1015      return this;
1016    }
1017
1018    /**
1019     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.)
1020     */
1021    public List<UsageContext> getUseContext() { 
1022      if (this.useContext == null)
1023        this.useContext = new ArrayList<UsageContext>();
1024      return this.useContext;
1025    }
1026
1027    /**
1028     * @return Returns a reference to <code>this</code> for easy method chaining
1029     */
1030    public CompartmentDefinition setUseContext(List<UsageContext> theUseContext) { 
1031      this.useContext = theUseContext;
1032      return this;
1033    }
1034
1035    public boolean hasUseContext() { 
1036      if (this.useContext == null)
1037        return false;
1038      for (UsageContext item : this.useContext)
1039        if (!item.isEmpty())
1040          return true;
1041      return false;
1042    }
1043
1044    public UsageContext addUseContext() { //3
1045      UsageContext t = new UsageContext();
1046      if (this.useContext == null)
1047        this.useContext = new ArrayList<UsageContext>();
1048      this.useContext.add(t);
1049      return t;
1050    }
1051
1052    public CompartmentDefinition addUseContext(UsageContext t) { //3
1053      if (t == null)
1054        return this;
1055      if (this.useContext == null)
1056        this.useContext = new ArrayList<UsageContext>();
1057      this.useContext.add(t);
1058      return this;
1059    }
1060
1061    /**
1062     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
1063     */
1064    public UsageContext getUseContextFirstRep() { 
1065      if (getUseContext().isEmpty()) {
1066        addUseContext();
1067      }
1068      return getUseContext().get(0);
1069    }
1070
1071    /**
1072     * @return {@link #purpose} (Explanation of why this compartment definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
1073     */
1074    public MarkdownType getPurposeElement() { 
1075      if (this.purpose == null)
1076        if (Configuration.errorOnAutoCreate())
1077          throw new Error("Attempt to auto-create CompartmentDefinition.purpose");
1078        else if (Configuration.doAutoCreate())
1079          this.purpose = new MarkdownType(); // bb
1080      return this.purpose;
1081    }
1082
1083    public boolean hasPurposeElement() { 
1084      return this.purpose != null && !this.purpose.isEmpty();
1085    }
1086
1087    public boolean hasPurpose() { 
1088      return this.purpose != null && !this.purpose.isEmpty();
1089    }
1090
1091    /**
1092     * @param value {@link #purpose} (Explanation of why this compartment definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
1093     */
1094    public CompartmentDefinition setPurposeElement(MarkdownType value) { 
1095      this.purpose = value;
1096      return this;
1097    }
1098
1099    /**
1100     * @return Explanation of why this compartment definition is needed and why it has been designed as it has.
1101     */
1102    public String getPurpose() { 
1103      return this.purpose == null ? null : this.purpose.getValue();
1104    }
1105
1106    /**
1107     * @param value Explanation of why this compartment definition is needed and why it has been designed as it has.
1108     */
1109    public CompartmentDefinition setPurpose(String value) { 
1110      if (value == null)
1111        this.purpose = null;
1112      else {
1113        if (this.purpose == null)
1114          this.purpose = new MarkdownType();
1115        this.purpose.setValue(value);
1116      }
1117      return this;
1118    }
1119
1120    /**
1121     * @return {@link #code} (Which compartment this definition describes.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1122     */
1123    public Enumeration<CompartmentType> getCodeElement() { 
1124      if (this.code == null)
1125        if (Configuration.errorOnAutoCreate())
1126          throw new Error("Attempt to auto-create CompartmentDefinition.code");
1127        else if (Configuration.doAutoCreate())
1128          this.code = new Enumeration<CompartmentType>(new CompartmentTypeEnumFactory()); // bb
1129      return this.code;
1130    }
1131
1132    public boolean hasCodeElement() { 
1133      return this.code != null && !this.code.isEmpty();
1134    }
1135
1136    public boolean hasCode() { 
1137      return this.code != null && !this.code.isEmpty();
1138    }
1139
1140    /**
1141     * @param value {@link #code} (Which compartment this definition describes.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1142     */
1143    public CompartmentDefinition setCodeElement(Enumeration<CompartmentType> value) { 
1144      this.code = value;
1145      return this;
1146    }
1147
1148    /**
1149     * @return Which compartment this definition describes.
1150     */
1151    public CompartmentType getCode() { 
1152      return this.code == null ? null : this.code.getValue();
1153    }
1154
1155    /**
1156     * @param value Which compartment this definition describes.
1157     */
1158    public CompartmentDefinition setCode(CompartmentType value) { 
1159        if (this.code == null)
1160          this.code = new Enumeration<CompartmentType>(new CompartmentTypeEnumFactory());
1161        this.code.setValue(value);
1162      return this;
1163    }
1164
1165    /**
1166     * @return {@link #search} (Whether the search syntax is supported,.). This is the underlying object with id, value and extensions. The accessor "getSearch" gives direct access to the value
1167     */
1168    public BooleanType getSearchElement() { 
1169      if (this.search == null)
1170        if (Configuration.errorOnAutoCreate())
1171          throw new Error("Attempt to auto-create CompartmentDefinition.search");
1172        else if (Configuration.doAutoCreate())
1173          this.search = new BooleanType(); // bb
1174      return this.search;
1175    }
1176
1177    public boolean hasSearchElement() { 
1178      return this.search != null && !this.search.isEmpty();
1179    }
1180
1181    public boolean hasSearch() { 
1182      return this.search != null && !this.search.isEmpty();
1183    }
1184
1185    /**
1186     * @param value {@link #search} (Whether the search syntax is supported,.). This is the underlying object with id, value and extensions. The accessor "getSearch" gives direct access to the value
1187     */
1188    public CompartmentDefinition setSearchElement(BooleanType value) { 
1189      this.search = value;
1190      return this;
1191    }
1192
1193    /**
1194     * @return Whether the search syntax is supported,.
1195     */
1196    public boolean getSearch() { 
1197      return this.search == null || this.search.isEmpty() ? false : this.search.getValue();
1198    }
1199
1200    /**
1201     * @param value Whether the search syntax is supported,.
1202     */
1203    public CompartmentDefinition setSearch(boolean value) { 
1204        if (this.search == null)
1205          this.search = new BooleanType();
1206        this.search.setValue(value);
1207      return this;
1208    }
1209
1210    /**
1211     * @return {@link #resource} (Information about how a resource is related to the compartment.)
1212     */
1213    public List<CompartmentDefinitionResourceComponent> getResource() { 
1214      if (this.resource == null)
1215        this.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1216      return this.resource;
1217    }
1218
1219    /**
1220     * @return Returns a reference to <code>this</code> for easy method chaining
1221     */
1222    public CompartmentDefinition setResource(List<CompartmentDefinitionResourceComponent> theResource) { 
1223      this.resource = theResource;
1224      return this;
1225    }
1226
1227    public boolean hasResource() { 
1228      if (this.resource == null)
1229        return false;
1230      for (CompartmentDefinitionResourceComponent item : this.resource)
1231        if (!item.isEmpty())
1232          return true;
1233      return false;
1234    }
1235
1236    public CompartmentDefinitionResourceComponent addResource() { //3
1237      CompartmentDefinitionResourceComponent t = new CompartmentDefinitionResourceComponent();
1238      if (this.resource == null)
1239        this.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1240      this.resource.add(t);
1241      return t;
1242    }
1243
1244    public CompartmentDefinition addResource(CompartmentDefinitionResourceComponent t) { //3
1245      if (t == null)
1246        return this;
1247      if (this.resource == null)
1248        this.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1249      this.resource.add(t);
1250      return this;
1251    }
1252
1253    /**
1254     * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist
1255     */
1256    public CompartmentDefinitionResourceComponent getResourceFirstRep() { 
1257      if (getResource().isEmpty()) {
1258        addResource();
1259      }
1260      return getResource().get(0);
1261    }
1262
1263      protected void listChildren(List<Property> children) {
1264        super.listChildren(children);
1265        children.add(new Property("url", "uri", "An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.", 0, 1, url));
1266        children.add(new Property("version", "string", "The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version));
1267        children.add(new Property("name", "string", "A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
1268        children.add(new Property("status", "code", "The status of this compartment definition. Enables tracking the life-cycle of the content.", 0, 1, status));
1269        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
1270        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.", 0, 1, date));
1271        children.add(new Property("publisher", "string", "The name of the organization or individual that published the compartment definition.", 0, 1, publisher));
1272        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
1273        children.add(new Property("description", "markdown", "A free text natural language description of the compartment definition from a consumer's perspective.", 0, 1, description));
1274        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
1275        children.add(new Property("purpose", "markdown", "Explanation of why this compartment definition is needed and why it has been designed as it has.", 0, 1, purpose));
1276        children.add(new Property("code", "code", "Which compartment this definition describes.", 0, 1, code));
1277        children.add(new Property("search", "boolean", "Whether the search syntax is supported,.", 0, 1, search));
1278        children.add(new Property("resource", "", "Information about how a resource is related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource));
1279      }
1280
1281      @Override
1282      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1283        switch (_hash) {
1284        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers.", 0, 1, url);
1285        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the compartment definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the compartment definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version);
1286        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the compartment definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
1287        case -892481550: /*status*/  return new Property("status", "code", "The status of this compartment definition. Enables tracking the life-cycle of the content.", 0, 1, status);
1288        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this compartment definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
1289        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the compartment definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the compartment definition changes.", 0, 1, date);
1290        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the compartment definition.", 0, 1, publisher);
1291        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
1292        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the compartment definition from a consumer's perspective.", 0, 1, description);
1293        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate compartment definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
1294        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this compartment definition is needed and why it has been designed as it has.", 0, 1, purpose);
1295        case 3059181: /*code*/  return new Property("code", "code", "Which compartment this definition describes.", 0, 1, code);
1296        case -906336856: /*search*/  return new Property("search", "boolean", "Whether the search syntax is supported,.", 0, 1, search);
1297        case -341064690: /*resource*/  return new Property("resource", "", "Information about how a resource is related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource);
1298        default: return super.getNamedProperty(_hash, _name, _checkValid);
1299        }
1300
1301      }
1302
1303      @Override
1304      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1305        switch (hash) {
1306        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1307        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
1308        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1309        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
1310        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
1311        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1312        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
1313        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
1314        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1315        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
1316        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
1317        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<CompartmentType>
1318        case -906336856: /*search*/ return this.search == null ? new Base[0] : new Base[] {this.search}; // BooleanType
1319        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CompartmentDefinitionResourceComponent
1320        default: return super.getProperty(hash, name, checkValid);
1321        }
1322
1323      }
1324
1325      @Override
1326      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1327        switch (hash) {
1328        case 116079: // url
1329          this.url = castToUri(value); // UriType
1330          return value;
1331        case 351608024: // version
1332          this.version = castToString(value); // StringType
1333          return value;
1334        case 3373707: // name
1335          this.name = castToString(value); // StringType
1336          return value;
1337        case -892481550: // status
1338          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1339          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1340          return value;
1341        case -404562712: // experimental
1342          this.experimental = castToBoolean(value); // BooleanType
1343          return value;
1344        case 3076014: // date
1345          this.date = castToDateTime(value); // DateTimeType
1346          return value;
1347        case 1447404028: // publisher
1348          this.publisher = castToString(value); // StringType
1349          return value;
1350        case 951526432: // contact
1351          this.getContact().add(castToContactDetail(value)); // ContactDetail
1352          return value;
1353        case -1724546052: // description
1354          this.description = castToMarkdown(value); // MarkdownType
1355          return value;
1356        case -669707736: // useContext
1357          this.getUseContext().add(castToUsageContext(value)); // UsageContext
1358          return value;
1359        case -220463842: // purpose
1360          this.purpose = castToMarkdown(value); // MarkdownType
1361          return value;
1362        case 3059181: // code
1363          value = new CompartmentTypeEnumFactory().fromType(castToCode(value));
1364          this.code = (Enumeration) value; // Enumeration<CompartmentType>
1365          return value;
1366        case -906336856: // search
1367          this.search = castToBoolean(value); // BooleanType
1368          return value;
1369        case -341064690: // resource
1370          this.getResource().add((CompartmentDefinitionResourceComponent) value); // CompartmentDefinitionResourceComponent
1371          return value;
1372        default: return super.setProperty(hash, name, value);
1373        }
1374
1375      }
1376
1377      @Override
1378      public Base setProperty(String name, Base value) throws FHIRException {
1379        if (name.equals("url")) {
1380          this.url = castToUri(value); // UriType
1381        } else if (name.equals("version")) {
1382          this.version = castToString(value); // StringType
1383        } else if (name.equals("name")) {
1384          this.name = castToString(value); // StringType
1385        } else if (name.equals("status")) {
1386          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1387          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1388        } else if (name.equals("experimental")) {
1389          this.experimental = castToBoolean(value); // BooleanType
1390        } else if (name.equals("date")) {
1391          this.date = castToDateTime(value); // DateTimeType
1392        } else if (name.equals("publisher")) {
1393          this.publisher = castToString(value); // StringType
1394        } else if (name.equals("contact")) {
1395          this.getContact().add(castToContactDetail(value));
1396        } else if (name.equals("description")) {
1397          this.description = castToMarkdown(value); // MarkdownType
1398        } else if (name.equals("useContext")) {
1399          this.getUseContext().add(castToUsageContext(value));
1400        } else if (name.equals("purpose")) {
1401          this.purpose = castToMarkdown(value); // MarkdownType
1402        } else if (name.equals("code")) {
1403          value = new CompartmentTypeEnumFactory().fromType(castToCode(value));
1404          this.code = (Enumeration) value; // Enumeration<CompartmentType>
1405        } else if (name.equals("search")) {
1406          this.search = castToBoolean(value); // BooleanType
1407        } else if (name.equals("resource")) {
1408          this.getResource().add((CompartmentDefinitionResourceComponent) value);
1409        } else
1410          return super.setProperty(name, value);
1411        return value;
1412      }
1413
1414      @Override
1415      public Base makeProperty(int hash, String name) throws FHIRException {
1416        switch (hash) {
1417        case 116079:  return getUrlElement();
1418        case 351608024:  return getVersionElement();
1419        case 3373707:  return getNameElement();
1420        case -892481550:  return getStatusElement();
1421        case -404562712:  return getExperimentalElement();
1422        case 3076014:  return getDateElement();
1423        case 1447404028:  return getPublisherElement();
1424        case 951526432:  return addContact(); 
1425        case -1724546052:  return getDescriptionElement();
1426        case -669707736:  return addUseContext(); 
1427        case -220463842:  return getPurposeElement();
1428        case 3059181:  return getCodeElement();
1429        case -906336856:  return getSearchElement();
1430        case -341064690:  return addResource(); 
1431        default: return super.makeProperty(hash, name);
1432        }
1433
1434      }
1435
1436      @Override
1437      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1438        switch (hash) {
1439        case 116079: /*url*/ return new String[] {"uri"};
1440        case 351608024: /*version*/ return new String[] {"string"};
1441        case 3373707: /*name*/ return new String[] {"string"};
1442        case -892481550: /*status*/ return new String[] {"code"};
1443        case -404562712: /*experimental*/ return new String[] {"boolean"};
1444        case 3076014: /*date*/ return new String[] {"dateTime"};
1445        case 1447404028: /*publisher*/ return new String[] {"string"};
1446        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
1447        case -1724546052: /*description*/ return new String[] {"markdown"};
1448        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
1449        case -220463842: /*purpose*/ return new String[] {"markdown"};
1450        case 3059181: /*code*/ return new String[] {"code"};
1451        case -906336856: /*search*/ return new String[] {"boolean"};
1452        case -341064690: /*resource*/ return new String[] {};
1453        default: return super.getTypesForProperty(hash, name);
1454        }
1455
1456      }
1457
1458      @Override
1459      public Base addChild(String name) throws FHIRException {
1460        if (name.equals("url")) {
1461          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.url");
1462        }
1463        else if (name.equals("version")) {
1464          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.version");
1465        }
1466        else if (name.equals("name")) {
1467          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.name");
1468        }
1469        else if (name.equals("status")) {
1470          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.status");
1471        }
1472        else if (name.equals("experimental")) {
1473          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.experimental");
1474        }
1475        else if (name.equals("date")) {
1476          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.date");
1477        }
1478        else if (name.equals("publisher")) {
1479          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.publisher");
1480        }
1481        else if (name.equals("contact")) {
1482          return addContact();
1483        }
1484        else if (name.equals("description")) {
1485          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.description");
1486        }
1487        else if (name.equals("useContext")) {
1488          return addUseContext();
1489        }
1490        else if (name.equals("purpose")) {
1491          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.purpose");
1492        }
1493        else if (name.equals("code")) {
1494          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.code");
1495        }
1496        else if (name.equals("search")) {
1497          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.search");
1498        }
1499        else if (name.equals("resource")) {
1500          return addResource();
1501        }
1502        else
1503          return super.addChild(name);
1504      }
1505
1506  public String fhirType() {
1507    return "CompartmentDefinition";
1508
1509  }
1510
1511      public CompartmentDefinition copy() {
1512        CompartmentDefinition dst = new CompartmentDefinition();
1513        copyValues(dst);
1514        return dst;
1515      }
1516
1517      public void copyValues(CompartmentDefinition dst) {
1518        super.copyValues(dst);
1519        dst.url = url == null ? null : url.copy();
1520        dst.version = version == null ? null : version.copy();
1521        dst.name = name == null ? null : name.copy();
1522        dst.status = status == null ? null : status.copy();
1523        dst.experimental = experimental == null ? null : experimental.copy();
1524        dst.date = date == null ? null : date.copy();
1525        dst.publisher = publisher == null ? null : publisher.copy();
1526        if (contact != null) {
1527          dst.contact = new ArrayList<ContactDetail>();
1528          for (ContactDetail i : contact)
1529            dst.contact.add(i.copy());
1530        };
1531        dst.description = description == null ? null : description.copy();
1532        if (useContext != null) {
1533          dst.useContext = new ArrayList<UsageContext>();
1534          for (UsageContext i : useContext)
1535            dst.useContext.add(i.copy());
1536        };
1537        dst.purpose = purpose == null ? null : purpose.copy();
1538        dst.code = code == null ? null : code.copy();
1539        dst.search = search == null ? null : search.copy();
1540        if (resource != null) {
1541          dst.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1542          for (CompartmentDefinitionResourceComponent i : resource)
1543            dst.resource.add(i.copy());
1544        };
1545      }
1546
1547      protected CompartmentDefinition typedCopy() {
1548        return copy();
1549      }
1550
1551      @Override
1552      public boolean equalsDeep(Base other_) {
1553        if (!super.equalsDeep(other_))
1554          return false;
1555        if (!(other_ instanceof CompartmentDefinition))
1556          return false;
1557        CompartmentDefinition o = (CompartmentDefinition) other_;
1558        return compareDeep(purpose, o.purpose, true) && compareDeep(code, o.code, true) && compareDeep(search, o.search, true)
1559           && compareDeep(resource, o.resource, true);
1560      }
1561
1562      @Override
1563      public boolean equalsShallow(Base other_) {
1564        if (!super.equalsShallow(other_))
1565          return false;
1566        if (!(other_ instanceof CompartmentDefinition))
1567          return false;
1568        CompartmentDefinition o = (CompartmentDefinition) other_;
1569        return compareValues(purpose, o.purpose, true) && compareValues(code, o.code, true) && compareValues(search, o.search, true)
1570          ;
1571      }
1572
1573      public boolean isEmpty() {
1574        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(purpose, code, search, resource
1575          );
1576      }
1577
1578  @Override
1579  public ResourceType getResourceType() {
1580    return ResourceType.CompartmentDefinition;
1581   }
1582
1583 /**
1584   * Search parameter: <b>date</b>
1585   * <p>
1586   * Description: <b>The compartment definition publication date</b><br>
1587   * Type: <b>date</b><br>
1588   * Path: <b>CompartmentDefinition.date</b><br>
1589   * </p>
1590   */
1591  @SearchParamDefinition(name="date", path="CompartmentDefinition.date", description="The compartment definition publication date", type="date" )
1592  public static final String SP_DATE = "date";
1593 /**
1594   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1595   * <p>
1596   * Description: <b>The compartment definition publication date</b><br>
1597   * Type: <b>date</b><br>
1598   * Path: <b>CompartmentDefinition.date</b><br>
1599   * </p>
1600   */
1601  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1602
1603 /**
1604   * Search parameter: <b>code</b>
1605   * <p>
1606   * Description: <b>Patient | Encounter | RelatedPerson | Practitioner | Device</b><br>
1607   * Type: <b>token</b><br>
1608   * Path: <b>CompartmentDefinition.code</b><br>
1609   * </p>
1610   */
1611  @SearchParamDefinition(name="code", path="CompartmentDefinition.code", description="Patient | Encounter | RelatedPerson | Practitioner | Device", type="token" )
1612  public static final String SP_CODE = "code";
1613 /**
1614   * <b>Fluent Client</b> search parameter constant for <b>code</b>
1615   * <p>
1616   * Description: <b>Patient | Encounter | RelatedPerson | Practitioner | Device</b><br>
1617   * Type: <b>token</b><br>
1618   * Path: <b>CompartmentDefinition.code</b><br>
1619   * </p>
1620   */
1621  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
1622
1623 /**
1624   * Search parameter: <b>context-type-value</b>
1625   * <p>
1626   * Description: <b>A use context type and value assigned to the compartment definition</b><br>
1627   * Type: <b>composite</b><br>
1628   * Path: <b></b><br>
1629   * </p>
1630   */
1631  @SearchParamDefinition(name="context-type-value", path="CompartmentDefinition.useContext", description="A use context type and value assigned to the compartment definition", type="composite", compositeOf={"context-type", "context"} )
1632  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
1633 /**
1634   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
1635   * <p>
1636   * Description: <b>A use context type and value assigned to the compartment definition</b><br>
1637   * Type: <b>composite</b><br>
1638   * Path: <b></b><br>
1639   * </p>
1640   */
1641  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
1642
1643 /**
1644   * Search parameter: <b>resource</b>
1645   * <p>
1646   * Description: <b>Name of resource type</b><br>
1647   * Type: <b>token</b><br>
1648   * Path: <b>CompartmentDefinition.resource.code</b><br>
1649   * </p>
1650   */
1651  @SearchParamDefinition(name="resource", path="CompartmentDefinition.resource.code", description="Name of resource type", type="token" )
1652  public static final String SP_RESOURCE = "resource";
1653 /**
1654   * <b>Fluent Client</b> search parameter constant for <b>resource</b>
1655   * <p>
1656   * Description: <b>Name of resource type</b><br>
1657   * Type: <b>token</b><br>
1658   * Path: <b>CompartmentDefinition.resource.code</b><br>
1659   * </p>
1660   */
1661  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOURCE);
1662
1663 /**
1664   * Search parameter: <b>description</b>
1665   * <p>
1666   * Description: <b>The description of the compartment definition</b><br>
1667   * Type: <b>string</b><br>
1668   * Path: <b>CompartmentDefinition.description</b><br>
1669   * </p>
1670   */
1671  @SearchParamDefinition(name="description", path="CompartmentDefinition.description", description="The description of the compartment definition", type="string" )
1672  public static final String SP_DESCRIPTION = "description";
1673 /**
1674   * <b>Fluent Client</b> search parameter constant for <b>description</b>
1675   * <p>
1676   * Description: <b>The description of the compartment definition</b><br>
1677   * Type: <b>string</b><br>
1678   * Path: <b>CompartmentDefinition.description</b><br>
1679   * </p>
1680   */
1681  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
1682
1683 /**
1684   * Search parameter: <b>context-type</b>
1685   * <p>
1686   * Description: <b>A type of use context assigned to the compartment definition</b><br>
1687   * Type: <b>token</b><br>
1688   * Path: <b>CompartmentDefinition.useContext.code</b><br>
1689   * </p>
1690   */
1691  @SearchParamDefinition(name="context-type", path="CompartmentDefinition.useContext.code", description="A type of use context assigned to the compartment definition", type="token" )
1692  public static final String SP_CONTEXT_TYPE = "context-type";
1693 /**
1694   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
1695   * <p>
1696   * Description: <b>A type of use context assigned to the compartment definition</b><br>
1697   * Type: <b>token</b><br>
1698   * Path: <b>CompartmentDefinition.useContext.code</b><br>
1699   * </p>
1700   */
1701  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
1702
1703 /**
1704   * Search parameter: <b>version</b>
1705   * <p>
1706   * Description: <b>The business version of the compartment definition</b><br>
1707   * Type: <b>token</b><br>
1708   * Path: <b>CompartmentDefinition.version</b><br>
1709   * </p>
1710   */
1711  @SearchParamDefinition(name="version", path="CompartmentDefinition.version", description="The business version of the compartment definition", type="token" )
1712  public static final String SP_VERSION = "version";
1713 /**
1714   * <b>Fluent Client</b> search parameter constant for <b>version</b>
1715   * <p>
1716   * Description: <b>The business version of the compartment definition</b><br>
1717   * Type: <b>token</b><br>
1718   * Path: <b>CompartmentDefinition.version</b><br>
1719   * </p>
1720   */
1721  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
1722
1723 /**
1724   * Search parameter: <b>url</b>
1725   * <p>
1726   * Description: <b>The uri that identifies the compartment definition</b><br>
1727   * Type: <b>uri</b><br>
1728   * Path: <b>CompartmentDefinition.url</b><br>
1729   * </p>
1730   */
1731  @SearchParamDefinition(name="url", path="CompartmentDefinition.url", description="The uri that identifies the compartment definition", type="uri" )
1732  public static final String SP_URL = "url";
1733 /**
1734   * <b>Fluent Client</b> search parameter constant for <b>url</b>
1735   * <p>
1736   * Description: <b>The uri that identifies the compartment definition</b><br>
1737   * Type: <b>uri</b><br>
1738   * Path: <b>CompartmentDefinition.url</b><br>
1739   * </p>
1740   */
1741  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
1742
1743 /**
1744   * Search parameter: <b>context-quantity</b>
1745   * <p>
1746   * Description: <b>A quantity- or range-valued use context assigned to the compartment definition</b><br>
1747   * Type: <b>quantity</b><br>
1748   * Path: <b>CompartmentDefinition.useContext.valueQuantity, CompartmentDefinition.useContext.valueRange</b><br>
1749   * </p>
1750   */
1751  @SearchParamDefinition(name="context-quantity", path="(CompartmentDefinition.useContext.value as Quantity) | (CompartmentDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the compartment definition", type="quantity" )
1752  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
1753 /**
1754   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
1755   * <p>
1756   * Description: <b>A quantity- or range-valued use context assigned to the compartment definition</b><br>
1757   * Type: <b>quantity</b><br>
1758   * Path: <b>CompartmentDefinition.useContext.valueQuantity, CompartmentDefinition.useContext.valueRange</b><br>
1759   * </p>
1760   */
1761  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
1762
1763 /**
1764   * Search parameter: <b>name</b>
1765   * <p>
1766   * Description: <b>Computationally friendly name of the compartment definition</b><br>
1767   * Type: <b>string</b><br>
1768   * Path: <b>CompartmentDefinition.name</b><br>
1769   * </p>
1770   */
1771  @SearchParamDefinition(name="name", path="CompartmentDefinition.name", description="Computationally friendly name of the compartment definition", type="string" )
1772  public static final String SP_NAME = "name";
1773 /**
1774   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1775   * <p>
1776   * Description: <b>Computationally friendly name of the compartment definition</b><br>
1777   * Type: <b>string</b><br>
1778   * Path: <b>CompartmentDefinition.name</b><br>
1779   * </p>
1780   */
1781  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1782
1783 /**
1784   * Search parameter: <b>context</b>
1785   * <p>
1786   * Description: <b>A use context assigned to the compartment definition</b><br>
1787   * Type: <b>token</b><br>
1788   * Path: <b>CompartmentDefinition.useContext.valueCodeableConcept</b><br>
1789   * </p>
1790   */
1791  @SearchParamDefinition(name="context", path="(CompartmentDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the compartment definition", type="token" )
1792  public static final String SP_CONTEXT = "context";
1793 /**
1794   * <b>Fluent Client</b> search parameter constant for <b>context</b>
1795   * <p>
1796   * Description: <b>A use context assigned to the compartment definition</b><br>
1797   * Type: <b>token</b><br>
1798   * Path: <b>CompartmentDefinition.useContext.valueCodeableConcept</b><br>
1799   * </p>
1800   */
1801  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
1802
1803 /**
1804   * Search parameter: <b>publisher</b>
1805   * <p>
1806   * Description: <b>Name of the publisher of the compartment definition</b><br>
1807   * Type: <b>string</b><br>
1808   * Path: <b>CompartmentDefinition.publisher</b><br>
1809   * </p>
1810   */
1811  @SearchParamDefinition(name="publisher", path="CompartmentDefinition.publisher", description="Name of the publisher of the compartment definition", type="string" )
1812  public static final String SP_PUBLISHER = "publisher";
1813 /**
1814   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
1815   * <p>
1816   * Description: <b>Name of the publisher of the compartment definition</b><br>
1817   * Type: <b>string</b><br>
1818   * Path: <b>CompartmentDefinition.publisher</b><br>
1819   * </p>
1820   */
1821  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
1822
1823 /**
1824   * Search parameter: <b>context-type-quantity</b>
1825   * <p>
1826   * Description: <b>A use context type and quantity- or range-based value assigned to the compartment definition</b><br>
1827   * Type: <b>composite</b><br>
1828   * Path: <b></b><br>
1829   * </p>
1830   */
1831  @SearchParamDefinition(name="context-type-quantity", path="CompartmentDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the compartment definition", type="composite", compositeOf={"context-type", "context-quantity"} )
1832  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
1833 /**
1834   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
1835   * <p>
1836   * Description: <b>A use context type and quantity- or range-based value assigned to the compartment definition</b><br>
1837   * Type: <b>composite</b><br>
1838   * Path: <b></b><br>
1839   * </p>
1840   */
1841  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
1842
1843 /**
1844   * Search parameter: <b>status</b>
1845   * <p>
1846   * Description: <b>The current status of the compartment definition</b><br>
1847   * Type: <b>token</b><br>
1848   * Path: <b>CompartmentDefinition.status</b><br>
1849   * </p>
1850   */
1851  @SearchParamDefinition(name="status", path="CompartmentDefinition.status", description="The current status of the compartment definition", type="token" )
1852  public static final String SP_STATUS = "status";
1853 /**
1854   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1855   * <p>
1856   * Description: <b>The current status of the compartment definition</b><br>
1857   * Type: <b>token</b><br>
1858   * Path: <b>CompartmentDefinition.status</b><br>
1859   * </p>
1860   */
1861  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1862
1863
1864}