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