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