001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A kind of specimen with associated set of requirements.
052 */
053@ResourceDef(name="SpecimenDefinition", profile="http://hl7.org/fhir/StructureDefinition/SpecimenDefinition")
054public class SpecimenDefinition extends DomainResource {
055
056    public enum SpecimenContainedPreference {
057        /**
058         * This type of contained specimen is preferred to collect this kind of specimen.
059         */
060        PREFERRED, 
061        /**
062         * This type of conditioned specimen is an alternate.
063         */
064        ALTERNATE, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static SpecimenContainedPreference fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("preferred".equals(codeString))
073          return PREFERRED;
074        if ("alternate".equals(codeString))
075          return ALTERNATE;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown SpecimenContainedPreference code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case PREFERRED: return "preferred";
084            case ALTERNATE: return "alternate";
085            case NULL: return null;
086            default: return "?";
087          }
088        }
089        public String getSystem() {
090          switch (this) {
091            case PREFERRED: return "http://hl7.org/fhir/specimen-contained-preference";
092            case ALTERNATE: return "http://hl7.org/fhir/specimen-contained-preference";
093            case NULL: return null;
094            default: return "?";
095          }
096        }
097        public String getDefinition() {
098          switch (this) {
099            case PREFERRED: return "This type of contained specimen is preferred to collect this kind of specimen.";
100            case ALTERNATE: return "This type of conditioned specimen is an alternate.";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getDisplay() {
106          switch (this) {
107            case PREFERRED: return "Preferred";
108            case ALTERNATE: return "Alternate";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113    }
114
115  public static class SpecimenContainedPreferenceEnumFactory implements EnumFactory<SpecimenContainedPreference> {
116    public SpecimenContainedPreference fromCode(String codeString) throws IllegalArgumentException {
117      if (codeString == null || "".equals(codeString))
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("preferred".equals(codeString))
121          return SpecimenContainedPreference.PREFERRED;
122        if ("alternate".equals(codeString))
123          return SpecimenContainedPreference.ALTERNATE;
124        throw new IllegalArgumentException("Unknown SpecimenContainedPreference code '"+codeString+"'");
125        }
126        public Enumeration<SpecimenContainedPreference> fromType(PrimitiveType<?> code) throws FHIRException {
127          if (code == null)
128            return null;
129          if (code.isEmpty())
130            return new Enumeration<SpecimenContainedPreference>(this, SpecimenContainedPreference.NULL, code);
131          String codeString = ((PrimitiveType) code).asStringValue();
132          if (codeString == null || "".equals(codeString))
133            return new Enumeration<SpecimenContainedPreference>(this, SpecimenContainedPreference.NULL, code);
134        if ("preferred".equals(codeString))
135          return new Enumeration<SpecimenContainedPreference>(this, SpecimenContainedPreference.PREFERRED, code);
136        if ("alternate".equals(codeString))
137          return new Enumeration<SpecimenContainedPreference>(this, SpecimenContainedPreference.ALTERNATE, code);
138        throw new FHIRException("Unknown SpecimenContainedPreference code '"+codeString+"'");
139        }
140    public String toCode(SpecimenContainedPreference code) {
141      if (code == SpecimenContainedPreference.PREFERRED)
142        return "preferred";
143      if (code == SpecimenContainedPreference.ALTERNATE)
144        return "alternate";
145      return "?";
146      }
147    public String toSystem(SpecimenContainedPreference code) {
148      return code.getSystem();
149      }
150    }
151
152    @Block()
153    public static class SpecimenDefinitionTypeTestedComponent extends BackboneElement implements IBaseBackboneElement {
154        /**
155         * Primary of secondary specimen.
156         */
157        @Child(name = "isDerived", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false)
158        @Description(shortDefinition="Primary or secondary specimen", formalDefinition="Primary of secondary specimen." )
159        protected BooleanType isDerived;
160
161        /**
162         * The kind of specimen conditioned for testing expected by lab.
163         */
164        @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
165        @Description(shortDefinition="Type of intended specimen", formalDefinition="The kind of specimen conditioned for testing expected by lab." )
166        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0487")
167        protected CodeableConcept type;
168
169        /**
170         * The preference for this type of conditioned specimen.
171         */
172        @Child(name = "preference", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false)
173        @Description(shortDefinition="preferred | alternate", formalDefinition="The preference for this type of conditioned specimen." )
174        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-contained-preference")
175        protected Enumeration<SpecimenContainedPreference> preference;
176
177        /**
178         * The specimen's container.
179         */
180        @Child(name = "container", type = {}, order=4, min=0, max=1, modifier=false, summary=false)
181        @Description(shortDefinition="The specimen's container", formalDefinition="The specimen's container." )
182        protected SpecimenDefinitionTypeTestedContainerComponent container;
183
184        /**
185         * Requirements for delivery and special handling of this kind of conditioned specimen.
186         */
187        @Child(name = "requirement", type = {MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=false)
188        @Description(shortDefinition="Requirements for specimen delivery and special handling", formalDefinition="Requirements for delivery and special handling of this kind of conditioned specimen." )
189        protected MarkdownType requirement;
190
191        /**
192         * The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.
193         */
194        @Child(name = "retentionTime", type = {Duration.class}, order=6, min=0, max=1, modifier=false, summary=false)
195        @Description(shortDefinition="The usual time for retaining this kind of specimen", formalDefinition="The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing." )
196        protected Duration retentionTime;
197
198        /**
199         * Specimen can be used by only one test or panel if the value is "true".
200         */
201        @Child(name = "singleUse", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false)
202        @Description(shortDefinition="Specimen for single use only", formalDefinition="Specimen can be used by only one test or panel if the value is \"true\"." )
203        protected BooleanType singleUse;
204
205        /**
206         * Criterion for rejection of the specimen in its container by the laboratory.
207         */
208        @Child(name = "rejectionCriterion", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
209        @Description(shortDefinition="Criterion specified for specimen rejection", formalDefinition="Criterion for rejection of the specimen in its container by the laboratory." )
210        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/rejection-criteria")
211        protected List<CodeableConcept> rejectionCriterion;
212
213        /**
214         * Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.
215         */
216        @Child(name = "handling", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
217        @Description(shortDefinition="Specimen handling before testing", formalDefinition="Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process." )
218        protected List<SpecimenDefinitionTypeTestedHandlingComponent> handling;
219
220        /**
221         * Where the specimen will be tested: e.g., lab, sector, device or any combination of these.
222         */
223        @Child(name = "testingDestination", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
224        @Description(shortDefinition="Where the specimen will be tested", formalDefinition="Where the specimen will be tested: e.g., lab, sector, device or any combination of these." )
225        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/diagnostic-service-sections")
226        protected List<CodeableConcept> testingDestination;
227
228        private static final long serialVersionUID = -609761988L;
229
230    /**
231     * Constructor
232     */
233      public SpecimenDefinitionTypeTestedComponent() {
234        super();
235      }
236
237    /**
238     * Constructor
239     */
240      public SpecimenDefinitionTypeTestedComponent(SpecimenContainedPreference preference) {
241        super();
242        this.setPreference(preference);
243      }
244
245        /**
246         * @return {@link #isDerived} (Primary of secondary specimen.). This is the underlying object with id, value and extensions. The accessor "getIsDerived" gives direct access to the value
247         */
248        public BooleanType getIsDerivedElement() { 
249          if (this.isDerived == null)
250            if (Configuration.errorOnAutoCreate())
251              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedComponent.isDerived");
252            else if (Configuration.doAutoCreate())
253              this.isDerived = new BooleanType(); // bb
254          return this.isDerived;
255        }
256
257        public boolean hasIsDerivedElement() { 
258          return this.isDerived != null && !this.isDerived.isEmpty();
259        }
260
261        public boolean hasIsDerived() { 
262          return this.isDerived != null && !this.isDerived.isEmpty();
263        }
264
265        /**
266         * @param value {@link #isDerived} (Primary of secondary specimen.). This is the underlying object with id, value and extensions. The accessor "getIsDerived" gives direct access to the value
267         */
268        public SpecimenDefinitionTypeTestedComponent setIsDerivedElement(BooleanType value) { 
269          this.isDerived = value;
270          return this;
271        }
272
273        /**
274         * @return Primary of secondary specimen.
275         */
276        public boolean getIsDerived() { 
277          return this.isDerived == null || this.isDerived.isEmpty() ? false : this.isDerived.getValue();
278        }
279
280        /**
281         * @param value Primary of secondary specimen.
282         */
283        public SpecimenDefinitionTypeTestedComponent setIsDerived(boolean value) { 
284            if (this.isDerived == null)
285              this.isDerived = new BooleanType();
286            this.isDerived.setValue(value);
287          return this;
288        }
289
290        /**
291         * @return {@link #type} (The kind of specimen conditioned for testing expected by lab.)
292         */
293        public CodeableConcept getType() { 
294          if (this.type == null)
295            if (Configuration.errorOnAutoCreate())
296              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedComponent.type");
297            else if (Configuration.doAutoCreate())
298              this.type = new CodeableConcept(); // cc
299          return this.type;
300        }
301
302        public boolean hasType() { 
303          return this.type != null && !this.type.isEmpty();
304        }
305
306        /**
307         * @param value {@link #type} (The kind of specimen conditioned for testing expected by lab.)
308         */
309        public SpecimenDefinitionTypeTestedComponent setType(CodeableConcept value) { 
310          this.type = value;
311          return this;
312        }
313
314        /**
315         * @return {@link #preference} (The preference for this type of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getPreference" gives direct access to the value
316         */
317        public Enumeration<SpecimenContainedPreference> getPreferenceElement() { 
318          if (this.preference == null)
319            if (Configuration.errorOnAutoCreate())
320              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedComponent.preference");
321            else if (Configuration.doAutoCreate())
322              this.preference = new Enumeration<SpecimenContainedPreference>(new SpecimenContainedPreferenceEnumFactory()); // bb
323          return this.preference;
324        }
325
326        public boolean hasPreferenceElement() { 
327          return this.preference != null && !this.preference.isEmpty();
328        }
329
330        public boolean hasPreference() { 
331          return this.preference != null && !this.preference.isEmpty();
332        }
333
334        /**
335         * @param value {@link #preference} (The preference for this type of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getPreference" gives direct access to the value
336         */
337        public SpecimenDefinitionTypeTestedComponent setPreferenceElement(Enumeration<SpecimenContainedPreference> value) { 
338          this.preference = value;
339          return this;
340        }
341
342        /**
343         * @return The preference for this type of conditioned specimen.
344         */
345        public SpecimenContainedPreference getPreference() { 
346          return this.preference == null ? null : this.preference.getValue();
347        }
348
349        /**
350         * @param value The preference for this type of conditioned specimen.
351         */
352        public SpecimenDefinitionTypeTestedComponent setPreference(SpecimenContainedPreference value) { 
353            if (this.preference == null)
354              this.preference = new Enumeration<SpecimenContainedPreference>(new SpecimenContainedPreferenceEnumFactory());
355            this.preference.setValue(value);
356          return this;
357        }
358
359        /**
360         * @return {@link #container} (The specimen's container.)
361         */
362        public SpecimenDefinitionTypeTestedContainerComponent getContainer() { 
363          if (this.container == null)
364            if (Configuration.errorOnAutoCreate())
365              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedComponent.container");
366            else if (Configuration.doAutoCreate())
367              this.container = new SpecimenDefinitionTypeTestedContainerComponent(); // cc
368          return this.container;
369        }
370
371        public boolean hasContainer() { 
372          return this.container != null && !this.container.isEmpty();
373        }
374
375        /**
376         * @param value {@link #container} (The specimen's container.)
377         */
378        public SpecimenDefinitionTypeTestedComponent setContainer(SpecimenDefinitionTypeTestedContainerComponent value) { 
379          this.container = value;
380          return this;
381        }
382
383        /**
384         * @return {@link #requirement} (Requirements for delivery and special handling of this kind of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getRequirement" gives direct access to the value
385         */
386        public MarkdownType getRequirementElement() { 
387          if (this.requirement == null)
388            if (Configuration.errorOnAutoCreate())
389              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedComponent.requirement");
390            else if (Configuration.doAutoCreate())
391              this.requirement = new MarkdownType(); // bb
392          return this.requirement;
393        }
394
395        public boolean hasRequirementElement() { 
396          return this.requirement != null && !this.requirement.isEmpty();
397        }
398
399        public boolean hasRequirement() { 
400          return this.requirement != null && !this.requirement.isEmpty();
401        }
402
403        /**
404         * @param value {@link #requirement} (Requirements for delivery and special handling of this kind of conditioned specimen.). This is the underlying object with id, value and extensions. The accessor "getRequirement" gives direct access to the value
405         */
406        public SpecimenDefinitionTypeTestedComponent setRequirementElement(MarkdownType value) { 
407          this.requirement = value;
408          return this;
409        }
410
411        /**
412         * @return Requirements for delivery and special handling of this kind of conditioned specimen.
413         */
414        public String getRequirement() { 
415          return this.requirement == null ? null : this.requirement.getValue();
416        }
417
418        /**
419         * @param value Requirements for delivery and special handling of this kind of conditioned specimen.
420         */
421        public SpecimenDefinitionTypeTestedComponent setRequirement(String value) { 
422          if (Utilities.noString(value))
423            this.requirement = null;
424          else {
425            if (this.requirement == null)
426              this.requirement = new MarkdownType();
427            this.requirement.setValue(value);
428          }
429          return this;
430        }
431
432        /**
433         * @return {@link #retentionTime} (The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.)
434         */
435        public Duration getRetentionTime() { 
436          if (this.retentionTime == null)
437            if (Configuration.errorOnAutoCreate())
438              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedComponent.retentionTime");
439            else if (Configuration.doAutoCreate())
440              this.retentionTime = new Duration(); // cc
441          return this.retentionTime;
442        }
443
444        public boolean hasRetentionTime() { 
445          return this.retentionTime != null && !this.retentionTime.isEmpty();
446        }
447
448        /**
449         * @param value {@link #retentionTime} (The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.)
450         */
451        public SpecimenDefinitionTypeTestedComponent setRetentionTime(Duration value) { 
452          this.retentionTime = value;
453          return this;
454        }
455
456        /**
457         * @return {@link #singleUse} (Specimen can be used by only one test or panel if the value is "true".). This is the underlying object with id, value and extensions. The accessor "getSingleUse" gives direct access to the value
458         */
459        public BooleanType getSingleUseElement() { 
460          if (this.singleUse == null)
461            if (Configuration.errorOnAutoCreate())
462              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedComponent.singleUse");
463            else if (Configuration.doAutoCreate())
464              this.singleUse = new BooleanType(); // bb
465          return this.singleUse;
466        }
467
468        public boolean hasSingleUseElement() { 
469          return this.singleUse != null && !this.singleUse.isEmpty();
470        }
471
472        public boolean hasSingleUse() { 
473          return this.singleUse != null && !this.singleUse.isEmpty();
474        }
475
476        /**
477         * @param value {@link #singleUse} (Specimen can be used by only one test or panel if the value is "true".). This is the underlying object with id, value and extensions. The accessor "getSingleUse" gives direct access to the value
478         */
479        public SpecimenDefinitionTypeTestedComponent setSingleUseElement(BooleanType value) { 
480          this.singleUse = value;
481          return this;
482        }
483
484        /**
485         * @return Specimen can be used by only one test or panel if the value is "true".
486         */
487        public boolean getSingleUse() { 
488          return this.singleUse == null || this.singleUse.isEmpty() ? false : this.singleUse.getValue();
489        }
490
491        /**
492         * @param value Specimen can be used by only one test or panel if the value is "true".
493         */
494        public SpecimenDefinitionTypeTestedComponent setSingleUse(boolean value) { 
495            if (this.singleUse == null)
496              this.singleUse = new BooleanType();
497            this.singleUse.setValue(value);
498          return this;
499        }
500
501        /**
502         * @return {@link #rejectionCriterion} (Criterion for rejection of the specimen in its container by the laboratory.)
503         */
504        public List<CodeableConcept> getRejectionCriterion() { 
505          if (this.rejectionCriterion == null)
506            this.rejectionCriterion = new ArrayList<CodeableConcept>();
507          return this.rejectionCriterion;
508        }
509
510        /**
511         * @return Returns a reference to <code>this</code> for easy method chaining
512         */
513        public SpecimenDefinitionTypeTestedComponent setRejectionCriterion(List<CodeableConcept> theRejectionCriterion) { 
514          this.rejectionCriterion = theRejectionCriterion;
515          return this;
516        }
517
518        public boolean hasRejectionCriterion() { 
519          if (this.rejectionCriterion == null)
520            return false;
521          for (CodeableConcept item : this.rejectionCriterion)
522            if (!item.isEmpty())
523              return true;
524          return false;
525        }
526
527        public CodeableConcept addRejectionCriterion() { //3
528          CodeableConcept t = new CodeableConcept();
529          if (this.rejectionCriterion == null)
530            this.rejectionCriterion = new ArrayList<CodeableConcept>();
531          this.rejectionCriterion.add(t);
532          return t;
533        }
534
535        public SpecimenDefinitionTypeTestedComponent addRejectionCriterion(CodeableConcept t) { //3
536          if (t == null)
537            return this;
538          if (this.rejectionCriterion == null)
539            this.rejectionCriterion = new ArrayList<CodeableConcept>();
540          this.rejectionCriterion.add(t);
541          return this;
542        }
543
544        /**
545         * @return The first repetition of repeating field {@link #rejectionCriterion}, creating it if it does not already exist {3}
546         */
547        public CodeableConcept getRejectionCriterionFirstRep() { 
548          if (getRejectionCriterion().isEmpty()) {
549            addRejectionCriterion();
550          }
551          return getRejectionCriterion().get(0);
552        }
553
554        /**
555         * @return {@link #handling} (Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.)
556         */
557        public List<SpecimenDefinitionTypeTestedHandlingComponent> getHandling() { 
558          if (this.handling == null)
559            this.handling = new ArrayList<SpecimenDefinitionTypeTestedHandlingComponent>();
560          return this.handling;
561        }
562
563        /**
564         * @return Returns a reference to <code>this</code> for easy method chaining
565         */
566        public SpecimenDefinitionTypeTestedComponent setHandling(List<SpecimenDefinitionTypeTestedHandlingComponent> theHandling) { 
567          this.handling = theHandling;
568          return this;
569        }
570
571        public boolean hasHandling() { 
572          if (this.handling == null)
573            return false;
574          for (SpecimenDefinitionTypeTestedHandlingComponent item : this.handling)
575            if (!item.isEmpty())
576              return true;
577          return false;
578        }
579
580        public SpecimenDefinitionTypeTestedHandlingComponent addHandling() { //3
581          SpecimenDefinitionTypeTestedHandlingComponent t = new SpecimenDefinitionTypeTestedHandlingComponent();
582          if (this.handling == null)
583            this.handling = new ArrayList<SpecimenDefinitionTypeTestedHandlingComponent>();
584          this.handling.add(t);
585          return t;
586        }
587
588        public SpecimenDefinitionTypeTestedComponent addHandling(SpecimenDefinitionTypeTestedHandlingComponent t) { //3
589          if (t == null)
590            return this;
591          if (this.handling == null)
592            this.handling = new ArrayList<SpecimenDefinitionTypeTestedHandlingComponent>();
593          this.handling.add(t);
594          return this;
595        }
596
597        /**
598         * @return The first repetition of repeating field {@link #handling}, creating it if it does not already exist {3}
599         */
600        public SpecimenDefinitionTypeTestedHandlingComponent getHandlingFirstRep() { 
601          if (getHandling().isEmpty()) {
602            addHandling();
603          }
604          return getHandling().get(0);
605        }
606
607        /**
608         * @return {@link #testingDestination} (Where the specimen will be tested: e.g., lab, sector, device or any combination of these.)
609         */
610        public List<CodeableConcept> getTestingDestination() { 
611          if (this.testingDestination == null)
612            this.testingDestination = new ArrayList<CodeableConcept>();
613          return this.testingDestination;
614        }
615
616        /**
617         * @return Returns a reference to <code>this</code> for easy method chaining
618         */
619        public SpecimenDefinitionTypeTestedComponent setTestingDestination(List<CodeableConcept> theTestingDestination) { 
620          this.testingDestination = theTestingDestination;
621          return this;
622        }
623
624        public boolean hasTestingDestination() { 
625          if (this.testingDestination == null)
626            return false;
627          for (CodeableConcept item : this.testingDestination)
628            if (!item.isEmpty())
629              return true;
630          return false;
631        }
632
633        public CodeableConcept addTestingDestination() { //3
634          CodeableConcept t = new CodeableConcept();
635          if (this.testingDestination == null)
636            this.testingDestination = new ArrayList<CodeableConcept>();
637          this.testingDestination.add(t);
638          return t;
639        }
640
641        public SpecimenDefinitionTypeTestedComponent addTestingDestination(CodeableConcept t) { //3
642          if (t == null)
643            return this;
644          if (this.testingDestination == null)
645            this.testingDestination = new ArrayList<CodeableConcept>();
646          this.testingDestination.add(t);
647          return this;
648        }
649
650        /**
651         * @return The first repetition of repeating field {@link #testingDestination}, creating it if it does not already exist {3}
652         */
653        public CodeableConcept getTestingDestinationFirstRep() { 
654          if (getTestingDestination().isEmpty()) {
655            addTestingDestination();
656          }
657          return getTestingDestination().get(0);
658        }
659
660        protected void listChildren(List<Property> children) {
661          super.listChildren(children);
662          children.add(new Property("isDerived", "boolean", "Primary of secondary specimen.", 0, 1, isDerived));
663          children.add(new Property("type", "CodeableConcept", "The kind of specimen conditioned for testing expected by lab.", 0, 1, type));
664          children.add(new Property("preference", "code", "The preference for this type of conditioned specimen.", 0, 1, preference));
665          children.add(new Property("container", "", "The specimen's container.", 0, 1, container));
666          children.add(new Property("requirement", "markdown", "Requirements for delivery and special handling of this kind of conditioned specimen.", 0, 1, requirement));
667          children.add(new Property("retentionTime", "Duration", "The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.", 0, 1, retentionTime));
668          children.add(new Property("singleUse", "boolean", "Specimen can be used by only one test or panel if the value is \"true\".", 0, 1, singleUse));
669          children.add(new Property("rejectionCriterion", "CodeableConcept", "Criterion for rejection of the specimen in its container by the laboratory.", 0, java.lang.Integer.MAX_VALUE, rejectionCriterion));
670          children.add(new Property("handling", "", "Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.", 0, java.lang.Integer.MAX_VALUE, handling));
671          children.add(new Property("testingDestination", "CodeableConcept", "Where the specimen will be tested: e.g., lab, sector, device or any combination of these.", 0, java.lang.Integer.MAX_VALUE, testingDestination));
672        }
673
674        @Override
675        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
676          switch (_hash) {
677          case 976346515: /*isDerived*/  return new Property("isDerived", "boolean", "Primary of secondary specimen.", 0, 1, isDerived);
678          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The kind of specimen conditioned for testing expected by lab.", 0, 1, type);
679          case -1459831589: /*preference*/  return new Property("preference", "code", "The preference for this type of conditioned specimen.", 0, 1, preference);
680          case -410956671: /*container*/  return new Property("container", "", "The specimen's container.", 0, 1, container);
681          case 363387971: /*requirement*/  return new Property("requirement", "markdown", "Requirements for delivery and special handling of this kind of conditioned specimen.", 0, 1, requirement);
682          case 1434969867: /*retentionTime*/  return new Property("retentionTime", "Duration", "The usual time that a specimen of this kind is retained after the ordered tests are completed, for the purpose of additional testing.", 0, 1, retentionTime);
683          case -1494547425: /*singleUse*/  return new Property("singleUse", "boolean", "Specimen can be used by only one test or panel if the value is \"true\".", 0, 1, singleUse);
684          case -553706344: /*rejectionCriterion*/  return new Property("rejectionCriterion", "CodeableConcept", "Criterion for rejection of the specimen in its container by the laboratory.", 0, java.lang.Integer.MAX_VALUE, rejectionCriterion);
685          case 2072805: /*handling*/  return new Property("handling", "", "Set of instructions for preservation/transport of the specimen at a defined temperature interval, prior the testing process.", 0, java.lang.Integer.MAX_VALUE, handling);
686          case 939511774: /*testingDestination*/  return new Property("testingDestination", "CodeableConcept", "Where the specimen will be tested: e.g., lab, sector, device or any combination of these.", 0, java.lang.Integer.MAX_VALUE, testingDestination);
687          default: return super.getNamedProperty(_hash, _name, _checkValid);
688          }
689
690        }
691
692      @Override
693      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
694        switch (hash) {
695        case 976346515: /*isDerived*/ return this.isDerived == null ? new Base[0] : new Base[] {this.isDerived}; // BooleanType
696        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
697        case -1459831589: /*preference*/ return this.preference == null ? new Base[0] : new Base[] {this.preference}; // Enumeration<SpecimenContainedPreference>
698        case -410956671: /*container*/ return this.container == null ? new Base[0] : new Base[] {this.container}; // SpecimenDefinitionTypeTestedContainerComponent
699        case 363387971: /*requirement*/ return this.requirement == null ? new Base[0] : new Base[] {this.requirement}; // MarkdownType
700        case 1434969867: /*retentionTime*/ return this.retentionTime == null ? new Base[0] : new Base[] {this.retentionTime}; // Duration
701        case -1494547425: /*singleUse*/ return this.singleUse == null ? new Base[0] : new Base[] {this.singleUse}; // BooleanType
702        case -553706344: /*rejectionCriterion*/ return this.rejectionCriterion == null ? new Base[0] : this.rejectionCriterion.toArray(new Base[this.rejectionCriterion.size()]); // CodeableConcept
703        case 2072805: /*handling*/ return this.handling == null ? new Base[0] : this.handling.toArray(new Base[this.handling.size()]); // SpecimenDefinitionTypeTestedHandlingComponent
704        case 939511774: /*testingDestination*/ return this.testingDestination == null ? new Base[0] : this.testingDestination.toArray(new Base[this.testingDestination.size()]); // CodeableConcept
705        default: return super.getProperty(hash, name, checkValid);
706        }
707
708      }
709
710      @Override
711      public Base setProperty(int hash, String name, Base value) throws FHIRException {
712        switch (hash) {
713        case 976346515: // isDerived
714          this.isDerived = TypeConvertor.castToBoolean(value); // BooleanType
715          return value;
716        case 3575610: // type
717          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
718          return value;
719        case -1459831589: // preference
720          value = new SpecimenContainedPreferenceEnumFactory().fromType(TypeConvertor.castToCode(value));
721          this.preference = (Enumeration) value; // Enumeration<SpecimenContainedPreference>
722          return value;
723        case -410956671: // container
724          this.container = (SpecimenDefinitionTypeTestedContainerComponent) value; // SpecimenDefinitionTypeTestedContainerComponent
725          return value;
726        case 363387971: // requirement
727          this.requirement = TypeConvertor.castToMarkdown(value); // MarkdownType
728          return value;
729        case 1434969867: // retentionTime
730          this.retentionTime = TypeConvertor.castToDuration(value); // Duration
731          return value;
732        case -1494547425: // singleUse
733          this.singleUse = TypeConvertor.castToBoolean(value); // BooleanType
734          return value;
735        case -553706344: // rejectionCriterion
736          this.getRejectionCriterion().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
737          return value;
738        case 2072805: // handling
739          this.getHandling().add((SpecimenDefinitionTypeTestedHandlingComponent) value); // SpecimenDefinitionTypeTestedHandlingComponent
740          return value;
741        case 939511774: // testingDestination
742          this.getTestingDestination().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
743          return value;
744        default: return super.setProperty(hash, name, value);
745        }
746
747      }
748
749      @Override
750      public Base setProperty(String name, Base value) throws FHIRException {
751        if (name.equals("isDerived")) {
752          this.isDerived = TypeConvertor.castToBoolean(value); // BooleanType
753        } else if (name.equals("type")) {
754          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
755        } else if (name.equals("preference")) {
756          value = new SpecimenContainedPreferenceEnumFactory().fromType(TypeConvertor.castToCode(value));
757          this.preference = (Enumeration) value; // Enumeration<SpecimenContainedPreference>
758        } else if (name.equals("container")) {
759          this.container = (SpecimenDefinitionTypeTestedContainerComponent) value; // SpecimenDefinitionTypeTestedContainerComponent
760        } else if (name.equals("requirement")) {
761          this.requirement = TypeConvertor.castToMarkdown(value); // MarkdownType
762        } else if (name.equals("retentionTime")) {
763          this.retentionTime = TypeConvertor.castToDuration(value); // Duration
764        } else if (name.equals("singleUse")) {
765          this.singleUse = TypeConvertor.castToBoolean(value); // BooleanType
766        } else if (name.equals("rejectionCriterion")) {
767          this.getRejectionCriterion().add(TypeConvertor.castToCodeableConcept(value));
768        } else if (name.equals("handling")) {
769          this.getHandling().add((SpecimenDefinitionTypeTestedHandlingComponent) value);
770        } else if (name.equals("testingDestination")) {
771          this.getTestingDestination().add(TypeConvertor.castToCodeableConcept(value));
772        } else
773          return super.setProperty(name, value);
774        return value;
775      }
776
777  @Override
778  public void removeChild(String name, Base value) throws FHIRException {
779        if (name.equals("isDerived")) {
780          this.isDerived = null;
781        } else if (name.equals("type")) {
782          this.type = null;
783        } else if (name.equals("preference")) {
784          value = new SpecimenContainedPreferenceEnumFactory().fromType(TypeConvertor.castToCode(value));
785          this.preference = (Enumeration) value; // Enumeration<SpecimenContainedPreference>
786        } else if (name.equals("container")) {
787          this.container = (SpecimenDefinitionTypeTestedContainerComponent) value; // SpecimenDefinitionTypeTestedContainerComponent
788        } else if (name.equals("requirement")) {
789          this.requirement = null;
790        } else if (name.equals("retentionTime")) {
791          this.retentionTime = null;
792        } else if (name.equals("singleUse")) {
793          this.singleUse = null;
794        } else if (name.equals("rejectionCriterion")) {
795          this.getRejectionCriterion().remove(value);
796        } else if (name.equals("handling")) {
797          this.getHandling().remove((SpecimenDefinitionTypeTestedHandlingComponent) value);
798        } else if (name.equals("testingDestination")) {
799          this.getTestingDestination().remove(value);
800        } else
801          super.removeChild(name, value);
802        
803      }
804
805      @Override
806      public Base makeProperty(int hash, String name) throws FHIRException {
807        switch (hash) {
808        case 976346515:  return getIsDerivedElement();
809        case 3575610:  return getType();
810        case -1459831589:  return getPreferenceElement();
811        case -410956671:  return getContainer();
812        case 363387971:  return getRequirementElement();
813        case 1434969867:  return getRetentionTime();
814        case -1494547425:  return getSingleUseElement();
815        case -553706344:  return addRejectionCriterion(); 
816        case 2072805:  return addHandling(); 
817        case 939511774:  return addTestingDestination(); 
818        default: return super.makeProperty(hash, name);
819        }
820
821      }
822
823      @Override
824      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
825        switch (hash) {
826        case 976346515: /*isDerived*/ return new String[] {"boolean"};
827        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
828        case -1459831589: /*preference*/ return new String[] {"code"};
829        case -410956671: /*container*/ return new String[] {};
830        case 363387971: /*requirement*/ return new String[] {"markdown"};
831        case 1434969867: /*retentionTime*/ return new String[] {"Duration"};
832        case -1494547425: /*singleUse*/ return new String[] {"boolean"};
833        case -553706344: /*rejectionCriterion*/ return new String[] {"CodeableConcept"};
834        case 2072805: /*handling*/ return new String[] {};
835        case 939511774: /*testingDestination*/ return new String[] {"CodeableConcept"};
836        default: return super.getTypesForProperty(hash, name);
837        }
838
839      }
840
841      @Override
842      public Base addChild(String name) throws FHIRException {
843        if (name.equals("isDerived")) {
844          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.isDerived");
845        }
846        else if (name.equals("type")) {
847          this.type = new CodeableConcept();
848          return this.type;
849        }
850        else if (name.equals("preference")) {
851          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.preference");
852        }
853        else if (name.equals("container")) {
854          this.container = new SpecimenDefinitionTypeTestedContainerComponent();
855          return this.container;
856        }
857        else if (name.equals("requirement")) {
858          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.requirement");
859        }
860        else if (name.equals("retentionTime")) {
861          this.retentionTime = new Duration();
862          return this.retentionTime;
863        }
864        else if (name.equals("singleUse")) {
865          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.singleUse");
866        }
867        else if (name.equals("rejectionCriterion")) {
868          return addRejectionCriterion();
869        }
870        else if (name.equals("handling")) {
871          return addHandling();
872        }
873        else if (name.equals("testingDestination")) {
874          return addTestingDestination();
875        }
876        else
877          return super.addChild(name);
878      }
879
880      public SpecimenDefinitionTypeTestedComponent copy() {
881        SpecimenDefinitionTypeTestedComponent dst = new SpecimenDefinitionTypeTestedComponent();
882        copyValues(dst);
883        return dst;
884      }
885
886      public void copyValues(SpecimenDefinitionTypeTestedComponent dst) {
887        super.copyValues(dst);
888        dst.isDerived = isDerived == null ? null : isDerived.copy();
889        dst.type = type == null ? null : type.copy();
890        dst.preference = preference == null ? null : preference.copy();
891        dst.container = container == null ? null : container.copy();
892        dst.requirement = requirement == null ? null : requirement.copy();
893        dst.retentionTime = retentionTime == null ? null : retentionTime.copy();
894        dst.singleUse = singleUse == null ? null : singleUse.copy();
895        if (rejectionCriterion != null) {
896          dst.rejectionCriterion = new ArrayList<CodeableConcept>();
897          for (CodeableConcept i : rejectionCriterion)
898            dst.rejectionCriterion.add(i.copy());
899        };
900        if (handling != null) {
901          dst.handling = new ArrayList<SpecimenDefinitionTypeTestedHandlingComponent>();
902          for (SpecimenDefinitionTypeTestedHandlingComponent i : handling)
903            dst.handling.add(i.copy());
904        };
905        if (testingDestination != null) {
906          dst.testingDestination = new ArrayList<CodeableConcept>();
907          for (CodeableConcept i : testingDestination)
908            dst.testingDestination.add(i.copy());
909        };
910      }
911
912      @Override
913      public boolean equalsDeep(Base other_) {
914        if (!super.equalsDeep(other_))
915          return false;
916        if (!(other_ instanceof SpecimenDefinitionTypeTestedComponent))
917          return false;
918        SpecimenDefinitionTypeTestedComponent o = (SpecimenDefinitionTypeTestedComponent) other_;
919        return compareDeep(isDerived, o.isDerived, true) && compareDeep(type, o.type, true) && compareDeep(preference, o.preference, true)
920           && compareDeep(container, o.container, true) && compareDeep(requirement, o.requirement, true) && compareDeep(retentionTime, o.retentionTime, true)
921           && compareDeep(singleUse, o.singleUse, true) && compareDeep(rejectionCriterion, o.rejectionCriterion, true)
922           && compareDeep(handling, o.handling, true) && compareDeep(testingDestination, o.testingDestination, true)
923          ;
924      }
925
926      @Override
927      public boolean equalsShallow(Base other_) {
928        if (!super.equalsShallow(other_))
929          return false;
930        if (!(other_ instanceof SpecimenDefinitionTypeTestedComponent))
931          return false;
932        SpecimenDefinitionTypeTestedComponent o = (SpecimenDefinitionTypeTestedComponent) other_;
933        return compareValues(isDerived, o.isDerived, true) && compareValues(preference, o.preference, true)
934           && compareValues(requirement, o.requirement, true) && compareValues(singleUse, o.singleUse, true);
935      }
936
937      public boolean isEmpty() {
938        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(isDerived, type, preference
939          , container, requirement, retentionTime, singleUse, rejectionCriterion, handling
940          , testingDestination);
941      }
942
943  public String fhirType() {
944    return "SpecimenDefinition.typeTested";
945
946  }
947
948  }
949
950    @Block()
951    public static class SpecimenDefinitionTypeTestedContainerComponent extends BackboneElement implements IBaseBackboneElement {
952        /**
953         * The type of material of the container.
954         */
955        @Child(name = "material", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
956        @Description(shortDefinition="The material type used for the container", formalDefinition="The type of material of the container." )
957        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/container-material")
958        protected CodeableConcept material;
959
960        /**
961         * The type of container used to contain this kind of specimen.
962         */
963        @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
964        @Description(shortDefinition="Kind of container associated with the kind of specimen", formalDefinition="The type of container used to contain this kind of specimen." )
965        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-container-type")
966        protected CodeableConcept type;
967
968        /**
969         * Color of container cap.
970         */
971        @Child(name = "cap", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
972        @Description(shortDefinition="Color of container cap", formalDefinition="Color of container cap." )
973        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/container-cap")
974        protected CodeableConcept cap;
975
976        /**
977         * The textual description of the kind of container.
978         */
979        @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
980        @Description(shortDefinition="The description of the kind of container", formalDefinition="The textual description of the kind of container." )
981        protected MarkdownType description;
982
983        /**
984         * The capacity (volume or other measure) of this kind of container.
985         */
986        @Child(name = "capacity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false)
987        @Description(shortDefinition="The capacity of this kind of container", formalDefinition="The capacity (volume or other measure) of this kind of container." )
988        protected Quantity capacity;
989
990        /**
991         * The minimum volume to be conditioned in the container.
992         */
993        @Child(name = "minimumVolume", type = {Quantity.class, StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
994        @Description(shortDefinition="Minimum volume", formalDefinition="The minimum volume to be conditioned in the container." )
995        protected DataType minimumVolume;
996
997        /**
998         * Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.
999         */
1000        @Child(name = "additive", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1001        @Description(shortDefinition="Additive associated with container", formalDefinition="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA." )
1002        protected List<SpecimenDefinitionTypeTestedContainerAdditiveComponent> additive;
1003
1004        /**
1005         * Special processing that should be applied to the container for this kind of specimen.
1006         */
1007        @Child(name = "preparation", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=false)
1008        @Description(shortDefinition="Special processing applied to the container for this specimen type", formalDefinition="Special processing that should be applied to the container for this kind of specimen." )
1009        protected MarkdownType preparation;
1010
1011        private static final long serialVersionUID = -932984420L;
1012
1013    /**
1014     * Constructor
1015     */
1016      public SpecimenDefinitionTypeTestedContainerComponent() {
1017        super();
1018      }
1019
1020        /**
1021         * @return {@link #material} (The type of material of the container.)
1022         */
1023        public CodeableConcept getMaterial() { 
1024          if (this.material == null)
1025            if (Configuration.errorOnAutoCreate())
1026              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.material");
1027            else if (Configuration.doAutoCreate())
1028              this.material = new CodeableConcept(); // cc
1029          return this.material;
1030        }
1031
1032        public boolean hasMaterial() { 
1033          return this.material != null && !this.material.isEmpty();
1034        }
1035
1036        /**
1037         * @param value {@link #material} (The type of material of the container.)
1038         */
1039        public SpecimenDefinitionTypeTestedContainerComponent setMaterial(CodeableConcept value) { 
1040          this.material = value;
1041          return this;
1042        }
1043
1044        /**
1045         * @return {@link #type} (The type of container used to contain this kind of specimen.)
1046         */
1047        public CodeableConcept getType() { 
1048          if (this.type == null)
1049            if (Configuration.errorOnAutoCreate())
1050              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.type");
1051            else if (Configuration.doAutoCreate())
1052              this.type = new CodeableConcept(); // cc
1053          return this.type;
1054        }
1055
1056        public boolean hasType() { 
1057          return this.type != null && !this.type.isEmpty();
1058        }
1059
1060        /**
1061         * @param value {@link #type} (The type of container used to contain this kind of specimen.)
1062         */
1063        public SpecimenDefinitionTypeTestedContainerComponent setType(CodeableConcept value) { 
1064          this.type = value;
1065          return this;
1066        }
1067
1068        /**
1069         * @return {@link #cap} (Color of container cap.)
1070         */
1071        public CodeableConcept getCap() { 
1072          if (this.cap == null)
1073            if (Configuration.errorOnAutoCreate())
1074              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.cap");
1075            else if (Configuration.doAutoCreate())
1076              this.cap = new CodeableConcept(); // cc
1077          return this.cap;
1078        }
1079
1080        public boolean hasCap() { 
1081          return this.cap != null && !this.cap.isEmpty();
1082        }
1083
1084        /**
1085         * @param value {@link #cap} (Color of container cap.)
1086         */
1087        public SpecimenDefinitionTypeTestedContainerComponent setCap(CodeableConcept value) { 
1088          this.cap = value;
1089          return this;
1090        }
1091
1092        /**
1093         * @return {@link #description} (The textual description of the kind of container.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1094         */
1095        public MarkdownType getDescriptionElement() { 
1096          if (this.description == null)
1097            if (Configuration.errorOnAutoCreate())
1098              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.description");
1099            else if (Configuration.doAutoCreate())
1100              this.description = new MarkdownType(); // bb
1101          return this.description;
1102        }
1103
1104        public boolean hasDescriptionElement() { 
1105          return this.description != null && !this.description.isEmpty();
1106        }
1107
1108        public boolean hasDescription() { 
1109          return this.description != null && !this.description.isEmpty();
1110        }
1111
1112        /**
1113         * @param value {@link #description} (The textual description of the kind of container.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1114         */
1115        public SpecimenDefinitionTypeTestedContainerComponent setDescriptionElement(MarkdownType value) { 
1116          this.description = value;
1117          return this;
1118        }
1119
1120        /**
1121         * @return The textual description of the kind of container.
1122         */
1123        public String getDescription() { 
1124          return this.description == null ? null : this.description.getValue();
1125        }
1126
1127        /**
1128         * @param value The textual description of the kind of container.
1129         */
1130        public SpecimenDefinitionTypeTestedContainerComponent setDescription(String value) { 
1131          if (Utilities.noString(value))
1132            this.description = null;
1133          else {
1134            if (this.description == null)
1135              this.description = new MarkdownType();
1136            this.description.setValue(value);
1137          }
1138          return this;
1139        }
1140
1141        /**
1142         * @return {@link #capacity} (The capacity (volume or other measure) of this kind of container.)
1143         */
1144        public Quantity getCapacity() { 
1145          if (this.capacity == null)
1146            if (Configuration.errorOnAutoCreate())
1147              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.capacity");
1148            else if (Configuration.doAutoCreate())
1149              this.capacity = new Quantity(); // cc
1150          return this.capacity;
1151        }
1152
1153        public boolean hasCapacity() { 
1154          return this.capacity != null && !this.capacity.isEmpty();
1155        }
1156
1157        /**
1158         * @param value {@link #capacity} (The capacity (volume or other measure) of this kind of container.)
1159         */
1160        public SpecimenDefinitionTypeTestedContainerComponent setCapacity(Quantity value) { 
1161          this.capacity = value;
1162          return this;
1163        }
1164
1165        /**
1166         * @return {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1167         */
1168        public DataType getMinimumVolume() { 
1169          return this.minimumVolume;
1170        }
1171
1172        /**
1173         * @return {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1174         */
1175        public Quantity getMinimumVolumeQuantity() throws FHIRException { 
1176          if (this.minimumVolume == null)
1177            this.minimumVolume = new Quantity();
1178          if (!(this.minimumVolume instanceof Quantity))
1179            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.minimumVolume.getClass().getName()+" was encountered");
1180          return (Quantity) this.minimumVolume;
1181        }
1182
1183        public boolean hasMinimumVolumeQuantity() { 
1184          return this != null && this.minimumVolume instanceof Quantity;
1185        }
1186
1187        /**
1188         * @return {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1189         */
1190        public StringType getMinimumVolumeStringType() throws FHIRException { 
1191          if (this.minimumVolume == null)
1192            this.minimumVolume = new StringType();
1193          if (!(this.minimumVolume instanceof StringType))
1194            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.minimumVolume.getClass().getName()+" was encountered");
1195          return (StringType) this.minimumVolume;
1196        }
1197
1198        public boolean hasMinimumVolumeStringType() { 
1199          return this != null && this.minimumVolume instanceof StringType;
1200        }
1201
1202        public boolean hasMinimumVolume() { 
1203          return this.minimumVolume != null && !this.minimumVolume.isEmpty();
1204        }
1205
1206        /**
1207         * @param value {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1208         */
1209        public SpecimenDefinitionTypeTestedContainerComponent setMinimumVolume(DataType value) { 
1210          if (value != null && !(value instanceof Quantity || value instanceof StringType))
1211            throw new FHIRException("Not the right type for SpecimenDefinition.typeTested.container.minimumVolume[x]: "+value.fhirType());
1212          this.minimumVolume = value;
1213          return this;
1214        }
1215
1216        /**
1217         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1218         */
1219        public List<SpecimenDefinitionTypeTestedContainerAdditiveComponent> getAdditive() { 
1220          if (this.additive == null)
1221            this.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1222          return this.additive;
1223        }
1224
1225        /**
1226         * @return Returns a reference to <code>this</code> for easy method chaining
1227         */
1228        public SpecimenDefinitionTypeTestedContainerComponent setAdditive(List<SpecimenDefinitionTypeTestedContainerAdditiveComponent> theAdditive) { 
1229          this.additive = theAdditive;
1230          return this;
1231        }
1232
1233        public boolean hasAdditive() { 
1234          if (this.additive == null)
1235            return false;
1236          for (SpecimenDefinitionTypeTestedContainerAdditiveComponent item : this.additive)
1237            if (!item.isEmpty())
1238              return true;
1239          return false;
1240        }
1241
1242        public SpecimenDefinitionTypeTestedContainerAdditiveComponent addAdditive() { //3
1243          SpecimenDefinitionTypeTestedContainerAdditiveComponent t = new SpecimenDefinitionTypeTestedContainerAdditiveComponent();
1244          if (this.additive == null)
1245            this.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1246          this.additive.add(t);
1247          return t;
1248        }
1249
1250        public SpecimenDefinitionTypeTestedContainerComponent addAdditive(SpecimenDefinitionTypeTestedContainerAdditiveComponent t) { //3
1251          if (t == null)
1252            return this;
1253          if (this.additive == null)
1254            this.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1255          this.additive.add(t);
1256          return this;
1257        }
1258
1259        /**
1260         * @return The first repetition of repeating field {@link #additive}, creating it if it does not already exist {3}
1261         */
1262        public SpecimenDefinitionTypeTestedContainerAdditiveComponent getAdditiveFirstRep() { 
1263          if (getAdditive().isEmpty()) {
1264            addAdditive();
1265          }
1266          return getAdditive().get(0);
1267        }
1268
1269        /**
1270         * @return {@link #preparation} (Special processing that should be applied to the container for this kind of specimen.). This is the underlying object with id, value and extensions. The accessor "getPreparation" gives direct access to the value
1271         */
1272        public MarkdownType getPreparationElement() { 
1273          if (this.preparation == null)
1274            if (Configuration.errorOnAutoCreate())
1275              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.preparation");
1276            else if (Configuration.doAutoCreate())
1277              this.preparation = new MarkdownType(); // bb
1278          return this.preparation;
1279        }
1280
1281        public boolean hasPreparationElement() { 
1282          return this.preparation != null && !this.preparation.isEmpty();
1283        }
1284
1285        public boolean hasPreparation() { 
1286          return this.preparation != null && !this.preparation.isEmpty();
1287        }
1288
1289        /**
1290         * @param value {@link #preparation} (Special processing that should be applied to the container for this kind of specimen.). This is the underlying object with id, value and extensions. The accessor "getPreparation" gives direct access to the value
1291         */
1292        public SpecimenDefinitionTypeTestedContainerComponent setPreparationElement(MarkdownType value) { 
1293          this.preparation = value;
1294          return this;
1295        }
1296
1297        /**
1298         * @return Special processing that should be applied to the container for this kind of specimen.
1299         */
1300        public String getPreparation() { 
1301          return this.preparation == null ? null : this.preparation.getValue();
1302        }
1303
1304        /**
1305         * @param value Special processing that should be applied to the container for this kind of specimen.
1306         */
1307        public SpecimenDefinitionTypeTestedContainerComponent setPreparation(String value) { 
1308          if (Utilities.noString(value))
1309            this.preparation = null;
1310          else {
1311            if (this.preparation == null)
1312              this.preparation = new MarkdownType();
1313            this.preparation.setValue(value);
1314          }
1315          return this;
1316        }
1317
1318        protected void listChildren(List<Property> children) {
1319          super.listChildren(children);
1320          children.add(new Property("material", "CodeableConcept", "The type of material of the container.", 0, 1, material));
1321          children.add(new Property("type", "CodeableConcept", "The type of container used to contain this kind of specimen.", 0, 1, type));
1322          children.add(new Property("cap", "CodeableConcept", "Color of container cap.", 0, 1, cap));
1323          children.add(new Property("description", "markdown", "The textual description of the kind of container.", 0, 1, description));
1324          children.add(new Property("capacity", "Quantity", "The capacity (volume or other measure) of this kind of container.", 0, 1, capacity));
1325          children.add(new Property("minimumVolume[x]", "Quantity|string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume));
1326          children.add(new Property("additive", "", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, java.lang.Integer.MAX_VALUE, additive));
1327          children.add(new Property("preparation", "markdown", "Special processing that should be applied to the container for this kind of specimen.", 0, 1, preparation));
1328        }
1329
1330        @Override
1331        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1332          switch (_hash) {
1333          case 299066663: /*material*/  return new Property("material", "CodeableConcept", "The type of material of the container.", 0, 1, material);
1334          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The type of container used to contain this kind of specimen.", 0, 1, type);
1335          case 98258: /*cap*/  return new Property("cap", "CodeableConcept", "Color of container cap.", 0, 1, cap);
1336          case -1724546052: /*description*/  return new Property("description", "markdown", "The textual description of the kind of container.", 0, 1, description);
1337          case -67824454: /*capacity*/  return new Property("capacity", "Quantity", "The capacity (volume or other measure) of this kind of container.", 0, 1, capacity);
1338          case 371830456: /*minimumVolume[x]*/  return new Property("minimumVolume[x]", "Quantity|string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1339          case -1674665784: /*minimumVolume*/  return new Property("minimumVolume[x]", "Quantity|string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1340          case -532143757: /*minimumVolumeQuantity*/  return new Property("minimumVolume[x]", "Quantity", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1341          case 248461049: /*minimumVolumeString*/  return new Property("minimumVolume[x]", "string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1342          case -1226589236: /*additive*/  return new Property("additive", "", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, java.lang.Integer.MAX_VALUE, additive);
1343          case -1315428713: /*preparation*/  return new Property("preparation", "markdown", "Special processing that should be applied to the container for this kind of specimen.", 0, 1, preparation);
1344          default: return super.getNamedProperty(_hash, _name, _checkValid);
1345          }
1346
1347        }
1348
1349      @Override
1350      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1351        switch (hash) {
1352        case 299066663: /*material*/ return this.material == null ? new Base[0] : new Base[] {this.material}; // CodeableConcept
1353        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1354        case 98258: /*cap*/ return this.cap == null ? new Base[0] : new Base[] {this.cap}; // CodeableConcept
1355        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1356        case -67824454: /*capacity*/ return this.capacity == null ? new Base[0] : new Base[] {this.capacity}; // Quantity
1357        case -1674665784: /*minimumVolume*/ return this.minimumVolume == null ? new Base[0] : new Base[] {this.minimumVolume}; // DataType
1358        case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : this.additive.toArray(new Base[this.additive.size()]); // SpecimenDefinitionTypeTestedContainerAdditiveComponent
1359        case -1315428713: /*preparation*/ return this.preparation == null ? new Base[0] : new Base[] {this.preparation}; // MarkdownType
1360        default: return super.getProperty(hash, name, checkValid);
1361        }
1362
1363      }
1364
1365      @Override
1366      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1367        switch (hash) {
1368        case 299066663: // material
1369          this.material = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1370          return value;
1371        case 3575610: // type
1372          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1373          return value;
1374        case 98258: // cap
1375          this.cap = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1376          return value;
1377        case -1724546052: // description
1378          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1379          return value;
1380        case -67824454: // capacity
1381          this.capacity = TypeConvertor.castToQuantity(value); // Quantity
1382          return value;
1383        case -1674665784: // minimumVolume
1384          this.minimumVolume = TypeConvertor.castToType(value); // DataType
1385          return value;
1386        case -1226589236: // additive
1387          this.getAdditive().add((SpecimenDefinitionTypeTestedContainerAdditiveComponent) value); // SpecimenDefinitionTypeTestedContainerAdditiveComponent
1388          return value;
1389        case -1315428713: // preparation
1390          this.preparation = TypeConvertor.castToMarkdown(value); // MarkdownType
1391          return value;
1392        default: return super.setProperty(hash, name, value);
1393        }
1394
1395      }
1396
1397      @Override
1398      public Base setProperty(String name, Base value) throws FHIRException {
1399        if (name.equals("material")) {
1400          this.material = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1401        } else if (name.equals("type")) {
1402          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1403        } else if (name.equals("cap")) {
1404          this.cap = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1405        } else if (name.equals("description")) {
1406          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1407        } else if (name.equals("capacity")) {
1408          this.capacity = TypeConvertor.castToQuantity(value); // Quantity
1409        } else if (name.equals("minimumVolume[x]")) {
1410          this.minimumVolume = TypeConvertor.castToType(value); // DataType
1411        } else if (name.equals("additive")) {
1412          this.getAdditive().add((SpecimenDefinitionTypeTestedContainerAdditiveComponent) value);
1413        } else if (name.equals("preparation")) {
1414          this.preparation = TypeConvertor.castToMarkdown(value); // MarkdownType
1415        } else
1416          return super.setProperty(name, value);
1417        return value;
1418      }
1419
1420  @Override
1421  public void removeChild(String name, Base value) throws FHIRException {
1422        if (name.equals("material")) {
1423          this.material = null;
1424        } else if (name.equals("type")) {
1425          this.type = null;
1426        } else if (name.equals("cap")) {
1427          this.cap = null;
1428        } else if (name.equals("description")) {
1429          this.description = null;
1430        } else if (name.equals("capacity")) {
1431          this.capacity = null;
1432        } else if (name.equals("minimumVolume[x]")) {
1433          this.minimumVolume = null;
1434        } else if (name.equals("additive")) {
1435          this.getAdditive().remove((SpecimenDefinitionTypeTestedContainerAdditiveComponent) value);
1436        } else if (name.equals("preparation")) {
1437          this.preparation = null;
1438        } else
1439          super.removeChild(name, value);
1440        
1441      }
1442
1443      @Override
1444      public Base makeProperty(int hash, String name) throws FHIRException {
1445        switch (hash) {
1446        case 299066663:  return getMaterial();
1447        case 3575610:  return getType();
1448        case 98258:  return getCap();
1449        case -1724546052:  return getDescriptionElement();
1450        case -67824454:  return getCapacity();
1451        case 371830456:  return getMinimumVolume();
1452        case -1674665784:  return getMinimumVolume();
1453        case -1226589236:  return addAdditive(); 
1454        case -1315428713:  return getPreparationElement();
1455        default: return super.makeProperty(hash, name);
1456        }
1457
1458      }
1459
1460      @Override
1461      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1462        switch (hash) {
1463        case 299066663: /*material*/ return new String[] {"CodeableConcept"};
1464        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1465        case 98258: /*cap*/ return new String[] {"CodeableConcept"};
1466        case -1724546052: /*description*/ return new String[] {"markdown"};
1467        case -67824454: /*capacity*/ return new String[] {"Quantity"};
1468        case -1674665784: /*minimumVolume*/ return new String[] {"Quantity", "string"};
1469        case -1226589236: /*additive*/ return new String[] {};
1470        case -1315428713: /*preparation*/ return new String[] {"markdown"};
1471        default: return super.getTypesForProperty(hash, name);
1472        }
1473
1474      }
1475
1476      @Override
1477      public Base addChild(String name) throws FHIRException {
1478        if (name.equals("material")) {
1479          this.material = new CodeableConcept();
1480          return this.material;
1481        }
1482        else if (name.equals("type")) {
1483          this.type = new CodeableConcept();
1484          return this.type;
1485        }
1486        else if (name.equals("cap")) {
1487          this.cap = new CodeableConcept();
1488          return this.cap;
1489        }
1490        else if (name.equals("description")) {
1491          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.container.description");
1492        }
1493        else if (name.equals("capacity")) {
1494          this.capacity = new Quantity();
1495          return this.capacity;
1496        }
1497        else if (name.equals("minimumVolumeQuantity")) {
1498          this.minimumVolume = new Quantity();
1499          return this.minimumVolume;
1500        }
1501        else if (name.equals("minimumVolumeString")) {
1502          this.minimumVolume = new StringType();
1503          return this.minimumVolume;
1504        }
1505        else if (name.equals("additive")) {
1506          return addAdditive();
1507        }
1508        else if (name.equals("preparation")) {
1509          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.container.preparation");
1510        }
1511        else
1512          return super.addChild(name);
1513      }
1514
1515      public SpecimenDefinitionTypeTestedContainerComponent copy() {
1516        SpecimenDefinitionTypeTestedContainerComponent dst = new SpecimenDefinitionTypeTestedContainerComponent();
1517        copyValues(dst);
1518        return dst;
1519      }
1520
1521      public void copyValues(SpecimenDefinitionTypeTestedContainerComponent dst) {
1522        super.copyValues(dst);
1523        dst.material = material == null ? null : material.copy();
1524        dst.type = type == null ? null : type.copy();
1525        dst.cap = cap == null ? null : cap.copy();
1526        dst.description = description == null ? null : description.copy();
1527        dst.capacity = capacity == null ? null : capacity.copy();
1528        dst.minimumVolume = minimumVolume == null ? null : minimumVolume.copy();
1529        if (additive != null) {
1530          dst.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1531          for (SpecimenDefinitionTypeTestedContainerAdditiveComponent i : additive)
1532            dst.additive.add(i.copy());
1533        };
1534        dst.preparation = preparation == null ? null : preparation.copy();
1535      }
1536
1537      @Override
1538      public boolean equalsDeep(Base other_) {
1539        if (!super.equalsDeep(other_))
1540          return false;
1541        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerComponent))
1542          return false;
1543        SpecimenDefinitionTypeTestedContainerComponent o = (SpecimenDefinitionTypeTestedContainerComponent) other_;
1544        return compareDeep(material, o.material, true) && compareDeep(type, o.type, true) && compareDeep(cap, o.cap, true)
1545           && compareDeep(description, o.description, true) && compareDeep(capacity, o.capacity, true) && compareDeep(minimumVolume, o.minimumVolume, true)
1546           && compareDeep(additive, o.additive, true) && compareDeep(preparation, o.preparation, true);
1547      }
1548
1549      @Override
1550      public boolean equalsShallow(Base other_) {
1551        if (!super.equalsShallow(other_))
1552          return false;
1553        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerComponent))
1554          return false;
1555        SpecimenDefinitionTypeTestedContainerComponent o = (SpecimenDefinitionTypeTestedContainerComponent) other_;
1556        return compareValues(description, o.description, true) && compareValues(preparation, o.preparation, true)
1557          ;
1558      }
1559
1560      public boolean isEmpty() {
1561        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(material, type, cap, description
1562          , capacity, minimumVolume, additive, preparation);
1563      }
1564
1565  public String fhirType() {
1566    return "SpecimenDefinition.typeTested.container";
1567
1568  }
1569
1570  }
1571
1572    @Block()
1573    public static class SpecimenDefinitionTypeTestedContainerAdditiveComponent extends BackboneElement implements IBaseBackboneElement {
1574        /**
1575         * Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.
1576         */
1577        @Child(name = "additive", type = {CodeableConcept.class, SubstanceDefinition.class}, order=1, min=1, max=1, modifier=false, summary=false)
1578        @Description(shortDefinition="Additive associated with container", formalDefinition="Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA." )
1579        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0371")
1580        protected DataType additive;
1581
1582        private static final long serialVersionUID = 201856258L;
1583
1584    /**
1585     * Constructor
1586     */
1587      public SpecimenDefinitionTypeTestedContainerAdditiveComponent() {
1588        super();
1589      }
1590
1591    /**
1592     * Constructor
1593     */
1594      public SpecimenDefinitionTypeTestedContainerAdditiveComponent(DataType additive) {
1595        super();
1596        this.setAdditive(additive);
1597      }
1598
1599        /**
1600         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1601         */
1602        public DataType getAdditive() { 
1603          return this.additive;
1604        }
1605
1606        /**
1607         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1608         */
1609        public CodeableConcept getAdditiveCodeableConcept() throws FHIRException { 
1610          if (this.additive == null)
1611            this.additive = new CodeableConcept();
1612          if (!(this.additive instanceof CodeableConcept))
1613            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.additive.getClass().getName()+" was encountered");
1614          return (CodeableConcept) this.additive;
1615        }
1616
1617        public boolean hasAdditiveCodeableConcept() { 
1618          return this != null && this.additive instanceof CodeableConcept;
1619        }
1620
1621        /**
1622         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1623         */
1624        public Reference getAdditiveReference() throws FHIRException { 
1625          if (this.additive == null)
1626            this.additive = new Reference();
1627          if (!(this.additive instanceof Reference))
1628            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.additive.getClass().getName()+" was encountered");
1629          return (Reference) this.additive;
1630        }
1631
1632        public boolean hasAdditiveReference() { 
1633          return this != null && this.additive instanceof Reference;
1634        }
1635
1636        public boolean hasAdditive() { 
1637          return this.additive != null && !this.additive.isEmpty();
1638        }
1639
1640        /**
1641         * @param value {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1642         */
1643        public SpecimenDefinitionTypeTestedContainerAdditiveComponent setAdditive(DataType value) { 
1644          if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
1645            throw new FHIRException("Not the right type for SpecimenDefinition.typeTested.container.additive.additive[x]: "+value.fhirType());
1646          this.additive = value;
1647          return this;
1648        }
1649
1650        protected void listChildren(List<Property> children) {
1651          super.listChildren(children);
1652          children.add(new Property("additive[x]", "CodeableConcept|Reference(SubstanceDefinition)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive));
1653        }
1654
1655        @Override
1656        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1657          switch (_hash) {
1658          case 261915956: /*additive[x]*/  return new Property("additive[x]", "CodeableConcept|Reference(SubstanceDefinition)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive);
1659          case -1226589236: /*additive*/  return new Property("additive[x]", "CodeableConcept|Reference(SubstanceDefinition)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive);
1660          case 1330272821: /*additiveCodeableConcept*/  return new Property("additive[x]", "CodeableConcept", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive);
1661          case -386783009: /*additiveReference*/  return new Property("additive[x]", "Reference(SubstanceDefinition)", "Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.", 0, 1, additive);
1662          default: return super.getNamedProperty(_hash, _name, _checkValid);
1663          }
1664
1665        }
1666
1667      @Override
1668      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1669        switch (hash) {
1670        case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : new Base[] {this.additive}; // DataType
1671        default: return super.getProperty(hash, name, checkValid);
1672        }
1673
1674      }
1675
1676      @Override
1677      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1678        switch (hash) {
1679        case -1226589236: // additive
1680          this.additive = TypeConvertor.castToType(value); // DataType
1681          return value;
1682        default: return super.setProperty(hash, name, value);
1683        }
1684
1685      }
1686
1687      @Override
1688      public Base setProperty(String name, Base value) throws FHIRException {
1689        if (name.equals("additive[x]")) {
1690          this.additive = TypeConvertor.castToType(value); // DataType
1691        } else
1692          return super.setProperty(name, value);
1693        return value;
1694      }
1695
1696  @Override
1697  public void removeChild(String name, Base value) throws FHIRException {
1698        if (name.equals("additive[x]")) {
1699          this.additive = null;
1700        } else
1701          super.removeChild(name, value);
1702        
1703      }
1704
1705      @Override
1706      public Base makeProperty(int hash, String name) throws FHIRException {
1707        switch (hash) {
1708        case 261915956:  return getAdditive();
1709        case -1226589236:  return getAdditive();
1710        default: return super.makeProperty(hash, name);
1711        }
1712
1713      }
1714
1715      @Override
1716      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1717        switch (hash) {
1718        case -1226589236: /*additive*/ return new String[] {"CodeableConcept", "Reference"};
1719        default: return super.getTypesForProperty(hash, name);
1720        }
1721
1722      }
1723
1724      @Override
1725      public Base addChild(String name) throws FHIRException {
1726        if (name.equals("additiveCodeableConcept")) {
1727          this.additive = new CodeableConcept();
1728          return this.additive;
1729        }
1730        else if (name.equals("additiveReference")) {
1731          this.additive = new Reference();
1732          return this.additive;
1733        }
1734        else
1735          return super.addChild(name);
1736      }
1737
1738      public SpecimenDefinitionTypeTestedContainerAdditiveComponent copy() {
1739        SpecimenDefinitionTypeTestedContainerAdditiveComponent dst = new SpecimenDefinitionTypeTestedContainerAdditiveComponent();
1740        copyValues(dst);
1741        return dst;
1742      }
1743
1744      public void copyValues(SpecimenDefinitionTypeTestedContainerAdditiveComponent dst) {
1745        super.copyValues(dst);
1746        dst.additive = additive == null ? null : additive.copy();
1747      }
1748
1749      @Override
1750      public boolean equalsDeep(Base other_) {
1751        if (!super.equalsDeep(other_))
1752          return false;
1753        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerAdditiveComponent))
1754          return false;
1755        SpecimenDefinitionTypeTestedContainerAdditiveComponent o = (SpecimenDefinitionTypeTestedContainerAdditiveComponent) other_;
1756        return compareDeep(additive, o.additive, true);
1757      }
1758
1759      @Override
1760      public boolean equalsShallow(Base other_) {
1761        if (!super.equalsShallow(other_))
1762          return false;
1763        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerAdditiveComponent))
1764          return false;
1765        SpecimenDefinitionTypeTestedContainerAdditiveComponent o = (SpecimenDefinitionTypeTestedContainerAdditiveComponent) other_;
1766        return true;
1767      }
1768
1769      public boolean isEmpty() {
1770        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(additive);
1771      }
1772
1773  public String fhirType() {
1774    return "SpecimenDefinition.typeTested.container.additive";
1775
1776  }
1777
1778  }
1779
1780    @Block()
1781    public static class SpecimenDefinitionTypeTestedHandlingComponent extends BackboneElement implements IBaseBackboneElement {
1782        /**
1783         * It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.
1784         */
1785        @Child(name = "temperatureQualifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
1786        @Description(shortDefinition="Qualifies the interval of temperature", formalDefinition="It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element." )
1787        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/handling-condition")
1788        protected CodeableConcept temperatureQualifier;
1789
1790        /**
1791         * The temperature interval for this set of handling instructions.
1792         */
1793        @Child(name = "temperatureRange", type = {Range.class}, order=2, min=0, max=1, modifier=false, summary=false)
1794        @Description(shortDefinition="Temperature range for these handling instructions", formalDefinition="The temperature interval for this set of handling instructions." )
1795        protected Range temperatureRange;
1796
1797        /**
1798         * The maximum time interval of preservation of the specimen with these conditions.
1799         */
1800        @Child(name = "maxDuration", type = {Duration.class}, order=3, min=0, max=1, modifier=false, summary=false)
1801        @Description(shortDefinition="Maximum preservation time", formalDefinition="The maximum time interval of preservation of the specimen with these conditions." )
1802        protected Duration maxDuration;
1803
1804        /**
1805         * Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.
1806         */
1807        @Child(name = "instruction", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1808        @Description(shortDefinition="Preservation instruction", formalDefinition="Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'." )
1809        protected MarkdownType instruction;
1810
1811        private static final long serialVersionUID = 113016318L;
1812
1813    /**
1814     * Constructor
1815     */
1816      public SpecimenDefinitionTypeTestedHandlingComponent() {
1817        super();
1818      }
1819
1820        /**
1821         * @return {@link #temperatureQualifier} (It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.)
1822         */
1823        public CodeableConcept getTemperatureQualifier() { 
1824          if (this.temperatureQualifier == null)
1825            if (Configuration.errorOnAutoCreate())
1826              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.temperatureQualifier");
1827            else if (Configuration.doAutoCreate())
1828              this.temperatureQualifier = new CodeableConcept(); // cc
1829          return this.temperatureQualifier;
1830        }
1831
1832        public boolean hasTemperatureQualifier() { 
1833          return this.temperatureQualifier != null && !this.temperatureQualifier.isEmpty();
1834        }
1835
1836        /**
1837         * @param value {@link #temperatureQualifier} (It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.)
1838         */
1839        public SpecimenDefinitionTypeTestedHandlingComponent setTemperatureQualifier(CodeableConcept value) { 
1840          this.temperatureQualifier = value;
1841          return this;
1842        }
1843
1844        /**
1845         * @return {@link #temperatureRange} (The temperature interval for this set of handling instructions.)
1846         */
1847        public Range getTemperatureRange() { 
1848          if (this.temperatureRange == null)
1849            if (Configuration.errorOnAutoCreate())
1850              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.temperatureRange");
1851            else if (Configuration.doAutoCreate())
1852              this.temperatureRange = new Range(); // cc
1853          return this.temperatureRange;
1854        }
1855
1856        public boolean hasTemperatureRange() { 
1857          return this.temperatureRange != null && !this.temperatureRange.isEmpty();
1858        }
1859
1860        /**
1861         * @param value {@link #temperatureRange} (The temperature interval for this set of handling instructions.)
1862         */
1863        public SpecimenDefinitionTypeTestedHandlingComponent setTemperatureRange(Range value) { 
1864          this.temperatureRange = value;
1865          return this;
1866        }
1867
1868        /**
1869         * @return {@link #maxDuration} (The maximum time interval of preservation of the specimen with these conditions.)
1870         */
1871        public Duration getMaxDuration() { 
1872          if (this.maxDuration == null)
1873            if (Configuration.errorOnAutoCreate())
1874              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.maxDuration");
1875            else if (Configuration.doAutoCreate())
1876              this.maxDuration = new Duration(); // cc
1877          return this.maxDuration;
1878        }
1879
1880        public boolean hasMaxDuration() { 
1881          return this.maxDuration != null && !this.maxDuration.isEmpty();
1882        }
1883
1884        /**
1885         * @param value {@link #maxDuration} (The maximum time interval of preservation of the specimen with these conditions.)
1886         */
1887        public SpecimenDefinitionTypeTestedHandlingComponent setMaxDuration(Duration value) { 
1888          this.maxDuration = value;
1889          return this;
1890        }
1891
1892        /**
1893         * @return {@link #instruction} (Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value
1894         */
1895        public MarkdownType getInstructionElement() { 
1896          if (this.instruction == null)
1897            if (Configuration.errorOnAutoCreate())
1898              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.instruction");
1899            else if (Configuration.doAutoCreate())
1900              this.instruction = new MarkdownType(); // bb
1901          return this.instruction;
1902        }
1903
1904        public boolean hasInstructionElement() { 
1905          return this.instruction != null && !this.instruction.isEmpty();
1906        }
1907
1908        public boolean hasInstruction() { 
1909          return this.instruction != null && !this.instruction.isEmpty();
1910        }
1911
1912        /**
1913         * @param value {@link #instruction} (Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value
1914         */
1915        public SpecimenDefinitionTypeTestedHandlingComponent setInstructionElement(MarkdownType value) { 
1916          this.instruction = value;
1917          return this;
1918        }
1919
1920        /**
1921         * @return Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.
1922         */
1923        public String getInstruction() { 
1924          return this.instruction == null ? null : this.instruction.getValue();
1925        }
1926
1927        /**
1928         * @param value Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.
1929         */
1930        public SpecimenDefinitionTypeTestedHandlingComponent setInstruction(String value) { 
1931          if (Utilities.noString(value))
1932            this.instruction = null;
1933          else {
1934            if (this.instruction == null)
1935              this.instruction = new MarkdownType();
1936            this.instruction.setValue(value);
1937          }
1938          return this;
1939        }
1940
1941        protected void listChildren(List<Property> children) {
1942          super.listChildren(children);
1943          children.add(new Property("temperatureQualifier", "CodeableConcept", "It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.", 0, 1, temperatureQualifier));
1944          children.add(new Property("temperatureRange", "Range", "The temperature interval for this set of handling instructions.", 0, 1, temperatureRange));
1945          children.add(new Property("maxDuration", "Duration", "The maximum time interval of preservation of the specimen with these conditions.", 0, 1, maxDuration));
1946          children.add(new Property("instruction", "markdown", "Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.", 0, 1, instruction));
1947        }
1948
1949        @Override
1950        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1951          switch (_hash) {
1952          case 548941206: /*temperatureQualifier*/  return new Property("temperatureQualifier", "CodeableConcept", "It qualifies the interval of temperature, which characterizes an occurrence of handling. Conditions that are not related to temperature may be handled in the instruction element.", 0, 1, temperatureQualifier);
1953          case -39203799: /*temperatureRange*/  return new Property("temperatureRange", "Range", "The temperature interval for this set of handling instructions.", 0, 1, temperatureRange);
1954          case 40284952: /*maxDuration*/  return new Property("maxDuration", "Duration", "The maximum time interval of preservation of the specimen with these conditions.", 0, 1, maxDuration);
1955          case 301526158: /*instruction*/  return new Property("instruction", "markdown", "Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.", 0, 1, instruction);
1956          default: return super.getNamedProperty(_hash, _name, _checkValid);
1957          }
1958
1959        }
1960
1961      @Override
1962      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1963        switch (hash) {
1964        case 548941206: /*temperatureQualifier*/ return this.temperatureQualifier == null ? new Base[0] : new Base[] {this.temperatureQualifier}; // CodeableConcept
1965        case -39203799: /*temperatureRange*/ return this.temperatureRange == null ? new Base[0] : new Base[] {this.temperatureRange}; // Range
1966        case 40284952: /*maxDuration*/ return this.maxDuration == null ? new Base[0] : new Base[] {this.maxDuration}; // Duration
1967        case 301526158: /*instruction*/ return this.instruction == null ? new Base[0] : new Base[] {this.instruction}; // MarkdownType
1968        default: return super.getProperty(hash, name, checkValid);
1969        }
1970
1971      }
1972
1973      @Override
1974      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1975        switch (hash) {
1976        case 548941206: // temperatureQualifier
1977          this.temperatureQualifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1978          return value;
1979        case -39203799: // temperatureRange
1980          this.temperatureRange = TypeConvertor.castToRange(value); // Range
1981          return value;
1982        case 40284952: // maxDuration
1983          this.maxDuration = TypeConvertor.castToDuration(value); // Duration
1984          return value;
1985        case 301526158: // instruction
1986          this.instruction = TypeConvertor.castToMarkdown(value); // MarkdownType
1987          return value;
1988        default: return super.setProperty(hash, name, value);
1989        }
1990
1991      }
1992
1993      @Override
1994      public Base setProperty(String name, Base value) throws FHIRException {
1995        if (name.equals("temperatureQualifier")) {
1996          this.temperatureQualifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1997        } else if (name.equals("temperatureRange")) {
1998          this.temperatureRange = TypeConvertor.castToRange(value); // Range
1999        } else if (name.equals("maxDuration")) {
2000          this.maxDuration = TypeConvertor.castToDuration(value); // Duration
2001        } else if (name.equals("instruction")) {
2002          this.instruction = TypeConvertor.castToMarkdown(value); // MarkdownType
2003        } else
2004          return super.setProperty(name, value);
2005        return value;
2006      }
2007
2008  @Override
2009  public void removeChild(String name, Base value) throws FHIRException {
2010        if (name.equals("temperatureQualifier")) {
2011          this.temperatureQualifier = null;
2012        } else if (name.equals("temperatureRange")) {
2013          this.temperatureRange = null;
2014        } else if (name.equals("maxDuration")) {
2015          this.maxDuration = null;
2016        } else if (name.equals("instruction")) {
2017          this.instruction = null;
2018        } else
2019          super.removeChild(name, value);
2020        
2021      }
2022
2023      @Override
2024      public Base makeProperty(int hash, String name) throws FHIRException {
2025        switch (hash) {
2026        case 548941206:  return getTemperatureQualifier();
2027        case -39203799:  return getTemperatureRange();
2028        case 40284952:  return getMaxDuration();
2029        case 301526158:  return getInstructionElement();
2030        default: return super.makeProperty(hash, name);
2031        }
2032
2033      }
2034
2035      @Override
2036      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2037        switch (hash) {
2038        case 548941206: /*temperatureQualifier*/ return new String[] {"CodeableConcept"};
2039        case -39203799: /*temperatureRange*/ return new String[] {"Range"};
2040        case 40284952: /*maxDuration*/ return new String[] {"Duration"};
2041        case 301526158: /*instruction*/ return new String[] {"markdown"};
2042        default: return super.getTypesForProperty(hash, name);
2043        }
2044
2045      }
2046
2047      @Override
2048      public Base addChild(String name) throws FHIRException {
2049        if (name.equals("temperatureQualifier")) {
2050          this.temperatureQualifier = new CodeableConcept();
2051          return this.temperatureQualifier;
2052        }
2053        else if (name.equals("temperatureRange")) {
2054          this.temperatureRange = new Range();
2055          return this.temperatureRange;
2056        }
2057        else if (name.equals("maxDuration")) {
2058          this.maxDuration = new Duration();
2059          return this.maxDuration;
2060        }
2061        else if (name.equals("instruction")) {
2062          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.handling.instruction");
2063        }
2064        else
2065          return super.addChild(name);
2066      }
2067
2068      public SpecimenDefinitionTypeTestedHandlingComponent copy() {
2069        SpecimenDefinitionTypeTestedHandlingComponent dst = new SpecimenDefinitionTypeTestedHandlingComponent();
2070        copyValues(dst);
2071        return dst;
2072      }
2073
2074      public void copyValues(SpecimenDefinitionTypeTestedHandlingComponent dst) {
2075        super.copyValues(dst);
2076        dst.temperatureQualifier = temperatureQualifier == null ? null : temperatureQualifier.copy();
2077        dst.temperatureRange = temperatureRange == null ? null : temperatureRange.copy();
2078        dst.maxDuration = maxDuration == null ? null : maxDuration.copy();
2079        dst.instruction = instruction == null ? null : instruction.copy();
2080      }
2081
2082      @Override
2083      public boolean equalsDeep(Base other_) {
2084        if (!super.equalsDeep(other_))
2085          return false;
2086        if (!(other_ instanceof SpecimenDefinitionTypeTestedHandlingComponent))
2087          return false;
2088        SpecimenDefinitionTypeTestedHandlingComponent o = (SpecimenDefinitionTypeTestedHandlingComponent) other_;
2089        return compareDeep(temperatureQualifier, o.temperatureQualifier, true) && compareDeep(temperatureRange, o.temperatureRange, true)
2090           && compareDeep(maxDuration, o.maxDuration, true) && compareDeep(instruction, o.instruction, true)
2091          ;
2092      }
2093
2094      @Override
2095      public boolean equalsShallow(Base other_) {
2096        if (!super.equalsShallow(other_))
2097          return false;
2098        if (!(other_ instanceof SpecimenDefinitionTypeTestedHandlingComponent))
2099          return false;
2100        SpecimenDefinitionTypeTestedHandlingComponent o = (SpecimenDefinitionTypeTestedHandlingComponent) other_;
2101        return compareValues(instruction, o.instruction, true);
2102      }
2103
2104      public boolean isEmpty() {
2105        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(temperatureQualifier, temperatureRange
2106          , maxDuration, instruction);
2107      }
2108
2109  public String fhirType() {
2110    return "SpecimenDefinition.typeTested.handling";
2111
2112  }
2113
2114  }
2115
2116    /**
2117     * An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.
2118     */
2119    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
2120    @Description(shortDefinition="Logical canonical URL to reference this SpecimenDefinition (globally unique)", formalDefinition="An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions." )
2121    protected UriType url;
2122
2123    /**
2124     * A business identifier assigned to this SpecimenDefinition.
2125     */
2126    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true)
2127    @Description(shortDefinition="Business identifier", formalDefinition="A business identifier assigned to this SpecimenDefinition." )
2128    protected Identifier identifier;
2129
2130    /**
2131     * The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.
2132     */
2133    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
2134    @Description(shortDefinition="Business version of the SpecimenDefinition", formalDefinition="The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique." )
2135    protected StringType version;
2136
2137    /**
2138     * Indicates the mechanism used to compare versions to determine which is more current.
2139     */
2140    @Child(name = "versionAlgorithm", type = {StringType.class, Coding.class}, order=3, min=0, max=1, modifier=false, summary=true)
2141    @Description(shortDefinition="How to compare versions", formalDefinition="Indicates the mechanism used to compare versions to determine which is more current." )
2142    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/version-algorithm")
2143    protected DataType versionAlgorithm;
2144
2145    /**
2146     * A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2147     */
2148    @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
2149    @Description(shortDefinition="Name for this specimen definition (computer friendly)", formalDefinition="A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
2150    protected StringType name;
2151
2152    /**
2153     * A short, descriptive, user-friendly title for the SpecimenDefinition.
2154     */
2155    @Child(name = "title", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
2156    @Description(shortDefinition="Name for this SpecimenDefinition (Human friendly)", formalDefinition="A short, descriptive, user-friendly title for the SpecimenDefinition." )
2157    protected StringType title;
2158
2159    /**
2160     * The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.
2161     */
2162    @Child(name = "derivedFromCanonical", type = {CanonicalType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2163    @Description(shortDefinition="Based on FHIR definition of another SpecimenDefinition", formalDefinition="The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition." )
2164    protected List<CanonicalType> derivedFromCanonical;
2165
2166    /**
2167     * The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.
2168     */
2169    @Child(name = "derivedFromUri", type = {UriType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2170    @Description(shortDefinition="Based on external definition", formalDefinition="The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition." )
2171    protected List<UriType> derivedFromUri;
2172
2173    /**
2174     * The current state of theSpecimenDefinition.
2175     */
2176    @Child(name = "status", type = {CodeType.class}, order=8, min=1, max=1, modifier=true, summary=true)
2177    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The current state of theSpecimenDefinition." )
2178    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
2179    protected Enumeration<PublicationStatus> status;
2180
2181    /**
2182     * A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.
2183     */
2184    @Child(name = "experimental", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=true)
2185    @Description(shortDefinition="If this SpecimenDefinition is not for real usage", formalDefinition="A flag to indicate that this SpecimenDefinition is not authored for  genuine usage." )
2186    protected BooleanType experimental;
2187
2188    /**
2189     * A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.
2190     */
2191    @Child(name = "subject", type = {CodeableConcept.class, Group.class}, order=10, min=0, max=1, modifier=false, summary=true)
2192    @Description(shortDefinition="Type of subject for specimen collection", formalDefinition="A code or group definition that describes the intended subject  from which this kind of specimen is to be collected." )
2193    protected DataType subject;
2194
2195    /**
2196     * For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.
2197     */
2198    @Child(name = "date", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true)
2199    @Description(shortDefinition="Date status first applied", formalDefinition="For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal." )
2200    protected DateTimeType date;
2201
2202    /**
2203     * Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.
2204     */
2205    @Child(name = "publisher", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true)
2206    @Description(shortDefinition="The name of the individual or organization that published the SpecimenDefinition", formalDefinition="Helps establish the \"authority/credibility\" of the SpecimenDefinition. May also allow for contact." )
2207    protected StringType publisher;
2208
2209    /**
2210     * Contact details to assist a user in finding and communicating with the publisher.
2211     */
2212    @Child(name = "contact", type = {ContactDetail.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2213    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
2214    protected List<ContactDetail> contact;
2215
2216    /**
2217     * A free text natural language description of the SpecimenDefinition from the consumer's perspective.
2218     */
2219    @Child(name = "description", type = {MarkdownType.class}, order=14, min=0, max=1, modifier=false, summary=false)
2220    @Description(shortDefinition="Natural language description of the SpecimenDefinition", formalDefinition="A free text natural language description of the SpecimenDefinition from the consumer's perspective." )
2221    protected MarkdownType description;
2222
2223    /**
2224     * 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 specimen definitions.
2225     */
2226    @Child(name = "useContext", type = {UsageContext.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2227    @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 specimen definitions." )
2228    protected List<UsageContext> useContext;
2229
2230    /**
2231     * A jurisdiction in which the SpecimenDefinition is intended to be used.
2232     */
2233    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2234    @Description(shortDefinition="Intended jurisdiction for this SpecimenDefinition (if applicable)", formalDefinition="A jurisdiction in which the SpecimenDefinition is intended to be used." )
2235    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
2236    protected List<CodeableConcept> jurisdiction;
2237
2238    /**
2239     * Explains why this SpecimeDefinition is needed and why it has been designed as it has.
2240     */
2241    @Child(name = "purpose", type = {MarkdownType.class}, order=17, min=0, max=1, modifier=false, summary=false)
2242    @Description(shortDefinition="Why this SpecimenDefinition is defined", formalDefinition="Explains why this SpecimeDefinition is needed and why it has been designed as it has." )
2243    protected MarkdownType purpose;
2244
2245    /**
2246     * Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.
2247     */
2248    @Child(name = "copyright", type = {MarkdownType.class}, order=18, min=0, max=1, modifier=false, summary=false)
2249    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition." )
2250    protected MarkdownType copyright;
2251
2252    /**
2253     * A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').
2254     */
2255    @Child(name = "copyrightLabel", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=false)
2256    @Description(shortDefinition="Copyright holder and year(s)", formalDefinition="A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')." )
2257    protected StringType copyrightLabel;
2258
2259    /**
2260     * The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2261     */
2262    @Child(name = "approvalDate", type = {DateType.class}, order=20, min=0, max=1, modifier=false, summary=false)
2263    @Description(shortDefinition="When SpecimenDefinition was approved by publisher", formalDefinition="The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage." )
2264    protected DateType approvalDate;
2265
2266    /**
2267     * The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
2268     */
2269    @Child(name = "lastReviewDate", type = {DateType.class}, order=21, min=0, max=1, modifier=false, summary=false)
2270    @Description(shortDefinition="The date on which the asset content was last reviewed by the publisher", formalDefinition="The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date." )
2271    protected DateType lastReviewDate;
2272
2273    /**
2274     * The period during which the SpecimenDefinition content was or is planned to be effective.
2275     */
2276    @Child(name = "effectivePeriod", type = {Period.class}, order=22, min=0, max=1, modifier=false, summary=true)
2277    @Description(shortDefinition="The effective date range for the SpecimenDefinition", formalDefinition="The period during which the SpecimenDefinition content was or is planned to be effective." )
2278    protected Period effectivePeriod;
2279
2280    /**
2281     * The kind of material to be collected.
2282     */
2283    @Child(name = "typeCollected", type = {CodeableConcept.class}, order=23, min=0, max=1, modifier=false, summary=true)
2284    @Description(shortDefinition="Kind of material to collect", formalDefinition="The kind of material to be collected." )
2285    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0487")
2286    protected CodeableConcept typeCollected;
2287
2288    /**
2289     * Preparation of the patient for specimen collection.
2290     */
2291    @Child(name = "patientPreparation", type = {CodeableConcept.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2292    @Description(shortDefinition="Patient preparation for collection", formalDefinition="Preparation of the patient for specimen collection." )
2293    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/prepare-patient-prior-specimen-collection")
2294    protected List<CodeableConcept> patientPreparation;
2295
2296    /**
2297     * Time aspect of specimen collection (duration or offset).
2298     */
2299    @Child(name = "timeAspect", type = {StringType.class}, order=25, min=0, max=1, modifier=false, summary=true)
2300    @Description(shortDefinition="Time aspect for collection", formalDefinition="Time aspect of specimen collection (duration or offset)." )
2301    protected StringType timeAspect;
2302
2303    /**
2304     * The action to be performed for collecting the specimen.
2305     */
2306    @Child(name = "collection", type = {CodeableConcept.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2307    @Description(shortDefinition="Specimen collection procedure", formalDefinition="The action to be performed for collecting the specimen." )
2308    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-collection")
2309    protected List<CodeableConcept> collection;
2310
2311    /**
2312     * Specimen conditioned in a container as expected by the testing laboratory.
2313     */
2314    @Child(name = "typeTested", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2315    @Description(shortDefinition="Specimen in container intended for testing by lab", formalDefinition="Specimen conditioned in a container as expected by the testing laboratory." )
2316    protected List<SpecimenDefinitionTypeTestedComponent> typeTested;
2317
2318    private static final long serialVersionUID = 1698015458L;
2319
2320  /**
2321   * Constructor
2322   */
2323    public SpecimenDefinition() {
2324      super();
2325    }
2326
2327  /**
2328   * Constructor
2329   */
2330    public SpecimenDefinition(PublicationStatus status) {
2331      super();
2332      this.setStatus(status);
2333    }
2334
2335    /**
2336     * @return {@link #url} (An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2337     */
2338    public UriType getUrlElement() { 
2339      if (this.url == null)
2340        if (Configuration.errorOnAutoCreate())
2341          throw new Error("Attempt to auto-create SpecimenDefinition.url");
2342        else if (Configuration.doAutoCreate())
2343          this.url = new UriType(); // bb
2344      return this.url;
2345    }
2346
2347    public boolean hasUrlElement() { 
2348      return this.url != null && !this.url.isEmpty();
2349    }
2350
2351    public boolean hasUrl() { 
2352      return this.url != null && !this.url.isEmpty();
2353    }
2354
2355    /**
2356     * @param value {@link #url} (An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2357     */
2358    public SpecimenDefinition setUrlElement(UriType value) { 
2359      this.url = value;
2360      return this;
2361    }
2362
2363    /**
2364     * @return An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.
2365     */
2366    public String getUrl() { 
2367      return this.url == null ? null : this.url.getValue();
2368    }
2369
2370    /**
2371     * @param value An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.
2372     */
2373    public SpecimenDefinition setUrl(String value) { 
2374      if (Utilities.noString(value))
2375        this.url = null;
2376      else {
2377        if (this.url == null)
2378          this.url = new UriType();
2379        this.url.setValue(value);
2380      }
2381      return this;
2382    }
2383
2384    /**
2385     * @return {@link #identifier} (A business identifier assigned to this SpecimenDefinition.)
2386     */
2387    public Identifier getIdentifier() { 
2388      if (this.identifier == null)
2389        if (Configuration.errorOnAutoCreate())
2390          throw new Error("Attempt to auto-create SpecimenDefinition.identifier");
2391        else if (Configuration.doAutoCreate())
2392          this.identifier = new Identifier(); // cc
2393      return this.identifier;
2394    }
2395
2396    public boolean hasIdentifier() { 
2397      return this.identifier != null && !this.identifier.isEmpty();
2398    }
2399
2400    /**
2401     * @param value {@link #identifier} (A business identifier assigned to this SpecimenDefinition.)
2402     */
2403    public SpecimenDefinition setIdentifier(Identifier value) { 
2404      this.identifier = value;
2405      return this;
2406    }
2407
2408    /**
2409     * @return {@link #version} (The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
2410     */
2411    public StringType getVersionElement() { 
2412      if (this.version == null)
2413        if (Configuration.errorOnAutoCreate())
2414          throw new Error("Attempt to auto-create SpecimenDefinition.version");
2415        else if (Configuration.doAutoCreate())
2416          this.version = new StringType(); // bb
2417      return this.version;
2418    }
2419
2420    public boolean hasVersionElement() { 
2421      return this.version != null && !this.version.isEmpty();
2422    }
2423
2424    public boolean hasVersion() { 
2425      return this.version != null && !this.version.isEmpty();
2426    }
2427
2428    /**
2429     * @param value {@link #version} (The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
2430     */
2431    public SpecimenDefinition setVersionElement(StringType value) { 
2432      this.version = value;
2433      return this;
2434    }
2435
2436    /**
2437     * @return The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.
2438     */
2439    public String getVersion() { 
2440      return this.version == null ? null : this.version.getValue();
2441    }
2442
2443    /**
2444     * @param value The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.
2445     */
2446    public SpecimenDefinition setVersion(String value) { 
2447      if (Utilities.noString(value))
2448        this.version = null;
2449      else {
2450        if (this.version == null)
2451          this.version = new StringType();
2452        this.version.setValue(value);
2453      }
2454      return this;
2455    }
2456
2457    /**
2458     * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2459     */
2460    public DataType getVersionAlgorithm() { 
2461      return this.versionAlgorithm;
2462    }
2463
2464    /**
2465     * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2466     */
2467    public StringType getVersionAlgorithmStringType() throws FHIRException { 
2468      if (this.versionAlgorithm == null)
2469        this.versionAlgorithm = new StringType();
2470      if (!(this.versionAlgorithm instanceof StringType))
2471        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.versionAlgorithm.getClass().getName()+" was encountered");
2472      return (StringType) this.versionAlgorithm;
2473    }
2474
2475    public boolean hasVersionAlgorithmStringType() { 
2476      return this != null && this.versionAlgorithm instanceof StringType;
2477    }
2478
2479    /**
2480     * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2481     */
2482    public Coding getVersionAlgorithmCoding() throws FHIRException { 
2483      if (this.versionAlgorithm == null)
2484        this.versionAlgorithm = new Coding();
2485      if (!(this.versionAlgorithm instanceof Coding))
2486        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.versionAlgorithm.getClass().getName()+" was encountered");
2487      return (Coding) this.versionAlgorithm;
2488    }
2489
2490    public boolean hasVersionAlgorithmCoding() { 
2491      return this != null && this.versionAlgorithm instanceof Coding;
2492    }
2493
2494    public boolean hasVersionAlgorithm() { 
2495      return this.versionAlgorithm != null && !this.versionAlgorithm.isEmpty();
2496    }
2497
2498    /**
2499     * @param value {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2500     */
2501    public SpecimenDefinition setVersionAlgorithm(DataType value) { 
2502      if (value != null && !(value instanceof StringType || value instanceof Coding))
2503        throw new FHIRException("Not the right type for SpecimenDefinition.versionAlgorithm[x]: "+value.fhirType());
2504      this.versionAlgorithm = value;
2505      return this;
2506    }
2507
2508    /**
2509     * @return {@link #name} (A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2510     */
2511    public StringType getNameElement() { 
2512      if (this.name == null)
2513        if (Configuration.errorOnAutoCreate())
2514          throw new Error("Attempt to auto-create SpecimenDefinition.name");
2515        else if (Configuration.doAutoCreate())
2516          this.name = new StringType(); // bb
2517      return this.name;
2518    }
2519
2520    public boolean hasNameElement() { 
2521      return this.name != null && !this.name.isEmpty();
2522    }
2523
2524    public boolean hasName() { 
2525      return this.name != null && !this.name.isEmpty();
2526    }
2527
2528    /**
2529     * @param value {@link #name} (A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2530     */
2531    public SpecimenDefinition setNameElement(StringType value) { 
2532      this.name = value;
2533      return this;
2534    }
2535
2536    /**
2537     * @return A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2538     */
2539    public String getName() { 
2540      return this.name == null ? null : this.name.getValue();
2541    }
2542
2543    /**
2544     * @param value A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
2545     */
2546    public SpecimenDefinition setName(String value) { 
2547      if (Utilities.noString(value))
2548        this.name = null;
2549      else {
2550        if (this.name == null)
2551          this.name = new StringType();
2552        this.name.setValue(value);
2553      }
2554      return this;
2555    }
2556
2557    /**
2558     * @return {@link #title} (A short, descriptive, user-friendly title for the SpecimenDefinition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2559     */
2560    public StringType getTitleElement() { 
2561      if (this.title == null)
2562        if (Configuration.errorOnAutoCreate())
2563          throw new Error("Attempt to auto-create SpecimenDefinition.title");
2564        else if (Configuration.doAutoCreate())
2565          this.title = new StringType(); // bb
2566      return this.title;
2567    }
2568
2569    public boolean hasTitleElement() { 
2570      return this.title != null && !this.title.isEmpty();
2571    }
2572
2573    public boolean hasTitle() { 
2574      return this.title != null && !this.title.isEmpty();
2575    }
2576
2577    /**
2578     * @param value {@link #title} (A short, descriptive, user-friendly title for the SpecimenDefinition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2579     */
2580    public SpecimenDefinition setTitleElement(StringType value) { 
2581      this.title = value;
2582      return this;
2583    }
2584
2585    /**
2586     * @return A short, descriptive, user-friendly title for the SpecimenDefinition.
2587     */
2588    public String getTitle() { 
2589      return this.title == null ? null : this.title.getValue();
2590    }
2591
2592    /**
2593     * @param value A short, descriptive, user-friendly title for the SpecimenDefinition.
2594     */
2595    public SpecimenDefinition setTitle(String value) { 
2596      if (Utilities.noString(value))
2597        this.title = null;
2598      else {
2599        if (this.title == null)
2600          this.title = new StringType();
2601        this.title.setValue(value);
2602      }
2603      return this;
2604    }
2605
2606    /**
2607     * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.)
2608     */
2609    public List<CanonicalType> getDerivedFromCanonical() { 
2610      if (this.derivedFromCanonical == null)
2611        this.derivedFromCanonical = new ArrayList<CanonicalType>();
2612      return this.derivedFromCanonical;
2613    }
2614
2615    /**
2616     * @return Returns a reference to <code>this</code> for easy method chaining
2617     */
2618    public SpecimenDefinition setDerivedFromCanonical(List<CanonicalType> theDerivedFromCanonical) { 
2619      this.derivedFromCanonical = theDerivedFromCanonical;
2620      return this;
2621    }
2622
2623    public boolean hasDerivedFromCanonical() { 
2624      if (this.derivedFromCanonical == null)
2625        return false;
2626      for (CanonicalType item : this.derivedFromCanonical)
2627        if (!item.isEmpty())
2628          return true;
2629      return false;
2630    }
2631
2632    /**
2633     * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.)
2634     */
2635    public CanonicalType addDerivedFromCanonicalElement() {//2 
2636      CanonicalType t = new CanonicalType();
2637      if (this.derivedFromCanonical == null)
2638        this.derivedFromCanonical = new ArrayList<CanonicalType>();
2639      this.derivedFromCanonical.add(t);
2640      return t;
2641    }
2642
2643    /**
2644     * @param value {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.)
2645     */
2646    public SpecimenDefinition addDerivedFromCanonical(String value) { //1
2647      CanonicalType t = new CanonicalType();
2648      t.setValue(value);
2649      if (this.derivedFromCanonical == null)
2650        this.derivedFromCanonical = new ArrayList<CanonicalType>();
2651      this.derivedFromCanonical.add(t);
2652      return this;
2653    }
2654
2655    /**
2656     * @param value {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.)
2657     */
2658    public boolean hasDerivedFromCanonical(String value) { 
2659      if (this.derivedFromCanonical == null)
2660        return false;
2661      for (CanonicalType v : this.derivedFromCanonical)
2662        if (v.getValue().equals(value)) // canonical
2663          return true;
2664      return false;
2665    }
2666
2667    /**
2668     * @return {@link #derivedFromUri} (The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.)
2669     */
2670    public List<UriType> getDerivedFromUri() { 
2671      if (this.derivedFromUri == null)
2672        this.derivedFromUri = new ArrayList<UriType>();
2673      return this.derivedFromUri;
2674    }
2675
2676    /**
2677     * @return Returns a reference to <code>this</code> for easy method chaining
2678     */
2679    public SpecimenDefinition setDerivedFromUri(List<UriType> theDerivedFromUri) { 
2680      this.derivedFromUri = theDerivedFromUri;
2681      return this;
2682    }
2683
2684    public boolean hasDerivedFromUri() { 
2685      if (this.derivedFromUri == null)
2686        return false;
2687      for (UriType item : this.derivedFromUri)
2688        if (!item.isEmpty())
2689          return true;
2690      return false;
2691    }
2692
2693    /**
2694     * @return {@link #derivedFromUri} (The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.)
2695     */
2696    public UriType addDerivedFromUriElement() {//2 
2697      UriType t = new UriType();
2698      if (this.derivedFromUri == null)
2699        this.derivedFromUri = new ArrayList<UriType>();
2700      this.derivedFromUri.add(t);
2701      return t;
2702    }
2703
2704    /**
2705     * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.)
2706     */
2707    public SpecimenDefinition addDerivedFromUri(String value) { //1
2708      UriType t = new UriType();
2709      t.setValue(value);
2710      if (this.derivedFromUri == null)
2711        this.derivedFromUri = new ArrayList<UriType>();
2712      this.derivedFromUri.add(t);
2713      return this;
2714    }
2715
2716    /**
2717     * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.)
2718     */
2719    public boolean hasDerivedFromUri(String value) { 
2720      if (this.derivedFromUri == null)
2721        return false;
2722      for (UriType v : this.derivedFromUri)
2723        if (v.getValue().equals(value)) // uri
2724          return true;
2725      return false;
2726    }
2727
2728    /**
2729     * @return {@link #status} (The current state of theSpecimenDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2730     */
2731    public Enumeration<PublicationStatus> getStatusElement() { 
2732      if (this.status == null)
2733        if (Configuration.errorOnAutoCreate())
2734          throw new Error("Attempt to auto-create SpecimenDefinition.status");
2735        else if (Configuration.doAutoCreate())
2736          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2737      return this.status;
2738    }
2739
2740    public boolean hasStatusElement() { 
2741      return this.status != null && !this.status.isEmpty();
2742    }
2743
2744    public boolean hasStatus() { 
2745      return this.status != null && !this.status.isEmpty();
2746    }
2747
2748    /**
2749     * @param value {@link #status} (The current state of theSpecimenDefinition.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
2750     */
2751    public SpecimenDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
2752      this.status = value;
2753      return this;
2754    }
2755
2756    /**
2757     * @return The current state of theSpecimenDefinition.
2758     */
2759    public PublicationStatus getStatus() { 
2760      return this.status == null ? null : this.status.getValue();
2761    }
2762
2763    /**
2764     * @param value The current state of theSpecimenDefinition.
2765     */
2766    public SpecimenDefinition setStatus(PublicationStatus value) { 
2767        if (this.status == null)
2768          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2769        this.status.setValue(value);
2770      return this;
2771    }
2772
2773    /**
2774     * @return {@link #experimental} (A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2775     */
2776    public BooleanType getExperimentalElement() { 
2777      if (this.experimental == null)
2778        if (Configuration.errorOnAutoCreate())
2779          throw new Error("Attempt to auto-create SpecimenDefinition.experimental");
2780        else if (Configuration.doAutoCreate())
2781          this.experimental = new BooleanType(); // bb
2782      return this.experimental;
2783    }
2784
2785    public boolean hasExperimentalElement() { 
2786      return this.experimental != null && !this.experimental.isEmpty();
2787    }
2788
2789    public boolean hasExperimental() { 
2790      return this.experimental != null && !this.experimental.isEmpty();
2791    }
2792
2793    /**
2794     * @param value {@link #experimental} (A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2795     */
2796    public SpecimenDefinition setExperimentalElement(BooleanType value) { 
2797      this.experimental = value;
2798      return this;
2799    }
2800
2801    /**
2802     * @return A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.
2803     */
2804    public boolean getExperimental() { 
2805      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2806    }
2807
2808    /**
2809     * @param value A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.
2810     */
2811    public SpecimenDefinition setExperimental(boolean value) { 
2812        if (this.experimental == null)
2813          this.experimental = new BooleanType();
2814        this.experimental.setValue(value);
2815      return this;
2816    }
2817
2818    /**
2819     * @return {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2820     */
2821    public DataType getSubject() { 
2822      return this.subject;
2823    }
2824
2825    /**
2826     * @return {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2827     */
2828    public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 
2829      if (this.subject == null)
2830        this.subject = new CodeableConcept();
2831      if (!(this.subject instanceof CodeableConcept))
2832        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered");
2833      return (CodeableConcept) this.subject;
2834    }
2835
2836    public boolean hasSubjectCodeableConcept() { 
2837      return this != null && this.subject instanceof CodeableConcept;
2838    }
2839
2840    /**
2841     * @return {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2842     */
2843    public Reference getSubjectReference() throws FHIRException { 
2844      if (this.subject == null)
2845        this.subject = new Reference();
2846      if (!(this.subject instanceof Reference))
2847        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered");
2848      return (Reference) this.subject;
2849    }
2850
2851    public boolean hasSubjectReference() { 
2852      return this != null && this.subject instanceof Reference;
2853    }
2854
2855    public boolean hasSubject() { 
2856      return this.subject != null && !this.subject.isEmpty();
2857    }
2858
2859    /**
2860     * @param value {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2861     */
2862    public SpecimenDefinition setSubject(DataType value) { 
2863      if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
2864        throw new FHIRException("Not the right type for SpecimenDefinition.subject[x]: "+value.fhirType());
2865      this.subject = value;
2866      return this;
2867    }
2868
2869    /**
2870     * @return {@link #date} (For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2871     */
2872    public DateTimeType getDateElement() { 
2873      if (this.date == null)
2874        if (Configuration.errorOnAutoCreate())
2875          throw new Error("Attempt to auto-create SpecimenDefinition.date");
2876        else if (Configuration.doAutoCreate())
2877          this.date = new DateTimeType(); // bb
2878      return this.date;
2879    }
2880
2881    public boolean hasDateElement() { 
2882      return this.date != null && !this.date.isEmpty();
2883    }
2884
2885    public boolean hasDate() { 
2886      return this.date != null && !this.date.isEmpty();
2887    }
2888
2889    /**
2890     * @param value {@link #date} (For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2891     */
2892    public SpecimenDefinition setDateElement(DateTimeType value) { 
2893      this.date = value;
2894      return this;
2895    }
2896
2897    /**
2898     * @return For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.
2899     */
2900    public Date getDate() { 
2901      return this.date == null ? null : this.date.getValue();
2902    }
2903
2904    /**
2905     * @param value For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.
2906     */
2907    public SpecimenDefinition setDate(Date value) { 
2908      if (value == null)
2909        this.date = null;
2910      else {
2911        if (this.date == null)
2912          this.date = new DateTimeType();
2913        this.date.setValue(value);
2914      }
2915      return this;
2916    }
2917
2918    /**
2919     * @return {@link #publisher} (Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2920     */
2921    public StringType getPublisherElement() { 
2922      if (this.publisher == null)
2923        if (Configuration.errorOnAutoCreate())
2924          throw new Error("Attempt to auto-create SpecimenDefinition.publisher");
2925        else if (Configuration.doAutoCreate())
2926          this.publisher = new StringType(); // bb
2927      return this.publisher;
2928    }
2929
2930    public boolean hasPublisherElement() { 
2931      return this.publisher != null && !this.publisher.isEmpty();
2932    }
2933
2934    public boolean hasPublisher() { 
2935      return this.publisher != null && !this.publisher.isEmpty();
2936    }
2937
2938    /**
2939     * @param value {@link #publisher} (Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2940     */
2941    public SpecimenDefinition setPublisherElement(StringType value) { 
2942      this.publisher = value;
2943      return this;
2944    }
2945
2946    /**
2947     * @return Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.
2948     */
2949    public String getPublisher() { 
2950      return this.publisher == null ? null : this.publisher.getValue();
2951    }
2952
2953    /**
2954     * @param value Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.
2955     */
2956    public SpecimenDefinition setPublisher(String value) { 
2957      if (Utilities.noString(value))
2958        this.publisher = null;
2959      else {
2960        if (this.publisher == null)
2961          this.publisher = new StringType();
2962        this.publisher.setValue(value);
2963      }
2964      return this;
2965    }
2966
2967    /**
2968     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2969     */
2970    public List<ContactDetail> getContact() { 
2971      if (this.contact == null)
2972        this.contact = new ArrayList<ContactDetail>();
2973      return this.contact;
2974    }
2975
2976    /**
2977     * @return Returns a reference to <code>this</code> for easy method chaining
2978     */
2979    public SpecimenDefinition setContact(List<ContactDetail> theContact) { 
2980      this.contact = theContact;
2981      return this;
2982    }
2983
2984    public boolean hasContact() { 
2985      if (this.contact == null)
2986        return false;
2987      for (ContactDetail item : this.contact)
2988        if (!item.isEmpty())
2989          return true;
2990      return false;
2991    }
2992
2993    public ContactDetail addContact() { //3
2994      ContactDetail t = new ContactDetail();
2995      if (this.contact == null)
2996        this.contact = new ArrayList<ContactDetail>();
2997      this.contact.add(t);
2998      return t;
2999    }
3000
3001    public SpecimenDefinition addContact(ContactDetail t) { //3
3002      if (t == null)
3003        return this;
3004      if (this.contact == null)
3005        this.contact = new ArrayList<ContactDetail>();
3006      this.contact.add(t);
3007      return this;
3008    }
3009
3010    /**
3011     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
3012     */
3013    public ContactDetail getContactFirstRep() { 
3014      if (getContact().isEmpty()) {
3015        addContact();
3016      }
3017      return getContact().get(0);
3018    }
3019
3020    /**
3021     * @return {@link #description} (A free text natural language description of the SpecimenDefinition from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3022     */
3023    public MarkdownType getDescriptionElement() { 
3024      if (this.description == null)
3025        if (Configuration.errorOnAutoCreate())
3026          throw new Error("Attempt to auto-create SpecimenDefinition.description");
3027        else if (Configuration.doAutoCreate())
3028          this.description = new MarkdownType(); // bb
3029      return this.description;
3030    }
3031
3032    public boolean hasDescriptionElement() { 
3033      return this.description != null && !this.description.isEmpty();
3034    }
3035
3036    public boolean hasDescription() { 
3037      return this.description != null && !this.description.isEmpty();
3038    }
3039
3040    /**
3041     * @param value {@link #description} (A free text natural language description of the SpecimenDefinition from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3042     */
3043    public SpecimenDefinition setDescriptionElement(MarkdownType value) { 
3044      this.description = value;
3045      return this;
3046    }
3047
3048    /**
3049     * @return A free text natural language description of the SpecimenDefinition from the consumer's perspective.
3050     */
3051    public String getDescription() { 
3052      return this.description == null ? null : this.description.getValue();
3053    }
3054
3055    /**
3056     * @param value A free text natural language description of the SpecimenDefinition from the consumer's perspective.
3057     */
3058    public SpecimenDefinition setDescription(String value) { 
3059      if (Utilities.noString(value))
3060        this.description = null;
3061      else {
3062        if (this.description == null)
3063          this.description = new MarkdownType();
3064        this.description.setValue(value);
3065      }
3066      return this;
3067    }
3068
3069    /**
3070     * @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 specimen definitions.)
3071     */
3072    public List<UsageContext> getUseContext() { 
3073      if (this.useContext == null)
3074        this.useContext = new ArrayList<UsageContext>();
3075      return this.useContext;
3076    }
3077
3078    /**
3079     * @return Returns a reference to <code>this</code> for easy method chaining
3080     */
3081    public SpecimenDefinition setUseContext(List<UsageContext> theUseContext) { 
3082      this.useContext = theUseContext;
3083      return this;
3084    }
3085
3086    public boolean hasUseContext() { 
3087      if (this.useContext == null)
3088        return false;
3089      for (UsageContext item : this.useContext)
3090        if (!item.isEmpty())
3091          return true;
3092      return false;
3093    }
3094
3095    public UsageContext addUseContext() { //3
3096      UsageContext t = new UsageContext();
3097      if (this.useContext == null)
3098        this.useContext = new ArrayList<UsageContext>();
3099      this.useContext.add(t);
3100      return t;
3101    }
3102
3103    public SpecimenDefinition addUseContext(UsageContext t) { //3
3104      if (t == null)
3105        return this;
3106      if (this.useContext == null)
3107        this.useContext = new ArrayList<UsageContext>();
3108      this.useContext.add(t);
3109      return this;
3110    }
3111
3112    /**
3113     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
3114     */
3115    public UsageContext getUseContextFirstRep() { 
3116      if (getUseContext().isEmpty()) {
3117        addUseContext();
3118      }
3119      return getUseContext().get(0);
3120    }
3121
3122    /**
3123     * @return {@link #jurisdiction} (A jurisdiction in which the SpecimenDefinition is intended to be used.)
3124     */
3125    public List<CodeableConcept> getJurisdiction() { 
3126      if (this.jurisdiction == null)
3127        this.jurisdiction = new ArrayList<CodeableConcept>();
3128      return this.jurisdiction;
3129    }
3130
3131    /**
3132     * @return Returns a reference to <code>this</code> for easy method chaining
3133     */
3134    public SpecimenDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
3135      this.jurisdiction = theJurisdiction;
3136      return this;
3137    }
3138
3139    public boolean hasJurisdiction() { 
3140      if (this.jurisdiction == null)
3141        return false;
3142      for (CodeableConcept item : this.jurisdiction)
3143        if (!item.isEmpty())
3144          return true;
3145      return false;
3146    }
3147
3148    public CodeableConcept addJurisdiction() { //3
3149      CodeableConcept t = new CodeableConcept();
3150      if (this.jurisdiction == null)
3151        this.jurisdiction = new ArrayList<CodeableConcept>();
3152      this.jurisdiction.add(t);
3153      return t;
3154    }
3155
3156    public SpecimenDefinition addJurisdiction(CodeableConcept t) { //3
3157      if (t == null)
3158        return this;
3159      if (this.jurisdiction == null)
3160        this.jurisdiction = new ArrayList<CodeableConcept>();
3161      this.jurisdiction.add(t);
3162      return this;
3163    }
3164
3165    /**
3166     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
3167     */
3168    public CodeableConcept getJurisdictionFirstRep() { 
3169      if (getJurisdiction().isEmpty()) {
3170        addJurisdiction();
3171      }
3172      return getJurisdiction().get(0);
3173    }
3174
3175    /**
3176     * @return {@link #purpose} (Explains why this SpecimeDefinition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
3177     */
3178    public MarkdownType getPurposeElement() { 
3179      if (this.purpose == null)
3180        if (Configuration.errorOnAutoCreate())
3181          throw new Error("Attempt to auto-create SpecimenDefinition.purpose");
3182        else if (Configuration.doAutoCreate())
3183          this.purpose = new MarkdownType(); // bb
3184      return this.purpose;
3185    }
3186
3187    public boolean hasPurposeElement() { 
3188      return this.purpose != null && !this.purpose.isEmpty();
3189    }
3190
3191    public boolean hasPurpose() { 
3192      return this.purpose != null && !this.purpose.isEmpty();
3193    }
3194
3195    /**
3196     * @param value {@link #purpose} (Explains why this SpecimeDefinition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
3197     */
3198    public SpecimenDefinition setPurposeElement(MarkdownType value) { 
3199      this.purpose = value;
3200      return this;
3201    }
3202
3203    /**
3204     * @return Explains why this SpecimeDefinition is needed and why it has been designed as it has.
3205     */
3206    public String getPurpose() { 
3207      return this.purpose == null ? null : this.purpose.getValue();
3208    }
3209
3210    /**
3211     * @param value Explains why this SpecimeDefinition is needed and why it has been designed as it has.
3212     */
3213    public SpecimenDefinition setPurpose(String value) { 
3214      if (Utilities.noString(value))
3215        this.purpose = null;
3216      else {
3217        if (this.purpose == null)
3218          this.purpose = new MarkdownType();
3219        this.purpose.setValue(value);
3220      }
3221      return this;
3222    }
3223
3224    /**
3225     * @return {@link #copyright} (Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
3226     */
3227    public MarkdownType getCopyrightElement() { 
3228      if (this.copyright == null)
3229        if (Configuration.errorOnAutoCreate())
3230          throw new Error("Attempt to auto-create SpecimenDefinition.copyright");
3231        else if (Configuration.doAutoCreate())
3232          this.copyright = new MarkdownType(); // bb
3233      return this.copyright;
3234    }
3235
3236    public boolean hasCopyrightElement() { 
3237      return this.copyright != null && !this.copyright.isEmpty();
3238    }
3239
3240    public boolean hasCopyright() { 
3241      return this.copyright != null && !this.copyright.isEmpty();
3242    }
3243
3244    /**
3245     * @param value {@link #copyright} (Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
3246     */
3247    public SpecimenDefinition setCopyrightElement(MarkdownType value) { 
3248      this.copyright = value;
3249      return this;
3250    }
3251
3252    /**
3253     * @return Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.
3254     */
3255    public String getCopyright() { 
3256      return this.copyright == null ? null : this.copyright.getValue();
3257    }
3258
3259    /**
3260     * @param value Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.
3261     */
3262    public SpecimenDefinition setCopyright(String value) { 
3263      if (Utilities.noString(value))
3264        this.copyright = null;
3265      else {
3266        if (this.copyright == null)
3267          this.copyright = new MarkdownType();
3268        this.copyright.setValue(value);
3269      }
3270      return this;
3271    }
3272
3273    /**
3274     * @return {@link #copyrightLabel} (A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').). This is the underlying object with id, value and extensions. The accessor "getCopyrightLabel" gives direct access to the value
3275     */
3276    public StringType getCopyrightLabelElement() { 
3277      if (this.copyrightLabel == null)
3278        if (Configuration.errorOnAutoCreate())
3279          throw new Error("Attempt to auto-create SpecimenDefinition.copyrightLabel");
3280        else if (Configuration.doAutoCreate())
3281          this.copyrightLabel = new StringType(); // bb
3282      return this.copyrightLabel;
3283    }
3284
3285    public boolean hasCopyrightLabelElement() { 
3286      return this.copyrightLabel != null && !this.copyrightLabel.isEmpty();
3287    }
3288
3289    public boolean hasCopyrightLabel() { 
3290      return this.copyrightLabel != null && !this.copyrightLabel.isEmpty();
3291    }
3292
3293    /**
3294     * @param value {@link #copyrightLabel} (A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').). This is the underlying object with id, value and extensions. The accessor "getCopyrightLabel" gives direct access to the value
3295     */
3296    public SpecimenDefinition setCopyrightLabelElement(StringType value) { 
3297      this.copyrightLabel = value;
3298      return this;
3299    }
3300
3301    /**
3302     * @return A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').
3303     */
3304    public String getCopyrightLabel() { 
3305      return this.copyrightLabel == null ? null : this.copyrightLabel.getValue();
3306    }
3307
3308    /**
3309     * @param value A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').
3310     */
3311    public SpecimenDefinition setCopyrightLabel(String value) { 
3312      if (Utilities.noString(value))
3313        this.copyrightLabel = null;
3314      else {
3315        if (this.copyrightLabel == null)
3316          this.copyrightLabel = new StringType();
3317        this.copyrightLabel.setValue(value);
3318      }
3319      return this;
3320    }
3321
3322    /**
3323     * @return {@link #approvalDate} (The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
3324     */
3325    public DateType getApprovalDateElement() { 
3326      if (this.approvalDate == null)
3327        if (Configuration.errorOnAutoCreate())
3328          throw new Error("Attempt to auto-create SpecimenDefinition.approvalDate");
3329        else if (Configuration.doAutoCreate())
3330          this.approvalDate = new DateType(); // bb
3331      return this.approvalDate;
3332    }
3333
3334    public boolean hasApprovalDateElement() { 
3335      return this.approvalDate != null && !this.approvalDate.isEmpty();
3336    }
3337
3338    public boolean hasApprovalDate() { 
3339      return this.approvalDate != null && !this.approvalDate.isEmpty();
3340    }
3341
3342    /**
3343     * @param value {@link #approvalDate} (The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
3344     */
3345    public SpecimenDefinition setApprovalDateElement(DateType value) { 
3346      this.approvalDate = value;
3347      return this;
3348    }
3349
3350    /**
3351     * @return The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
3352     */
3353    public Date getApprovalDate() { 
3354      return this.approvalDate == null ? null : this.approvalDate.getValue();
3355    }
3356
3357    /**
3358     * @param value The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
3359     */
3360    public SpecimenDefinition setApprovalDate(Date value) { 
3361      if (value == null)
3362        this.approvalDate = null;
3363      else {
3364        if (this.approvalDate == null)
3365          this.approvalDate = new DateType();
3366        this.approvalDate.setValue(value);
3367      }
3368      return this;
3369    }
3370
3371    /**
3372     * @return {@link #lastReviewDate} (The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
3373     */
3374    public DateType getLastReviewDateElement() { 
3375      if (this.lastReviewDate == null)
3376        if (Configuration.errorOnAutoCreate())
3377          throw new Error("Attempt to auto-create SpecimenDefinition.lastReviewDate");
3378        else if (Configuration.doAutoCreate())
3379          this.lastReviewDate = new DateType(); // bb
3380      return this.lastReviewDate;
3381    }
3382
3383    public boolean hasLastReviewDateElement() { 
3384      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3385    }
3386
3387    public boolean hasLastReviewDate() { 
3388      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3389    }
3390
3391    /**
3392     * @param value {@link #lastReviewDate} (The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
3393     */
3394    public SpecimenDefinition setLastReviewDateElement(DateType value) { 
3395      this.lastReviewDate = value;
3396      return this;
3397    }
3398
3399    /**
3400     * @return The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
3401     */
3402    public Date getLastReviewDate() { 
3403      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
3404    }
3405
3406    /**
3407     * @param value The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
3408     */
3409    public SpecimenDefinition setLastReviewDate(Date value) { 
3410      if (value == null)
3411        this.lastReviewDate = null;
3412      else {
3413        if (this.lastReviewDate == null)
3414          this.lastReviewDate = new DateType();
3415        this.lastReviewDate.setValue(value);
3416      }
3417      return this;
3418    }
3419
3420    /**
3421     * @return {@link #effectivePeriod} (The period during which the SpecimenDefinition content was or is planned to be effective.)
3422     */
3423    public Period getEffectivePeriod() { 
3424      if (this.effectivePeriod == null)
3425        if (Configuration.errorOnAutoCreate())
3426          throw new Error("Attempt to auto-create SpecimenDefinition.effectivePeriod");
3427        else if (Configuration.doAutoCreate())
3428          this.effectivePeriod = new Period(); // cc
3429      return this.effectivePeriod;
3430    }
3431
3432    public boolean hasEffectivePeriod() { 
3433      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
3434    }
3435
3436    /**
3437     * @param value {@link #effectivePeriod} (The period during which the SpecimenDefinition content was or is planned to be effective.)
3438     */
3439    public SpecimenDefinition setEffectivePeriod(Period value) { 
3440      this.effectivePeriod = value;
3441      return this;
3442    }
3443
3444    /**
3445     * @return {@link #typeCollected} (The kind of material to be collected.)
3446     */
3447    public CodeableConcept getTypeCollected() { 
3448      if (this.typeCollected == null)
3449        if (Configuration.errorOnAutoCreate())
3450          throw new Error("Attempt to auto-create SpecimenDefinition.typeCollected");
3451        else if (Configuration.doAutoCreate())
3452          this.typeCollected = new CodeableConcept(); // cc
3453      return this.typeCollected;
3454    }
3455
3456    public boolean hasTypeCollected() { 
3457      return this.typeCollected != null && !this.typeCollected.isEmpty();
3458    }
3459
3460    /**
3461     * @param value {@link #typeCollected} (The kind of material to be collected.)
3462     */
3463    public SpecimenDefinition setTypeCollected(CodeableConcept value) { 
3464      this.typeCollected = value;
3465      return this;
3466    }
3467
3468    /**
3469     * @return {@link #patientPreparation} (Preparation of the patient for specimen collection.)
3470     */
3471    public List<CodeableConcept> getPatientPreparation() { 
3472      if (this.patientPreparation == null)
3473        this.patientPreparation = new ArrayList<CodeableConcept>();
3474      return this.patientPreparation;
3475    }
3476
3477    /**
3478     * @return Returns a reference to <code>this</code> for easy method chaining
3479     */
3480    public SpecimenDefinition setPatientPreparation(List<CodeableConcept> thePatientPreparation) { 
3481      this.patientPreparation = thePatientPreparation;
3482      return this;
3483    }
3484
3485    public boolean hasPatientPreparation() { 
3486      if (this.patientPreparation == null)
3487        return false;
3488      for (CodeableConcept item : this.patientPreparation)
3489        if (!item.isEmpty())
3490          return true;
3491      return false;
3492    }
3493
3494    public CodeableConcept addPatientPreparation() { //3
3495      CodeableConcept t = new CodeableConcept();
3496      if (this.patientPreparation == null)
3497        this.patientPreparation = new ArrayList<CodeableConcept>();
3498      this.patientPreparation.add(t);
3499      return t;
3500    }
3501
3502    public SpecimenDefinition addPatientPreparation(CodeableConcept t) { //3
3503      if (t == null)
3504        return this;
3505      if (this.patientPreparation == null)
3506        this.patientPreparation = new ArrayList<CodeableConcept>();
3507      this.patientPreparation.add(t);
3508      return this;
3509    }
3510
3511    /**
3512     * @return The first repetition of repeating field {@link #patientPreparation}, creating it if it does not already exist {3}
3513     */
3514    public CodeableConcept getPatientPreparationFirstRep() { 
3515      if (getPatientPreparation().isEmpty()) {
3516        addPatientPreparation();
3517      }
3518      return getPatientPreparation().get(0);
3519    }
3520
3521    /**
3522     * @return {@link #timeAspect} (Time aspect of specimen collection (duration or offset).). This is the underlying object with id, value and extensions. The accessor "getTimeAspect" gives direct access to the value
3523     */
3524    public StringType getTimeAspectElement() { 
3525      if (this.timeAspect == null)
3526        if (Configuration.errorOnAutoCreate())
3527          throw new Error("Attempt to auto-create SpecimenDefinition.timeAspect");
3528        else if (Configuration.doAutoCreate())
3529          this.timeAspect = new StringType(); // bb
3530      return this.timeAspect;
3531    }
3532
3533    public boolean hasTimeAspectElement() { 
3534      return this.timeAspect != null && !this.timeAspect.isEmpty();
3535    }
3536
3537    public boolean hasTimeAspect() { 
3538      return this.timeAspect != null && !this.timeAspect.isEmpty();
3539    }
3540
3541    /**
3542     * @param value {@link #timeAspect} (Time aspect of specimen collection (duration or offset).). This is the underlying object with id, value and extensions. The accessor "getTimeAspect" gives direct access to the value
3543     */
3544    public SpecimenDefinition setTimeAspectElement(StringType value) { 
3545      this.timeAspect = value;
3546      return this;
3547    }
3548
3549    /**
3550     * @return Time aspect of specimen collection (duration or offset).
3551     */
3552    public String getTimeAspect() { 
3553      return this.timeAspect == null ? null : this.timeAspect.getValue();
3554    }
3555
3556    /**
3557     * @param value Time aspect of specimen collection (duration or offset).
3558     */
3559    public SpecimenDefinition setTimeAspect(String value) { 
3560      if (Utilities.noString(value))
3561        this.timeAspect = null;
3562      else {
3563        if (this.timeAspect == null)
3564          this.timeAspect = new StringType();
3565        this.timeAspect.setValue(value);
3566      }
3567      return this;
3568    }
3569
3570    /**
3571     * @return {@link #collection} (The action to be performed for collecting the specimen.)
3572     */
3573    public List<CodeableConcept> getCollection() { 
3574      if (this.collection == null)
3575        this.collection = new ArrayList<CodeableConcept>();
3576      return this.collection;
3577    }
3578
3579    /**
3580     * @return Returns a reference to <code>this</code> for easy method chaining
3581     */
3582    public SpecimenDefinition setCollection(List<CodeableConcept> theCollection) { 
3583      this.collection = theCollection;
3584      return this;
3585    }
3586
3587    public boolean hasCollection() { 
3588      if (this.collection == null)
3589        return false;
3590      for (CodeableConcept item : this.collection)
3591        if (!item.isEmpty())
3592          return true;
3593      return false;
3594    }
3595
3596    public CodeableConcept addCollection() { //3
3597      CodeableConcept t = new CodeableConcept();
3598      if (this.collection == null)
3599        this.collection = new ArrayList<CodeableConcept>();
3600      this.collection.add(t);
3601      return t;
3602    }
3603
3604    public SpecimenDefinition addCollection(CodeableConcept t) { //3
3605      if (t == null)
3606        return this;
3607      if (this.collection == null)
3608        this.collection = new ArrayList<CodeableConcept>();
3609      this.collection.add(t);
3610      return this;
3611    }
3612
3613    /**
3614     * @return The first repetition of repeating field {@link #collection}, creating it if it does not already exist {3}
3615     */
3616    public CodeableConcept getCollectionFirstRep() { 
3617      if (getCollection().isEmpty()) {
3618        addCollection();
3619      }
3620      return getCollection().get(0);
3621    }
3622
3623    /**
3624     * @return {@link #typeTested} (Specimen conditioned in a container as expected by the testing laboratory.)
3625     */
3626    public List<SpecimenDefinitionTypeTestedComponent> getTypeTested() { 
3627      if (this.typeTested == null)
3628        this.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
3629      return this.typeTested;
3630    }
3631
3632    /**
3633     * @return Returns a reference to <code>this</code> for easy method chaining
3634     */
3635    public SpecimenDefinition setTypeTested(List<SpecimenDefinitionTypeTestedComponent> theTypeTested) { 
3636      this.typeTested = theTypeTested;
3637      return this;
3638    }
3639
3640    public boolean hasTypeTested() { 
3641      if (this.typeTested == null)
3642        return false;
3643      for (SpecimenDefinitionTypeTestedComponent item : this.typeTested)
3644        if (!item.isEmpty())
3645          return true;
3646      return false;
3647    }
3648
3649    public SpecimenDefinitionTypeTestedComponent addTypeTested() { //3
3650      SpecimenDefinitionTypeTestedComponent t = new SpecimenDefinitionTypeTestedComponent();
3651      if (this.typeTested == null)
3652        this.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
3653      this.typeTested.add(t);
3654      return t;
3655    }
3656
3657    public SpecimenDefinition addTypeTested(SpecimenDefinitionTypeTestedComponent t) { //3
3658      if (t == null)
3659        return this;
3660      if (this.typeTested == null)
3661        this.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
3662      this.typeTested.add(t);
3663      return this;
3664    }
3665
3666    /**
3667     * @return The first repetition of repeating field {@link #typeTested}, creating it if it does not already exist {3}
3668     */
3669    public SpecimenDefinitionTypeTestedComponent getTypeTestedFirstRep() { 
3670      if (getTypeTested().isEmpty()) {
3671        addTypeTested();
3672      }
3673      return getTypeTested().get(0);
3674    }
3675
3676      protected void listChildren(List<Property> children) {
3677        super.listChildren(children);
3678        children.add(new Property("url", "uri", "An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.", 0, 1, url));
3679        children.add(new Property("identifier", "Identifier", "A business identifier assigned to this SpecimenDefinition.", 0, 1, identifier));
3680        children.add(new Property("version", "string", "The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.", 0, 1, version));
3681        children.add(new Property("versionAlgorithm[x]", "string|Coding", "Indicates the mechanism used to compare versions to determine which is more current.", 0, 1, versionAlgorithm));
3682        children.add(new Property("name", "string", "A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
3683        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the SpecimenDefinition.", 0, 1, title));
3684        children.add(new Property("derivedFromCanonical", "canonical(SpecimenDefinition)", "The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromCanonical));
3685        children.add(new Property("derivedFromUri", "uri", "The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromUri));
3686        children.add(new Property("status", "code", "The current state of theSpecimenDefinition.", 0, 1, status));
3687        children.add(new Property("experimental", "boolean", "A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.", 0, 1, experimental));
3688        children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.", 0, 1, subject));
3689        children.add(new Property("date", "dateTime", "For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.", 0, 1, date));
3690        children.add(new Property("publisher", "string", "Helps establish the \"authority/credibility\" of the SpecimenDefinition. May also allow for contact.", 0, 1, publisher));
3691        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
3692        children.add(new Property("description", "markdown", "A free text natural language description of the SpecimenDefinition from the consumer's perspective.", 0, 1, description));
3693        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of specimen definitions.", 0, java.lang.Integer.MAX_VALUE, useContext));
3694        children.add(new Property("jurisdiction", "CodeableConcept", "A jurisdiction in which the SpecimenDefinition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
3695        children.add(new Property("purpose", "markdown", "Explains why this SpecimeDefinition is needed and why it has been designed as it has.", 0, 1, purpose));
3696        children.add(new Property("copyright", "markdown", "Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.", 0, 1, copyright));
3697        children.add(new Property("copyrightLabel", "string", "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').", 0, 1, copyrightLabel));
3698        children.add(new Property("approvalDate", "date", "The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate));
3699        children.add(new Property("lastReviewDate", "date", "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.", 0, 1, lastReviewDate));
3700        children.add(new Property("effectivePeriod", "Period", "The period during which the SpecimenDefinition content was or is planned to be effective.", 0, 1, effectivePeriod));
3701        children.add(new Property("typeCollected", "CodeableConcept", "The kind of material to be collected.", 0, 1, typeCollected));
3702        children.add(new Property("patientPreparation", "CodeableConcept", "Preparation of the patient for specimen collection.", 0, java.lang.Integer.MAX_VALUE, patientPreparation));
3703        children.add(new Property("timeAspect", "string", "Time aspect of specimen collection (duration or offset).", 0, 1, timeAspect));
3704        children.add(new Property("collection", "CodeableConcept", "The action to be performed for collecting the specimen.", 0, java.lang.Integer.MAX_VALUE, collection));
3705        children.add(new Property("typeTested", "", "Specimen conditioned in a container as expected by the testing laboratory.", 0, java.lang.Integer.MAX_VALUE, typeTested));
3706      }
3707
3708      @Override
3709      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3710        switch (_hash) {
3711        case 116079: /*url*/  return new Property("url", "uri", "An absolute URL that is used to identify this SpecimenDefinition 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 SpecimenDefinition is (or will be) published. The URL SHOULD include the major version of the SpecimenDefinition. For more information see Technical and Business Versions.", 0, 1, url);
3712        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A business identifier assigned to this SpecimenDefinition.", 0, 1, identifier);
3713        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the SpecimenDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the SpecimenDefinition author and is not expected to be globally unique.", 0, 1, version);
3714        case -115699031: /*versionAlgorithm[x]*/  return new Property("versionAlgorithm[x]", "string|Coding", "Indicates the mechanism used to compare versions to determine which is more current.", 0, 1, versionAlgorithm);
3715        case 1508158071: /*versionAlgorithm*/  return new Property("versionAlgorithm[x]", "string|Coding", "Indicates the mechanism used to compare versions to determine which is more current.", 0, 1, versionAlgorithm);
3716        case 1836908904: /*versionAlgorithmString*/  return new Property("versionAlgorithm[x]", "string", "Indicates the mechanism used to compare versions to determine which is more current.", 0, 1, versionAlgorithm);
3717        case 1373807809: /*versionAlgorithmCoding*/  return new Property("versionAlgorithm[x]", "Coding", "Indicates the mechanism used to compare versions to determine which is more current.", 0, 1, versionAlgorithm);
3718        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the specimen definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
3719        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the SpecimenDefinition.", 0, 1, title);
3720        case -978133683: /*derivedFromCanonical*/  return new Property("derivedFromCanonical", "canonical(SpecimenDefinition)", "The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromCanonical);
3721        case -1076333435: /*derivedFromUri*/  return new Property("derivedFromUri", "uri", "The URL pointing to an externally-defined type of specimen, guideline or other definition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromUri);
3722        case -892481550: /*status*/  return new Property("status", "code", "The current state of theSpecimenDefinition.", 0, 1, status);
3723        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.", 0, 1, experimental);
3724        case -573640748: /*subject[x]*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.", 0, 1, subject);
3725        case -1867885268: /*subject*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)", "A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.", 0, 1, subject);
3726        case -1257122603: /*subjectCodeableConcept*/  return new Property("subject[x]", "CodeableConcept", "A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.", 0, 1, subject);
3727        case 772938623: /*subjectReference*/  return new Property("subject[x]", "Reference(Group)", "A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.", 0, 1, subject);
3728        case 3076014: /*date*/  return new Property("date", "dateTime", "For draft definitions, indicates the date of initial creation. For active definitions, represents the date of activation. For withdrawn definitions, indicates the date of withdrawal.", 0, 1, date);
3729        case 1447404028: /*publisher*/  return new Property("publisher", "string", "Helps establish the \"authority/credibility\" of the SpecimenDefinition. May also allow for contact.", 0, 1, publisher);
3730        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
3731        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the SpecimenDefinition from the consumer's perspective.", 0, 1, description);
3732        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of specimen definitions.", 0, java.lang.Integer.MAX_VALUE, useContext);
3733        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A jurisdiction in which the SpecimenDefinition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
3734        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explains why this SpecimeDefinition is needed and why it has been designed as it has.", 0, 1, purpose);
3735        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.", 0, 1, copyright);
3736        case 765157229: /*copyrightLabel*/  return new Property("copyrightLabel", "string", "A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').", 0, 1, copyrightLabel);
3737        case 223539345: /*approvalDate*/  return new Property("approvalDate", "date", "The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate);
3738        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.", 0, 1, lastReviewDate);
3739        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the SpecimenDefinition content was or is planned to be effective.", 0, 1, effectivePeriod);
3740        case 588504367: /*typeCollected*/  return new Property("typeCollected", "CodeableConcept", "The kind of material to be collected.", 0, 1, typeCollected);
3741        case -879411630: /*patientPreparation*/  return new Property("patientPreparation", "CodeableConcept", "Preparation of the patient for specimen collection.", 0, java.lang.Integer.MAX_VALUE, patientPreparation);
3742        case 276972933: /*timeAspect*/  return new Property("timeAspect", "string", "Time aspect of specimen collection (duration or offset).", 0, 1, timeAspect);
3743        case -1741312354: /*collection*/  return new Property("collection", "CodeableConcept", "The action to be performed for collecting the specimen.", 0, java.lang.Integer.MAX_VALUE, collection);
3744        case -1407902581: /*typeTested*/  return new Property("typeTested", "", "Specimen conditioned in a container as expected by the testing laboratory.", 0, java.lang.Integer.MAX_VALUE, typeTested);
3745        default: return super.getNamedProperty(_hash, _name, _checkValid);
3746        }
3747
3748      }
3749
3750      @Override
3751      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3752        switch (hash) {
3753        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3754        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
3755        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3756        case 1508158071: /*versionAlgorithm*/ return this.versionAlgorithm == null ? new Base[0] : new Base[] {this.versionAlgorithm}; // DataType
3757        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3758        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3759        case -978133683: /*derivedFromCanonical*/ return this.derivedFromCanonical == null ? new Base[0] : this.derivedFromCanonical.toArray(new Base[this.derivedFromCanonical.size()]); // CanonicalType
3760        case -1076333435: /*derivedFromUri*/ return this.derivedFromUri == null ? new Base[0] : this.derivedFromUri.toArray(new Base[this.derivedFromUri.size()]); // UriType
3761        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3762        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3763        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // DataType
3764        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3765        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3766        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3767        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3768        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3769        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3770        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
3771        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
3772        case 765157229: /*copyrightLabel*/ return this.copyrightLabel == null ? new Base[0] : new Base[] {this.copyrightLabel}; // StringType
3773        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
3774        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
3775        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
3776        case 588504367: /*typeCollected*/ return this.typeCollected == null ? new Base[0] : new Base[] {this.typeCollected}; // CodeableConcept
3777        case -879411630: /*patientPreparation*/ return this.patientPreparation == null ? new Base[0] : this.patientPreparation.toArray(new Base[this.patientPreparation.size()]); // CodeableConcept
3778        case 276972933: /*timeAspect*/ return this.timeAspect == null ? new Base[0] : new Base[] {this.timeAspect}; // StringType
3779        case -1741312354: /*collection*/ return this.collection == null ? new Base[0] : this.collection.toArray(new Base[this.collection.size()]); // CodeableConcept
3780        case -1407902581: /*typeTested*/ return this.typeTested == null ? new Base[0] : this.typeTested.toArray(new Base[this.typeTested.size()]); // SpecimenDefinitionTypeTestedComponent
3781        default: return super.getProperty(hash, name, checkValid);
3782        }
3783
3784      }
3785
3786      @Override
3787      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3788        switch (hash) {
3789        case 116079: // url
3790          this.url = TypeConvertor.castToUri(value); // UriType
3791          return value;
3792        case -1618432855: // identifier
3793          this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
3794          return value;
3795        case 351608024: // version
3796          this.version = TypeConvertor.castToString(value); // StringType
3797          return value;
3798        case 1508158071: // versionAlgorithm
3799          this.versionAlgorithm = TypeConvertor.castToType(value); // DataType
3800          return value;
3801        case 3373707: // name
3802          this.name = TypeConvertor.castToString(value); // StringType
3803          return value;
3804        case 110371416: // title
3805          this.title = TypeConvertor.castToString(value); // StringType
3806          return value;
3807        case -978133683: // derivedFromCanonical
3808          this.getDerivedFromCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
3809          return value;
3810        case -1076333435: // derivedFromUri
3811          this.getDerivedFromUri().add(TypeConvertor.castToUri(value)); // UriType
3812          return value;
3813        case -892481550: // status
3814          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3815          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3816          return value;
3817        case -404562712: // experimental
3818          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3819          return value;
3820        case -1867885268: // subject
3821          this.subject = TypeConvertor.castToType(value); // DataType
3822          return value;
3823        case 3076014: // date
3824          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3825          return value;
3826        case 1447404028: // publisher
3827          this.publisher = TypeConvertor.castToString(value); // StringType
3828          return value;
3829        case 951526432: // contact
3830          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3831          return value;
3832        case -1724546052: // description
3833          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3834          return value;
3835        case -669707736: // useContext
3836          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
3837          return value;
3838        case -507075711: // jurisdiction
3839          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3840          return value;
3841        case -220463842: // purpose
3842          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
3843          return value;
3844        case 1522889671: // copyright
3845          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
3846          return value;
3847        case 765157229: // copyrightLabel
3848          this.copyrightLabel = TypeConvertor.castToString(value); // StringType
3849          return value;
3850        case 223539345: // approvalDate
3851          this.approvalDate = TypeConvertor.castToDate(value); // DateType
3852          return value;
3853        case -1687512484: // lastReviewDate
3854          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
3855          return value;
3856        case -403934648: // effectivePeriod
3857          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
3858          return value;
3859        case 588504367: // typeCollected
3860          this.typeCollected = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3861          return value;
3862        case -879411630: // patientPreparation
3863          this.getPatientPreparation().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3864          return value;
3865        case 276972933: // timeAspect
3866          this.timeAspect = TypeConvertor.castToString(value); // StringType
3867          return value;
3868        case -1741312354: // collection
3869          this.getCollection().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3870          return value;
3871        case -1407902581: // typeTested
3872          this.getTypeTested().add((SpecimenDefinitionTypeTestedComponent) value); // SpecimenDefinitionTypeTestedComponent
3873          return value;
3874        default: return super.setProperty(hash, name, value);
3875        }
3876
3877      }
3878
3879      @Override
3880      public Base setProperty(String name, Base value) throws FHIRException {
3881        if (name.equals("url")) {
3882          this.url = TypeConvertor.castToUri(value); // UriType
3883        } else if (name.equals("identifier")) {
3884          this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
3885        } else if (name.equals("version")) {
3886          this.version = TypeConvertor.castToString(value); // StringType
3887        } else if (name.equals("versionAlgorithm[x]")) {
3888          this.versionAlgorithm = TypeConvertor.castToType(value); // DataType
3889        } else if (name.equals("name")) {
3890          this.name = TypeConvertor.castToString(value); // StringType
3891        } else if (name.equals("title")) {
3892          this.title = TypeConvertor.castToString(value); // StringType
3893        } else if (name.equals("derivedFromCanonical")) {
3894          this.getDerivedFromCanonical().add(TypeConvertor.castToCanonical(value));
3895        } else if (name.equals("derivedFromUri")) {
3896          this.getDerivedFromUri().add(TypeConvertor.castToUri(value));
3897        } else if (name.equals("status")) {
3898          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3899          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3900        } else if (name.equals("experimental")) {
3901          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3902        } else if (name.equals("subject[x]")) {
3903          this.subject = TypeConvertor.castToType(value); // DataType
3904        } else if (name.equals("date")) {
3905          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3906        } else if (name.equals("publisher")) {
3907          this.publisher = TypeConvertor.castToString(value); // StringType
3908        } else if (name.equals("contact")) {
3909          this.getContact().add(TypeConvertor.castToContactDetail(value));
3910        } else if (name.equals("description")) {
3911          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3912        } else if (name.equals("useContext")) {
3913          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
3914        } else if (name.equals("jurisdiction")) {
3915          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
3916        } else if (name.equals("purpose")) {
3917          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
3918        } else if (name.equals("copyright")) {
3919          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
3920        } else if (name.equals("copyrightLabel")) {
3921          this.copyrightLabel = TypeConvertor.castToString(value); // StringType
3922        } else if (name.equals("approvalDate")) {
3923          this.approvalDate = TypeConvertor.castToDate(value); // DateType
3924        } else if (name.equals("lastReviewDate")) {
3925          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
3926        } else if (name.equals("effectivePeriod")) {
3927          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
3928        } else if (name.equals("typeCollected")) {
3929          this.typeCollected = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3930        } else if (name.equals("patientPreparation")) {
3931          this.getPatientPreparation().add(TypeConvertor.castToCodeableConcept(value));
3932        } else if (name.equals("timeAspect")) {
3933          this.timeAspect = TypeConvertor.castToString(value); // StringType
3934        } else if (name.equals("collection")) {
3935          this.getCollection().add(TypeConvertor.castToCodeableConcept(value));
3936        } else if (name.equals("typeTested")) {
3937          this.getTypeTested().add((SpecimenDefinitionTypeTestedComponent) value);
3938        } else
3939          return super.setProperty(name, value);
3940        return value;
3941      }
3942
3943  @Override
3944  public void removeChild(String name, Base value) throws FHIRException {
3945        if (name.equals("url")) {
3946          this.url = null;
3947        } else if (name.equals("identifier")) {
3948          this.identifier = null;
3949        } else if (name.equals("version")) {
3950          this.version = null;
3951        } else if (name.equals("versionAlgorithm[x]")) {
3952          this.versionAlgorithm = null;
3953        } else if (name.equals("name")) {
3954          this.name = null;
3955        } else if (name.equals("title")) {
3956          this.title = null;
3957        } else if (name.equals("derivedFromCanonical")) {
3958          this.getDerivedFromCanonical().remove(value);
3959        } else if (name.equals("derivedFromUri")) {
3960          this.getDerivedFromUri().remove(value);
3961        } else if (name.equals("status")) {
3962          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3963          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3964        } else if (name.equals("experimental")) {
3965          this.experimental = null;
3966        } else if (name.equals("subject[x]")) {
3967          this.subject = null;
3968        } else if (name.equals("date")) {
3969          this.date = null;
3970        } else if (name.equals("publisher")) {
3971          this.publisher = null;
3972        } else if (name.equals("contact")) {
3973          this.getContact().remove(value);
3974        } else if (name.equals("description")) {
3975          this.description = null;
3976        } else if (name.equals("useContext")) {
3977          this.getUseContext().remove(value);
3978        } else if (name.equals("jurisdiction")) {
3979          this.getJurisdiction().remove(value);
3980        } else if (name.equals("purpose")) {
3981          this.purpose = null;
3982        } else if (name.equals("copyright")) {
3983          this.copyright = null;
3984        } else if (name.equals("copyrightLabel")) {
3985          this.copyrightLabel = null;
3986        } else if (name.equals("approvalDate")) {
3987          this.approvalDate = null;
3988        } else if (name.equals("lastReviewDate")) {
3989          this.lastReviewDate = null;
3990        } else if (name.equals("effectivePeriod")) {
3991          this.effectivePeriod = null;
3992        } else if (name.equals("typeCollected")) {
3993          this.typeCollected = null;
3994        } else if (name.equals("patientPreparation")) {
3995          this.getPatientPreparation().remove(value);
3996        } else if (name.equals("timeAspect")) {
3997          this.timeAspect = null;
3998        } else if (name.equals("collection")) {
3999          this.getCollection().remove(value);
4000        } else if (name.equals("typeTested")) {
4001          this.getTypeTested().remove((SpecimenDefinitionTypeTestedComponent) value);
4002        } else
4003          super.removeChild(name, value);
4004        
4005      }
4006
4007      @Override
4008      public Base makeProperty(int hash, String name) throws FHIRException {
4009        switch (hash) {
4010        case 116079:  return getUrlElement();
4011        case -1618432855:  return getIdentifier();
4012        case 351608024:  return getVersionElement();
4013        case -115699031:  return getVersionAlgorithm();
4014        case 1508158071:  return getVersionAlgorithm();
4015        case 3373707:  return getNameElement();
4016        case 110371416:  return getTitleElement();
4017        case -978133683:  return addDerivedFromCanonicalElement();
4018        case -1076333435:  return addDerivedFromUriElement();
4019        case -892481550:  return getStatusElement();
4020        case -404562712:  return getExperimentalElement();
4021        case -573640748:  return getSubject();
4022        case -1867885268:  return getSubject();
4023        case 3076014:  return getDateElement();
4024        case 1447404028:  return getPublisherElement();
4025        case 951526432:  return addContact(); 
4026        case -1724546052:  return getDescriptionElement();
4027        case -669707736:  return addUseContext(); 
4028        case -507075711:  return addJurisdiction(); 
4029        case -220463842:  return getPurposeElement();
4030        case 1522889671:  return getCopyrightElement();
4031        case 765157229:  return getCopyrightLabelElement();
4032        case 223539345:  return getApprovalDateElement();
4033        case -1687512484:  return getLastReviewDateElement();
4034        case -403934648:  return getEffectivePeriod();
4035        case 588504367:  return getTypeCollected();
4036        case -879411630:  return addPatientPreparation(); 
4037        case 276972933:  return getTimeAspectElement();
4038        case -1741312354:  return addCollection(); 
4039        case -1407902581:  return addTypeTested(); 
4040        default: return super.makeProperty(hash, name);
4041        }
4042
4043      }
4044
4045      @Override
4046      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4047        switch (hash) {
4048        case 116079: /*url*/ return new String[] {"uri"};
4049        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
4050        case 351608024: /*version*/ return new String[] {"string"};
4051        case 1508158071: /*versionAlgorithm*/ return new String[] {"string", "Coding"};
4052        case 3373707: /*name*/ return new String[] {"string"};
4053        case 110371416: /*title*/ return new String[] {"string"};
4054        case -978133683: /*derivedFromCanonical*/ return new String[] {"canonical"};
4055        case -1076333435: /*derivedFromUri*/ return new String[] {"uri"};
4056        case -892481550: /*status*/ return new String[] {"code"};
4057        case -404562712: /*experimental*/ return new String[] {"boolean"};
4058        case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference"};
4059        case 3076014: /*date*/ return new String[] {"dateTime"};
4060        case 1447404028: /*publisher*/ return new String[] {"string"};
4061        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
4062        case -1724546052: /*description*/ return new String[] {"markdown"};
4063        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
4064        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
4065        case -220463842: /*purpose*/ return new String[] {"markdown"};
4066        case 1522889671: /*copyright*/ return new String[] {"markdown"};
4067        case 765157229: /*copyrightLabel*/ return new String[] {"string"};
4068        case 223539345: /*approvalDate*/ return new String[] {"date"};
4069        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
4070        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
4071        case 588504367: /*typeCollected*/ return new String[] {"CodeableConcept"};
4072        case -879411630: /*patientPreparation*/ return new String[] {"CodeableConcept"};
4073        case 276972933: /*timeAspect*/ return new String[] {"string"};
4074        case -1741312354: /*collection*/ return new String[] {"CodeableConcept"};
4075        case -1407902581: /*typeTested*/ return new String[] {};
4076        default: return super.getTypesForProperty(hash, name);
4077        }
4078
4079      }
4080
4081      @Override
4082      public Base addChild(String name) throws FHIRException {
4083        if (name.equals("url")) {
4084          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.url");
4085        }
4086        else if (name.equals("identifier")) {
4087          this.identifier = new Identifier();
4088          return this.identifier;
4089        }
4090        else if (name.equals("version")) {
4091          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.version");
4092        }
4093        else if (name.equals("versionAlgorithmString")) {
4094          this.versionAlgorithm = new StringType();
4095          return this.versionAlgorithm;
4096        }
4097        else if (name.equals("versionAlgorithmCoding")) {
4098          this.versionAlgorithm = new Coding();
4099          return this.versionAlgorithm;
4100        }
4101        else if (name.equals("name")) {
4102          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.name");
4103        }
4104        else if (name.equals("title")) {
4105          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.title");
4106        }
4107        else if (name.equals("derivedFromCanonical")) {
4108          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.derivedFromCanonical");
4109        }
4110        else if (name.equals("derivedFromUri")) {
4111          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.derivedFromUri");
4112        }
4113        else if (name.equals("status")) {
4114          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.status");
4115        }
4116        else if (name.equals("experimental")) {
4117          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.experimental");
4118        }
4119        else if (name.equals("subjectCodeableConcept")) {
4120          this.subject = new CodeableConcept();
4121          return this.subject;
4122        }
4123        else if (name.equals("subjectReference")) {
4124          this.subject = new Reference();
4125          return this.subject;
4126        }
4127        else if (name.equals("date")) {
4128          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.date");
4129        }
4130        else if (name.equals("publisher")) {
4131          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.publisher");
4132        }
4133        else if (name.equals("contact")) {
4134          return addContact();
4135        }
4136        else if (name.equals("description")) {
4137          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.description");
4138        }
4139        else if (name.equals("useContext")) {
4140          return addUseContext();
4141        }
4142        else if (name.equals("jurisdiction")) {
4143          return addJurisdiction();
4144        }
4145        else if (name.equals("purpose")) {
4146          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.purpose");
4147        }
4148        else if (name.equals("copyright")) {
4149          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.copyright");
4150        }
4151        else if (name.equals("copyrightLabel")) {
4152          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.copyrightLabel");
4153        }
4154        else if (name.equals("approvalDate")) {
4155          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.approvalDate");
4156        }
4157        else if (name.equals("lastReviewDate")) {
4158          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.lastReviewDate");
4159        }
4160        else if (name.equals("effectivePeriod")) {
4161          this.effectivePeriod = new Period();
4162          return this.effectivePeriod;
4163        }
4164        else if (name.equals("typeCollected")) {
4165          this.typeCollected = new CodeableConcept();
4166          return this.typeCollected;
4167        }
4168        else if (name.equals("patientPreparation")) {
4169          return addPatientPreparation();
4170        }
4171        else if (name.equals("timeAspect")) {
4172          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.timeAspect");
4173        }
4174        else if (name.equals("collection")) {
4175          return addCollection();
4176        }
4177        else if (name.equals("typeTested")) {
4178          return addTypeTested();
4179        }
4180        else
4181          return super.addChild(name);
4182      }
4183
4184  public String fhirType() {
4185    return "SpecimenDefinition";
4186
4187  }
4188
4189      public SpecimenDefinition copy() {
4190        SpecimenDefinition dst = new SpecimenDefinition();
4191        copyValues(dst);
4192        return dst;
4193      }
4194
4195      public void copyValues(SpecimenDefinition dst) {
4196        super.copyValues(dst);
4197        dst.url = url == null ? null : url.copy();
4198        dst.identifier = identifier == null ? null : identifier.copy();
4199        dst.version = version == null ? null : version.copy();
4200        dst.versionAlgorithm = versionAlgorithm == null ? null : versionAlgorithm.copy();
4201        dst.name = name == null ? null : name.copy();
4202        dst.title = title == null ? null : title.copy();
4203        if (derivedFromCanonical != null) {
4204          dst.derivedFromCanonical = new ArrayList<CanonicalType>();
4205          for (CanonicalType i : derivedFromCanonical)
4206            dst.derivedFromCanonical.add(i.copy());
4207        };
4208        if (derivedFromUri != null) {
4209          dst.derivedFromUri = new ArrayList<UriType>();
4210          for (UriType i : derivedFromUri)
4211            dst.derivedFromUri.add(i.copy());
4212        };
4213        dst.status = status == null ? null : status.copy();
4214        dst.experimental = experimental == null ? null : experimental.copy();
4215        dst.subject = subject == null ? null : subject.copy();
4216        dst.date = date == null ? null : date.copy();
4217        dst.publisher = publisher == null ? null : publisher.copy();
4218        if (contact != null) {
4219          dst.contact = new ArrayList<ContactDetail>();
4220          for (ContactDetail i : contact)
4221            dst.contact.add(i.copy());
4222        };
4223        dst.description = description == null ? null : description.copy();
4224        if (useContext != null) {
4225          dst.useContext = new ArrayList<UsageContext>();
4226          for (UsageContext i : useContext)
4227            dst.useContext.add(i.copy());
4228        };
4229        if (jurisdiction != null) {
4230          dst.jurisdiction = new ArrayList<CodeableConcept>();
4231          for (CodeableConcept i : jurisdiction)
4232            dst.jurisdiction.add(i.copy());
4233        };
4234        dst.purpose = purpose == null ? null : purpose.copy();
4235        dst.copyright = copyright == null ? null : copyright.copy();
4236        dst.copyrightLabel = copyrightLabel == null ? null : copyrightLabel.copy();
4237        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
4238        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
4239        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
4240        dst.typeCollected = typeCollected == null ? null : typeCollected.copy();
4241        if (patientPreparation != null) {
4242          dst.patientPreparation = new ArrayList<CodeableConcept>();
4243          for (CodeableConcept i : patientPreparation)
4244            dst.patientPreparation.add(i.copy());
4245        };
4246        dst.timeAspect = timeAspect == null ? null : timeAspect.copy();
4247        if (collection != null) {
4248          dst.collection = new ArrayList<CodeableConcept>();
4249          for (CodeableConcept i : collection)
4250            dst.collection.add(i.copy());
4251        };
4252        if (typeTested != null) {
4253          dst.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
4254          for (SpecimenDefinitionTypeTestedComponent i : typeTested)
4255            dst.typeTested.add(i.copy());
4256        };
4257      }
4258
4259      protected SpecimenDefinition typedCopy() {
4260        return copy();
4261      }
4262
4263      @Override
4264      public boolean equalsDeep(Base other_) {
4265        if (!super.equalsDeep(other_))
4266          return false;
4267        if (!(other_ instanceof SpecimenDefinition))
4268          return false;
4269        SpecimenDefinition o = (SpecimenDefinition) other_;
4270        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
4271           && compareDeep(versionAlgorithm, o.versionAlgorithm, true) && compareDeep(name, o.name, true) && compareDeep(title, o.title, true)
4272           && compareDeep(derivedFromCanonical, o.derivedFromCanonical, true) && compareDeep(derivedFromUri, o.derivedFromUri, true)
4273           && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(subject, o.subject, true)
4274           && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true)
4275           && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
4276           && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
4277           && compareDeep(copyrightLabel, o.copyrightLabel, true) && compareDeep(approvalDate, o.approvalDate, true)
4278           && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true)
4279           && compareDeep(typeCollected, o.typeCollected, true) && compareDeep(patientPreparation, o.patientPreparation, true)
4280           && compareDeep(timeAspect, o.timeAspect, true) && compareDeep(collection, o.collection, true) && compareDeep(typeTested, o.typeTested, true)
4281          ;
4282      }
4283
4284      @Override
4285      public boolean equalsShallow(Base other_) {
4286        if (!super.equalsShallow(other_))
4287          return false;
4288        if (!(other_ instanceof SpecimenDefinition))
4289          return false;
4290        SpecimenDefinition o = (SpecimenDefinition) other_;
4291        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
4292           && compareValues(title, o.title, true) && compareValues(derivedFromCanonical, o.derivedFromCanonical, true)
4293           && compareValues(derivedFromUri, o.derivedFromUri, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true)
4294           && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true)
4295           && compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) && compareValues(copyrightLabel, o.copyrightLabel, true)
4296           && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
4297           && compareValues(timeAspect, o.timeAspect, true);
4298      }
4299
4300      public boolean isEmpty() {
4301        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
4302          , versionAlgorithm, name, title, derivedFromCanonical, derivedFromUri, status, experimental
4303          , subject, date, publisher, contact, description, useContext, jurisdiction, purpose
4304          , copyright, copyrightLabel, approvalDate, lastReviewDate, effectivePeriod, typeCollected
4305          , patientPreparation, timeAspect, collection, typeTested);
4306      }
4307
4308  @Override
4309  public ResourceType getResourceType() {
4310    return ResourceType.SpecimenDefinition;
4311   }
4312
4313 /**
4314   * Search parameter: <b>identifier</b>
4315   * <p>
4316   * Description: <b>Multiple Resources: 
4317
4318* [ActivityDefinition](activitydefinition.html): External identifier for the activity definition
4319* [ActorDefinition](actordefinition.html): External identifier for the Actor Definition
4320* [CapabilityStatement](capabilitystatement.html): External identifier for the capability statement
4321* [ChargeItemDefinition](chargeitemdefinition.html): External identifier for the charge item definition
4322* [Citation](citation.html): External identifier for the citation
4323* [CodeSystem](codesystem.html): External identifier for the code system
4324* [ConceptMap](conceptmap.html): External identifier for the concept map
4325* [ConditionDefinition](conditiondefinition.html): External identifier for the condition definition
4326* [EventDefinition](eventdefinition.html): External identifier for the event definition
4327* [Evidence](evidence.html): External identifier for the evidence
4328* [EvidenceReport](evidencereport.html): External identifier for the evidence report
4329* [EvidenceVariable](evidencevariable.html): External identifier for the evidence variable
4330* [ExampleScenario](examplescenario.html): External identifier for the example scenario
4331* [GraphDefinition](graphdefinition.html): External identifier for the graph definition
4332* [ImplementationGuide](implementationguide.html): External identifier for the implementation guide
4333* [Library](library.html): External identifier for the library
4334* [Measure](measure.html): External identifier for the measure
4335* [MedicationKnowledge](medicationknowledge.html): Business identifier for this medication
4336* [MessageDefinition](messagedefinition.html): External identifier for the message definition
4337* [NamingSystem](namingsystem.html): External identifier for the naming system
4338* [ObservationDefinition](observationdefinition.html): The unique identifier associated with the specimen definition
4339* [OperationDefinition](operationdefinition.html): External identifier for the search parameter
4340* [PlanDefinition](plandefinition.html): External identifier for the plan definition
4341* [Questionnaire](questionnaire.html): External identifier for the questionnaire
4342* [Requirements](requirements.html): External identifier for the requirements
4343* [SearchParameter](searchparameter.html): External identifier for the search parameter
4344* [SpecimenDefinition](specimendefinition.html): The unique identifier associated with the SpecimenDefinition
4345* [StructureDefinition](structuredefinition.html): External identifier for the structure definition
4346* [StructureMap](structuremap.html): External identifier for the structure map
4347* [SubscriptionTopic](subscriptiontopic.html): Business Identifier for SubscriptionTopic
4348* [TerminologyCapabilities](terminologycapabilities.html): External identifier for the terminology capabilities
4349* [TestPlan](testplan.html): An identifier for the test plan
4350* [TestScript](testscript.html): External identifier for the test script
4351* [ValueSet](valueset.html): External identifier for the value set
4352</b><br>
4353   * Type: <b>token</b><br>
4354   * Path: <b>ActivityDefinition.identifier | ActorDefinition.identifier | CapabilityStatement.identifier | ChargeItemDefinition.identifier | Citation.identifier | CodeSystem.identifier | ConceptMap.identifier | ConditionDefinition.identifier | EventDefinition.identifier | Evidence.identifier | EvidenceReport.identifier | EvidenceVariable.identifier | ExampleScenario.identifier | GraphDefinition.identifier | ImplementationGuide.identifier | Library.identifier | Measure.identifier | MedicationKnowledge.identifier | MessageDefinition.identifier | NamingSystem.identifier | ObservationDefinition.identifier | OperationDefinition.identifier | PlanDefinition.identifier | Questionnaire.identifier | Requirements.identifier | SearchParameter.identifier | SpecimenDefinition.identifier | StructureDefinition.identifier | StructureMap.identifier | SubscriptionTopic.identifier | TerminologyCapabilities.identifier | TestPlan.identifier | TestScript.identifier | ValueSet.identifier</b><br>
4355   * </p>
4356   */
4357  @SearchParamDefinition(name="identifier", path="ActivityDefinition.identifier | ActorDefinition.identifier | CapabilityStatement.identifier | ChargeItemDefinition.identifier | Citation.identifier | CodeSystem.identifier | ConceptMap.identifier | ConditionDefinition.identifier | EventDefinition.identifier | Evidence.identifier | EvidenceReport.identifier | EvidenceVariable.identifier | ExampleScenario.identifier | GraphDefinition.identifier | ImplementationGuide.identifier | Library.identifier | Measure.identifier | MedicationKnowledge.identifier | MessageDefinition.identifier | NamingSystem.identifier | ObservationDefinition.identifier | OperationDefinition.identifier | PlanDefinition.identifier | Questionnaire.identifier | Requirements.identifier | SearchParameter.identifier | SpecimenDefinition.identifier | StructureDefinition.identifier | StructureMap.identifier | SubscriptionTopic.identifier | TerminologyCapabilities.identifier | TestPlan.identifier | TestScript.identifier | ValueSet.identifier", description="Multiple Resources: \r\n\r\n* [ActivityDefinition](activitydefinition.html): External identifier for the activity definition\r\n* [ActorDefinition](actordefinition.html): External identifier for the Actor Definition\r\n* [CapabilityStatement](capabilitystatement.html): External identifier for the capability statement\r\n* [ChargeItemDefinition](chargeitemdefinition.html): External identifier for the charge item definition\r\n* [Citation](citation.html): External identifier for the citation\r\n* [CodeSystem](codesystem.html): External identifier for the code system\r\n* [ConceptMap](conceptmap.html): External identifier for the concept map\r\n* [ConditionDefinition](conditiondefinition.html): External identifier for the condition definition\r\n* [EventDefinition](eventdefinition.html): External identifier for the event definition\r\n* [Evidence](evidence.html): External identifier for the evidence\r\n* [EvidenceReport](evidencereport.html): External identifier for the evidence report\r\n* [EvidenceVariable](evidencevariable.html): External identifier for the evidence variable\r\n* [ExampleScenario](examplescenario.html): External identifier for the example scenario\r\n* [GraphDefinition](graphdefinition.html): External identifier for the graph definition\r\n* [ImplementationGuide](implementationguide.html): External identifier for the implementation guide\r\n* [Library](library.html): External identifier for the library\r\n* [Measure](measure.html): External identifier for the measure\r\n* [MedicationKnowledge](medicationknowledge.html): Business identifier for this medication\r\n* [MessageDefinition](messagedefinition.html): External identifier for the message definition\r\n* [NamingSystem](namingsystem.html): External identifier for the naming system\r\n* [ObservationDefinition](observationdefinition.html): The unique identifier associated with the specimen definition\r\n* [OperationDefinition](operationdefinition.html): External identifier for the search parameter\r\n* [PlanDefinition](plandefinition.html): External identifier for the plan definition\r\n* [Questionnaire](questionnaire.html): External identifier for the questionnaire\r\n* [Requirements](requirements.html): External identifier for the requirements\r\n* [SearchParameter](searchparameter.html): External identifier for the search parameter\r\n* [SpecimenDefinition](specimendefinition.html): The unique identifier associated with the SpecimenDefinition\r\n* [StructureDefinition](structuredefinition.html): External identifier for the structure definition\r\n* [StructureMap](structuremap.html): External identifier for the structure map\r\n* [SubscriptionTopic](subscriptiontopic.html): Business Identifier for SubscriptionTopic\r\n* [TerminologyCapabilities](terminologycapabilities.html): External identifier for the terminology capabilities\r\n* [TestPlan](testplan.html): An identifier for the test plan\r\n* [TestScript](testscript.html): External identifier for the test script\r\n* [ValueSet](valueset.html): External identifier for the value set\r\n", type="token" )
4358  public static final String SP_IDENTIFIER = "identifier";
4359 /**
4360   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
4361   * <p>
4362   * Description: <b>Multiple Resources: 
4363
4364* [ActivityDefinition](activitydefinition.html): External identifier for the activity definition
4365* [ActorDefinition](actordefinition.html): External identifier for the Actor Definition
4366* [CapabilityStatement](capabilitystatement.html): External identifier for the capability statement
4367* [ChargeItemDefinition](chargeitemdefinition.html): External identifier for the charge item definition
4368* [Citation](citation.html): External identifier for the citation
4369* [CodeSystem](codesystem.html): External identifier for the code system
4370* [ConceptMap](conceptmap.html): External identifier for the concept map
4371* [ConditionDefinition](conditiondefinition.html): External identifier for the condition definition
4372* [EventDefinition](eventdefinition.html): External identifier for the event definition
4373* [Evidence](evidence.html): External identifier for the evidence
4374* [EvidenceReport](evidencereport.html): External identifier for the evidence report
4375* [EvidenceVariable](evidencevariable.html): External identifier for the evidence variable
4376* [ExampleScenario](examplescenario.html): External identifier for the example scenario
4377* [GraphDefinition](graphdefinition.html): External identifier for the graph definition
4378* [ImplementationGuide](implementationguide.html): External identifier for the implementation guide
4379* [Library](library.html): External identifier for the library
4380* [Measure](measure.html): External identifier for the measure
4381* [MedicationKnowledge](medicationknowledge.html): Business identifier for this medication
4382* [MessageDefinition](messagedefinition.html): External identifier for the message definition
4383* [NamingSystem](namingsystem.html): External identifier for the naming system
4384* [ObservationDefinition](observationdefinition.html): The unique identifier associated with the specimen definition
4385* [OperationDefinition](operationdefinition.html): External identifier for the search parameter
4386* [PlanDefinition](plandefinition.html): External identifier for the plan definition
4387* [Questionnaire](questionnaire.html): External identifier for the questionnaire
4388* [Requirements](requirements.html): External identifier for the requirements
4389* [SearchParameter](searchparameter.html): External identifier for the search parameter
4390* [SpecimenDefinition](specimendefinition.html): The unique identifier associated with the SpecimenDefinition
4391* [StructureDefinition](structuredefinition.html): External identifier for the structure definition
4392* [StructureMap](structuremap.html): External identifier for the structure map
4393* [SubscriptionTopic](subscriptiontopic.html): Business Identifier for SubscriptionTopic
4394* [TerminologyCapabilities](terminologycapabilities.html): External identifier for the terminology capabilities
4395* [TestPlan](testplan.html): An identifier for the test plan
4396* [TestScript](testscript.html): External identifier for the test script
4397* [ValueSet](valueset.html): External identifier for the value set
4398</b><br>
4399   * Type: <b>token</b><br>
4400   * Path: <b>ActivityDefinition.identifier | ActorDefinition.identifier | CapabilityStatement.identifier | ChargeItemDefinition.identifier | Citation.identifier | CodeSystem.identifier | ConceptMap.identifier | ConditionDefinition.identifier | EventDefinition.identifier | Evidence.identifier | EvidenceReport.identifier | EvidenceVariable.identifier | ExampleScenario.identifier | GraphDefinition.identifier | ImplementationGuide.identifier | Library.identifier | Measure.identifier | MedicationKnowledge.identifier | MessageDefinition.identifier | NamingSystem.identifier | ObservationDefinition.identifier | OperationDefinition.identifier | PlanDefinition.identifier | Questionnaire.identifier | Requirements.identifier | SearchParameter.identifier | SpecimenDefinition.identifier | StructureDefinition.identifier | StructureMap.identifier | SubscriptionTopic.identifier | TerminologyCapabilities.identifier | TestPlan.identifier | TestScript.identifier | ValueSet.identifier</b><br>
4401   * </p>
4402   */
4403  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
4404
4405 /**
4406   * Search parameter: <b>status</b>
4407   * <p>
4408   * Description: <b>Multiple Resources: 
4409
4410* [ActivityDefinition](activitydefinition.html): The current status of the activity definition
4411* [ActorDefinition](actordefinition.html): The current status of the Actor Definition
4412* [CapabilityStatement](capabilitystatement.html): The current status of the capability statement
4413* [ChargeItemDefinition](chargeitemdefinition.html): The current status of the charge item definition
4414* [Citation](citation.html): The current status of the citation
4415* [CodeSystem](codesystem.html): The current status of the code system
4416* [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition
4417* [ConceptMap](conceptmap.html): The current status of the concept map
4418* [ConditionDefinition](conditiondefinition.html): The current status of the condition definition
4419* [EventDefinition](eventdefinition.html): The current status of the event definition
4420* [Evidence](evidence.html): The current status of the evidence
4421* [EvidenceReport](evidencereport.html): The current status of the evidence report
4422* [EvidenceVariable](evidencevariable.html): The current status of the evidence variable
4423* [ExampleScenario](examplescenario.html): The current status of the example scenario
4424* [GraphDefinition](graphdefinition.html): The current status of the graph definition
4425* [ImplementationGuide](implementationguide.html): The current status of the implementation guide
4426* [Library](library.html): The current status of the library
4427* [Measure](measure.html): The current status of the measure
4428* [MedicationKnowledge](medicationknowledge.html): active | inactive | entered-in-error
4429* [MessageDefinition](messagedefinition.html): The current status of the message definition
4430* [NamingSystem](namingsystem.html): The current status of the naming system
4431* [ObservationDefinition](observationdefinition.html): Publication status of the ObservationDefinition: draft, active, retired, unknown
4432* [OperationDefinition](operationdefinition.html): The current status of the operation definition
4433* [PlanDefinition](plandefinition.html): The current status of the plan definition
4434* [Questionnaire](questionnaire.html): The current status of the questionnaire
4435* [Requirements](requirements.html): The current status of the requirements
4436* [SearchParameter](searchparameter.html): The current status of the search parameter
4437* [SpecimenDefinition](specimendefinition.html): Publication status of the SpecimenDefinition: draft, active, retired, unknown
4438* [StructureDefinition](structuredefinition.html): The current status of the structure definition
4439* [StructureMap](structuremap.html): The current status of the structure map
4440* [SubscriptionTopic](subscriptiontopic.html): draft | active | retired | unknown
4441* [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities
4442* [TestPlan](testplan.html): The current status of the test plan
4443* [TestScript](testscript.html): The current status of the test script
4444* [ValueSet](valueset.html): The current status of the value set
4445</b><br>
4446   * Type: <b>token</b><br>
4447   * Path: <b>ActivityDefinition.status | ActorDefinition.status | CapabilityStatement.status | ChargeItemDefinition.status | Citation.status | CodeSystem.status | CompartmentDefinition.status | ConceptMap.status | ConditionDefinition.status | EventDefinition.status | Evidence.status | EvidenceReport.status | EvidenceVariable.status | ExampleScenario.status | GraphDefinition.status | ImplementationGuide.status | Library.status | Measure.status | MedicationKnowledge.status | MessageDefinition.status | NamingSystem.status | ObservationDefinition.status | OperationDefinition.status | PlanDefinition.status | Questionnaire.status | Requirements.status | SearchParameter.status | SpecimenDefinition.status | StructureDefinition.status | StructureMap.status | SubscriptionTopic.status | TerminologyCapabilities.status | TestPlan.status | TestScript.status | ValueSet.status</b><br>
4448   * </p>
4449   */
4450  @SearchParamDefinition(name="status", path="ActivityDefinition.status | ActorDefinition.status | CapabilityStatement.status | ChargeItemDefinition.status | Citation.status | CodeSystem.status | CompartmentDefinition.status | ConceptMap.status | ConditionDefinition.status | EventDefinition.status | Evidence.status | EvidenceReport.status | EvidenceVariable.status | ExampleScenario.status | GraphDefinition.status | ImplementationGuide.status | Library.status | Measure.status | MedicationKnowledge.status | MessageDefinition.status | NamingSystem.status | ObservationDefinition.status | OperationDefinition.status | PlanDefinition.status | Questionnaire.status | Requirements.status | SearchParameter.status | SpecimenDefinition.status | StructureDefinition.status | StructureMap.status | SubscriptionTopic.status | TerminologyCapabilities.status | TestPlan.status | TestScript.status | ValueSet.status", description="Multiple Resources: \r\n\r\n* [ActivityDefinition](activitydefinition.html): The current status of the activity definition\r\n* [ActorDefinition](actordefinition.html): The current status of the Actor Definition\r\n* [CapabilityStatement](capabilitystatement.html): The current status of the capability statement\r\n* [ChargeItemDefinition](chargeitemdefinition.html): The current status of the charge item definition\r\n* [Citation](citation.html): The current status of the citation\r\n* [CodeSystem](codesystem.html): The current status of the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition\r\n* [ConceptMap](conceptmap.html): The current status of the concept map\r\n* [ConditionDefinition](conditiondefinition.html): The current status of the condition definition\r\n* [EventDefinition](eventdefinition.html): The current status of the event definition\r\n* [Evidence](evidence.html): The current status of the evidence\r\n* [EvidenceReport](evidencereport.html): The current status of the evidence report\r\n* [EvidenceVariable](evidencevariable.html): The current status of the evidence variable\r\n* [ExampleScenario](examplescenario.html): The current status of the example scenario\r\n* [GraphDefinition](graphdefinition.html): The current status of the graph definition\r\n* [ImplementationGuide](implementationguide.html): The current status of the implementation guide\r\n* [Library](library.html): The current status of the library\r\n* [Measure](measure.html): The current status of the measure\r\n* [MedicationKnowledge](medicationknowledge.html): active | inactive | entered-in-error\r\n* [MessageDefinition](messagedefinition.html): The current status of the message definition\r\n* [NamingSystem](namingsystem.html): The current status of the naming system\r\n* [ObservationDefinition](observationdefinition.html): Publication status of the ObservationDefinition: draft, active, retired, unknown\r\n* [OperationDefinition](operationdefinition.html): The current status of the operation definition\r\n* [PlanDefinition](plandefinition.html): The current status of the plan definition\r\n* [Questionnaire](questionnaire.html): The current status of the questionnaire\r\n* [Requirements](requirements.html): The current status of the requirements\r\n* [SearchParameter](searchparameter.html): The current status of the search parameter\r\n* [SpecimenDefinition](specimendefinition.html): Publication status of the SpecimenDefinition: draft, active, retired, unknown\r\n* [StructureDefinition](structuredefinition.html): The current status of the structure definition\r\n* [StructureMap](structuremap.html): The current status of the structure map\r\n* [SubscriptionTopic](subscriptiontopic.html): draft | active | retired | unknown\r\n* [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities\r\n* [TestPlan](testplan.html): The current status of the test plan\r\n* [TestScript](testscript.html): The current status of the test script\r\n* [ValueSet](valueset.html): The current status of the value set\r\n", type="token" )
4451  public static final String SP_STATUS = "status";
4452 /**
4453   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4454   * <p>
4455   * Description: <b>Multiple Resources: 
4456
4457* [ActivityDefinition](activitydefinition.html): The current status of the activity definition
4458* [ActorDefinition](actordefinition.html): The current status of the Actor Definition
4459* [CapabilityStatement](capabilitystatement.html): The current status of the capability statement
4460* [ChargeItemDefinition](chargeitemdefinition.html): The current status of the charge item definition
4461* [Citation](citation.html): The current status of the citation
4462* [CodeSystem](codesystem.html): The current status of the code system
4463* [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition
4464* [ConceptMap](conceptmap.html): The current status of the concept map
4465* [ConditionDefinition](conditiondefinition.html): The current status of the condition definition
4466* [EventDefinition](eventdefinition.html): The current status of the event definition
4467* [Evidence](evidence.html): The current status of the evidence
4468* [EvidenceReport](evidencereport.html): The current status of the evidence report
4469* [EvidenceVariable](evidencevariable.html): The current status of the evidence variable
4470* [ExampleScenario](examplescenario.html): The current status of the example scenario
4471* [GraphDefinition](graphdefinition.html): The current status of the graph definition
4472* [ImplementationGuide](implementationguide.html): The current status of the implementation guide
4473* [Library](library.html): The current status of the library
4474* [Measure](measure.html): The current status of the measure
4475* [MedicationKnowledge](medicationknowledge.html): active | inactive | entered-in-error
4476* [MessageDefinition](messagedefinition.html): The current status of the message definition
4477* [NamingSystem](namingsystem.html): The current status of the naming system
4478* [ObservationDefinition](observationdefinition.html): Publication status of the ObservationDefinition: draft, active, retired, unknown
4479* [OperationDefinition](operationdefinition.html): The current status of the operation definition
4480* [PlanDefinition](plandefinition.html): The current status of the plan definition
4481* [Questionnaire](questionnaire.html): The current status of the questionnaire
4482* [Requirements](requirements.html): The current status of the requirements
4483* [SearchParameter](searchparameter.html): The current status of the search parameter
4484* [SpecimenDefinition](specimendefinition.html): Publication status of the SpecimenDefinition: draft, active, retired, unknown
4485* [StructureDefinition](structuredefinition.html): The current status of the structure definition
4486* [StructureMap](structuremap.html): The current status of the structure map
4487* [SubscriptionTopic](subscriptiontopic.html): draft | active | retired | unknown
4488* [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities
4489* [TestPlan](testplan.html): The current status of the test plan
4490* [TestScript](testscript.html): The current status of the test script
4491* [ValueSet](valueset.html): The current status of the value set
4492</b><br>
4493   * Type: <b>token</b><br>
4494   * Path: <b>ActivityDefinition.status | ActorDefinition.status | CapabilityStatement.status | ChargeItemDefinition.status | Citation.status | CodeSystem.status | CompartmentDefinition.status | ConceptMap.status | ConditionDefinition.status | EventDefinition.status | Evidence.status | EvidenceReport.status | EvidenceVariable.status | ExampleScenario.status | GraphDefinition.status | ImplementationGuide.status | Library.status | Measure.status | MedicationKnowledge.status | MessageDefinition.status | NamingSystem.status | ObservationDefinition.status | OperationDefinition.status | PlanDefinition.status | Questionnaire.status | Requirements.status | SearchParameter.status | SpecimenDefinition.status | StructureDefinition.status | StructureMap.status | SubscriptionTopic.status | TerminologyCapabilities.status | TestPlan.status | TestScript.status | ValueSet.status</b><br>
4495   * </p>
4496   */
4497  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4498
4499 /**
4500   * Search parameter: <b>title</b>
4501   * <p>
4502   * Description: <b>Multiple Resources: 
4503
4504* [ActivityDefinition](activitydefinition.html): The human-friendly name of the activity definition
4505* [ActorDefinition](actordefinition.html): The human-friendly name of the Actor Definition
4506* [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement
4507* [ChargeItemDefinition](chargeitemdefinition.html): The human-friendly name of the charge item definition
4508* [Citation](citation.html): The human-friendly name of the citation
4509* [CodeSystem](codesystem.html): The human-friendly name of the code system
4510* [ConceptMap](conceptmap.html): The human-friendly name of the concept map
4511* [ConditionDefinition](conditiondefinition.html): The human-friendly name of the condition definition
4512* [EventDefinition](eventdefinition.html): The human-friendly name of the event definition
4513* [Evidence](evidence.html): The human-friendly name of the evidence
4514* [EvidenceVariable](evidencevariable.html): The human-friendly name of the evidence variable
4515* [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide
4516* [Library](library.html): The human-friendly name of the library
4517* [Measure](measure.html): The human-friendly name of the measure
4518* [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition
4519* [ObservationDefinition](observationdefinition.html): Human-friendly name of the ObservationDefinition
4520* [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition
4521* [PlanDefinition](plandefinition.html): The human-friendly name of the plan definition
4522* [Questionnaire](questionnaire.html): The human-friendly name of the questionnaire
4523* [Requirements](requirements.html): The human-friendly name of the requirements
4524* [SpecimenDefinition](specimendefinition.html): Human-friendly name of the SpecimenDefinition
4525* [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition
4526* [StructureMap](structuremap.html): The human-friendly name of the structure map
4527* [SubscriptionTopic](subscriptiontopic.html): Name for this SubscriptionTopic (Human friendly)
4528* [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities
4529* [TestScript](testscript.html): The human-friendly name of the test script
4530* [ValueSet](valueset.html): The human-friendly name of the value set
4531</b><br>
4532   * Type: <b>string</b><br>
4533   * Path: <b>ActivityDefinition.title | ActorDefinition.title | CapabilityStatement.title | ChargeItemDefinition.title | Citation.title | CodeSystem.title | ConceptMap.title | ConditionDefinition.title | EventDefinition.title | Evidence.title | EvidenceVariable.title | ImplementationGuide.title | Library.title | Measure.title | MessageDefinition.title | ObservationDefinition.title | OperationDefinition.title | PlanDefinition.title | Questionnaire.title | Requirements.title | SpecimenDefinition.title | StructureDefinition.title | StructureMap.title | SubscriptionTopic.title | TerminologyCapabilities.title | TestScript.title | ValueSet.title</b><br>
4534   * </p>
4535   */
4536  @SearchParamDefinition(name="title", path="ActivityDefinition.title | ActorDefinition.title | CapabilityStatement.title | ChargeItemDefinition.title | Citation.title | CodeSystem.title | ConceptMap.title | ConditionDefinition.title | EventDefinition.title | Evidence.title | EvidenceVariable.title | ImplementationGuide.title | Library.title | Measure.title | MessageDefinition.title | ObservationDefinition.title | OperationDefinition.title | PlanDefinition.title | Questionnaire.title | Requirements.title | SpecimenDefinition.title | StructureDefinition.title | StructureMap.title | SubscriptionTopic.title | TerminologyCapabilities.title | TestScript.title | ValueSet.title", description="Multiple Resources: \r\n\r\n* [ActivityDefinition](activitydefinition.html): The human-friendly name of the activity definition\r\n* [ActorDefinition](actordefinition.html): The human-friendly name of the Actor Definition\r\n* [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement\r\n* [ChargeItemDefinition](chargeitemdefinition.html): The human-friendly name of the charge item definition\r\n* [Citation](citation.html): The human-friendly name of the citation\r\n* [CodeSystem](codesystem.html): The human-friendly name of the code system\r\n* [ConceptMap](conceptmap.html): The human-friendly name of the concept map\r\n* [ConditionDefinition](conditiondefinition.html): The human-friendly name of the condition definition\r\n* [EventDefinition](eventdefinition.html): The human-friendly name of the event definition\r\n* [Evidence](evidence.html): The human-friendly name of the evidence\r\n* [EvidenceVariable](evidencevariable.html): The human-friendly name of the evidence variable\r\n* [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide\r\n* [Library](library.html): The human-friendly name of the library\r\n* [Measure](measure.html): The human-friendly name of the measure\r\n* [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition\r\n* [ObservationDefinition](observationdefinition.html): Human-friendly name of the ObservationDefinition\r\n* [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition\r\n* [PlanDefinition](plandefinition.html): The human-friendly name of the plan definition\r\n* [Questionnaire](questionnaire.html): The human-friendly name of the questionnaire\r\n* [Requirements](requirements.html): The human-friendly name of the requirements\r\n* [SpecimenDefinition](specimendefinition.html): Human-friendly name of the SpecimenDefinition\r\n* [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition\r\n* [StructureMap](structuremap.html): The human-friendly name of the structure map\r\n* [SubscriptionTopic](subscriptiontopic.html): Name for this SubscriptionTopic (Human friendly)\r\n* [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities\r\n* [TestScript](testscript.html): The human-friendly name of the test script\r\n* [ValueSet](valueset.html): The human-friendly name of the value set\r\n", type="string" )
4537  public static final String SP_TITLE = "title";
4538 /**
4539   * <b>Fluent Client</b> search parameter constant for <b>title</b>
4540   * <p>
4541   * Description: <b>Multiple Resources: 
4542
4543* [ActivityDefinition](activitydefinition.html): The human-friendly name of the activity definition
4544* [ActorDefinition](actordefinition.html): The human-friendly name of the Actor Definition
4545* [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement
4546* [ChargeItemDefinition](chargeitemdefinition.html): The human-friendly name of the charge item definition
4547* [Citation](citation.html): The human-friendly name of the citation
4548* [CodeSystem](codesystem.html): The human-friendly name of the code system
4549* [ConceptMap](conceptmap.html): The human-friendly name of the concept map
4550* [ConditionDefinition](conditiondefinition.html): The human-friendly name of the condition definition
4551* [EventDefinition](eventdefinition.html): The human-friendly name of the event definition
4552* [Evidence](evidence.html): The human-friendly name of the evidence
4553* [EvidenceVariable](evidencevariable.html): The human-friendly name of the evidence variable
4554* [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide
4555* [Library](library.html): The human-friendly name of the library
4556* [Measure](measure.html): The human-friendly name of the measure
4557* [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition
4558* [ObservationDefinition](observationdefinition.html): Human-friendly name of the ObservationDefinition
4559* [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition
4560* [PlanDefinition](plandefinition.html): The human-friendly name of the plan definition
4561* [Questionnaire](questionnaire.html): The human-friendly name of the questionnaire
4562* [Requirements](requirements.html): The human-friendly name of the requirements
4563* [SpecimenDefinition](specimendefinition.html): Human-friendly name of the SpecimenDefinition
4564* [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition
4565* [StructureMap](structuremap.html): The human-friendly name of the structure map
4566* [SubscriptionTopic](subscriptiontopic.html): Name for this SubscriptionTopic (Human friendly)
4567* [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities
4568* [TestScript](testscript.html): The human-friendly name of the test script
4569* [ValueSet](valueset.html): The human-friendly name of the value set
4570</b><br>
4571   * Type: <b>string</b><br>
4572   * Path: <b>ActivityDefinition.title | ActorDefinition.title | CapabilityStatement.title | ChargeItemDefinition.title | Citation.title | CodeSystem.title | ConceptMap.title | ConditionDefinition.title | EventDefinition.title | Evidence.title | EvidenceVariable.title | ImplementationGuide.title | Library.title | Measure.title | MessageDefinition.title | ObservationDefinition.title | OperationDefinition.title | PlanDefinition.title | Questionnaire.title | Requirements.title | SpecimenDefinition.title | StructureDefinition.title | StructureMap.title | SubscriptionTopic.title | TerminologyCapabilities.title | TestScript.title | ValueSet.title</b><br>
4573   * </p>
4574   */
4575  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
4576
4577 /**
4578   * Search parameter: <b>url</b>
4579   * <p>
4580   * Description: <b>Multiple Resources: 
4581
4582* [ActivityDefinition](activitydefinition.html): The uri that identifies the activity definition
4583* [ActorDefinition](actordefinition.html): The uri that identifies the Actor Definition
4584* [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement
4585* [ChargeItemDefinition](chargeitemdefinition.html): The uri that identifies the charge item definition
4586* [Citation](citation.html): The uri that identifies the citation
4587* [CodeSystem](codesystem.html): The uri that identifies the code system
4588* [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition
4589* [ConceptMap](conceptmap.html): The URI that identifies the concept map
4590* [ConditionDefinition](conditiondefinition.html): The uri that identifies the condition definition
4591* [EventDefinition](eventdefinition.html): The uri that identifies the event definition
4592* [Evidence](evidence.html): The uri that identifies the evidence
4593* [EvidenceReport](evidencereport.html): The uri that identifies the evidence report
4594* [EvidenceVariable](evidencevariable.html): The uri that identifies the evidence variable
4595* [ExampleScenario](examplescenario.html): The uri that identifies the example scenario
4596* [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition
4597* [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide
4598* [Library](library.html): The uri that identifies the library
4599* [Measure](measure.html): The uri that identifies the measure
4600* [MessageDefinition](messagedefinition.html): The uri that identifies the message definition
4601* [NamingSystem](namingsystem.html): The uri that identifies the naming system
4602* [ObservationDefinition](observationdefinition.html): The uri that identifies the observation definition
4603* [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition
4604* [PlanDefinition](plandefinition.html): The uri that identifies the plan definition
4605* [Questionnaire](questionnaire.html): The uri that identifies the questionnaire
4606* [Requirements](requirements.html): The uri that identifies the requirements
4607* [SearchParameter](searchparameter.html): The uri that identifies the search parameter
4608* [SpecimenDefinition](specimendefinition.html): The uri that identifies the specimen definition
4609* [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition
4610* [StructureMap](structuremap.html): The uri that identifies the structure map
4611* [SubscriptionTopic](subscriptiontopic.html): Logical canonical URL to reference this SubscriptionTopic (globally unique)
4612* [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities
4613* [TestPlan](testplan.html): The uri that identifies the test plan
4614* [TestScript](testscript.html): The uri that identifies the test script
4615* [ValueSet](valueset.html): The uri that identifies the value set
4616</b><br>
4617   * Type: <b>uri</b><br>
4618   * Path: <b>ActivityDefinition.url | ActorDefinition.url | CapabilityStatement.url | ChargeItemDefinition.url | Citation.url | CodeSystem.url | CompartmentDefinition.url | ConceptMap.url | ConditionDefinition.url | EventDefinition.url | Evidence.url | EvidenceReport.url | EvidenceVariable.url | ExampleScenario.url | GraphDefinition.url | ImplementationGuide.url | Library.url | Measure.url | MessageDefinition.url | NamingSystem.url | ObservationDefinition.url | OperationDefinition.url | PlanDefinition.url | Questionnaire.url | Requirements.url | SearchParameter.url | SpecimenDefinition.url | StructureDefinition.url | StructureMap.url | SubscriptionTopic.url | TerminologyCapabilities.url | TestPlan.url | TestScript.url | ValueSet.url</b><br>
4619   * </p>
4620   */
4621  @SearchParamDefinition(name="url", path="ActivityDefinition.url | ActorDefinition.url | CapabilityStatement.url | ChargeItemDefinition.url | Citation.url | CodeSystem.url | CompartmentDefinition.url | ConceptMap.url | ConditionDefinition.url | EventDefinition.url | Evidence.url | EvidenceReport.url | EvidenceVariable.url | ExampleScenario.url | GraphDefinition.url | ImplementationGuide.url | Library.url | Measure.url | MessageDefinition.url | NamingSystem.url | ObservationDefinition.url | OperationDefinition.url | PlanDefinition.url | Questionnaire.url | Requirements.url | SearchParameter.url | SpecimenDefinition.url | StructureDefinition.url | StructureMap.url | SubscriptionTopic.url | TerminologyCapabilities.url | TestPlan.url | TestScript.url | ValueSet.url", description="Multiple Resources: \r\n\r\n* [ActivityDefinition](activitydefinition.html): The uri that identifies the activity definition\r\n* [ActorDefinition](actordefinition.html): The uri that identifies the Actor Definition\r\n* [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement\r\n* [ChargeItemDefinition](chargeitemdefinition.html): The uri that identifies the charge item definition\r\n* [Citation](citation.html): The uri that identifies the citation\r\n* [CodeSystem](codesystem.html): The uri that identifies the code system\r\n* [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition\r\n* [ConceptMap](conceptmap.html): The URI that identifies the concept map\r\n* [ConditionDefinition](conditiondefinition.html): The uri that identifies the condition definition\r\n* [EventDefinition](eventdefinition.html): The uri that identifies the event definition\r\n* [Evidence](evidence.html): The uri that identifies the evidence\r\n* [EvidenceReport](evidencereport.html): The uri that identifies the evidence report\r\n* [EvidenceVariable](evidencevariable.html): The uri that identifies the evidence variable\r\n* [ExampleScenario](examplescenario.html): The uri that identifies the example scenario\r\n* [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition\r\n* [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide\r\n* [Library](library.html): The uri that identifies the library\r\n* [Measure](measure.html): The uri that identifies the measure\r\n* [MessageDefinition](messagedefinition.html): The uri that identifies the message definition\r\n* [NamingSystem](namingsystem.html): The uri that identifies the naming system\r\n* [ObservationDefinition](observationdefinition.html): The uri that identifies the observation definition\r\n* [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition\r\n* [PlanDefinition](plandefinition.html): The uri that identifies the plan definition\r\n* [Questionnaire](questionnaire.html): The uri that identifies the questionnaire\r\n* [Requirements](requirements.html): The uri that identifies the requirements\r\n* [SearchParameter](searchparameter.html): The uri that identifies the search parameter\r\n* [SpecimenDefinition](specimendefinition.html): The uri that identifies the specimen definition\r\n* [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition\r\n* [StructureMap](structuremap.html): The uri that identifies the structure map\r\n* [SubscriptionTopic](subscriptiontopic.html): Logical canonical URL to reference this SubscriptionTopic (globally unique)\r\n* [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities\r\n* [TestPlan](testplan.html): The uri that identifies the test plan\r\n* [TestScript](testscript.html): The uri that identifies the test script\r\n* [ValueSet](valueset.html): The uri that identifies the value set\r\n", type="uri" )
4622  public static final String SP_URL = "url";
4623 /**
4624   * <b>Fluent Client</b> search parameter constant for <b>url</b>
4625   * <p>
4626   * Description: <b>Multiple Resources: 
4627
4628* [ActivityDefinition](activitydefinition.html): The uri that identifies the activity definition
4629* [ActorDefinition](actordefinition.html): The uri that identifies the Actor Definition
4630* [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement
4631* [ChargeItemDefinition](chargeitemdefinition.html): The uri that identifies the charge item definition
4632* [Citation](citation.html): The uri that identifies the citation
4633* [CodeSystem](codesystem.html): The uri that identifies the code system
4634* [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition
4635* [ConceptMap](conceptmap.html): The URI that identifies the concept map
4636* [ConditionDefinition](conditiondefinition.html): The uri that identifies the condition definition
4637* [EventDefinition](eventdefinition.html): The uri that identifies the event definition
4638* [Evidence](evidence.html): The uri that identifies the evidence
4639* [EvidenceReport](evidencereport.html): The uri that identifies the evidence report
4640* [EvidenceVariable](evidencevariable.html): The uri that identifies the evidence variable
4641* [ExampleScenario](examplescenario.html): The uri that identifies the example scenario
4642* [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition
4643* [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide
4644* [Library](library.html): The uri that identifies the library
4645* [Measure](measure.html): The uri that identifies the measure
4646* [MessageDefinition](messagedefinition.html): The uri that identifies the message definition
4647* [NamingSystem](namingsystem.html): The uri that identifies the naming system
4648* [ObservationDefinition](observationdefinition.html): The uri that identifies the observation definition
4649* [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition
4650* [PlanDefinition](plandefinition.html): The uri that identifies the plan definition
4651* [Questionnaire](questionnaire.html): The uri that identifies the questionnaire
4652* [Requirements](requirements.html): The uri that identifies the requirements
4653* [SearchParameter](searchparameter.html): The uri that identifies the search parameter
4654* [SpecimenDefinition](specimendefinition.html): The uri that identifies the specimen definition
4655* [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition
4656* [StructureMap](structuremap.html): The uri that identifies the structure map
4657* [SubscriptionTopic](subscriptiontopic.html): Logical canonical URL to reference this SubscriptionTopic (globally unique)
4658* [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities
4659* [TestPlan](testplan.html): The uri that identifies the test plan
4660* [TestScript](testscript.html): The uri that identifies the test script
4661* [ValueSet](valueset.html): The uri that identifies the value set
4662</b><br>
4663   * Type: <b>uri</b><br>
4664   * Path: <b>ActivityDefinition.url | ActorDefinition.url | CapabilityStatement.url | ChargeItemDefinition.url | Citation.url | CodeSystem.url | CompartmentDefinition.url | ConceptMap.url | ConditionDefinition.url | EventDefinition.url | Evidence.url | EvidenceReport.url | EvidenceVariable.url | ExampleScenario.url | GraphDefinition.url | ImplementationGuide.url | Library.url | Measure.url | MessageDefinition.url | NamingSystem.url | ObservationDefinition.url | OperationDefinition.url | PlanDefinition.url | Questionnaire.url | Requirements.url | SearchParameter.url | SpecimenDefinition.url | StructureDefinition.url | StructureMap.url | SubscriptionTopic.url | TerminologyCapabilities.url | TestPlan.url | TestScript.url | ValueSet.url</b><br>
4665   * </p>
4666   */
4667  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
4668
4669 /**
4670   * Search parameter: <b>container</b>
4671   * <p>
4672   * Description: <b>The type of specimen conditioned in container expected by the lab</b><br>
4673   * Type: <b>token</b><br>
4674   * Path: <b>SpecimenDefinition.typeTested.container.type</b><br>
4675   * </p>
4676   */
4677  @SearchParamDefinition(name="container", path="SpecimenDefinition.typeTested.container.type", description="The type of specimen conditioned in container expected by the lab", type="token" )
4678  public static final String SP_CONTAINER = "container";
4679 /**
4680   * <b>Fluent Client</b> search parameter constant for <b>container</b>
4681   * <p>
4682   * Description: <b>The type of specimen conditioned in container expected by the lab</b><br>
4683   * Type: <b>token</b><br>
4684   * Path: <b>SpecimenDefinition.typeTested.container.type</b><br>
4685   * </p>
4686   */
4687  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTAINER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTAINER);
4688
4689 /**
4690   * Search parameter: <b>experimental</b>
4691   * <p>
4692   * Description: <b>Not for genuine usage (true)</b><br>
4693   * Type: <b>token</b><br>
4694   * Path: <b>SpecimenDefinition.experimental</b><br>
4695   * </p>
4696   */
4697  @SearchParamDefinition(name="experimental", path="SpecimenDefinition.experimental", description="Not for genuine usage (true)", type="token" )
4698  public static final String SP_EXPERIMENTAL = "experimental";
4699 /**
4700   * <b>Fluent Client</b> search parameter constant for <b>experimental</b>
4701   * <p>
4702   * Description: <b>Not for genuine usage (true)</b><br>
4703   * Type: <b>token</b><br>
4704   * Path: <b>SpecimenDefinition.experimental</b><br>
4705   * </p>
4706   */
4707  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXPERIMENTAL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXPERIMENTAL);
4708
4709 /**
4710   * Search parameter: <b>is-derived</b>
4711   * <p>
4712   * Description: <b>Primary specimen (false) or derived specimen (true)</b><br>
4713   * Type: <b>token</b><br>
4714   * Path: <b>SpecimenDefinition.typeTested.isDerived</b><br>
4715   * </p>
4716   */
4717  @SearchParamDefinition(name="is-derived", path="SpecimenDefinition.typeTested.isDerived", description="Primary specimen (false) or derived specimen (true)", type="token" )
4718  public static final String SP_IS_DERIVED = "is-derived";
4719 /**
4720   * <b>Fluent Client</b> search parameter constant for <b>is-derived</b>
4721   * <p>
4722   * Description: <b>Primary specimen (false) or derived specimen (true)</b><br>
4723   * Type: <b>token</b><br>
4724   * Path: <b>SpecimenDefinition.typeTested.isDerived</b><br>
4725   * </p>
4726   */
4727  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IS_DERIVED = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IS_DERIVED);
4728
4729 /**
4730   * Search parameter: <b>type-tested</b>
4731   * <p>
4732   * Description: <b>The type of specimen conditioned for testing</b><br>
4733   * Type: <b>token</b><br>
4734   * Path: <b>SpecimenDefinition.typeTested.type</b><br>
4735   * </p>
4736   */
4737  @SearchParamDefinition(name="type-tested", path="SpecimenDefinition.typeTested.type", description="The type of specimen conditioned for testing", type="token" )
4738  public static final String SP_TYPE_TESTED = "type-tested";
4739 /**
4740   * <b>Fluent Client</b> search parameter constant for <b>type-tested</b>
4741   * <p>
4742   * Description: <b>The type of specimen conditioned for testing</b><br>
4743   * Type: <b>token</b><br>
4744   * Path: <b>SpecimenDefinition.typeTested.type</b><br>
4745   * </p>
4746   */
4747  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE_TESTED = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE_TESTED);
4748
4749 /**
4750   * Search parameter: <b>type</b>
4751   * <p>
4752   * Description: <b>The type of collected specimen</b><br>
4753   * Type: <b>token</b><br>
4754   * Path: <b>SpecimenDefinition.typeCollected</b><br>
4755   * </p>
4756   */
4757  @SearchParamDefinition(name="type", path="SpecimenDefinition.typeCollected", description="The type of collected specimen", type="token" )
4758  public static final String SP_TYPE = "type";
4759 /**
4760   * <b>Fluent Client</b> search parameter constant for <b>type</b>
4761   * <p>
4762   * Description: <b>The type of collected specimen</b><br>
4763   * Type: <b>token</b><br>
4764   * Path: <b>SpecimenDefinition.typeCollected</b><br>
4765   * </p>
4766   */
4767  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
4768
4769
4770}
4771