001package org.hl7.fhir.dstu2016may.model;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036import java.util.ArrayList;
037import java.util.Date;
038import java.util.List;
039
040import org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence;
041import org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalenceEnumFactory;
042import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatus;
043import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatusEnumFactory;
044import org.hl7.fhir.exceptions.FHIRException;
045import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
046import org.hl7.fhir.utilities.Utilities;
047
048import ca.uhn.fhir.model.api.annotation.Block;
049import ca.uhn.fhir.model.api.annotation.Child;
050import ca.uhn.fhir.model.api.annotation.Description;
051import ca.uhn.fhir.model.api.annotation.ResourceDef;
052import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
053/**
054 * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.
055 */
056@ResourceDef(name="ConceptMap", profile="http://hl7.org/fhir/Profile/ConceptMap")
057public class ConceptMap extends DomainResource {
058
059    @Block()
060    public static class ConceptMapContactComponent extends BackboneElement implements IBaseBackboneElement {
061        /**
062         * The name of an individual to contact regarding the concept map.
063         */
064        @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
065        @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the concept map." )
066        protected StringType name;
067
068        /**
069         * Contact details for individual (if a name was provided) or the publisher.
070         */
071        @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
072        @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." )
073        protected List<ContactPoint> telecom;
074
075        private static final long serialVersionUID = -1179697803L;
076
077    /**
078     * Constructor
079     */
080      public ConceptMapContactComponent() {
081        super();
082      }
083
084        /**
085         * @return {@link #name} (The name of an individual to contact regarding the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
086         */
087        public StringType getNameElement() { 
088          if (this.name == null)
089            if (Configuration.errorOnAutoCreate())
090              throw new Error("Attempt to auto-create ConceptMapContactComponent.name");
091            else if (Configuration.doAutoCreate())
092              this.name = new StringType(); // bb
093          return this.name;
094        }
095
096        public boolean hasNameElement() { 
097          return this.name != null && !this.name.isEmpty();
098        }
099
100        public boolean hasName() { 
101          return this.name != null && !this.name.isEmpty();
102        }
103
104        /**
105         * @param value {@link #name} (The name of an individual to contact regarding the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
106         */
107        public ConceptMapContactComponent setNameElement(StringType value) { 
108          this.name = value;
109          return this;
110        }
111
112        /**
113         * @return The name of an individual to contact regarding the concept map.
114         */
115        public String getName() { 
116          return this.name == null ? null : this.name.getValue();
117        }
118
119        /**
120         * @param value The name of an individual to contact regarding the concept map.
121         */
122        public ConceptMapContactComponent setName(String value) { 
123          if (Utilities.noString(value))
124            this.name = null;
125          else {
126            if (this.name == null)
127              this.name = new StringType();
128            this.name.setValue(value);
129          }
130          return this;
131        }
132
133        /**
134         * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.)
135         */
136        public List<ContactPoint> getTelecom() { 
137          if (this.telecom == null)
138            this.telecom = new ArrayList<ContactPoint>();
139          return this.telecom;
140        }
141
142        public boolean hasTelecom() { 
143          if (this.telecom == null)
144            return false;
145          for (ContactPoint item : this.telecom)
146            if (!item.isEmpty())
147              return true;
148          return false;
149        }
150
151        /**
152         * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.)
153         */
154    // syntactic sugar
155        public ContactPoint addTelecom() { //3
156          ContactPoint t = new ContactPoint();
157          if (this.telecom == null)
158            this.telecom = new ArrayList<ContactPoint>();
159          this.telecom.add(t);
160          return t;
161        }
162
163    // syntactic sugar
164        public ConceptMapContactComponent addTelecom(ContactPoint t) { //3
165          if (t == null)
166            return this;
167          if (this.telecom == null)
168            this.telecom = new ArrayList<ContactPoint>();
169          this.telecom.add(t);
170          return this;
171        }
172
173        protected void listChildren(List<Property> childrenList) {
174          super.listChildren(childrenList);
175          childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the concept map.", 0, java.lang.Integer.MAX_VALUE, name));
176          childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom));
177        }
178
179      @Override
180      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
181        switch (hash) {
182        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
183        case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
184        default: return super.getProperty(hash, name, checkValid);
185        }
186
187      }
188
189      @Override
190      public void setProperty(int hash, String name, Base value) throws FHIRException {
191        switch (hash) {
192        case 3373707: // name
193          this.name = castToString(value); // StringType
194          break;
195        case -1429363305: // telecom
196          this.getTelecom().add(castToContactPoint(value)); // ContactPoint
197          break;
198        default: super.setProperty(hash, name, value);
199        }
200
201      }
202
203      @Override
204      public void setProperty(String name, Base value) throws FHIRException {
205        if (name.equals("name"))
206          this.name = castToString(value); // StringType
207        else if (name.equals("telecom"))
208          this.getTelecom().add(castToContactPoint(value));
209        else
210          super.setProperty(name, value);
211      }
212
213      @Override
214      public Base makeProperty(int hash, String name) throws FHIRException {
215        switch (hash) {
216        case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
217        case -1429363305:  return addTelecom(); // ContactPoint
218        default: return super.makeProperty(hash, name);
219        }
220
221      }
222
223      @Override
224      public Base addChild(String name) throws FHIRException {
225        if (name.equals("name")) {
226          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.name");
227        }
228        else if (name.equals("telecom")) {
229          return addTelecom();
230        }
231        else
232          return super.addChild(name);
233      }
234
235      public ConceptMapContactComponent copy() {
236        ConceptMapContactComponent dst = new ConceptMapContactComponent();
237        copyValues(dst);
238        dst.name = name == null ? null : name.copy();
239        if (telecom != null) {
240          dst.telecom = new ArrayList<ContactPoint>();
241          for (ContactPoint i : telecom)
242            dst.telecom.add(i.copy());
243        };
244        return dst;
245      }
246
247      @Override
248      public boolean equalsDeep(Base other) {
249        if (!super.equalsDeep(other))
250          return false;
251        if (!(other instanceof ConceptMapContactComponent))
252          return false;
253        ConceptMapContactComponent o = (ConceptMapContactComponent) other;
254        return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true);
255      }
256
257      @Override
258      public boolean equalsShallow(Base other) {
259        if (!super.equalsShallow(other))
260          return false;
261        if (!(other instanceof ConceptMapContactComponent))
262          return false;
263        ConceptMapContactComponent o = (ConceptMapContactComponent) other;
264        return compareValues(name, o.name, true);
265      }
266
267      public boolean isEmpty() {
268        return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
269          ;
270      }
271
272  public String fhirType() {
273    return "ConceptMap.contact";
274
275  }
276
277  }
278
279    @Block()
280    public static class SourceElementComponent extends BackboneElement implements IBaseBackboneElement {
281        /**
282         * An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).
283         */
284        @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false)
285        @Description(shortDefinition="Code System (if value set crosses code systems)", formalDefinition="An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system)." )
286        protected UriType system;
287
288        /**
289         * The specific version of the code system, as determined by the code system authority.
290         */
291        @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
292        @Description(shortDefinition="Specific version of the  code system", formalDefinition="The specific version of the code system, as determined by the code system authority." )
293        protected StringType version;
294
295        /**
296         * Identity (code or path) or the element/item being mapped.
297         */
298        @Child(name = "code", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
299        @Description(shortDefinition="Identifies element being mapped", formalDefinition="Identity (code or path) or the element/item being mapped." )
300        protected CodeType code;
301
302        /**
303         * A concept from the target value set that this concept maps to.
304         */
305        @Child(name = "target", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
306        @Description(shortDefinition="Concept in target system for element", formalDefinition="A concept from the target value set that this concept maps to." )
307        protected List<TargetElementComponent> target;
308
309        private static final long serialVersionUID = -387093487L;
310
311    /**
312     * Constructor
313     */
314      public SourceElementComponent() {
315        super();
316      }
317
318        /**
319         * @return {@link #system} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
320         */
321        public UriType getSystemElement() { 
322          if (this.system == null)
323            if (Configuration.errorOnAutoCreate())
324              throw new Error("Attempt to auto-create SourceElementComponent.system");
325            else if (Configuration.doAutoCreate())
326              this.system = new UriType(); // bb
327          return this.system;
328        }
329
330        public boolean hasSystemElement() { 
331          return this.system != null && !this.system.isEmpty();
332        }
333
334        public boolean hasSystem() { 
335          return this.system != null && !this.system.isEmpty();
336        }
337
338        /**
339         * @param value {@link #system} (An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
340         */
341        public SourceElementComponent setSystemElement(UriType value) { 
342          this.system = value;
343          return this;
344        }
345
346        /**
347         * @return An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).
348         */
349        public String getSystem() { 
350          return this.system == null ? null : this.system.getValue();
351        }
352
353        /**
354         * @param value An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).
355         */
356        public SourceElementComponent setSystem(String value) { 
357          if (Utilities.noString(value))
358            this.system = null;
359          else {
360            if (this.system == null)
361              this.system = new UriType();
362            this.system.setValue(value);
363          }
364          return this;
365        }
366
367        /**
368         * @return {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
369         */
370        public StringType getVersionElement() { 
371          if (this.version == null)
372            if (Configuration.errorOnAutoCreate())
373              throw new Error("Attempt to auto-create SourceElementComponent.version");
374            else if (Configuration.doAutoCreate())
375              this.version = new StringType(); // bb
376          return this.version;
377        }
378
379        public boolean hasVersionElement() { 
380          return this.version != null && !this.version.isEmpty();
381        }
382
383        public boolean hasVersion() { 
384          return this.version != null && !this.version.isEmpty();
385        }
386
387        /**
388         * @param value {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
389         */
390        public SourceElementComponent setVersionElement(StringType value) { 
391          this.version = value;
392          return this;
393        }
394
395        /**
396         * @return The specific version of the code system, as determined by the code system authority.
397         */
398        public String getVersion() { 
399          return this.version == null ? null : this.version.getValue();
400        }
401
402        /**
403         * @param value The specific version of the code system, as determined by the code system authority.
404         */
405        public SourceElementComponent setVersion(String value) { 
406          if (Utilities.noString(value))
407            this.version = null;
408          else {
409            if (this.version == null)
410              this.version = new StringType();
411            this.version.setValue(value);
412          }
413          return this;
414        }
415
416        /**
417         * @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
418         */
419        public CodeType getCodeElement() { 
420          if (this.code == null)
421            if (Configuration.errorOnAutoCreate())
422              throw new Error("Attempt to auto-create SourceElementComponent.code");
423            else if (Configuration.doAutoCreate())
424              this.code = new CodeType(); // bb
425          return this.code;
426        }
427
428        public boolean hasCodeElement() { 
429          return this.code != null && !this.code.isEmpty();
430        }
431
432        public boolean hasCode() { 
433          return this.code != null && !this.code.isEmpty();
434        }
435
436        /**
437         * @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
438         */
439        public SourceElementComponent setCodeElement(CodeType value) { 
440          this.code = value;
441          return this;
442        }
443
444        /**
445         * @return Identity (code or path) or the element/item being mapped.
446         */
447        public String getCode() { 
448          return this.code == null ? null : this.code.getValue();
449        }
450
451        /**
452         * @param value Identity (code or path) or the element/item being mapped.
453         */
454        public SourceElementComponent setCode(String value) { 
455          if (Utilities.noString(value))
456            this.code = null;
457          else {
458            if (this.code == null)
459              this.code = new CodeType();
460            this.code.setValue(value);
461          }
462          return this;
463        }
464
465        /**
466         * @return {@link #target} (A concept from the target value set that this concept maps to.)
467         */
468        public List<TargetElementComponent> getTarget() { 
469          if (this.target == null)
470            this.target = new ArrayList<TargetElementComponent>();
471          return this.target;
472        }
473
474        public boolean hasTarget() { 
475          if (this.target == null)
476            return false;
477          for (TargetElementComponent item : this.target)
478            if (!item.isEmpty())
479              return true;
480          return false;
481        }
482
483        /**
484         * @return {@link #target} (A concept from the target value set that this concept maps to.)
485         */
486    // syntactic sugar
487        public TargetElementComponent addTarget() { //3
488          TargetElementComponent t = new TargetElementComponent();
489          if (this.target == null)
490            this.target = new ArrayList<TargetElementComponent>();
491          this.target.add(t);
492          return t;
493        }
494
495    // syntactic sugar
496        public SourceElementComponent addTarget(TargetElementComponent t) { //3
497          if (t == null)
498            return this;
499          if (this.target == null)
500            this.target = new ArrayList<TargetElementComponent>();
501          this.target.add(t);
502          return this;
503        }
504
505        protected void listChildren(List<Property> childrenList) {
506          super.listChildren(childrenList);
507          childrenList.add(new Property("system", "uri", "An absolute URI that identifies the Code System (if the source is a value set that crosses more than one code system).", 0, java.lang.Integer.MAX_VALUE, system));
508          childrenList.add(new Property("version", "string", "The specific version of the code system, as determined by the code system authority.", 0, java.lang.Integer.MAX_VALUE, version));
509          childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item being mapped.", 0, java.lang.Integer.MAX_VALUE, code));
510          childrenList.add(new Property("target", "", "A concept from the target value set that this concept maps to.", 0, java.lang.Integer.MAX_VALUE, target));
511        }
512
513      @Override
514      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
515        switch (hash) {
516        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
517        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
518        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
519        case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // TargetElementComponent
520        default: return super.getProperty(hash, name, checkValid);
521        }
522
523      }
524
525      @Override
526      public void setProperty(int hash, String name, Base value) throws FHIRException {
527        switch (hash) {
528        case -887328209: // system
529          this.system = castToUri(value); // UriType
530          break;
531        case 351608024: // version
532          this.version = castToString(value); // StringType
533          break;
534        case 3059181: // code
535          this.code = castToCode(value); // CodeType
536          break;
537        case -880905839: // target
538          this.getTarget().add((TargetElementComponent) value); // TargetElementComponent
539          break;
540        default: super.setProperty(hash, name, value);
541        }
542
543      }
544
545      @Override
546      public void setProperty(String name, Base value) throws FHIRException {
547        if (name.equals("system"))
548          this.system = castToUri(value); // UriType
549        else if (name.equals("version"))
550          this.version = castToString(value); // StringType
551        else if (name.equals("code"))
552          this.code = castToCode(value); // CodeType
553        else if (name.equals("target"))
554          this.getTarget().add((TargetElementComponent) value);
555        else
556          super.setProperty(name, value);
557      }
558
559      @Override
560      public Base makeProperty(int hash, String name) throws FHIRException {
561        switch (hash) {
562        case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
563        case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
564        case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
565        case -880905839:  return addTarget(); // TargetElementComponent
566        default: return super.makeProperty(hash, name);
567        }
568
569      }
570
571      @Override
572      public Base addChild(String name) throws FHIRException {
573        if (name.equals("system")) {
574          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.system");
575        }
576        else if (name.equals("version")) {
577          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version");
578        }
579        else if (name.equals("code")) {
580          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code");
581        }
582        else if (name.equals("target")) {
583          return addTarget();
584        }
585        else
586          return super.addChild(name);
587      }
588
589      public SourceElementComponent copy() {
590        SourceElementComponent dst = new SourceElementComponent();
591        copyValues(dst);
592        dst.system = system == null ? null : system.copy();
593        dst.version = version == null ? null : version.copy();
594        dst.code = code == null ? null : code.copy();
595        if (target != null) {
596          dst.target = new ArrayList<TargetElementComponent>();
597          for (TargetElementComponent i : target)
598            dst.target.add(i.copy());
599        };
600        return dst;
601      }
602
603      @Override
604      public boolean equalsDeep(Base other) {
605        if (!super.equalsDeep(other))
606          return false;
607        if (!(other instanceof SourceElementComponent))
608          return false;
609        SourceElementComponent o = (SourceElementComponent) other;
610        return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(code, o.code, true)
611           && compareDeep(target, o.target, true);
612      }
613
614      @Override
615      public boolean equalsShallow(Base other) {
616        if (!super.equalsShallow(other))
617          return false;
618        if (!(other instanceof SourceElementComponent))
619          return false;
620        SourceElementComponent o = (SourceElementComponent) other;
621        return compareValues(system, o.system, true) && compareValues(version, o.version, true) && compareValues(code, o.code, true)
622          ;
623      }
624
625      public boolean isEmpty() {
626        return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
627           && (code == null || code.isEmpty()) && (target == null || target.isEmpty());
628      }
629
630  public String fhirType() {
631    return "ConceptMap.element";
632
633  }
634
635  }
636
637    @Block()
638    public static class TargetElementComponent extends BackboneElement implements IBaseBackboneElement {
639        /**
640         * An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).
641         */
642        @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false)
643        @Description(shortDefinition="System of the target (if necessary)", formalDefinition="An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems)." )
644        protected UriType system;
645
646        /**
647         * The specific version of the code system, as determined by the code system authority.
648         */
649        @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
650        @Description(shortDefinition="Specific version of the  code system", formalDefinition="The specific version of the code system, as determined by the code system authority." )
651        protected StringType version;
652
653        /**
654         * Identity (code or path) or the element/item that the map refers to.
655         */
656        @Child(name = "code", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
657        @Description(shortDefinition="Code that identifies the target element", formalDefinition="Identity (code or path) or the element/item that the map refers to." )
658        protected CodeType code;
659
660        /**
661         * The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
662         */
663        @Child(name = "equivalence", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=false)
664        @Description(shortDefinition="equivalent | equal | wider | subsumes | narrower | specializes | inexact | unmatched | disjoint", formalDefinition="The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source)." )
665        protected Enumeration<ConceptMapEquivalence> equivalence;
666
667        /**
668         * A description of status/issues in mapping that conveys additional information not represented in  the structured data.
669         */
670        @Child(name = "comments", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
671        @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." )
672        protected StringType comments;
673
674        /**
675         * 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.
676         */
677        @Child(name = "dependsOn", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
678        @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." )
679        protected List<OtherElementComponent> dependsOn;
680
681        /**
682         * A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.
683         */
684        @Child(name = "product", type = {OtherElementComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
685        @Description(shortDefinition="Other concepts that this mapping also produces", formalDefinition="A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on." )
686        protected List<OtherElementComponent> product;
687
688        private static final long serialVersionUID = 2147112127L;
689
690    /**
691     * Constructor
692     */
693      public TargetElementComponent() {
694        super();
695      }
696
697    /**
698     * Constructor
699     */
700      public TargetElementComponent(Enumeration<ConceptMapEquivalence> equivalence) {
701        super();
702        this.equivalence = equivalence;
703      }
704
705        /**
706         * @return {@link #system} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
707         */
708        public UriType getSystemElement() { 
709          if (this.system == null)
710            if (Configuration.errorOnAutoCreate())
711              throw new Error("Attempt to auto-create TargetElementComponent.system");
712            else if (Configuration.doAutoCreate())
713              this.system = new UriType(); // bb
714          return this.system;
715        }
716
717        public boolean hasSystemElement() { 
718          return this.system != null && !this.system.isEmpty();
719        }
720
721        public boolean hasSystem() { 
722          return this.system != null && !this.system.isEmpty();
723        }
724
725        /**
726         * @param value {@link #system} (An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
727         */
728        public TargetElementComponent setSystemElement(UriType value) { 
729          this.system = value;
730          return this;
731        }
732
733        /**
734         * @return An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).
735         */
736        public String getSystem() { 
737          return this.system == null ? null : this.system.getValue();
738        }
739
740        /**
741         * @param value An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).
742         */
743        public TargetElementComponent setSystem(String value) { 
744          if (Utilities.noString(value))
745            this.system = null;
746          else {
747            if (this.system == null)
748              this.system = new UriType();
749            this.system.setValue(value);
750          }
751          return this;
752        }
753
754        /**
755         * @return {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
756         */
757        public StringType getVersionElement() { 
758          if (this.version == null)
759            if (Configuration.errorOnAutoCreate())
760              throw new Error("Attempt to auto-create TargetElementComponent.version");
761            else if (Configuration.doAutoCreate())
762              this.version = new StringType(); // bb
763          return this.version;
764        }
765
766        public boolean hasVersionElement() { 
767          return this.version != null && !this.version.isEmpty();
768        }
769
770        public boolean hasVersion() { 
771          return this.version != null && !this.version.isEmpty();
772        }
773
774        /**
775         * @param value {@link #version} (The specific version of the code system, as determined by the code system authority.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
776         */
777        public TargetElementComponent setVersionElement(StringType value) { 
778          this.version = value;
779          return this;
780        }
781
782        /**
783         * @return The specific version of the code system, as determined by the code system authority.
784         */
785        public String getVersion() { 
786          return this.version == null ? null : this.version.getValue();
787        }
788
789        /**
790         * @param value The specific version of the code system, as determined by the code system authority.
791         */
792        public TargetElementComponent setVersion(String value) { 
793          if (Utilities.noString(value))
794            this.version = null;
795          else {
796            if (this.version == null)
797              this.version = new StringType();
798            this.version.setValue(value);
799          }
800          return this;
801        }
802
803        /**
804         * @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
805         */
806        public CodeType getCodeElement() { 
807          if (this.code == null)
808            if (Configuration.errorOnAutoCreate())
809              throw new Error("Attempt to auto-create TargetElementComponent.code");
810            else if (Configuration.doAutoCreate())
811              this.code = new CodeType(); // bb
812          return this.code;
813        }
814
815        public boolean hasCodeElement() { 
816          return this.code != null && !this.code.isEmpty();
817        }
818
819        public boolean hasCode() { 
820          return this.code != null && !this.code.isEmpty();
821        }
822
823        /**
824         * @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
825         */
826        public TargetElementComponent setCodeElement(CodeType value) { 
827          this.code = value;
828          return this;
829        }
830
831        /**
832         * @return Identity (code or path) or the element/item that the map refers to.
833         */
834        public String getCode() { 
835          return this.code == null ? null : this.code.getValue();
836        }
837
838        /**
839         * @param value Identity (code or path) or the element/item that the map refers to.
840         */
841        public TargetElementComponent setCode(String value) { 
842          if (Utilities.noString(value))
843            this.code = null;
844          else {
845            if (this.code == null)
846              this.code = new CodeType();
847            this.code.setValue(value);
848          }
849          return this;
850        }
851
852        /**
853         * @return {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value
854         */
855        public Enumeration<ConceptMapEquivalence> getEquivalenceElement() { 
856          if (this.equivalence == null)
857            if (Configuration.errorOnAutoCreate())
858              throw new Error("Attempt to auto-create TargetElementComponent.equivalence");
859            else if (Configuration.doAutoCreate())
860              this.equivalence = new Enumeration<ConceptMapEquivalence>(new ConceptMapEquivalenceEnumFactory()); // bb
861          return this.equivalence;
862        }
863
864        public boolean hasEquivalenceElement() { 
865          return this.equivalence != null && !this.equivalence.isEmpty();
866        }
867
868        public boolean hasEquivalence() { 
869          return this.equivalence != null && !this.equivalence.isEmpty();
870        }
871
872        /**
873         * @param value {@link #equivalence} (The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).). This is the underlying object with id, value and extensions. The accessor "getEquivalence" gives direct access to the value
874         */
875        public TargetElementComponent setEquivalenceElement(Enumeration<ConceptMapEquivalence> value) { 
876          this.equivalence = value;
877          return this;
878        }
879
880        /**
881         * @return The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
882         */
883        public ConceptMapEquivalence getEquivalence() { 
884          return this.equivalence == null ? null : this.equivalence.getValue();
885        }
886
887        /**
888         * @param value The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).
889         */
890        public TargetElementComponent setEquivalence(ConceptMapEquivalence value) { 
891            if (this.equivalence == null)
892              this.equivalence = new Enumeration<ConceptMapEquivalence>(new ConceptMapEquivalenceEnumFactory());
893            this.equivalence.setValue(value);
894          return this;
895        }
896
897        /**
898         * @return {@link #comments} (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 "getComments" gives direct access to the value
899         */
900        public StringType getCommentsElement() { 
901          if (this.comments == null)
902            if (Configuration.errorOnAutoCreate())
903              throw new Error("Attempt to auto-create TargetElementComponent.comments");
904            else if (Configuration.doAutoCreate())
905              this.comments = new StringType(); // bb
906          return this.comments;
907        }
908
909        public boolean hasCommentsElement() { 
910          return this.comments != null && !this.comments.isEmpty();
911        }
912
913        public boolean hasComments() { 
914          return this.comments != null && !this.comments.isEmpty();
915        }
916
917        /**
918         * @param value {@link #comments} (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 "getComments" gives direct access to the value
919         */
920        public TargetElementComponent setCommentsElement(StringType value) { 
921          this.comments = value;
922          return this;
923        }
924
925        /**
926         * @return A description of status/issues in mapping that conveys additional information not represented in  the structured data.
927         */
928        public String getComments() { 
929          return this.comments == null ? null : this.comments.getValue();
930        }
931
932        /**
933         * @param value A description of status/issues in mapping that conveys additional information not represented in  the structured data.
934         */
935        public TargetElementComponent setComments(String value) { 
936          if (Utilities.noString(value))
937            this.comments = null;
938          else {
939            if (this.comments == null)
940              this.comments = new StringType();
941            this.comments.setValue(value);
942          }
943          return this;
944        }
945
946        /**
947         * @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.)
948         */
949        public List<OtherElementComponent> getDependsOn() { 
950          if (this.dependsOn == null)
951            this.dependsOn = new ArrayList<OtherElementComponent>();
952          return this.dependsOn;
953        }
954
955        public boolean hasDependsOn() { 
956          if (this.dependsOn == null)
957            return false;
958          for (OtherElementComponent item : this.dependsOn)
959            if (!item.isEmpty())
960              return true;
961          return false;
962        }
963
964        /**
965         * @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.)
966         */
967    // syntactic sugar
968        public OtherElementComponent addDependsOn() { //3
969          OtherElementComponent t = new OtherElementComponent();
970          if (this.dependsOn == null)
971            this.dependsOn = new ArrayList<OtherElementComponent>();
972          this.dependsOn.add(t);
973          return t;
974        }
975
976    // syntactic sugar
977        public TargetElementComponent addDependsOn(OtherElementComponent t) { //3
978          if (t == null)
979            return this;
980          if (this.dependsOn == null)
981            this.dependsOn = new ArrayList<OtherElementComponent>();
982          this.dependsOn.add(t);
983          return this;
984        }
985
986        /**
987         * @return {@link #product} (A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.)
988         */
989        public List<OtherElementComponent> getProduct() { 
990          if (this.product == null)
991            this.product = new ArrayList<OtherElementComponent>();
992          return this.product;
993        }
994
995        public boolean hasProduct() { 
996          if (this.product == null)
997            return false;
998          for (OtherElementComponent item : this.product)
999            if (!item.isEmpty())
1000              return true;
1001          return false;
1002        }
1003
1004        /**
1005         * @return {@link #product} (A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.)
1006         */
1007    // syntactic sugar
1008        public OtherElementComponent addProduct() { //3
1009          OtherElementComponent t = new OtherElementComponent();
1010          if (this.product == null)
1011            this.product = new ArrayList<OtherElementComponent>();
1012          this.product.add(t);
1013          return t;
1014        }
1015
1016    // syntactic sugar
1017        public TargetElementComponent addProduct(OtherElementComponent t) { //3
1018          if (t == null)
1019            return this;
1020          if (this.product == null)
1021            this.product = new ArrayList<OtherElementComponent>();
1022          this.product.add(t);
1023          return this;
1024        }
1025
1026        protected void listChildren(List<Property> childrenList) {
1027          super.listChildren(childrenList);
1028          childrenList.add(new Property("system", "uri", "An absolute URI that identifies the code system of the target code (if the target is a value set that cross code systems).", 0, java.lang.Integer.MAX_VALUE, system));
1029          childrenList.add(new Property("version", "string", "The specific version of the code system, as determined by the code system authority.", 0, java.lang.Integer.MAX_VALUE, version));
1030          childrenList.add(new Property("code", "code", "Identity (code or path) or the element/item that the map refers to.", 0, java.lang.Integer.MAX_VALUE, code));
1031          childrenList.add(new Property("equivalence", "code", "The equivalence between the source and target concepts (counting for the dependencies and products). The equivalence is read from target to source (e.g. the target is 'wider' than the source).", 0, java.lang.Integer.MAX_VALUE, equivalence));
1032          childrenList.add(new Property("comments", "string", "A description of status/issues in mapping that conveys additional information not represented in  the structured data.", 0, java.lang.Integer.MAX_VALUE, comments));
1033          childrenList.add(new Property("dependsOn", "", "A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified element can be resolved, and it has the specified value.", 0, java.lang.Integer.MAX_VALUE, dependsOn));
1034          childrenList.add(new Property("product", "@ConceptMap.element.target.dependsOn", "A set of additional outcomes from this mapping to other elements. To properly execute this mapping, the specified element must be mapped to some data element or source that is in context. The mapping may still be useful without a place for the additional data elements, but the equivalence cannot be relied on.", 0, java.lang.Integer.MAX_VALUE, product));
1035        }
1036
1037      @Override
1038      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1039        switch (hash) {
1040        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
1041        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
1042        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
1043        case -15828692: /*equivalence*/ return this.equivalence == null ? new Base[0] : new Base[] {this.equivalence}; // Enumeration<ConceptMapEquivalence>
1044        case -602415628: /*comments*/ return this.comments == null ? new Base[0] : new Base[] {this.comments}; // StringType
1045        case -1109214266: /*dependsOn*/ return this.dependsOn == null ? new Base[0] : this.dependsOn.toArray(new Base[this.dependsOn.size()]); // OtherElementComponent
1046        case -309474065: /*product*/ return this.product == null ? new Base[0] : this.product.toArray(new Base[this.product.size()]); // OtherElementComponent
1047        default: return super.getProperty(hash, name, checkValid);
1048        }
1049
1050      }
1051
1052      @Override
1053      public void setProperty(int hash, String name, Base value) throws FHIRException {
1054        switch (hash) {
1055        case -887328209: // system
1056          this.system = castToUri(value); // UriType
1057          break;
1058        case 351608024: // version
1059          this.version = castToString(value); // StringType
1060          break;
1061        case 3059181: // code
1062          this.code = castToCode(value); // CodeType
1063          break;
1064        case -15828692: // equivalence
1065          this.equivalence = new ConceptMapEquivalenceEnumFactory().fromType(value); // Enumeration<ConceptMapEquivalence>
1066          break;
1067        case -602415628: // comments
1068          this.comments = castToString(value); // StringType
1069          break;
1070        case -1109214266: // dependsOn
1071          this.getDependsOn().add((OtherElementComponent) value); // OtherElementComponent
1072          break;
1073        case -309474065: // product
1074          this.getProduct().add((OtherElementComponent) value); // OtherElementComponent
1075          break;
1076        default: super.setProperty(hash, name, value);
1077        }
1078
1079      }
1080
1081      @Override
1082      public void setProperty(String name, Base value) throws FHIRException {
1083        if (name.equals("system"))
1084          this.system = castToUri(value); // UriType
1085        else if (name.equals("version"))
1086          this.version = castToString(value); // StringType
1087        else if (name.equals("code"))
1088          this.code = castToCode(value); // CodeType
1089        else if (name.equals("equivalence"))
1090          this.equivalence = new ConceptMapEquivalenceEnumFactory().fromType(value); // Enumeration<ConceptMapEquivalence>
1091        else if (name.equals("comments"))
1092          this.comments = castToString(value); // StringType
1093        else if (name.equals("dependsOn"))
1094          this.getDependsOn().add((OtherElementComponent) value);
1095        else if (name.equals("product"))
1096          this.getProduct().add((OtherElementComponent) value);
1097        else
1098          super.setProperty(name, value);
1099      }
1100
1101      @Override
1102      public Base makeProperty(int hash, String name) throws FHIRException {
1103        switch (hash) {
1104        case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
1105        case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
1106        case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
1107        case -15828692: throw new FHIRException("Cannot make property equivalence as it is not a complex type"); // Enumeration<ConceptMapEquivalence>
1108        case -602415628: throw new FHIRException("Cannot make property comments as it is not a complex type"); // StringType
1109        case -1109214266:  return addDependsOn(); // OtherElementComponent
1110        case -309474065:  return addProduct(); // OtherElementComponent
1111        default: return super.makeProperty(hash, name);
1112        }
1113
1114      }
1115
1116      @Override
1117      public Base addChild(String name) throws FHIRException {
1118        if (name.equals("system")) {
1119          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.system");
1120        }
1121        else if (name.equals("version")) {
1122          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version");
1123        }
1124        else if (name.equals("code")) {
1125          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code");
1126        }
1127        else if (name.equals("equivalence")) {
1128          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.equivalence");
1129        }
1130        else if (name.equals("comments")) {
1131          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.comments");
1132        }
1133        else if (name.equals("dependsOn")) {
1134          return addDependsOn();
1135        }
1136        else if (name.equals("product")) {
1137          return addProduct();
1138        }
1139        else
1140          return super.addChild(name);
1141      }
1142
1143      public TargetElementComponent copy() {
1144        TargetElementComponent dst = new TargetElementComponent();
1145        copyValues(dst);
1146        dst.system = system == null ? null : system.copy();
1147        dst.version = version == null ? null : version.copy();
1148        dst.code = code == null ? null : code.copy();
1149        dst.equivalence = equivalence == null ? null : equivalence.copy();
1150        dst.comments = comments == null ? null : comments.copy();
1151        if (dependsOn != null) {
1152          dst.dependsOn = new ArrayList<OtherElementComponent>();
1153          for (OtherElementComponent i : dependsOn)
1154            dst.dependsOn.add(i.copy());
1155        };
1156        if (product != null) {
1157          dst.product = new ArrayList<OtherElementComponent>();
1158          for (OtherElementComponent i : product)
1159            dst.product.add(i.copy());
1160        };
1161        return dst;
1162      }
1163
1164      @Override
1165      public boolean equalsDeep(Base other) {
1166        if (!super.equalsDeep(other))
1167          return false;
1168        if (!(other instanceof TargetElementComponent))
1169          return false;
1170        TargetElementComponent o = (TargetElementComponent) other;
1171        return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(code, o.code, true)
1172           && compareDeep(equivalence, o.equivalence, true) && compareDeep(comments, o.comments, true) && compareDeep(dependsOn, o.dependsOn, true)
1173           && compareDeep(product, o.product, true);
1174      }
1175
1176      @Override
1177      public boolean equalsShallow(Base other) {
1178        if (!super.equalsShallow(other))
1179          return false;
1180        if (!(other instanceof TargetElementComponent))
1181          return false;
1182        TargetElementComponent o = (TargetElementComponent) other;
1183        return compareValues(system, o.system, true) && compareValues(version, o.version, true) && compareValues(code, o.code, true)
1184           && compareValues(equivalence, o.equivalence, true) && compareValues(comments, o.comments, true);
1185      }
1186
1187      public boolean isEmpty() {
1188        return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
1189           && (code == null || code.isEmpty()) && (equivalence == null || equivalence.isEmpty()) && (comments == null || comments.isEmpty())
1190           && (dependsOn == null || dependsOn.isEmpty()) && (product == null || product.isEmpty());
1191      }
1192
1193  public String fhirType() {
1194    return "ConceptMap.element.target";
1195
1196  }
1197
1198  }
1199
1200    @Block()
1201    public static class OtherElementComponent extends BackboneElement implements IBaseBackboneElement {
1202        /**
1203         * A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.
1204         */
1205        @Child(name = "element", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1206        @Description(shortDefinition="Reference to element/field/ValueSet mapping depends on", formalDefinition="A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition." )
1207        protected UriType element;
1208
1209        /**
1210         * An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).
1211         */
1212        @Child(name = "system", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1213        @Description(shortDefinition="Code System (if necessary)", formalDefinition="An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems)." )
1214        protected UriType system;
1215
1216        /**
1217         * Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.
1218         */
1219        @Child(name = "code", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false)
1220        @Description(shortDefinition="Value of the referenced element", formalDefinition="Identity (code or path) or the element/item/ValueSet that the map depends on / refers to." )
1221        protected StringType code;
1222
1223        private static final long serialVersionUID = 1365816253L;
1224
1225    /**
1226     * Constructor
1227     */
1228      public OtherElementComponent() {
1229        super();
1230      }
1231
1232    /**
1233     * Constructor
1234     */
1235      public OtherElementComponent(UriType element, UriType system, StringType code) {
1236        super();
1237        this.element = element;
1238        this.system = system;
1239        this.code = code;
1240      }
1241
1242        /**
1243         * @return {@link #element} (A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value
1244         */
1245        public UriType getElementElement() { 
1246          if (this.element == null)
1247            if (Configuration.errorOnAutoCreate())
1248              throw new Error("Attempt to auto-create OtherElementComponent.element");
1249            else if (Configuration.doAutoCreate())
1250              this.element = new UriType(); // bb
1251          return this.element;
1252        }
1253
1254        public boolean hasElementElement() { 
1255          return this.element != null && !this.element.isEmpty();
1256        }
1257
1258        public boolean hasElement() { 
1259          return this.element != null && !this.element.isEmpty();
1260        }
1261
1262        /**
1263         * @param value {@link #element} (A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.). This is the underlying object with id, value and extensions. The accessor "getElement" gives direct access to the value
1264         */
1265        public OtherElementComponent setElementElement(UriType value) { 
1266          this.element = value;
1267          return this;
1268        }
1269
1270        /**
1271         * @return A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.
1272         */
1273        public String getElement() { 
1274          return this.element == null ? null : this.element.getValue();
1275        }
1276
1277        /**
1278         * @param value A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.
1279         */
1280        public OtherElementComponent setElement(String value) { 
1281            if (this.element == null)
1282              this.element = new UriType();
1283            this.element.setValue(value);
1284          return this;
1285        }
1286
1287        /**
1288         * @return {@link #system} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
1289         */
1290        public UriType getSystemElement() { 
1291          if (this.system == null)
1292            if (Configuration.errorOnAutoCreate())
1293              throw new Error("Attempt to auto-create OtherElementComponent.system");
1294            else if (Configuration.doAutoCreate())
1295              this.system = new UriType(); // bb
1296          return this.system;
1297        }
1298
1299        public boolean hasSystemElement() { 
1300          return this.system != null && !this.system.isEmpty();
1301        }
1302
1303        public boolean hasSystem() { 
1304          return this.system != null && !this.system.isEmpty();
1305        }
1306
1307        /**
1308         * @param value {@link #system} (An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
1309         */
1310        public OtherElementComponent setSystemElement(UriType value) { 
1311          this.system = value;
1312          return this;
1313        }
1314
1315        /**
1316         * @return An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).
1317         */
1318        public String getSystem() { 
1319          return this.system == null ? null : this.system.getValue();
1320        }
1321
1322        /**
1323         * @param value An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).
1324         */
1325        public OtherElementComponent setSystem(String value) { 
1326            if (this.system == null)
1327              this.system = new UriType();
1328            this.system.setValue(value);
1329          return this;
1330        }
1331
1332        /**
1333         * @return {@link #code} (Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1334         */
1335        public StringType getCodeElement() { 
1336          if (this.code == null)
1337            if (Configuration.errorOnAutoCreate())
1338              throw new Error("Attempt to auto-create OtherElementComponent.code");
1339            else if (Configuration.doAutoCreate())
1340              this.code = new StringType(); // bb
1341          return this.code;
1342        }
1343
1344        public boolean hasCodeElement() { 
1345          return this.code != null && !this.code.isEmpty();
1346        }
1347
1348        public boolean hasCode() { 
1349          return this.code != null && !this.code.isEmpty();
1350        }
1351
1352        /**
1353         * @param value {@link #code} (Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1354         */
1355        public OtherElementComponent setCodeElement(StringType value) { 
1356          this.code = value;
1357          return this;
1358        }
1359
1360        /**
1361         * @return Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.
1362         */
1363        public String getCode() { 
1364          return this.code == null ? null : this.code.getValue();
1365        }
1366
1367        /**
1368         * @param value Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.
1369         */
1370        public OtherElementComponent setCode(String value) { 
1371            if (this.code == null)
1372              this.code = new StringType();
1373            this.code.setValue(value);
1374          return this;
1375        }
1376
1377        protected void listChildren(List<Property> childrenList) {
1378          super.listChildren(childrenList);
1379          childrenList.add(new Property("element", "uri", "A reference to a specific concept that holds a coded value. This can be an element in a FHIR resource, or a specific reference to a data element in a different specification (e.g. HL7 v2) or a general reference to a kind of data field, or a reference to a value set with an appropriately narrow definition.", 0, java.lang.Integer.MAX_VALUE, element));
1380          childrenList.add(new Property("system", "uri", "An absolute URI that identifies the code system of the dependency code (if the source/dependency is a value set that crosses code systems).", 0, java.lang.Integer.MAX_VALUE, system));
1381          childrenList.add(new Property("code", "string", "Identity (code or path) or the element/item/ValueSet that the map depends on / refers to.", 0, java.lang.Integer.MAX_VALUE, code));
1382        }
1383
1384      @Override
1385      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1386        switch (hash) {
1387        case -1662836996: /*element*/ return this.element == null ? new Base[0] : new Base[] {this.element}; // UriType
1388        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
1389        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // StringType
1390        default: return super.getProperty(hash, name, checkValid);
1391        }
1392
1393      }
1394
1395      @Override
1396      public void setProperty(int hash, String name, Base value) throws FHIRException {
1397        switch (hash) {
1398        case -1662836996: // element
1399          this.element = castToUri(value); // UriType
1400          break;
1401        case -887328209: // system
1402          this.system = castToUri(value); // UriType
1403          break;
1404        case 3059181: // code
1405          this.code = castToString(value); // StringType
1406          break;
1407        default: super.setProperty(hash, name, value);
1408        }
1409
1410      }
1411
1412      @Override
1413      public void setProperty(String name, Base value) throws FHIRException {
1414        if (name.equals("element"))
1415          this.element = castToUri(value); // UriType
1416        else if (name.equals("system"))
1417          this.system = castToUri(value); // UriType
1418        else if (name.equals("code"))
1419          this.code = castToString(value); // StringType
1420        else
1421          super.setProperty(name, value);
1422      }
1423
1424      @Override
1425      public Base makeProperty(int hash, String name) throws FHIRException {
1426        switch (hash) {
1427        case -1662836996: throw new FHIRException("Cannot make property element as it is not a complex type"); // UriType
1428        case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
1429        case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // StringType
1430        default: return super.makeProperty(hash, name);
1431        }
1432
1433      }
1434
1435      @Override
1436      public Base addChild(String name) throws FHIRException {
1437        if (name.equals("element")) {
1438          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.element");
1439        }
1440        else if (name.equals("system")) {
1441          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.system");
1442        }
1443        else if (name.equals("code")) {
1444          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.code");
1445        }
1446        else
1447          return super.addChild(name);
1448      }
1449
1450      public OtherElementComponent copy() {
1451        OtherElementComponent dst = new OtherElementComponent();
1452        copyValues(dst);
1453        dst.element = element == null ? null : element.copy();
1454        dst.system = system == null ? null : system.copy();
1455        dst.code = code == null ? null : code.copy();
1456        return dst;
1457      }
1458
1459      @Override
1460      public boolean equalsDeep(Base other) {
1461        if (!super.equalsDeep(other))
1462          return false;
1463        if (!(other instanceof OtherElementComponent))
1464          return false;
1465        OtherElementComponent o = (OtherElementComponent) other;
1466        return compareDeep(element, o.element, true) && compareDeep(system, o.system, true) && compareDeep(code, o.code, true)
1467          ;
1468      }
1469
1470      @Override
1471      public boolean equalsShallow(Base other) {
1472        if (!super.equalsShallow(other))
1473          return false;
1474        if (!(other instanceof OtherElementComponent))
1475          return false;
1476        OtherElementComponent o = (OtherElementComponent) other;
1477        return compareValues(element, o.element, true) && compareValues(system, o.system, true) && compareValues(code, o.code, true)
1478          ;
1479      }
1480
1481      public boolean isEmpty() {
1482        return super.isEmpty() && (element == null || element.isEmpty()) && (system == null || system.isEmpty())
1483           && (code == null || code.isEmpty());
1484      }
1485
1486  public String fhirType() {
1487    return "ConceptMap.element.target.dependsOn";
1488
1489  }
1490
1491  }
1492
1493    /**
1494     * An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.
1495     */
1496    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
1497    @Description(shortDefinition="Globally unique logical id for concept map", formalDefinition="An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published." )
1498    protected UriType url;
1499
1500    /**
1501     * 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.
1502     */
1503    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true)
1504    @Description(shortDefinition="Additional identifier for the concept map", formalDefinition="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." )
1505    protected Identifier identifier;
1506
1507    /**
1508     * 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 profile author manually and the value should be a timestamp.
1509     */
1510    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1511    @Description(shortDefinition="Logical id for this 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 profile author manually and the value should be a timestamp." )
1512    protected StringType version;
1513
1514    /**
1515     * A free text natural language name describing the concept map.
1516     */
1517    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1518    @Description(shortDefinition="Informal name for this concept map", formalDefinition="A free text natural language name describing the concept map." )
1519    protected StringType name;
1520
1521    /**
1522     * The status of the concept map.
1523     */
1524    @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true)
1525    @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the concept map." )
1526    protected Enumeration<ConformanceResourceStatus> status;
1527
1528    /**
1529     * This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
1530     */
1531    @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1532    @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." )
1533    protected BooleanType experimental;
1534
1535    /**
1536     * The name of the individual or organization that published the concept map.
1537     */
1538    @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
1539    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." )
1540    protected StringType publisher;
1541
1542    /**
1543     * Contacts to assist a user in finding and communicating with the publisher.
1544     */
1545    @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1546    @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." )
1547    protected List<ConceptMapContactComponent> contact;
1548
1549    /**
1550     * The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.
1551     */
1552    @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
1553    @Description(shortDefinition="Date for given status", formalDefinition="The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes." )
1554    protected DateTimeType date;
1555
1556    /**
1557     * A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.
1558     */
1559    @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true)
1560    @Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." )
1561    protected StringType description;
1562
1563    /**
1564     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.
1565     */
1566    @Child(name = "useContext", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1567    @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances." )
1568    protected List<CodeableConcept> useContext;
1569
1570    /**
1571     * Explains why this concept map is needed and why it has been constrained as it has.
1572     */
1573    @Child(name = "requirements", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
1574    @Description(shortDefinition="Why needed", formalDefinition="Explains why this concept map is needed and why it has been constrained as it has." )
1575    protected StringType requirements;
1576
1577    /**
1578     * A copyright statement relating to the concept map and/or its contents.
1579     */
1580    @Child(name = "copyright", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false)
1581    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the concept map and/or its contents." )
1582    protected StringType copyright;
1583
1584    /**
1585     * The source value set that specifies the concepts that are being mapped.
1586     */
1587    @Child(name = "source", type = {UriType.class, ValueSet.class, StructureDefinition.class}, order=13, min=1, max=1, modifier=false, summary=true)
1588    @Description(shortDefinition="Identifies the source of the concepts which are being mapped", formalDefinition="The source value set that specifies the concepts that are being mapped." )
1589    protected Type source;
1590
1591    /**
1592     * The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.
1593     */
1594    @Child(name = "target", type = {UriType.class, ValueSet.class, StructureDefinition.class}, order=14, min=1, max=1, modifier=false, summary=true)
1595    @Description(shortDefinition="Provides context to the mappings", formalDefinition="The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made." )
1596    protected Type target;
1597
1598    /**
1599     * Mappings for an individual concept in the source to one or more concepts in the target.
1600     */
1601    @Child(name = "element", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1602    @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." )
1603    protected List<SourceElementComponent> element;
1604
1605    private static final long serialVersionUID = 1687563642L;
1606
1607  /**
1608   * Constructor
1609   */
1610    public ConceptMap() {
1611      super();
1612    }
1613
1614  /**
1615   * Constructor
1616   */
1617    public ConceptMap(Enumeration<ConformanceResourceStatus> status, Type source, Type target) {
1618      super();
1619      this.status = status;
1620      this.source = source;
1621      this.target = target;
1622    }
1623
1624    /**
1625     * @return {@link #url} (An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1626     */
1627    public UriType getUrlElement() { 
1628      if (this.url == null)
1629        if (Configuration.errorOnAutoCreate())
1630          throw new Error("Attempt to auto-create ConceptMap.url");
1631        else if (Configuration.doAutoCreate())
1632          this.url = new UriType(); // bb
1633      return this.url;
1634    }
1635
1636    public boolean hasUrlElement() { 
1637      return this.url != null && !this.url.isEmpty();
1638    }
1639
1640    public boolean hasUrl() { 
1641      return this.url != null && !this.url.isEmpty();
1642    }
1643
1644    /**
1645     * @param value {@link #url} (An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1646     */
1647    public ConceptMap setUrlElement(UriType value) { 
1648      this.url = value;
1649      return this;
1650    }
1651
1652    /**
1653     * @return An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.
1654     */
1655    public String getUrl() { 
1656      return this.url == null ? null : this.url.getValue();
1657    }
1658
1659    /**
1660     * @param value An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.
1661     */
1662    public ConceptMap setUrl(String value) { 
1663      if (Utilities.noString(value))
1664        this.url = null;
1665      else {
1666        if (this.url == null)
1667          this.url = new UriType();
1668        this.url.setValue(value);
1669      }
1670      return this;
1671    }
1672
1673    /**
1674     * @return {@link #identifier} (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.)
1675     */
1676    public Identifier getIdentifier() { 
1677      if (this.identifier == null)
1678        if (Configuration.errorOnAutoCreate())
1679          throw new Error("Attempt to auto-create ConceptMap.identifier");
1680        else if (Configuration.doAutoCreate())
1681          this.identifier = new Identifier(); // cc
1682      return this.identifier;
1683    }
1684
1685    public boolean hasIdentifier() { 
1686      return this.identifier != null && !this.identifier.isEmpty();
1687    }
1688
1689    /**
1690     * @param value {@link #identifier} (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.)
1691     */
1692    public ConceptMap setIdentifier(Identifier value) { 
1693      this.identifier = value;
1694      return this;
1695    }
1696
1697    /**
1698     * @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 profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1699     */
1700    public StringType getVersionElement() { 
1701      if (this.version == null)
1702        if (Configuration.errorOnAutoCreate())
1703          throw new Error("Attempt to auto-create ConceptMap.version");
1704        else if (Configuration.doAutoCreate())
1705          this.version = new StringType(); // bb
1706      return this.version;
1707    }
1708
1709    public boolean hasVersionElement() { 
1710      return this.version != null && !this.version.isEmpty();
1711    }
1712
1713    public boolean hasVersion() { 
1714      return this.version != null && !this.version.isEmpty();
1715    }
1716
1717    /**
1718     * @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 profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1719     */
1720    public ConceptMap setVersionElement(StringType value) { 
1721      this.version = value;
1722      return this;
1723    }
1724
1725    /**
1726     * @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 profile author manually and the value should be a timestamp.
1727     */
1728    public String getVersion() { 
1729      return this.version == null ? null : this.version.getValue();
1730    }
1731
1732    /**
1733     * @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 profile author manually and the value should be a timestamp.
1734     */
1735    public ConceptMap setVersion(String value) { 
1736      if (Utilities.noString(value))
1737        this.version = null;
1738      else {
1739        if (this.version == null)
1740          this.version = new StringType();
1741        this.version.setValue(value);
1742      }
1743      return this;
1744    }
1745
1746    /**
1747     * @return {@link #name} (A free text natural language name describing the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1748     */
1749    public StringType getNameElement() { 
1750      if (this.name == null)
1751        if (Configuration.errorOnAutoCreate())
1752          throw new Error("Attempt to auto-create ConceptMap.name");
1753        else if (Configuration.doAutoCreate())
1754          this.name = new StringType(); // bb
1755      return this.name;
1756    }
1757
1758    public boolean hasNameElement() { 
1759      return this.name != null && !this.name.isEmpty();
1760    }
1761
1762    public boolean hasName() { 
1763      return this.name != null && !this.name.isEmpty();
1764    }
1765
1766    /**
1767     * @param value {@link #name} (A free text natural language name describing the concept map.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1768     */
1769    public ConceptMap setNameElement(StringType value) { 
1770      this.name = value;
1771      return this;
1772    }
1773
1774    /**
1775     * @return A free text natural language name describing the concept map.
1776     */
1777    public String getName() { 
1778      return this.name == null ? null : this.name.getValue();
1779    }
1780
1781    /**
1782     * @param value A free text natural language name describing the concept map.
1783     */
1784    public ConceptMap setName(String value) { 
1785      if (Utilities.noString(value))
1786        this.name = null;
1787      else {
1788        if (this.name == null)
1789          this.name = new StringType();
1790        this.name.setValue(value);
1791      }
1792      return this;
1793    }
1794
1795    /**
1796     * @return {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1797     */
1798    public Enumeration<ConformanceResourceStatus> getStatusElement() { 
1799      if (this.status == null)
1800        if (Configuration.errorOnAutoCreate())
1801          throw new Error("Attempt to auto-create ConceptMap.status");
1802        else if (Configuration.doAutoCreate())
1803          this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb
1804      return this.status;
1805    }
1806
1807    public boolean hasStatusElement() { 
1808      return this.status != null && !this.status.isEmpty();
1809    }
1810
1811    public boolean hasStatus() { 
1812      return this.status != null && !this.status.isEmpty();
1813    }
1814
1815    /**
1816     * @param value {@link #status} (The status of the concept map.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1817     */
1818    public ConceptMap setStatusElement(Enumeration<ConformanceResourceStatus> value) { 
1819      this.status = value;
1820      return this;
1821    }
1822
1823    /**
1824     * @return The status of the concept map.
1825     */
1826    public ConformanceResourceStatus getStatus() { 
1827      return this.status == null ? null : this.status.getValue();
1828    }
1829
1830    /**
1831     * @param value The status of the concept map.
1832     */
1833    public ConceptMap setStatus(ConformanceResourceStatus value) { 
1834        if (this.status == null)
1835          this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory());
1836        this.status.setValue(value);
1837      return this;
1838    }
1839
1840    /**
1841     * @return {@link #experimental} (This ConceptMap was 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
1842     */
1843    public BooleanType getExperimentalElement() { 
1844      if (this.experimental == null)
1845        if (Configuration.errorOnAutoCreate())
1846          throw new Error("Attempt to auto-create ConceptMap.experimental");
1847        else if (Configuration.doAutoCreate())
1848          this.experimental = new BooleanType(); // bb
1849      return this.experimental;
1850    }
1851
1852    public boolean hasExperimentalElement() { 
1853      return this.experimental != null && !this.experimental.isEmpty();
1854    }
1855
1856    public boolean hasExperimental() { 
1857      return this.experimental != null && !this.experimental.isEmpty();
1858    }
1859
1860    /**
1861     * @param value {@link #experimental} (This ConceptMap was 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
1862     */
1863    public ConceptMap setExperimentalElement(BooleanType value) { 
1864      this.experimental = value;
1865      return this;
1866    }
1867
1868    /**
1869     * @return This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
1870     */
1871    public boolean getExperimental() { 
1872      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
1873    }
1874
1875    /**
1876     * @param value This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
1877     */
1878    public ConceptMap setExperimental(boolean value) { 
1879        if (this.experimental == null)
1880          this.experimental = new BooleanType();
1881        this.experimental.setValue(value);
1882      return this;
1883    }
1884
1885    /**
1886     * @return {@link #publisher} (The name of the individual or organization that published the concept map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1887     */
1888    public StringType getPublisherElement() { 
1889      if (this.publisher == null)
1890        if (Configuration.errorOnAutoCreate())
1891          throw new Error("Attempt to auto-create ConceptMap.publisher");
1892        else if (Configuration.doAutoCreate())
1893          this.publisher = new StringType(); // bb
1894      return this.publisher;
1895    }
1896
1897    public boolean hasPublisherElement() { 
1898      return this.publisher != null && !this.publisher.isEmpty();
1899    }
1900
1901    public boolean hasPublisher() { 
1902      return this.publisher != null && !this.publisher.isEmpty();
1903    }
1904
1905    /**
1906     * @param value {@link #publisher} (The name of the individual or organization that published the concept map.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1907     */
1908    public ConceptMap setPublisherElement(StringType value) { 
1909      this.publisher = value;
1910      return this;
1911    }
1912
1913    /**
1914     * @return The name of the individual or organization that published the concept map.
1915     */
1916    public String getPublisher() { 
1917      return this.publisher == null ? null : this.publisher.getValue();
1918    }
1919
1920    /**
1921     * @param value The name of the individual or organization that published the concept map.
1922     */
1923    public ConceptMap setPublisher(String value) { 
1924      if (Utilities.noString(value))
1925        this.publisher = null;
1926      else {
1927        if (this.publisher == null)
1928          this.publisher = new StringType();
1929        this.publisher.setValue(value);
1930      }
1931      return this;
1932    }
1933
1934    /**
1935     * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.)
1936     */
1937    public List<ConceptMapContactComponent> getContact() { 
1938      if (this.contact == null)
1939        this.contact = new ArrayList<ConceptMapContactComponent>();
1940      return this.contact;
1941    }
1942
1943    public boolean hasContact() { 
1944      if (this.contact == null)
1945        return false;
1946      for (ConceptMapContactComponent item : this.contact)
1947        if (!item.isEmpty())
1948          return true;
1949      return false;
1950    }
1951
1952    /**
1953     * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.)
1954     */
1955    // syntactic sugar
1956    public ConceptMapContactComponent addContact() { //3
1957      ConceptMapContactComponent t = new ConceptMapContactComponent();
1958      if (this.contact == null)
1959        this.contact = new ArrayList<ConceptMapContactComponent>();
1960      this.contact.add(t);
1961      return t;
1962    }
1963
1964    // syntactic sugar
1965    public ConceptMap addContact(ConceptMapContactComponent t) { //3
1966      if (t == null)
1967        return this;
1968      if (this.contact == null)
1969        this.contact = new ArrayList<ConceptMapContactComponent>();
1970      this.contact.add(t);
1971      return this;
1972    }
1973
1974    /**
1975     * @return {@link #date} (The date this version of the concept map was published. The date must change when the business version changes, if it does, 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
1976     */
1977    public DateTimeType getDateElement() { 
1978      if (this.date == null)
1979        if (Configuration.errorOnAutoCreate())
1980          throw new Error("Attempt to auto-create ConceptMap.date");
1981        else if (Configuration.doAutoCreate())
1982          this.date = new DateTimeType(); // bb
1983      return this.date;
1984    }
1985
1986    public boolean hasDateElement() { 
1987      return this.date != null && !this.date.isEmpty();
1988    }
1989
1990    public boolean hasDate() { 
1991      return this.date != null && !this.date.isEmpty();
1992    }
1993
1994    /**
1995     * @param value {@link #date} (The date this version of the concept map was published. The date must change when the business version changes, if it does, 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
1996     */
1997    public ConceptMap setDateElement(DateTimeType value) { 
1998      this.date = value;
1999      return this;
2000    }
2001
2002    /**
2003     * @return The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.
2004     */
2005    public Date getDate() { 
2006      return this.date == null ? null : this.date.getValue();
2007    }
2008
2009    /**
2010     * @param value The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.
2011     */
2012    public ConceptMap setDate(Date value) { 
2013      if (value == null)
2014        this.date = null;
2015      else {
2016        if (this.date == null)
2017          this.date = new DateTimeType();
2018        this.date.setValue(value);
2019      }
2020      return this;
2021    }
2022
2023    /**
2024     * @return {@link #description} (A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2025     */
2026    public StringType getDescriptionElement() { 
2027      if (this.description == null)
2028        if (Configuration.errorOnAutoCreate())
2029          throw new Error("Attempt to auto-create ConceptMap.description");
2030        else if (Configuration.doAutoCreate())
2031          this.description = new StringType(); // bb
2032      return this.description;
2033    }
2034
2035    public boolean hasDescriptionElement() { 
2036      return this.description != null && !this.description.isEmpty();
2037    }
2038
2039    public boolean hasDescription() { 
2040      return this.description != null && !this.description.isEmpty();
2041    }
2042
2043    /**
2044     * @param value {@link #description} (A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2045     */
2046    public ConceptMap setDescriptionElement(StringType value) { 
2047      this.description = value;
2048      return this;
2049    }
2050
2051    /**
2052     * @return A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.
2053     */
2054    public String getDescription() { 
2055      return this.description == null ? null : this.description.getValue();
2056    }
2057
2058    /**
2059     * @param value A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.
2060     */
2061    public ConceptMap setDescription(String value) { 
2062      if (Utilities.noString(value))
2063        this.description = null;
2064      else {
2065        if (this.description == null)
2066          this.description = new StringType();
2067        this.description.setValue(value);
2068      }
2069      return this;
2070    }
2071
2072    /**
2073     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.)
2074     */
2075    public List<CodeableConcept> getUseContext() { 
2076      if (this.useContext == null)
2077        this.useContext = new ArrayList<CodeableConcept>();
2078      return this.useContext;
2079    }
2080
2081    public boolean hasUseContext() { 
2082      if (this.useContext == null)
2083        return false;
2084      for (CodeableConcept item : this.useContext)
2085        if (!item.isEmpty())
2086          return true;
2087      return false;
2088    }
2089
2090    /**
2091     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.)
2092     */
2093    // syntactic sugar
2094    public CodeableConcept addUseContext() { //3
2095      CodeableConcept t = new CodeableConcept();
2096      if (this.useContext == null)
2097        this.useContext = new ArrayList<CodeableConcept>();
2098      this.useContext.add(t);
2099      return t;
2100    }
2101
2102    // syntactic sugar
2103    public ConceptMap addUseContext(CodeableConcept t) { //3
2104      if (t == null)
2105        return this;
2106      if (this.useContext == null)
2107        this.useContext = new ArrayList<CodeableConcept>();
2108      this.useContext.add(t);
2109      return this;
2110    }
2111
2112    /**
2113     * @return {@link #requirements} (Explains why this concept map is needed and why it has been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
2114     */
2115    public StringType getRequirementsElement() { 
2116      if (this.requirements == null)
2117        if (Configuration.errorOnAutoCreate())
2118          throw new Error("Attempt to auto-create ConceptMap.requirements");
2119        else if (Configuration.doAutoCreate())
2120          this.requirements = new StringType(); // bb
2121      return this.requirements;
2122    }
2123
2124    public boolean hasRequirementsElement() { 
2125      return this.requirements != null && !this.requirements.isEmpty();
2126    }
2127
2128    public boolean hasRequirements() { 
2129      return this.requirements != null && !this.requirements.isEmpty();
2130    }
2131
2132    /**
2133     * @param value {@link #requirements} (Explains why this concept map is needed and why it has been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value
2134     */
2135    public ConceptMap setRequirementsElement(StringType value) { 
2136      this.requirements = value;
2137      return this;
2138    }
2139
2140    /**
2141     * @return Explains why this concept map is needed and why it has been constrained as it has.
2142     */
2143    public String getRequirements() { 
2144      return this.requirements == null ? null : this.requirements.getValue();
2145    }
2146
2147    /**
2148     * @param value Explains why this concept map is needed and why it has been constrained as it has.
2149     */
2150    public ConceptMap setRequirements(String value) { 
2151      if (Utilities.noString(value))
2152        this.requirements = null;
2153      else {
2154        if (this.requirements == null)
2155          this.requirements = new StringType();
2156        this.requirements.setValue(value);
2157      }
2158      return this;
2159    }
2160
2161    /**
2162     * @return {@link #copyright} (A copyright statement relating to the concept map and/or its contents.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2163     */
2164    public StringType getCopyrightElement() { 
2165      if (this.copyright == null)
2166        if (Configuration.errorOnAutoCreate())
2167          throw new Error("Attempt to auto-create ConceptMap.copyright");
2168        else if (Configuration.doAutoCreate())
2169          this.copyright = new StringType(); // bb
2170      return this.copyright;
2171    }
2172
2173    public boolean hasCopyrightElement() { 
2174      return this.copyright != null && !this.copyright.isEmpty();
2175    }
2176
2177    public boolean hasCopyright() { 
2178      return this.copyright != null && !this.copyright.isEmpty();
2179    }
2180
2181    /**
2182     * @param value {@link #copyright} (A copyright statement relating to the concept map and/or its contents.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2183     */
2184    public ConceptMap setCopyrightElement(StringType value) { 
2185      this.copyright = value;
2186      return this;
2187    }
2188
2189    /**
2190     * @return A copyright statement relating to the concept map and/or its contents.
2191     */
2192    public String getCopyright() { 
2193      return this.copyright == null ? null : this.copyright.getValue();
2194    }
2195
2196    /**
2197     * @param value A copyright statement relating to the concept map and/or its contents.
2198     */
2199    public ConceptMap setCopyright(String value) { 
2200      if (Utilities.noString(value))
2201        this.copyright = null;
2202      else {
2203        if (this.copyright == null)
2204          this.copyright = new StringType();
2205        this.copyright.setValue(value);
2206      }
2207      return this;
2208    }
2209
2210    /**
2211     * @return {@link #source} (The source value set that specifies the concepts that are being mapped.)
2212     */
2213    public Type getSource() { 
2214      return this.source;
2215    }
2216
2217    /**
2218     * @return {@link #source} (The source value set that specifies the concepts that are being mapped.)
2219     */
2220    public UriType getSourceUriType() throws FHIRException { 
2221      if (!(this.source instanceof UriType))
2222        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.source.getClass().getName()+" was encountered");
2223      return (UriType) this.source;
2224    }
2225
2226    public boolean hasSourceUriType() { 
2227      return this.source instanceof UriType;
2228    }
2229
2230    /**
2231     * @return {@link #source} (The source value set that specifies the concepts that are being mapped.)
2232     */
2233    public Reference getSourceReference() throws FHIRException { 
2234      if (!(this.source instanceof Reference))
2235        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.source.getClass().getName()+" was encountered");
2236      return (Reference) this.source;
2237    }
2238
2239    public boolean hasSourceReference() { 
2240      return this.source instanceof Reference;
2241    }
2242
2243    public boolean hasSource() { 
2244      return this.source != null && !this.source.isEmpty();
2245    }
2246
2247    /**
2248     * @param value {@link #source} (The source value set that specifies the concepts that are being mapped.)
2249     */
2250    public ConceptMap setSource(Type value) { 
2251      this.source = value;
2252      return this;
2253    }
2254
2255    /**
2256     * @return {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
2257     */
2258    public Type getTarget() { 
2259      return this.target;
2260    }
2261
2262    /**
2263     * @return {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
2264     */
2265    public UriType getTargetUriType() throws FHIRException { 
2266      if (!(this.target instanceof UriType))
2267        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.target.getClass().getName()+" was encountered");
2268      return (UriType) this.target;
2269    }
2270
2271    public boolean hasTargetUriType() { 
2272      return this.target instanceof UriType;
2273    }
2274
2275    /**
2276     * @return {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
2277     */
2278    public Reference getTargetReference() throws FHIRException { 
2279      if (!(this.target instanceof Reference))
2280        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered");
2281      return (Reference) this.target;
2282    }
2283
2284    public boolean hasTargetReference() { 
2285      return this.target instanceof Reference;
2286    }
2287
2288    public boolean hasTarget() { 
2289      return this.target != null && !this.target.isEmpty();
2290    }
2291
2292    /**
2293     * @param value {@link #target} (The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.)
2294     */
2295    public ConceptMap setTarget(Type value) { 
2296      this.target = value;
2297      return this;
2298    }
2299
2300    /**
2301     * @return {@link #element} (Mappings for an individual concept in the source to one or more concepts in the target.)
2302     */
2303    public List<SourceElementComponent> getElement() { 
2304      if (this.element == null)
2305        this.element = new ArrayList<SourceElementComponent>();
2306      return this.element;
2307    }
2308
2309    public boolean hasElement() { 
2310      if (this.element == null)
2311        return false;
2312      for (SourceElementComponent item : this.element)
2313        if (!item.isEmpty())
2314          return true;
2315      return false;
2316    }
2317
2318    /**
2319     * @return {@link #element} (Mappings for an individual concept in the source to one or more concepts in the target.)
2320     */
2321    // syntactic sugar
2322    public SourceElementComponent addElement() { //3
2323      SourceElementComponent t = new SourceElementComponent();
2324      if (this.element == null)
2325        this.element = new ArrayList<SourceElementComponent>();
2326      this.element.add(t);
2327      return t;
2328    }
2329
2330    // syntactic sugar
2331    public ConceptMap addElement(SourceElementComponent t) { //3
2332      if (t == null)
2333        return this;
2334      if (this.element == null)
2335        this.element = new ArrayList<SourceElementComponent>();
2336      this.element.add(t);
2337      return this;
2338    }
2339
2340      protected void listChildren(List<Property> childrenList) {
2341        super.listChildren(childrenList);
2342        childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this concept map when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this concept map is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url));
2343        childrenList.add(new Property("identifier", "Identifier", "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));
2344        childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version));
2345        childrenList.add(new Property("name", "string", "A free text natural language name describing the concept map.", 0, java.lang.Integer.MAX_VALUE, name));
2346        childrenList.add(new Property("status", "code", "The status of the concept map.", 0, java.lang.Integer.MAX_VALUE, status));
2347        childrenList.add(new Property("experimental", "boolean", "This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental));
2348        childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the concept map.", 0, java.lang.Integer.MAX_VALUE, publisher));
2349        childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
2350        childrenList.add(new Property("date", "dateTime", "The date this version of the concept map was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.", 0, java.lang.Integer.MAX_VALUE, date));
2351        childrenList.add(new Property("description", "string", "A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.", 0, java.lang.Integer.MAX_VALUE, description));
2352        childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of concept map instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
2353        childrenList.add(new Property("requirements", "string", "Explains why this concept map is needed and why it has been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements));
2354        childrenList.add(new Property("copyright", "string", "A copyright statement relating to the concept map and/or its contents.", 0, java.lang.Integer.MAX_VALUE, copyright));
2355        childrenList.add(new Property("source[x]", "uri|Reference(ValueSet|StructureDefinition)", "The source value set that specifies the concepts that are being mapped.", 0, java.lang.Integer.MAX_VALUE, source));
2356        childrenList.add(new Property("target[x]", "uri|Reference(ValueSet|StructureDefinition)", "The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.", 0, java.lang.Integer.MAX_VALUE, target));
2357        childrenList.add(new Property("element", "", "Mappings for an individual concept in the source to one or more concepts in the target.", 0, java.lang.Integer.MAX_VALUE, element));
2358      }
2359
2360      @Override
2361      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2362        switch (hash) {
2363        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2364        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
2365        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2366        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2367        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus>
2368        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
2369        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
2370        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ConceptMapContactComponent
2371        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2372        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2373        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // CodeableConcept
2374        case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType
2375        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // StringType
2376        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Type
2377        case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type
2378        case -1662836996: /*element*/ return this.element == null ? new Base[0] : this.element.toArray(new Base[this.element.size()]); // SourceElementComponent
2379        default: return super.getProperty(hash, name, checkValid);
2380        }
2381
2382      }
2383
2384      @Override
2385      public void setProperty(int hash, String name, Base value) throws FHIRException {
2386        switch (hash) {
2387        case 116079: // url
2388          this.url = castToUri(value); // UriType
2389          break;
2390        case -1618432855: // identifier
2391          this.identifier = castToIdentifier(value); // Identifier
2392          break;
2393        case 351608024: // version
2394          this.version = castToString(value); // StringType
2395          break;
2396        case 3373707: // name
2397          this.name = castToString(value); // StringType
2398          break;
2399        case -892481550: // status
2400          this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus>
2401          break;
2402        case -404562712: // experimental
2403          this.experimental = castToBoolean(value); // BooleanType
2404          break;
2405        case 1447404028: // publisher
2406          this.publisher = castToString(value); // StringType
2407          break;
2408        case 951526432: // contact
2409          this.getContact().add((ConceptMapContactComponent) value); // ConceptMapContactComponent
2410          break;
2411        case 3076014: // date
2412          this.date = castToDateTime(value); // DateTimeType
2413          break;
2414        case -1724546052: // description
2415          this.description = castToString(value); // StringType
2416          break;
2417        case -669707736: // useContext
2418          this.getUseContext().add(castToCodeableConcept(value)); // CodeableConcept
2419          break;
2420        case -1619874672: // requirements
2421          this.requirements = castToString(value); // StringType
2422          break;
2423        case 1522889671: // copyright
2424          this.copyright = castToString(value); // StringType
2425          break;
2426        case -896505829: // source
2427          this.source = (Type) value; // Type
2428          break;
2429        case -880905839: // target
2430          this.target = (Type) value; // Type
2431          break;
2432        case -1662836996: // element
2433          this.getElement().add((SourceElementComponent) value); // SourceElementComponent
2434          break;
2435        default: super.setProperty(hash, name, value);
2436        }
2437
2438      }
2439
2440      @Override
2441      public void setProperty(String name, Base value) throws FHIRException {
2442        if (name.equals("url"))
2443          this.url = castToUri(value); // UriType
2444        else if (name.equals("identifier"))
2445          this.identifier = castToIdentifier(value); // Identifier
2446        else if (name.equals("version"))
2447          this.version = castToString(value); // StringType
2448        else if (name.equals("name"))
2449          this.name = castToString(value); // StringType
2450        else if (name.equals("status"))
2451          this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus>
2452        else if (name.equals("experimental"))
2453          this.experimental = castToBoolean(value); // BooleanType
2454        else if (name.equals("publisher"))
2455          this.publisher = castToString(value); // StringType
2456        else if (name.equals("contact"))
2457          this.getContact().add((ConceptMapContactComponent) value);
2458        else if (name.equals("date"))
2459          this.date = castToDateTime(value); // DateTimeType
2460        else if (name.equals("description"))
2461          this.description = castToString(value); // StringType
2462        else if (name.equals("useContext"))
2463          this.getUseContext().add(castToCodeableConcept(value));
2464        else if (name.equals("requirements"))
2465          this.requirements = castToString(value); // StringType
2466        else if (name.equals("copyright"))
2467          this.copyright = castToString(value); // StringType
2468        else if (name.equals("source[x]"))
2469          this.source = (Type) value; // Type
2470        else if (name.equals("target[x]"))
2471          this.target = (Type) value; // Type
2472        else if (name.equals("element"))
2473          this.getElement().add((SourceElementComponent) value);
2474        else
2475          super.setProperty(name, value);
2476      }
2477
2478      @Override
2479      public Base makeProperty(int hash, String name) throws FHIRException {
2480        switch (hash) {
2481        case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
2482        case -1618432855:  return getIdentifier(); // Identifier
2483        case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
2484        case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
2485        case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus>
2486        case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType
2487        case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType
2488        case 951526432:  return addContact(); // ConceptMapContactComponent
2489        case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType
2490        case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
2491        case -669707736:  return addUseContext(); // CodeableConcept
2492        case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // StringType
2493        case 1522889671: throw new FHIRException("Cannot make property copyright as it is not a complex type"); // StringType
2494        case -1698413947:  return getSource(); // Type
2495        case -815579825:  return getTarget(); // Type
2496        case -1662836996:  return addElement(); // SourceElementComponent
2497        default: return super.makeProperty(hash, name);
2498        }
2499
2500      }
2501
2502      @Override
2503      public Base addChild(String name) throws FHIRException {
2504        if (name.equals("url")) {
2505          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.url");
2506        }
2507        else if (name.equals("identifier")) {
2508          this.identifier = new Identifier();
2509          return this.identifier;
2510        }
2511        else if (name.equals("version")) {
2512          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.version");
2513        }
2514        else if (name.equals("name")) {
2515          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.name");
2516        }
2517        else if (name.equals("status")) {
2518          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.status");
2519        }
2520        else if (name.equals("experimental")) {
2521          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.experimental");
2522        }
2523        else if (name.equals("publisher")) {
2524          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.publisher");
2525        }
2526        else if (name.equals("contact")) {
2527          return addContact();
2528        }
2529        else if (name.equals("date")) {
2530          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.date");
2531        }
2532        else if (name.equals("description")) {
2533          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.description");
2534        }
2535        else if (name.equals("useContext")) {
2536          return addUseContext();
2537        }
2538        else if (name.equals("requirements")) {
2539          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.requirements");
2540        }
2541        else if (name.equals("copyright")) {
2542          throw new FHIRException("Cannot call addChild on a primitive type ConceptMap.copyright");
2543        }
2544        else if (name.equals("sourceUri")) {
2545          this.source = new UriType();
2546          return this.source;
2547        }
2548        else if (name.equals("sourceReference")) {
2549          this.source = new Reference();
2550          return this.source;
2551        }
2552        else if (name.equals("targetUri")) {
2553          this.target = new UriType();
2554          return this.target;
2555        }
2556        else if (name.equals("targetReference")) {
2557          this.target = new Reference();
2558          return this.target;
2559        }
2560        else if (name.equals("element")) {
2561          return addElement();
2562        }
2563        else
2564          return super.addChild(name);
2565      }
2566
2567  public String fhirType() {
2568    return "ConceptMap";
2569
2570  }
2571
2572      public ConceptMap copy() {
2573        ConceptMap dst = new ConceptMap();
2574        copyValues(dst);
2575        dst.url = url == null ? null : url.copy();
2576        dst.identifier = identifier == null ? null : identifier.copy();
2577        dst.version = version == null ? null : version.copy();
2578        dst.name = name == null ? null : name.copy();
2579        dst.status = status == null ? null : status.copy();
2580        dst.experimental = experimental == null ? null : experimental.copy();
2581        dst.publisher = publisher == null ? null : publisher.copy();
2582        if (contact != null) {
2583          dst.contact = new ArrayList<ConceptMapContactComponent>();
2584          for (ConceptMapContactComponent i : contact)
2585            dst.contact.add(i.copy());
2586        };
2587        dst.date = date == null ? null : date.copy();
2588        dst.description = description == null ? null : description.copy();
2589        if (useContext != null) {
2590          dst.useContext = new ArrayList<CodeableConcept>();
2591          for (CodeableConcept i : useContext)
2592            dst.useContext.add(i.copy());
2593        };
2594        dst.requirements = requirements == null ? null : requirements.copy();
2595        dst.copyright = copyright == null ? null : copyright.copy();
2596        dst.source = source == null ? null : source.copy();
2597        dst.target = target == null ? null : target.copy();
2598        if (element != null) {
2599          dst.element = new ArrayList<SourceElementComponent>();
2600          for (SourceElementComponent i : element)
2601            dst.element.add(i.copy());
2602        };
2603        return dst;
2604      }
2605
2606      protected ConceptMap typedCopy() {
2607        return copy();
2608      }
2609
2610      @Override
2611      public boolean equalsDeep(Base other) {
2612        if (!super.equalsDeep(other))
2613          return false;
2614        if (!(other instanceof ConceptMap))
2615          return false;
2616        ConceptMap o = (ConceptMap) other;
2617        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
2618           && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
2619           && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true)
2620           && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
2621           && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true)
2622           && compareDeep(source, o.source, true) && compareDeep(target, o.target, true) && compareDeep(element, o.element, true)
2623          ;
2624      }
2625
2626      @Override
2627      public boolean equalsShallow(Base other) {
2628        if (!super.equalsShallow(other))
2629          return false;
2630        if (!(other instanceof ConceptMap))
2631          return false;
2632        ConceptMap o = (ConceptMap) other;
2633        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
2634           && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true)
2635           && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true)
2636           && compareValues(copyright, o.copyright, true);
2637      }
2638
2639      public boolean isEmpty() {
2640        return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
2641           && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (status == null || status.isEmpty())
2642           && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty())
2643           && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty())
2644           && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty())
2645           && (copyright == null || copyright.isEmpty()) && (source == null || source.isEmpty()) && (target == null || target.isEmpty())
2646           && (element == null || element.isEmpty());
2647      }
2648
2649  @Override
2650  public ResourceType getResourceType() {
2651    return ResourceType.ConceptMap;
2652   }
2653
2654 /**
2655   * Search parameter: <b>source-system</b>
2656   * <p>
2657   * Description: <b>Code System (if value set crosses code systems)</b><br>
2658   * Type: <b>uri</b><br>
2659   * Path: <b>ConceptMap.element.system</b><br>
2660   * </p>
2661   */
2662  @SearchParamDefinition(name="source-system", path="ConceptMap.element.system", description="Code System (if value set crosses code systems)", type="uri" )
2663  public static final String SP_SOURCE_SYSTEM = "source-system";
2664 /**
2665   * <b>Fluent Client</b> search parameter constant for <b>source-system</b>
2666   * <p>
2667   * Description: <b>Code System (if value set crosses code systems)</b><br>
2668   * Type: <b>uri</b><br>
2669   * Path: <b>ConceptMap.element.system</b><br>
2670   * </p>
2671   */
2672  public static final ca.uhn.fhir.rest.gclient.UriClientParam SOURCE_SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SOURCE_SYSTEM);
2673
2674 /**
2675   * Search parameter: <b>dependson</b>
2676   * <p>
2677   * Description: <b>Reference to element/field/ValueSet mapping depends on</b><br>
2678   * Type: <b>uri</b><br>
2679   * Path: <b>ConceptMap.element.target.dependsOn.element</b><br>
2680   * </p>
2681   */
2682  @SearchParamDefinition(name="dependson", path="ConceptMap.element.target.dependsOn.element", description="Reference to element/field/ValueSet mapping depends on", type="uri" )
2683  public static final String SP_DEPENDSON = "dependson";
2684 /**
2685   * <b>Fluent Client</b> search parameter constant for <b>dependson</b>
2686   * <p>
2687   * Description: <b>Reference to element/field/ValueSet mapping depends on</b><br>
2688   * Type: <b>uri</b><br>
2689   * Path: <b>ConceptMap.element.target.dependsOn.element</b><br>
2690   * </p>
2691   */
2692  public static final ca.uhn.fhir.rest.gclient.UriClientParam DEPENDSON = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_DEPENDSON);
2693
2694 /**
2695   * Search parameter: <b>status</b>
2696   * <p>
2697   * Description: <b>Status of the concept map</b><br>
2698   * Type: <b>token</b><br>
2699   * Path: <b>ConceptMap.status</b><br>
2700   * </p>
2701   */
2702  @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" )
2703  public static final String SP_STATUS = "status";
2704 /**
2705   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2706   * <p>
2707   * Description: <b>Status of the concept map</b><br>
2708   * Type: <b>token</b><br>
2709   * Path: <b>ConceptMap.status</b><br>
2710   * </p>
2711   */
2712  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2713
2714 /**
2715   * Search parameter: <b>date</b>
2716   * <p>
2717   * Description: <b>The concept map publication date</b><br>
2718   * Type: <b>date</b><br>
2719   * Path: <b>ConceptMap.date</b><br>
2720   * </p>
2721   */
2722  @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" )
2723  public static final String SP_DATE = "date";
2724 /**
2725   * <b>Fluent Client</b> search parameter constant for <b>date</b>
2726   * <p>
2727   * Description: <b>The concept map publication date</b><br>
2728   * Type: <b>date</b><br>
2729   * Path: <b>ConceptMap.date</b><br>
2730   * </p>
2731   */
2732  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
2733
2734 /**
2735   * Search parameter: <b>url</b>
2736   * <p>
2737   * Description: <b>The URL of the concept map</b><br>
2738   * Type: <b>uri</b><br>
2739   * Path: <b>ConceptMap.url</b><br>
2740   * </p>
2741   */
2742  @SearchParamDefinition(name="url", path="ConceptMap.url", description="The URL of the concept map", type="uri" )
2743  public static final String SP_URL = "url";
2744 /**
2745   * <b>Fluent Client</b> search parameter constant for <b>url</b>
2746   * <p>
2747   * Description: <b>The URL of the concept map</b><br>
2748   * Type: <b>uri</b><br>
2749   * Path: <b>ConceptMap.url</b><br>
2750   * </p>
2751   */
2752  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
2753
2754 /**
2755   * Search parameter: <b>target-code</b>
2756   * <p>
2757   * Description: <b>Code that identifies the target element</b><br>
2758   * Type: <b>token</b><br>
2759   * Path: <b>ConceptMap.element.target.code</b><br>
2760   * </p>
2761   */
2762  @SearchParamDefinition(name="target-code", path="ConceptMap.element.target.code", description="Code that identifies the target element", type="token" )
2763  public static final String SP_TARGET_CODE = "target-code";
2764 /**
2765   * <b>Fluent Client</b> search parameter constant for <b>target-code</b>
2766   * <p>
2767   * Description: <b>Code that identifies the target element</b><br>
2768   * Type: <b>token</b><br>
2769   * Path: <b>ConceptMap.element.target.code</b><br>
2770   * </p>
2771   */
2772  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGET_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGET_CODE);
2773
2774 /**
2775   * Search parameter: <b>version</b>
2776   * <p>
2777   * Description: <b>The version identifier of the concept map</b><br>
2778   * Type: <b>token</b><br>
2779   * Path: <b>ConceptMap.version</b><br>
2780   * </p>
2781   */
2782  @SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" )
2783  public static final String SP_VERSION = "version";
2784 /**
2785   * <b>Fluent Client</b> search parameter constant for <b>version</b>
2786   * <p>
2787   * Description: <b>The version identifier of the concept map</b><br>
2788   * Type: <b>token</b><br>
2789   * Path: <b>ConceptMap.version</b><br>
2790   * </p>
2791   */
2792  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
2793
2794 /**
2795   * Search parameter: <b>publisher</b>
2796   * <p>
2797   * Description: <b>Name of the publisher of the concept map</b><br>
2798   * Type: <b>string</b><br>
2799   * Path: <b>ConceptMap.publisher</b><br>
2800   * </p>
2801   */
2802  @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" )
2803  public static final String SP_PUBLISHER = "publisher";
2804 /**
2805   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
2806   * <p>
2807   * Description: <b>Name of the publisher of the concept map</b><br>
2808   * Type: <b>string</b><br>
2809   * Path: <b>ConceptMap.publisher</b><br>
2810   * </p>
2811   */
2812  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
2813
2814 /**
2815   * Search parameter: <b>product</b>
2816   * <p>
2817   * Description: <b>Reference to element/field/ValueSet mapping depends on</b><br>
2818   * Type: <b>uri</b><br>
2819   * Path: <b>ConceptMap.element.target.product.element</b><br>
2820   * </p>
2821   */
2822  @SearchParamDefinition(name="product", path="ConceptMap.element.target.product.element", description="Reference to element/field/ValueSet mapping depends on", type="uri" )
2823  public static final String SP_PRODUCT = "product";
2824 /**
2825   * <b>Fluent Client</b> search parameter constant for <b>product</b>
2826   * <p>
2827   * Description: <b>Reference to element/field/ValueSet mapping depends on</b><br>
2828   * Type: <b>uri</b><br>
2829   * Path: <b>ConceptMap.element.target.product.element</b><br>
2830   * </p>
2831   */
2832  public static final ca.uhn.fhir.rest.gclient.UriClientParam PRODUCT = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_PRODUCT);
2833
2834 /**
2835   * Search parameter: <b>source-code</b>
2836   * <p>
2837   * Description: <b>Identifies element being mapped</b><br>
2838   * Type: <b>token</b><br>
2839   * Path: <b>ConceptMap.element.code</b><br>
2840   * </p>
2841   */
2842  @SearchParamDefinition(name="source-code", path="ConceptMap.element.code", description="Identifies element being mapped", type="token" )
2843  public static final String SP_SOURCE_CODE = "source-code";
2844 /**
2845   * <b>Fluent Client</b> search parameter constant for <b>source-code</b>
2846   * <p>
2847   * Description: <b>Identifies element being mapped</b><br>
2848   * Type: <b>token</b><br>
2849   * Path: <b>ConceptMap.element.code</b><br>
2850   * </p>
2851   */
2852  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SOURCE_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SOURCE_CODE);
2853
2854 /**
2855   * Search parameter: <b>source-uri</b>
2856   * <p>
2857   * Description: <b>Identifies the source of the concepts which are being mapped</b><br>
2858   * Type: <b>reference</b><br>
2859   * Path: <b>ConceptMap.sourceUri</b><br>
2860   * </p>
2861   */
2862  @SearchParamDefinition(name="source-uri", path="ConceptMap.source.as(Uri)", description="Identifies the source of the concepts which are being mapped", type="reference" )
2863  public static final String SP_SOURCE_URI = "source-uri";
2864 /**
2865   * <b>Fluent Client</b> search parameter constant for <b>source-uri</b>
2866   * <p>
2867   * Description: <b>Identifies the source of the concepts which are being mapped</b><br>
2868   * Type: <b>reference</b><br>
2869   * Path: <b>ConceptMap.sourceUri</b><br>
2870   * </p>
2871   */
2872  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE_URI = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE_URI);
2873
2874/**
2875   * Constant for fluent queries to be used to add include statements. Specifies
2876   * the path value of "<b>ConceptMap:source-uri</b>".
2877   */
2878  public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE_URI = new ca.uhn.fhir.model.api.Include("ConceptMap:source-uri").toLocked();
2879
2880 /**
2881   * Search parameter: <b>source</b>
2882   * <p>
2883   * Description: <b>Identifies the source of the concepts which are being mapped</b><br>
2884   * Type: <b>reference</b><br>
2885   * Path: <b>ConceptMap.sourceReference</b><br>
2886   * </p>
2887   */
2888  @SearchParamDefinition(name="source", path="ConceptMap.source.as(Reference)", description="Identifies the source of the concepts which are being mapped", type="reference" )
2889  public static final String SP_SOURCE = "source";
2890 /**
2891   * <b>Fluent Client</b> search parameter constant for <b>source</b>
2892   * <p>
2893   * Description: <b>Identifies the source of the concepts which are being mapped</b><br>
2894   * Type: <b>reference</b><br>
2895   * Path: <b>ConceptMap.sourceReference</b><br>
2896   * </p>
2897   */
2898  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE);
2899
2900/**
2901   * Constant for fluent queries to be used to add include statements. Specifies
2902   * the path value of "<b>ConceptMap:source</b>".
2903   */
2904  public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("ConceptMap:source").toLocked();
2905
2906 /**
2907   * Search parameter: <b>description</b>
2908   * <p>
2909   * Description: <b>Text search in the description of the concept map</b><br>
2910   * Type: <b>string</b><br>
2911   * Path: <b>ConceptMap.description</b><br>
2912   * </p>
2913   */
2914  @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" )
2915  public static final String SP_DESCRIPTION = "description";
2916 /**
2917   * <b>Fluent Client</b> search parameter constant for <b>description</b>
2918   * <p>
2919   * Description: <b>Text search in the description of the concept map</b><br>
2920   * Type: <b>string</b><br>
2921   * Path: <b>ConceptMap.description</b><br>
2922   * </p>
2923   */
2924  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
2925
2926 /**
2927   * Search parameter: <b>name</b>
2928   * <p>
2929   * Description: <b>Name of the concept map</b><br>
2930   * Type: <b>string</b><br>
2931   * Path: <b>ConceptMap.name</b><br>
2932   * </p>
2933   */
2934  @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" )
2935  public static final String SP_NAME = "name";
2936 /**
2937   * <b>Fluent Client</b> search parameter constant for <b>name</b>
2938   * <p>
2939   * Description: <b>Name of the concept map</b><br>
2940   * Type: <b>string</b><br>
2941   * Path: <b>ConceptMap.name</b><br>
2942   * </p>
2943   */
2944  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
2945
2946 /**
2947   * Search parameter: <b>context</b>
2948   * <p>
2949   * Description: <b>A use context assigned to the concept map</b><br>
2950   * Type: <b>token</b><br>
2951   * Path: <b>ConceptMap.useContext</b><br>
2952   * </p>
2953   */
2954  @SearchParamDefinition(name="context", path="ConceptMap.useContext", description="A use context assigned to the concept map", type="token" )
2955  public static final String SP_CONTEXT = "context";
2956 /**
2957   * <b>Fluent Client</b> search parameter constant for <b>context</b>
2958   * <p>
2959   * Description: <b>A use context assigned to the concept map</b><br>
2960   * Type: <b>token</b><br>
2961   * Path: <b>ConceptMap.useContext</b><br>
2962   * </p>
2963   */
2964  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
2965
2966 /**
2967   * Search parameter: <b>target</b>
2968   * <p>
2969   * Description: <b>Provides context to the mappings</b><br>
2970   * Type: <b>reference</b><br>
2971   * Path: <b>ConceptMap.target[x]</b><br>
2972   * </p>
2973   */
2974  @SearchParamDefinition(name="target", path="ConceptMap.target", description="Provides context to the mappings", type="reference" )
2975  public static final String SP_TARGET = "target";
2976 /**
2977   * <b>Fluent Client</b> search parameter constant for <b>target</b>
2978   * <p>
2979   * Description: <b>Provides context to the mappings</b><br>
2980   * Type: <b>reference</b><br>
2981   * Path: <b>ConceptMap.target[x]</b><br>
2982   * </p>
2983   */
2984  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGET);
2985
2986/**
2987   * Constant for fluent queries to be used to add include statements. Specifies
2988   * the path value of "<b>ConceptMap:target</b>".
2989   */
2990  public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include("ConceptMap:target").toLocked();
2991
2992 /**
2993   * Search parameter: <b>identifier</b>
2994   * <p>
2995   * Description: <b>Additional identifier for the concept map</b><br>
2996   * Type: <b>token</b><br>
2997   * Path: <b>ConceptMap.identifier</b><br>
2998   * </p>
2999   */
3000  @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="Additional identifier for the concept map", type="token" )
3001  public static final String SP_IDENTIFIER = "identifier";
3002 /**
3003   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3004   * <p>
3005   * Description: <b>Additional identifier for the concept map</b><br>
3006   * Type: <b>token</b><br>
3007   * Path: <b>ConceptMap.identifier</b><br>
3008   * </p>
3009   */
3010  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3011
3012 /**
3013   * Search parameter: <b>target-system</b>
3014   * <p>
3015   * Description: <b>System of the target (if necessary)</b><br>
3016   * Type: <b>uri</b><br>
3017   * Path: <b>ConceptMap.element.target.system</b><br>
3018   * </p>
3019   */
3020  @SearchParamDefinition(name="target-system", path="ConceptMap.element.target.system", description="System of the target (if necessary)", type="uri" )
3021  public static final String SP_TARGET_SYSTEM = "target-system";
3022 /**
3023   * <b>Fluent Client</b> search parameter constant for <b>target-system</b>
3024   * <p>
3025   * Description: <b>System of the target (if necessary)</b><br>
3026   * Type: <b>uri</b><br>
3027   * Path: <b>ConceptMap.element.target.system</b><br>
3028   * </p>
3029   */
3030  public static final ca.uhn.fhir.rest.gclient.UriClientParam TARGET_SYSTEM = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_TARGET_SYSTEM);
3031
3032
3033}