001package org.hl7.fhir.r4.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
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 Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056
057import org.hl7.fhir.exceptions.FHIRException;
058import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
059import org.hl7.fhir.r4.model.Enumerations.PublicationStatus;
060import org.hl7.fhir.r4.model.Enumerations.PublicationStatusEnumFactory;
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/StructureDefinition/CompartmentDefinition")
073@ChildOrder(names={"url", "version", "name", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "purpose", "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     * Explanation 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="Explanation 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; 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
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; 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
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; 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.
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; 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.
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 #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
652     */
653    public StringType getVersionElement() { 
654      if (this.version == null)
655        if (Configuration.errorOnAutoCreate())
656          throw new Error("Attempt to auto-create CompartmentDefinition.version");
657        else if (Configuration.doAutoCreate())
658          this.version = new StringType(); // bb
659      return this.version;
660    }
661
662    public boolean hasVersionElement() { 
663      return this.version != null && !this.version.isEmpty();
664    }
665
666    public boolean hasVersion() { 
667      return this.version != null && !this.version.isEmpty();
668    }
669
670    /**
671     * @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
672     */
673    public CompartmentDefinition setVersionElement(StringType value) { 
674      this.version = value;
675      return this;
676    }
677
678    /**
679     * @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.
680     */
681    public String getVersion() { 
682      return this.version == null ? null : this.version.getValue();
683    }
684
685    /**
686     * @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.
687     */
688    public CompartmentDefinition setVersion(String value) { 
689      if (Utilities.noString(value))
690        this.version = null;
691      else {
692        if (this.version == null)
693          this.version = new StringType();
694        this.version.setValue(value);
695      }
696      return this;
697    }
698
699    /**
700     * @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
701     */
702    public StringType getNameElement() { 
703      if (this.name == null)
704        if (Configuration.errorOnAutoCreate())
705          throw new Error("Attempt to auto-create CompartmentDefinition.name");
706        else if (Configuration.doAutoCreate())
707          this.name = new StringType(); // bb
708      return this.name;
709    }
710
711    public boolean hasNameElement() { 
712      return this.name != null && !this.name.isEmpty();
713    }
714
715    public boolean hasName() { 
716      return this.name != null && !this.name.isEmpty();
717    }
718
719    /**
720     * @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
721     */
722    public CompartmentDefinition setNameElement(StringType value) { 
723      this.name = value;
724      return this;
725    }
726
727    /**
728     * @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.
729     */
730    public String getName() { 
731      return this.name == null ? null : this.name.getValue();
732    }
733
734    /**
735     * @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.
736     */
737    public CompartmentDefinition setName(String value) { 
738        if (this.name == null)
739          this.name = new StringType();
740        this.name.setValue(value);
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 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 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 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 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 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
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 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
905     */
906    public CompartmentDefinition setPublisherElement(StringType value) { 
907      this.publisher = value;
908      return this;
909    }
910
911    /**
912     * @return The name of the organization or individual 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 organization or individual 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 #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.)
1036     */
1037    public List<UsageContext> getUseContext() { 
1038      if (this.useContext == null)
1039        this.useContext = new ArrayList<UsageContext>();
1040      return this.useContext;
1041    }
1042
1043    /**
1044     * @return Returns a reference to <code>this</code> for easy method chaining
1045     */
1046    public CompartmentDefinition setUseContext(List<UsageContext> theUseContext) { 
1047      this.useContext = theUseContext;
1048      return this;
1049    }
1050
1051    public boolean hasUseContext() { 
1052      if (this.useContext == null)
1053        return false;
1054      for (UsageContext item : this.useContext)
1055        if (!item.isEmpty())
1056          return true;
1057      return false;
1058    }
1059
1060    public UsageContext addUseContext() { //3
1061      UsageContext t = new UsageContext();
1062      if (this.useContext == null)
1063        this.useContext = new ArrayList<UsageContext>();
1064      this.useContext.add(t);
1065      return t;
1066    }
1067
1068    public CompartmentDefinition addUseContext(UsageContext t) { //3
1069      if (t == null)
1070        return this;
1071      if (this.useContext == null)
1072        this.useContext = new ArrayList<UsageContext>();
1073      this.useContext.add(t);
1074      return this;
1075    }
1076
1077    /**
1078     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
1079     */
1080    public UsageContext getUseContextFirstRep() { 
1081      if (getUseContext().isEmpty()) {
1082        addUseContext();
1083      }
1084      return getUseContext().get(0);
1085    }
1086
1087    /**
1088     * @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
1089     */
1090    public MarkdownType getPurposeElement() { 
1091      if (this.purpose == null)
1092        if (Configuration.errorOnAutoCreate())
1093          throw new Error("Attempt to auto-create CompartmentDefinition.purpose");
1094        else if (Configuration.doAutoCreate())
1095          this.purpose = new MarkdownType(); // bb
1096      return this.purpose;
1097    }
1098
1099    public boolean hasPurposeElement() { 
1100      return this.purpose != null && !this.purpose.isEmpty();
1101    }
1102
1103    public boolean hasPurpose() { 
1104      return this.purpose != null && !this.purpose.isEmpty();
1105    }
1106
1107    /**
1108     * @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
1109     */
1110    public CompartmentDefinition setPurposeElement(MarkdownType value) { 
1111      this.purpose = value;
1112      return this;
1113    }
1114
1115    /**
1116     * @return Explanation of why this compartment definition is needed and why it has been designed as it has.
1117     */
1118    public String getPurpose() { 
1119      return this.purpose == null ? null : this.purpose.getValue();
1120    }
1121
1122    /**
1123     * @param value Explanation of why this compartment definition is needed and why it has been designed as it has.
1124     */
1125    public CompartmentDefinition setPurpose(String value) { 
1126      if (value == null)
1127        this.purpose = null;
1128      else {
1129        if (this.purpose == null)
1130          this.purpose = new MarkdownType();
1131        this.purpose.setValue(value);
1132      }
1133      return this;
1134    }
1135
1136    /**
1137     * @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
1138     */
1139    public Enumeration<CompartmentType> getCodeElement() { 
1140      if (this.code == null)
1141        if (Configuration.errorOnAutoCreate())
1142          throw new Error("Attempt to auto-create CompartmentDefinition.code");
1143        else if (Configuration.doAutoCreate())
1144          this.code = new Enumeration<CompartmentType>(new CompartmentTypeEnumFactory()); // bb
1145      return this.code;
1146    }
1147
1148    public boolean hasCodeElement() { 
1149      return this.code != null && !this.code.isEmpty();
1150    }
1151
1152    public boolean hasCode() { 
1153      return this.code != null && !this.code.isEmpty();
1154    }
1155
1156    /**
1157     * @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
1158     */
1159    public CompartmentDefinition setCodeElement(Enumeration<CompartmentType> value) { 
1160      this.code = value;
1161      return this;
1162    }
1163
1164    /**
1165     * @return Which compartment this definition describes.
1166     */
1167    public CompartmentType getCode() { 
1168      return this.code == null ? null : this.code.getValue();
1169    }
1170
1171    /**
1172     * @param value Which compartment this definition describes.
1173     */
1174    public CompartmentDefinition setCode(CompartmentType value) { 
1175        if (this.code == null)
1176          this.code = new Enumeration<CompartmentType>(new CompartmentTypeEnumFactory());
1177        this.code.setValue(value);
1178      return this;
1179    }
1180
1181    /**
1182     * @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
1183     */
1184    public BooleanType getSearchElement() { 
1185      if (this.search == null)
1186        if (Configuration.errorOnAutoCreate())
1187          throw new Error("Attempt to auto-create CompartmentDefinition.search");
1188        else if (Configuration.doAutoCreate())
1189          this.search = new BooleanType(); // bb
1190      return this.search;
1191    }
1192
1193    public boolean hasSearchElement() { 
1194      return this.search != null && !this.search.isEmpty();
1195    }
1196
1197    public boolean hasSearch() { 
1198      return this.search != null && !this.search.isEmpty();
1199    }
1200
1201    /**
1202     * @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
1203     */
1204    public CompartmentDefinition setSearchElement(BooleanType value) { 
1205      this.search = value;
1206      return this;
1207    }
1208
1209    /**
1210     * @return Whether the search syntax is supported,.
1211     */
1212    public boolean getSearch() { 
1213      return this.search == null || this.search.isEmpty() ? false : this.search.getValue();
1214    }
1215
1216    /**
1217     * @param value Whether the search syntax is supported,.
1218     */
1219    public CompartmentDefinition setSearch(boolean value) { 
1220        if (this.search == null)
1221          this.search = new BooleanType();
1222        this.search.setValue(value);
1223      return this;
1224    }
1225
1226    /**
1227     * @return {@link #resource} (Information about how a resource is related to the compartment.)
1228     */
1229    public List<CompartmentDefinitionResourceComponent> getResource() { 
1230      if (this.resource == null)
1231        this.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1232      return this.resource;
1233    }
1234
1235    /**
1236     * @return Returns a reference to <code>this</code> for easy method chaining
1237     */
1238    public CompartmentDefinition setResource(List<CompartmentDefinitionResourceComponent> theResource) { 
1239      this.resource = theResource;
1240      return this;
1241    }
1242
1243    public boolean hasResource() { 
1244      if (this.resource == null)
1245        return false;
1246      for (CompartmentDefinitionResourceComponent item : this.resource)
1247        if (!item.isEmpty())
1248          return true;
1249      return false;
1250    }
1251
1252    public CompartmentDefinitionResourceComponent addResource() { //3
1253      CompartmentDefinitionResourceComponent t = new CompartmentDefinitionResourceComponent();
1254      if (this.resource == null)
1255        this.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1256      this.resource.add(t);
1257      return t;
1258    }
1259
1260    public CompartmentDefinition addResource(CompartmentDefinitionResourceComponent t) { //3
1261      if (t == null)
1262        return this;
1263      if (this.resource == null)
1264        this.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1265      this.resource.add(t);
1266      return this;
1267    }
1268
1269    /**
1270     * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist
1271     */
1272    public CompartmentDefinitionResourceComponent getResourceFirstRep() { 
1273      if (getResource().isEmpty()) {
1274        addResource();
1275      }
1276      return getResource().get(0);
1277    }
1278
1279      protected void listChildren(List<Property> children) {
1280        super.listChildren(children);
1281        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));
1282        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));
1283        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));
1284        children.add(new Property("status", "code", "The status of this compartment definition. Enables tracking the life-cycle of the content.", 0, 1, status));
1285        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));
1286        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));
1287        children.add(new Property("publisher", "string", "The name of the organization or individual that published the compartment definition.", 0, 1, publisher));
1288        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));
1289        children.add(new Property("description", "markdown", "A free text natural language description of the compartment definition from a consumer's perspective.", 0, 1, description));
1290        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));
1291        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));
1292        children.add(new Property("code", "code", "Which compartment this definition describes.", 0, 1, code));
1293        children.add(new Property("search", "boolean", "Whether the search syntax is supported,.", 0, 1, search));
1294        children.add(new Property("resource", "", "Information about how a resource is related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource));
1295      }
1296
1297      @Override
1298      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1299        switch (_hash) {
1300        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);
1301        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);
1302        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);
1303        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);
1304        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);
1305        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);
1306        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the compartment definition.", 0, 1, publisher);
1307        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);
1308        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);
1309        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);
1310        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);
1311        case 3059181: /*code*/  return new Property("code", "code", "Which compartment this definition describes.", 0, 1, code);
1312        case -906336856: /*search*/  return new Property("search", "boolean", "Whether the search syntax is supported,.", 0, 1, search);
1313        case -341064690: /*resource*/  return new Property("resource", "", "Information about how a resource is related to the compartment.", 0, java.lang.Integer.MAX_VALUE, resource);
1314        default: return super.getNamedProperty(_hash, _name, _checkValid);
1315        }
1316
1317      }
1318
1319      @Override
1320      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1321        switch (hash) {
1322        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1323        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
1324        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1325        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
1326        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
1327        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1328        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
1329        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
1330        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1331        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
1332        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
1333        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<CompartmentType>
1334        case -906336856: /*search*/ return this.search == null ? new Base[0] : new Base[] {this.search}; // BooleanType
1335        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CompartmentDefinitionResourceComponent
1336        default: return super.getProperty(hash, name, checkValid);
1337        }
1338
1339      }
1340
1341      @Override
1342      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1343        switch (hash) {
1344        case 116079: // url
1345          this.url = castToUri(value); // UriType
1346          return value;
1347        case 351608024: // version
1348          this.version = castToString(value); // StringType
1349          return value;
1350        case 3373707: // name
1351          this.name = castToString(value); // StringType
1352          return value;
1353        case -892481550: // status
1354          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1355          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1356          return value;
1357        case -404562712: // experimental
1358          this.experimental = castToBoolean(value); // BooleanType
1359          return value;
1360        case 3076014: // date
1361          this.date = castToDateTime(value); // DateTimeType
1362          return value;
1363        case 1447404028: // publisher
1364          this.publisher = castToString(value); // StringType
1365          return value;
1366        case 951526432: // contact
1367          this.getContact().add(castToContactDetail(value)); // ContactDetail
1368          return value;
1369        case -1724546052: // description
1370          this.description = castToMarkdown(value); // MarkdownType
1371          return value;
1372        case -669707736: // useContext
1373          this.getUseContext().add(castToUsageContext(value)); // UsageContext
1374          return value;
1375        case -220463842: // purpose
1376          this.purpose = castToMarkdown(value); // MarkdownType
1377          return value;
1378        case 3059181: // code
1379          value = new CompartmentTypeEnumFactory().fromType(castToCode(value));
1380          this.code = (Enumeration) value; // Enumeration<CompartmentType>
1381          return value;
1382        case -906336856: // search
1383          this.search = castToBoolean(value); // BooleanType
1384          return value;
1385        case -341064690: // resource
1386          this.getResource().add((CompartmentDefinitionResourceComponent) value); // CompartmentDefinitionResourceComponent
1387          return value;
1388        default: return super.setProperty(hash, name, value);
1389        }
1390
1391      }
1392
1393      @Override
1394      public Base setProperty(String name, Base value) throws FHIRException {
1395        if (name.equals("url")) {
1396          this.url = castToUri(value); // UriType
1397        } else if (name.equals("version")) {
1398          this.version = castToString(value); // StringType
1399        } else if (name.equals("name")) {
1400          this.name = castToString(value); // StringType
1401        } else if (name.equals("status")) {
1402          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1403          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1404        } else if (name.equals("experimental")) {
1405          this.experimental = castToBoolean(value); // BooleanType
1406        } else if (name.equals("date")) {
1407          this.date = castToDateTime(value); // DateTimeType
1408        } else if (name.equals("publisher")) {
1409          this.publisher = castToString(value); // StringType
1410        } else if (name.equals("contact")) {
1411          this.getContact().add(castToContactDetail(value));
1412        } else if (name.equals("description")) {
1413          this.description = castToMarkdown(value); // MarkdownType
1414        } else if (name.equals("useContext")) {
1415          this.getUseContext().add(castToUsageContext(value));
1416        } else if (name.equals("purpose")) {
1417          this.purpose = castToMarkdown(value); // MarkdownType
1418        } else if (name.equals("code")) {
1419          value = new CompartmentTypeEnumFactory().fromType(castToCode(value));
1420          this.code = (Enumeration) value; // Enumeration<CompartmentType>
1421        } else if (name.equals("search")) {
1422          this.search = castToBoolean(value); // BooleanType
1423        } else if (name.equals("resource")) {
1424          this.getResource().add((CompartmentDefinitionResourceComponent) value);
1425        } else
1426          return super.setProperty(name, value);
1427        return value;
1428      }
1429
1430      @Override
1431      public Base makeProperty(int hash, String name) throws FHIRException {
1432        switch (hash) {
1433        case 116079:  return getUrlElement();
1434        case 351608024:  return getVersionElement();
1435        case 3373707:  return getNameElement();
1436        case -892481550:  return getStatusElement();
1437        case -404562712:  return getExperimentalElement();
1438        case 3076014:  return getDateElement();
1439        case 1447404028:  return getPublisherElement();
1440        case 951526432:  return addContact(); 
1441        case -1724546052:  return getDescriptionElement();
1442        case -669707736:  return addUseContext(); 
1443        case -220463842:  return getPurposeElement();
1444        case 3059181:  return getCodeElement();
1445        case -906336856:  return getSearchElement();
1446        case -341064690:  return addResource(); 
1447        default: return super.makeProperty(hash, name);
1448        }
1449
1450      }
1451
1452      @Override
1453      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1454        switch (hash) {
1455        case 116079: /*url*/ return new String[] {"uri"};
1456        case 351608024: /*version*/ return new String[] {"string"};
1457        case 3373707: /*name*/ return new String[] {"string"};
1458        case -892481550: /*status*/ return new String[] {"code"};
1459        case -404562712: /*experimental*/ return new String[] {"boolean"};
1460        case 3076014: /*date*/ return new String[] {"dateTime"};
1461        case 1447404028: /*publisher*/ return new String[] {"string"};
1462        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
1463        case -1724546052: /*description*/ return new String[] {"markdown"};
1464        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
1465        case -220463842: /*purpose*/ return new String[] {"markdown"};
1466        case 3059181: /*code*/ return new String[] {"code"};
1467        case -906336856: /*search*/ return new String[] {"boolean"};
1468        case -341064690: /*resource*/ return new String[] {};
1469        default: return super.getTypesForProperty(hash, name);
1470        }
1471
1472      }
1473
1474      @Override
1475      public Base addChild(String name) throws FHIRException {
1476        if (name.equals("url")) {
1477          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.url");
1478        }
1479        else if (name.equals("version")) {
1480          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.version");
1481        }
1482        else if (name.equals("name")) {
1483          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.name");
1484        }
1485        else if (name.equals("status")) {
1486          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.status");
1487        }
1488        else if (name.equals("experimental")) {
1489          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.experimental");
1490        }
1491        else if (name.equals("date")) {
1492          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.date");
1493        }
1494        else if (name.equals("publisher")) {
1495          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.publisher");
1496        }
1497        else if (name.equals("contact")) {
1498          return addContact();
1499        }
1500        else if (name.equals("description")) {
1501          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.description");
1502        }
1503        else if (name.equals("useContext")) {
1504          return addUseContext();
1505        }
1506        else if (name.equals("purpose")) {
1507          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.purpose");
1508        }
1509        else if (name.equals("code")) {
1510          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.code");
1511        }
1512        else if (name.equals("search")) {
1513          throw new FHIRException("Cannot call addChild on a primitive type CompartmentDefinition.search");
1514        }
1515        else if (name.equals("resource")) {
1516          return addResource();
1517        }
1518        else
1519          return super.addChild(name);
1520      }
1521
1522  public String fhirType() {
1523    return "CompartmentDefinition";
1524
1525  }
1526
1527      public CompartmentDefinition copy() {
1528        CompartmentDefinition dst = new CompartmentDefinition();
1529        copyValues(dst);
1530        dst.url = url == null ? null : url.copy();
1531        dst.version = version == null ? null : version.copy();
1532        dst.name = name == null ? null : name.copy();
1533        dst.status = status == null ? null : status.copy();
1534        dst.experimental = experimental == null ? null : experimental.copy();
1535        dst.date = date == null ? null : date.copy();
1536        dst.publisher = publisher == null ? null : publisher.copy();
1537        if (contact != null) {
1538          dst.contact = new ArrayList<ContactDetail>();
1539          for (ContactDetail i : contact)
1540            dst.contact.add(i.copy());
1541        };
1542        dst.description = description == null ? null : description.copy();
1543        if (useContext != null) {
1544          dst.useContext = new ArrayList<UsageContext>();
1545          for (UsageContext i : useContext)
1546            dst.useContext.add(i.copy());
1547        };
1548        dst.purpose = purpose == null ? null : purpose.copy();
1549        dst.code = code == null ? null : code.copy();
1550        dst.search = search == null ? null : search.copy();
1551        if (resource != null) {
1552          dst.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
1553          for (CompartmentDefinitionResourceComponent i : resource)
1554            dst.resource.add(i.copy());
1555        };
1556        return dst;
1557      }
1558
1559      protected CompartmentDefinition typedCopy() {
1560        return copy();
1561      }
1562
1563      @Override
1564      public boolean equalsDeep(Base other_) {
1565        if (!super.equalsDeep(other_))
1566          return false;
1567        if (!(other_ instanceof CompartmentDefinition))
1568          return false;
1569        CompartmentDefinition o = (CompartmentDefinition) other_;
1570        return compareDeep(purpose, o.purpose, true) && compareDeep(code, o.code, true) && compareDeep(search, o.search, true)
1571           && compareDeep(resource, o.resource, true);
1572      }
1573
1574      @Override
1575      public boolean equalsShallow(Base other_) {
1576        if (!super.equalsShallow(other_))
1577          return false;
1578        if (!(other_ instanceof CompartmentDefinition))
1579          return false;
1580        CompartmentDefinition o = (CompartmentDefinition) other_;
1581        return compareValues(purpose, o.purpose, true) && compareValues(code, o.code, true) && compareValues(search, o.search, true)
1582          ;
1583      }
1584
1585      public boolean isEmpty() {
1586        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(purpose, code, search, resource
1587          );
1588      }
1589
1590  @Override
1591  public ResourceType getResourceType() {
1592    return ResourceType.CompartmentDefinition;
1593   }
1594
1595 /**
1596   * Search parameter: <b>date</b>
1597   * <p>
1598   * Description: <b>The compartment definition publication date</b><br>
1599   * Type: <b>date</b><br>
1600   * Path: <b>CompartmentDefinition.date</b><br>
1601   * </p>
1602   */
1603  @SearchParamDefinition(name="date", path="CompartmentDefinition.date", description="The compartment definition publication date", type="date" )
1604  public static final String SP_DATE = "date";
1605 /**
1606   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1607   * <p>
1608   * Description: <b>The compartment definition publication date</b><br>
1609   * Type: <b>date</b><br>
1610   * Path: <b>CompartmentDefinition.date</b><br>
1611   * </p>
1612   */
1613  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1614
1615 /**
1616   * Search parameter: <b>code</b>
1617   * <p>
1618   * Description: <b>Patient | Encounter | RelatedPerson | Practitioner | Device</b><br>
1619   * Type: <b>token</b><br>
1620   * Path: <b>CompartmentDefinition.code</b><br>
1621   * </p>
1622   */
1623  @SearchParamDefinition(name="code", path="CompartmentDefinition.code", description="Patient | Encounter | RelatedPerson | Practitioner | Device", type="token" )
1624  public static final String SP_CODE = "code";
1625 /**
1626   * <b>Fluent Client</b> search parameter constant for <b>code</b>
1627   * <p>
1628   * Description: <b>Patient | Encounter | RelatedPerson | Practitioner | Device</b><br>
1629   * Type: <b>token</b><br>
1630   * Path: <b>CompartmentDefinition.code</b><br>
1631   * </p>
1632   */
1633  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
1634
1635 /**
1636   * Search parameter: <b>context-type-value</b>
1637   * <p>
1638   * Description: <b>A use context type and value assigned to the compartment definition</b><br>
1639   * Type: <b>composite</b><br>
1640   * Path: <b></b><br>
1641   * </p>
1642   */
1643  @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"} )
1644  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
1645 /**
1646   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
1647   * <p>
1648   * Description: <b>A use context type and value assigned to the compartment definition</b><br>
1649   * Type: <b>composite</b><br>
1650   * Path: <b></b><br>
1651   * </p>
1652   */
1653  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);
1654
1655 /**
1656   * Search parameter: <b>resource</b>
1657   * <p>
1658   * Description: <b>Name of resource type</b><br>
1659   * Type: <b>token</b><br>
1660   * Path: <b>CompartmentDefinition.resource.code</b><br>
1661   * </p>
1662   */
1663  @SearchParamDefinition(name="resource", path="CompartmentDefinition.resource.code", description="Name of resource type", type="token" )
1664  public static final String SP_RESOURCE = "resource";
1665 /**
1666   * <b>Fluent Client</b> search parameter constant for <b>resource</b>
1667   * <p>
1668   * Description: <b>Name of resource type</b><br>
1669   * Type: <b>token</b><br>
1670   * Path: <b>CompartmentDefinition.resource.code</b><br>
1671   * </p>
1672   */
1673  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOURCE);
1674
1675 /**
1676   * Search parameter: <b>description</b>
1677   * <p>
1678   * Description: <b>The description of the compartment definition</b><br>
1679   * Type: <b>string</b><br>
1680   * Path: <b>CompartmentDefinition.description</b><br>
1681   * </p>
1682   */
1683  @SearchParamDefinition(name="description", path="CompartmentDefinition.description", description="The description of the compartment definition", type="string" )
1684  public static final String SP_DESCRIPTION = "description";
1685 /**
1686   * <b>Fluent Client</b> search parameter constant for <b>description</b>
1687   * <p>
1688   * Description: <b>The description of the compartment definition</b><br>
1689   * Type: <b>string</b><br>
1690   * Path: <b>CompartmentDefinition.description</b><br>
1691   * </p>
1692   */
1693  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
1694
1695 /**
1696   * Search parameter: <b>context-type</b>
1697   * <p>
1698   * Description: <b>A type of use context assigned to the compartment definition</b><br>
1699   * Type: <b>token</b><br>
1700   * Path: <b>CompartmentDefinition.useContext.code</b><br>
1701   * </p>
1702   */
1703  @SearchParamDefinition(name="context-type", path="CompartmentDefinition.useContext.code", description="A type of use context assigned to the compartment definition", type="token" )
1704  public static final String SP_CONTEXT_TYPE = "context-type";
1705 /**
1706   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
1707   * <p>
1708   * Description: <b>A type of use context assigned to the compartment definition</b><br>
1709   * Type: <b>token</b><br>
1710   * Path: <b>CompartmentDefinition.useContext.code</b><br>
1711   * </p>
1712   */
1713  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
1714
1715 /**
1716   * Search parameter: <b>version</b>
1717   * <p>
1718   * Description: <b>The business version of the compartment definition</b><br>
1719   * Type: <b>token</b><br>
1720   * Path: <b>CompartmentDefinition.version</b><br>
1721   * </p>
1722   */
1723  @SearchParamDefinition(name="version", path="CompartmentDefinition.version", description="The business version of the compartment definition", type="token" )
1724  public static final String SP_VERSION = "version";
1725 /**
1726   * <b>Fluent Client</b> search parameter constant for <b>version</b>
1727   * <p>
1728   * Description: <b>The business version of the compartment definition</b><br>
1729   * Type: <b>token</b><br>
1730   * Path: <b>CompartmentDefinition.version</b><br>
1731   * </p>
1732   */
1733  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
1734
1735 /**
1736   * Search parameter: <b>url</b>
1737   * <p>
1738   * Description: <b>The uri that identifies the compartment definition</b><br>
1739   * Type: <b>uri</b><br>
1740   * Path: <b>CompartmentDefinition.url</b><br>
1741   * </p>
1742   */
1743  @SearchParamDefinition(name="url", path="CompartmentDefinition.url", description="The uri that identifies the compartment definition", type="uri" )
1744  public static final String SP_URL = "url";
1745 /**
1746   * <b>Fluent Client</b> search parameter constant for <b>url</b>
1747   * <p>
1748   * Description: <b>The uri that identifies the compartment definition</b><br>
1749   * Type: <b>uri</b><br>
1750   * Path: <b>CompartmentDefinition.url</b><br>
1751   * </p>
1752   */
1753  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
1754
1755 /**
1756   * Search parameter: <b>context-quantity</b>
1757   * <p>
1758   * Description: <b>A quantity- or range-valued use context assigned to the compartment definition</b><br>
1759   * Type: <b>quantity</b><br>
1760   * Path: <b>CompartmentDefinition.useContext.valueQuantity, CompartmentDefinition.useContext.valueRange</b><br>
1761   * </p>
1762   */
1763  @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" )
1764  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
1765 /**
1766   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
1767   * <p>
1768   * Description: <b>A quantity- or range-valued use context assigned to the compartment definition</b><br>
1769   * Type: <b>quantity</b><br>
1770   * Path: <b>CompartmentDefinition.useContext.valueQuantity, CompartmentDefinition.useContext.valueRange</b><br>
1771   * </p>
1772   */
1773  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
1774
1775 /**
1776   * Search parameter: <b>name</b>
1777   * <p>
1778   * Description: <b>Computationally friendly name of the compartment definition</b><br>
1779   * Type: <b>string</b><br>
1780   * Path: <b>CompartmentDefinition.name</b><br>
1781   * </p>
1782   */
1783  @SearchParamDefinition(name="name", path="CompartmentDefinition.name", description="Computationally friendly name of the compartment definition", type="string" )
1784  public static final String SP_NAME = "name";
1785 /**
1786   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1787   * <p>
1788   * Description: <b>Computationally friendly name of the compartment definition</b><br>
1789   * Type: <b>string</b><br>
1790   * Path: <b>CompartmentDefinition.name</b><br>
1791   * </p>
1792   */
1793  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1794
1795 /**
1796   * Search parameter: <b>context</b>
1797   * <p>
1798   * Description: <b>A use context assigned to the compartment definition</b><br>
1799   * Type: <b>token</b><br>
1800   * Path: <b>CompartmentDefinition.useContext.valueCodeableConcept</b><br>
1801   * </p>
1802   */
1803  @SearchParamDefinition(name="context", path="(CompartmentDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the compartment definition", type="token" )
1804  public static final String SP_CONTEXT = "context";
1805 /**
1806   * <b>Fluent Client</b> search parameter constant for <b>context</b>
1807   * <p>
1808   * Description: <b>A use context assigned to the compartment definition</b><br>
1809   * Type: <b>token</b><br>
1810   * Path: <b>CompartmentDefinition.useContext.valueCodeableConcept</b><br>
1811   * </p>
1812   */
1813  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
1814
1815 /**
1816   * Search parameter: <b>publisher</b>
1817   * <p>
1818   * Description: <b>Name of the publisher of the compartment definition</b><br>
1819   * Type: <b>string</b><br>
1820   * Path: <b>CompartmentDefinition.publisher</b><br>
1821   * </p>
1822   */
1823  @SearchParamDefinition(name="publisher", path="CompartmentDefinition.publisher", description="Name of the publisher of the compartment definition", type="string" )
1824  public static final String SP_PUBLISHER = "publisher";
1825 /**
1826   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
1827   * <p>
1828   * Description: <b>Name of the publisher of the compartment definition</b><br>
1829   * Type: <b>string</b><br>
1830   * Path: <b>CompartmentDefinition.publisher</b><br>
1831   * </p>
1832   */
1833  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
1834
1835 /**
1836   * Search parameter: <b>context-type-quantity</b>
1837   * <p>
1838   * Description: <b>A use context type and quantity- or range-based value assigned to the compartment definition</b><br>
1839   * Type: <b>composite</b><br>
1840   * Path: <b></b><br>
1841   * </p>
1842   */
1843  @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"} )
1844  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
1845 /**
1846   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
1847   * <p>
1848   * Description: <b>A use context type and quantity- or range-based value assigned to the compartment definition</b><br>
1849   * Type: <b>composite</b><br>
1850   * Path: <b></b><br>
1851   * </p>
1852   */
1853  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);
1854
1855 /**
1856   * Search parameter: <b>status</b>
1857   * <p>
1858   * Description: <b>The current status of the compartment definition</b><br>
1859   * Type: <b>token</b><br>
1860   * Path: <b>CompartmentDefinition.status</b><br>
1861   * </p>
1862   */
1863  @SearchParamDefinition(name="status", path="CompartmentDefinition.status", description="The current status of the compartment definition", type="token" )
1864  public static final String SP_STATUS = "status";
1865 /**
1866   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1867   * <p>
1868   * Description: <b>The current status of the compartment definition</b><br>
1869   * Type: <b>token</b><br>
1870   * Path: <b>CompartmentDefinition.status</b><br>
1871   * </p>
1872   */
1873  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1874
1875
1876}
1877