001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import org.hl7.fhir.r4.model.Enumerations.*;
038import ca.uhn.fhir.model.api.annotation.ResourceDef;
039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.ChildOrder;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.Block;
044import org.hl7.fhir.instance.model.api.*;
045import org.hl7.fhir.exceptions.FHIRException;
046/**
047 * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.
048 */
049@ResourceDef(name="ConceptMap", profile="http://hl7.org/fhir/Profile/ConceptMap")
050@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "source[x]", "target[x]", "group"})
051public class ConceptMap extends MetadataResource {
052
053    public enum ConceptMapGroupUnmappedMode {
054        /**
055         * Use the code as provided in the $translate request
056         */
057        PROVIDED, 
058        /**
059         * Use the code explicitly provided in the group.unmapped
060         */
061        FIXED, 
062        /**
063         * Use the map identified by the canonical URL in URL
064         */
065        OTHERMAP, 
066        /**
067         * added to help the parsers with the generic types
068         */
069        NULL;
070        public static ConceptMapGroupUnmappedMode fromCode(String codeString) throws FHIRException {
071            if (codeString == null || "".equals(codeString))
072                return null;
073        if ("provided".equals(codeString))
074          return PROVIDED;
075        if ("fixed".equals(codeString))
076          return FIXED;
077        if ("other-map".equals(codeString))
078          return OTHERMAP;
079        if (Configuration.isAcceptInvalidEnums())
080          return null;
081        else
082          throw new FHIRException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
083        }
084        public String toCode() {
085          switch (this) {
086            case PROVIDED: return "provided";
087            case FIXED: return "fixed";
088            case OTHERMAP: return "other-map";
089            default: return "?";
090          }
091        }
092        public String getSystem() {
093          switch (this) {
094            case PROVIDED: return "http://hl7.org/fhir/conceptmap-unmapped-mode";
095            case FIXED: return "http://hl7.org/fhir/conceptmap-unmapped-mode";
096            case OTHERMAP: return "http://hl7.org/fhir/conceptmap-unmapped-mode";
097            default: return "?";
098          }
099        }
100        public String getDefinition() {
101          switch (this) {
102            case PROVIDED: return "Use the code as provided in the $translate request";
103            case FIXED: return "Use the code explicitly provided in the group.unmapped";
104            case OTHERMAP: return "Use the map identified by the canonical URL in URL";
105            default: return "?";
106          }
107        }
108        public String getDisplay() {
109          switch (this) {
110            case PROVIDED: return "Provided Code";
111            case FIXED: return "Fixed Code";
112            case OTHERMAP: return "Other Map";
113            default: return "?";
114          }
115        }
116    }
117
118  public static class ConceptMapGroupUnmappedModeEnumFactory implements EnumFactory<ConceptMapGroupUnmappedMode> {
119    public ConceptMapGroupUnmappedMode fromCode(String codeString) throws IllegalArgumentException {
120      if (codeString == null || "".equals(codeString))
121            if (codeString == null || "".equals(codeString))
122                return null;
123        if ("provided".equals(codeString))
124          return ConceptMapGroupUnmappedMode.PROVIDED;
125        if ("fixed".equals(codeString))
126          return ConceptMapGroupUnmappedMode.FIXED;
127        if ("other-map".equals(codeString))
128          return ConceptMapGroupUnmappedMode.OTHERMAP;
129        throw new IllegalArgumentException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
130        }
131        public Enumeration<ConceptMapGroupUnmappedMode> fromType(Base code) throws FHIRException {
132          if (code == null)
133            return null;
134          if (code.isEmpty())
135            return new Enumeration<ConceptMapGroupUnmappedMode>(this);
136          String codeString = ((PrimitiveType) code).asStringValue();
137          if (codeString == null || "".equals(codeString))
138            return null;
139        if ("provided".equals(codeString))
140          return new Enumeration<ConceptMapGroupUnmappedMode>(this, ConceptMapGroupUnmappedMode.PROVIDED);
141        if ("fixed".equals(codeString))
142          return new Enumeration<ConceptMapGroupUnmappedMode>(this, ConceptMapGroupUnmappedMode.FIXED);
143        if ("other-map".equals(codeString))
144          return new Enumeration<ConceptMapGroupUnmappedMode>(this, ConceptMapGroupUnmappedMode.OTHERMAP);
145        throw new FHIRException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
146        }
147    public String toCode(ConceptMapGroupUnmappedMode code) {
148      if (code == ConceptMapGroupUnmappedMode.PROVIDED)
149        return "provided";
150      if (code == ConceptMapGroupUnmappedMode.FIXED)
151        return "fixed";
152      if (code == ConceptMapGroupUnmappedMode.OTHERMAP)
153        return "other-map";
154      return "?";
155      }
156    public String toSystem(ConceptMapGroupUnmappedMode code) {
157      return code.getSystem();
158      }
159    }
160
161    @Block()
162    public static class ConceptMapGroupComponent extends BackboneElement implements IBaseBackboneElement {
163        /**
164         * An absolute URI that identifies the source system where the concepts to be mapped are defined.
165         */
166        @Child(name = "source", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false)
167        @Description(shortDefinition="Source system where concepts to be mapped are defined", formalDefinition="An absolute URI that identifies the source system where the concepts to be mapped are defined." )
168        protected UriType source;
169
170        /**
171         * The specific version of the code system, as determined by the code system authority.
172         */
173        @Child(name = "sourceVersion", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
174        @Description(shortDefinition="Specific version of the  code system", formalDefinition="The specific version of the code system, as determined by the code system authority." )
175        protected StringType sourceVersion;
176
177        /**
178         * An absolute URI that identifies the target system that the concepts will be mapped to.
179         */
180        @Child(name = "target", type = {UriType.class}, order=3, min=0, max=1, modifier=false, summary=false)
181        @Description(shortDefinition="Target system that the concepts are to be mapped to", formalDefinition="An absolute URI that identifies the target system that the concepts will be mapped to." )
182        protected UriType target;
183
184        /**
185         * The specific version of the code system, as determined by the code system authority.
186         */
187        @Child(name = "targetVersion", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
188        @Description(shortDefinition="Specific version of the  code system", formalDefinition="The specific version of the code system, as determined by the code system authority." )
189        protected StringType targetVersion;
190
191        /**
192         * Mappings for an individual concept in the source to one or more concepts in the target.
193         */
194        @Child(name = "element", type = {}, order=5, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
195        @Description(shortDefinition="Mappings for a concept from the source set", formalDefinition="Mappings for an individual concept in the source to one or more concepts in the target." )
196        protected List<SourceElementComponent> element;
197
198        /**
199         * What to do when there is no match for the source concept in the target system designated for the group and no mapping is able to be made.
200         */
201        @Child(name = "unmapped", type = {}, order=6, min=0, max=1, modifier=false, summary=false)
202        @Description(shortDefinition="When there is no match for the source concept in the target system, so no mapping is available", formalDefinition="What to do when there is no match for the source concept in the target system designated for the group and no mapping is able to be made." )
203        protected ConceptMapGroupUnmappedComponent unmapped;
204
205        private static final long serialVersionUID = 1606357508L;
206
207    /**
208     * Constructor
209     */
210      public ConceptMapGroupComponent() {
211        super();
212      }
213
214        /**
215         * @return {@link #source} (An absolute URI that identifies the source system where the concepts to be mapped are defined.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
216         */
217        public UriType getSourceElement() { 
218          if (this.source == null)
219            if (Configuration.errorOnAutoCreate())
220              throw new Error("Attempt to auto-create ConceptMapGroupComponent.source");
221            else if (Configuration.doAutoCreate())
222              this.source = new UriType(); // bb
223          return this.source;
224        }
225
226        public boolean hasSourceElement() { 
227          return this.source != null && !this.source.isEmpty();
228        }
229
230        public boolean hasSource() { 
231          return this.source != null && !this.source.isEmpty();
232        }
233
234        /**
235         * @param value {@link #source} (An absolute URI that identifies the source system where the concepts to be mapped are defined.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
236         */
237        public ConceptMapGroupComponent setSourceElement(UriType value) { 
238          this.source = value;
239          return this;
240        }
241
242        /**
243         * @return An absolute URI that identifies the source system where the concepts to be mapped are defined.
244         */
245        public String getSource() { 
246          return this.source == null ? null : this.source.getValue();
247        }
248
249        /**
250         * @param value An absolute URI that identifies the source system where the concepts to be mapped are defined.
251         */
252        public ConceptMapGroupComponent setSource(String value) { 
253          if (Utilities.noString(value))
254            this.source = null;
255          else {
256            if (this.source == null)
257              this.source = new UriType();
258            this.source.setValue(value);
259          }
260          return this;
261        }
262
263        /**
264         * @return {@link #sourceVersion} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getSourceVersion" gives direct access to the value
265         */
266        public StringType getSourceVersionElement() { 
267          if (this.sourceVersion == null)
268            if (Configuration.errorOnAutoCreate())
269              throw new Error("Attempt to auto-create ConceptMapGroupComponent.sourceVersion");
270            else if (Configuration.doAutoCreate())
271              this.sourceVersion = new StringType(); // bb
272          return this.sourceVersion;
273        }
274
275        public boolean hasSourceVersionElement() { 
276          return this.sourceVersion != null && !this.sourceVersion.isEmpty();
277        }
278
279        public boolean hasSourceVersion() { 
280          return this.sourceVersion != null && !this.sourceVersion.isEmpty();
281        }
282
283        /**
284         * @param value {@link #sourceVersion} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getSourceVersion" gives direct access to the value
285         */
286        public ConceptMapGroupComponent setSourceVersionElement(StringType value) { 
287          this.sourceVersion = value;
288          return this;
289        }
290
291        /**
292         * @return The specific version of the code system, as determined by the code system authority.
293         */
294        public String getSourceVersion() { 
295          return this.sourceVersion == null ? null : this.sourceVersion.getValue();
296        }
297
298        /**
299         * @param value The specific version of the code system, as determined by the code system authority.
300         */
301        public ConceptMapGroupComponent setSourceVersion(String value) { 
302          if (Utilities.noString(value))
303            this.sourceVersion = null;
304          else {
305            if (this.sourceVersion == null)
306              this.sourceVersion = new StringType();
307            this.sourceVersion.setValue(value);
308          }
309          return this;
310        }
311
312        /**
313         * @return {@link #target} (An absolute URI that identifies the target system that the concepts will be mapped to.). This is the underlying object with id, value and extensions. The accessor "getTarget" gives direct access to the value
314         */
315        public UriType getTargetElement() { 
316          if (this.target == null)
317            if (Configuration.errorOnAutoCreate())
318              throw new Error("Attempt to auto-create ConceptMapGroupComponent.target");
319            else if (Configuration.doAutoCreate())
320              this.target = new UriType(); // bb
321          return this.target;
322        }
323
324        public boolean hasTargetElement() { 
325          return this.target != null && !this.target.isEmpty();
326        }
327
328        public boolean hasTarget() { 
329          return this.target != null && !this.target.isEmpty();
330        }
331
332        /**
333         * @param value {@link #target} (An absolute URI that identifies the target system that the concepts will be mapped to.). This is the underlying object with id, value and extensions. The accessor "getTarget" gives direct access to the value
334         */
335        public ConceptMapGroupComponent setTargetElement(UriType value) { 
336          this.target = value;
337          return this;
338        }
339
340        /**
341         * @return An absolute URI that identifies the target system that the concepts will be mapped to.
342         */
343        public String getTarget() { 
344          return this.target == null ? null : this.target.getValue();
345        }
346
347        /**
348         * @param value An absolute URI that identifies the target system that the concepts will be mapped to.
349         */
350        public ConceptMapGroupComponent setTarget(String value) { 
351          if (Utilities.noString(value))
352            this.target = null;
353          else {
354            if (this.target == null)
355              this.target = new UriType();
356            this.target.setValue(value);
357          }
358          return this;
359        }
360
361        /**
362         * @return {@link #targetVersion} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getTargetVersion" gives direct access to the value
363         */
364        public StringType getTargetVersionElement() { 
365          if (this.targetVersion == null)
366            if (Configuration.errorOnAutoCreate())
367              throw new Error("Attempt to auto-create ConceptMapGroupComponent.targetVersion");
368            else if (Configuration.doAutoCreate())
369              this.targetVersion = new StringType(); // bb
370          return this.targetVersion;
371        }
372
373        public boolean hasTargetVersionElement() { 
374          return this.targetVersion != null && !this.targetVersion.isEmpty();
375        }
376
377        public boolean hasTargetVersion() { 
378          return this.targetVersion != null && !this.targetVersion.isEmpty();
379        }
380
381        /**
382         * @param value {@link #targetVersion} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getTargetVersion" gives direct access to the value
383         */
384        public ConceptMapGroupComponent setTargetVersionElement(StringType value) { 
385          this.targetVersion = value;
386          return this;
387        }
388
389        /**
390         * @return The specific version of the code system, as determined by the code system authority.
391         */
392        public String getTargetVersion() { 
393          return this.targetVersion == null ? null : this.targetVersion.getValue();
394        }
395
396        /**
397         * @param value The specific version of the code system, as determined by the code system authority.
398         */
399        public ConceptMapGroupComponent setTargetVersion(String value) { 
400          if (Utilities.noString(value))
401            this.targetVersion = null;
402          else {
403            if (this.targetVersion == null)
404              this.targetVersion = new StringType();
405            this.targetVersion.setValue(value);
406          }
407          return this;
408        }
409
410        /**
411         * @return {@link #element} (Mappings for an individual concept in the source to one or more concepts in the target.)
412         */
413        public List<SourceElementComponent> getElement() { 
414          if (this.element == null)
415            this.element = new ArrayList<SourceElementComponent>();
416          return this.element;
417        }
418
419        /**
420         * @return Returns a reference to <code>this</code> for easy method chaining
421         */
422        public ConceptMapGroupComponent setElement(List<SourceElementComponent> theElement) { 
423          this.element = theElement;
424          return this;
425        }
426
427        public boolean hasElement() { 
428          if (this.element == null)
429            return false;
430          for (SourceElementComponent item : this.element)
431            if (!item.isEmpty())
432              return true;
433          return false;
434        }
435
436        public SourceElementComponent addElement() { //3
437          SourceElementComponent t = new SourceElementComponent();
438          if (this.element == null)
439            this.element = new ArrayList<SourceElementComponent>();
440          this.element.add(t);
441          return t;
442        }
443
444        public ConceptMapGroupComponent addElement(SourceElementComponent t) { //3
445          if (t == null)
446            return this;
447          if (this.element == null)
448            this.element = new ArrayList<SourceElementComponent>();
449          this.element.add(t);
450          return this;
451        }
452
453        /**
454         * @return The first repetition of repeating field {@link #element}, creating it if it does not already exist
455         */
456        public SourceElementComponent getElementFirstRep() { 
457          if (getElement().isEmpty()) {
458            addElement();
459          }
460          return getElement().get(0);
461        }
462
463        /**
464         * @return {@link #unmapped} (What to do when there is no match for the source concept in the target system designated for the group and no mapping is able to be made.)
465         */
466        public ConceptMapGroupUnmappedComponent getUnmapped() { 
467          if (this.unmapped == null)
468            if (Configuration.errorOnAutoCreate())
469              throw new Error("Attempt to auto-create ConceptMapGroupComponent.unmapped");
470            else if (Configuration.doAutoCreate())
471              this.unmapped = new ConceptMapGroupUnmappedComponent(); // cc
472          return this.unmapped;
473        }
474
475        public boolean hasUnmapped() { 
476          return this.unmapped != null && !this.unmapped.isEmpty();
477        }
478
479        /**
480         * @param value {@link #unmapped} (What to do when there is no match for the source concept in the target system designated for the group and no mapping is able to be made.)
481         */
482        public ConceptMapGroupComponent setUnmapped(ConceptMapGroupUnmappedComponent value) { 
483          this.unmapped = value;
484          return this;
485        }
486
487        protected void listChildren(List<Property> children) {
488          super.listChildren(children);
489          children.add(new Property("source", "uri", "An absolute URI that identifies the source system where the concepts to be mapped are defined.", 0, 1, source));
490          children.add(new Property("sourceVersion", "string", "The specific version of the code system, as determined by the code system authority.", 0, 1, sourceVersion));
491          children.add(new Property("target", "uri", "An absolute URI that identifies the target system that the concepts will be mapped to.", 0, 1, target));
492          children.add(new Property("targetVersion", "string", "The specific version of the code system, as determined by the code system authority.", 0, 1, targetVersion));
493          children.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element));
494          children.add(new Property("unmapped", "", "What to do when there is no match for the source concept in the target system designated for the group and no mapping is able to be made.", 0, 1, unmapped));
495        }
496
497        @Override
498        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
499          switch (_hash) {
500          case -896505829: /*source*/  return new Property("source", "uri", "An absolute URI that identifies the source system where the concepts to be mapped are defined.", 0, 1, source);
501          case 446171197: /*sourceVersion*/  return new Property("sourceVersion", "string", "The specific version of the code system, as determined by the code system authority.", 0, 1, sourceVersion);
502          case -880905839: /*target*/  return new Property("target", "uri", "An absolute URI that identifies the target system that the concepts will be mapped to.", 0, 1, target);
503          case -1639412217: /*targetVersion*/  return new Property("targetVersion", "string", "The specific version of the code system, as determined by the code system authority.", 0, 1, targetVersion);
504          case -1662836996: /*element*/  return new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element);
505          case -194857460: /*unmapped*/  return new Property("unmapped", "", "What to do when there is no match for the source concept in the target system designated for the group and no mapping is able to be made.", 0, 1, unmapped);
506          default: return super.getNamedProperty(_hash, _name, _checkValid);
507          }
508
509        }
510
511      @Override
512      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
513        switch (hash) {
514        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType
515        case 446171197: /*sourceVersion*/ return this.sourceVersion == null ? new Base[0] : new Base[] {this.sourceVersion}; // StringType
516        case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // UriType
517        case -1639412217: /*targetVersion*/ return this.targetVersion == null ? new Base[0] : new Base[] {this.targetVersion}; // StringType
518        case -1662836996: /*element*/ return this.element == null ? new Base[0] : this.element.toArray(new Base[this.element.size()]); // SourceElementComponent
519        case -194857460: /*unmapped*/ return this.unmapped == null ? new Base[0] : new Base[] {this.unmapped}; // ConceptMapGroupUnmappedComponent
520        default: return super.getProperty(hash, name, checkValid);
521        }
522
523      }
524
525      @Override
526      public Base setProperty(int hash, String name, Base value) throws FHIRException {
527        switch (hash) {
528        case -896505829: // source
529          this.source = castToUri(value); // UriType
530          return value;
531        case 446171197: // sourceVersion
532          this.sourceVersion = castToString(value); // StringType
533          return value;
534        case -880905839: // target
535          this.target = castToUri(value); // UriType
536          return value;
537        case -1639412217: // targetVersion
538          this.targetVersion = castToString(value); // StringType
539          return value;
540        case -1662836996: // element
541          this.getElement().add((SourceElementComponent) value); // SourceElementComponent
542          return value;
543        case -194857460: // unmapped
544          this.unmapped = (ConceptMapGroupUnmappedComponent) value; // ConceptMapGroupUnmappedComponent
545          return value;
546        default: return super.setProperty(hash, name, value);
547        }
548
549      }
550
551      @Override
552      public Base setProperty(String name, Base value) throws FHIRException {
553        if (name.equals("source")) {
554          this.source = castToUri(value); // UriType
555        } else if (name.equals("sourceVersion")) {
556          this.sourceVersion = castToString(value); // StringType
557        } else if (name.equals("target")) {
558          this.target = castToUri(value); // UriType
559        } else if (name.equals("targetVersion")) {
560          this.targetVersion = castToString(value); // StringType
561        } else if (name.equals("element")) {
562          this.getElement().add((SourceElementComponent) value);
563        } else if (name.equals("unmapped")) {
564          this.unmapped = (ConceptMapGroupUnmappedComponent) value; // ConceptMapGroupUnmappedComponent
565        } else
566          return super.setProperty(name, value);
567        return value;
568      }
569
570      @Override
571      public Base makeProperty(int hash, String name) throws FHIRException {
572        switch (hash) {
573        case -896505829:  return getSourceElement();
574        case 446171197:  return getSourceVersionElement();
575        case -880905839:  return getTargetElement();
576        case -1639412217:  return getTargetVersionElement();
577        case -1662836996:  return addElement(); 
578        case -194857460:  return getUnmapped(); 
579        default: return super.makeProperty(hash, name);
580        }
581
582      }
583
584      @Override
585      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
586        switch (hash) {
587        case -896505829: /*source*/ return new String[] {"uri"};
588        case 446171197: /*sourceVersion*/ return new String[] {"string"};
589        case -880905839: /*target*/ return new String[] {"uri"};
590        case -1639412217: /*targetVersion*/ return new String[] {"string"};
591        case -1662836996: /*element*/ return new String[] {};
592        case -194857460: /*unmapped*/ return new String[] {};
593        default: return super.getTypesForProperty(hash, name);
594        }
595
596      }
597
598      @Override
599      public Base addChild(String name) throws FHIRException {
600        if (name.equals("source")) {
601          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.source");
602        }
603        else if (name.equals("sourceVersion")) {
604          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.sourceVersion");
605        }
606        else if (name.equals("target")) {
607          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.target");
608        }
609        else if (name.equals("targetVersion")) {
610          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.targetVersion");
611        }
612        else if (name.equals("element")) {
613          return addElement();
614        }
615        else if (name.equals("unmapped")) {
616          this.unmapped = new ConceptMapGroupUnmappedComponent();
617          return this.unmapped;
618        }
619        else
620          return super.addChild(name);
621      }
622
623      public ConceptMapGroupComponent copy() {
624        ConceptMapGroupComponent dst = new ConceptMapGroupComponent();
625        copyValues(dst);
626        dst.source = source == null ? null : source.copy();
627        dst.sourceVersion = sourceVersion == null ? null : sourceVersion.copy();
628        dst.target = target == null ? null : target.copy();
629        dst.targetVersion = targetVersion == null ? null : targetVersion.copy();
630        if (element != null) {
631          dst.element = new ArrayList<SourceElementComponent>();
632          for (SourceElementComponent i : element)
633            dst.element.add(i.copy());
634        };
635        dst.unmapped = unmapped == null ? null : unmapped.copy();
636        return dst;
637      }
638
639      @Override
640      public boolean equalsDeep(Base other_) {
641        if (!super.equalsDeep(other_))
642          return false;
643        if (!(other_ instanceof ConceptMapGroupComponent))
644          return false;
645        ConceptMapGroupComponent o = (ConceptMapGroupComponent) other_;
646        return compareDeep(source, o.source, true) && compareDeep(sourceVersion, o.sourceVersion, true)
647           && compareDeep(target, o.target, true) && compareDeep(targetVersion, o.targetVersion, true) && compareDeep(element, o.element, true)
648           && compareDeep(unmapped, o.unmapped, true);
649      }
650
651      @Override
652      public boolean equalsShallow(Base other_) {
653        if (!super.equalsShallow(other_))
654          return false;
655        if (!(other_ instanceof ConceptMapGroupComponent))
656          return false;
657        ConceptMapGroupComponent o = (ConceptMapGroupComponent) other_;
658        return compareValues(source, o.source, true) && compareValues(sourceVersion, o.sourceVersion, true)
659           && compareValues(target, o.target, true) && compareValues(targetVersion, o.targetVersion, true);
660      }
661
662      public boolean isEmpty() {
663        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(source, sourceVersion, target
664          , targetVersion, element, unmapped);
665      }
666
667  public String fhirType() {
668    return "ConceptMap.group";
669
670  }
671
672  }
673
674    @Block()
675    public static class SourceElementComponent extends BackboneElement implements IBaseBackboneElement {
676        /**
677         * Identity (code or path) or the element/item being mapped.
678         */
679        @Child(name = "code", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
680        @Description(shortDefinition="Identifies element being mapped", formalDefinition="Identity (code or path) or the element/item being mapped." )
681        protected CodeType code;
682
683        /**
684         * The display for the code. The display is only provided to help editors when editing the concept map.
685         */
686        @Child(name = "display", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
687        @Description(shortDefinition="Display for the code", formalDefinition="The display for the code. The display is only provided to help editors when editing the concept map." )
688        protected StringType display;
689
690        /**
691         * A concept from the target value set that this concept maps to.
692         */
693        @Child(name = "target", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
694        @Description(shortDefinition="Concept in target system for element", formalDefinition="A concept from the target value set that this concept maps to." )
695        protected List<TargetElementComponent> target;
696
697        private static final long serialVersionUID = -1115258852L;
698
699    /**
700     * Constructor
701     */
702      public SourceElementComponent() {
703        super();
704      }
705
706        /**
707         * @return {@link #code} (Identity (code or path) or the element/item being mapped.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
708         */
709        public CodeType getCodeElement() { 
710          if (this.code == null)
711            if (Configuration.errorOnAutoCreate())
712              throw new Error("Attempt to auto-create SourceElementComponent.code");
713            else if (Configuration.doAutoCreate())
714              this.code = new CodeType(); // bb
715          return this.code;
716        }
717
718        public boolean hasCodeElement() { 
719          return this.code != null && !this.code.isEmpty();
720        }
721
722        public boolean hasCode() { 
723          return this.code != null && !this.code.isEmpty();
724        }
725
726        /**
727         * @param value {@link #code} (Identity (code or path) or the element/item being mapped.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
728         */
729        public SourceElementComponent setCodeElement(CodeType value) { 
730          this.code = value;
731          return this;
732        }
733
734        /**
735         * @return Identity (code or path) or the element/item being mapped.
736         */
737        public String getCode() { 
738          return this.code == null ? null : this.code.getValue();
739        }
740
741        /**
742         * @param value Identity (code or path) or the element/item being mapped.
743         */
744        public SourceElementComponent setCode(String value) { 
745          if (Utilities.noString(value))
746            this.code = null;
747          else {
748            if (this.code == null)
749              this.code = new CodeType();
750            this.code.setValue(value);
751          }
752          return this;
753        }
754
755        /**
756         * @return {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
757         */
758        public StringType getDisplayElement() { 
759          if (this.display == null)
760            if (Configuration.errorOnAutoCreate())
761              throw new Error("Attempt to auto-create SourceElementComponent.display");
762            else if (Configuration.doAutoCreate())
763              this.display = new StringType(); // bb
764          return this.display;
765        }
766
767        public boolean hasDisplayElement() { 
768          return this.display != null && !this.display.isEmpty();
769        }
770
771        public boolean hasDisplay() { 
772          return this.display != null && !this.display.isEmpty();
773        }
774
775        /**
776         * @param value {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
777         */
778        public SourceElementComponent setDisplayElement(StringType value) { 
779          this.display = value;
780          return this;
781        }
782
783        /**
784         * @return The display for the code. The display is only provided to help editors when editing the concept map.
785         */
786        public String getDisplay() { 
787          return this.display == null ? null : this.display.getValue();
788        }
789
790        /**
791         * @param value The display for the code. The display is only provided to help editors when editing the concept map.
792         */
793        public SourceElementComponent setDisplay(String value) { 
794          if (Utilities.noString(value))
795            this.display = null;
796          else {
797            if (this.display == null)
798              this.display = new StringType();
799            this.display.setValue(value);
800          }
801          return this;
802        }
803
804        /**
805         * @return {@link #target} (A concept from the target value set that this concept maps to.)
806         */
807        public List<TargetElementComponent> getTarget() { 
808          if (this.target == null)
809            this.target = new ArrayList<TargetElementComponent>();
810          return this.target;
811        }
812
813        /**
814         * @return Returns a reference to <code>this</code> for easy method chaining
815         */
816        public SourceElementComponent setTarget(List<TargetElementComponent> theTarget) { 
817          this.target = theTarget;
818          return this;
819        }
820
821        public boolean hasTarget() { 
822          if (this.target == null)
823            return false;
824          for (TargetElementComponent item : this.target)
825            if (!item.isEmpty())
826              return true;
827          return false;
828        }
829
830        public TargetElementComponent addTarget() { //3
831          TargetElementComponent t = new TargetElementComponent();
832          if (this.target == null)
833            this.target = new ArrayList<TargetElementComponent>();
834          this.target.add(t);
835          return t;
836        }
837
838        public SourceElementComponent addTarget(TargetElementComponent t) { //3
839          if (t == null)
840            return this;
841          if (this.target == null)
842            this.target = new ArrayList<TargetElementComponent>();
843          this.target.add(t);
844          return this;
845        }
846
847        /**
848         * @return The first repetition of repeating field {@link #target}, creating it if it does not already exist
849         */
850        public TargetElementComponent getTargetFirstRep() { 
851          if (getTarget().isEmpty()) {
852            addTarget();
853          }
854          return getTarget().get(0);
855        }
856
857        protected void listChildren(List<Property> children) {
858          super.listChildren(children);
859          children.add(new Property("code", "code", "Identity (code or path) or the element/item being mapped.", 0, 1, code));
860          children.add(new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display));
861          children.add(new Property("target", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, target));
862        }
863
864        @Override
865        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
866          switch (_hash) {
867          case 3059181: /*code*/  return new Property("code", "code", "Identity (code or path) or the element/item being mapped.", 0, 1, code);
868          case 1671764162: /*display*/  return new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display);
869          case -880905839: /*target*/  return new Property("target", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, target);
870          default: return super.getNamedProperty(_hash, _name, _checkValid);
871          }
872
873        }
874
875      @Override
876      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
877        switch (hash) {
878        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
879        case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
880        case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // TargetElementComponent
881        default: return super.getProperty(hash, name, checkValid);
882        }
883
884      }
885
886      @Override
887      public Base setProperty(int hash, String name, Base value) throws FHIRException {
888        switch (hash) {
889        case 3059181: // code
890          this.code = castToCode(value); // CodeType
891          return value;
892        case 1671764162: // display
893          this.display = castToString(value); // StringType
894          return value;
895        case -880905839: // target
896          this.getTarget().add((TargetElementComponent) value); // TargetElementComponent
897          return value;
898        default: return super.setProperty(hash, name, value);
899        }
900
901      }
902
903      @Override
904      public Base setProperty(String name, Base value) throws FHIRException {
905        if (name.equals("code")) {
906          this.code = castToCode(value); // CodeType
907        } else if (name.equals("display")) {
908          this.display = castToString(value); // StringType
909        } else if (name.equals("target")) {
910          this.getTarget().add((TargetElementComponent) value);
911        } else
912          return super.setProperty(name, value);
913        return value;
914      }
915
916      @Override
917      public Base makeProperty(int hash, String name) throws FHIRException {
918        switch (hash) {
919        case 3059181:  return getCodeElement();
920        case 1671764162:  return getDisplayElement();
921        case -880905839:  return addTarget(); 
922        default: return super.makeProperty(hash, name);
923        }
924
925      }
926
927      @Override
928      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
929        switch (hash) {
930        case 3059181: /*code*/ return new String[] {"code"};
931        case 1671764162: /*display*/ return new String[] {"string"};
932        case -880905839: /*target*/ return new String[] {};
933        default: return super.getTypesForProperty(hash, name);
934        }
935
936      }
937
938      @Override
939      public Base addChild(String name) throws FHIRException {
940        if (name.equals("code")) {
941          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code");
942        }
943        else if (name.equals("display")) {
944          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.display");
945        }
946        else if (name.equals("target")) {
947          return addTarget();
948        }
949        else
950          return super.addChild(name);
951      }
952
953      public SourceElementComponent copy() {
954        SourceElementComponent dst = new SourceElementComponent();
955        copyValues(dst);
956        dst.code = code == null ? null : code.copy();
957        dst.display = display == null ? null : display.copy();
958        if (target != null) {
959          dst.target = new ArrayList<TargetElementComponent>();
960          for (TargetElementComponent i : target)
961            dst.target.add(i.copy());
962        };
963        return dst;
964      }
965
966      @Override
967      public boolean equalsDeep(Base other_) {
968        if (!super.equalsDeep(other_))
969          return false;
970        if (!(other_ instanceof SourceElementComponent))
971          return false;
972        SourceElementComponent o = (SourceElementComponent) other_;
973        return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(target, o.target, true)
974          ;
975      }
976
977      @Override
978      public boolean equalsShallow(Base other_) {
979        if (!super.equalsShallow(other_))
980          return false;
981        if (!(other_ instanceof SourceElementComponent))
982          return false;
983        SourceElementComponent o = (SourceElementComponent) other_;
984        return compareValues(code, o.code, true) && compareValues(display, o.display, true);
985      }
986
987      public boolean isEmpty() {
988        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, target);
989      }
990
991  public String fhirType() {
992    return "ConceptMap.group.element";
993
994  }
995
996  }
997
998    @Block()
999    public static class TargetElementComponent extends BackboneElement implements IBaseBackboneElement {
1000        /**
1001         * Identity (code or path) or the element/item that the map refers to.
1002         */
1003        @Child(name = "code", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1004        @Description(shortDefinition="Code that identifies the target element", formalDefinition="Identity (code or path) or the element/item that the map refers to." )
1005        protected CodeType code;
1006
1007        /**
1008         * The display for the code. The display is only provided to help editors when editing the concept map.
1009         */
1010        @Child(name = "display", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1011        @Description(shortDefinition="Display for the code", formalDefinition="The display for the code. The display is only provided to help editors when editing the concept map." )
1012        protected StringType display;
1013
1014        /**
1015         * The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
1016         */
1017        @Child(name = "equivalence", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=false)
1018        @Description(shortDefinition="relatedto | equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint", formalDefinition="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)." )
1019        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/concept-map-equivalence")
1020        protected Enumeration<ConceptMapEquivalence> equivalence;
1021
1022        /**
1023         * A description of status/issues in mapping that conveys additional information not represented in  the structured data.
1024         */
1025        @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1026        @Description(shortDefinition="Description of status/issues in mapping", formalDefinition="A description of status/issues in mapping that conveys additional information not represented in  the structured data." )
1027        protected StringType comment;
1028
1029        /**
1030         * A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.
1031         */
1032        @Child(name = "dependsOn", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1033        @Description(shortDefinition="Other elements required for this mapping (from context)", formalDefinition="A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value." )
1034        protected List<OtherElementComponent> dependsOn;
1035
1036        /**
1037         * A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.
1038         */
1039        @Child(name = "product", type = {OtherElementComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1040        @Description(shortDefinition="Other concepts that this mapping also produces", formalDefinition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on." )
1041        protected List<OtherElementComponent> product;
1042
1043        private static final long serialVersionUID = -2008997477L;
1044
1045    /**
1046     * Constructor
1047     */
1048      public TargetElementComponent() {
1049        super();
1050      }
1051
1052    /**
1053     * Constructor
1054     */
1055      public TargetElementComponent(Enumeration<ConceptMapEquivalence> equivalence) {
1056        super();
1057        this.equivalence = equivalence;
1058      }
1059
1060        /**
1061         * @return {@link #code} (Identity (code or path) or the element/item that the map refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1062         */
1063        public CodeType getCodeElement() { 
1064          if (this.code == null)
1065            if (Configuration.errorOnAutoCreate())
1066              throw new Error("Attempt to auto-create TargetElementComponent.code");
1067            else if (Configuration.doAutoCreate())
1068              this.code = new CodeType(); // bb
1069          return this.code;
1070        }
1071
1072        public boolean hasCodeElement() { 
1073          return this.code != null && !this.code.isEmpty();
1074        }
1075
1076        public boolean hasCode() { 
1077          return this.code != null && !this.code.isEmpty();
1078        }
1079
1080        /**
1081         * @param value {@link #code} (Identity (code or path) or the element/item that the map refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1082         */
1083        public TargetElementComponent setCodeElement(CodeType value) { 
1084          this.code = value;
1085          return this;
1086        }
1087
1088        /**
1089         * @return Identity (code or path) or the element/item that the map refers to.
1090         */
1091        public String getCode() { 
1092          return this.code == null ? null : this.code.getValue();
1093        }
1094
1095        /**
1096         * @param value Identity (code or path) or the element/item that the map refers to.
1097         */
1098        public TargetElementComponent setCode(String value) { 
1099          if (Utilities.noString(value))
1100            this.code = null;
1101          else {
1102            if (this.code == null)
1103              this.code = new CodeType();
1104            this.code.setValue(value);
1105          }
1106          return this;
1107        }
1108
1109        /**
1110         * @return {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
1111         */
1112        public StringType getDisplayElement() { 
1113          if (this.display == null)
1114            if (Configuration.errorOnAutoCreate())
1115              throw new Error("Attempt to auto-create TargetElementComponent.display");
1116            else if (Configuration.doAutoCreate())
1117              this.display = new StringType(); // bb
1118          return this.display;
1119        }
1120
1121        public boolean hasDisplayElement() { 
1122          return this.display != null && !this.display.isEmpty();
1123        }
1124
1125        public boolean hasDisplay() { 
1126          return this.display != null && !this.display.isEmpty();
1127        }
1128
1129        /**
1130         * @param value {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
1131         */
1132        public TargetElementComponent setDisplayElement(StringType value) { 
1133          this.display = value;
1134          return this;
1135        }
1136
1137        /**
1138         * @return The display for the code. The display is only provided to help editors when editing the concept map.
1139         */
1140        public String getDisplay() { 
1141          return this.display == null ? null : this.display.getValue();
1142        }
1143
1144        /**
1145         * @param value The display for the code. The display is only provided to help editors when editing the concept map.
1146         */
1147        public TargetElementComponent setDisplay(String value) { 
1148          if (Utilities.noString(value))
1149            this.display = null;
1150          else {
1151            if (this.display == null)
1152              this.display = new StringType();
1153            this.display.setValue(value);
1154          }
1155          return this;
1156        }
1157
1158        /**
1159         * @return {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value
1160         */
1161        public Enumeration<ConceptMapEquivalence> getEquivalenceElement() { 
1162          if (this.equivalence == null)
1163            if (Configuration.errorOnAutoCreate())
1164              throw new Error("Attempt to auto-create TargetElementComponent.equivalence");
1165            else if (Configuration.doAutoCreate())
1166              this.equivalence = new Enumeration<ConceptMapEquivalence>(new ConceptMapEquivalenceEnumFactory()); // bb
1167          return this.equivalence;
1168        }
1169
1170        public boolean hasEquivalenceElement() { 
1171          return this.equivalence != null && !this.equivalence.isEmpty();
1172        }
1173
1174        public boolean hasEquivalence() { 
1175          return this.equivalence != null && !this.equivalence.isEmpty();
1176        }
1177
1178        /**
1179         * @param value {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value
1180         */
1181        public TargetElementComponent setEquivalenceElement(Enumeration<ConceptMapEquivalence> value) { 
1182          this.equivalence = value;
1183          return this;
1184        }
1185
1186        /**
1187         * @return The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
1188         */
1189        public ConceptMapEquivalence getEquivalence() { 
1190          return this.equivalence == null ? null : this.equivalence.getValue();
1191        }
1192
1193        /**
1194         * @param value The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
1195         */
1196        public TargetElementComponent setEquivalence(ConceptMapEquivalence value) { 
1197            if (this.equivalence == null)
1198              this.equivalence = new Enumeration<ConceptMapEquivalence>(new ConceptMapEquivalenceEnumFactory());
1199            this.equivalence.setValue(value);
1200          return this;
1201        }
1202
1203        /**
1204         * @return {@link #comment} (A description of status/issues in mapping that conveys additional information not represented in  the structured data.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
1205         */
1206        public StringType getCommentElement() { 
1207          if (this.comment == null)
1208            if (Configuration.errorOnAutoCreate())
1209              throw new Error("Attempt to auto-create TargetElementComponent.comment");
1210            else if (Configuration.doAutoCreate())
1211              this.comment = new StringType(); // bb
1212          return this.comment;
1213        }
1214
1215        public boolean hasCommentElement() { 
1216          return this.comment != null && !this.comment.isEmpty();
1217        }
1218
1219        public boolean hasComment() { 
1220          return this.comment != null && !this.comment.isEmpty();
1221        }
1222
1223        /**
1224         * @param value {@link #comment} (A description of status/issues in mapping that conveys additional information not represented in  the structured data.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
1225         */
1226        public TargetElementComponent setCommentElement(StringType value) { 
1227          this.comment = value;
1228          return this;
1229        }
1230
1231        /**
1232         * @return A description of status/issues in mapping that conveys additional information not represented in  the structured data.
1233         */
1234        public String getComment() { 
1235          return this.comment == null ? null : this.comment.getValue();
1236        }
1237
1238        /**
1239         * @param value A description of status/issues in mapping that conveys additional information not represented in  the structured data.
1240         */
1241        public TargetElementComponent setComment(String value) { 
1242          if (Utilities.noString(value))
1243            this.comment = null;
1244          else {
1245            if (this.comment == null)
1246              this.comment = new StringType();
1247            this.comment.setValue(value);
1248          }
1249          return this;
1250        }
1251
1252        /**
1253         * @return {@link #dependsOn} (A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.)
1254         */
1255        public List<OtherElementComponent> getDependsOn() { 
1256          if (this.dependsOn == null)
1257            this.dependsOn = new ArrayList<OtherElementComponent>();
1258          return this.dependsOn;
1259        }
1260
1261        /**
1262         * @return Returns a reference to <code>this</code> for easy method chaining
1263         */
1264        public TargetElementComponent setDependsOn(List<OtherElementComponent> theDependsOn) { 
1265          this.dependsOn = theDependsOn;
1266          return this;
1267        }
1268
1269        public boolean hasDependsOn() { 
1270          if (this.dependsOn == null)
1271            return false;
1272          for (OtherElementComponent item : this.dependsOn)
1273            if (!item.isEmpty())
1274              return true;
1275          return false;
1276        }
1277
1278        public OtherElementComponent addDependsOn() { //3
1279          OtherElementComponent t = new OtherElementComponent();
1280          if (this.dependsOn == null)
1281            this.dependsOn = new ArrayList<OtherElementComponent>();
1282          this.dependsOn.add(t);
1283          return t;
1284        }
1285
1286        public TargetElementComponent addDependsOn(OtherElementComponent t) { //3
1287          if (t == null)
1288            return this;
1289          if (this.dependsOn == null)
1290            this.dependsOn = new ArrayList<OtherElementComponent>();
1291          this.dependsOn.add(t);
1292          return this;
1293        }
1294
1295        /**
1296         * @return The first repetition of repeating field {@link #dependsOn}, creating it if it does not already exist
1297         */
1298        public OtherElementComponent getDependsOnFirstRep() { 
1299          if (getDependsOn().isEmpty()) {
1300            addDependsOn();
1301          }
1302          return getDependsOn().get(0);
1303        }
1304
1305        /**
1306         * @return {@link #product} (A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.)
1307         */
1308        public List<OtherElementComponent> getProduct() { 
1309          if (this.product == null)
1310            this.product = new ArrayList<OtherElementComponent>();
1311          return this.product;
1312        }
1313
1314        /**
1315         * @return Returns a reference to <code>this</code> for easy method chaining
1316         */
1317        public TargetElementComponent setProduct(List<OtherElementComponent> theProduct) { 
1318          this.product = theProduct;
1319          return this;
1320        }
1321
1322        public boolean hasProduct() { 
1323          if (this.product == null)
1324            return false;
1325          for (OtherElementComponent item : this.product)
1326            if (!item.isEmpty())
1327              return true;
1328          return false;
1329        }
1330
1331        public OtherElementComponent addProduct() { //3
1332          OtherElementComponent t = new OtherElementComponent();
1333          if (this.product == null)
1334            this.product = new ArrayList<OtherElementComponent>();
1335          this.product.add(t);
1336          return t;
1337        }
1338
1339        public TargetElementComponent addProduct(OtherElementComponent t) { //3
1340          if (t == null)
1341            return this;
1342          if (this.product == null)
1343            this.product = new ArrayList<OtherElementComponent>();
1344          this.product.add(t);
1345          return this;
1346        }
1347
1348        /**
1349         * @return The first repetition of repeating field {@link #product}, creating it if it does not already exist
1350         */
1351        public OtherElementComponent getProductFirstRep() { 
1352          if (getProduct().isEmpty()) {
1353            addProduct();
1354          }
1355          return getProduct().get(0);
1356        }
1357
1358        protected void listChildren(List<Property> children) {
1359          super.listChildren(children);
1360          children.add(new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, 1, code));
1361          children.add(new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display));
1362          children.add(new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", 0, 1, equivalence));
1363          children.add(new Property("comment", "string", "A description of status/issues in mapping that conveys additional information not represented in  the structured data.", 0, 1, comment));
1364          children.add(new Property("dependsOn", "", "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", 0, java.lang.Integer.MAX_VALUE, dependsOn));
1365          children.add(new Property("product", "@ConceptMap.group.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product));
1366        }
1367
1368        @Override
1369        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1370          switch (_hash) {
1371          case 3059181: /*code*/  return new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, 1, code);
1372          case 1671764162: /*display*/  return new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display);
1373          case -15828692: /*equivalence*/  return new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", 0, 1, equivalence);
1374          case 950398559: /*comment*/  return new Property("comment", "string", "A description of status/issues in mapping that conveys additional information not represented in  the structured data.", 0, 1, comment);
1375          case -1109214266: /*dependsOn*/  return new Property("dependsOn", "", "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", 0, java.lang.Integer.MAX_VALUE, dependsOn);
1376          case -309474065: /*product*/  return new Property("product", "@ConceptMap.group.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product);
1377          default: return super.getNamedProperty(_hash, _name, _checkValid);
1378          }
1379
1380        }
1381
1382      @Override
1383      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1384        switch (hash) {
1385        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
1386        case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
1387        case -15828692: /*equivalence*/ return this.equivalence == null ? new Base[0] : new Base[] {this.equivalence}; // Enumeration<ConceptMapEquivalence>
1388        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
1389        case -1109214266: /*dependsOn*/ return this.dependsOn == null ? new Base[0] : this.dependsOn.toArray(new Base[this.dependsOn.size()]); // OtherElementComponent
1390        case -309474065: /*product*/ return this.product == null ? new Base[0] : this.product.toArray(new Base[this.product.size()]); // OtherElementComponent
1391        default: return super.getProperty(hash, name, checkValid);
1392        }
1393
1394      }
1395
1396      @Override
1397      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1398        switch (hash) {
1399        case 3059181: // code
1400          this.code = castToCode(value); // CodeType
1401          return value;
1402        case 1671764162: // display
1403          this.display = castToString(value); // StringType
1404          return value;
1405        case -15828692: // equivalence
1406          value = new ConceptMapEquivalenceEnumFactory().fromType(castToCode(value));
1407          this.equivalence = (Enumeration) value; // Enumeration<ConceptMapEquivalence>
1408          return value;
1409        case 950398559: // comment
1410          this.comment = castToString(value); // StringType
1411          return value;
1412        case -1109214266: // dependsOn
1413          this.getDependsOn().add((OtherElementComponent) value); // OtherElementComponent
1414          return value;
1415        case -309474065: // product
1416          this.getProduct().add((OtherElementComponent) value); // OtherElementComponent
1417          return value;
1418        default: return super.setProperty(hash, name, value);
1419        }
1420
1421      }
1422
1423      @Override
1424      public Base setProperty(String name, Base value) throws FHIRException {
1425        if (name.equals("code")) {
1426          this.code = castToCode(value); // CodeType
1427        } else if (name.equals("display")) {
1428          this.display = castToString(value); // StringType
1429        } else if (name.equals("equivalence")) {
1430          value = new ConceptMapEquivalenceEnumFactory().fromType(castToCode(value));
1431          this.equivalence = (Enumeration) value; // Enumeration<ConceptMapEquivalence>
1432        } else if (name.equals("comment")) {
1433          this.comment = castToString(value); // StringType
1434        } else if (name.equals("dependsOn")) {
1435          this.getDependsOn().add((OtherElementComponent) value);
1436        } else if (name.equals("product")) {
1437          this.getProduct().add((OtherElementComponent) value);
1438        } else
1439          return super.setProperty(name, value);
1440        return value;
1441      }
1442
1443      @Override
1444      public Base makeProperty(int hash, String name) throws FHIRException {
1445        switch (hash) {
1446        case 3059181:  return getCodeElement();
1447        case 1671764162:  return getDisplayElement();
1448        case -15828692:  return getEquivalenceElement();
1449        case 950398559:  return getCommentElement();
1450        case -1109214266:  return addDependsOn(); 
1451        case -309474065:  return addProduct(); 
1452        default: return super.makeProperty(hash, name);
1453        }
1454
1455      }
1456
1457      @Override
1458      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1459        switch (hash) {
1460        case 3059181: /*code*/ return new String[] {"code"};
1461        case 1671764162: /*display*/ return new String[] {"string"};
1462        case -15828692: /*equivalence*/ return new String[] {"code"};
1463        case 950398559: /*comment*/ return new String[] {"string"};
1464        case -1109214266: /*dependsOn*/ return new String[] {};
1465        case -309474065: /*product*/ return new String[] {"@ConceptMap.group.element.target.dependsOn"};
1466        default: return super.getTypesForProperty(hash, name);
1467        }
1468
1469      }
1470
1471      @Override
1472      public Base addChild(String name) throws FHIRException {
1473        if (name.equals("code")) {
1474          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code");
1475        }
1476        else if (name.equals("display")) {
1477          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.display");
1478        }
1479        else if (name.equals("equivalence")) {
1480          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.equivalence");
1481        }
1482        else if (name.equals("comment")) {
1483          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.comment");
1484        }
1485        else if (name.equals("dependsOn")) {
1486          return addDependsOn();
1487        }
1488        else if (name.equals("product")) {
1489          return addProduct();
1490        }
1491        else
1492          return super.addChild(name);
1493      }
1494
1495      public TargetElementComponent copy() {
1496        TargetElementComponent dst = new TargetElementComponent();
1497        copyValues(dst);
1498        dst.code = code == null ? null : code.copy();
1499        dst.display = display == null ? null : display.copy();
1500        dst.equivalence = equivalence == null ? null : equivalence.copy();
1501        dst.comment = comment == null ? null : comment.copy();
1502        if (dependsOn != null) {
1503          dst.dependsOn = new ArrayList<OtherElementComponent>();
1504          for (OtherElementComponent i : dependsOn)
1505            dst.dependsOn.add(i.copy());
1506        };
1507        if (product != null) {
1508          dst.product = new ArrayList<OtherElementComponent>();
1509          for (OtherElementComponent i : product)
1510            dst.product.add(i.copy());
1511        };
1512        return dst;
1513      }
1514
1515      @Override
1516      public boolean equalsDeep(Base other_) {
1517        if (!super.equalsDeep(other_))
1518          return false;
1519        if (!(other_ instanceof TargetElementComponent))
1520          return false;
1521        TargetElementComponent o = (TargetElementComponent) other_;
1522        return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(equivalence, o.equivalence, true)
1523           && compareDeep(comment, o.comment, true) && compareDeep(dependsOn, o.dependsOn, true) && compareDeep(product, o.product, true)
1524          ;
1525      }
1526
1527      @Override
1528      public boolean equalsShallow(Base other_) {
1529        if (!super.equalsShallow(other_))
1530          return false;
1531        if (!(other_ instanceof TargetElementComponent))
1532          return false;
1533        TargetElementComponent o = (TargetElementComponent) other_;
1534        return compareValues(code, o.code, true) && compareValues(display, o.display, true) && compareValues(equivalence, o.equivalence, true)
1535           && compareValues(comment, o.comment, true);
1536      }
1537
1538      public boolean isEmpty() {
1539        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, equivalence
1540          , comment, dependsOn, product);
1541      }
1542
1543  public String fhirType() {
1544    return "ConceptMap.group.element.target";
1545
1546  }
1547
1548  }
1549
1550    @Block()
1551    public static class OtherElementComponent extends BackboneElement implements IBaseBackboneElement {
1552        /**
1553         * A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.
1554         */
1555        @Child(name = "property", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1556        @Description(shortDefinition="Reference to property mapping depends on", formalDefinition="A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property." )
1557        protected UriType property;
1558
1559        /**
1560         * An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).
1561         */
1562        @Child(name = "system", type = {CanonicalType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1563        @Description(shortDefinition="Code System (if necessary)", formalDefinition="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems)." )
1564        protected CanonicalType system;
1565
1566        /**
1567         * Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.
1568         */
1569        @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false)
1570        @Description(shortDefinition="Value of the referenced element", formalDefinition="Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to." )
1571        protected StringType value;
1572
1573        /**
1574         * The display for the code. The display is only provided to help editors when editing the concept map.
1575         */
1576        @Child(name = "display", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1577        @Description(shortDefinition="Display for the code (if value is a code)", formalDefinition="The display for the code. The display is only provided to help editors when editing the concept map." )
1578        protected StringType display;
1579
1580        private static final long serialVersionUID = -1836341923L;
1581
1582    /**
1583     * Constructor
1584     */
1585      public OtherElementComponent() {
1586        super();
1587      }
1588
1589    /**
1590     * Constructor
1591     */
1592      public OtherElementComponent(UriType property, StringType value) {
1593        super();
1594        this.property = property;
1595        this.value = value;
1596      }
1597
1598        /**
1599         * @return {@link #property} (A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value
1600         */
1601        public UriType getPropertyElement() { 
1602          if (this.property == null)
1603            if (Configuration.errorOnAutoCreate())
1604              throw new Error("Attempt to auto-create OtherElementComponent.property");
1605            else if (Configuration.doAutoCreate())
1606              this.property = new UriType(); // bb
1607          return this.property;
1608        }
1609
1610        public boolean hasPropertyElement() { 
1611          return this.property != null && !this.property.isEmpty();
1612        }
1613
1614        public boolean hasProperty() { 
1615          return this.property != null && !this.property.isEmpty();
1616        }
1617
1618        /**
1619         * @param value {@link #property} (A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value
1620         */
1621        public OtherElementComponent setPropertyElement(UriType value) { 
1622          this.property = value;
1623          return this;
1624        }
1625
1626        /**
1627         * @return A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.
1628         */
1629        public String getProperty() { 
1630          return this.property == null ? null : this.property.getValue();
1631        }
1632
1633        /**
1634         * @param value A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.
1635         */
1636        public OtherElementComponent setProperty(String value) { 
1637            if (this.property == null)
1638              this.property = new UriType();
1639            this.property.setValue(value);
1640          return this;
1641        }
1642
1643        /**
1644         * @return {@link #system} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
1645         */
1646        public CanonicalType getSystemElement() { 
1647          if (this.system == null)
1648            if (Configuration.errorOnAutoCreate())
1649              throw new Error("Attempt to auto-create OtherElementComponent.system");
1650            else if (Configuration.doAutoCreate())
1651              this.system = new CanonicalType(); // bb
1652          return this.system;
1653        }
1654
1655        public boolean hasSystemElement() { 
1656          return this.system != null && !this.system.isEmpty();
1657        }
1658
1659        public boolean hasSystem() { 
1660          return this.system != null && !this.system.isEmpty();
1661        }
1662
1663        /**
1664         * @param value {@link #system} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
1665         */
1666        public OtherElementComponent setSystemElement(CanonicalType value) { 
1667          this.system = value;
1668          return this;
1669        }
1670
1671        /**
1672         * @return An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).
1673         */
1674        public String getSystem() { 
1675          return this.system == null ? null : this.system.getValue();
1676        }
1677
1678        /**
1679         * @param value An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).
1680         */
1681        public OtherElementComponent setSystem(String value) { 
1682          if (Utilities.noString(value))
1683            this.system = null;
1684          else {
1685            if (this.system == null)
1686              this.system = new CanonicalType();
1687            this.system.setValue(value);
1688          }
1689          return this;
1690        }
1691
1692        /**
1693         * @return {@link #value} (Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
1694         */
1695        public StringType getValueElement() { 
1696          if (this.value == null)
1697            if (Configuration.errorOnAutoCreate())
1698              throw new Error("Attempt to auto-create OtherElementComponent.value");
1699            else if (Configuration.doAutoCreate())
1700              this.value = new StringType(); // bb
1701          return this.value;
1702        }
1703
1704        public boolean hasValueElement() { 
1705          return this.value != null && !this.value.isEmpty();
1706        }
1707
1708        public boolean hasValue() { 
1709          return this.value != null && !this.value.isEmpty();
1710        }
1711
1712        /**
1713         * @param value {@link #value} (Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
1714         */
1715        public OtherElementComponent setValueElement(StringType value) { 
1716          this.value = value;
1717          return this;
1718        }
1719
1720        /**
1721         * @return Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.
1722         */
1723        public String getValue() { 
1724          return this.value == null ? null : this.value.getValue();
1725        }
1726
1727        /**
1728         * @param value Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.
1729         */
1730        public OtherElementComponent setValue(String value) { 
1731            if (this.value == null)
1732              this.value = new StringType();
1733            this.value.setValue(value);
1734          return this;
1735        }
1736
1737        /**
1738         * @return {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
1739         */
1740        public StringType getDisplayElement() { 
1741          if (this.display == null)
1742            if (Configuration.errorOnAutoCreate())
1743              throw new Error("Attempt to auto-create OtherElementComponent.display");
1744            else if (Configuration.doAutoCreate())
1745              this.display = new StringType(); // bb
1746          return this.display;
1747        }
1748
1749        public boolean hasDisplayElement() { 
1750          return this.display != null && !this.display.isEmpty();
1751        }
1752
1753        public boolean hasDisplay() { 
1754          return this.display != null && !this.display.isEmpty();
1755        }
1756
1757        /**
1758         * @param value {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
1759         */
1760        public OtherElementComponent setDisplayElement(StringType value) { 
1761          this.display = value;
1762          return this;
1763        }
1764
1765        /**
1766         * @return The display for the code. The display is only provided to help editors when editing the concept map.
1767         */
1768        public String getDisplay() { 
1769          return this.display == null ? null : this.display.getValue();
1770        }
1771
1772        /**
1773         * @param value The display for the code. The display is only provided to help editors when editing the concept map.
1774         */
1775        public OtherElementComponent setDisplay(String value) { 
1776          if (Utilities.noString(value))
1777            this.display = null;
1778          else {
1779            if (this.display == null)
1780              this.display = new StringType();
1781            this.display.setValue(value);
1782          }
1783          return this;
1784        }
1785
1786        protected void listChildren(List<Property> children) {
1787          super.listChildren(children);
1788          children.add(new Property("property", "uri", "A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.", 0, 1, property));
1789          children.add(new Property("system", "canonical(CodeSystem)", "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).", 0, 1, system));
1790          children.add(new Property("value", "string", "Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.", 0, 1, value));
1791          children.add(new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display));
1792        }
1793
1794        @Override
1795        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1796          switch (_hash) {
1797          case -993141291: /*property*/  return new Property("property", "uri", "A reference to an element that holds a coded value that corresponds to a code system property. The idea is that the information model carries an element somwhere that is labeled to correspond with a code system property.", 0, 1, property);
1798          case -887328209: /*system*/  return new Property("system", "canonical(CodeSystem)", "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).", 0, 1, system);
1799          case 111972721: /*value*/  return new Property("value", "string", "Identity (code or path) or the element/item/ValueSet/text that the map depends on / refers to.", 0, 1, value);
1800          case 1671764162: /*display*/  return new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display);
1801          default: return super.getNamedProperty(_hash, _name, _checkValid);
1802          }
1803
1804        }
1805
1806      @Override
1807      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1808        switch (hash) {
1809        case -993141291: /*property*/ return this.property == null ? new Base[0] : new Base[] {this.property}; // UriType
1810        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // CanonicalType
1811        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
1812        case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
1813        default: return super.getProperty(hash, name, checkValid);
1814        }
1815
1816      }
1817
1818      @Override
1819      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1820        switch (hash) {
1821        case -993141291: // property
1822          this.property = castToUri(value); // UriType
1823          return value;
1824        case -887328209: // system
1825          this.system = castToCanonical(value); // CanonicalType
1826          return value;
1827        case 111972721: // value
1828          this.value = castToString(value); // StringType
1829          return value;
1830        case 1671764162: // display
1831          this.display = castToString(value); // StringType
1832          return value;
1833        default: return super.setProperty(hash, name, value);
1834        }
1835
1836      }
1837
1838      @Override
1839      public Base setProperty(String name, Base value) throws FHIRException {
1840        if (name.equals("property")) {
1841          this.property = castToUri(value); // UriType
1842        } else if (name.equals("system")) {
1843          this.system = castToCanonical(value); // CanonicalType
1844        } else if (name.equals("value")) {
1845          this.value = castToString(value); // StringType
1846        } else if (name.equals("display")) {
1847          this.display = castToString(value); // StringType
1848        } else
1849          return super.setProperty(name, value);
1850        return value;
1851      }
1852
1853      @Override
1854      public Base makeProperty(int hash, String name) throws FHIRException {
1855        switch (hash) {
1856        case -993141291:  return getPropertyElement();
1857        case -887328209:  return getSystemElement();
1858        case 111972721:  return getValueElement();
1859        case 1671764162:  return getDisplayElement();
1860        default: return super.makeProperty(hash, name);
1861        }
1862
1863      }
1864
1865      @Override
1866      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1867        switch (hash) {
1868        case -993141291: /*property*/ return new String[] {"uri"};
1869        case -887328209: /*system*/ return new String[] {"canonical"};
1870        case 111972721: /*value*/ return new String[] {"string"};
1871        case 1671764162: /*display*/ return new String[] {"string"};
1872        default: return super.getTypesForProperty(hash, name);
1873        }
1874
1875      }
1876
1877      @Override
1878      public Base addChild(String name) throws FHIRException {
1879        if (name.equals("property")) {
1880          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.property");
1881        }
1882        else if (name.equals("system")) {
1883          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.system");
1884        }
1885        else if (name.equals("value")) {
1886          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.value");
1887        }
1888        else if (name.equals("display")) {
1889          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.display");
1890        }
1891        else
1892          return super.addChild(name);
1893      }
1894
1895      public OtherElementComponent copy() {
1896        OtherElementComponent dst = new OtherElementComponent();
1897        copyValues(dst);
1898        dst.property = property == null ? null : property.copy();
1899        dst.system = system == null ? null : system.copy();
1900        dst.value = value == null ? null : value.copy();
1901        dst.display = display == null ? null : display.copy();
1902        return dst;
1903      }
1904
1905      @Override
1906      public boolean equalsDeep(Base other_) {
1907        if (!super.equalsDeep(other_))
1908          return false;
1909        if (!(other_ instanceof OtherElementComponent))
1910          return false;
1911        OtherElementComponent o = (OtherElementComponent) other_;
1912        return compareDeep(property, o.property, true) && compareDeep(system, o.system, true) && compareDeep(value, o.value, true)
1913           && compareDeep(display, o.display, true);
1914      }
1915
1916      @Override
1917      public boolean equalsShallow(Base other_) {
1918        if (!super.equalsShallow(other_))
1919          return false;
1920        if (!(other_ instanceof OtherElementComponent))
1921          return false;
1922        OtherElementComponent o = (OtherElementComponent) other_;
1923        return compareValues(property, o.property, true) && compareValues(value, o.value, true) && compareValues(display, o.display, true)
1924          ;
1925      }
1926
1927      public boolean isEmpty() {
1928        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(property, system, value
1929          , display);
1930      }
1931
1932  public String fhirType() {
1933    return "ConceptMap.group.element.target.dependsOn";
1934
1935  }
1936
1937  }
1938
1939    @Block()
1940    public static class ConceptMapGroupUnmappedComponent extends BackboneElement implements IBaseBackboneElement {
1941        /**
1942         * Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).
1943         */
1944        @Child(name = "mode", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1945        @Description(shortDefinition="provided | fixed | other-map", formalDefinition="Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL)." )
1946        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode")
1947        protected Enumeration<ConceptMapGroupUnmappedMode> mode;
1948
1949        /**
1950         * The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.
1951         */
1952        @Child(name = "code", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1953        @Description(shortDefinition="Fixed code when mode = fixed", formalDefinition="The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code." )
1954        protected CodeType code;
1955
1956        /**
1957         * The display for the code. The display is only provided to help editors when editing the concept map.
1958         */
1959        @Child(name = "display", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1960        @Description(shortDefinition="Display for the code", formalDefinition="The display for the code. The display is only provided to help editors when editing the concept map." )
1961        protected StringType display;
1962
1963        /**
1964         * The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to.
1965         */
1966        @Child(name = "url", type = {CanonicalType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1967        @Description(shortDefinition="Canonical URI for an additional ConceptMap to use for mapping if the source concept is unmapped", formalDefinition="The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to." )
1968        protected CanonicalType url;
1969
1970        private static final long serialVersionUID = 1261364354L;
1971
1972    /**
1973     * Constructor
1974     */
1975      public ConceptMapGroupUnmappedComponent() {
1976        super();
1977      }
1978
1979    /**
1980     * Constructor
1981     */
1982      public ConceptMapGroupUnmappedComponent(Enumeration<ConceptMapGroupUnmappedMode> mode) {
1983        super();
1984        this.mode = mode;
1985      }
1986
1987        /**
1988         * @return {@link #mode} (Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
1989         */
1990        public Enumeration<ConceptMapGroupUnmappedMode> getModeElement() { 
1991          if (this.mode == null)
1992            if (Configuration.errorOnAutoCreate())
1993              throw new Error("Attempt to auto-create ConceptMapGroupUnmappedComponent.mode");
1994            else if (Configuration.doAutoCreate())
1995              this.mode = new Enumeration<ConceptMapGroupUnmappedMode>(new ConceptMapGroupUnmappedModeEnumFactory()); // bb
1996          return this.mode;
1997        }
1998
1999        public boolean hasModeElement() { 
2000          return this.mode != null && !this.mode.isEmpty();
2001        }
2002
2003        public boolean hasMode() { 
2004          return this.mode != null && !this.mode.isEmpty();
2005        }
2006
2007        /**
2008         * @param value {@link #mode} (Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value
2009         */
2010        public ConceptMapGroupUnmappedComponent setModeElement(Enumeration<ConceptMapGroupUnmappedMode> value) { 
2011          this.mode = value;
2012          return this;
2013        }
2014
2015        /**
2016         * @return Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).
2017         */
2018        public ConceptMapGroupUnmappedMode getMode() { 
2019          return this.mode == null ? null : this.mode.getValue();
2020        }
2021
2022        /**
2023         * @param value Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).
2024         */
2025        public ConceptMapGroupUnmappedComponent setMode(ConceptMapGroupUnmappedMode value) { 
2026            if (this.mode == null)
2027              this.mode = new Enumeration<ConceptMapGroupUnmappedMode>(new ConceptMapGroupUnmappedModeEnumFactory());
2028            this.mode.setValue(value);
2029          return this;
2030        }
2031
2032        /**
2033         * @return {@link #code} (The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2034         */
2035        public CodeType getCodeElement() { 
2036          if (this.code == null)
2037            if (Configuration.errorOnAutoCreate())
2038              throw new Error("Attempt to auto-create ConceptMapGroupUnmappedComponent.code");
2039            else if (Configuration.doAutoCreate())
2040              this.code = new CodeType(); // bb
2041          return this.code;
2042        }
2043
2044        public boolean hasCodeElement() { 
2045          return this.code != null && !this.code.isEmpty();
2046        }
2047
2048        public boolean hasCode() { 
2049          return this.code != null && !this.code.isEmpty();
2050        }
2051
2052        /**
2053         * @param value {@link #code} (The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2054         */
2055        public ConceptMapGroupUnmappedComponent setCodeElement(CodeType value) { 
2056          this.code = value;
2057          return this;
2058        }
2059
2060        /**
2061         * @return The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.
2062         */
2063        public String getCode() { 
2064          return this.code == null ? null : this.code.getValue();
2065        }
2066
2067        /**
2068         * @param value The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.
2069         */
2070        public ConceptMapGroupUnmappedComponent setCode(String value) { 
2071          if (Utilities.noString(value))
2072            this.code = null;
2073          else {
2074            if (this.code == null)
2075              this.code = new CodeType();
2076            this.code.setValue(value);
2077          }
2078          return this;
2079        }
2080
2081        /**
2082         * @return {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
2083         */
2084        public StringType getDisplayElement() { 
2085          if (this.display == null)
2086            if (Configuration.errorOnAutoCreate())
2087              throw new Error("Attempt to auto-create ConceptMapGroupUnmappedComponent.display");
2088            else if (Configuration.doAutoCreate())
2089              this.display = new StringType(); // bb
2090          return this.display;
2091        }
2092
2093        public boolean hasDisplayElement() { 
2094          return this.display != null && !this.display.isEmpty();
2095        }
2096
2097        public boolean hasDisplay() { 
2098          return this.display != null && !this.display.isEmpty();
2099        }
2100
2101        /**
2102         * @param value {@link #display} (The display for the code. The display is only provided to help editors when editing the concept map.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
2103         */
2104        public ConceptMapGroupUnmappedComponent setDisplayElement(StringType value) { 
2105          this.display = value;
2106          return this;
2107        }
2108
2109        /**
2110         * @return The display for the code. The display is only provided to help editors when editing the concept map.
2111         */
2112        public String getDisplay() { 
2113          return this.display == null ? null : this.display.getValue();
2114        }
2115
2116        /**
2117         * @param value The display for the code. The display is only provided to help editors when editing the concept map.
2118         */
2119        public ConceptMapGroupUnmappedComponent setDisplay(String value) { 
2120          if (Utilities.noString(value))
2121            this.display = null;
2122          else {
2123            if (this.display == null)
2124              this.display = new StringType();
2125            this.display.setValue(value);
2126          }
2127          return this;
2128        }
2129
2130        /**
2131         * @return {@link #url} (The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2132         */
2133        public CanonicalType getUrlElement() { 
2134          if (this.url == null)
2135            if (Configuration.errorOnAutoCreate())
2136              throw new Error("Attempt to auto-create ConceptMapGroupUnmappedComponent.url");
2137            else if (Configuration.doAutoCreate())
2138              this.url = new CanonicalType(); // bb
2139          return this.url;
2140        }
2141
2142        public boolean hasUrlElement() { 
2143          return this.url != null && !this.url.isEmpty();
2144        }
2145
2146        public boolean hasUrl() { 
2147          return this.url != null && !this.url.isEmpty();
2148        }
2149
2150        /**
2151         * @param value {@link #url} (The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2152         */
2153        public ConceptMapGroupUnmappedComponent setUrlElement(CanonicalType value) { 
2154          this.url = value;
2155          return this;
2156        }
2157
2158        /**
2159         * @return The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to.
2160         */
2161        public String getUrl() { 
2162          return this.url == null ? null : this.url.getValue();
2163        }
2164
2165        /**
2166         * @param value The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to.
2167         */
2168        public ConceptMapGroupUnmappedComponent setUrl(String value) { 
2169          if (Utilities.noString(value))
2170            this.url = null;
2171          else {
2172            if (this.url == null)
2173              this.url = new CanonicalType();
2174            this.url.setValue(value);
2175          }
2176          return this;
2177        }
2178
2179        protected void listChildren(List<Property> children) {
2180          super.listChildren(children);
2181          children.add(new Property("mode", "code", "Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).", 0, 1, mode));
2182          children.add(new Property("code", "code", "The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.", 0, 1, code));
2183          children.add(new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display));
2184          children.add(new Property("url", "canonical(ConceptMap)", "The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to.", 0, 1, url));
2185        }
2186
2187        @Override
2188        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2189          switch (_hash) {
2190          case 3357091: /*mode*/  return new Property("mode", "code", "Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions is possible: use the unmapped code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).", 0, 1, mode);
2191          case 3059181: /*code*/  return new Property("code", "code", "The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.", 0, 1, code);
2192          case 1671764162: /*display*/  return new Property("display", "string", "The display for the code. The display is only provided to help editors when editing the concept map.", 0, 1, display);
2193          case 116079: /*url*/  return new Property("url", "canonical(ConceptMap)", "The canonical URI of an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no suitable matching concept in the target system that the source concept can be mapped to.", 0, 1, url);
2194          default: return super.getNamedProperty(_hash, _name, _checkValid);
2195          }
2196
2197        }
2198
2199      @Override
2200      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2201        switch (hash) {
2202        case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<ConceptMapGroupUnmappedMode>
2203        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
2204        case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
2205        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // CanonicalType
2206        default: return super.getProperty(hash, name, checkValid);
2207        }
2208
2209      }
2210
2211      @Override
2212      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2213        switch (hash) {
2214        case 3357091: // mode
2215          value = new ConceptMapGroupUnmappedModeEnumFactory().fromType(castToCode(value));
2216          this.mode = (Enumeration) value; // Enumeration<ConceptMapGroupUnmappedMode>
2217          return value;
2218        case 3059181: // code
2219          this.code = castToCode(value); // CodeType
2220          return value;
2221        case 1671764162: // display
2222          this.display = castToString(value); // StringType
2223          return value;
2224        case 116079: // url
2225          this.url = castToCanonical(value); // CanonicalType
2226          return value;
2227        default: return super.setProperty(hash, name, value);
2228        }
2229
2230      }
2231
2232      @Override
2233      public Base setProperty(String name, Base value) throws FHIRException {
2234        if (name.equals("mode")) {
2235          value = new ConceptMapGroupUnmappedModeEnumFactory().fromType(castToCode(value));
2236          this.mode = (Enumeration) value; // Enumeration<ConceptMapGroupUnmappedMode>
2237        } else if (name.equals("code")) {
2238          this.code = castToCode(value); // CodeType
2239        } else if (name.equals("display")) {
2240          this.display = castToString(value); // StringType
2241        } else if (name.equals("url")) {
2242          this.url = castToCanonical(value); // CanonicalType
2243        } else
2244          return super.setProperty(name, value);
2245        return value;
2246      }
2247
2248      @Override
2249      public Base makeProperty(int hash, String name) throws FHIRException {
2250        switch (hash) {
2251        case 3357091:  return getModeElement();
2252        case 3059181:  return getCodeElement();
2253        case 1671764162:  return getDisplayElement();
2254        case 116079:  return getUrlElement();
2255        default: return super.makeProperty(hash, name);
2256        }
2257
2258      }
2259
2260      @Override
2261      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2262        switch (hash) {
2263        case 3357091: /*mode*/ return new String[] {"code"};
2264        case 3059181: /*code*/ return new String[] {"code"};
2265        case 1671764162: /*display*/ return new String[] {"string"};
2266        case 116079: /*url*/ return new String[] {"canonical"};
2267        default: return super.getTypesForProperty(hash, name);
2268        }
2269
2270      }
2271
2272      @Override
2273      public Base addChild(String name) throws FHIRException {
2274        if (name.equals("mode")) {
2275          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.mode");
2276        }
2277        else if (name.equals("code")) {
2278          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code");
2279        }
2280        else if (name.equals("display")) {
2281          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.display");
2282        }
2283        else if (name.equals("url")) {
2284          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.url");
2285        }
2286        else
2287          return super.addChild(name);
2288      }
2289
2290      public ConceptMapGroupUnmappedComponent copy() {
2291        ConceptMapGroupUnmappedComponent dst = new ConceptMapGroupUnmappedComponent();
2292        copyValues(dst);
2293        dst.mode = mode == null ? null : mode.copy();
2294        dst.code = code == null ? null : code.copy();
2295        dst.display = display == null ? null : display.copy();
2296        dst.url = url == null ? null : url.copy();
2297        return dst;
2298      }
2299
2300      @Override
2301      public boolean equalsDeep(Base other_) {
2302        if (!super.equalsDeep(other_))
2303          return false;
2304        if (!(other_ instanceof ConceptMapGroupUnmappedComponent))
2305          return false;
2306        ConceptMapGroupUnmappedComponent o = (ConceptMapGroupUnmappedComponent) other_;
2307        return compareDeep(mode, o.mode, true) && compareDeep(code, o.code, true) && compareDeep(display, o.display, true)
2308           && compareDeep(url, o.url, true);
2309      }
2310
2311      @Override
2312      public boolean equalsShallow(Base other_) {
2313        if (!super.equalsShallow(other_))
2314          return false;
2315        if (!(other_ instanceof ConceptMapGroupUnmappedComponent))
2316          return false;
2317        ConceptMapGroupUnmappedComponent o = (ConceptMapGroupUnmappedComponent) other_;
2318        return compareValues(mode, o.mode, true) && compareValues(code, o.code, true) && compareValues(display, o.display, true)
2319          ;
2320      }
2321
2322      public boolean isEmpty() {
2323        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, code, display, url
2324          );
2325      }
2326
2327  public String fhirType() {
2328    return "ConceptMap.group.unmapped";
2329
2330  }
2331
2332  }
2333
2334    /**
2335     * A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.
2336     */
2337    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true)
2338    @Description(shortDefinition="Additional identifier for the concept map", formalDefinition="A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance." )
2339    protected Identifier identifier;
2340
2341    /**
2342     * Explanation of why this concept map is needed and why it has been designed as it has.
2343     */
2344    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
2345    @Description(shortDefinition="Why this concept map is defined", formalDefinition="Explanation of why this concept map is needed and why it has been designed as it has." )
2346    protected MarkdownType purpose;
2347
2348    /**
2349     * A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.
2350     */
2351    @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2352    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map." )
2353    protected MarkdownType copyright;
2354
2355    /**
2356     * Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.
2357     */
2358    @Child(name = "source", type = {UriType.class, CanonicalType.class}, order=3, min=0, max=1, modifier=false, summary=true)
2359    @Description(shortDefinition="The source value set that contains the concepts that are being mapped", formalDefinition="Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings." )
2360    protected Type source;
2361
2362    /**
2363     * The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.
2364     */
2365    @Child(name = "target", type = {UriType.class, CanonicalType.class}, order=4, min=0, max=1, modifier=false, summary=true)
2366    @Description(shortDefinition="The target value set which provides context for the mappings", formalDefinition="The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made." )
2367    protected Type target;
2368
2369    /**
2370     * A group of mappings that all have the same source and target system.
2371     */
2372    @Child(name = "group", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2373    @Description(shortDefinition="Same source and target systems", formalDefinition="A group of mappings that all have the same source and target system." )
2374    protected List<ConceptMapGroupComponent> group;
2375
2376    private static final long serialVersionUID = -2081872580L;
2377
2378  /**
2379   * Constructor
2380   */
2381    public ConceptMap() {
2382      super();
2383    }
2384
2385  /**
2386   * Constructor
2387   */
2388    public ConceptMap(Enumeration<PublicationStatus> status) {
2389      super();
2390      this.status = status;
2391    }
2392
2393    /**
2394     * @return {@link #url} (An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2395     */
2396    public UriType getUrlElement() { 
2397      if (this.url == null)
2398        if (Configuration.errorOnAutoCreate())
2399          throw new Error("Attempt to auto-create ConceptMap.url");
2400        else if (Configuration.doAutoCreate())
2401          this.url = new UriType(); // bb
2402      return this.url;
2403    }
2404
2405    public boolean hasUrlElement() { 
2406      return this.url != null && !this.url.isEmpty();
2407    }
2408
2409    public boolean hasUrl() { 
2410      return this.url != null && !this.url.isEmpty();
2411    }
2412
2413    /**
2414     * @param value {@link #url} (An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2415     */
2416    public ConceptMap setUrlElement(UriType value) { 
2417      this.url = value;
2418      return this;
2419    }
2420
2421    /**
2422     * @return An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this concept map is (or will be) published.
2423     */
2424    public String getUrl() { 
2425      return this.url == null ? null : this.url.getValue();
2426    }
2427
2428    /**
2429     * @param value An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this concept map is (or will be) published.
2430     */
2431    public ConceptMap setUrl(String value) { 
2432      if (Utilities.noString(value))
2433        this.url = null;
2434      else {
2435        if (this.url == null)
2436          this.url = new UriType();
2437        this.url.setValue(value);
2438      }
2439      return this;
2440    }
2441
2442    /**
2443     * @return {@link #identifier} (A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.)
2444     */
2445    public Identifier getIdentifier() { 
2446      if (this.identifier == null)
2447        if (Configuration.errorOnAutoCreate())
2448          throw new Error("Attempt to auto-create ConceptMap.identifier");
2449        else if (Configuration.doAutoCreate())
2450          this.identifier = new Identifier(); // cc
2451      return this.identifier;
2452    }
2453
2454    public boolean hasIdentifier() { 
2455      return this.identifier != null && !this.identifier.isEmpty();
2456    }
2457
2458    /**
2459     * @param value {@link #identifier} (A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.)
2460     */
2461    public ConceptMap setIdentifier(Identifier value) { 
2462      this.identifier = value;
2463      return this;
2464    }
2465
2466    /**
2467     * @return {@link #version} (The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
2468     */
2469    public StringType getVersionElement() { 
2470      if (this.version == null)
2471        if (Configuration.errorOnAutoCreate())
2472          throw new Error("Attempt to auto-create ConceptMap.version");
2473        else if (Configuration.doAutoCreate())
2474          this.version = new StringType(); // bb
2475      return this.version;
2476    }
2477
2478    public boolean hasVersionElement() { 
2479      return this.version != null && !this.version.isEmpty();
2480    }
2481
2482    public boolean hasVersion() { 
2483      return this.version != null && !this.version.isEmpty();
2484    }
2485
2486    /**
2487     * @param value {@link #version} (The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
2488     */
2489    public ConceptMap setVersionElement(StringType value) { 
2490      this.version = value;
2491      return this;
2492    }
2493
2494    /**
2495     * @return The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
2496     */
2497    public String getVersion() { 
2498      return this.version == null ? null : this.version.getValue();
2499    }
2500
2501    /**
2502     * @param value The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
2503     */
2504    public ConceptMap setVersion(String value) { 
2505      if (Utilities.noString(value))
2506        this.version = null;
2507      else {
2508        if (this.version == null)
2509          this.version = new StringType();
2510        this.version.setValue(value);
2511      }
2512      return this;
2513    }
2514
2515    /**
2516     * @return {@link #name} (A natural language name identifying the concept map. 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
2517     */
2518    public StringType getNameElement() { 
2519      if (this.name == null)
2520        if (Configuration.errorOnAutoCreate())
2521          throw new Error("Attempt to auto-create ConceptMap.name");
2522        else if (Configuration.doAutoCreate())
2523          this.name = new StringType(); // bb
2524      return this.name;
2525    }
2526
2527    public boolean hasNameElement() { 
2528      return this.name != null && !this.name.isEmpty();
2529    }
2530
2531    public boolean hasName() { 
2532      return this.name != null && !this.name.isEmpty();
2533    }
2534
2535    /**
2536     * @param value {@link #name} (A natural language name identifying the concept map. 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
2537     */
2538    public ConceptMap setNameElement(StringType value) { 
2539      this.name = value;
2540      return this;
2541    }
2542
2543    /**
2544     * @return A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2545     */
2546    public String getName() { 
2547      return this.name == null ? null : this.name.getValue();
2548    }
2549
2550    /**
2551     * @param value A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2552     */
2553    public ConceptMap setName(String value) { 
2554      if (Utilities.noString(value))
2555        this.name = null;
2556      else {
2557        if (this.name == null)
2558          this.name = new StringType();
2559        this.name.setValue(value);
2560      }
2561      return this;
2562    }
2563
2564    /**
2565     * @return {@link #title} (A short, descriptive, user-friendly title for the concept map.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2566     */
2567    public StringType getTitleElement() { 
2568      if (this.title == null)
2569        if (Configuration.errorOnAutoCreate())
2570          throw new Error("Attempt to auto-create ConceptMap.title");
2571        else if (Configuration.doAutoCreate())
2572          this.title = new StringType(); // bb
2573      return this.title;
2574    }
2575
2576    public boolean hasTitleElement() { 
2577      return this.title != null && !this.title.isEmpty();
2578    }
2579
2580    public boolean hasTitle() { 
2581      return this.title != null && !this.title.isEmpty();
2582    }
2583
2584    /**
2585     * @param value {@link #title} (A short, descriptive, user-friendly title for the concept map.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2586     */
2587    public ConceptMap setTitleElement(StringType value) { 
2588      this.title = value;
2589      return this;
2590    }
2591
2592    /**
2593     * @return A short, descriptive, user-friendly title for the concept map.
2594     */
2595    public String getTitle() { 
2596      return this.title == null ? null : this.title.getValue();
2597    }
2598
2599    /**
2600     * @param value A short, descriptive, user-friendly title for the concept map.
2601     */
2602    public ConceptMap setTitle(String value) { 
2603      if (Utilities.noString(value))
2604        this.title = null;
2605      else {
2606        if (this.title == null)
2607          this.title = new StringType();
2608        this.title.setValue(value);
2609      }
2610      return this;
2611    }
2612
2613    /**
2614     * @return {@link #status} (The status of this concept map. 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
2615     */
2616    public Enumeration<PublicationStatus> getStatusElement() { 
2617      if (this.status == null)
2618        if (Configuration.errorOnAutoCreate())
2619          throw new Error("Attempt to auto-create ConceptMap.status");
2620        else if (Configuration.doAutoCreate())
2621          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2622      return this.status;
2623    }
2624
2625    public boolean hasStatusElement() { 
2626      return this.status != null && !this.status.isEmpty();
2627    }
2628
2629    public boolean hasStatus() { 
2630      return this.status != null && !this.status.isEmpty();
2631    }
2632
2633    /**
2634     * @param value {@link #status} (The status of this concept map. 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
2635     */
2636    public ConceptMap setStatusElement(Enumeration<PublicationStatus> value) { 
2637      this.status = value;
2638      return this;
2639    }
2640
2641    /**
2642     * @return The status of this concept map. Enables tracking the life-cycle of the content.
2643     */
2644    public PublicationStatus getStatus() { 
2645      return this.status == null ? null : this.status.getValue();
2646    }
2647
2648    /**
2649     * @param value The status of this concept map. Enables tracking the life-cycle of the content.
2650     */
2651    public ConceptMap setStatus(PublicationStatus value) { 
2652        if (this.status == null)
2653          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2654        this.status.setValue(value);
2655      return this;
2656    }
2657
2658    /**
2659     * @return {@link #experimental} (A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2660     */
2661    public BooleanType getExperimentalElement() { 
2662      if (this.experimental == null)
2663        if (Configuration.errorOnAutoCreate())
2664          throw new Error("Attempt to auto-create ConceptMap.experimental");
2665        else if (Configuration.doAutoCreate())
2666          this.experimental = new BooleanType(); // bb
2667      return this.experimental;
2668    }
2669
2670    public boolean hasExperimentalElement() { 
2671      return this.experimental != null && !this.experimental.isEmpty();
2672    }
2673
2674    public boolean hasExperimental() { 
2675      return this.experimental != null && !this.experimental.isEmpty();
2676    }
2677
2678    /**
2679     * @param value {@link #experimental} (A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2680     */
2681    public ConceptMap setExperimentalElement(BooleanType value) { 
2682      this.experimental = value;
2683      return this;
2684    }
2685
2686    /**
2687     * @return A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2688     */
2689    public boolean getExperimental() { 
2690      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2691    }
2692
2693    /**
2694     * @param value A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
2695     */
2696    public ConceptMap setExperimental(boolean value) { 
2697        if (this.experimental == null)
2698          this.experimental = new BooleanType();
2699        this.experimental.setValue(value);
2700      return this;
2701    }
2702
2703    /**
2704     * @return {@link #date} (The date  (and optionally time) when the concept map 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 concept map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2705     */
2706    public DateTimeType getDateElement() { 
2707      if (this.date == null)
2708        if (Configuration.errorOnAutoCreate())
2709          throw new Error("Attempt to auto-create ConceptMap.date");
2710        else if (Configuration.doAutoCreate())
2711          this.date = new DateTimeType(); // bb
2712      return this.date;
2713    }
2714
2715    public boolean hasDateElement() { 
2716      return this.date != null && !this.date.isEmpty();
2717    }
2718
2719    public boolean hasDate() { 
2720      return this.date != null && !this.date.isEmpty();
2721    }
2722
2723    /**
2724     * @param value {@link #date} (The date  (and optionally time) when the concept map 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 concept map changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2725     */
2726    public ConceptMap setDateElement(DateTimeType value) { 
2727      this.date = value;
2728      return this;
2729    }
2730
2731    /**
2732     * @return The date  (and optionally time) when the concept map 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 concept map changes.
2733     */
2734    public Date getDate() { 
2735      return this.date == null ? null : this.date.getValue();
2736    }
2737
2738    /**
2739     * @param value The date  (and optionally time) when the concept map 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 concept map changes.
2740     */
2741    public ConceptMap setDate(Date value) { 
2742      if (value == null)
2743        this.date = null;
2744      else {
2745        if (this.date == null)
2746          this.date = new DateTimeType();
2747        this.date.setValue(value);
2748      }
2749      return this;
2750    }
2751
2752    /**
2753     * @return {@link #publisher} (The name of the organization or individual that published the concept map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2754     */
2755    public StringType getPublisherElement() { 
2756      if (this.publisher == null)
2757        if (Configuration.errorOnAutoCreate())
2758          throw new Error("Attempt to auto-create ConceptMap.publisher");
2759        else if (Configuration.doAutoCreate())
2760          this.publisher = new StringType(); // bb
2761      return this.publisher;
2762    }
2763
2764    public boolean hasPublisherElement() { 
2765      return this.publisher != null && !this.publisher.isEmpty();
2766    }
2767
2768    public boolean hasPublisher() { 
2769      return this.publisher != null && !this.publisher.isEmpty();
2770    }
2771
2772    /**
2773     * @param value {@link #publisher} (The name of the organization or individual that published the concept map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2774     */
2775    public ConceptMap setPublisherElement(StringType value) { 
2776      this.publisher = value;
2777      return this;
2778    }
2779
2780    /**
2781     * @return The name of the organization or individual that published the concept map.
2782     */
2783    public String getPublisher() { 
2784      return this.publisher == null ? null : this.publisher.getValue();
2785    }
2786
2787    /**
2788     * @param value The name of the organization or individual that published the concept map.
2789     */
2790    public ConceptMap setPublisher(String value) { 
2791      if (Utilities.noString(value))
2792        this.publisher = null;
2793      else {
2794        if (this.publisher == null)
2795          this.publisher = new StringType();
2796        this.publisher.setValue(value);
2797      }
2798      return this;
2799    }
2800
2801    /**
2802     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2803     */
2804    public List<ContactDetail> getContact() { 
2805      if (this.contact == null)
2806        this.contact = new ArrayList<ContactDetail>();
2807      return this.contact;
2808    }
2809
2810    /**
2811     * @return Returns a reference to <code>this</code> for easy method chaining
2812     */
2813    public ConceptMap setContact(List<ContactDetail> theContact) { 
2814      this.contact = theContact;
2815      return this;
2816    }
2817
2818    public boolean hasContact() { 
2819      if (this.contact == null)
2820        return false;
2821      for (ContactDetail item : this.contact)
2822        if (!item.isEmpty())
2823          return true;
2824      return false;
2825    }
2826
2827    public ContactDetail addContact() { //3
2828      ContactDetail t = new ContactDetail();
2829      if (this.contact == null)
2830        this.contact = new ArrayList<ContactDetail>();
2831      this.contact.add(t);
2832      return t;
2833    }
2834
2835    public ConceptMap addContact(ContactDetail t) { //3
2836      if (t == null)
2837        return this;
2838      if (this.contact == null)
2839        this.contact = new ArrayList<ContactDetail>();
2840      this.contact.add(t);
2841      return this;
2842    }
2843
2844    /**
2845     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
2846     */
2847    public ContactDetail getContactFirstRep() { 
2848      if (getContact().isEmpty()) {
2849        addContact();
2850      }
2851      return getContact().get(0);
2852    }
2853
2854    /**
2855     * @return {@link #description} (A free text natural language description of the concept map from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2856     */
2857    public MarkdownType getDescriptionElement() { 
2858      if (this.description == null)
2859        if (Configuration.errorOnAutoCreate())
2860          throw new Error("Attempt to auto-create ConceptMap.description");
2861        else if (Configuration.doAutoCreate())
2862          this.description = new MarkdownType(); // bb
2863      return this.description;
2864    }
2865
2866    public boolean hasDescriptionElement() { 
2867      return this.description != null && !this.description.isEmpty();
2868    }
2869
2870    public boolean hasDescription() { 
2871      return this.description != null && !this.description.isEmpty();
2872    }
2873
2874    /**
2875     * @param value {@link #description} (A free text natural language description of the concept map from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2876     */
2877    public ConceptMap setDescriptionElement(MarkdownType value) { 
2878      this.description = value;
2879      return this;
2880    }
2881
2882    /**
2883     * @return A free text natural language description of the concept map from a consumer's perspective.
2884     */
2885    public String getDescription() { 
2886      return this.description == null ? null : this.description.getValue();
2887    }
2888
2889    /**
2890     * @param value A free text natural language description of the concept map from a consumer's perspective.
2891     */
2892    public ConceptMap setDescription(String value) { 
2893      if (value == null)
2894        this.description = null;
2895      else {
2896        if (this.description == null)
2897          this.description = new MarkdownType();
2898        this.description.setValue(value);
2899      }
2900      return this;
2901    }
2902
2903    /**
2904     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate concept map instances.)
2905     */
2906    public List<UsageContext> getUseContext() { 
2907      if (this.useContext == null)
2908        this.useContext = new ArrayList<UsageContext>();
2909      return this.useContext;
2910    }
2911
2912    /**
2913     * @return Returns a reference to <code>this</code> for easy method chaining
2914     */
2915    public ConceptMap setUseContext(List<UsageContext> theUseContext) { 
2916      this.useContext = theUseContext;
2917      return this;
2918    }
2919
2920    public boolean hasUseContext() { 
2921      if (this.useContext == null)
2922        return false;
2923      for (UsageContext item : this.useContext)
2924        if (!item.isEmpty())
2925          return true;
2926      return false;
2927    }
2928
2929    public UsageContext addUseContext() { //3
2930      UsageContext t = new UsageContext();
2931      if (this.useContext == null)
2932        this.useContext = new ArrayList<UsageContext>();
2933      this.useContext.add(t);
2934      return t;
2935    }
2936
2937    public ConceptMap addUseContext(UsageContext t) { //3
2938      if (t == null)
2939        return this;
2940      if (this.useContext == null)
2941        this.useContext = new ArrayList<UsageContext>();
2942      this.useContext.add(t);
2943      return this;
2944    }
2945
2946    /**
2947     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
2948     */
2949    public UsageContext getUseContextFirstRep() { 
2950      if (getUseContext().isEmpty()) {
2951        addUseContext();
2952      }
2953      return getUseContext().get(0);
2954    }
2955
2956    /**
2957     * @return {@link #jurisdiction} (A legal or geographic region in which the concept map is intended to be used.)
2958     */
2959    public List<CodeableConcept> getJurisdiction() { 
2960      if (this.jurisdiction == null)
2961        this.jurisdiction = new ArrayList<CodeableConcept>();
2962      return this.jurisdiction;
2963    }
2964
2965    /**
2966     * @return Returns a reference to <code>this</code> for easy method chaining
2967     */
2968    public ConceptMap setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2969      this.jurisdiction = theJurisdiction;
2970      return this;
2971    }
2972
2973    public boolean hasJurisdiction() { 
2974      if (this.jurisdiction == null)
2975        return false;
2976      for (CodeableConcept item : this.jurisdiction)
2977        if (!item.isEmpty())
2978          return true;
2979      return false;
2980    }
2981
2982    public CodeableConcept addJurisdiction() { //3
2983      CodeableConcept t = new CodeableConcept();
2984      if (this.jurisdiction == null)
2985        this.jurisdiction = new ArrayList<CodeableConcept>();
2986      this.jurisdiction.add(t);
2987      return t;
2988    }
2989
2990    public ConceptMap addJurisdiction(CodeableConcept t) { //3
2991      if (t == null)
2992        return this;
2993      if (this.jurisdiction == null)
2994        this.jurisdiction = new ArrayList<CodeableConcept>();
2995      this.jurisdiction.add(t);
2996      return this;
2997    }
2998
2999    /**
3000     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
3001     */
3002    public CodeableConcept getJurisdictionFirstRep() { 
3003      if (getJurisdiction().isEmpty()) {
3004        addJurisdiction();
3005      }
3006      return getJurisdiction().get(0);
3007    }
3008
3009    /**
3010     * @return {@link #purpose} (Explanation of why this concept map is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
3011     */
3012    public MarkdownType getPurposeElement() { 
3013      if (this.purpose == null)
3014        if (Configuration.errorOnAutoCreate())
3015          throw new Error("Attempt to auto-create ConceptMap.purpose");
3016        else if (Configuration.doAutoCreate())
3017          this.purpose = new MarkdownType(); // bb
3018      return this.purpose;
3019    }
3020
3021    public boolean hasPurposeElement() { 
3022      return this.purpose != null && !this.purpose.isEmpty();
3023    }
3024
3025    public boolean hasPurpose() { 
3026      return this.purpose != null && !this.purpose.isEmpty();
3027    }
3028
3029    /**
3030     * @param value {@link #purpose} (Explanation of why this concept map is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
3031     */
3032    public ConceptMap setPurposeElement(MarkdownType value) { 
3033      this.purpose = value;
3034      return this;
3035    }
3036
3037    /**
3038     * @return Explanation of why this concept map is needed and why it has been designed as it has.
3039     */
3040    public String getPurpose() { 
3041      return this.purpose == null ? null : this.purpose.getValue();
3042    }
3043
3044    /**
3045     * @param value Explanation of why this concept map is needed and why it has been designed as it has.
3046     */
3047    public ConceptMap setPurpose(String value) { 
3048      if (value == null)
3049        this.purpose = null;
3050      else {
3051        if (this.purpose == null)
3052          this.purpose = new MarkdownType();
3053        this.purpose.setValue(value);
3054      }
3055      return this;
3056    }
3057
3058    /**
3059     * @return {@link #copyright} (A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
3060     */
3061    public MarkdownType getCopyrightElement() { 
3062      if (this.copyright == null)
3063        if (Configuration.errorOnAutoCreate())
3064          throw new Error("Attempt to auto-create ConceptMap.copyright");
3065        else if (Configuration.doAutoCreate())
3066          this.copyright = new MarkdownType(); // bb
3067      return this.copyright;
3068    }
3069
3070    public boolean hasCopyrightElement() { 
3071      return this.copyright != null && !this.copyright.isEmpty();
3072    }
3073
3074    public boolean hasCopyright() { 
3075      return this.copyright != null && !this.copyright.isEmpty();
3076    }
3077
3078    /**
3079     * @param value {@link #copyright} (A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
3080     */
3081    public ConceptMap setCopyrightElement(MarkdownType value) { 
3082      this.copyright = value;
3083      return this;
3084    }
3085
3086    /**
3087     * @return A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.
3088     */
3089    public String getCopyright() { 
3090      return this.copyright == null ? null : this.copyright.getValue();
3091    }
3092
3093    /**
3094     * @param value A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.
3095     */
3096    public ConceptMap setCopyright(String value) { 
3097      if (value == null)
3098        this.copyright = null;
3099      else {
3100        if (this.copyright == null)
3101          this.copyright = new MarkdownType();
3102        this.copyright.setValue(value);
3103      }
3104      return this;
3105    }
3106
3107    /**
3108     * @return {@link #source} (Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.)
3109     */
3110    public Type getSource() { 
3111      return this.source;
3112    }
3113
3114    /**
3115     * @return {@link #source} (Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.)
3116     */
3117    public UriType getSourceUriType() throws FHIRException { 
3118      if (this.source == null)
3119        return null;
3120      if (!(this.source instanceof UriType))
3121        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.source.getClass().getName()+" was encountered");
3122      return (UriType) this.source;
3123    }
3124
3125    public boolean hasSourceUriType() { 
3126      return this != null && this.source instanceof UriType;
3127    }
3128
3129    /**
3130     * @return {@link #source} (Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.)
3131     */
3132    public CanonicalType getSourceCanonicalType() throws FHIRException { 
3133      if (this.source == null)
3134        return null;
3135      if (!(this.source instanceof CanonicalType))
3136        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.source.getClass().getName()+" was encountered");
3137      return (CanonicalType) this.source;
3138    }
3139
3140    public boolean hasSourceCanonicalType() { 
3141      return this != null && this.source instanceof CanonicalType;
3142    }
3143
3144    public boolean hasSource() { 
3145      return this.source != null && !this.source.isEmpty();
3146    }
3147
3148    /**
3149     * @param value {@link #source} (Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.)
3150     */
3151    public ConceptMap setSource(Type value) { 
3152      if (value != null && !(value instanceof UriType || value instanceof CanonicalType))
3153        throw new Error("Not the right type for ConceptMap.source[x]: "+value.fhirType());
3154      this.source = value;
3155      return this;
3156    }
3157
3158    /**
3159     * @return {@link #target} (The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
3160     */
3161    public Type getTarget() { 
3162      return this.target;
3163    }
3164
3165    /**
3166     * @return {@link #target} (The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
3167     */
3168    public UriType getTargetUriType() throws FHIRException { 
3169      if (this.target == null)
3170        return null;
3171      if (!(this.target instanceof UriType))
3172        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.target.getClass().getName()+" was encountered");
3173      return (UriType) this.target;
3174    }
3175
3176    public boolean hasTargetUriType() { 
3177      return this != null && this.target instanceof UriType;
3178    }
3179
3180    /**
3181     * @return {@link #target} (The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
3182     */
3183    public CanonicalType getTargetCanonicalType() throws FHIRException { 
3184      if (this.target == null)
3185        return null;
3186      if (!(this.target instanceof CanonicalType))
3187        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.target.getClass().getName()+" was encountered");
3188      return (CanonicalType) this.target;
3189    }
3190
3191    public boolean hasTargetCanonicalType() { 
3192      return this != null && this.target instanceof CanonicalType;
3193    }
3194
3195    public boolean hasTarget() { 
3196      return this.target != null && !this.target.isEmpty();
3197    }
3198
3199    /**
3200     * @param value {@link #target} (The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
3201     */
3202    public ConceptMap setTarget(Type value) { 
3203      if (value != null && !(value instanceof UriType || value instanceof CanonicalType))
3204        throw new Error("Not the right type for ConceptMap.target[x]: "+value.fhirType());
3205      this.target = value;
3206      return this;
3207    }
3208
3209    /**
3210     * @return {@link #group} (A group of mappings that all have the same source and target system.)
3211     */
3212    public List<ConceptMapGroupComponent> getGroup() { 
3213      if (this.group == null)
3214        this.group = new ArrayList<ConceptMapGroupComponent>();
3215      return this.group;
3216    }
3217
3218    /**
3219     * @return Returns a reference to <code>this</code> for easy method chaining
3220     */
3221    public ConceptMap setGroup(List<ConceptMapGroupComponent> theGroup) { 
3222      this.group = theGroup;
3223      return this;
3224    }
3225
3226    public boolean hasGroup() { 
3227      if (this.group == null)
3228        return false;
3229      for (ConceptMapGroupComponent item : this.group)
3230        if (!item.isEmpty())
3231          return true;
3232      return false;
3233    }
3234
3235    public ConceptMapGroupComponent addGroup() { //3
3236      ConceptMapGroupComponent t = new ConceptMapGroupComponent();
3237      if (this.group == null)
3238        this.group = new ArrayList<ConceptMapGroupComponent>();
3239      this.group.add(t);
3240      return t;
3241    }
3242
3243    public ConceptMap addGroup(ConceptMapGroupComponent t) { //3
3244      if (t == null)
3245        return this;
3246      if (this.group == null)
3247        this.group = new ArrayList<ConceptMapGroupComponent>();
3248      this.group.add(t);
3249      return this;
3250    }
3251
3252    /**
3253     * @return The first repetition of repeating field {@link #group}, creating it if it does not already exist
3254     */
3255    public ConceptMapGroupComponent getGroupFirstRep() { 
3256      if (getGroup().isEmpty()) {
3257        addGroup();
3258      }
3259      return getGroup().get(0);
3260    }
3261
3262      protected void listChildren(List<Property> children) {
3263        super.listChildren(children);
3264        children.add(new Property("url", "uri", "An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this concept map is (or will be) published.", 0, 1, url));
3265        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, 1, identifier));
3266        children.add(new Property("version", "string", "The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version));
3267        children.add(new Property("name", "string", "A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
3268        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the concept map.", 0, 1, title));
3269        children.add(new Property("status", "code", "The status of this concept map. Enables tracking the life-cycle of the content.", 0, 1, status));
3270        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
3271        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the concept map 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 concept map changes.", 0, 1, date));
3272        children.add(new Property("publisher", "string", "The name of the organization or individual that published the concept map.", 0, 1, publisher));
3273        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));
3274        children.add(new Property("description", "markdown", "A free text natural language description of the concept map from a consumer's perspective.", 0, 1, description));
3275        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate concept map instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
3276        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the concept map is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
3277        children.add(new Property("purpose", "markdown", "Explanation of why this concept map is needed and why it has been designed as it has.", 0, 1, purpose));
3278        children.add(new Property("copyright", "markdown", "A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.", 0, 1, copyright));
3279        children.add(new Property("source[x]", "uri|canonical(ValueSet)", "Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.", 0, 1, source));
3280        children.add(new Property("target[x]", "uri|canonical(ValueSet)", "The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, 1, target));
3281        children.add(new Property("group", "", "A group of mappings that all have the same source and target system.", 0, java.lang.Integer.MAX_VALUE, group));
3282      }
3283
3284      @Override
3285      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3286        switch (_hash) {
3287        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this concept map is (or will be) published.", 0, 1, url);
3288        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, 1, identifier);
3289        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version);
3290        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
3291        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the concept map.", 0, 1, title);
3292        case -892481550: /*status*/  return new Property("status", "code", "The status of this concept map. Enables tracking the life-cycle of the content.", 0, 1, status);
3293        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
3294        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the concept map 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 concept map changes.", 0, 1, date);
3295        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the concept map.", 0, 1, publisher);
3296        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);
3297        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the concept map from a consumer's perspective.", 0, 1, description);
3298        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 terms may be used to assist with indexing and searching for appropriate concept map instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
3299        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the concept map is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
3300        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this concept map is needed and why it has been designed as it has.", 0, 1, purpose);
3301        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the concept map and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the concept map.", 0, 1, copyright);
3302        case -1698413947: /*source[x]*/  return new Property("source[x]", "uri|canonical(ValueSet)", "Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.", 0, 1, source);
3303        case -896505829: /*source*/  return new Property("source[x]", "uri|canonical(ValueSet)", "Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.", 0, 1, source);
3304        case -1698419887: /*sourceUri*/  return new Property("source[x]", "uri|canonical(ValueSet)", "Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.", 0, 1, source);
3305        case 1509247769: /*sourceCanonical*/  return new Property("source[x]", "uri|canonical(ValueSet)", "Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.", 0, 1, source);
3306        case -815579825: /*target[x]*/  return new Property("target[x]", "uri|canonical(ValueSet)", "The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, 1, target);
3307        case -880905839: /*target*/  return new Property("target[x]", "uri|canonical(ValueSet)", "The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, 1, target);
3308        case -815585765: /*targetUri*/  return new Property("target[x]", "uri|canonical(ValueSet)", "The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, 1, target);
3309        case -1281653149: /*targetCanonical*/  return new Property("target[x]", "uri|canonical(ValueSet)", "The target value set provides context for the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, 1, target);
3310        case 98629247: /*group*/  return new Property("group", "", "A group of mappings that all have the same source and target system.", 0, java.lang.Integer.MAX_VALUE, group);
3311        default: return super.getNamedProperty(_hash, _name, _checkValid);
3312        }
3313
3314      }
3315
3316      @Override
3317      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3318        switch (hash) {
3319        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3320        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
3321        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3322        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3323        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3324        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3325        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3326        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3327        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3328        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3329        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3330        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3331        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3332        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
3333        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
3334        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Type
3335        case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type
3336        case 98629247: /*group*/ return this.group == null ? new Base[0] : this.group.toArray(new Base[this.group.size()]); // ConceptMapGroupComponent
3337        default: return super.getProperty(hash, name, checkValid);
3338        }
3339
3340      }
3341
3342      @Override
3343      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3344        switch (hash) {
3345        case 116079: // url
3346          this.url = castToUri(value); // UriType
3347          return value;
3348        case -1618432855: // identifier
3349          this.identifier = castToIdentifier(value); // Identifier
3350          return value;
3351        case 351608024: // version
3352          this.version = castToString(value); // StringType
3353          return value;
3354        case 3373707: // name
3355          this.name = castToString(value); // StringType
3356          return value;
3357        case 110371416: // title
3358          this.title = castToString(value); // StringType
3359          return value;
3360        case -892481550: // status
3361          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3362          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3363          return value;
3364        case -404562712: // experimental
3365          this.experimental = castToBoolean(value); // BooleanType
3366          return value;
3367        case 3076014: // date
3368          this.date = castToDateTime(value); // DateTimeType
3369          return value;
3370        case 1447404028: // publisher
3371          this.publisher = castToString(value); // StringType
3372          return value;
3373        case 951526432: // contact
3374          this.getContact().add(castToContactDetail(value)); // ContactDetail
3375          return value;
3376        case -1724546052: // description
3377          this.description = castToMarkdown(value); // MarkdownType
3378          return value;
3379        case -669707736: // useContext
3380          this.getUseContext().add(castToUsageContext(value)); // UsageContext
3381          return value;
3382        case -507075711: // jurisdiction
3383          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
3384          return value;
3385        case -220463842: // purpose
3386          this.purpose = castToMarkdown(value); // MarkdownType
3387          return value;
3388        case 1522889671: // copyright
3389          this.copyright = castToMarkdown(value); // MarkdownType
3390          return value;
3391        case -896505829: // source
3392          this.source = castToType(value); // Type
3393          return value;
3394        case -880905839: // target
3395          this.target = castToType(value); // Type
3396          return value;
3397        case 98629247: // group
3398          this.getGroup().add((ConceptMapGroupComponent) value); // ConceptMapGroupComponent
3399          return value;
3400        default: return super.setProperty(hash, name, value);
3401        }
3402
3403      }
3404
3405      @Override
3406      public Base setProperty(String name, Base value) throws FHIRException {
3407        if (name.equals("url")) {
3408          this.url = castToUri(value); // UriType
3409        } else if (name.equals("identifier")) {
3410          this.identifier = castToIdentifier(value); // Identifier
3411        } else if (name.equals("version")) {
3412          this.version = castToString(value); // StringType
3413        } else if (name.equals("name")) {
3414          this.name = castToString(value); // StringType
3415        } else if (name.equals("title")) {
3416          this.title = castToString(value); // StringType
3417        } else if (name.equals("status")) {
3418          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3419          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3420        } else if (name.equals("experimental")) {
3421          this.experimental = castToBoolean(value); // BooleanType
3422        } else if (name.equals("date")) {
3423          this.date = castToDateTime(value); // DateTimeType
3424        } else if (name.equals("publisher")) {
3425          this.publisher = castToString(value); // StringType
3426        } else if (name.equals("contact")) {
3427          this.getContact().add(castToContactDetail(value));
3428        } else if (name.equals("description")) {
3429          this.description = castToMarkdown(value); // MarkdownType
3430        } else if (name.equals("useContext")) {
3431          this.getUseContext().add(castToUsageContext(value));
3432        } else if (name.equals("jurisdiction")) {
3433          this.getJurisdiction().add(castToCodeableConcept(value));
3434        } else if (name.equals("purpose")) {
3435          this.purpose = castToMarkdown(value); // MarkdownType
3436        } else if (name.equals("copyright")) {
3437          this.copyright = castToMarkdown(value); // MarkdownType
3438        } else if (name.equals("source[x]")) {
3439          this.source = castToType(value); // Type
3440        } else if (name.equals("target[x]")) {
3441          this.target = castToType(value); // Type
3442        } else if (name.equals("group")) {
3443          this.getGroup().add((ConceptMapGroupComponent) value);
3444        } else
3445          return super.setProperty(name, value);
3446        return value;
3447      }
3448
3449      @Override
3450      public Base makeProperty(int hash, String name) throws FHIRException {
3451        switch (hash) {
3452        case 116079:  return getUrlElement();
3453        case -1618432855:  return getIdentifier(); 
3454        case 351608024:  return getVersionElement();
3455        case 3373707:  return getNameElement();
3456        case 110371416:  return getTitleElement();
3457        case -892481550:  return getStatusElement();
3458        case -404562712:  return getExperimentalElement();
3459        case 3076014:  return getDateElement();
3460        case 1447404028:  return getPublisherElement();
3461        case 951526432:  return addContact(); 
3462        case -1724546052:  return getDescriptionElement();
3463        case -669707736:  return addUseContext(); 
3464        case -507075711:  return addJurisdiction(); 
3465        case -220463842:  return getPurposeElement();
3466        case 1522889671:  return getCopyrightElement();
3467        case -1698413947:  return getSource(); 
3468        case -896505829:  return getSource(); 
3469        case -815579825:  return getTarget(); 
3470        case -880905839:  return getTarget(); 
3471        case 98629247:  return addGroup(); 
3472        default: return super.makeProperty(hash, name);
3473        }
3474
3475      }
3476
3477      @Override
3478      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3479        switch (hash) {
3480        case 116079: /*url*/ return new String[] {"uri"};
3481        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3482        case 351608024: /*version*/ return new String[] {"string"};
3483        case 3373707: /*name*/ return new String[] {"string"};
3484        case 110371416: /*title*/ return new String[] {"string"};
3485        case -892481550: /*status*/ return new String[] {"code"};
3486        case -404562712: /*experimental*/ return new String[] {"boolean"};
3487        case 3076014: /*date*/ return new String[] {"dateTime"};
3488        case 1447404028: /*publisher*/ return new String[] {"string"};
3489        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3490        case -1724546052: /*description*/ return new String[] {"markdown"};
3491        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3492        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
3493        case -220463842: /*purpose*/ return new String[] {"markdown"};
3494        case 1522889671: /*copyright*/ return new String[] {"markdown"};
3495        case -896505829: /*source*/ return new String[] {"uri", "canonical"};
3496        case -880905839: /*target*/ return new String[] {"uri", "canonical"};
3497        case 98629247: /*group*/ return new String[] {};
3498        default: return super.getTypesForProperty(hash, name);
3499        }
3500
3501      }
3502
3503      @Override
3504      public Base addChild(String name) throws FHIRException {
3505        if (name.equals("url")) {
3506          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.url");
3507        }
3508        else if (name.equals("identifier")) {
3509          this.identifier = new Identifier();
3510          return this.identifier;
3511        }
3512        else if (name.equals("version")) {
3513          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version");
3514        }
3515        else if (name.equals("name")) {
3516          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.name");
3517        }
3518        else if (name.equals("title")) {
3519          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.title");
3520        }
3521        else if (name.equals("status")) {
3522          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.status");
3523        }
3524        else if (name.equals("experimental")) {
3525          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.experimental");
3526        }
3527        else if (name.equals("date")) {
3528          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.date");
3529        }
3530        else if (name.equals("publisher")) {
3531          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.publisher");
3532        }
3533        else if (name.equals("contact")) {
3534          return addContact();
3535        }
3536        else if (name.equals("description")) {
3537          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.description");
3538        }
3539        else if (name.equals("useContext")) {
3540          return addUseContext();
3541        }
3542        else if (name.equals("jurisdiction")) {
3543          return addJurisdiction();
3544        }
3545        else if (name.equals("purpose")) {
3546          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.purpose");
3547        }
3548        else if (name.equals("copyright")) {
3549          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.copyright");
3550        }
3551        else if (name.equals("sourceUri")) {
3552          this.source = new UriType();
3553          return this.source;
3554        }
3555        else if (name.equals("sourceCanonical")) {
3556          this.source = new CanonicalType();
3557          return this.source;
3558        }
3559        else if (name.equals("targetUri")) {
3560          this.target = new UriType();
3561          return this.target;
3562        }
3563        else if (name.equals("targetCanonical")) {
3564          this.target = new CanonicalType();
3565          return this.target;
3566        }
3567        else if (name.equals("group")) {
3568          return addGroup();
3569        }
3570        else
3571          return super.addChild(name);
3572      }
3573
3574  public String fhirType() {
3575    return "ConceptMap";
3576
3577  }
3578
3579      public ConceptMap copy() {
3580        ConceptMap dst = new ConceptMap();
3581        copyValues(dst);
3582        dst.url = url == null ? null : url.copy();
3583        dst.identifier = identifier == null ? null : identifier.copy();
3584        dst.version = version == null ? null : version.copy();
3585        dst.name = name == null ? null : name.copy();
3586        dst.title = title == null ? null : title.copy();
3587        dst.status = status == null ? null : status.copy();
3588        dst.experimental = experimental == null ? null : experimental.copy();
3589        dst.date = date == null ? null : date.copy();
3590        dst.publisher = publisher == null ? null : publisher.copy();
3591        if (contact != null) {
3592          dst.contact = new ArrayList<ContactDetail>();
3593          for (ContactDetail i : contact)
3594            dst.contact.add(i.copy());
3595        };
3596        dst.description = description == null ? null : description.copy();
3597        if (useContext != null) {
3598          dst.useContext = new ArrayList<UsageContext>();
3599          for (UsageContext i : useContext)
3600            dst.useContext.add(i.copy());
3601        };
3602        if (jurisdiction != null) {
3603          dst.jurisdiction = new ArrayList<CodeableConcept>();
3604          for (CodeableConcept i : jurisdiction)
3605            dst.jurisdiction.add(i.copy());
3606        };
3607        dst.purpose = purpose == null ? null : purpose.copy();
3608        dst.copyright = copyright == null ? null : copyright.copy();
3609        dst.source = source == null ? null : source.copy();
3610        dst.target = target == null ? null : target.copy();
3611        if (group != null) {
3612          dst.group = new ArrayList<ConceptMapGroupComponent>();
3613          for (ConceptMapGroupComponent i : group)
3614            dst.group.add(i.copy());
3615        };
3616        return dst;
3617      }
3618
3619      protected ConceptMap typedCopy() {
3620        return copy();
3621      }
3622
3623      @Override
3624      public boolean equalsDeep(Base other_) {
3625        if (!super.equalsDeep(other_))
3626          return false;
3627        if (!(other_ instanceof ConceptMap))
3628          return false;
3629        ConceptMap o = (ConceptMap) other_;
3630        return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
3631           && compareDeep(source, o.source, true) && compareDeep(target, o.target, true) && compareDeep(group, o.group, true)
3632          ;
3633      }
3634
3635      @Override
3636      public boolean equalsShallow(Base other_) {
3637        if (!super.equalsShallow(other_))
3638          return false;
3639        if (!(other_ instanceof ConceptMap))
3640          return false;
3641        ConceptMap o = (ConceptMap) other_;
3642        return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true);
3643      }
3644
3645      public boolean isEmpty() {
3646        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright
3647          , source, target, group);
3648      }
3649
3650  @Override
3651  public ResourceType getResourceType() {
3652    return ResourceType.ConceptMap;
3653   }
3654
3655 /**
3656   * Search parameter: <b>date</b>
3657   * <p>
3658   * Description: <b>The concept map publication date</b><br>
3659   * Type: <b>date</b><br>
3660   * Path: <b>ConceptMap.date</b><br>
3661   * </p>
3662   */
3663  @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" )
3664  public static final String SP_DATE = "date";
3665 /**
3666   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3667   * <p>
3668   * Description: <b>The concept map publication date</b><br>
3669   * Type: <b>date</b><br>
3670   * Path: <b>ConceptMap.date</b><br>
3671   * </p>
3672   */
3673  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3674
3675 /**
3676   * Search parameter: <b>identifier</b>
3677   * <p>
3678   * Description: <b>External identifier for the concept map</b><br>
3679   * Type: <b>token</b><br>
3680   * Path: <b>ConceptMap.identifier</b><br>
3681   * </p>
3682   */
3683  @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="External identifier for the concept map", type="token" )
3684  public static final String SP_IDENTIFIER = "identifier";
3685 /**
3686   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3687   * <p>
3688   * Description: <b>External identifier for the concept map</b><br>
3689   * Type: <b>token</b><br>
3690   * Path: <b>ConceptMap.identifier</b><br>
3691   * </p>
3692   */
3693  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3694
3695 /**
3696   * Search parameter: <b>product</b>
3697   * <p>
3698   * Description: <b>Reference to property mapping depends on</b><br>
3699   * Type: <b>uri</b><br>
3700   * Path: <b>ConceptMap.group.element.target.product.property</b><br>
3701   * </p>
3702   */
3703  @SearchParamDefinition(name="product", path="ConceptMap.group.element.target.product.property", description="Reference to property mapping depends on", type="uri" )
3704  public static final String SP_PRODUCT = "product";
3705 /**
3706   * <b>Fluent Client</b> search parameter constant for <b>product</b>
3707   * <p>
3708   * Description: <b>Reference to property mapping depends on</b><br>
3709   * Type: <b>uri</b><br>
3710   * Path: <b>ConceptMap.group.element.target.product.property</b><br>
3711   * </p>
3712   */
3713  public static final ca.uhn.fhir.rest.gclient.UriClientParam PRODUCT = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_PRODUCT);
3714
3715 /**
3716   * Search parameter: <b>other</b>
3717   * <p>
3718   * Description: <b>Canonical URI for an additional ConceptMap to use for mapping if the source concept is unmapped</b><br>
3719   * Type: <b>reference</b><br>
3720   * Path: <b>ConceptMap.group.unmapped.url</b><br>
3721   * </p>
3722   */
3723  @SearchParamDefinition(name="other", path="ConceptMap.group.unmapped.url", description="Canonical URI for an additional ConceptMap to use for mapping if the source concept is unmapped", type="reference", target={ConceptMap.class } )
3724  public static final String SP_OTHER = "other";
3725 /**
3726   * <b>Fluent Client</b> search parameter constant for <b>other</b>
3727   * <p>
3728   * Description: <b>Canonical URI for an additional ConceptMap to use for mapping if the source concept is unmapped</b><br>
3729   * Type: <b>reference</b><br>
3730   * Path: <b>ConceptMap.group.unmapped.url</b><br>
3731   * </p>
3732   */
3733  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OTHER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OTHER);
3734
3735/**
3736   * Constant for fluent queries to be used to add include statements. Specifies
3737   * the path value of "<b>ConceptMap:other</b>".
3738   */
3739  public static final ca.uhn.fhir.model.api.Include INCLUDE_OTHER = new ca.uhn.fhir.model.api.Include("ConceptMap:other").toLocked();
3740
3741 /**
3742   * Search parameter: <b>target-system</b>
3743   * <p>
3744   * Description: <b>Target system that the concepts are to be mapped to</b><br>
3745   * Type: <b>uri</b><br>
3746   * Path: <b>ConceptMap.group.target</b><br>
3747   * </p>
3748   */
3749  @SearchParamDefinition(name="target-system", path="ConceptMap.group.target", description="Target system that the concepts are to be mapped to", type="uri" )
3750  public static final String SP_TARGET_SYSTEM = "target-system";
3751 /**
3752   * <b>Fluent Client</b> search parameter constant for <b>target-system</b>
3753   * <p>
3754   * Description: <b>Target system that the concepts are to be mapped to</b><br>
3755   * Type: <b>uri</b><br>
3756   * Path: <b>ConceptMap.group.target</b><br>
3757   * </p>
3758   */
3759  public static final ca.uhn.fhir.rest.gclient.UriClientParam TARGET_SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_TARGET_SYSTEM);
3760
3761 /**
3762   * Search parameter: <b>dependson</b>
3763   * <p>
3764   * Description: <b>Reference to property mapping depends on</b><br>
3765   * Type: <b>uri</b><br>
3766   * Path: <b>ConceptMap.group.element.target.dependsOn.property</b><br>
3767   * </p>
3768   */
3769  @SearchParamDefinition(name="dependson", path="ConceptMap.group.element.target.dependsOn.property", description="Reference to property mapping depends on", type="uri" )
3770  public static final String SP_DEPENDSON = "dependson";
3771 /**
3772   * <b>Fluent Client</b> search parameter constant for <b>dependson</b>
3773   * <p>
3774   * Description: <b>Reference to property mapping depends on</b><br>
3775   * Type: <b>uri</b><br>
3776   * Path: <b>ConceptMap.group.element.target.dependsOn.property</b><br>
3777   * </p>
3778   */
3779  public static final ca.uhn.fhir.rest.gclient.UriClientParam DEPENDSON = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_DEPENDSON);
3780
3781 /**
3782   * Search parameter: <b>jurisdiction</b>
3783   * <p>
3784   * Description: <b>Intended jurisdiction for the concept map</b><br>
3785   * Type: <b>token</b><br>
3786   * Path: <b>ConceptMap.jurisdiction</b><br>
3787   * </p>
3788   */
3789  @SearchParamDefinition(name="jurisdiction", path="ConceptMap.jurisdiction", description="Intended jurisdiction for the concept map", type="token" )
3790  public static final String SP_JURISDICTION = "jurisdiction";
3791 /**
3792   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
3793   * <p>
3794   * Description: <b>Intended jurisdiction for the concept map</b><br>
3795   * Type: <b>token</b><br>
3796   * Path: <b>ConceptMap.jurisdiction</b><br>
3797   * </p>
3798   */
3799  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
3800
3801 /**
3802   * Search parameter: <b>description</b>
3803   * <p>
3804   * Description: <b>The description of the concept map</b><br>
3805   * Type: <b>string</b><br>
3806   * Path: <b>ConceptMap.description</b><br>
3807   * </p>
3808   */
3809  @SearchParamDefinition(name="description", path="ConceptMap.description", description="The description of the concept map", type="string" )
3810  public static final String SP_DESCRIPTION = "description";
3811 /**
3812   * <b>Fluent Client</b> search parameter constant for <b>description</b>
3813   * <p>
3814   * Description: <b>The description of the concept map</b><br>
3815   * Type: <b>string</b><br>
3816   * Path: <b>ConceptMap.description</b><br>
3817   * </p>
3818   */
3819  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
3820
3821 /**
3822   * Search parameter: <b>source</b>
3823   * <p>
3824   * Description: <b>The source value set that contains the concepts that are being mapped</b><br>
3825   * Type: <b>reference</b><br>
3826   * Path: <b>ConceptMap.sourceCanonical</b><br>
3827   * </p>
3828   */
3829  @SearchParamDefinition(name="source", path="ConceptMap.source.as(canonical)", description="The source value set that contains the concepts that are being mapped", type="reference", target={ValueSet.class } )
3830  public static final String SP_SOURCE = "source";
3831 /**
3832   * <b>Fluent Client</b> search parameter constant for <b>source</b>
3833   * <p>
3834   * Description: <b>The source value set that contains the concepts that are being mapped</b><br>
3835   * Type: <b>reference</b><br>
3836   * Path: <b>ConceptMap.sourceCanonical</b><br>
3837   * </p>
3838   */
3839  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE);
3840
3841/**
3842   * Constant for fluent queries to be used to add include statements. Specifies
3843   * the path value of "<b>ConceptMap:source</b>".
3844   */
3845  public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("ConceptMap:source").toLocked();
3846
3847 /**
3848   * Search parameter: <b>title</b>
3849   * <p>
3850   * Description: <b>The human-friendly name of the concept map</b><br>
3851   * Type: <b>string</b><br>
3852   * Path: <b>ConceptMap.title</b><br>
3853   * </p>
3854   */
3855  @SearchParamDefinition(name="title", path="ConceptMap.title", description="The human-friendly name of the concept map", type="string" )
3856  public static final String SP_TITLE = "title";
3857 /**
3858   * <b>Fluent Client</b> search parameter constant for <b>title</b>
3859   * <p>
3860   * Description: <b>The human-friendly name of the concept map</b><br>
3861   * Type: <b>string</b><br>
3862   * Path: <b>ConceptMap.title</b><br>
3863   * </p>
3864   */
3865  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
3866
3867 /**
3868   * Search parameter: <b>version</b>
3869   * <p>
3870   * Description: <b>The business version of the concept map</b><br>
3871   * Type: <b>token</b><br>
3872   * Path: <b>ConceptMap.version</b><br>
3873   * </p>
3874   */
3875  @SearchParamDefinition(name="version", path="ConceptMap.version", description="The business version of the concept map", type="token" )
3876  public static final String SP_VERSION = "version";
3877 /**
3878   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3879   * <p>
3880   * Description: <b>The business version of the concept map</b><br>
3881   * Type: <b>token</b><br>
3882   * Path: <b>ConceptMap.version</b><br>
3883   * </p>
3884   */
3885  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3886
3887 /**
3888   * Search parameter: <b>url</b>
3889   * <p>
3890   * Description: <b>The uri that identifies the concept map</b><br>
3891   * Type: <b>uri</b><br>
3892   * Path: <b>ConceptMap.url</b><br>
3893   * </p>
3894   */
3895  @SearchParamDefinition(name="url", path="ConceptMap.url", description="The uri that identifies the concept map", type="uri" )
3896  public static final String SP_URL = "url";
3897 /**
3898   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3899   * <p>
3900   * Description: <b>The uri that identifies the concept map</b><br>
3901   * Type: <b>uri</b><br>
3902   * Path: <b>ConceptMap.url</b><br>
3903   * </p>
3904   */
3905  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3906
3907 /**
3908   * Search parameter: <b>target</b>
3909   * <p>
3910   * Description: <b>The target value set which provides context for the mappings</b><br>
3911   * Type: <b>reference</b><br>
3912   * Path: <b>ConceptMap.targetCanonical</b><br>
3913   * </p>
3914   */
3915  @SearchParamDefinition(name="target", path="ConceptMap.target.as(canonical)", description="The target value set which provides context for the mappings", type="reference", target={ValueSet.class } )
3916  public static final String SP_TARGET = "target";
3917 /**
3918   * <b>Fluent Client</b> search parameter constant for <b>target</b>
3919   * <p>
3920   * Description: <b>The target value set which provides context for the mappings</b><br>
3921   * Type: <b>reference</b><br>
3922   * Path: <b>ConceptMap.targetCanonical</b><br>
3923   * </p>
3924   */
3925  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGET);
3926
3927/**
3928   * Constant for fluent queries to be used to add include statements. Specifies
3929   * the path value of "<b>ConceptMap:target</b>".
3930   */
3931  public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include("ConceptMap:target").toLocked();
3932
3933 /**
3934   * Search parameter: <b>source-code</b>
3935   * <p>
3936   * Description: <b>Identifies element being mapped</b><br>
3937   * Type: <b>token</b><br>
3938   * Path: <b>ConceptMap.group.element.code</b><br>
3939   * </p>
3940   */
3941  @SearchParamDefinition(name="source-code", path="ConceptMap.group.element.code", description="Identifies element being mapped", type="token" )
3942  public static final String SP_SOURCE_CODE = "source-code";
3943 /**
3944   * <b>Fluent Client</b> search parameter constant for <b>source-code</b>
3945   * <p>
3946   * Description: <b>Identifies element being mapped</b><br>
3947   * Type: <b>token</b><br>
3948   * Path: <b>ConceptMap.group.element.code</b><br>
3949   * </p>
3950   */
3951  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SOURCE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SOURCE_CODE);
3952
3953 /**
3954   * Search parameter: <b>source-uri</b>
3955   * <p>
3956   * Description: <b>The source value set that contains the concepts that are being mapped</b><br>
3957   * Type: <b>reference</b><br>
3958   * Path: <b>ConceptMap.sourceUri</b><br>
3959   * </p>
3960   */
3961  @SearchParamDefinition(name="source-uri", path="ConceptMap.source.as(uri)", description="The source value set that contains the concepts that are being mapped", type="reference", target={ValueSet.class } )
3962  public static final String SP_SOURCE_URI = "source-uri";
3963 /**
3964   * <b>Fluent Client</b> search parameter constant for <b>source-uri</b>
3965   * <p>
3966   * Description: <b>The source value set that contains the concepts that are being mapped</b><br>
3967   * Type: <b>reference</b><br>
3968   * Path: <b>ConceptMap.sourceUri</b><br>
3969   * </p>
3970   */
3971  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE_URI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE_URI);
3972
3973/**
3974   * Constant for fluent queries to be used to add include statements. Specifies
3975   * the path value of "<b>ConceptMap:source-uri</b>".
3976   */
3977  public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE_URI = new ca.uhn.fhir.model.api.Include("ConceptMap:source-uri").toLocked();
3978
3979 /**
3980   * Search parameter: <b>name</b>
3981   * <p>
3982   * Description: <b>Computationally friendly name of the concept map</b><br>
3983   * Type: <b>string</b><br>
3984   * Path: <b>ConceptMap.name</b><br>
3985   * </p>
3986   */
3987  @SearchParamDefinition(name="name", path="ConceptMap.name", description="Computationally friendly name of the concept map", type="string" )
3988  public static final String SP_NAME = "name";
3989 /**
3990   * <b>Fluent Client</b> search parameter constant for <b>name</b>
3991   * <p>
3992   * Description: <b>Computationally friendly name of the concept map</b><br>
3993   * Type: <b>string</b><br>
3994   * Path: <b>ConceptMap.name</b><br>
3995   * </p>
3996   */
3997  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
3998
3999 /**
4000   * Search parameter: <b>publisher</b>
4001   * <p>
4002   * Description: <b>Name of the publisher of the concept map</b><br>
4003   * Type: <b>string</b><br>
4004   * Path: <b>ConceptMap.publisher</b><br>
4005   * </p>
4006   */
4007  @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" )
4008  public static final String SP_PUBLISHER = "publisher";
4009 /**
4010   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
4011   * <p>
4012   * Description: <b>Name of the publisher of the concept map</b><br>
4013   * Type: <b>string</b><br>
4014   * Path: <b>ConceptMap.publisher</b><br>
4015   * </p>
4016   */
4017  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
4018
4019 /**
4020   * Search parameter: <b>source-system</b>
4021   * <p>
4022   * Description: <b>Source system where concepts to be mapped are defined</b><br>
4023   * Type: <b>uri</b><br>
4024   * Path: <b>ConceptMap.group.source</b><br>
4025   * </p>
4026   */
4027  @SearchParamDefinition(name="source-system", path="ConceptMap.group.source", description="Source system where concepts to be mapped are defined", type="uri" )
4028  public static final String SP_SOURCE_SYSTEM = "source-system";
4029 /**
4030   * <b>Fluent Client</b> search parameter constant for <b>source-system</b>
4031   * <p>
4032   * Description: <b>Source system where concepts to be mapped are defined</b><br>
4033   * Type: <b>uri</b><br>
4034   * Path: <b>ConceptMap.group.source</b><br>
4035   * </p>
4036   */
4037  public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCE_SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SOURCE_SYSTEM);
4038
4039 /**
4040   * Search parameter: <b>target-code</b>
4041   * <p>
4042   * Description: <b>Code that identifies the target element</b><br>
4043   * Type: <b>token</b><br>
4044   * Path: <b>ConceptMap.group.element.target.code</b><br>
4045   * </p>
4046   */
4047  @SearchParamDefinition(name="target-code", path="ConceptMap.group.element.target.code", description="Code that identifies the target element", type="token" )
4048  public static final String SP_TARGET_CODE = "target-code";
4049 /**
4050   * <b>Fluent Client</b> search parameter constant for <b>target-code</b>
4051   * <p>
4052   * Description: <b>Code that identifies the target element</b><br>
4053   * Type: <b>token</b><br>
4054   * Path: <b>ConceptMap.group.element.target.code</b><br>
4055   * </p>
4056   */
4057  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_CODE);
4058
4059 /**
4060   * Search parameter: <b>status</b>
4061   * <p>
4062   * Description: <b>The current status of the concept map</b><br>
4063   * Type: <b>token</b><br>
4064   * Path: <b>ConceptMap.status</b><br>
4065   * </p>
4066   */
4067  @SearchParamDefinition(name="status", path="ConceptMap.status", description="The current status of the concept map", type="token" )
4068  public static final String SP_STATUS = "status";
4069 /**
4070   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4071   * <p>
4072   * Description: <b>The current status of the concept map</b><br>
4073   * Type: <b>token</b><br>
4074   * Path: <b>ConceptMap.status</b><br>
4075   * </p>
4076   */
4077  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4078
4079 /**
4080   * Search parameter: <b>target-uri</b>
4081   * <p>
4082   * Description: <b>The target value set which provides context for the mappings</b><br>
4083   * Type: <b>reference</b><br>
4084   * Path: <b>ConceptMap.targetUri</b><br>
4085   * </p>
4086   */
4087  @SearchParamDefinition(name="target-uri", path="ConceptMap.target.as(uri)", description="The target value set which provides context for the mappings", type="reference", target={ValueSet.class } )
4088  public static final String SP_TARGET_URI = "target-uri";
4089 /**
4090   * <b>Fluent Client</b> search parameter constant for <b>target-uri</b>
4091   * <p>
4092   * Description: <b>The target value set which provides context for the mappings</b><br>
4093   * Type: <b>reference</b><br>
4094   * Path: <b>ConceptMap.targetUri</b><br>
4095   * </p>
4096   */
4097  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET_URI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGET_URI);
4098
4099/**
4100   * Constant for fluent queries to be used to add include statements. Specifies
4101   * the path value of "<b>ConceptMap:target-uri</b>".
4102   */
4103  public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET_URI = new ca.uhn.fhir.model.api.Include("ConceptMap:target-uri").toLocked();
4104
4105
4106}
4107