001package org.hl7.fhir.r5.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r5
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;
056import org.hl7.fhir.exceptions.FHIRException;
057import org.hl7.fhir.instance.model.api.ICompositeType;
058
059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
060import org.hl7.fhir.utilities.Utilities;
061import org.hl7.fhir.r5.model.Enumerations.*;
062import ca.uhn.fhir.model.api.annotation.ResourceDef;
063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
064import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
065import ca.uhn.fhir.model.api.annotation.Child;
066import ca.uhn.fhir.model.api.annotation.ChildOrder;
067import ca.uhn.fhir.model.api.annotation.Description;
068import ca.uhn.fhir.model.api.annotation.Block;
069/**
070 * A search parameter that defines a named search item that can be used to search/filter on a resource.
071 */
072@ResourceDef(name="SearchParameter", profile="http://hl7.org/fhir/StructureDefinition/SearchParameter")
073@ChildOrder(names={"url", "version", "name", "derivedFrom", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "code", "base", "type", "expression", "xpath", "xpathUsage", "target", "multipleOr", "multipleAnd", "comparator", "modifier", "chain", "component"})
074public class SearchParameter extends MetadataResource {
075
076    public enum XPathUsageType {
077        /**
078         * The search parameter is derived directly from the selected nodes based on the type definitions.
079         */
080        NORMAL, 
081        /**
082         * The search parameter is derived by a phonetic transform from the selected nodes.
083         */
084        PHONETIC, 
085        /**
086         * The search parameter is based on a spatial transform of the selected nodes.
087         */
088        NEARBY, 
089        /**
090         * The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle.
091         */
092        DISTANCE, 
093        /**
094         * The interpretation of the xpath statement is unknown (and can't be automated).
095         */
096        OTHER, 
097        /**
098         * added to help the parsers with the generic types
099         */
100        NULL;
101        public static XPathUsageType fromCode(String codeString) throws FHIRException {
102            if (codeString == null || "".equals(codeString))
103                return null;
104        if ("normal".equals(codeString))
105          return NORMAL;
106        if ("phonetic".equals(codeString))
107          return PHONETIC;
108        if ("nearby".equals(codeString))
109          return NEARBY;
110        if ("distance".equals(codeString))
111          return DISTANCE;
112        if ("other".equals(codeString))
113          return OTHER;
114        if (Configuration.isAcceptInvalidEnums())
115          return null;
116        else
117          throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'");
118        }
119        public String toCode() {
120          switch (this) {
121            case NORMAL: return "normal";
122            case PHONETIC: return "phonetic";
123            case NEARBY: return "nearby";
124            case DISTANCE: return "distance";
125            case OTHER: return "other";
126            default: return "?";
127          }
128        }
129        public String getSystem() {
130          switch (this) {
131            case NORMAL: return "http://hl7.org/fhir/search-xpath-usage";
132            case PHONETIC: return "http://hl7.org/fhir/search-xpath-usage";
133            case NEARBY: return "http://hl7.org/fhir/search-xpath-usage";
134            case DISTANCE: return "http://hl7.org/fhir/search-xpath-usage";
135            case OTHER: return "http://hl7.org/fhir/search-xpath-usage";
136            default: return "?";
137          }
138        }
139        public String getDefinition() {
140          switch (this) {
141            case NORMAL: return "The search parameter is derived directly from the selected nodes based on the type definitions.";
142            case PHONETIC: return "The search parameter is derived by a phonetic transform from the selected nodes.";
143            case NEARBY: return "The search parameter is based on a spatial transform of the selected nodes.";
144            case DISTANCE: return "The search parameter is based on a spatial transform of the selected nodes, using physical distance from the middle.";
145            case OTHER: return "The interpretation of the xpath statement is unknown (and can't be automated).";
146            default: return "?";
147          }
148        }
149        public String getDisplay() {
150          switch (this) {
151            case NORMAL: return "Normal";
152            case PHONETIC: return "Phonetic";
153            case NEARBY: return "Nearby";
154            case DISTANCE: return "Distance";
155            case OTHER: return "Other";
156            default: return "?";
157          }
158        }
159    }
160
161  public static class XPathUsageTypeEnumFactory implements EnumFactory<XPathUsageType> {
162    public XPathUsageType fromCode(String codeString) throws IllegalArgumentException {
163      if (codeString == null || "".equals(codeString))
164            if (codeString == null || "".equals(codeString))
165                return null;
166        if ("normal".equals(codeString))
167          return XPathUsageType.NORMAL;
168        if ("phonetic".equals(codeString))
169          return XPathUsageType.PHONETIC;
170        if ("nearby".equals(codeString))
171          return XPathUsageType.NEARBY;
172        if ("distance".equals(codeString))
173          return XPathUsageType.DISTANCE;
174        if ("other".equals(codeString))
175          return XPathUsageType.OTHER;
176        throw new IllegalArgumentException("Unknown XPathUsageType code '"+codeString+"'");
177        }
178        public Enumeration<XPathUsageType> fromType(Base code) throws FHIRException {
179          if (code == null)
180            return null;
181          if (code.isEmpty())
182            return new Enumeration<XPathUsageType>(this);
183          String codeString = ((PrimitiveType) code).asStringValue();
184          if (codeString == null || "".equals(codeString))
185            return null;
186        if ("normal".equals(codeString))
187          return new Enumeration<XPathUsageType>(this, XPathUsageType.NORMAL);
188        if ("phonetic".equals(codeString))
189          return new Enumeration<XPathUsageType>(this, XPathUsageType.PHONETIC);
190        if ("nearby".equals(codeString))
191          return new Enumeration<XPathUsageType>(this, XPathUsageType.NEARBY);
192        if ("distance".equals(codeString))
193          return new Enumeration<XPathUsageType>(this, XPathUsageType.DISTANCE);
194        if ("other".equals(codeString))
195          return new Enumeration<XPathUsageType>(this, XPathUsageType.OTHER);
196        throw new FHIRException("Unknown XPathUsageType code '"+codeString+"'");
197        }
198    public String toCode(XPathUsageType code) {
199      if (code == XPathUsageType.NORMAL)
200        return "normal";
201      if (code == XPathUsageType.PHONETIC)
202        return "phonetic";
203      if (code == XPathUsageType.NEARBY)
204        return "nearby";
205      if (code == XPathUsageType.DISTANCE)
206        return "distance";
207      if (code == XPathUsageType.OTHER)
208        return "other";
209      return "?";
210      }
211    public String toSystem(XPathUsageType code) {
212      return code.getSystem();
213      }
214    }
215
216    public enum SearchComparator {
217        /**
218         * the value for the parameter in the resource is equal to the provided value.
219         */
220        EQ, 
221        /**
222         * the value for the parameter in the resource is not equal to the provided value.
223         */
224        NE, 
225        /**
226         * the value for the parameter in the resource is greater than the provided value.
227         */
228        GT, 
229        /**
230         * the value for the parameter in the resource is less than the provided value.
231         */
232        LT, 
233        /**
234         * the value for the parameter in the resource is greater or equal to the provided value.
235         */
236        GE, 
237        /**
238         * the value for the parameter in the resource is less or equal to the provided value.
239         */
240        LE, 
241        /**
242         * the value for the parameter in the resource starts after the provided value.
243         */
244        SA, 
245        /**
246         * the value for the parameter in the resource ends before the provided value.
247         */
248        EB, 
249        /**
250         * the value for the parameter in the resource is approximately the same to the provided value.
251         */
252        AP, 
253        /**
254         * added to help the parsers with the generic types
255         */
256        NULL;
257        public static SearchComparator fromCode(String codeString) throws FHIRException {
258            if (codeString == null || "".equals(codeString))
259                return null;
260        if ("eq".equals(codeString))
261          return EQ;
262        if ("ne".equals(codeString))
263          return NE;
264        if ("gt".equals(codeString))
265          return GT;
266        if ("lt".equals(codeString))
267          return LT;
268        if ("ge".equals(codeString))
269          return GE;
270        if ("le".equals(codeString))
271          return LE;
272        if ("sa".equals(codeString))
273          return SA;
274        if ("eb".equals(codeString))
275          return EB;
276        if ("ap".equals(codeString))
277          return AP;
278        if (Configuration.isAcceptInvalidEnums())
279          return null;
280        else
281          throw new FHIRException("Unknown SearchComparator code '"+codeString+"'");
282        }
283        public String toCode() {
284          switch (this) {
285            case EQ: return "eq";
286            case NE: return "ne";
287            case GT: return "gt";
288            case LT: return "lt";
289            case GE: return "ge";
290            case LE: return "le";
291            case SA: return "sa";
292            case EB: return "eb";
293            case AP: return "ap";
294            default: return "?";
295          }
296        }
297        public String getSystem() {
298          switch (this) {
299            case EQ: return "http://hl7.org/fhir/search-comparator";
300            case NE: return "http://hl7.org/fhir/search-comparator";
301            case GT: return "http://hl7.org/fhir/search-comparator";
302            case LT: return "http://hl7.org/fhir/search-comparator";
303            case GE: return "http://hl7.org/fhir/search-comparator";
304            case LE: return "http://hl7.org/fhir/search-comparator";
305            case SA: return "http://hl7.org/fhir/search-comparator";
306            case EB: return "http://hl7.org/fhir/search-comparator";
307            case AP: return "http://hl7.org/fhir/search-comparator";
308            default: return "?";
309          }
310        }
311        public String getDefinition() {
312          switch (this) {
313            case EQ: return "the value for the parameter in the resource is equal to the provided value.";
314            case NE: return "the value for the parameter in the resource is not equal to the provided value.";
315            case GT: return "the value for the parameter in the resource is greater than the provided value.";
316            case LT: return "the value for the parameter in the resource is less than the provided value.";
317            case GE: return "the value for the parameter in the resource is greater or equal to the provided value.";
318            case LE: return "the value for the parameter in the resource is less or equal to the provided value.";
319            case SA: return "the value for the parameter in the resource starts after the provided value.";
320            case EB: return "the value for the parameter in the resource ends before the provided value.";
321            case AP: return "the value for the parameter in the resource is approximately the same to the provided value.";
322            default: return "?";
323          }
324        }
325        public String getDisplay() {
326          switch (this) {
327            case EQ: return "Equals";
328            case NE: return "Not Equals";
329            case GT: return "Greater Than";
330            case LT: return "Less Than";
331            case GE: return "Greater or Equals";
332            case LE: return "Less of Equal";
333            case SA: return "Starts After";
334            case EB: return "Ends Before";
335            case AP: return "Approximately";
336            default: return "?";
337          }
338        }
339    }
340
341  public static class SearchComparatorEnumFactory implements EnumFactory<SearchComparator> {
342    public SearchComparator fromCode(String codeString) throws IllegalArgumentException {
343      if (codeString == null || "".equals(codeString))
344            if (codeString == null || "".equals(codeString))
345                return null;
346        if ("eq".equals(codeString))
347          return SearchComparator.EQ;
348        if ("ne".equals(codeString))
349          return SearchComparator.NE;
350        if ("gt".equals(codeString))
351          return SearchComparator.GT;
352        if ("lt".equals(codeString))
353          return SearchComparator.LT;
354        if ("ge".equals(codeString))
355          return SearchComparator.GE;
356        if ("le".equals(codeString))
357          return SearchComparator.LE;
358        if ("sa".equals(codeString))
359          return SearchComparator.SA;
360        if ("eb".equals(codeString))
361          return SearchComparator.EB;
362        if ("ap".equals(codeString))
363          return SearchComparator.AP;
364        throw new IllegalArgumentException("Unknown SearchComparator code '"+codeString+"'");
365        }
366        public Enumeration<SearchComparator> fromType(Base code) throws FHIRException {
367          if (code == null)
368            return null;
369          if (code.isEmpty())
370            return new Enumeration<SearchComparator>(this);
371          String codeString = ((PrimitiveType) code).asStringValue();
372          if (codeString == null || "".equals(codeString))
373            return null;
374        if ("eq".equals(codeString))
375          return new Enumeration<SearchComparator>(this, SearchComparator.EQ);
376        if ("ne".equals(codeString))
377          return new Enumeration<SearchComparator>(this, SearchComparator.NE);
378        if ("gt".equals(codeString))
379          return new Enumeration<SearchComparator>(this, SearchComparator.GT);
380        if ("lt".equals(codeString))
381          return new Enumeration<SearchComparator>(this, SearchComparator.LT);
382        if ("ge".equals(codeString))
383          return new Enumeration<SearchComparator>(this, SearchComparator.GE);
384        if ("le".equals(codeString))
385          return new Enumeration<SearchComparator>(this, SearchComparator.LE);
386        if ("sa".equals(codeString))
387          return new Enumeration<SearchComparator>(this, SearchComparator.SA);
388        if ("eb".equals(codeString))
389          return new Enumeration<SearchComparator>(this, SearchComparator.EB);
390        if ("ap".equals(codeString))
391          return new Enumeration<SearchComparator>(this, SearchComparator.AP);
392        throw new FHIRException("Unknown SearchComparator code '"+codeString+"'");
393        }
394    public String toCode(SearchComparator code) {
395      if (code == SearchComparator.EQ)
396        return "eq";
397      if (code == SearchComparator.NE)
398        return "ne";
399      if (code == SearchComparator.GT)
400        return "gt";
401      if (code == SearchComparator.LT)
402        return "lt";
403      if (code == SearchComparator.GE)
404        return "ge";
405      if (code == SearchComparator.LE)
406        return "le";
407      if (code == SearchComparator.SA)
408        return "sa";
409      if (code == SearchComparator.EB)
410        return "eb";
411      if (code == SearchComparator.AP)
412        return "ap";
413      return "?";
414      }
415    public String toSystem(SearchComparator code) {
416      return code.getSystem();
417      }
418    }
419
420    public enum SearchModifierCode {
421        /**
422         * The search parameter returns resources that have a value or not.
423         */
424        MISSING, 
425        /**
426         * The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents).
427         */
428        EXACT, 
429        /**
430         * The search parameter returns resources that include the supplied parameter value anywhere within the field being searched.
431         */
432        CONTAINS, 
433        /**
434         * The search parameter returns resources that do not contain a match.
435         */
436        NOT, 
437        /**
438         * The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text.
439         */
440        TEXT, 
441        /**
442         * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set.
443         */
444        IN, 
445        /**
446         * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set.
447         */
448        NOTIN, 
449        /**
450         * The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships).
451         */
452        BELOW, 
453        /**
454         * The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships).
455         */
456        ABOVE, 
457        /**
458         * The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.).
459         */
460        TYPE, 
461        /**
462         * The search parameter applies to the identifier on the resource, not the reference.
463         */
464        IDENTIFIER, 
465        /**
466         * The search parameter has the format system|code|value, where the system and code refer to an Identifier.type.coding.system and .code, and match if any of the type codes match. All 3 parts must be present.
467         */
468        OFTYPE, 
469        /**
470         * added to help the parsers with the generic types
471         */
472        NULL;
473        public static SearchModifierCode fromCode(String codeString) throws FHIRException {
474            if (codeString == null || "".equals(codeString))
475                return null;
476        if ("missing".equals(codeString))
477          return MISSING;
478        if ("exact".equals(codeString))
479          return EXACT;
480        if ("contains".equals(codeString))
481          return CONTAINS;
482        if ("not".equals(codeString))
483          return NOT;
484        if ("text".equals(codeString))
485          return TEXT;
486        if ("in".equals(codeString))
487          return IN;
488        if ("not-in".equals(codeString))
489          return NOTIN;
490        if ("below".equals(codeString))
491          return BELOW;
492        if ("above".equals(codeString))
493          return ABOVE;
494        if ("type".equals(codeString))
495          return TYPE;
496        if ("identifier".equals(codeString))
497          return IDENTIFIER;
498        if ("ofType".equals(codeString))
499          return OFTYPE;
500        if (Configuration.isAcceptInvalidEnums())
501          return null;
502        else
503          throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'");
504        }
505        public String toCode() {
506          switch (this) {
507            case MISSING: return "missing";
508            case EXACT: return "exact";
509            case CONTAINS: return "contains";
510            case NOT: return "not";
511            case TEXT: return "text";
512            case IN: return "in";
513            case NOTIN: return "not-in";
514            case BELOW: return "below";
515            case ABOVE: return "above";
516            case TYPE: return "type";
517            case IDENTIFIER: return "identifier";
518            case OFTYPE: return "ofType";
519            default: return "?";
520          }
521        }
522        public String getSystem() {
523          switch (this) {
524            case MISSING: return "http://hl7.org/fhir/search-modifier-code";
525            case EXACT: return "http://hl7.org/fhir/search-modifier-code";
526            case CONTAINS: return "http://hl7.org/fhir/search-modifier-code";
527            case NOT: return "http://hl7.org/fhir/search-modifier-code";
528            case TEXT: return "http://hl7.org/fhir/search-modifier-code";
529            case IN: return "http://hl7.org/fhir/search-modifier-code";
530            case NOTIN: return "http://hl7.org/fhir/search-modifier-code";
531            case BELOW: return "http://hl7.org/fhir/search-modifier-code";
532            case ABOVE: return "http://hl7.org/fhir/search-modifier-code";
533            case TYPE: return "http://hl7.org/fhir/search-modifier-code";
534            case IDENTIFIER: return "http://hl7.org/fhir/search-modifier-code";
535            case OFTYPE: return "http://hl7.org/fhir/search-modifier-code";
536            default: return "?";
537          }
538        }
539        public String getDefinition() {
540          switch (this) {
541            case MISSING: return "The search parameter returns resources that have a value or not.";
542            case EXACT: return "The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents).";
543            case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched.";
544            case NOT: return "The search parameter returns resources that do not contain a match.";
545            case TEXT: return "The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text.";
546            case IN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set.";
547            case NOTIN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set.";
548            case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships).";
549            case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships).";
550            case TYPE: return "The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.).";
551            case IDENTIFIER: return "The search parameter applies to the identifier on the resource, not the reference.";
552            case OFTYPE: return "The search parameter has the format system|code|value, where the system and code refer to an Identifier.type.coding.system and .code, and match if any of the type codes match. All 3 parts must be present.";
553            default: return "?";
554          }
555        }
556        public String getDisplay() {
557          switch (this) {
558            case MISSING: return "Missing";
559            case EXACT: return "Exact";
560            case CONTAINS: return "Contains";
561            case NOT: return "Not";
562            case TEXT: return "Text";
563            case IN: return "In";
564            case NOTIN: return "Not In";
565            case BELOW: return "Below";
566            case ABOVE: return "Above";
567            case TYPE: return "Type";
568            case IDENTIFIER: return "Identifier";
569            case OFTYPE: return "Of Type";
570            default: return "?";
571          }
572        }
573    }
574
575  public static class SearchModifierCodeEnumFactory implements EnumFactory<SearchModifierCode> {
576    public SearchModifierCode fromCode(String codeString) throws IllegalArgumentException {
577      if (codeString == null || "".equals(codeString))
578            if (codeString == null || "".equals(codeString))
579                return null;
580        if ("missing".equals(codeString))
581          return SearchModifierCode.MISSING;
582        if ("exact".equals(codeString))
583          return SearchModifierCode.EXACT;
584        if ("contains".equals(codeString))
585          return SearchModifierCode.CONTAINS;
586        if ("not".equals(codeString))
587          return SearchModifierCode.NOT;
588        if ("text".equals(codeString))
589          return SearchModifierCode.TEXT;
590        if ("in".equals(codeString))
591          return SearchModifierCode.IN;
592        if ("not-in".equals(codeString))
593          return SearchModifierCode.NOTIN;
594        if ("below".equals(codeString))
595          return SearchModifierCode.BELOW;
596        if ("above".equals(codeString))
597          return SearchModifierCode.ABOVE;
598        if ("type".equals(codeString))
599          return SearchModifierCode.TYPE;
600        if ("identifier".equals(codeString))
601          return SearchModifierCode.IDENTIFIER;
602        if ("ofType".equals(codeString))
603          return SearchModifierCode.OFTYPE;
604        throw new IllegalArgumentException("Unknown SearchModifierCode code '"+codeString+"'");
605        }
606        public Enumeration<SearchModifierCode> fromType(Base code) throws FHIRException {
607          if (code == null)
608            return null;
609          if (code.isEmpty())
610            return new Enumeration<SearchModifierCode>(this);
611          String codeString = ((PrimitiveType) code).asStringValue();
612          if (codeString == null || "".equals(codeString))
613            return null;
614        if ("missing".equals(codeString))
615          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.MISSING);
616        if ("exact".equals(codeString))
617          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.EXACT);
618        if ("contains".equals(codeString))
619          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.CONTAINS);
620        if ("not".equals(codeString))
621          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.NOT);
622        if ("text".equals(codeString))
623          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.TEXT);
624        if ("in".equals(codeString))
625          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.IN);
626        if ("not-in".equals(codeString))
627          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.NOTIN);
628        if ("below".equals(codeString))
629          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.BELOW);
630        if ("above".equals(codeString))
631          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.ABOVE);
632        if ("type".equals(codeString))
633          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.TYPE);
634        if ("identifier".equals(codeString))
635          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.IDENTIFIER);
636        if ("ofType".equals(codeString))
637          return new Enumeration<SearchModifierCode>(this, SearchModifierCode.OFTYPE);
638        throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'");
639        }
640    public String toCode(SearchModifierCode code) {
641      if (code == SearchModifierCode.MISSING)
642        return "missing";
643      if (code == SearchModifierCode.EXACT)
644        return "exact";
645      if (code == SearchModifierCode.CONTAINS)
646        return "contains";
647      if (code == SearchModifierCode.NOT)
648        return "not";
649      if (code == SearchModifierCode.TEXT)
650        return "text";
651      if (code == SearchModifierCode.IN)
652        return "in";
653      if (code == SearchModifierCode.NOTIN)
654        return "not-in";
655      if (code == SearchModifierCode.BELOW)
656        return "below";
657      if (code == SearchModifierCode.ABOVE)
658        return "above";
659      if (code == SearchModifierCode.TYPE)
660        return "type";
661      if (code == SearchModifierCode.IDENTIFIER)
662        return "identifier";
663      if (code == SearchModifierCode.OFTYPE)
664        return "ofType";
665      return "?";
666      }
667    public String toSystem(SearchModifierCode code) {
668      return code.getSystem();
669      }
670    }
671
672    @Block()
673    public static class SearchParameterComponentComponent extends BackboneElement implements IBaseBackboneElement {
674        /**
675         * The definition of the search parameter that describes this part.
676         */
677        @Child(name = "definition", type = {CanonicalType.class}, order=1, min=1, max=1, modifier=false, summary=false)
678        @Description(shortDefinition="Defines how the part works", formalDefinition="The definition of the search parameter that describes this part." )
679        protected CanonicalType definition;
680
681        /**
682         * A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.
683         */
684        @Child(name = "expression", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
685        @Description(shortDefinition="Subexpression relative to main expression", formalDefinition="A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression." )
686        protected StringType expression;
687
688        private static final long serialVersionUID = -1469435618L;
689
690    /**
691     * Constructor
692     */
693      public SearchParameterComponentComponent() {
694        super();
695      }
696
697    /**
698     * Constructor
699     */
700      public SearchParameterComponentComponent(CanonicalType definition, StringType expression) {
701        super();
702        this.definition = definition;
703        this.expression = expression;
704      }
705
706        /**
707         * @return {@link #definition} (The definition of the search parameter that describes this part.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
708         */
709        public CanonicalType getDefinitionElement() { 
710          if (this.definition == null)
711            if (Configuration.errorOnAutoCreate())
712              throw new Error("Attempt to auto-create SearchParameterComponentComponent.definition");
713            else if (Configuration.doAutoCreate())
714              this.definition = new CanonicalType(); // bb
715          return this.definition;
716        }
717
718        public boolean hasDefinitionElement() { 
719          return this.definition != null && !this.definition.isEmpty();
720        }
721
722        public boolean hasDefinition() { 
723          return this.definition != null && !this.definition.isEmpty();
724        }
725
726        /**
727         * @param value {@link #definition} (The definition of the search parameter that describes this part.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
728         */
729        public SearchParameterComponentComponent setDefinitionElement(CanonicalType value) { 
730          this.definition = value;
731          return this;
732        }
733
734        /**
735         * @return The definition of the search parameter that describes this part.
736         */
737        public String getDefinition() { 
738          return this.definition == null ? null : this.definition.getValue();
739        }
740
741        /**
742         * @param value The definition of the search parameter that describes this part.
743         */
744        public SearchParameterComponentComponent setDefinition(String value) { 
745            if (this.definition == null)
746              this.definition = new CanonicalType();
747            this.definition.setValue(value);
748          return this;
749        }
750
751        /**
752         * @return {@link #expression} (A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
753         */
754        public StringType getExpressionElement() { 
755          if (this.expression == null)
756            if (Configuration.errorOnAutoCreate())
757              throw new Error("Attempt to auto-create SearchParameterComponentComponent.expression");
758            else if (Configuration.doAutoCreate())
759              this.expression = new StringType(); // bb
760          return this.expression;
761        }
762
763        public boolean hasExpressionElement() { 
764          return this.expression != null && !this.expression.isEmpty();
765        }
766
767        public boolean hasExpression() { 
768          return this.expression != null && !this.expression.isEmpty();
769        }
770
771        /**
772         * @param value {@link #expression} (A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
773         */
774        public SearchParameterComponentComponent setExpressionElement(StringType value) { 
775          this.expression = value;
776          return this;
777        }
778
779        /**
780         * @return A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.
781         */
782        public String getExpression() { 
783          return this.expression == null ? null : this.expression.getValue();
784        }
785
786        /**
787         * @param value A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.
788         */
789        public SearchParameterComponentComponent setExpression(String value) { 
790            if (this.expression == null)
791              this.expression = new StringType();
792            this.expression.setValue(value);
793          return this;
794        }
795
796        protected void listChildren(List<Property> children) {
797          super.listChildren(children);
798          children.add(new Property("definition", "canonical(SearchParameter)", "The definition of the search parameter that describes this part.", 0, 1, definition));
799          children.add(new Property("expression", "string", "A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.", 0, 1, expression));
800        }
801
802        @Override
803        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
804          switch (_hash) {
805          case -1014418093: /*definition*/  return new Property("definition", "canonical(SearchParameter)", "The definition of the search parameter that describes this part.", 0, 1, definition);
806          case -1795452264: /*expression*/  return new Property("expression", "string", "A sub-expression that defines how to extract values for this component from the output of the main SearchParameter.expression.", 0, 1, expression);
807          default: return super.getNamedProperty(_hash, _name, _checkValid);
808          }
809
810        }
811
812      @Override
813      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
814        switch (hash) {
815        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // CanonicalType
816        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
817        default: return super.getProperty(hash, name, checkValid);
818        }
819
820      }
821
822      @Override
823      public Base setProperty(int hash, String name, Base value) throws FHIRException {
824        switch (hash) {
825        case -1014418093: // definition
826          this.definition = castToCanonical(value); // CanonicalType
827          return value;
828        case -1795452264: // expression
829          this.expression = castToString(value); // StringType
830          return value;
831        default: return super.setProperty(hash, name, value);
832        }
833
834      }
835
836      @Override
837      public Base setProperty(String name, Base value) throws FHIRException {
838        if (name.equals("definition")) {
839          this.definition = castToCanonical(value); // CanonicalType
840        } else if (name.equals("expression")) {
841          this.expression = castToString(value); // StringType
842        } else
843          return super.setProperty(name, value);
844        return value;
845      }
846
847      @Override
848      public Base makeProperty(int hash, String name) throws FHIRException {
849        switch (hash) {
850        case -1014418093:  return getDefinitionElement();
851        case -1795452264:  return getExpressionElement();
852        default: return super.makeProperty(hash, name);
853        }
854
855      }
856
857      @Override
858      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
859        switch (hash) {
860        case -1014418093: /*definition*/ return new String[] {"canonical"};
861        case -1795452264: /*expression*/ return new String[] {"string"};
862        default: return super.getTypesForProperty(hash, name);
863        }
864
865      }
866
867      @Override
868      public Base addChild(String name) throws FHIRException {
869        if (name.equals("definition")) {
870          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.definition");
871        }
872        else if (name.equals("expression")) {
873          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.expression");
874        }
875        else
876          return super.addChild(name);
877      }
878
879      public SearchParameterComponentComponent copy() {
880        SearchParameterComponentComponent dst = new SearchParameterComponentComponent();
881        copyValues(dst);
882        return dst;
883      }
884
885      public void copyValues(SearchParameterComponentComponent dst) {
886        super.copyValues(dst);
887        dst.definition = definition == null ? null : definition.copy();
888        dst.expression = expression == null ? null : expression.copy();
889      }
890
891      @Override
892      public boolean equalsDeep(Base other_) {
893        if (!super.equalsDeep(other_))
894          return false;
895        if (!(other_ instanceof SearchParameterComponentComponent))
896          return false;
897        SearchParameterComponentComponent o = (SearchParameterComponentComponent) other_;
898        return compareDeep(definition, o.definition, true) && compareDeep(expression, o.expression, true)
899          ;
900      }
901
902      @Override
903      public boolean equalsShallow(Base other_) {
904        if (!super.equalsShallow(other_))
905          return false;
906        if (!(other_ instanceof SearchParameterComponentComponent))
907          return false;
908        SearchParameterComponentComponent o = (SearchParameterComponentComponent) other_;
909        return compareValues(expression, o.expression, true);
910      }
911
912      public boolean isEmpty() {
913        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(definition, expression);
914      }
915
916  public String fhirType() {
917    return "SearchParameter.component";
918
919  }
920
921  }
922
923    /**
924     * Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.
925     */
926    @Child(name = "derivedFrom", type = {CanonicalType.class}, order=0, min=0, max=1, modifier=false, summary=false)
927    @Description(shortDefinition="Original definition for the search parameter", formalDefinition="Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter." )
928    protected CanonicalType derivedFrom;
929
930    /**
931     * Explanation of why this search parameter is needed and why it has been designed as it has.
932     */
933    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
934    @Description(shortDefinition="Why this search parameter is defined", formalDefinition="Explanation of why this search parameter is needed and why it has been designed as it has." )
935    protected MarkdownType purpose;
936
937    /**
938     * The code used in the URL or the parameter name in a parameters resource for this search parameter.
939     */
940    @Child(name = "code", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
941    @Description(shortDefinition="Code used in URL", formalDefinition="The code used in the URL or the parameter name in a parameters resource for this search parameter." )
942    protected CodeType code;
943
944    /**
945     * The base resource type(s) that this search parameter can be used against.
946     */
947    @Child(name = "base", type = {CodeType.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
948    @Description(shortDefinition="The resource type(s) this search parameter applies to", formalDefinition="The base resource type(s) that this search parameter can be used against." )
949    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
950    protected List<CodeType> base;
951
952    /**
953     * The type of value that a search parameter may contain, and how the content is interpreted.
954     */
955    @Child(name = "type", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=true)
956    @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri | special", formalDefinition="The type of value that a search parameter may contain, and how the content is interpreted." )
957    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-param-type")
958    protected Enumeration<SearchParamType> type;
959
960    /**
961     * A FHIRPath expression that returns a set of elements for the search parameter.
962     */
963    @Child(name = "expression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
964    @Description(shortDefinition="FHIRPath expression that extracts the values", formalDefinition="A FHIRPath expression that returns a set of elements for the search parameter." )
965    protected StringType expression;
966
967    /**
968     * An XPath expression that returns a set of elements for the search parameter.
969     */
970    @Child(name = "xpath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
971    @Description(shortDefinition="XPath that extracts the values", formalDefinition="An XPath expression that returns a set of elements for the search parameter." )
972    protected StringType xpath;
973
974    /**
975     * How the search parameter relates to the set of elements returned by evaluating the xpath query.
976     */
977    @Child(name = "xpathUsage", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
978    @Description(shortDefinition="normal | phonetic | nearby | distance | other", formalDefinition="How the search parameter relates to the set of elements returned by evaluating the xpath query." )
979    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-xpath-usage")
980    protected Enumeration<XPathUsageType> xpathUsage;
981
982    /**
983     * Types of resource (if a resource is referenced).
984     */
985    @Child(name = "target", type = {CodeType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
986    @Description(shortDefinition="Types of resource (if a resource reference)", formalDefinition="Types of resource (if a resource is referenced)." )
987    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
988    protected List<CodeType> target;
989
990    /**
991     * Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.
992     */
993    @Child(name = "multipleOr", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false)
994    @Description(shortDefinition="Allow multiple values per parameter (or)", formalDefinition="Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match." )
995    protected BooleanType multipleOr;
996
997    /**
998     * Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.
999     */
1000    @Child(name = "multipleAnd", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=false)
1001    @Description(shortDefinition="Allow multiple parameters (and)", formalDefinition="Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match." )
1002    protected BooleanType multipleAnd;
1003
1004    /**
1005     * Comparators supported for the search parameter.
1006     */
1007    @Child(name = "comparator", type = {CodeType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1008    @Description(shortDefinition="eq | ne | gt | lt | ge | le | sa | eb | ap", formalDefinition="Comparators supported for the search parameter." )
1009    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-comparator")
1010    protected List<Enumeration<SearchComparator>> comparator;
1011
1012    /**
1013     * A modifier supported for the search parameter.
1014     */
1015    @Child(name = "modifier", type = {CodeType.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1016    @Description(shortDefinition="missing | exact | contains | not | text | in | not-in | below | above | type | identifier | ofType", formalDefinition="A modifier supported for the search parameter." )
1017    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-modifier-code")
1018    protected List<Enumeration<SearchModifierCode>> modifier;
1019
1020    /**
1021     * Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.
1022     */
1023    @Child(name = "chain", type = {StringType.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1024    @Description(shortDefinition="Chained names supported", formalDefinition="Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type." )
1025    protected List<StringType> chain;
1026
1027    /**
1028     * Used to define the parts of a composite search parameter.
1029     */
1030    @Child(name = "component", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1031    @Description(shortDefinition="For Composite resources to define the parts", formalDefinition="Used to define the parts of a composite search parameter." )
1032    protected List<SearchParameterComponentComponent> component;
1033
1034    private static final long serialVersionUID = -533803519L;
1035
1036  /**
1037   * Constructor
1038   */
1039    public SearchParameter() {
1040      super();
1041    }
1042
1043  /**
1044   * Constructor
1045   */
1046    public SearchParameter(UriType url, StringType name, Enumeration<PublicationStatus> status, MarkdownType description, CodeType code, Enumeration<SearchParamType> type) {
1047      super();
1048      this.url = url;
1049      this.name = name;
1050      this.status = status;
1051      this.description = description;
1052      this.code = code;
1053      this.type = type;
1054    }
1055
1056    /**
1057     * @return {@link #url} (An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1058     */
1059    public UriType getUrlElement() { 
1060      if (this.url == null)
1061        if (Configuration.errorOnAutoCreate())
1062          throw new Error("Attempt to auto-create SearchParameter.url");
1063        else if (Configuration.doAutoCreate())
1064          this.url = new UriType(); // bb
1065      return this.url;
1066    }
1067
1068    public boolean hasUrlElement() { 
1069      return this.url != null && !this.url.isEmpty();
1070    }
1071
1072    public boolean hasUrl() { 
1073      return this.url != null && !this.url.isEmpty();
1074    }
1075
1076    /**
1077     * @param value {@link #url} (An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1078     */
1079    public SearchParameter setUrlElement(UriType value) { 
1080      this.url = value;
1081      return this;
1082    }
1083
1084    /**
1085     * @return An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.
1086     */
1087    public String getUrl() { 
1088      return this.url == null ? null : this.url.getValue();
1089    }
1090
1091    /**
1092     * @param value An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.
1093     */
1094    public SearchParameter setUrl(String value) { 
1095        if (this.url == null)
1096          this.url = new UriType();
1097        this.url.setValue(value);
1098      return this;
1099    }
1100
1101    /**
1102     * @return {@link #version} (The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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
1103     */
1104    public StringType getVersionElement() { 
1105      if (this.version == null)
1106        if (Configuration.errorOnAutoCreate())
1107          throw new Error("Attempt to auto-create SearchParameter.version");
1108        else if (Configuration.doAutoCreate())
1109          this.version = new StringType(); // bb
1110      return this.version;
1111    }
1112
1113    public boolean hasVersionElement() { 
1114      return this.version != null && !this.version.isEmpty();
1115    }
1116
1117    public boolean hasVersion() { 
1118      return this.version != null && !this.version.isEmpty();
1119    }
1120
1121    /**
1122     * @param value {@link #version} (The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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
1123     */
1124    public SearchParameter setVersionElement(StringType value) { 
1125      this.version = value;
1126      return this;
1127    }
1128
1129    /**
1130     * @return The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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.
1131     */
1132    public String getVersion() { 
1133      return this.version == null ? null : this.version.getValue();
1134    }
1135
1136    /**
1137     * @param value The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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.
1138     */
1139    public SearchParameter setVersion(String value) { 
1140      if (Utilities.noString(value))
1141        this.version = null;
1142      else {
1143        if (this.version == null)
1144          this.version = new StringType();
1145        this.version.setValue(value);
1146      }
1147      return this;
1148    }
1149
1150    /**
1151     * @return {@link #name} (A natural language name identifying the search parameter. 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
1152     */
1153    public StringType getNameElement() { 
1154      if (this.name == null)
1155        if (Configuration.errorOnAutoCreate())
1156          throw new Error("Attempt to auto-create SearchParameter.name");
1157        else if (Configuration.doAutoCreate())
1158          this.name = new StringType(); // bb
1159      return this.name;
1160    }
1161
1162    public boolean hasNameElement() { 
1163      return this.name != null && !this.name.isEmpty();
1164    }
1165
1166    public boolean hasName() { 
1167      return this.name != null && !this.name.isEmpty();
1168    }
1169
1170    /**
1171     * @param value {@link #name} (A natural language name identifying the search parameter. 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
1172     */
1173    public SearchParameter setNameElement(StringType value) { 
1174      this.name = value;
1175      return this;
1176    }
1177
1178    /**
1179     * @return A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1180     */
1181    public String getName() { 
1182      return this.name == null ? null : this.name.getValue();
1183    }
1184
1185    /**
1186     * @param value A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1187     */
1188    public SearchParameter setName(String value) { 
1189        if (this.name == null)
1190          this.name = new StringType();
1191        this.name.setValue(value);
1192      return this;
1193    }
1194
1195    /**
1196     * @return {@link #derivedFrom} (Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.). This is the underlying object with id, value and extensions. The accessor "getDerivedFrom" gives direct access to the value
1197     */
1198    public CanonicalType getDerivedFromElement() { 
1199      if (this.derivedFrom == null)
1200        if (Configuration.errorOnAutoCreate())
1201          throw new Error("Attempt to auto-create SearchParameter.derivedFrom");
1202        else if (Configuration.doAutoCreate())
1203          this.derivedFrom = new CanonicalType(); // bb
1204      return this.derivedFrom;
1205    }
1206
1207    public boolean hasDerivedFromElement() { 
1208      return this.derivedFrom != null && !this.derivedFrom.isEmpty();
1209    }
1210
1211    public boolean hasDerivedFrom() { 
1212      return this.derivedFrom != null && !this.derivedFrom.isEmpty();
1213    }
1214
1215    /**
1216     * @param value {@link #derivedFrom} (Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.). This is the underlying object with id, value and extensions. The accessor "getDerivedFrom" gives direct access to the value
1217     */
1218    public SearchParameter setDerivedFromElement(CanonicalType value) { 
1219      this.derivedFrom = value;
1220      return this;
1221    }
1222
1223    /**
1224     * @return Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.
1225     */
1226    public String getDerivedFrom() { 
1227      return this.derivedFrom == null ? null : this.derivedFrom.getValue();
1228    }
1229
1230    /**
1231     * @param value Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.
1232     */
1233    public SearchParameter setDerivedFrom(String value) { 
1234      if (Utilities.noString(value))
1235        this.derivedFrom = null;
1236      else {
1237        if (this.derivedFrom == null)
1238          this.derivedFrom = new CanonicalType();
1239        this.derivedFrom.setValue(value);
1240      }
1241      return this;
1242    }
1243
1244    /**
1245     * @return {@link #status} (The status of this search parameter. 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
1246     */
1247    public Enumeration<PublicationStatus> getStatusElement() { 
1248      if (this.status == null)
1249        if (Configuration.errorOnAutoCreate())
1250          throw new Error("Attempt to auto-create SearchParameter.status");
1251        else if (Configuration.doAutoCreate())
1252          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
1253      return this.status;
1254    }
1255
1256    public boolean hasStatusElement() { 
1257      return this.status != null && !this.status.isEmpty();
1258    }
1259
1260    public boolean hasStatus() { 
1261      return this.status != null && !this.status.isEmpty();
1262    }
1263
1264    /**
1265     * @param value {@link #status} (The status of this search parameter. 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
1266     */
1267    public SearchParameter setStatusElement(Enumeration<PublicationStatus> value) { 
1268      this.status = value;
1269      return this;
1270    }
1271
1272    /**
1273     * @return The status of this search parameter. Enables tracking the life-cycle of the content.
1274     */
1275    public PublicationStatus getStatus() { 
1276      return this.status == null ? null : this.status.getValue();
1277    }
1278
1279    /**
1280     * @param value The status of this search parameter. Enables tracking the life-cycle of the content.
1281     */
1282    public SearchParameter setStatus(PublicationStatus value) { 
1283        if (this.status == null)
1284          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
1285        this.status.setValue(value);
1286      return this;
1287    }
1288
1289    /**
1290     * @return {@link #experimental} (A Boolean value to indicate that this search parameter 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
1291     */
1292    public BooleanType getExperimentalElement() { 
1293      if (this.experimental == null)
1294        if (Configuration.errorOnAutoCreate())
1295          throw new Error("Attempt to auto-create SearchParameter.experimental");
1296        else if (Configuration.doAutoCreate())
1297          this.experimental = new BooleanType(); // bb
1298      return this.experimental;
1299    }
1300
1301    public boolean hasExperimentalElement() { 
1302      return this.experimental != null && !this.experimental.isEmpty();
1303    }
1304
1305    public boolean hasExperimental() { 
1306      return this.experimental != null && !this.experimental.isEmpty();
1307    }
1308
1309    /**
1310     * @param value {@link #experimental} (A Boolean value to indicate that this search parameter 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
1311     */
1312    public SearchParameter setExperimentalElement(BooleanType value) { 
1313      this.experimental = value;
1314      return this;
1315    }
1316
1317    /**
1318     * @return A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
1319     */
1320    public boolean getExperimental() { 
1321      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
1322    }
1323
1324    /**
1325     * @param value A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
1326     */
1327    public SearchParameter setExperimental(boolean value) { 
1328        if (this.experimental == null)
1329          this.experimental = new BooleanType();
1330        this.experimental.setValue(value);
1331      return this;
1332    }
1333
1334    /**
1335     * @return {@link #date} (The date  (and optionally time) when the search parameter 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 search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1336     */
1337    public DateTimeType getDateElement() { 
1338      if (this.date == null)
1339        if (Configuration.errorOnAutoCreate())
1340          throw new Error("Attempt to auto-create SearchParameter.date");
1341        else if (Configuration.doAutoCreate())
1342          this.date = new DateTimeType(); // bb
1343      return this.date;
1344    }
1345
1346    public boolean hasDateElement() { 
1347      return this.date != null && !this.date.isEmpty();
1348    }
1349
1350    public boolean hasDate() { 
1351      return this.date != null && !this.date.isEmpty();
1352    }
1353
1354    /**
1355     * @param value {@link #date} (The date  (and optionally time) when the search parameter 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 search parameter changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1356     */
1357    public SearchParameter setDateElement(DateTimeType value) { 
1358      this.date = value;
1359      return this;
1360    }
1361
1362    /**
1363     * @return The date  (and optionally time) when the search parameter 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 search parameter changes.
1364     */
1365    public Date getDate() { 
1366      return this.date == null ? null : this.date.getValue();
1367    }
1368
1369    /**
1370     * @param value The date  (and optionally time) when the search parameter 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 search parameter changes.
1371     */
1372    public SearchParameter setDate(Date value) { 
1373      if (value == null)
1374        this.date = null;
1375      else {
1376        if (this.date == null)
1377          this.date = new DateTimeType();
1378        this.date.setValue(value);
1379      }
1380      return this;
1381    }
1382
1383    /**
1384     * @return {@link #publisher} (The name of the organization or individual that published the search parameter.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1385     */
1386    public StringType getPublisherElement() { 
1387      if (this.publisher == null)
1388        if (Configuration.errorOnAutoCreate())
1389          throw new Error("Attempt to auto-create SearchParameter.publisher");
1390        else if (Configuration.doAutoCreate())
1391          this.publisher = new StringType(); // bb
1392      return this.publisher;
1393    }
1394
1395    public boolean hasPublisherElement() { 
1396      return this.publisher != null && !this.publisher.isEmpty();
1397    }
1398
1399    public boolean hasPublisher() { 
1400      return this.publisher != null && !this.publisher.isEmpty();
1401    }
1402
1403    /**
1404     * @param value {@link #publisher} (The name of the organization or individual that published the search parameter.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1405     */
1406    public SearchParameter setPublisherElement(StringType value) { 
1407      this.publisher = value;
1408      return this;
1409    }
1410
1411    /**
1412     * @return The name of the organization or individual that published the search parameter.
1413     */
1414    public String getPublisher() { 
1415      return this.publisher == null ? null : this.publisher.getValue();
1416    }
1417
1418    /**
1419     * @param value The name of the organization or individual that published the search parameter.
1420     */
1421    public SearchParameter setPublisher(String value) { 
1422      if (Utilities.noString(value))
1423        this.publisher = null;
1424      else {
1425        if (this.publisher == null)
1426          this.publisher = new StringType();
1427        this.publisher.setValue(value);
1428      }
1429      return this;
1430    }
1431
1432    /**
1433     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
1434     */
1435    public List<ContactDetail> getContact() { 
1436      if (this.contact == null)
1437        this.contact = new ArrayList<ContactDetail>();
1438      return this.contact;
1439    }
1440
1441    /**
1442     * @return Returns a reference to <code>this</code> for easy method chaining
1443     */
1444    public SearchParameter setContact(List<ContactDetail> theContact) { 
1445      this.contact = theContact;
1446      return this;
1447    }
1448
1449    public boolean hasContact() { 
1450      if (this.contact == null)
1451        return false;
1452      for (ContactDetail item : this.contact)
1453        if (!item.isEmpty())
1454          return true;
1455      return false;
1456    }
1457
1458    public ContactDetail addContact() { //3
1459      ContactDetail t = new ContactDetail();
1460      if (this.contact == null)
1461        this.contact = new ArrayList<ContactDetail>();
1462      this.contact.add(t);
1463      return t;
1464    }
1465
1466    public SearchParameter addContact(ContactDetail t) { //3
1467      if (t == null)
1468        return this;
1469      if (this.contact == null)
1470        this.contact = new ArrayList<ContactDetail>();
1471      this.contact.add(t);
1472      return this;
1473    }
1474
1475    /**
1476     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
1477     */
1478    public ContactDetail getContactFirstRep() { 
1479      if (getContact().isEmpty()) {
1480        addContact();
1481      }
1482      return getContact().get(0);
1483    }
1484
1485    /**
1486     * @return {@link #description} (And how it used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1487     */
1488    public MarkdownType getDescriptionElement() { 
1489      if (this.description == null)
1490        if (Configuration.errorOnAutoCreate())
1491          throw new Error("Attempt to auto-create SearchParameter.description");
1492        else if (Configuration.doAutoCreate())
1493          this.description = new MarkdownType(); // bb
1494      return this.description;
1495    }
1496
1497    public boolean hasDescriptionElement() { 
1498      return this.description != null && !this.description.isEmpty();
1499    }
1500
1501    public boolean hasDescription() { 
1502      return this.description != null && !this.description.isEmpty();
1503    }
1504
1505    /**
1506     * @param value {@link #description} (And how it used.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1507     */
1508    public SearchParameter setDescriptionElement(MarkdownType value) { 
1509      this.description = value;
1510      return this;
1511    }
1512
1513    /**
1514     * @return And how it used.
1515     */
1516    public String getDescription() { 
1517      return this.description == null ? null : this.description.getValue();
1518    }
1519
1520    /**
1521     * @param value And how it used.
1522     */
1523    public SearchParameter setDescription(String value) { 
1524        if (this.description == null)
1525          this.description = new MarkdownType();
1526        this.description.setValue(value);
1527      return this;
1528    }
1529
1530    /**
1531     * @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 search parameter instances.)
1532     */
1533    public List<UsageContext> getUseContext() { 
1534      if (this.useContext == null)
1535        this.useContext = new ArrayList<UsageContext>();
1536      return this.useContext;
1537    }
1538
1539    /**
1540     * @return Returns a reference to <code>this</code> for easy method chaining
1541     */
1542    public SearchParameter setUseContext(List<UsageContext> theUseContext) { 
1543      this.useContext = theUseContext;
1544      return this;
1545    }
1546
1547    public boolean hasUseContext() { 
1548      if (this.useContext == null)
1549        return false;
1550      for (UsageContext item : this.useContext)
1551        if (!item.isEmpty())
1552          return true;
1553      return false;
1554    }
1555
1556    public UsageContext addUseContext() { //3
1557      UsageContext t = new UsageContext();
1558      if (this.useContext == null)
1559        this.useContext = new ArrayList<UsageContext>();
1560      this.useContext.add(t);
1561      return t;
1562    }
1563
1564    public SearchParameter addUseContext(UsageContext t) { //3
1565      if (t == null)
1566        return this;
1567      if (this.useContext == null)
1568        this.useContext = new ArrayList<UsageContext>();
1569      this.useContext.add(t);
1570      return this;
1571    }
1572
1573    /**
1574     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
1575     */
1576    public UsageContext getUseContextFirstRep() { 
1577      if (getUseContext().isEmpty()) {
1578        addUseContext();
1579      }
1580      return getUseContext().get(0);
1581    }
1582
1583    /**
1584     * @return {@link #jurisdiction} (A legal or geographic region in which the search parameter is intended to be used.)
1585     */
1586    public List<CodeableConcept> getJurisdiction() { 
1587      if (this.jurisdiction == null)
1588        this.jurisdiction = new ArrayList<CodeableConcept>();
1589      return this.jurisdiction;
1590    }
1591
1592    /**
1593     * @return Returns a reference to <code>this</code> for easy method chaining
1594     */
1595    public SearchParameter setJurisdiction(List<CodeableConcept> theJurisdiction) { 
1596      this.jurisdiction = theJurisdiction;
1597      return this;
1598    }
1599
1600    public boolean hasJurisdiction() { 
1601      if (this.jurisdiction == null)
1602        return false;
1603      for (CodeableConcept item : this.jurisdiction)
1604        if (!item.isEmpty())
1605          return true;
1606      return false;
1607    }
1608
1609    public CodeableConcept addJurisdiction() { //3
1610      CodeableConcept t = new CodeableConcept();
1611      if (this.jurisdiction == null)
1612        this.jurisdiction = new ArrayList<CodeableConcept>();
1613      this.jurisdiction.add(t);
1614      return t;
1615    }
1616
1617    public SearchParameter addJurisdiction(CodeableConcept t) { //3
1618      if (t == null)
1619        return this;
1620      if (this.jurisdiction == null)
1621        this.jurisdiction = new ArrayList<CodeableConcept>();
1622      this.jurisdiction.add(t);
1623      return this;
1624    }
1625
1626    /**
1627     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
1628     */
1629    public CodeableConcept getJurisdictionFirstRep() { 
1630      if (getJurisdiction().isEmpty()) {
1631        addJurisdiction();
1632      }
1633      return getJurisdiction().get(0);
1634    }
1635
1636    /**
1637     * @return {@link #purpose} (Explanation of why this search parameter 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
1638     */
1639    public MarkdownType getPurposeElement() { 
1640      if (this.purpose == null)
1641        if (Configuration.errorOnAutoCreate())
1642          throw new Error("Attempt to auto-create SearchParameter.purpose");
1643        else if (Configuration.doAutoCreate())
1644          this.purpose = new MarkdownType(); // bb
1645      return this.purpose;
1646    }
1647
1648    public boolean hasPurposeElement() { 
1649      return this.purpose != null && !this.purpose.isEmpty();
1650    }
1651
1652    public boolean hasPurpose() { 
1653      return this.purpose != null && !this.purpose.isEmpty();
1654    }
1655
1656    /**
1657     * @param value {@link #purpose} (Explanation of why this search parameter 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
1658     */
1659    public SearchParameter setPurposeElement(MarkdownType value) { 
1660      this.purpose = value;
1661      return this;
1662    }
1663
1664    /**
1665     * @return Explanation of why this search parameter is needed and why it has been designed as it has.
1666     */
1667    public String getPurpose() { 
1668      return this.purpose == null ? null : this.purpose.getValue();
1669    }
1670
1671    /**
1672     * @param value Explanation of why this search parameter is needed and why it has been designed as it has.
1673     */
1674    public SearchParameter setPurpose(String value) { 
1675      if (value == null)
1676        this.purpose = null;
1677      else {
1678        if (this.purpose == null)
1679          this.purpose = new MarkdownType();
1680        this.purpose.setValue(value);
1681      }
1682      return this;
1683    }
1684
1685    /**
1686     * @return {@link #code} (The code used in the URL or the parameter name in a parameters resource for this search parameter.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1687     */
1688    public CodeType getCodeElement() { 
1689      if (this.code == null)
1690        if (Configuration.errorOnAutoCreate())
1691          throw new Error("Attempt to auto-create SearchParameter.code");
1692        else if (Configuration.doAutoCreate())
1693          this.code = new CodeType(); // bb
1694      return this.code;
1695    }
1696
1697    public boolean hasCodeElement() { 
1698      return this.code != null && !this.code.isEmpty();
1699    }
1700
1701    public boolean hasCode() { 
1702      return this.code != null && !this.code.isEmpty();
1703    }
1704
1705    /**
1706     * @param value {@link #code} (The code used in the URL or the parameter name in a parameters resource for this search parameter.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1707     */
1708    public SearchParameter setCodeElement(CodeType value) { 
1709      this.code = value;
1710      return this;
1711    }
1712
1713    /**
1714     * @return The code used in the URL or the parameter name in a parameters resource for this search parameter.
1715     */
1716    public String getCode() { 
1717      return this.code == null ? null : this.code.getValue();
1718    }
1719
1720    /**
1721     * @param value The code used in the URL or the parameter name in a parameters resource for this search parameter.
1722     */
1723    public SearchParameter setCode(String value) { 
1724        if (this.code == null)
1725          this.code = new CodeType();
1726        this.code.setValue(value);
1727      return this;
1728    }
1729
1730    /**
1731     * @return {@link #base} (The base resource type(s) that this search parameter can be used against.)
1732     */
1733    public List<CodeType> getBase() { 
1734      if (this.base == null)
1735        this.base = new ArrayList<CodeType>();
1736      return this.base;
1737    }
1738
1739    /**
1740     * @return Returns a reference to <code>this</code> for easy method chaining
1741     */
1742    public SearchParameter setBase(List<CodeType> theBase) { 
1743      this.base = theBase;
1744      return this;
1745    }
1746
1747    public boolean hasBase() { 
1748      if (this.base == null)
1749        return false;
1750      for (CodeType item : this.base)
1751        if (!item.isEmpty())
1752          return true;
1753      return false;
1754    }
1755
1756    /**
1757     * @return {@link #base} (The base resource type(s) that this search parameter can be used against.)
1758     */
1759    public CodeType addBaseElement() {//2 
1760      CodeType t = new CodeType();
1761      if (this.base == null)
1762        this.base = new ArrayList<CodeType>();
1763      this.base.add(t);
1764      return t;
1765    }
1766
1767    /**
1768     * @param value {@link #base} (The base resource type(s) that this search parameter can be used against.)
1769     */
1770    public SearchParameter addBase(String value) { //1
1771      CodeType t = new CodeType();
1772      t.setValue(value);
1773      if (this.base == null)
1774        this.base = new ArrayList<CodeType>();
1775      this.base.add(t);
1776      return this;
1777    }
1778
1779    /**
1780     * @param value {@link #base} (The base resource type(s) that this search parameter can be used against.)
1781     */
1782    public boolean hasBase(String value) { 
1783      if (this.base == null)
1784        return false;
1785      for (CodeType v : this.base)
1786        if (v.getValue().equals(value)) // code
1787          return true;
1788      return false;
1789    }
1790
1791    /**
1792     * @return {@link #type} (The type of value that a search parameter may contain, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1793     */
1794    public Enumeration<SearchParamType> getTypeElement() { 
1795      if (this.type == null)
1796        if (Configuration.errorOnAutoCreate())
1797          throw new Error("Attempt to auto-create SearchParameter.type");
1798        else if (Configuration.doAutoCreate())
1799          this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); // bb
1800      return this.type;
1801    }
1802
1803    public boolean hasTypeElement() { 
1804      return this.type != null && !this.type.isEmpty();
1805    }
1806
1807    public boolean hasType() { 
1808      return this.type != null && !this.type.isEmpty();
1809    }
1810
1811    /**
1812     * @param value {@link #type} (The type of value that a search parameter may contain, and how the content is interpreted.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
1813     */
1814    public SearchParameter setTypeElement(Enumeration<SearchParamType> value) { 
1815      this.type = value;
1816      return this;
1817    }
1818
1819    /**
1820     * @return The type of value that a search parameter may contain, and how the content is interpreted.
1821     */
1822    public SearchParamType getType() { 
1823      return this.type == null ? null : this.type.getValue();
1824    }
1825
1826    /**
1827     * @param value The type of value that a search parameter may contain, and how the content is interpreted.
1828     */
1829    public SearchParameter setType(SearchParamType value) { 
1830        if (this.type == null)
1831          this.type = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory());
1832        this.type.setValue(value);
1833      return this;
1834    }
1835
1836    /**
1837     * @return {@link #expression} (A FHIRPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
1838     */
1839    public StringType getExpressionElement() { 
1840      if (this.expression == null)
1841        if (Configuration.errorOnAutoCreate())
1842          throw new Error("Attempt to auto-create SearchParameter.expression");
1843        else if (Configuration.doAutoCreate())
1844          this.expression = new StringType(); // bb
1845      return this.expression;
1846    }
1847
1848    public boolean hasExpressionElement() { 
1849      return this.expression != null && !this.expression.isEmpty();
1850    }
1851
1852    public boolean hasExpression() { 
1853      return this.expression != null && !this.expression.isEmpty();
1854    }
1855
1856    /**
1857     * @param value {@link #expression} (A FHIRPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
1858     */
1859    public SearchParameter setExpressionElement(StringType value) { 
1860      this.expression = value;
1861      return this;
1862    }
1863
1864    /**
1865     * @return A FHIRPath expression that returns a set of elements for the search parameter.
1866     */
1867    public String getExpression() { 
1868      return this.expression == null ? null : this.expression.getValue();
1869    }
1870
1871    /**
1872     * @param value A FHIRPath expression that returns a set of elements for the search parameter.
1873     */
1874    public SearchParameter setExpression(String value) { 
1875      if (Utilities.noString(value))
1876        this.expression = null;
1877      else {
1878        if (this.expression == null)
1879          this.expression = new StringType();
1880        this.expression.setValue(value);
1881      }
1882      return this;
1883    }
1884
1885    /**
1886     * @return {@link #xpath} (An XPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value
1887     */
1888    public StringType getXpathElement() { 
1889      if (this.xpath == null)
1890        if (Configuration.errorOnAutoCreate())
1891          throw new Error("Attempt to auto-create SearchParameter.xpath");
1892        else if (Configuration.doAutoCreate())
1893          this.xpath = new StringType(); // bb
1894      return this.xpath;
1895    }
1896
1897    public boolean hasXpathElement() { 
1898      return this.xpath != null && !this.xpath.isEmpty();
1899    }
1900
1901    public boolean hasXpath() { 
1902      return this.xpath != null && !this.xpath.isEmpty();
1903    }
1904
1905    /**
1906     * @param value {@link #xpath} (An XPath expression that returns a set of elements for the search parameter.). This is the underlying object with id, value and extensions. The accessor "getXpath" gives direct access to the value
1907     */
1908    public SearchParameter setXpathElement(StringType value) { 
1909      this.xpath = value;
1910      return this;
1911    }
1912
1913    /**
1914     * @return An XPath expression that returns a set of elements for the search parameter.
1915     */
1916    public String getXpath() { 
1917      return this.xpath == null ? null : this.xpath.getValue();
1918    }
1919
1920    /**
1921     * @param value An XPath expression that returns a set of elements for the search parameter.
1922     */
1923    public SearchParameter setXpath(String value) { 
1924      if (Utilities.noString(value))
1925        this.xpath = null;
1926      else {
1927        if (this.xpath == null)
1928          this.xpath = new StringType();
1929        this.xpath.setValue(value);
1930      }
1931      return this;
1932    }
1933
1934    /**
1935     * @return {@link #xpathUsage} (How the search parameter relates to the set of elements returned by evaluating the xpath query.). This is the underlying object with id, value and extensions. The accessor "getXpathUsage" gives direct access to the value
1936     */
1937    public Enumeration<XPathUsageType> getXpathUsageElement() { 
1938      if (this.xpathUsage == null)
1939        if (Configuration.errorOnAutoCreate())
1940          throw new Error("Attempt to auto-create SearchParameter.xpathUsage");
1941        else if (Configuration.doAutoCreate())
1942          this.xpathUsage = new Enumeration<XPathUsageType>(new XPathUsageTypeEnumFactory()); // bb
1943      return this.xpathUsage;
1944    }
1945
1946    public boolean hasXpathUsageElement() { 
1947      return this.xpathUsage != null && !this.xpathUsage.isEmpty();
1948    }
1949
1950    public boolean hasXpathUsage() { 
1951      return this.xpathUsage != null && !this.xpathUsage.isEmpty();
1952    }
1953
1954    /**
1955     * @param value {@link #xpathUsage} (How the search parameter relates to the set of elements returned by evaluating the xpath query.). This is the underlying object with id, value and extensions. The accessor "getXpathUsage" gives direct access to the value
1956     */
1957    public SearchParameter setXpathUsageElement(Enumeration<XPathUsageType> value) { 
1958      this.xpathUsage = value;
1959      return this;
1960    }
1961
1962    /**
1963     * @return How the search parameter relates to the set of elements returned by evaluating the xpath query.
1964     */
1965    public XPathUsageType getXpathUsage() { 
1966      return this.xpathUsage == null ? null : this.xpathUsage.getValue();
1967    }
1968
1969    /**
1970     * @param value How the search parameter relates to the set of elements returned by evaluating the xpath query.
1971     */
1972    public SearchParameter setXpathUsage(XPathUsageType value) { 
1973      if (value == null)
1974        this.xpathUsage = null;
1975      else {
1976        if (this.xpathUsage == null)
1977          this.xpathUsage = new Enumeration<XPathUsageType>(new XPathUsageTypeEnumFactory());
1978        this.xpathUsage.setValue(value);
1979      }
1980      return this;
1981    }
1982
1983    /**
1984     * @return {@link #target} (Types of resource (if a resource is referenced).)
1985     */
1986    public List<CodeType> getTarget() { 
1987      if (this.target == null)
1988        this.target = new ArrayList<CodeType>();
1989      return this.target;
1990    }
1991
1992    /**
1993     * @return Returns a reference to <code>this</code> for easy method chaining
1994     */
1995    public SearchParameter setTarget(List<CodeType> theTarget) { 
1996      this.target = theTarget;
1997      return this;
1998    }
1999
2000    public boolean hasTarget() { 
2001      if (this.target == null)
2002        return false;
2003      for (CodeType item : this.target)
2004        if (!item.isEmpty())
2005          return true;
2006      return false;
2007    }
2008
2009    /**
2010     * @return {@link #target} (Types of resource (if a resource is referenced).)
2011     */
2012    public CodeType addTargetElement() {//2 
2013      CodeType t = new CodeType();
2014      if (this.target == null)
2015        this.target = new ArrayList<CodeType>();
2016      this.target.add(t);
2017      return t;
2018    }
2019
2020    /**
2021     * @param value {@link #target} (Types of resource (if a resource is referenced).)
2022     */
2023    public SearchParameter addTarget(String value) { //1
2024      CodeType t = new CodeType();
2025      t.setValue(value);
2026      if (this.target == null)
2027        this.target = new ArrayList<CodeType>();
2028      this.target.add(t);
2029      return this;
2030    }
2031
2032    /**
2033     * @param value {@link #target} (Types of resource (if a resource is referenced).)
2034     */
2035    public boolean hasTarget(String value) { 
2036      if (this.target == null)
2037        return false;
2038      for (CodeType v : this.target)
2039        if (v.getValue().equals(value)) // code
2040          return true;
2041      return false;
2042    }
2043
2044    /**
2045     * @return {@link #multipleOr} (Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.). This is the underlying object with id, value and extensions. The accessor "getMultipleOr" gives direct access to the value
2046     */
2047    public BooleanType getMultipleOrElement() { 
2048      if (this.multipleOr == null)
2049        if (Configuration.errorOnAutoCreate())
2050          throw new Error("Attempt to auto-create SearchParameter.multipleOr");
2051        else if (Configuration.doAutoCreate())
2052          this.multipleOr = new BooleanType(); // bb
2053      return this.multipleOr;
2054    }
2055
2056    public boolean hasMultipleOrElement() { 
2057      return this.multipleOr != null && !this.multipleOr.isEmpty();
2058    }
2059
2060    public boolean hasMultipleOr() { 
2061      return this.multipleOr != null && !this.multipleOr.isEmpty();
2062    }
2063
2064    /**
2065     * @param value {@link #multipleOr} (Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.). This is the underlying object with id, value and extensions. The accessor "getMultipleOr" gives direct access to the value
2066     */
2067    public SearchParameter setMultipleOrElement(BooleanType value) { 
2068      this.multipleOr = value;
2069      return this;
2070    }
2071
2072    /**
2073     * @return Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.
2074     */
2075    public boolean getMultipleOr() { 
2076      return this.multipleOr == null || this.multipleOr.isEmpty() ? false : this.multipleOr.getValue();
2077    }
2078
2079    /**
2080     * @param value Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.
2081     */
2082    public SearchParameter setMultipleOr(boolean value) { 
2083        if (this.multipleOr == null)
2084          this.multipleOr = new BooleanType();
2085        this.multipleOr.setValue(value);
2086      return this;
2087    }
2088
2089    /**
2090     * @return {@link #multipleAnd} (Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.). This is the underlying object with id, value and extensions. The accessor "getMultipleAnd" gives direct access to the value
2091     */
2092    public BooleanType getMultipleAndElement() { 
2093      if (this.multipleAnd == null)
2094        if (Configuration.errorOnAutoCreate())
2095          throw new Error("Attempt to auto-create SearchParameter.multipleAnd");
2096        else if (Configuration.doAutoCreate())
2097          this.multipleAnd = new BooleanType(); // bb
2098      return this.multipleAnd;
2099    }
2100
2101    public boolean hasMultipleAndElement() { 
2102      return this.multipleAnd != null && !this.multipleAnd.isEmpty();
2103    }
2104
2105    public boolean hasMultipleAnd() { 
2106      return this.multipleAnd != null && !this.multipleAnd.isEmpty();
2107    }
2108
2109    /**
2110     * @param value {@link #multipleAnd} (Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.). This is the underlying object with id, value and extensions. The accessor "getMultipleAnd" gives direct access to the value
2111     */
2112    public SearchParameter setMultipleAndElement(BooleanType value) { 
2113      this.multipleAnd = value;
2114      return this;
2115    }
2116
2117    /**
2118     * @return Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.
2119     */
2120    public boolean getMultipleAnd() { 
2121      return this.multipleAnd == null || this.multipleAnd.isEmpty() ? false : this.multipleAnd.getValue();
2122    }
2123
2124    /**
2125     * @param value Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.
2126     */
2127    public SearchParameter setMultipleAnd(boolean value) { 
2128        if (this.multipleAnd == null)
2129          this.multipleAnd = new BooleanType();
2130        this.multipleAnd.setValue(value);
2131      return this;
2132    }
2133
2134    /**
2135     * @return {@link #comparator} (Comparators supported for the search parameter.)
2136     */
2137    public List<Enumeration<SearchComparator>> getComparator() { 
2138      if (this.comparator == null)
2139        this.comparator = new ArrayList<Enumeration<SearchComparator>>();
2140      return this.comparator;
2141    }
2142
2143    /**
2144     * @return Returns a reference to <code>this</code> for easy method chaining
2145     */
2146    public SearchParameter setComparator(List<Enumeration<SearchComparator>> theComparator) { 
2147      this.comparator = theComparator;
2148      return this;
2149    }
2150
2151    public boolean hasComparator() { 
2152      if (this.comparator == null)
2153        return false;
2154      for (Enumeration<SearchComparator> item : this.comparator)
2155        if (!item.isEmpty())
2156          return true;
2157      return false;
2158    }
2159
2160    /**
2161     * @return {@link #comparator} (Comparators supported for the search parameter.)
2162     */
2163    public Enumeration<SearchComparator> addComparatorElement() {//2 
2164      Enumeration<SearchComparator> t = new Enumeration<SearchComparator>(new SearchComparatorEnumFactory());
2165      if (this.comparator == null)
2166        this.comparator = new ArrayList<Enumeration<SearchComparator>>();
2167      this.comparator.add(t);
2168      return t;
2169    }
2170
2171    /**
2172     * @param value {@link #comparator} (Comparators supported for the search parameter.)
2173     */
2174    public SearchParameter addComparator(SearchComparator value) { //1
2175      Enumeration<SearchComparator> t = new Enumeration<SearchComparator>(new SearchComparatorEnumFactory());
2176      t.setValue(value);
2177      if (this.comparator == null)
2178        this.comparator = new ArrayList<Enumeration<SearchComparator>>();
2179      this.comparator.add(t);
2180      return this;
2181    }
2182
2183    /**
2184     * @param value {@link #comparator} (Comparators supported for the search parameter.)
2185     */
2186    public boolean hasComparator(SearchComparator value) { 
2187      if (this.comparator == null)
2188        return false;
2189      for (Enumeration<SearchComparator> v : this.comparator)
2190        if (v.getValue().equals(value)) // code
2191          return true;
2192      return false;
2193    }
2194
2195    /**
2196     * @return {@link #modifier} (A modifier supported for the search parameter.)
2197     */
2198    public List<Enumeration<SearchModifierCode>> getModifier() { 
2199      if (this.modifier == null)
2200        this.modifier = new ArrayList<Enumeration<SearchModifierCode>>();
2201      return this.modifier;
2202    }
2203
2204    /**
2205     * @return Returns a reference to <code>this</code> for easy method chaining
2206     */
2207    public SearchParameter setModifier(List<Enumeration<SearchModifierCode>> theModifier) { 
2208      this.modifier = theModifier;
2209      return this;
2210    }
2211
2212    public boolean hasModifier() { 
2213      if (this.modifier == null)
2214        return false;
2215      for (Enumeration<SearchModifierCode> item : this.modifier)
2216        if (!item.isEmpty())
2217          return true;
2218      return false;
2219    }
2220
2221    /**
2222     * @return {@link #modifier} (A modifier supported for the search parameter.)
2223     */
2224    public Enumeration<SearchModifierCode> addModifierElement() {//2 
2225      Enumeration<SearchModifierCode> t = new Enumeration<SearchModifierCode>(new SearchModifierCodeEnumFactory());
2226      if (this.modifier == null)
2227        this.modifier = new ArrayList<Enumeration<SearchModifierCode>>();
2228      this.modifier.add(t);
2229      return t;
2230    }
2231
2232    /**
2233     * @param value {@link #modifier} (A modifier supported for the search parameter.)
2234     */
2235    public SearchParameter addModifier(SearchModifierCode value) { //1
2236      Enumeration<SearchModifierCode> t = new Enumeration<SearchModifierCode>(new SearchModifierCodeEnumFactory());
2237      t.setValue(value);
2238      if (this.modifier == null)
2239        this.modifier = new ArrayList<Enumeration<SearchModifierCode>>();
2240      this.modifier.add(t);
2241      return this;
2242    }
2243
2244    /**
2245     * @param value {@link #modifier} (A modifier supported for the search parameter.)
2246     */
2247    public boolean hasModifier(SearchModifierCode value) { 
2248      if (this.modifier == null)
2249        return false;
2250      for (Enumeration<SearchModifierCode> v : this.modifier)
2251        if (v.getValue().equals(value)) // code
2252          return true;
2253      return false;
2254    }
2255
2256    /**
2257     * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.)
2258     */
2259    public List<StringType> getChain() { 
2260      if (this.chain == null)
2261        this.chain = new ArrayList<StringType>();
2262      return this.chain;
2263    }
2264
2265    /**
2266     * @return Returns a reference to <code>this</code> for easy method chaining
2267     */
2268    public SearchParameter setChain(List<StringType> theChain) { 
2269      this.chain = theChain;
2270      return this;
2271    }
2272
2273    public boolean hasChain() { 
2274      if (this.chain == null)
2275        return false;
2276      for (StringType item : this.chain)
2277        if (!item.isEmpty())
2278          return true;
2279      return false;
2280    }
2281
2282    /**
2283     * @return {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.)
2284     */
2285    public StringType addChainElement() {//2 
2286      StringType t = new StringType();
2287      if (this.chain == null)
2288        this.chain = new ArrayList<StringType>();
2289      this.chain.add(t);
2290      return t;
2291    }
2292
2293    /**
2294     * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.)
2295     */
2296    public SearchParameter addChain(String value) { //1
2297      StringType t = new StringType();
2298      t.setValue(value);
2299      if (this.chain == null)
2300        this.chain = new ArrayList<StringType>();
2301      this.chain.add(t);
2302      return this;
2303    }
2304
2305    /**
2306     * @param value {@link #chain} (Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.)
2307     */
2308    public boolean hasChain(String value) { 
2309      if (this.chain == null)
2310        return false;
2311      for (StringType v : this.chain)
2312        if (v.getValue().equals(value)) // string
2313          return true;
2314      return false;
2315    }
2316
2317    /**
2318     * @return {@link #component} (Used to define the parts of a composite search parameter.)
2319     */
2320    public List<SearchParameterComponentComponent> getComponent() { 
2321      if (this.component == null)
2322        this.component = new ArrayList<SearchParameterComponentComponent>();
2323      return this.component;
2324    }
2325
2326    /**
2327     * @return Returns a reference to <code>this</code> for easy method chaining
2328     */
2329    public SearchParameter setComponent(List<SearchParameterComponentComponent> theComponent) { 
2330      this.component = theComponent;
2331      return this;
2332    }
2333
2334    public boolean hasComponent() { 
2335      if (this.component == null)
2336        return false;
2337      for (SearchParameterComponentComponent item : this.component)
2338        if (!item.isEmpty())
2339          return true;
2340      return false;
2341    }
2342
2343    public SearchParameterComponentComponent addComponent() { //3
2344      SearchParameterComponentComponent t = new SearchParameterComponentComponent();
2345      if (this.component == null)
2346        this.component = new ArrayList<SearchParameterComponentComponent>();
2347      this.component.add(t);
2348      return t;
2349    }
2350
2351    public SearchParameter addComponent(SearchParameterComponentComponent t) { //3
2352      if (t == null)
2353        return this;
2354      if (this.component == null)
2355        this.component = new ArrayList<SearchParameterComponentComponent>();
2356      this.component.add(t);
2357      return this;
2358    }
2359
2360    /**
2361     * @return The first repetition of repeating field {@link #component}, creating it if it does not already exist
2362     */
2363    public SearchParameterComponentComponent getComponentFirstRep() { 
2364      if (getComponent().isEmpty()) {
2365        addComponent();
2366      }
2367      return getComponent().get(0);
2368    }
2369
2370      protected void listChildren(List<Property> children) {
2371        super.listChildren(children);
2372        children.add(new Property("url", "uri", "An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.", 0, 1, url));
2373        children.add(new Property("version", "string", "The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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));
2374        children.add(new Property("name", "string", "A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
2375        children.add(new Property("derivedFrom", "canonical(SearchParameter)", "Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.", 0, 1, derivedFrom));
2376        children.add(new Property("status", "code", "The status of this search parameter. Enables tracking the life-cycle of the content.", 0, 1, status));
2377        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
2378        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the search parameter 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 search parameter changes.", 0, 1, date));
2379        children.add(new Property("publisher", "string", "The name of the organization or individual that published the search parameter.", 0, 1, publisher));
2380        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));
2381        children.add(new Property("description", "markdown", "And how it used.", 0, 1, description));
2382        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 search parameter instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
2383        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the search parameter is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
2384        children.add(new Property("purpose", "markdown", "Explanation of why this search parameter is needed and why it has been designed as it has.", 0, 1, purpose));
2385        children.add(new Property("code", "code", "The code used in the URL or the parameter name in a parameters resource for this search parameter.", 0, 1, code));
2386        children.add(new Property("base", "code", "The base resource type(s) that this search parameter can be used against.", 0, java.lang.Integer.MAX_VALUE, base));
2387        children.add(new Property("type", "code", "The type of value that a search parameter may contain, and how the content is interpreted.", 0, 1, type));
2388        children.add(new Property("expression", "string", "A FHIRPath expression that returns a set of elements for the search parameter.", 0, 1, expression));
2389        children.add(new Property("xpath", "string", "An XPath expression that returns a set of elements for the search parameter.", 0, 1, xpath));
2390        children.add(new Property("xpathUsage", "code", "How the search parameter relates to the set of elements returned by evaluating the xpath query.", 0, 1, xpathUsage));
2391        children.add(new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target));
2392        children.add(new Property("multipleOr", "boolean", "Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.", 0, 1, multipleOr));
2393        children.add(new Property("multipleAnd", "boolean", "Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.", 0, 1, multipleAnd));
2394        children.add(new Property("comparator", "code", "Comparators supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, comparator));
2395        children.add(new Property("modifier", "code", "A modifier supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, modifier));
2396        children.add(new Property("chain", "string", "Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.", 0, java.lang.Integer.MAX_VALUE, chain));
2397        children.add(new Property("component", "", "Used to define the parts of a composite search parameter.", 0, java.lang.Integer.MAX_VALUE, component));
2398      }
2399
2400      @Override
2401      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2402        switch (_hash) {
2403        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this search parameter 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 search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers.", 0, 1, url);
2404        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the search parameter when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the search parameter 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);
2405        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the search parameter. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
2406        case 1077922663: /*derivedFrom*/  return new Property("derivedFrom", "canonical(SearchParameter)", "Where this search parameter is originally defined. If a derivedFrom is provided, then the details in the search parameter must be consistent with the definition from which it is defined. i.e. the parameter should have the same meaning, and (usually) the functionality should be a proper subset of the underlying search parameter.", 0, 1, derivedFrom);
2407        case -892481550: /*status*/  return new Property("status", "code", "The status of this search parameter. Enables tracking the life-cycle of the content.", 0, 1, status);
2408        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this search parameter is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
2409        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the search parameter 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 search parameter changes.", 0, 1, date);
2410        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the search parameter.", 0, 1, publisher);
2411        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);
2412        case -1724546052: /*description*/  return new Property("description", "markdown", "And how it used.", 0, 1, description);
2413        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 search parameter instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
2414        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the search parameter is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
2415        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this search parameter is needed and why it has been designed as it has.", 0, 1, purpose);
2416        case 3059181: /*code*/  return new Property("code", "code", "The code used in the URL or the parameter name in a parameters resource for this search parameter.", 0, 1, code);
2417        case 3016401: /*base*/  return new Property("base", "code", "The base resource type(s) that this search parameter can be used against.", 0, java.lang.Integer.MAX_VALUE, base);
2418        case 3575610: /*type*/  return new Property("type", "code", "The type of value that a search parameter may contain, and how the content is interpreted.", 0, 1, type);
2419        case -1795452264: /*expression*/  return new Property("expression", "string", "A FHIRPath expression that returns a set of elements for the search parameter.", 0, 1, expression);
2420        case 114256029: /*xpath*/  return new Property("xpath", "string", "An XPath expression that returns a set of elements for the search parameter.", 0, 1, xpath);
2421        case 1801322244: /*xpathUsage*/  return new Property("xpathUsage", "code", "How the search parameter relates to the set of elements returned by evaluating the xpath query.", 0, 1, xpathUsage);
2422        case -880905839: /*target*/  return new Property("target", "code", "Types of resource (if a resource is referenced).", 0, java.lang.Integer.MAX_VALUE, target);
2423        case 1265069075: /*multipleOr*/  return new Property("multipleOr", "boolean", "Whether multiple values are allowed for each time the parameter exists. Values are separated by commas, and the parameter matches if any of the values match.", 0, 1, multipleOr);
2424        case 562422183: /*multipleAnd*/  return new Property("multipleAnd", "boolean", "Whether multiple parameters are allowed - e.g. more than one parameter with the same name. The search matches if all the parameters match.", 0, 1, multipleAnd);
2425        case -844673834: /*comparator*/  return new Property("comparator", "code", "Comparators supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, comparator);
2426        case -615513385: /*modifier*/  return new Property("modifier", "code", "A modifier supported for the search parameter.", 0, java.lang.Integer.MAX_VALUE, modifier);
2427        case 94623425: /*chain*/  return new Property("chain", "string", "Contains the names of any search parameters which may be chained to the containing search parameter. Chained parameters may be added to search parameters of type reference and specify that resources will only be returned if they contain a reference to a resource which matches the chained parameter value. Values for this field should be drawn from SearchParameter.code for a parameter on the target resource type.", 0, java.lang.Integer.MAX_VALUE, chain);
2428        case -1399907075: /*component*/  return new Property("component", "", "Used to define the parts of a composite search parameter.", 0, java.lang.Integer.MAX_VALUE, component);
2429        default: return super.getNamedProperty(_hash, _name, _checkValid);
2430        }
2431
2432      }
2433
2434      @Override
2435      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2436        switch (hash) {
2437        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2438        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2439        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2440        case 1077922663: /*derivedFrom*/ return this.derivedFrom == null ? new Base[0] : new Base[] {this.derivedFrom}; // CanonicalType
2441        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
2442        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
2443        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2444        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
2445        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
2446        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
2447        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2448        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
2449        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
2450        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
2451        case 3016401: /*base*/ return this.base == null ? new Base[0] : this.base.toArray(new Base[this.base.size()]); // CodeType
2452        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<SearchParamType>
2453        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
2454        case 114256029: /*xpath*/ return this.xpath == null ? new Base[0] : new Base[] {this.xpath}; // StringType
2455        case 1801322244: /*xpathUsage*/ return this.xpathUsage == null ? new Base[0] : new Base[] {this.xpathUsage}; // Enumeration<XPathUsageType>
2456        case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // CodeType
2457        case 1265069075: /*multipleOr*/ return this.multipleOr == null ? new Base[0] : new Base[] {this.multipleOr}; // BooleanType
2458        case 562422183: /*multipleAnd*/ return this.multipleAnd == null ? new Base[0] : new Base[] {this.multipleAnd}; // BooleanType
2459        case -844673834: /*comparator*/ return this.comparator == null ? new Base[0] : this.comparator.toArray(new Base[this.comparator.size()]); // Enumeration<SearchComparator>
2460        case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // Enumeration<SearchModifierCode>
2461        case 94623425: /*chain*/ return this.chain == null ? new Base[0] : this.chain.toArray(new Base[this.chain.size()]); // StringType
2462        case -1399907075: /*component*/ return this.component == null ? new Base[0] : this.component.toArray(new Base[this.component.size()]); // SearchParameterComponentComponent
2463        default: return super.getProperty(hash, name, checkValid);
2464        }
2465
2466      }
2467
2468      @Override
2469      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2470        switch (hash) {
2471        case 116079: // url
2472          this.url = castToUri(value); // UriType
2473          return value;
2474        case 351608024: // version
2475          this.version = castToString(value); // StringType
2476          return value;
2477        case 3373707: // name
2478          this.name = castToString(value); // StringType
2479          return value;
2480        case 1077922663: // derivedFrom
2481          this.derivedFrom = castToCanonical(value); // CanonicalType
2482          return value;
2483        case -892481550: // status
2484          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2485          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2486          return value;
2487        case -404562712: // experimental
2488          this.experimental = castToBoolean(value); // BooleanType
2489          return value;
2490        case 3076014: // date
2491          this.date = castToDateTime(value); // DateTimeType
2492          return value;
2493        case 1447404028: // publisher
2494          this.publisher = castToString(value); // StringType
2495          return value;
2496        case 951526432: // contact
2497          this.getContact().add(castToContactDetail(value)); // ContactDetail
2498          return value;
2499        case -1724546052: // description
2500          this.description = castToMarkdown(value); // MarkdownType
2501          return value;
2502        case -669707736: // useContext
2503          this.getUseContext().add(castToUsageContext(value)); // UsageContext
2504          return value;
2505        case -507075711: // jurisdiction
2506          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
2507          return value;
2508        case -220463842: // purpose
2509          this.purpose = castToMarkdown(value); // MarkdownType
2510          return value;
2511        case 3059181: // code
2512          this.code = castToCode(value); // CodeType
2513          return value;
2514        case 3016401: // base
2515          this.getBase().add(castToCode(value)); // CodeType
2516          return value;
2517        case 3575610: // type
2518          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
2519          this.type = (Enumeration) value; // Enumeration<SearchParamType>
2520          return value;
2521        case -1795452264: // expression
2522          this.expression = castToString(value); // StringType
2523          return value;
2524        case 114256029: // xpath
2525          this.xpath = castToString(value); // StringType
2526          return value;
2527        case 1801322244: // xpathUsage
2528          value = new XPathUsageTypeEnumFactory().fromType(castToCode(value));
2529          this.xpathUsage = (Enumeration) value; // Enumeration<XPathUsageType>
2530          return value;
2531        case -880905839: // target
2532          this.getTarget().add(castToCode(value)); // CodeType
2533          return value;
2534        case 1265069075: // multipleOr
2535          this.multipleOr = castToBoolean(value); // BooleanType
2536          return value;
2537        case 562422183: // multipleAnd
2538          this.multipleAnd = castToBoolean(value); // BooleanType
2539          return value;
2540        case -844673834: // comparator
2541          value = new SearchComparatorEnumFactory().fromType(castToCode(value));
2542          this.getComparator().add((Enumeration) value); // Enumeration<SearchComparator>
2543          return value;
2544        case -615513385: // modifier
2545          value = new SearchModifierCodeEnumFactory().fromType(castToCode(value));
2546          this.getModifier().add((Enumeration) value); // Enumeration<SearchModifierCode>
2547          return value;
2548        case 94623425: // chain
2549          this.getChain().add(castToString(value)); // StringType
2550          return value;
2551        case -1399907075: // component
2552          this.getComponent().add((SearchParameterComponentComponent) value); // SearchParameterComponentComponent
2553          return value;
2554        default: return super.setProperty(hash, name, value);
2555        }
2556
2557      }
2558
2559      @Override
2560      public Base setProperty(String name, Base value) throws FHIRException {
2561        if (name.equals("url")) {
2562          this.url = castToUri(value); // UriType
2563        } else if (name.equals("version")) {
2564          this.version = castToString(value); // StringType
2565        } else if (name.equals("name")) {
2566          this.name = castToString(value); // StringType
2567        } else if (name.equals("derivedFrom")) {
2568          this.derivedFrom = castToCanonical(value); // CanonicalType
2569        } else if (name.equals("status")) {
2570          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2571          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2572        } else if (name.equals("experimental")) {
2573          this.experimental = castToBoolean(value); // BooleanType
2574        } else if (name.equals("date")) {
2575          this.date = castToDateTime(value); // DateTimeType
2576        } else if (name.equals("publisher")) {
2577          this.publisher = castToString(value); // StringType
2578        } else if (name.equals("contact")) {
2579          this.getContact().add(castToContactDetail(value));
2580        } else if (name.equals("description")) {
2581          this.description = castToMarkdown(value); // MarkdownType
2582        } else if (name.equals("useContext")) {
2583          this.getUseContext().add(castToUsageContext(value));
2584        } else if (name.equals("jurisdiction")) {
2585          this.getJurisdiction().add(castToCodeableConcept(value));
2586        } else if (name.equals("purpose")) {
2587          this.purpose = castToMarkdown(value); // MarkdownType
2588        } else if (name.equals("code")) {
2589          this.code = castToCode(value); // CodeType
2590        } else if (name.equals("base")) {
2591          this.getBase().add(castToCode(value));
2592        } else if (name.equals("type")) {
2593          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
2594          this.type = (Enumeration) value; // Enumeration<SearchParamType>
2595        } else if (name.equals("expression")) {
2596          this.expression = castToString(value); // StringType
2597        } else if (name.equals("xpath")) {
2598          this.xpath = castToString(value); // StringType
2599        } else if (name.equals("xpathUsage")) {
2600          value = new XPathUsageTypeEnumFactory().fromType(castToCode(value));
2601          this.xpathUsage = (Enumeration) value; // Enumeration<XPathUsageType>
2602        } else if (name.equals("target")) {
2603          this.getTarget().add(castToCode(value));
2604        } else if (name.equals("multipleOr")) {
2605          this.multipleOr = castToBoolean(value); // BooleanType
2606        } else if (name.equals("multipleAnd")) {
2607          this.multipleAnd = castToBoolean(value); // BooleanType
2608        } else if (name.equals("comparator")) {
2609          value = new SearchComparatorEnumFactory().fromType(castToCode(value));
2610          this.getComparator().add((Enumeration) value);
2611        } else if (name.equals("modifier")) {
2612          value = new SearchModifierCodeEnumFactory().fromType(castToCode(value));
2613          this.getModifier().add((Enumeration) value);
2614        } else if (name.equals("chain")) {
2615          this.getChain().add(castToString(value));
2616        } else if (name.equals("component")) {
2617          this.getComponent().add((SearchParameterComponentComponent) value);
2618        } else
2619          return super.setProperty(name, value);
2620        return value;
2621      }
2622
2623      @Override
2624      public Base makeProperty(int hash, String name) throws FHIRException {
2625        switch (hash) {
2626        case 116079:  return getUrlElement();
2627        case 351608024:  return getVersionElement();
2628        case 3373707:  return getNameElement();
2629        case 1077922663:  return getDerivedFromElement();
2630        case -892481550:  return getStatusElement();
2631        case -404562712:  return getExperimentalElement();
2632        case 3076014:  return getDateElement();
2633        case 1447404028:  return getPublisherElement();
2634        case 951526432:  return addContact(); 
2635        case -1724546052:  return getDescriptionElement();
2636        case -669707736:  return addUseContext(); 
2637        case -507075711:  return addJurisdiction(); 
2638        case -220463842:  return getPurposeElement();
2639        case 3059181:  return getCodeElement();
2640        case 3016401:  return addBaseElement();
2641        case 3575610:  return getTypeElement();
2642        case -1795452264:  return getExpressionElement();
2643        case 114256029:  return getXpathElement();
2644        case 1801322244:  return getXpathUsageElement();
2645        case -880905839:  return addTargetElement();
2646        case 1265069075:  return getMultipleOrElement();
2647        case 562422183:  return getMultipleAndElement();
2648        case -844673834:  return addComparatorElement();
2649        case -615513385:  return addModifierElement();
2650        case 94623425:  return addChainElement();
2651        case -1399907075:  return addComponent(); 
2652        default: return super.makeProperty(hash, name);
2653        }
2654
2655      }
2656
2657      @Override
2658      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2659        switch (hash) {
2660        case 116079: /*url*/ return new String[] {"uri"};
2661        case 351608024: /*version*/ return new String[] {"string"};
2662        case 3373707: /*name*/ return new String[] {"string"};
2663        case 1077922663: /*derivedFrom*/ return new String[] {"canonical"};
2664        case -892481550: /*status*/ return new String[] {"code"};
2665        case -404562712: /*experimental*/ return new String[] {"boolean"};
2666        case 3076014: /*date*/ return new String[] {"dateTime"};
2667        case 1447404028: /*publisher*/ return new String[] {"string"};
2668        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
2669        case -1724546052: /*description*/ return new String[] {"markdown"};
2670        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
2671        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
2672        case -220463842: /*purpose*/ return new String[] {"markdown"};
2673        case 3059181: /*code*/ return new String[] {"code"};
2674        case 3016401: /*base*/ return new String[] {"code"};
2675        case 3575610: /*type*/ return new String[] {"code"};
2676        case -1795452264: /*expression*/ return new String[] {"string"};
2677        case 114256029: /*xpath*/ return new String[] {"string"};
2678        case 1801322244: /*xpathUsage*/ return new String[] {"code"};
2679        case -880905839: /*target*/ return new String[] {"code"};
2680        case 1265069075: /*multipleOr*/ return new String[] {"boolean"};
2681        case 562422183: /*multipleAnd*/ return new String[] {"boolean"};
2682        case -844673834: /*comparator*/ return new String[] {"code"};
2683        case -615513385: /*modifier*/ return new String[] {"code"};
2684        case 94623425: /*chain*/ return new String[] {"string"};
2685        case -1399907075: /*component*/ return new String[] {};
2686        default: return super.getTypesForProperty(hash, name);
2687        }
2688
2689      }
2690
2691      @Override
2692      public Base addChild(String name) throws FHIRException {
2693        if (name.equals("url")) {
2694          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.url");
2695        }
2696        else if (name.equals("version")) {
2697          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.version");
2698        }
2699        else if (name.equals("name")) {
2700          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.name");
2701        }
2702        else if (name.equals("derivedFrom")) {
2703          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.derivedFrom");
2704        }
2705        else if (name.equals("status")) {
2706          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.status");
2707        }
2708        else if (name.equals("experimental")) {
2709          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.experimental");
2710        }
2711        else if (name.equals("date")) {
2712          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.date");
2713        }
2714        else if (name.equals("publisher")) {
2715          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.publisher");
2716        }
2717        else if (name.equals("contact")) {
2718          return addContact();
2719        }
2720        else if (name.equals("description")) {
2721          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.description");
2722        }
2723        else if (name.equals("useContext")) {
2724          return addUseContext();
2725        }
2726        else if (name.equals("jurisdiction")) {
2727          return addJurisdiction();
2728        }
2729        else if (name.equals("purpose")) {
2730          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.purpose");
2731        }
2732        else if (name.equals("code")) {
2733          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.code");
2734        }
2735        else if (name.equals("base")) {
2736          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.base");
2737        }
2738        else if (name.equals("type")) {
2739          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.type");
2740        }
2741        else if (name.equals("expression")) {
2742          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.expression");
2743        }
2744        else if (name.equals("xpath")) {
2745          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.xpath");
2746        }
2747        else if (name.equals("xpathUsage")) {
2748          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.xpathUsage");
2749        }
2750        else if (name.equals("target")) {
2751          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.target");
2752        }
2753        else if (name.equals("multipleOr")) {
2754          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.multipleOr");
2755        }
2756        else if (name.equals("multipleAnd")) {
2757          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.multipleAnd");
2758        }
2759        else if (name.equals("comparator")) {
2760          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.comparator");
2761        }
2762        else if (name.equals("modifier")) {
2763          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.modifier");
2764        }
2765        else if (name.equals("chain")) {
2766          throw new FHIRException("Cannot call addChild on a primitive type SearchParameter.chain");
2767        }
2768        else if (name.equals("component")) {
2769          return addComponent();
2770        }
2771        else
2772          return super.addChild(name);
2773      }
2774
2775  public String fhirType() {
2776    return "SearchParameter";
2777
2778  }
2779
2780      public SearchParameter copy() {
2781        SearchParameter dst = new SearchParameter();
2782        copyValues(dst);
2783        return dst;
2784      }
2785
2786      public void copyValues(SearchParameter dst) {
2787        super.copyValues(dst);
2788        dst.url = url == null ? null : url.copy();
2789        dst.version = version == null ? null : version.copy();
2790        dst.name = name == null ? null : name.copy();
2791        dst.derivedFrom = derivedFrom == null ? null : derivedFrom.copy();
2792        dst.status = status == null ? null : status.copy();
2793        dst.experimental = experimental == null ? null : experimental.copy();
2794        dst.date = date == null ? null : date.copy();
2795        dst.publisher = publisher == null ? null : publisher.copy();
2796        if (contact != null) {
2797          dst.contact = new ArrayList<ContactDetail>();
2798          for (ContactDetail i : contact)
2799            dst.contact.add(i.copy());
2800        };
2801        dst.description = description == null ? null : description.copy();
2802        if (useContext != null) {
2803          dst.useContext = new ArrayList<UsageContext>();
2804          for (UsageContext i : useContext)
2805            dst.useContext.add(i.copy());
2806        };
2807        if (jurisdiction != null) {
2808          dst.jurisdiction = new ArrayList<CodeableConcept>();
2809          for (CodeableConcept i : jurisdiction)
2810            dst.jurisdiction.add(i.copy());
2811        };
2812        dst.purpose = purpose == null ? null : purpose.copy();
2813        dst.code = code == null ? null : code.copy();
2814        if (base != null) {
2815          dst.base = new ArrayList<CodeType>();
2816          for (CodeType i : base)
2817            dst.base.add(i.copy());
2818        };
2819        dst.type = type == null ? null : type.copy();
2820        dst.expression = expression == null ? null : expression.copy();
2821        dst.xpath = xpath == null ? null : xpath.copy();
2822        dst.xpathUsage = xpathUsage == null ? null : xpathUsage.copy();
2823        if (target != null) {
2824          dst.target = new ArrayList<CodeType>();
2825          for (CodeType i : target)
2826            dst.target.add(i.copy());
2827        };
2828        dst.multipleOr = multipleOr == null ? null : multipleOr.copy();
2829        dst.multipleAnd = multipleAnd == null ? null : multipleAnd.copy();
2830        if (comparator != null) {
2831          dst.comparator = new ArrayList<Enumeration<SearchComparator>>();
2832          for (Enumeration<SearchComparator> i : comparator)
2833            dst.comparator.add(i.copy());
2834        };
2835        if (modifier != null) {
2836          dst.modifier = new ArrayList<Enumeration<SearchModifierCode>>();
2837          for (Enumeration<SearchModifierCode> i : modifier)
2838            dst.modifier.add(i.copy());
2839        };
2840        if (chain != null) {
2841          dst.chain = new ArrayList<StringType>();
2842          for (StringType i : chain)
2843            dst.chain.add(i.copy());
2844        };
2845        if (component != null) {
2846          dst.component = new ArrayList<SearchParameterComponentComponent>();
2847          for (SearchParameterComponentComponent i : component)
2848            dst.component.add(i.copy());
2849        };
2850      }
2851
2852      protected SearchParameter typedCopy() {
2853        return copy();
2854      }
2855
2856      @Override
2857      public boolean equalsDeep(Base other_) {
2858        if (!super.equalsDeep(other_))
2859          return false;
2860        if (!(other_ instanceof SearchParameter))
2861          return false;
2862        SearchParameter o = (SearchParameter) other_;
2863        return compareDeep(derivedFrom, o.derivedFrom, true) && compareDeep(purpose, o.purpose, true) && compareDeep(code, o.code, true)
2864           && compareDeep(base, o.base, true) && compareDeep(type, o.type, true) && compareDeep(expression, o.expression, true)
2865           && compareDeep(xpath, o.xpath, true) && compareDeep(xpathUsage, o.xpathUsage, true) && compareDeep(target, o.target, true)
2866           && compareDeep(multipleOr, o.multipleOr, true) && compareDeep(multipleAnd, o.multipleAnd, true)
2867           && compareDeep(comparator, o.comparator, true) && compareDeep(modifier, o.modifier, true) && compareDeep(chain, o.chain, true)
2868           && compareDeep(component, o.component, true);
2869      }
2870
2871      @Override
2872      public boolean equalsShallow(Base other_) {
2873        if (!super.equalsShallow(other_))
2874          return false;
2875        if (!(other_ instanceof SearchParameter))
2876          return false;
2877        SearchParameter o = (SearchParameter) other_;
2878        return compareValues(purpose, o.purpose, true) && compareValues(code, o.code, true) && compareValues(base, o.base, true)
2879           && compareValues(type, o.type, true) && compareValues(expression, o.expression, true) && compareValues(xpath, o.xpath, true)
2880           && compareValues(xpathUsage, o.xpathUsage, true) && compareValues(target, o.target, true) && compareValues(multipleOr, o.multipleOr, true)
2881           && compareValues(multipleAnd, o.multipleAnd, true) && compareValues(comparator, o.comparator, true)
2882           && compareValues(modifier, o.modifier, true) && compareValues(chain, o.chain, true);
2883      }
2884
2885      public boolean isEmpty() {
2886        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(derivedFrom, purpose, code
2887          , base, type, expression, xpath, xpathUsage, target, multipleOr, multipleAnd
2888          , comparator, modifier, chain, component);
2889      }
2890
2891  @Override
2892  public ResourceType getResourceType() {
2893    return ResourceType.SearchParameter;
2894   }
2895
2896 /**
2897   * Search parameter: <b>date</b>
2898   * <p>
2899   * Description: <b>The search parameter publication date</b><br>
2900   * Type: <b>date</b><br>
2901   * Path: <b>SearchParameter.date</b><br>
2902   * </p>
2903   */
2904  @SearchParamDefinition(name="date", path="SearchParameter.date", description="The search parameter publication date", type="date" )
2905  public static final String SP_DATE = "date";
2906 /**
2907   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2908   * <p>
2909   * Description: <b>The search parameter publication date</b><br>
2910   * Type: <b>date</b><br>
2911   * Path: <b>SearchParameter.date</b><br>
2912   * </p>
2913   */
2914  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2915
2916 /**
2917   * Search parameter: <b>code</b>
2918   * <p>
2919   * Description: <b>Code used in URL</b><br>
2920   * Type: <b>token</b><br>
2921   * Path: <b>SearchParameter.code</b><br>
2922   * </p>
2923   */
2924  @SearchParamDefinition(name="code", path="SearchParameter.code", description="Code used in URL", type="token" )
2925  public static final String SP_CODE = "code";
2926 /**
2927   * <b>Fluent Client</b> search parameter constant for <b>code</b>
2928   * <p>
2929   * Description: <b>Code used in URL</b><br>
2930   * Type: <b>token</b><br>
2931   * Path: <b>SearchParameter.code</b><br>
2932   * </p>
2933   */
2934  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
2935
2936 /**
2937   * Search parameter: <b>context-type-value</b>
2938   * <p>
2939   * Description: <b>A use context type and value assigned to the search parameter</b><br>
2940   * Type: <b>composite</b><br>
2941   * Path: <b></b><br>
2942   * </p>
2943   */
2944  @SearchParamDefinition(name="context-type-value", path="SearchParameter.useContext", description="A use context type and value assigned to the search parameter", type="composite", compositeOf={"context-type", "context"} )
2945  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
2946 /**
2947   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
2948   * <p>
2949   * Description: <b>A use context type and value assigned to the search parameter</b><br>
2950   * Type: <b>composite</b><br>
2951   * Path: <b></b><br>
2952   * </p>
2953   */
2954  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);
2955
2956 /**
2957   * Search parameter: <b>jurisdiction</b>
2958   * <p>
2959   * Description: <b>Intended jurisdiction for the search parameter</b><br>
2960   * Type: <b>token</b><br>
2961   * Path: <b>SearchParameter.jurisdiction</b><br>
2962   * </p>
2963   */
2964  @SearchParamDefinition(name="jurisdiction", path="SearchParameter.jurisdiction", description="Intended jurisdiction for the search parameter", type="token" )
2965  public static final String SP_JURISDICTION = "jurisdiction";
2966 /**
2967   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
2968   * <p>
2969   * Description: <b>Intended jurisdiction for the search parameter</b><br>
2970   * Type: <b>token</b><br>
2971   * Path: <b>SearchParameter.jurisdiction</b><br>
2972   * </p>
2973   */
2974  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
2975
2976 /**
2977   * Search parameter: <b>description</b>
2978   * <p>
2979   * Description: <b>The description of the search parameter</b><br>
2980   * Type: <b>string</b><br>
2981   * Path: <b>SearchParameter.description</b><br>
2982   * </p>
2983   */
2984  @SearchParamDefinition(name="description", path="SearchParameter.description", description="The description of the search parameter", type="string" )
2985  public static final String SP_DESCRIPTION = "description";
2986 /**
2987   * <b>Fluent Client</b> search parameter constant for <b>description</b>
2988   * <p>
2989   * Description: <b>The description of the search parameter</b><br>
2990   * Type: <b>string</b><br>
2991   * Path: <b>SearchParameter.description</b><br>
2992   * </p>
2993   */
2994  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
2995
2996 /**
2997   * Search parameter: <b>derived-from</b>
2998   * <p>
2999   * Description: <b>Original definition for the search parameter</b><br>
3000   * Type: <b>reference</b><br>
3001   * Path: <b>SearchParameter.derivedFrom</b><br>
3002   * </p>
3003   */
3004  @SearchParamDefinition(name="derived-from", path="SearchParameter.derivedFrom", description="Original definition for the search parameter", type="reference", target={SearchParameter.class } )
3005  public static final String SP_DERIVED_FROM = "derived-from";
3006 /**
3007   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
3008   * <p>
3009   * Description: <b>Original definition for the search parameter</b><br>
3010   * Type: <b>reference</b><br>
3011   * Path: <b>SearchParameter.derivedFrom</b><br>
3012   * </p>
3013   */
3014  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
3015
3016/**
3017   * Constant for fluent queries to be used to add include statements. Specifies
3018   * the path value of "<b>SearchParameter:derived-from</b>".
3019   */
3020  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("SearchParameter:derived-from").toLocked();
3021
3022 /**
3023   * Search parameter: <b>context-type</b>
3024   * <p>
3025   * Description: <b>A type of use context assigned to the search parameter</b><br>
3026   * Type: <b>token</b><br>
3027   * Path: <b>SearchParameter.useContext.code</b><br>
3028   * </p>
3029   */
3030  @SearchParamDefinition(name="context-type", path="SearchParameter.useContext.code", description="A type of use context assigned to the search parameter", type="token" )
3031  public static final String SP_CONTEXT_TYPE = "context-type";
3032 /**
3033   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
3034   * <p>
3035   * Description: <b>A type of use context assigned to the search parameter</b><br>
3036   * Type: <b>token</b><br>
3037   * Path: <b>SearchParameter.useContext.code</b><br>
3038   * </p>
3039   */
3040  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
3041
3042 /**
3043   * Search parameter: <b>type</b>
3044   * <p>
3045   * Description: <b>number | date | string | token | reference | composite | quantity | uri | special</b><br>
3046   * Type: <b>token</b><br>
3047   * Path: <b>SearchParameter.type</b><br>
3048   * </p>
3049   */
3050  @SearchParamDefinition(name="type", path="SearchParameter.type", description="number | date | string | token | reference | composite | quantity | uri | special", type="token" )
3051  public static final String SP_TYPE = "type";
3052 /**
3053   * <b>Fluent Client</b> search parameter constant for <b>type</b>
3054   * <p>
3055   * Description: <b>number | date | string | token | reference | composite | quantity | uri | special</b><br>
3056   * Type: <b>token</b><br>
3057   * Path: <b>SearchParameter.type</b><br>
3058   * </p>
3059   */
3060  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
3061
3062 /**
3063   * Search parameter: <b>version</b>
3064   * <p>
3065   * Description: <b>The business version of the search parameter</b><br>
3066   * Type: <b>token</b><br>
3067   * Path: <b>SearchParameter.version</b><br>
3068   * </p>
3069   */
3070  @SearchParamDefinition(name="version", path="SearchParameter.version", description="The business version of the search parameter", type="token" )
3071  public static final String SP_VERSION = "version";
3072 /**
3073   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3074   * <p>
3075   * Description: <b>The business version of the search parameter</b><br>
3076   * Type: <b>token</b><br>
3077   * Path: <b>SearchParameter.version</b><br>
3078   * </p>
3079   */
3080  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3081
3082 /**
3083   * Search parameter: <b>url</b>
3084   * <p>
3085   * Description: <b>The uri that identifies the search parameter</b><br>
3086   * Type: <b>uri</b><br>
3087   * Path: <b>SearchParameter.url</b><br>
3088   * </p>
3089   */
3090  @SearchParamDefinition(name="url", path="SearchParameter.url", description="The uri that identifies the search parameter", type="uri" )
3091  public static final String SP_URL = "url";
3092 /**
3093   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3094   * <p>
3095   * Description: <b>The uri that identifies the search parameter</b><br>
3096   * Type: <b>uri</b><br>
3097   * Path: <b>SearchParameter.url</b><br>
3098   * </p>
3099   */
3100  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3101
3102 /**
3103   * Search parameter: <b>target</b>
3104   * <p>
3105   * Description: <b>Types of resource (if a resource reference)</b><br>
3106   * Type: <b>token</b><br>
3107   * Path: <b>SearchParameter.target</b><br>
3108   * </p>
3109   */
3110  @SearchParamDefinition(name="target", path="SearchParameter.target", description="Types of resource (if a resource reference)", type="token" )
3111  public static final String SP_TARGET = "target";
3112 /**
3113   * <b>Fluent Client</b> search parameter constant for <b>target</b>
3114   * <p>
3115   * Description: <b>Types of resource (if a resource reference)</b><br>
3116   * Type: <b>token</b><br>
3117   * Path: <b>SearchParameter.target</b><br>
3118   * </p>
3119   */
3120  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET);
3121
3122 /**
3123   * Search parameter: <b>context-quantity</b>
3124   * <p>
3125   * Description: <b>A quantity- or range-valued use context assigned to the search parameter</b><br>
3126   * Type: <b>quantity</b><br>
3127   * Path: <b>SearchParameter.useContext.valueQuantity, SearchParameter.useContext.valueRange</b><br>
3128   * </p>
3129   */
3130  @SearchParamDefinition(name="context-quantity", path="(SearchParameter.useContext.value as Quantity) | (SearchParameter.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the search parameter", type="quantity" )
3131  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
3132 /**
3133   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
3134   * <p>
3135   * Description: <b>A quantity- or range-valued use context assigned to the search parameter</b><br>
3136   * Type: <b>quantity</b><br>
3137   * Path: <b>SearchParameter.useContext.valueQuantity, SearchParameter.useContext.valueRange</b><br>
3138   * </p>
3139   */
3140  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
3141
3142 /**
3143   * Search parameter: <b>component</b>
3144   * <p>
3145   * Description: <b>Defines how the part works</b><br>
3146   * Type: <b>reference</b><br>
3147   * Path: <b>SearchParameter.component.definition</b><br>
3148   * </p>
3149   */
3150  @SearchParamDefinition(name="component", path="SearchParameter.component.definition", description="Defines how the part works", type="reference", target={SearchParameter.class } )
3151  public static final String SP_COMPONENT = "component";
3152 /**
3153   * <b>Fluent Client</b> search parameter constant for <b>component</b>
3154   * <p>
3155   * Description: <b>Defines how the part works</b><br>
3156   * Type: <b>reference</b><br>
3157   * Path: <b>SearchParameter.component.definition</b><br>
3158   * </p>
3159   */
3160  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPONENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPONENT);
3161
3162/**
3163   * Constant for fluent queries to be used to add include statements. Specifies
3164   * the path value of "<b>SearchParameter:component</b>".
3165   */
3166  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPONENT = new ca.uhn.fhir.model.api.Include("SearchParameter:component").toLocked();
3167
3168 /**
3169   * Search parameter: <b>name</b>
3170   * <p>
3171   * Description: <b>Computationally friendly name of the search parameter</b><br>
3172   * Type: <b>string</b><br>
3173   * Path: <b>SearchParameter.name</b><br>
3174   * </p>
3175   */
3176  @SearchParamDefinition(name="name", path="SearchParameter.name", description="Computationally friendly name of the search parameter", type="string" )
3177  public static final String SP_NAME = "name";
3178 /**
3179   * <b>Fluent Client</b> search parameter constant for <b>name</b>
3180   * <p>
3181   * Description: <b>Computationally friendly name of the search parameter</b><br>
3182   * Type: <b>string</b><br>
3183   * Path: <b>SearchParameter.name</b><br>
3184   * </p>
3185   */
3186  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
3187
3188 /**
3189   * Search parameter: <b>context</b>
3190   * <p>
3191   * Description: <b>A use context assigned to the search parameter</b><br>
3192   * Type: <b>token</b><br>
3193   * Path: <b>SearchParameter.useContext.valueCodeableConcept</b><br>
3194   * </p>
3195   */
3196  @SearchParamDefinition(name="context", path="(SearchParameter.useContext.value as CodeableConcept)", description="A use context assigned to the search parameter", type="token" )
3197  public static final String SP_CONTEXT = "context";
3198 /**
3199   * <b>Fluent Client</b> search parameter constant for <b>context</b>
3200   * <p>
3201   * Description: <b>A use context assigned to the search parameter</b><br>
3202   * Type: <b>token</b><br>
3203   * Path: <b>SearchParameter.useContext.valueCodeableConcept</b><br>
3204   * </p>
3205   */
3206  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
3207
3208 /**
3209   * Search parameter: <b>publisher</b>
3210   * <p>
3211   * Description: <b>Name of the publisher of the search parameter</b><br>
3212   * Type: <b>string</b><br>
3213   * Path: <b>SearchParameter.publisher</b><br>
3214   * </p>
3215   */
3216  @SearchParamDefinition(name="publisher", path="SearchParameter.publisher", description="Name of the publisher of the search parameter", type="string" )
3217  public static final String SP_PUBLISHER = "publisher";
3218 /**
3219   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
3220   * <p>
3221   * Description: <b>Name of the publisher of the search parameter</b><br>
3222   * Type: <b>string</b><br>
3223   * Path: <b>SearchParameter.publisher</b><br>
3224   * </p>
3225   */
3226  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
3227
3228 /**
3229   * Search parameter: <b>context-type-quantity</b>
3230   * <p>
3231   * Description: <b>A use context type and quantity- or range-based value assigned to the search parameter</b><br>
3232   * Type: <b>composite</b><br>
3233   * Path: <b></b><br>
3234   * </p>
3235   */
3236  @SearchParamDefinition(name="context-type-quantity", path="SearchParameter.useContext", description="A use context type and quantity- or range-based value assigned to the search parameter", type="composite", compositeOf={"context-type", "context-quantity"} )
3237  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
3238 /**
3239   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
3240   * <p>
3241   * Description: <b>A use context type and quantity- or range-based value assigned to the search parameter</b><br>
3242   * Type: <b>composite</b><br>
3243   * Path: <b></b><br>
3244   * </p>
3245   */
3246  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);
3247
3248 /**
3249   * Search parameter: <b>status</b>
3250   * <p>
3251   * Description: <b>The current status of the search parameter</b><br>
3252   * Type: <b>token</b><br>
3253   * Path: <b>SearchParameter.status</b><br>
3254   * </p>
3255   */
3256  @SearchParamDefinition(name="status", path="SearchParameter.status", description="The current status of the search parameter", type="token" )
3257  public static final String SP_STATUS = "status";
3258 /**
3259   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3260   * <p>
3261   * Description: <b>The current status of the search parameter</b><br>
3262   * Type: <b>token</b><br>
3263   * Path: <b>SearchParameter.status</b><br>
3264   * </p>
3265   */
3266  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3267
3268 /**
3269   * Search parameter: <b>base</b>
3270   * <p>
3271   * Description: <b>The resource type(s) this search parameter applies to</b><br>
3272   * Type: <b>token</b><br>
3273   * Path: <b>SearchParameter.base</b><br>
3274   * </p>
3275   */
3276  @SearchParamDefinition(name="base", path="SearchParameter.base", description="The resource type(s) this search parameter applies to", type="token" )
3277  public static final String SP_BASE = "base";
3278 /**
3279   * <b>Fluent Client</b> search parameter constant for <b>base</b>
3280   * <p>
3281   * Description: <b>The resource type(s) this search parameter applies to</b><br>
3282   * Type: <b>token</b><br>
3283   * Path: <b>SearchParameter.base</b><br>
3284   * </p>
3285   */
3286  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BASE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BASE);
3287
3288
3289}
3290