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