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