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