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