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