001package org.hl7.fhir.r4.model;
002
003
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034
035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
036
037import java.util.*;
038
039import org.hl7.fhir.utilities.Utilities;
040import org.hl7.fhir.r4.model.Enumerations.*;
041import ca.uhn.fhir.model.api.annotation.ResourceDef;
042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
043import ca.uhn.fhir.model.api.annotation.Child;
044import ca.uhn.fhir.model.api.annotation.ChildOrder;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047import org.hl7.fhir.instance.model.api.*;
048import org.hl7.fhir.exceptions.FHIRException;
049/**
050 * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a "System" used within the Identifier and Coding data types.
051 */
052@ResourceDef(name="NamingSystem", profile="http://hl7.org/fhir/StructureDefinition/NamingSystem")
053@ChildOrder(names={"name", "status", "kind", "date", "publisher", "contact", "responsible", "type", "description", "useContext", "jurisdiction", "usage", "uniqueId"})
054public class NamingSystem extends MetadataResource {
055
056    public enum NamingSystemType {
057        /**
058         * The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc.
059         */
060        CODESYSTEM, 
061        /**
062         * The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.).
063         */
064        IDENTIFIER, 
065        /**
066         * The naming system is used as the root for other identifiers and naming systems.
067         */
068        ROOT, 
069        /**
070         * added to help the parsers with the generic types
071         */
072        NULL;
073        public static NamingSystemType fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("codesystem".equals(codeString))
077          return CODESYSTEM;
078        if ("identifier".equals(codeString))
079          return IDENTIFIER;
080        if ("root".equals(codeString))
081          return ROOT;
082        if (Configuration.isAcceptInvalidEnums())
083          return null;
084        else
085          throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case CODESYSTEM: return "codesystem";
090            case IDENTIFIER: return "identifier";
091            case ROOT: return "root";
092            case NULL: return null;
093            default: return "?";
094          }
095        }
096        public String getSystem() {
097          switch (this) {
098            case CODESYSTEM: return "http://hl7.org/fhir/namingsystem-type";
099            case IDENTIFIER: return "http://hl7.org/fhir/namingsystem-type";
100            case ROOT: return "http://hl7.org/fhir/namingsystem-type";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDefinition() {
106          switch (this) {
107            case CODESYSTEM: return "The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc.";
108            case IDENTIFIER: return "The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.).";
109            case ROOT: return "The naming system is used as the root for other identifiers and naming systems.";
110            case NULL: return null;
111            default: return "?";
112          }
113        }
114        public String getDisplay() {
115          switch (this) {
116            case CODESYSTEM: return "Code System";
117            case IDENTIFIER: return "Identifier";
118            case ROOT: return "Root";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123    }
124
125  public static class NamingSystemTypeEnumFactory implements EnumFactory<NamingSystemType> {
126    public NamingSystemType fromCode(String codeString) throws IllegalArgumentException {
127      if (codeString == null || "".equals(codeString))
128            if (codeString == null || "".equals(codeString))
129                return null;
130        if ("codesystem".equals(codeString))
131          return NamingSystemType.CODESYSTEM;
132        if ("identifier".equals(codeString))
133          return NamingSystemType.IDENTIFIER;
134        if ("root".equals(codeString))
135          return NamingSystemType.ROOT;
136        throw new IllegalArgumentException("Unknown NamingSystemType code '"+codeString+"'");
137        }
138        public Enumeration<NamingSystemType> fromType(Base code) throws FHIRException {
139          if (code == null)
140            return null;
141          if (code.isEmpty())
142            return new Enumeration<NamingSystemType>(this);
143          String codeString = ((PrimitiveType) code).asStringValue();
144          if (codeString == null || "".equals(codeString))
145            return null;
146        if ("codesystem".equals(codeString))
147          return new Enumeration<NamingSystemType>(this, NamingSystemType.CODESYSTEM);
148        if ("identifier".equals(codeString))
149          return new Enumeration<NamingSystemType>(this, NamingSystemType.IDENTIFIER);
150        if ("root".equals(codeString))
151          return new Enumeration<NamingSystemType>(this, NamingSystemType.ROOT);
152        throw new FHIRException("Unknown NamingSystemType code '"+codeString+"'");
153        }
154    public String toCode(NamingSystemType code) {
155      if (code == NamingSystemType.CODESYSTEM)
156        return "codesystem";
157      if (code == NamingSystemType.IDENTIFIER)
158        return "identifier";
159      if (code == NamingSystemType.ROOT)
160        return "root";
161      return "?";
162      }
163    public String toSystem(NamingSystemType code) {
164      return code.getSystem();
165      }
166    }
167
168    public enum NamingSystemIdentifierType {
169        /**
170         * An ISO object identifier; e.g. 1.2.3.4.5.
171         */
172        OID, 
173        /**
174         * A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11.
175         */
176        UUID, 
177        /**
178         * A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org.
179         */
180        URI, 
181        /**
182         * Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC.
183         */
184        OTHER, 
185        /**
186         * added to help the parsers with the generic types
187         */
188        NULL;
189        public static NamingSystemIdentifierType fromCode(String codeString) throws FHIRException {
190            if (codeString == null || "".equals(codeString))
191                return null;
192        if ("oid".equals(codeString))
193          return OID;
194        if ("uuid".equals(codeString))
195          return UUID;
196        if ("uri".equals(codeString))
197          return URI;
198        if ("other".equals(codeString))
199          return OTHER;
200        if (Configuration.isAcceptInvalidEnums())
201          return null;
202        else
203          throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'");
204        }
205        public String toCode() {
206          switch (this) {
207            case OID: return "oid";
208            case UUID: return "uuid";
209            case URI: return "uri";
210            case OTHER: return "other";
211            case NULL: return null;
212            default: return "?";
213          }
214        }
215        public String getSystem() {
216          switch (this) {
217            case OID: return "http://hl7.org/fhir/namingsystem-identifier-type";
218            case UUID: return "http://hl7.org/fhir/namingsystem-identifier-type";
219            case URI: return "http://hl7.org/fhir/namingsystem-identifier-type";
220            case OTHER: return "http://hl7.org/fhir/namingsystem-identifier-type";
221            case NULL: return null;
222            default: return "?";
223          }
224        }
225        public String getDefinition() {
226          switch (this) {
227            case OID: return "An ISO object identifier; e.g. 1.2.3.4.5.";
228            case UUID: return "A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11.";
229            case URI: return "A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org.";
230            case OTHER: return "Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC.";
231            case NULL: return null;
232            default: return "?";
233          }
234        }
235        public String getDisplay() {
236          switch (this) {
237            case OID: return "OID";
238            case UUID: return "UUID";
239            case URI: return "URI";
240            case OTHER: return "Other";
241            case NULL: return null;
242            default: return "?";
243          }
244        }
245    }
246
247  public static class NamingSystemIdentifierTypeEnumFactory implements EnumFactory<NamingSystemIdentifierType> {
248    public NamingSystemIdentifierType fromCode(String codeString) throws IllegalArgumentException {
249      if (codeString == null || "".equals(codeString))
250            if (codeString == null || "".equals(codeString))
251                return null;
252        if ("oid".equals(codeString))
253          return NamingSystemIdentifierType.OID;
254        if ("uuid".equals(codeString))
255          return NamingSystemIdentifierType.UUID;
256        if ("uri".equals(codeString))
257          return NamingSystemIdentifierType.URI;
258        if ("other".equals(codeString))
259          return NamingSystemIdentifierType.OTHER;
260        throw new IllegalArgumentException("Unknown NamingSystemIdentifierType code '"+codeString+"'");
261        }
262        public Enumeration<NamingSystemIdentifierType> fromType(Base code) throws FHIRException {
263          if (code == null)
264            return null;
265          if (code.isEmpty())
266            return new Enumeration<NamingSystemIdentifierType>(this);
267          String codeString = ((PrimitiveType) code).asStringValue();
268          if (codeString == null || "".equals(codeString))
269            return null;
270        if ("oid".equals(codeString))
271          return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.OID);
272        if ("uuid".equals(codeString))
273          return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.UUID);
274        if ("uri".equals(codeString))
275          return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.URI);
276        if ("other".equals(codeString))
277          return new Enumeration<NamingSystemIdentifierType>(this, NamingSystemIdentifierType.OTHER);
278        throw new FHIRException("Unknown NamingSystemIdentifierType code '"+codeString+"'");
279        }
280    public String toCode(NamingSystemIdentifierType code) {
281      if (code == NamingSystemIdentifierType.OID)
282        return "oid";
283      if (code == NamingSystemIdentifierType.UUID)
284        return "uuid";
285      if (code == NamingSystemIdentifierType.URI)
286        return "uri";
287      if (code == NamingSystemIdentifierType.OTHER)
288        return "other";
289      return "?";
290      }
291    public String toSystem(NamingSystemIdentifierType code) {
292      return code.getSystem();
293      }
294    }
295
296    @Block()
297    public static class NamingSystemUniqueIdComponent extends BackboneElement implements IBaseBackboneElement {
298        /**
299         * Identifies the unique identifier scheme used for this particular identifier.
300         */
301        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
302        @Description(shortDefinition="oid | uuid | uri | other", formalDefinition="Identifies the unique identifier scheme used for this particular identifier." )
303        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/namingsystem-identifier-type")
304        protected Enumeration<NamingSystemIdentifierType> type;
305
306        /**
307         * The string that should be sent over the wire to identify the code system or identifier system.
308         */
309        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true)
310        @Description(shortDefinition="The unique identifier", formalDefinition="The string that should be sent over the wire to identify the code system or identifier system." )
311        protected StringType value;
312
313        /**
314         * Indicates whether this identifier is the "preferred" identifier of this type.
315         */
316        @Child(name = "preferred", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
317        @Description(shortDefinition="Is this the id that should be used for this type", formalDefinition="Indicates whether this identifier is the \"preferred\" identifier of this type." )
318        protected BooleanType preferred;
319
320        /**
321         * Notes about the past or intended usage of this identifier.
322         */
323        @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
324        @Description(shortDefinition="Notes about identifier usage", formalDefinition="Notes about the past or intended usage of this identifier." )
325        protected StringType comment;
326
327        /**
328         * Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic.
329         */
330        @Child(name = "period", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=false)
331        @Description(shortDefinition="When is identifier valid?", formalDefinition="Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic." )
332        protected Period period;
333
334        private static final long serialVersionUID = -1458889328L;
335
336    /**
337     * Constructor
338     */
339      public NamingSystemUniqueIdComponent() {
340        super();
341      }
342
343    /**
344     * Constructor
345     */
346      public NamingSystemUniqueIdComponent(Enumeration<NamingSystemIdentifierType> type, StringType value) {
347        super();
348        this.type = type;
349        this.value = value;
350      }
351
352        /**
353         * @return {@link #type} (Identifies the unique identifier scheme used for this particular identifier.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
354         */
355        public Enumeration<NamingSystemIdentifierType> getTypeElement() { 
356          if (this.type == null)
357            if (Configuration.errorOnAutoCreate())
358              throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.type");
359            else if (Configuration.doAutoCreate())
360              this.type = new Enumeration<NamingSystemIdentifierType>(new NamingSystemIdentifierTypeEnumFactory()); // bb
361          return this.type;
362        }
363
364        public boolean hasTypeElement() { 
365          return this.type != null && !this.type.isEmpty();
366        }
367
368        public boolean hasType() { 
369          return this.type != null && !this.type.isEmpty();
370        }
371
372        /**
373         * @param value {@link #type} (Identifies the unique identifier scheme used for this particular identifier.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
374         */
375        public NamingSystemUniqueIdComponent setTypeElement(Enumeration<NamingSystemIdentifierType> value) { 
376          this.type = value;
377          return this;
378        }
379
380        /**
381         * @return Identifies the unique identifier scheme used for this particular identifier.
382         */
383        public NamingSystemIdentifierType getType() { 
384          return this.type == null ? null : this.type.getValue();
385        }
386
387        /**
388         * @param value Identifies the unique identifier scheme used for this particular identifier.
389         */
390        public NamingSystemUniqueIdComponent setType(NamingSystemIdentifierType value) { 
391            if (this.type == null)
392              this.type = new Enumeration<NamingSystemIdentifierType>(new NamingSystemIdentifierTypeEnumFactory());
393            this.type.setValue(value);
394          return this;
395        }
396
397        /**
398         * @return {@link #value} (The string that should be sent over the wire to identify the code system or identifier system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
399         */
400        public StringType getValueElement() { 
401          if (this.value == null)
402            if (Configuration.errorOnAutoCreate())
403              throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.value");
404            else if (Configuration.doAutoCreate())
405              this.value = new StringType(); // bb
406          return this.value;
407        }
408
409        public boolean hasValueElement() { 
410          return this.value != null && !this.value.isEmpty();
411        }
412
413        public boolean hasValue() { 
414          return this.value != null && !this.value.isEmpty();
415        }
416
417        /**
418         * @param value {@link #value} (The string that should be sent over the wire to identify the code system or identifier system.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
419         */
420        public NamingSystemUniqueIdComponent setValueElement(StringType value) { 
421          this.value = value;
422          return this;
423        }
424
425        /**
426         * @return The string that should be sent over the wire to identify the code system or identifier system.
427         */
428        public String getValue() { 
429          return this.value == null ? null : this.value.getValue();
430        }
431
432        /**
433         * @param value The string that should be sent over the wire to identify the code system or identifier system.
434         */
435        public NamingSystemUniqueIdComponent setValue(String value) { 
436            if (this.value == null)
437              this.value = new StringType();
438            this.value.setValue(value);
439          return this;
440        }
441
442        /**
443         * @return {@link #preferred} (Indicates whether this identifier is the "preferred" identifier of this type.). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value
444         */
445        public BooleanType getPreferredElement() { 
446          if (this.preferred == null)
447            if (Configuration.errorOnAutoCreate())
448              throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.preferred");
449            else if (Configuration.doAutoCreate())
450              this.preferred = new BooleanType(); // bb
451          return this.preferred;
452        }
453
454        public boolean hasPreferredElement() { 
455          return this.preferred != null && !this.preferred.isEmpty();
456        }
457
458        public boolean hasPreferred() { 
459          return this.preferred != null && !this.preferred.isEmpty();
460        }
461
462        /**
463         * @param value {@link #preferred} (Indicates whether this identifier is the "preferred" identifier of this type.). This is the underlying object with id, value and extensions. The accessor "getPreferred" gives direct access to the value
464         */
465        public NamingSystemUniqueIdComponent setPreferredElement(BooleanType value) { 
466          this.preferred = value;
467          return this;
468        }
469
470        /**
471         * @return Indicates whether this identifier is the "preferred" identifier of this type.
472         */
473        public boolean getPreferred() { 
474          return this.preferred == null || this.preferred.isEmpty() ? false : this.preferred.getValue();
475        }
476
477        /**
478         * @param value Indicates whether this identifier is the "preferred" identifier of this type.
479         */
480        public NamingSystemUniqueIdComponent setPreferred(boolean value) { 
481            if (this.preferred == null)
482              this.preferred = new BooleanType();
483            this.preferred.setValue(value);
484          return this;
485        }
486
487        /**
488         * @return {@link #comment} (Notes about the past or intended usage of this identifier.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
489         */
490        public StringType getCommentElement() { 
491          if (this.comment == null)
492            if (Configuration.errorOnAutoCreate())
493              throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.comment");
494            else if (Configuration.doAutoCreate())
495              this.comment = new StringType(); // bb
496          return this.comment;
497        }
498
499        public boolean hasCommentElement() { 
500          return this.comment != null && !this.comment.isEmpty();
501        }
502
503        public boolean hasComment() { 
504          return this.comment != null && !this.comment.isEmpty();
505        }
506
507        /**
508         * @param value {@link #comment} (Notes about the past or intended usage of this identifier.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
509         */
510        public NamingSystemUniqueIdComponent setCommentElement(StringType value) { 
511          this.comment = value;
512          return this;
513        }
514
515        /**
516         * @return Notes about the past or intended usage of this identifier.
517         */
518        public String getComment() { 
519          return this.comment == null ? null : this.comment.getValue();
520        }
521
522        /**
523         * @param value Notes about the past or intended usage of this identifier.
524         */
525        public NamingSystemUniqueIdComponent setComment(String value) { 
526          if (Utilities.noString(value))
527            this.comment = null;
528          else {
529            if (this.comment == null)
530              this.comment = new StringType();
531            this.comment.setValue(value);
532          }
533          return this;
534        }
535
536        /**
537         * @return {@link #period} (Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic.)
538         */
539        public Period getPeriod() { 
540          if (this.period == null)
541            if (Configuration.errorOnAutoCreate())
542              throw new Error("Attempt to auto-create NamingSystemUniqueIdComponent.period");
543            else if (Configuration.doAutoCreate())
544              this.period = new Period(); // cc
545          return this.period;
546        }
547
548        public boolean hasPeriod() { 
549          return this.period != null && !this.period.isEmpty();
550        }
551
552        /**
553         * @param value {@link #period} (Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic.)
554         */
555        public NamingSystemUniqueIdComponent setPeriod(Period value) { 
556          this.period = value;
557          return this;
558        }
559
560        protected void listChildren(List<Property> children) {
561          super.listChildren(children);
562          children.add(new Property("type", "code", "Identifies the unique identifier scheme used for this particular identifier.", 0, 1, type));
563          children.add(new Property("value", "string", "The string that should be sent over the wire to identify the code system or identifier system.", 0, 1, value));
564          children.add(new Property("preferred", "boolean", "Indicates whether this identifier is the \"preferred\" identifier of this type.", 0, 1, preferred));
565          children.add(new Property("comment", "string", "Notes about the past or intended usage of this identifier.", 0, 1, comment));
566          children.add(new Property("period", "Period", "Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic.", 0, 1, period));
567        }
568
569        @Override
570        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
571          switch (_hash) {
572          case 3575610: /*type*/  return new Property("type", "code", "Identifies the unique identifier scheme used for this particular identifier.", 0, 1, type);
573          case 111972721: /*value*/  return new Property("value", "string", "The string that should be sent over the wire to identify the code system or identifier system.", 0, 1, value);
574          case -1294005119: /*preferred*/  return new Property("preferred", "boolean", "Indicates whether this identifier is the \"preferred\" identifier of this type.", 0, 1, preferred);
575          case 950398559: /*comment*/  return new Property("comment", "string", "Notes about the past or intended usage of this identifier.", 0, 1, comment);
576          case -991726143: /*period*/  return new Property("period", "Period", "Identifies the period of time over which this identifier is considered appropriate to refer to the naming system.  Outside of this window, the identifier might be non-deterministic.", 0, 1, period);
577          default: return super.getNamedProperty(_hash, _name, _checkValid);
578          }
579
580        }
581
582      @Override
583      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
584        switch (hash) {
585        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<NamingSystemIdentifierType>
586        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
587        case -1294005119: /*preferred*/ return this.preferred == null ? new Base[0] : new Base[] {this.preferred}; // BooleanType
588        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
589        case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
590        default: return super.getProperty(hash, name, checkValid);
591        }
592
593      }
594
595      @Override
596      public Base setProperty(int hash, String name, Base value) throws FHIRException {
597        switch (hash) {
598        case 3575610: // type
599          value = new NamingSystemIdentifierTypeEnumFactory().fromType(castToCode(value));
600          this.type = (Enumeration) value; // Enumeration<NamingSystemIdentifierType>
601          return value;
602        case 111972721: // value
603          this.value = castToString(value); // StringType
604          return value;
605        case -1294005119: // preferred
606          this.preferred = castToBoolean(value); // BooleanType
607          return value;
608        case 950398559: // comment
609          this.comment = castToString(value); // StringType
610          return value;
611        case -991726143: // period
612          this.period = castToPeriod(value); // Period
613          return value;
614        default: return super.setProperty(hash, name, value);
615        }
616
617      }
618
619      @Override
620      public Base setProperty(String name, Base value) throws FHIRException {
621        if (name.equals("type")) {
622          value = new NamingSystemIdentifierTypeEnumFactory().fromType(castToCode(value));
623          this.type = (Enumeration) value; // Enumeration<NamingSystemIdentifierType>
624        } else if (name.equals("value")) {
625          this.value = castToString(value); // StringType
626        } else if (name.equals("preferred")) {
627          this.preferred = castToBoolean(value); // BooleanType
628        } else if (name.equals("comment")) {
629          this.comment = castToString(value); // StringType
630        } else if (name.equals("period")) {
631          this.period = castToPeriod(value); // Period
632        } else
633          return super.setProperty(name, value);
634        return value;
635      }
636
637      @Override
638      public Base makeProperty(int hash, String name) throws FHIRException {
639        switch (hash) {
640        case 3575610:  return getTypeElement();
641        case 111972721:  return getValueElement();
642        case -1294005119:  return getPreferredElement();
643        case 950398559:  return getCommentElement();
644        case -991726143:  return getPeriod(); 
645        default: return super.makeProperty(hash, name);
646        }
647
648      }
649
650      @Override
651      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
652        switch (hash) {
653        case 3575610: /*type*/ return new String[] {"code"};
654        case 111972721: /*value*/ return new String[] {"string"};
655        case -1294005119: /*preferred*/ return new String[] {"boolean"};
656        case 950398559: /*comment*/ return new String[] {"string"};
657        case -991726143: /*period*/ return new String[] {"Period"};
658        default: return super.getTypesForProperty(hash, name);
659        }
660
661      }
662
663      @Override
664      public Base addChild(String name) throws FHIRException {
665        if (name.equals("type")) {
666          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.type");
667        }
668        else if (name.equals("value")) {
669          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.value");
670        }
671        else if (name.equals("preferred")) {
672          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.preferred");
673        }
674        else if (name.equals("comment")) {
675          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.comment");
676        }
677        else if (name.equals("period")) {
678          this.period = new Period();
679          return this.period;
680        }
681        else
682          return super.addChild(name);
683      }
684
685      public NamingSystemUniqueIdComponent copy() {
686        NamingSystemUniqueIdComponent dst = new NamingSystemUniqueIdComponent();
687        copyValues(dst);
688        return dst;
689      }
690
691      public void copyValues(NamingSystemUniqueIdComponent dst) {
692        super.copyValues(dst);
693        dst.type = type == null ? null : type.copy();
694        dst.value = value == null ? null : value.copy();
695        dst.preferred = preferred == null ? null : preferred.copy();
696        dst.comment = comment == null ? null : comment.copy();
697        dst.period = period == null ? null : period.copy();
698      }
699
700      @Override
701      public boolean equalsDeep(Base other_) {
702        if (!super.equalsDeep(other_))
703          return false;
704        if (!(other_ instanceof NamingSystemUniqueIdComponent))
705          return false;
706        NamingSystemUniqueIdComponent o = (NamingSystemUniqueIdComponent) other_;
707        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true) && compareDeep(preferred, o.preferred, true)
708           && compareDeep(comment, o.comment, true) && compareDeep(period, o.period, true);
709      }
710
711      @Override
712      public boolean equalsShallow(Base other_) {
713        if (!super.equalsShallow(other_))
714          return false;
715        if (!(other_ instanceof NamingSystemUniqueIdComponent))
716          return false;
717        NamingSystemUniqueIdComponent o = (NamingSystemUniqueIdComponent) other_;
718        return compareValues(type, o.type, true) && compareValues(value, o.value, true) && compareValues(preferred, o.preferred, true)
719           && compareValues(comment, o.comment, true);
720      }
721
722      public boolean isEmpty() {
723        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value, preferred, comment
724          , period);
725      }
726
727  public String fhirType() {
728    return "NamingSystem.uniqueId";
729
730  }
731
732  }
733
734    /**
735     * Indicates the purpose for the naming system - what kinds of things does it make unique?
736     */
737    @Child(name = "kind", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true)
738    @Description(shortDefinition="codesystem | identifier | root", formalDefinition="Indicates the purpose for the naming system - what kinds of things does it make unique?" )
739    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/namingsystem-type")
740    protected Enumeration<NamingSystemType> kind;
741
742    /**
743     * The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.
744     */
745    @Child(name = "responsible", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
746    @Description(shortDefinition="Who maintains system namespace?", formalDefinition="The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision." )
747    protected StringType responsible;
748
749    /**
750     * Categorizes a naming system for easier search by grouping related naming systems.
751     */
752    @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
753    @Description(shortDefinition="e.g. driver,  provider,  patient, bank etc.", formalDefinition="Categorizes a naming system for easier search by grouping related naming systems." )
754    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/identifier-type")
755    protected CodeableConcept type;
756
757    /**
758     * Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.
759     */
760    @Child(name = "usage", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
761    @Description(shortDefinition="How/where is it used", formalDefinition="Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc." )
762    protected StringType usage;
763
764    /**
765     * Indicates how the system may be identified when referenced in electronic exchange.
766     */
767    @Child(name = "uniqueId", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
768    @Description(shortDefinition="Unique identifiers used for system", formalDefinition="Indicates how the system may be identified when referenced in electronic exchange." )
769    protected List<NamingSystemUniqueIdComponent> uniqueId;
770
771    private static final long serialVersionUID = 1686086580L;
772
773  /**
774   * Constructor
775   */
776    public NamingSystem() {
777      super();
778    }
779
780  /**
781   * Constructor
782   */
783    public NamingSystem(StringType name, Enumeration<PublicationStatus> status, Enumeration<NamingSystemType> kind, DateTimeType date) {
784      super();
785      this.name = name;
786      this.status = status;
787      this.kind = kind;
788      this.date = date;
789    }
790
791    /**
792     * @return {@link #name} (A natural language name identifying the naming system. 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
793     */
794    public StringType getNameElement() { 
795      if (this.name == null)
796        if (Configuration.errorOnAutoCreate())
797          throw new Error("Attempt to auto-create NamingSystem.name");
798        else if (Configuration.doAutoCreate())
799          this.name = new StringType(); // bb
800      return this.name;
801    }
802
803    public boolean hasNameElement() { 
804      return this.name != null && !this.name.isEmpty();
805    }
806
807    public boolean hasName() { 
808      return this.name != null && !this.name.isEmpty();
809    }
810
811    /**
812     * @param value {@link #name} (A natural language name identifying the naming system. 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
813     */
814    public NamingSystem setNameElement(StringType value) { 
815      this.name = value;
816      return this;
817    }
818
819    /**
820     * @return A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.
821     */
822    public String getName() { 
823      return this.name == null ? null : this.name.getValue();
824    }
825
826    /**
827     * @param value A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.
828     */
829    public NamingSystem setName(String value) { 
830        if (this.name == null)
831          this.name = new StringType();
832        this.name.setValue(value);
833      return this;
834    }
835
836    /**
837     * @return {@link #status} (The status of this naming system. 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
838     */
839    public Enumeration<PublicationStatus> getStatusElement() { 
840      if (this.status == null)
841        if (Configuration.errorOnAutoCreate())
842          throw new Error("Attempt to auto-create NamingSystem.status");
843        else if (Configuration.doAutoCreate())
844          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
845      return this.status;
846    }
847
848    public boolean hasStatusElement() { 
849      return this.status != null && !this.status.isEmpty();
850    }
851
852    public boolean hasStatus() { 
853      return this.status != null && !this.status.isEmpty();
854    }
855
856    /**
857     * @param value {@link #status} (The status of this naming system. 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
858     */
859    public NamingSystem setStatusElement(Enumeration<PublicationStatus> value) { 
860      this.status = value;
861      return this;
862    }
863
864    /**
865     * @return The status of this naming system. Enables tracking the life-cycle of the content.
866     */
867    public PublicationStatus getStatus() { 
868      return this.status == null ? null : this.status.getValue();
869    }
870
871    /**
872     * @param value The status of this naming system. Enables tracking the life-cycle of the content.
873     */
874    public NamingSystem setStatus(PublicationStatus value) { 
875        if (this.status == null)
876          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
877        this.status.setValue(value);
878      return this;
879    }
880
881    /**
882     * @return {@link #kind} (Indicates the purpose for the naming system - what kinds of things does it make unique?). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
883     */
884    public Enumeration<NamingSystemType> getKindElement() { 
885      if (this.kind == null)
886        if (Configuration.errorOnAutoCreate())
887          throw new Error("Attempt to auto-create NamingSystem.kind");
888        else if (Configuration.doAutoCreate())
889          this.kind = new Enumeration<NamingSystemType>(new NamingSystemTypeEnumFactory()); // bb
890      return this.kind;
891    }
892
893    public boolean hasKindElement() { 
894      return this.kind != null && !this.kind.isEmpty();
895    }
896
897    public boolean hasKind() { 
898      return this.kind != null && !this.kind.isEmpty();
899    }
900
901    /**
902     * @param value {@link #kind} (Indicates the purpose for the naming system - what kinds of things does it make unique?). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
903     */
904    public NamingSystem setKindElement(Enumeration<NamingSystemType> value) { 
905      this.kind = value;
906      return this;
907    }
908
909    /**
910     * @return Indicates the purpose for the naming system - what kinds of things does it make unique?
911     */
912    public NamingSystemType getKind() { 
913      return this.kind == null ? null : this.kind.getValue();
914    }
915
916    /**
917     * @param value Indicates the purpose for the naming system - what kinds of things does it make unique?
918     */
919    public NamingSystem setKind(NamingSystemType value) { 
920        if (this.kind == null)
921          this.kind = new Enumeration<NamingSystemType>(new NamingSystemTypeEnumFactory());
922        this.kind.setValue(value);
923      return this;
924    }
925
926    /**
927     * @return {@link #date} (The date  (and optionally time) when the naming system 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 naming system changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
928     */
929    public DateTimeType getDateElement() { 
930      if (this.date == null)
931        if (Configuration.errorOnAutoCreate())
932          throw new Error("Attempt to auto-create NamingSystem.date");
933        else if (Configuration.doAutoCreate())
934          this.date = new DateTimeType(); // bb
935      return this.date;
936    }
937
938    public boolean hasDateElement() { 
939      return this.date != null && !this.date.isEmpty();
940    }
941
942    public boolean hasDate() { 
943      return this.date != null && !this.date.isEmpty();
944    }
945
946    /**
947     * @param value {@link #date} (The date  (and optionally time) when the naming system 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 naming system changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
948     */
949    public NamingSystem setDateElement(DateTimeType value) { 
950      this.date = value;
951      return this;
952    }
953
954    /**
955     * @return The date  (and optionally time) when the naming system 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 naming system changes.
956     */
957    public Date getDate() { 
958      return this.date == null ? null : this.date.getValue();
959    }
960
961    /**
962     * @param value The date  (and optionally time) when the naming system 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 naming system changes.
963     */
964    public NamingSystem setDate(Date value) { 
965        if (this.date == null)
966          this.date = new DateTimeType();
967        this.date.setValue(value);
968      return this;
969    }
970
971    /**
972     * @return {@link #publisher} (The name of the organization or individual that published the naming system.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
973     */
974    public StringType getPublisherElement() { 
975      if (this.publisher == null)
976        if (Configuration.errorOnAutoCreate())
977          throw new Error("Attempt to auto-create NamingSystem.publisher");
978        else if (Configuration.doAutoCreate())
979          this.publisher = new StringType(); // bb
980      return this.publisher;
981    }
982
983    public boolean hasPublisherElement() { 
984      return this.publisher != null && !this.publisher.isEmpty();
985    }
986
987    public boolean hasPublisher() { 
988      return this.publisher != null && !this.publisher.isEmpty();
989    }
990
991    /**
992     * @param value {@link #publisher} (The name of the organization or individual that published the naming system.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
993     */
994    public NamingSystem setPublisherElement(StringType value) { 
995      this.publisher = value;
996      return this;
997    }
998
999    /**
1000     * @return The name of the organization or individual that published the naming system.
1001     */
1002    public String getPublisher() { 
1003      return this.publisher == null ? null : this.publisher.getValue();
1004    }
1005
1006    /**
1007     * @param value The name of the organization or individual that published the naming system.
1008     */
1009    public NamingSystem setPublisher(String value) { 
1010      if (Utilities.noString(value))
1011        this.publisher = null;
1012      else {
1013        if (this.publisher == null)
1014          this.publisher = new StringType();
1015        this.publisher.setValue(value);
1016      }
1017      return this;
1018    }
1019
1020    /**
1021     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
1022     */
1023    public List<ContactDetail> getContact() { 
1024      if (this.contact == null)
1025        this.contact = new ArrayList<ContactDetail>();
1026      return this.contact;
1027    }
1028
1029    /**
1030     * @return Returns a reference to <code>this</code> for easy method chaining
1031     */
1032    public NamingSystem setContact(List<ContactDetail> theContact) { 
1033      this.contact = theContact;
1034      return this;
1035    }
1036
1037    public boolean hasContact() { 
1038      if (this.contact == null)
1039        return false;
1040      for (ContactDetail item : this.contact)
1041        if (!item.isEmpty())
1042          return true;
1043      return false;
1044    }
1045
1046    public ContactDetail addContact() { //3
1047      ContactDetail t = new ContactDetail();
1048      if (this.contact == null)
1049        this.contact = new ArrayList<ContactDetail>();
1050      this.contact.add(t);
1051      return t;
1052    }
1053
1054    public NamingSystem addContact(ContactDetail t) { //3
1055      if (t == null)
1056        return this;
1057      if (this.contact == null)
1058        this.contact = new ArrayList<ContactDetail>();
1059      this.contact.add(t);
1060      return this;
1061    }
1062
1063    /**
1064     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
1065     */
1066    public ContactDetail getContactFirstRep() { 
1067      if (getContact().isEmpty()) {
1068        addContact();
1069      }
1070      return getContact().get(0);
1071    }
1072
1073    /**
1074     * @return {@link #responsible} (The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value
1075     */
1076    public StringType getResponsibleElement() { 
1077      if (this.responsible == null)
1078        if (Configuration.errorOnAutoCreate())
1079          throw new Error("Attempt to auto-create NamingSystem.responsible");
1080        else if (Configuration.doAutoCreate())
1081          this.responsible = new StringType(); // bb
1082      return this.responsible;
1083    }
1084
1085    public boolean hasResponsibleElement() { 
1086      return this.responsible != null && !this.responsible.isEmpty();
1087    }
1088
1089    public boolean hasResponsible() { 
1090      return this.responsible != null && !this.responsible.isEmpty();
1091    }
1092
1093    /**
1094     * @param value {@link #responsible} (The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.). This is the underlying object with id, value and extensions. The accessor "getResponsible" gives direct access to the value
1095     */
1096    public NamingSystem setResponsibleElement(StringType value) { 
1097      this.responsible = value;
1098      return this;
1099    }
1100
1101    /**
1102     * @return The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.
1103     */
1104    public String getResponsible() { 
1105      return this.responsible == null ? null : this.responsible.getValue();
1106    }
1107
1108    /**
1109     * @param value The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.
1110     */
1111    public NamingSystem setResponsible(String value) { 
1112      if (Utilities.noString(value))
1113        this.responsible = null;
1114      else {
1115        if (this.responsible == null)
1116          this.responsible = new StringType();
1117        this.responsible.setValue(value);
1118      }
1119      return this;
1120    }
1121
1122    /**
1123     * @return {@link #type} (Categorizes a naming system for easier search by grouping related naming systems.)
1124     */
1125    public CodeableConcept getType() { 
1126      if (this.type == null)
1127        if (Configuration.errorOnAutoCreate())
1128          throw new Error("Attempt to auto-create NamingSystem.type");
1129        else if (Configuration.doAutoCreate())
1130          this.type = new CodeableConcept(); // cc
1131      return this.type;
1132    }
1133
1134    public boolean hasType() { 
1135      return this.type != null && !this.type.isEmpty();
1136    }
1137
1138    /**
1139     * @param value {@link #type} (Categorizes a naming system for easier search by grouping related naming systems.)
1140     */
1141    public NamingSystem setType(CodeableConcept value) { 
1142      this.type = value;
1143      return this;
1144    }
1145
1146    /**
1147     * @return {@link #description} (A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1148     */
1149    public MarkdownType getDescriptionElement() { 
1150      if (this.description == null)
1151        if (Configuration.errorOnAutoCreate())
1152          throw new Error("Attempt to auto-create NamingSystem.description");
1153        else if (Configuration.doAutoCreate())
1154          this.description = new MarkdownType(); // bb
1155      return this.description;
1156    }
1157
1158    public boolean hasDescriptionElement() { 
1159      return this.description != null && !this.description.isEmpty();
1160    }
1161
1162    public boolean hasDescription() { 
1163      return this.description != null && !this.description.isEmpty();
1164    }
1165
1166    /**
1167     * @param value {@link #description} (A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1168     */
1169    public NamingSystem setDescriptionElement(MarkdownType value) { 
1170      this.description = value;
1171      return this;
1172    }
1173
1174    /**
1175     * @return A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.
1176     */
1177    public String getDescription() { 
1178      return this.description == null ? null : this.description.getValue();
1179    }
1180
1181    /**
1182     * @param value A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.
1183     */
1184    public NamingSystem setDescription(String value) { 
1185      if (value == null)
1186        this.description = null;
1187      else {
1188        if (this.description == null)
1189          this.description = new MarkdownType();
1190        this.description.setValue(value);
1191      }
1192      return this;
1193    }
1194
1195    /**
1196     * @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 naming system instances.)
1197     */
1198    public List<UsageContext> getUseContext() { 
1199      if (this.useContext == null)
1200        this.useContext = new ArrayList<UsageContext>();
1201      return this.useContext;
1202    }
1203
1204    /**
1205     * @return Returns a reference to <code>this</code> for easy method chaining
1206     */
1207    public NamingSystem setUseContext(List<UsageContext> theUseContext) { 
1208      this.useContext = theUseContext;
1209      return this;
1210    }
1211
1212    public boolean hasUseContext() { 
1213      if (this.useContext == null)
1214        return false;
1215      for (UsageContext item : this.useContext)
1216        if (!item.isEmpty())
1217          return true;
1218      return false;
1219    }
1220
1221    public UsageContext addUseContext() { //3
1222      UsageContext t = new UsageContext();
1223      if (this.useContext == null)
1224        this.useContext = new ArrayList<UsageContext>();
1225      this.useContext.add(t);
1226      return t;
1227    }
1228
1229    public NamingSystem addUseContext(UsageContext t) { //3
1230      if (t == null)
1231        return this;
1232      if (this.useContext == null)
1233        this.useContext = new ArrayList<UsageContext>();
1234      this.useContext.add(t);
1235      return this;
1236    }
1237
1238    /**
1239     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
1240     */
1241    public UsageContext getUseContextFirstRep() { 
1242      if (getUseContext().isEmpty()) {
1243        addUseContext();
1244      }
1245      return getUseContext().get(0);
1246    }
1247
1248    /**
1249     * @return {@link #jurisdiction} (A legal or geographic region in which the naming system is intended to be used.)
1250     */
1251    public List<CodeableConcept> getJurisdiction() { 
1252      if (this.jurisdiction == null)
1253        this.jurisdiction = new ArrayList<CodeableConcept>();
1254      return this.jurisdiction;
1255    }
1256
1257    /**
1258     * @return Returns a reference to <code>this</code> for easy method chaining
1259     */
1260    public NamingSystem setJurisdiction(List<CodeableConcept> theJurisdiction) { 
1261      this.jurisdiction = theJurisdiction;
1262      return this;
1263    }
1264
1265    public boolean hasJurisdiction() { 
1266      if (this.jurisdiction == null)
1267        return false;
1268      for (CodeableConcept item : this.jurisdiction)
1269        if (!item.isEmpty())
1270          return true;
1271      return false;
1272    }
1273
1274    public CodeableConcept addJurisdiction() { //3
1275      CodeableConcept t = new CodeableConcept();
1276      if (this.jurisdiction == null)
1277        this.jurisdiction = new ArrayList<CodeableConcept>();
1278      this.jurisdiction.add(t);
1279      return t;
1280    }
1281
1282    public NamingSystem addJurisdiction(CodeableConcept t) { //3
1283      if (t == null)
1284        return this;
1285      if (this.jurisdiction == null)
1286        this.jurisdiction = new ArrayList<CodeableConcept>();
1287      this.jurisdiction.add(t);
1288      return this;
1289    }
1290
1291    /**
1292     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
1293     */
1294    public CodeableConcept getJurisdictionFirstRep() { 
1295      if (getJurisdiction().isEmpty()) {
1296        addJurisdiction();
1297      }
1298      return getJurisdiction().get(0);
1299    }
1300
1301    /**
1302     * @return {@link #usage} (Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
1303     */
1304    public StringType getUsageElement() { 
1305      if (this.usage == null)
1306        if (Configuration.errorOnAutoCreate())
1307          throw new Error("Attempt to auto-create NamingSystem.usage");
1308        else if (Configuration.doAutoCreate())
1309          this.usage = new StringType(); // bb
1310      return this.usage;
1311    }
1312
1313    public boolean hasUsageElement() { 
1314      return this.usage != null && !this.usage.isEmpty();
1315    }
1316
1317    public boolean hasUsage() { 
1318      return this.usage != null && !this.usage.isEmpty();
1319    }
1320
1321    /**
1322     * @param value {@link #usage} (Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
1323     */
1324    public NamingSystem setUsageElement(StringType value) { 
1325      this.usage = value;
1326      return this;
1327    }
1328
1329    /**
1330     * @return Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.
1331     */
1332    public String getUsage() { 
1333      return this.usage == null ? null : this.usage.getValue();
1334    }
1335
1336    /**
1337     * @param value Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.
1338     */
1339    public NamingSystem setUsage(String value) { 
1340      if (Utilities.noString(value))
1341        this.usage = null;
1342      else {
1343        if (this.usage == null)
1344          this.usage = new StringType();
1345        this.usage.setValue(value);
1346      }
1347      return this;
1348    }
1349
1350    /**
1351     * @return {@link #uniqueId} (Indicates how the system may be identified when referenced in electronic exchange.)
1352     */
1353    public List<NamingSystemUniqueIdComponent> getUniqueId() { 
1354      if (this.uniqueId == null)
1355        this.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>();
1356      return this.uniqueId;
1357    }
1358
1359    /**
1360     * @return Returns a reference to <code>this</code> for easy method chaining
1361     */
1362    public NamingSystem setUniqueId(List<NamingSystemUniqueIdComponent> theUniqueId) { 
1363      this.uniqueId = theUniqueId;
1364      return this;
1365    }
1366
1367    public boolean hasUniqueId() { 
1368      if (this.uniqueId == null)
1369        return false;
1370      for (NamingSystemUniqueIdComponent item : this.uniqueId)
1371        if (!item.isEmpty())
1372          return true;
1373      return false;
1374    }
1375
1376    public NamingSystemUniqueIdComponent addUniqueId() { //3
1377      NamingSystemUniqueIdComponent t = new NamingSystemUniqueIdComponent();
1378      if (this.uniqueId == null)
1379        this.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>();
1380      this.uniqueId.add(t);
1381      return t;
1382    }
1383
1384    public NamingSystem addUniqueId(NamingSystemUniqueIdComponent t) { //3
1385      if (t == null)
1386        return this;
1387      if (this.uniqueId == null)
1388        this.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>();
1389      this.uniqueId.add(t);
1390      return this;
1391    }
1392
1393    /**
1394     * @return The first repetition of repeating field {@link #uniqueId}, creating it if it does not already exist
1395     */
1396    public NamingSystemUniqueIdComponent getUniqueIdFirstRep() { 
1397      if (getUniqueId().isEmpty()) {
1398        addUniqueId();
1399      }
1400      return getUniqueId().get(0);
1401    }
1402
1403      protected void listChildren(List<Property> children) {
1404        super.listChildren(children);
1405        children.add(new Property("name", "string", "A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
1406        children.add(new Property("status", "code", "The status of this naming system. Enables tracking the life-cycle of the content.", 0, 1, status));
1407        children.add(new Property("kind", "code", "Indicates the purpose for the naming system - what kinds of things does it make unique?", 0, 1, kind));
1408        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the naming system 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 naming system changes.", 0, 1, date));
1409        children.add(new Property("publisher", "string", "The name of the organization or individual that published the naming system.", 0, 1, publisher));
1410        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));
1411        children.add(new Property("responsible", "string", "The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.", 0, 1, responsible));
1412        children.add(new Property("type", "CodeableConcept", "Categorizes a naming system for easier search by grouping related naming systems.", 0, 1, type));
1413        children.add(new Property("description", "markdown", "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", 0, 1, description));
1414        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 naming system instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
1415        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the naming system is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
1416        children.add(new Property("usage", "string", "Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.", 0, 1, usage));
1417        children.add(new Property("uniqueId", "", "Indicates how the system may be identified when referenced in electronic exchange.", 0, java.lang.Integer.MAX_VALUE, uniqueId));
1418      }
1419
1420      @Override
1421      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1422        switch (_hash) {
1423        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
1424        case -892481550: /*status*/  return new Property("status", "code", "The status of this naming system. Enables tracking the life-cycle of the content.", 0, 1, status);
1425        case 3292052: /*kind*/  return new Property("kind", "code", "Indicates the purpose for the naming system - what kinds of things does it make unique?", 0, 1, kind);
1426        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the naming system 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 naming system changes.", 0, 1, date);
1427        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the naming system.", 0, 1, publisher);
1428        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);
1429        case 1847674614: /*responsible*/  return new Property("responsible", "string", "The name of the organization that is responsible for issuing identifiers or codes for this namespace and ensuring their non-collision.", 0, 1, responsible);
1430        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Categorizes a naming system for easier search by grouping related naming systems.", 0, 1, type);
1431        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the naming system from a consumer's perspective. Details about what the namespace identifies including scope, granularity, version labeling, etc.", 0, 1, description);
1432        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 naming system instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
1433        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the naming system is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
1434        case 111574433: /*usage*/  return new Property("usage", "string", "Provides guidance on the use of the namespace, including the handling of formatting characters, use of upper vs. lower case, etc.", 0, 1, usage);
1435        case -294460212: /*uniqueId*/  return new Property("uniqueId", "", "Indicates how the system may be identified when referenced in electronic exchange.", 0, java.lang.Integer.MAX_VALUE, uniqueId);
1436        default: return super.getNamedProperty(_hash, _name, _checkValid);
1437        }
1438
1439      }
1440
1441      @Override
1442      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1443        switch (hash) {
1444        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1445        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
1446        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<NamingSystemType>
1447        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
1448        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
1449        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
1450        case 1847674614: /*responsible*/ return this.responsible == null ? new Base[0] : new Base[] {this.responsible}; // StringType
1451        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1452        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1453        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
1454        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
1455        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
1456        case -294460212: /*uniqueId*/ return this.uniqueId == null ? new Base[0] : this.uniqueId.toArray(new Base[this.uniqueId.size()]); // NamingSystemUniqueIdComponent
1457        default: return super.getProperty(hash, name, checkValid);
1458        }
1459
1460      }
1461
1462      @Override
1463      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1464        switch (hash) {
1465        case 3373707: // name
1466          this.name = castToString(value); // StringType
1467          return value;
1468        case -892481550: // status
1469          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1470          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1471          return value;
1472        case 3292052: // kind
1473          value = new NamingSystemTypeEnumFactory().fromType(castToCode(value));
1474          this.kind = (Enumeration) value; // Enumeration<NamingSystemType>
1475          return value;
1476        case 3076014: // date
1477          this.date = castToDateTime(value); // DateTimeType
1478          return value;
1479        case 1447404028: // publisher
1480          this.publisher = castToString(value); // StringType
1481          return value;
1482        case 951526432: // contact
1483          this.getContact().add(castToContactDetail(value)); // ContactDetail
1484          return value;
1485        case 1847674614: // responsible
1486          this.responsible = castToString(value); // StringType
1487          return value;
1488        case 3575610: // type
1489          this.type = castToCodeableConcept(value); // CodeableConcept
1490          return value;
1491        case -1724546052: // description
1492          this.description = castToMarkdown(value); // MarkdownType
1493          return value;
1494        case -669707736: // useContext
1495          this.getUseContext().add(castToUsageContext(value)); // UsageContext
1496          return value;
1497        case -507075711: // jurisdiction
1498          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
1499          return value;
1500        case 111574433: // usage
1501          this.usage = castToString(value); // StringType
1502          return value;
1503        case -294460212: // uniqueId
1504          this.getUniqueId().add((NamingSystemUniqueIdComponent) value); // NamingSystemUniqueIdComponent
1505          return value;
1506        default: return super.setProperty(hash, name, value);
1507        }
1508
1509      }
1510
1511      @Override
1512      public Base setProperty(String name, Base value) throws FHIRException {
1513        if (name.equals("name")) {
1514          this.name = castToString(value); // StringType
1515        } else if (name.equals("status")) {
1516          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
1517          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
1518        } else if (name.equals("kind")) {
1519          value = new NamingSystemTypeEnumFactory().fromType(castToCode(value));
1520          this.kind = (Enumeration) value; // Enumeration<NamingSystemType>
1521        } else if (name.equals("date")) {
1522          this.date = castToDateTime(value); // DateTimeType
1523        } else if (name.equals("publisher")) {
1524          this.publisher = castToString(value); // StringType
1525        } else if (name.equals("contact")) {
1526          this.getContact().add(castToContactDetail(value));
1527        } else if (name.equals("responsible")) {
1528          this.responsible = castToString(value); // StringType
1529        } else if (name.equals("type")) {
1530          this.type = castToCodeableConcept(value); // CodeableConcept
1531        } else if (name.equals("description")) {
1532          this.description = castToMarkdown(value); // MarkdownType
1533        } else if (name.equals("useContext")) {
1534          this.getUseContext().add(castToUsageContext(value));
1535        } else if (name.equals("jurisdiction")) {
1536          this.getJurisdiction().add(castToCodeableConcept(value));
1537        } else if (name.equals("usage")) {
1538          this.usage = castToString(value); // StringType
1539        } else if (name.equals("uniqueId")) {
1540          this.getUniqueId().add((NamingSystemUniqueIdComponent) value);
1541        } else
1542          return super.setProperty(name, value);
1543        return value;
1544      }
1545
1546      @Override
1547      public Base makeProperty(int hash, String name) throws FHIRException {
1548        switch (hash) {
1549        case 3373707:  return getNameElement();
1550        case -892481550:  return getStatusElement();
1551        case 3292052:  return getKindElement();
1552        case 3076014:  return getDateElement();
1553        case 1447404028:  return getPublisherElement();
1554        case 951526432:  return addContact(); 
1555        case 1847674614:  return getResponsibleElement();
1556        case 3575610:  return getType(); 
1557        case -1724546052:  return getDescriptionElement();
1558        case -669707736:  return addUseContext(); 
1559        case -507075711:  return addJurisdiction(); 
1560        case 111574433:  return getUsageElement();
1561        case -294460212:  return addUniqueId(); 
1562        default: return super.makeProperty(hash, name);
1563        }
1564
1565      }
1566
1567      @Override
1568      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1569        switch (hash) {
1570        case 3373707: /*name*/ return new String[] {"string"};
1571        case -892481550: /*status*/ return new String[] {"code"};
1572        case 3292052: /*kind*/ return new String[] {"code"};
1573        case 3076014: /*date*/ return new String[] {"dateTime"};
1574        case 1447404028: /*publisher*/ return new String[] {"string"};
1575        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
1576        case 1847674614: /*responsible*/ return new String[] {"string"};
1577        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1578        case -1724546052: /*description*/ return new String[] {"markdown"};
1579        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
1580        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
1581        case 111574433: /*usage*/ return new String[] {"string"};
1582        case -294460212: /*uniqueId*/ return new String[] {};
1583        default: return super.getTypesForProperty(hash, name);
1584        }
1585
1586      }
1587
1588      @Override
1589      public Base addChild(String name) throws FHIRException {
1590        if (name.equals("name")) {
1591          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.name");
1592        }
1593        else if (name.equals("status")) {
1594          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.status");
1595        }
1596        else if (name.equals("kind")) {
1597          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.kind");
1598        }
1599        else if (name.equals("date")) {
1600          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.date");
1601        }
1602        else if (name.equals("publisher")) {
1603          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.publisher");
1604        }
1605        else if (name.equals("contact")) {
1606          return addContact();
1607        }
1608        else if (name.equals("responsible")) {
1609          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.responsible");
1610        }
1611        else if (name.equals("type")) {
1612          this.type = new CodeableConcept();
1613          return this.type;
1614        }
1615        else if (name.equals("description")) {
1616          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.description");
1617        }
1618        else if (name.equals("useContext")) {
1619          return addUseContext();
1620        }
1621        else if (name.equals("jurisdiction")) {
1622          return addJurisdiction();
1623        }
1624        else if (name.equals("usage")) {
1625          throw new FHIRException("Cannot call addChild on a primitive type NamingSystem.usage");
1626        }
1627        else if (name.equals("uniqueId")) {
1628          return addUniqueId();
1629        }
1630        else
1631          return super.addChild(name);
1632      }
1633
1634  public String fhirType() {
1635    return "NamingSystem";
1636
1637  }
1638
1639      public NamingSystem copy() {
1640        NamingSystem dst = new NamingSystem();
1641        copyValues(dst);
1642        return dst;
1643      }
1644
1645      public void copyValues(NamingSystem dst) {
1646        super.copyValues(dst);
1647        dst.name = name == null ? null : name.copy();
1648        dst.status = status == null ? null : status.copy();
1649        dst.kind = kind == null ? null : kind.copy();
1650        dst.date = date == null ? null : date.copy();
1651        dst.publisher = publisher == null ? null : publisher.copy();
1652        if (contact != null) {
1653          dst.contact = new ArrayList<ContactDetail>();
1654          for (ContactDetail i : contact)
1655            dst.contact.add(i.copy());
1656        };
1657        dst.responsible = responsible == null ? null : responsible.copy();
1658        dst.type = type == null ? null : type.copy();
1659        dst.description = description == null ? null : description.copy();
1660        if (useContext != null) {
1661          dst.useContext = new ArrayList<UsageContext>();
1662          for (UsageContext i : useContext)
1663            dst.useContext.add(i.copy());
1664        };
1665        if (jurisdiction != null) {
1666          dst.jurisdiction = new ArrayList<CodeableConcept>();
1667          for (CodeableConcept i : jurisdiction)
1668            dst.jurisdiction.add(i.copy());
1669        };
1670        dst.usage = usage == null ? null : usage.copy();
1671        if (uniqueId != null) {
1672          dst.uniqueId = new ArrayList<NamingSystemUniqueIdComponent>();
1673          for (NamingSystemUniqueIdComponent i : uniqueId)
1674            dst.uniqueId.add(i.copy());
1675        };
1676      }
1677
1678      protected NamingSystem typedCopy() {
1679        return copy();
1680      }
1681
1682      @Override
1683      public boolean equalsDeep(Base other_) {
1684        if (!super.equalsDeep(other_))
1685          return false;
1686        if (!(other_ instanceof NamingSystem))
1687          return false;
1688        NamingSystem o = (NamingSystem) other_;
1689        return compareDeep(kind, o.kind, true) && compareDeep(responsible, o.responsible, true) && compareDeep(type, o.type, true)
1690           && compareDeep(usage, o.usage, true) && compareDeep(uniqueId, o.uniqueId, true);
1691      }
1692
1693      @Override
1694      public boolean equalsShallow(Base other_) {
1695        if (!super.equalsShallow(other_))
1696          return false;
1697        if (!(other_ instanceof NamingSystem))
1698          return false;
1699        NamingSystem o = (NamingSystem) other_;
1700        return compareValues(kind, o.kind, true) && compareValues(responsible, o.responsible, true) && compareValues(usage, o.usage, true)
1701          ;
1702      }
1703
1704      public boolean isEmpty() {
1705        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, responsible, type
1706          , usage, uniqueId);
1707      }
1708
1709  @Override
1710  public ResourceType getResourceType() {
1711    return ResourceType.NamingSystem;
1712   }
1713
1714 /**
1715   * Search parameter: <b>date</b>
1716   * <p>
1717   * Description: <b>The naming system publication date</b><br>
1718   * Type: <b>date</b><br>
1719   * Path: <b>NamingSystem.date</b><br>
1720   * </p>
1721   */
1722  @SearchParamDefinition(name="date", path="NamingSystem.date", description="The naming system publication date", type="date" )
1723  public static final String SP_DATE = "date";
1724 /**
1725   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1726   * <p>
1727   * Description: <b>The naming system publication date</b><br>
1728   * Type: <b>date</b><br>
1729   * Path: <b>NamingSystem.date</b><br>
1730   * </p>
1731   */
1732  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1733
1734 /**
1735   * Search parameter: <b>period</b>
1736   * <p>
1737   * Description: <b>When is identifier valid?</b><br>
1738   * Type: <b>date</b><br>
1739   * Path: <b>NamingSystem.uniqueId.period</b><br>
1740   * </p>
1741   */
1742  @SearchParamDefinition(name="period", path="NamingSystem.uniqueId.period", description="When is identifier valid?", type="date" )
1743  public static final String SP_PERIOD = "period";
1744 /**
1745   * <b>Fluent Client</b> search parameter constant for <b>period</b>
1746   * <p>
1747   * Description: <b>When is identifier valid?</b><br>
1748   * Type: <b>date</b><br>
1749   * Path: <b>NamingSystem.uniqueId.period</b><br>
1750   * </p>
1751   */
1752  public static final ca.uhn.fhir.rest.gclient.DateClientParam PERIOD = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_PERIOD);
1753
1754 /**
1755   * Search parameter: <b>context-type-value</b>
1756   * <p>
1757   * Description: <b>A use context type and value assigned to the naming system</b><br>
1758   * Type: <b>composite</b><br>
1759   * Path: <b></b><br>
1760   * </p>
1761   */
1762  @SearchParamDefinition(name="context-type-value", path="NamingSystem.useContext", description="A use context type and value assigned to the naming system", type="composite", compositeOf={"context-type", "context"} )
1763  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
1764 /**
1765   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
1766   * <p>
1767   * Description: <b>A use context type and value assigned to the naming system</b><br>
1768   * Type: <b>composite</b><br>
1769   * Path: <b></b><br>
1770   * </p>
1771   */
1772  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);
1773
1774 /**
1775   * Search parameter: <b>kind</b>
1776   * <p>
1777   * Description: <b>codesystem | identifier | root</b><br>
1778   * Type: <b>token</b><br>
1779   * Path: <b>NamingSystem.kind</b><br>
1780   * </p>
1781   */
1782  @SearchParamDefinition(name="kind", path="NamingSystem.kind", description="codesystem | identifier | root", type="token" )
1783  public static final String SP_KIND = "kind";
1784 /**
1785   * <b>Fluent Client</b> search parameter constant for <b>kind</b>
1786   * <p>
1787   * Description: <b>codesystem | identifier | root</b><br>
1788   * Type: <b>token</b><br>
1789   * Path: <b>NamingSystem.kind</b><br>
1790   * </p>
1791   */
1792  public static final ca.uhn.fhir.rest.gclient.TokenClientParam KIND = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_KIND);
1793
1794 /**
1795   * Search parameter: <b>jurisdiction</b>
1796   * <p>
1797   * Description: <b>Intended jurisdiction for the naming system</b><br>
1798   * Type: <b>token</b><br>
1799   * Path: <b>NamingSystem.jurisdiction</b><br>
1800   * </p>
1801   */
1802  @SearchParamDefinition(name="jurisdiction", path="NamingSystem.jurisdiction", description="Intended jurisdiction for the naming system", type="token" )
1803  public static final String SP_JURISDICTION = "jurisdiction";
1804 /**
1805   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
1806   * <p>
1807   * Description: <b>Intended jurisdiction for the naming system</b><br>
1808   * Type: <b>token</b><br>
1809   * Path: <b>NamingSystem.jurisdiction</b><br>
1810   * </p>
1811   */
1812  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
1813
1814 /**
1815   * Search parameter: <b>description</b>
1816   * <p>
1817   * Description: <b>The description of the naming system</b><br>
1818   * Type: <b>string</b><br>
1819   * Path: <b>NamingSystem.description</b><br>
1820   * </p>
1821   */
1822  @SearchParamDefinition(name="description", path="NamingSystem.description", description="The description of the naming system", type="string" )
1823  public static final String SP_DESCRIPTION = "description";
1824 /**
1825   * <b>Fluent Client</b> search parameter constant for <b>description</b>
1826   * <p>
1827   * Description: <b>The description of the naming system</b><br>
1828   * Type: <b>string</b><br>
1829   * Path: <b>NamingSystem.description</b><br>
1830   * </p>
1831   */
1832  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
1833
1834 /**
1835   * Search parameter: <b>context-type</b>
1836   * <p>
1837   * Description: <b>A type of use context assigned to the naming system</b><br>
1838   * Type: <b>token</b><br>
1839   * Path: <b>NamingSystem.useContext.code</b><br>
1840   * </p>
1841   */
1842  @SearchParamDefinition(name="context-type", path="NamingSystem.useContext.code", description="A type of use context assigned to the naming system", type="token" )
1843  public static final String SP_CONTEXT_TYPE = "context-type";
1844 /**
1845   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
1846   * <p>
1847   * Description: <b>A type of use context assigned to the naming system</b><br>
1848   * Type: <b>token</b><br>
1849   * Path: <b>NamingSystem.useContext.code</b><br>
1850   * </p>
1851   */
1852  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
1853
1854 /**
1855   * Search parameter: <b>type</b>
1856   * <p>
1857   * Description: <b>e.g. driver,  provider,  patient, bank etc.</b><br>
1858   * Type: <b>token</b><br>
1859   * Path: <b>NamingSystem.type</b><br>
1860   * </p>
1861   */
1862  @SearchParamDefinition(name="type", path="NamingSystem.type", description="e.g. driver,  provider,  patient, bank etc.", type="token" )
1863  public static final String SP_TYPE = "type";
1864 /**
1865   * <b>Fluent Client</b> search parameter constant for <b>type</b>
1866   * <p>
1867   * Description: <b>e.g. driver,  provider,  patient, bank etc.</b><br>
1868   * Type: <b>token</b><br>
1869   * Path: <b>NamingSystem.type</b><br>
1870   * </p>
1871   */
1872  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
1873
1874 /**
1875   * Search parameter: <b>id-type</b>
1876   * <p>
1877   * Description: <b>oid | uuid | uri | other</b><br>
1878   * Type: <b>token</b><br>
1879   * Path: <b>NamingSystem.uniqueId.type</b><br>
1880   * </p>
1881   */
1882  @SearchParamDefinition(name="id-type", path="NamingSystem.uniqueId.type", description="oid | uuid | uri | other", type="token" )
1883  public static final String SP_ID_TYPE = "id-type";
1884 /**
1885   * <b>Fluent Client</b> search parameter constant for <b>id-type</b>
1886   * <p>
1887   * Description: <b>oid | uuid | uri | other</b><br>
1888   * Type: <b>token</b><br>
1889   * Path: <b>NamingSystem.uniqueId.type</b><br>
1890   * </p>
1891   */
1892  public static final ca.uhn.fhir.rest.gclient.TokenClientParam ID_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ID_TYPE);
1893
1894 /**
1895   * Search parameter: <b>context-quantity</b>
1896   * <p>
1897   * Description: <b>A quantity- or range-valued use context assigned to the naming system</b><br>
1898   * Type: <b>quantity</b><br>
1899   * Path: <b>NamingSystem.useContext.valueQuantity, NamingSystem.useContext.valueRange</b><br>
1900   * </p>
1901   */
1902  @SearchParamDefinition(name="context-quantity", path="(NamingSystem.useContext.value as Quantity) | (NamingSystem.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the naming system", type="quantity" )
1903  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
1904 /**
1905   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
1906   * <p>
1907   * Description: <b>A quantity- or range-valued use context assigned to the naming system</b><br>
1908   * Type: <b>quantity</b><br>
1909   * Path: <b>NamingSystem.useContext.valueQuantity, NamingSystem.useContext.valueRange</b><br>
1910   * </p>
1911   */
1912  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
1913
1914 /**
1915   * Search parameter: <b>responsible</b>
1916   * <p>
1917   * Description: <b>Who maintains system namespace?</b><br>
1918   * Type: <b>string</b><br>
1919   * Path: <b>NamingSystem.responsible</b><br>
1920   * </p>
1921   */
1922  @SearchParamDefinition(name="responsible", path="NamingSystem.responsible", description="Who maintains system namespace?", type="string" )
1923  public static final String SP_RESPONSIBLE = "responsible";
1924 /**
1925   * <b>Fluent Client</b> search parameter constant for <b>responsible</b>
1926   * <p>
1927   * Description: <b>Who maintains system namespace?</b><br>
1928   * Type: <b>string</b><br>
1929   * Path: <b>NamingSystem.responsible</b><br>
1930   * </p>
1931   */
1932  public static final ca.uhn.fhir.rest.gclient.StringClientParam RESPONSIBLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_RESPONSIBLE);
1933
1934 /**
1935   * Search parameter: <b>contact</b>
1936   * <p>
1937   * Description: <b>Name of an individual to contact</b><br>
1938   * Type: <b>string</b><br>
1939   * Path: <b>NamingSystem.contact.name</b><br>
1940   * </p>
1941   */
1942  @SearchParamDefinition(name="contact", path="NamingSystem.contact.name", description="Name of an individual to contact", type="string" )
1943  public static final String SP_CONTACT = "contact";
1944 /**
1945   * <b>Fluent Client</b> search parameter constant for <b>contact</b>
1946   * <p>
1947   * Description: <b>Name of an individual to contact</b><br>
1948   * Type: <b>string</b><br>
1949   * Path: <b>NamingSystem.contact.name</b><br>
1950   * </p>
1951   */
1952  public static final ca.uhn.fhir.rest.gclient.StringClientParam CONTACT = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_CONTACT);
1953
1954 /**
1955   * Search parameter: <b>name</b>
1956   * <p>
1957   * Description: <b>Computationally friendly name of the naming system</b><br>
1958   * Type: <b>string</b><br>
1959   * Path: <b>NamingSystem.name</b><br>
1960   * </p>
1961   */
1962  @SearchParamDefinition(name="name", path="NamingSystem.name", description="Computationally friendly name of the naming system", type="string" )
1963  public static final String SP_NAME = "name";
1964 /**
1965   * <b>Fluent Client</b> search parameter constant for <b>name</b>
1966   * <p>
1967   * Description: <b>Computationally friendly name of the naming system</b><br>
1968   * Type: <b>string</b><br>
1969   * Path: <b>NamingSystem.name</b><br>
1970   * </p>
1971   */
1972  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
1973
1974 /**
1975   * Search parameter: <b>context</b>
1976   * <p>
1977   * Description: <b>A use context assigned to the naming system</b><br>
1978   * Type: <b>token</b><br>
1979   * Path: <b>NamingSystem.useContext.valueCodeableConcept</b><br>
1980   * </p>
1981   */
1982  @SearchParamDefinition(name="context", path="(NamingSystem.useContext.value as CodeableConcept)", description="A use context assigned to the naming system", type="token" )
1983  public static final String SP_CONTEXT = "context";
1984 /**
1985   * <b>Fluent Client</b> search parameter constant for <b>context</b>
1986   * <p>
1987   * Description: <b>A use context assigned to the naming system</b><br>
1988   * Type: <b>token</b><br>
1989   * Path: <b>NamingSystem.useContext.valueCodeableConcept</b><br>
1990   * </p>
1991   */
1992  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
1993
1994 /**
1995   * Search parameter: <b>publisher</b>
1996   * <p>
1997   * Description: <b>Name of the publisher of the naming system</b><br>
1998   * Type: <b>string</b><br>
1999   * Path: <b>NamingSystem.publisher</b><br>
2000   * </p>
2001   */
2002  @SearchParamDefinition(name="publisher", path="NamingSystem.publisher", description="Name of the publisher of the naming system", type="string" )
2003  public static final String SP_PUBLISHER = "publisher";
2004 /**
2005   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
2006   * <p>
2007   * Description: <b>Name of the publisher of the naming system</b><br>
2008   * Type: <b>string</b><br>
2009   * Path: <b>NamingSystem.publisher</b><br>
2010   * </p>
2011   */
2012  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
2013
2014 /**
2015   * Search parameter: <b>telecom</b>
2016   * <p>
2017   * Description: <b>Contact details for individual or organization</b><br>
2018   * Type: <b>token</b><br>
2019   * Path: <b>NamingSystem.contact.telecom</b><br>
2020   * </p>
2021   */
2022  @SearchParamDefinition(name="telecom", path="NamingSystem.contact.telecom", description="Contact details for individual or organization", type="token" )
2023  public static final String SP_TELECOM = "telecom";
2024 /**
2025   * <b>Fluent Client</b> search parameter constant for <b>telecom</b>
2026   * <p>
2027   * Description: <b>Contact details for individual or organization</b><br>
2028   * Type: <b>token</b><br>
2029   * Path: <b>NamingSystem.contact.telecom</b><br>
2030   * </p>
2031   */
2032  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TELECOM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TELECOM);
2033
2034 /**
2035   * Search parameter: <b>value</b>
2036   * <p>
2037   * Description: <b>The unique identifier</b><br>
2038   * Type: <b>string</b><br>
2039   * Path: <b>NamingSystem.uniqueId.value</b><br>
2040   * </p>
2041   */
2042  @SearchParamDefinition(name="value", path="NamingSystem.uniqueId.value", description="The unique identifier", type="string" )
2043  public static final String SP_VALUE = "value";
2044 /**
2045   * <b>Fluent Client</b> search parameter constant for <b>value</b>
2046   * <p>
2047   * Description: <b>The unique identifier</b><br>
2048   * Type: <b>string</b><br>
2049   * Path: <b>NamingSystem.uniqueId.value</b><br>
2050   * </p>
2051   */
2052  public static final ca.uhn.fhir.rest.gclient.StringClientParam VALUE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VALUE);
2053
2054 /**
2055   * Search parameter: <b>context-type-quantity</b>
2056   * <p>
2057   * Description: <b>A use context type and quantity- or range-based value assigned to the naming system</b><br>
2058   * Type: <b>composite</b><br>
2059   * Path: <b></b><br>
2060   * </p>
2061   */
2062  @SearchParamDefinition(name="context-type-quantity", path="NamingSystem.useContext", description="A use context type and quantity- or range-based value assigned to the naming system", type="composite", compositeOf={"context-type", "context-quantity"} )
2063  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
2064 /**
2065   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
2066   * <p>
2067   * Description: <b>A use context type and quantity- or range-based value assigned to the naming system</b><br>
2068   * Type: <b>composite</b><br>
2069   * Path: <b></b><br>
2070   * </p>
2071   */
2072  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);
2073
2074 /**
2075   * Search parameter: <b>status</b>
2076   * <p>
2077   * Description: <b>The current status of the naming system</b><br>
2078   * Type: <b>token</b><br>
2079   * Path: <b>NamingSystem.status</b><br>
2080   * </p>
2081   */
2082  @SearchParamDefinition(name="status", path="NamingSystem.status", description="The current status of the naming system", type="token" )
2083  public static final String SP_STATUS = "status";
2084 /**
2085   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2086   * <p>
2087   * Description: <b>The current status of the naming system</b><br>
2088   * Type: <b>token</b><br>
2089   * Path: <b>NamingSystem.status</b><br>
2090   * </p>
2091   */
2092  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2093
2094
2095}