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