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