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 Base makeProperty(int hash, String name) throws FHIRException {
779        switch (hash) {
780        case 976346515:  return getIsDerivedElement();
781        case 3575610:  return getType();
782        case -1459831589:  return getPreferenceElement();
783        case -410956671:  return getContainer();
784        case 363387971:  return getRequirementElement();
785        case 1434969867:  return getRetentionTime();
786        case -1494547425:  return getSingleUseElement();
787        case -553706344:  return addRejectionCriterion(); 
788        case 2072805:  return addHandling(); 
789        case 939511774:  return addTestingDestination(); 
790        default: return super.makeProperty(hash, name);
791        }
792
793      }
794
795      @Override
796      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
797        switch (hash) {
798        case 976346515: /*isDerived*/ return new String[] {"boolean"};
799        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
800        case -1459831589: /*preference*/ return new String[] {"code"};
801        case -410956671: /*container*/ return new String[] {};
802        case 363387971: /*requirement*/ return new String[] {"markdown"};
803        case 1434969867: /*retentionTime*/ return new String[] {"Duration"};
804        case -1494547425: /*singleUse*/ return new String[] {"boolean"};
805        case -553706344: /*rejectionCriterion*/ return new String[] {"CodeableConcept"};
806        case 2072805: /*handling*/ return new String[] {};
807        case 939511774: /*testingDestination*/ return new String[] {"CodeableConcept"};
808        default: return super.getTypesForProperty(hash, name);
809        }
810
811      }
812
813      @Override
814      public Base addChild(String name) throws FHIRException {
815        if (name.equals("isDerived")) {
816          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.isDerived");
817        }
818        else if (name.equals("type")) {
819          this.type = new CodeableConcept();
820          return this.type;
821        }
822        else if (name.equals("preference")) {
823          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.preference");
824        }
825        else if (name.equals("container")) {
826          this.container = new SpecimenDefinitionTypeTestedContainerComponent();
827          return this.container;
828        }
829        else if (name.equals("requirement")) {
830          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.requirement");
831        }
832        else if (name.equals("retentionTime")) {
833          this.retentionTime = new Duration();
834          return this.retentionTime;
835        }
836        else if (name.equals("singleUse")) {
837          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.singleUse");
838        }
839        else if (name.equals("rejectionCriterion")) {
840          return addRejectionCriterion();
841        }
842        else if (name.equals("handling")) {
843          return addHandling();
844        }
845        else if (name.equals("testingDestination")) {
846          return addTestingDestination();
847        }
848        else
849          return super.addChild(name);
850      }
851
852      public SpecimenDefinitionTypeTestedComponent copy() {
853        SpecimenDefinitionTypeTestedComponent dst = new SpecimenDefinitionTypeTestedComponent();
854        copyValues(dst);
855        return dst;
856      }
857
858      public void copyValues(SpecimenDefinitionTypeTestedComponent dst) {
859        super.copyValues(dst);
860        dst.isDerived = isDerived == null ? null : isDerived.copy();
861        dst.type = type == null ? null : type.copy();
862        dst.preference = preference == null ? null : preference.copy();
863        dst.container = container == null ? null : container.copy();
864        dst.requirement = requirement == null ? null : requirement.copy();
865        dst.retentionTime = retentionTime == null ? null : retentionTime.copy();
866        dst.singleUse = singleUse == null ? null : singleUse.copy();
867        if (rejectionCriterion != null) {
868          dst.rejectionCriterion = new ArrayList<CodeableConcept>();
869          for (CodeableConcept i : rejectionCriterion)
870            dst.rejectionCriterion.add(i.copy());
871        };
872        if (handling != null) {
873          dst.handling = new ArrayList<SpecimenDefinitionTypeTestedHandlingComponent>();
874          for (SpecimenDefinitionTypeTestedHandlingComponent i : handling)
875            dst.handling.add(i.copy());
876        };
877        if (testingDestination != null) {
878          dst.testingDestination = new ArrayList<CodeableConcept>();
879          for (CodeableConcept i : testingDestination)
880            dst.testingDestination.add(i.copy());
881        };
882      }
883
884      @Override
885      public boolean equalsDeep(Base other_) {
886        if (!super.equalsDeep(other_))
887          return false;
888        if (!(other_ instanceof SpecimenDefinitionTypeTestedComponent))
889          return false;
890        SpecimenDefinitionTypeTestedComponent o = (SpecimenDefinitionTypeTestedComponent) other_;
891        return compareDeep(isDerived, o.isDerived, true) && compareDeep(type, o.type, true) && compareDeep(preference, o.preference, true)
892           && compareDeep(container, o.container, true) && compareDeep(requirement, o.requirement, true) && compareDeep(retentionTime, o.retentionTime, true)
893           && compareDeep(singleUse, o.singleUse, true) && compareDeep(rejectionCriterion, o.rejectionCriterion, true)
894           && compareDeep(handling, o.handling, true) && compareDeep(testingDestination, o.testingDestination, true)
895          ;
896      }
897
898      @Override
899      public boolean equalsShallow(Base other_) {
900        if (!super.equalsShallow(other_))
901          return false;
902        if (!(other_ instanceof SpecimenDefinitionTypeTestedComponent))
903          return false;
904        SpecimenDefinitionTypeTestedComponent o = (SpecimenDefinitionTypeTestedComponent) other_;
905        return compareValues(isDerived, o.isDerived, true) && compareValues(preference, o.preference, true)
906           && compareValues(requirement, o.requirement, true) && compareValues(singleUse, o.singleUse, true);
907      }
908
909      public boolean isEmpty() {
910        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(isDerived, type, preference
911          , container, requirement, retentionTime, singleUse, rejectionCriterion, handling
912          , testingDestination);
913      }
914
915  public String fhirType() {
916    return "SpecimenDefinition.typeTested";
917
918  }
919
920  }
921
922    @Block()
923    public static class SpecimenDefinitionTypeTestedContainerComponent extends BackboneElement implements IBaseBackboneElement {
924        /**
925         * The type of material of the container.
926         */
927        @Child(name = "material", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
928        @Description(shortDefinition="The material type used for the container", formalDefinition="The type of material of the container." )
929        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/container-material")
930        protected CodeableConcept material;
931
932        /**
933         * The type of container used to contain this kind of specimen.
934         */
935        @Child(name = "type", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
936        @Description(shortDefinition="Kind of container associated with the kind of specimen", formalDefinition="The type of container used to contain this kind of specimen." )
937        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-container-type")
938        protected CodeableConcept type;
939
940        /**
941         * Color of container cap.
942         */
943        @Child(name = "cap", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
944        @Description(shortDefinition="Color of container cap", formalDefinition="Color of container cap." )
945        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/container-cap")
946        protected CodeableConcept cap;
947
948        /**
949         * The textual description of the kind of container.
950         */
951        @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
952        @Description(shortDefinition="The description of the kind of container", formalDefinition="The textual description of the kind of container." )
953        protected MarkdownType description;
954
955        /**
956         * The capacity (volume or other measure) of this kind of container.
957         */
958        @Child(name = "capacity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false)
959        @Description(shortDefinition="The capacity of this kind of container", formalDefinition="The capacity (volume or other measure) of this kind of container." )
960        protected Quantity capacity;
961
962        /**
963         * The minimum volume to be conditioned in the container.
964         */
965        @Child(name = "minimumVolume", type = {Quantity.class, StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
966        @Description(shortDefinition="Minimum volume", formalDefinition="The minimum volume to be conditioned in the container." )
967        protected DataType minimumVolume;
968
969        /**
970         * Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.
971         */
972        @Child(name = "additive", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
973        @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." )
974        protected List<SpecimenDefinitionTypeTestedContainerAdditiveComponent> additive;
975
976        /**
977         * Special processing that should be applied to the container for this kind of specimen.
978         */
979        @Child(name = "preparation", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=false)
980        @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." )
981        protected MarkdownType preparation;
982
983        private static final long serialVersionUID = -932984420L;
984
985    /**
986     * Constructor
987     */
988      public SpecimenDefinitionTypeTestedContainerComponent() {
989        super();
990      }
991
992        /**
993         * @return {@link #material} (The type of material of the container.)
994         */
995        public CodeableConcept getMaterial() { 
996          if (this.material == null)
997            if (Configuration.errorOnAutoCreate())
998              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.material");
999            else if (Configuration.doAutoCreate())
1000              this.material = new CodeableConcept(); // cc
1001          return this.material;
1002        }
1003
1004        public boolean hasMaterial() { 
1005          return this.material != null && !this.material.isEmpty();
1006        }
1007
1008        /**
1009         * @param value {@link #material} (The type of material of the container.)
1010         */
1011        public SpecimenDefinitionTypeTestedContainerComponent setMaterial(CodeableConcept value) { 
1012          this.material = value;
1013          return this;
1014        }
1015
1016        /**
1017         * @return {@link #type} (The type of container used to contain this kind of specimen.)
1018         */
1019        public CodeableConcept getType() { 
1020          if (this.type == null)
1021            if (Configuration.errorOnAutoCreate())
1022              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.type");
1023            else if (Configuration.doAutoCreate())
1024              this.type = new CodeableConcept(); // cc
1025          return this.type;
1026        }
1027
1028        public boolean hasType() { 
1029          return this.type != null && !this.type.isEmpty();
1030        }
1031
1032        /**
1033         * @param value {@link #type} (The type of container used to contain this kind of specimen.)
1034         */
1035        public SpecimenDefinitionTypeTestedContainerComponent setType(CodeableConcept value) { 
1036          this.type = value;
1037          return this;
1038        }
1039
1040        /**
1041         * @return {@link #cap} (Color of container cap.)
1042         */
1043        public CodeableConcept getCap() { 
1044          if (this.cap == null)
1045            if (Configuration.errorOnAutoCreate())
1046              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.cap");
1047            else if (Configuration.doAutoCreate())
1048              this.cap = new CodeableConcept(); // cc
1049          return this.cap;
1050        }
1051
1052        public boolean hasCap() { 
1053          return this.cap != null && !this.cap.isEmpty();
1054        }
1055
1056        /**
1057         * @param value {@link #cap} (Color of container cap.)
1058         */
1059        public SpecimenDefinitionTypeTestedContainerComponent setCap(CodeableConcept value) { 
1060          this.cap = value;
1061          return this;
1062        }
1063
1064        /**
1065         * @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
1066         */
1067        public MarkdownType getDescriptionElement() { 
1068          if (this.description == null)
1069            if (Configuration.errorOnAutoCreate())
1070              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.description");
1071            else if (Configuration.doAutoCreate())
1072              this.description = new MarkdownType(); // bb
1073          return this.description;
1074        }
1075
1076        public boolean hasDescriptionElement() { 
1077          return this.description != null && !this.description.isEmpty();
1078        }
1079
1080        public boolean hasDescription() { 
1081          return this.description != null && !this.description.isEmpty();
1082        }
1083
1084        /**
1085         * @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
1086         */
1087        public SpecimenDefinitionTypeTestedContainerComponent setDescriptionElement(MarkdownType value) { 
1088          this.description = value;
1089          return this;
1090        }
1091
1092        /**
1093         * @return The textual description of the kind of container.
1094         */
1095        public String getDescription() { 
1096          return this.description == null ? null : this.description.getValue();
1097        }
1098
1099        /**
1100         * @param value The textual description of the kind of container.
1101         */
1102        public SpecimenDefinitionTypeTestedContainerComponent setDescription(String value) { 
1103          if (Utilities.noString(value))
1104            this.description = null;
1105          else {
1106            if (this.description == null)
1107              this.description = new MarkdownType();
1108            this.description.setValue(value);
1109          }
1110          return this;
1111        }
1112
1113        /**
1114         * @return {@link #capacity} (The capacity (volume or other measure) of this kind of container.)
1115         */
1116        public Quantity getCapacity() { 
1117          if (this.capacity == null)
1118            if (Configuration.errorOnAutoCreate())
1119              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.capacity");
1120            else if (Configuration.doAutoCreate())
1121              this.capacity = new Quantity(); // cc
1122          return this.capacity;
1123        }
1124
1125        public boolean hasCapacity() { 
1126          return this.capacity != null && !this.capacity.isEmpty();
1127        }
1128
1129        /**
1130         * @param value {@link #capacity} (The capacity (volume or other measure) of this kind of container.)
1131         */
1132        public SpecimenDefinitionTypeTestedContainerComponent setCapacity(Quantity value) { 
1133          this.capacity = value;
1134          return this;
1135        }
1136
1137        /**
1138         * @return {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1139         */
1140        public DataType getMinimumVolume() { 
1141          return this.minimumVolume;
1142        }
1143
1144        /**
1145         * @return {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1146         */
1147        public Quantity getMinimumVolumeQuantity() throws FHIRException { 
1148          if (this.minimumVolume == null)
1149            this.minimumVolume = new Quantity();
1150          if (!(this.minimumVolume instanceof Quantity))
1151            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.minimumVolume.getClass().getName()+" was encountered");
1152          return (Quantity) this.minimumVolume;
1153        }
1154
1155        public boolean hasMinimumVolumeQuantity() { 
1156          return this != null && this.minimumVolume instanceof Quantity;
1157        }
1158
1159        /**
1160         * @return {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1161         */
1162        public StringType getMinimumVolumeStringType() throws FHIRException { 
1163          if (this.minimumVolume == null)
1164            this.minimumVolume = new StringType();
1165          if (!(this.minimumVolume instanceof StringType))
1166            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.minimumVolume.getClass().getName()+" was encountered");
1167          return (StringType) this.minimumVolume;
1168        }
1169
1170        public boolean hasMinimumVolumeStringType() { 
1171          return this != null && this.minimumVolume instanceof StringType;
1172        }
1173
1174        public boolean hasMinimumVolume() { 
1175          return this.minimumVolume != null && !this.minimumVolume.isEmpty();
1176        }
1177
1178        /**
1179         * @param value {@link #minimumVolume} (The minimum volume to be conditioned in the container.)
1180         */
1181        public SpecimenDefinitionTypeTestedContainerComponent setMinimumVolume(DataType value) { 
1182          if (value != null && !(value instanceof Quantity || value instanceof StringType))
1183            throw new FHIRException("Not the right type for SpecimenDefinition.typeTested.container.minimumVolume[x]: "+value.fhirType());
1184          this.minimumVolume = value;
1185          return this;
1186        }
1187
1188        /**
1189         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1190         */
1191        public List<SpecimenDefinitionTypeTestedContainerAdditiveComponent> getAdditive() { 
1192          if (this.additive == null)
1193            this.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1194          return this.additive;
1195        }
1196
1197        /**
1198         * @return Returns a reference to <code>this</code> for easy method chaining
1199         */
1200        public SpecimenDefinitionTypeTestedContainerComponent setAdditive(List<SpecimenDefinitionTypeTestedContainerAdditiveComponent> theAdditive) { 
1201          this.additive = theAdditive;
1202          return this;
1203        }
1204
1205        public boolean hasAdditive() { 
1206          if (this.additive == null)
1207            return false;
1208          for (SpecimenDefinitionTypeTestedContainerAdditiveComponent item : this.additive)
1209            if (!item.isEmpty())
1210              return true;
1211          return false;
1212        }
1213
1214        public SpecimenDefinitionTypeTestedContainerAdditiveComponent addAdditive() { //3
1215          SpecimenDefinitionTypeTestedContainerAdditiveComponent t = new SpecimenDefinitionTypeTestedContainerAdditiveComponent();
1216          if (this.additive == null)
1217            this.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1218          this.additive.add(t);
1219          return t;
1220        }
1221
1222        public SpecimenDefinitionTypeTestedContainerComponent addAdditive(SpecimenDefinitionTypeTestedContainerAdditiveComponent t) { //3
1223          if (t == null)
1224            return this;
1225          if (this.additive == null)
1226            this.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1227          this.additive.add(t);
1228          return this;
1229        }
1230
1231        /**
1232         * @return The first repetition of repeating field {@link #additive}, creating it if it does not already exist {3}
1233         */
1234        public SpecimenDefinitionTypeTestedContainerAdditiveComponent getAdditiveFirstRep() { 
1235          if (getAdditive().isEmpty()) {
1236            addAdditive();
1237          }
1238          return getAdditive().get(0);
1239        }
1240
1241        /**
1242         * @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
1243         */
1244        public MarkdownType getPreparationElement() { 
1245          if (this.preparation == null)
1246            if (Configuration.errorOnAutoCreate())
1247              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedContainerComponent.preparation");
1248            else if (Configuration.doAutoCreate())
1249              this.preparation = new MarkdownType(); // bb
1250          return this.preparation;
1251        }
1252
1253        public boolean hasPreparationElement() { 
1254          return this.preparation != null && !this.preparation.isEmpty();
1255        }
1256
1257        public boolean hasPreparation() { 
1258          return this.preparation != null && !this.preparation.isEmpty();
1259        }
1260
1261        /**
1262         * @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
1263         */
1264        public SpecimenDefinitionTypeTestedContainerComponent setPreparationElement(MarkdownType value) { 
1265          this.preparation = value;
1266          return this;
1267        }
1268
1269        /**
1270         * @return Special processing that should be applied to the container for this kind of specimen.
1271         */
1272        public String getPreparation() { 
1273          return this.preparation == null ? null : this.preparation.getValue();
1274        }
1275
1276        /**
1277         * @param value Special processing that should be applied to the container for this kind of specimen.
1278         */
1279        public SpecimenDefinitionTypeTestedContainerComponent setPreparation(String value) { 
1280          if (Utilities.noString(value))
1281            this.preparation = null;
1282          else {
1283            if (this.preparation == null)
1284              this.preparation = new MarkdownType();
1285            this.preparation.setValue(value);
1286          }
1287          return this;
1288        }
1289
1290        protected void listChildren(List<Property> children) {
1291          super.listChildren(children);
1292          children.add(new Property("material", "CodeableConcept", "The type of material of the container.", 0, 1, material));
1293          children.add(new Property("type", "CodeableConcept", "The type of container used to contain this kind of specimen.", 0, 1, type));
1294          children.add(new Property("cap", "CodeableConcept", "Color of container cap.", 0, 1, cap));
1295          children.add(new Property("description", "markdown", "The textual description of the kind of container.", 0, 1, description));
1296          children.add(new Property("capacity", "Quantity", "The capacity (volume or other measure) of this kind of container.", 0, 1, capacity));
1297          children.add(new Property("minimumVolume[x]", "Quantity|string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume));
1298          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));
1299          children.add(new Property("preparation", "markdown", "Special processing that should be applied to the container for this kind of specimen.", 0, 1, preparation));
1300        }
1301
1302        @Override
1303        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1304          switch (_hash) {
1305          case 299066663: /*material*/  return new Property("material", "CodeableConcept", "The type of material of the container.", 0, 1, material);
1306          case 3575610: /*type*/  return new Property("type", "CodeableConcept", "The type of container used to contain this kind of specimen.", 0, 1, type);
1307          case 98258: /*cap*/  return new Property("cap", "CodeableConcept", "Color of container cap.", 0, 1, cap);
1308          case -1724546052: /*description*/  return new Property("description", "markdown", "The textual description of the kind of container.", 0, 1, description);
1309          case -67824454: /*capacity*/  return new Property("capacity", "Quantity", "The capacity (volume or other measure) of this kind of container.", 0, 1, capacity);
1310          case 371830456: /*minimumVolume[x]*/  return new Property("minimumVolume[x]", "Quantity|string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1311          case -1674665784: /*minimumVolume*/  return new Property("minimumVolume[x]", "Quantity|string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1312          case -532143757: /*minimumVolumeQuantity*/  return new Property("minimumVolume[x]", "Quantity", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1313          case 248461049: /*minimumVolumeString*/  return new Property("minimumVolume[x]", "string", "The minimum volume to be conditioned in the container.", 0, 1, minimumVolume);
1314          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);
1315          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);
1316          default: return super.getNamedProperty(_hash, _name, _checkValid);
1317          }
1318
1319        }
1320
1321      @Override
1322      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1323        switch (hash) {
1324        case 299066663: /*material*/ return this.material == null ? new Base[0] : new Base[] {this.material}; // CodeableConcept
1325        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1326        case 98258: /*cap*/ return this.cap == null ? new Base[0] : new Base[] {this.cap}; // CodeableConcept
1327        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1328        case -67824454: /*capacity*/ return this.capacity == null ? new Base[0] : new Base[] {this.capacity}; // Quantity
1329        case -1674665784: /*minimumVolume*/ return this.minimumVolume == null ? new Base[0] : new Base[] {this.minimumVolume}; // DataType
1330        case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : this.additive.toArray(new Base[this.additive.size()]); // SpecimenDefinitionTypeTestedContainerAdditiveComponent
1331        case -1315428713: /*preparation*/ return this.preparation == null ? new Base[0] : new Base[] {this.preparation}; // MarkdownType
1332        default: return super.getProperty(hash, name, checkValid);
1333        }
1334
1335      }
1336
1337      @Override
1338      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1339        switch (hash) {
1340        case 299066663: // material
1341          this.material = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1342          return value;
1343        case 3575610: // type
1344          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1345          return value;
1346        case 98258: // cap
1347          this.cap = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1348          return value;
1349        case -1724546052: // description
1350          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1351          return value;
1352        case -67824454: // capacity
1353          this.capacity = TypeConvertor.castToQuantity(value); // Quantity
1354          return value;
1355        case -1674665784: // minimumVolume
1356          this.minimumVolume = TypeConvertor.castToType(value); // DataType
1357          return value;
1358        case -1226589236: // additive
1359          this.getAdditive().add((SpecimenDefinitionTypeTestedContainerAdditiveComponent) value); // SpecimenDefinitionTypeTestedContainerAdditiveComponent
1360          return value;
1361        case -1315428713: // preparation
1362          this.preparation = TypeConvertor.castToMarkdown(value); // MarkdownType
1363          return value;
1364        default: return super.setProperty(hash, name, value);
1365        }
1366
1367      }
1368
1369      @Override
1370      public Base setProperty(String name, Base value) throws FHIRException {
1371        if (name.equals("material")) {
1372          this.material = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1373        } else if (name.equals("type")) {
1374          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1375        } else if (name.equals("cap")) {
1376          this.cap = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1377        } else if (name.equals("description")) {
1378          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1379        } else if (name.equals("capacity")) {
1380          this.capacity = TypeConvertor.castToQuantity(value); // Quantity
1381        } else if (name.equals("minimumVolume[x]")) {
1382          this.minimumVolume = TypeConvertor.castToType(value); // DataType
1383        } else if (name.equals("additive")) {
1384          this.getAdditive().add((SpecimenDefinitionTypeTestedContainerAdditiveComponent) value);
1385        } else if (name.equals("preparation")) {
1386          this.preparation = TypeConvertor.castToMarkdown(value); // MarkdownType
1387        } else
1388          return super.setProperty(name, value);
1389        return value;
1390      }
1391
1392      @Override
1393      public Base makeProperty(int hash, String name) throws FHIRException {
1394        switch (hash) {
1395        case 299066663:  return getMaterial();
1396        case 3575610:  return getType();
1397        case 98258:  return getCap();
1398        case -1724546052:  return getDescriptionElement();
1399        case -67824454:  return getCapacity();
1400        case 371830456:  return getMinimumVolume();
1401        case -1674665784:  return getMinimumVolume();
1402        case -1226589236:  return addAdditive(); 
1403        case -1315428713:  return getPreparationElement();
1404        default: return super.makeProperty(hash, name);
1405        }
1406
1407      }
1408
1409      @Override
1410      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1411        switch (hash) {
1412        case 299066663: /*material*/ return new String[] {"CodeableConcept"};
1413        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1414        case 98258: /*cap*/ return new String[] {"CodeableConcept"};
1415        case -1724546052: /*description*/ return new String[] {"markdown"};
1416        case -67824454: /*capacity*/ return new String[] {"Quantity"};
1417        case -1674665784: /*minimumVolume*/ return new String[] {"Quantity", "string"};
1418        case -1226589236: /*additive*/ return new String[] {};
1419        case -1315428713: /*preparation*/ return new String[] {"markdown"};
1420        default: return super.getTypesForProperty(hash, name);
1421        }
1422
1423      }
1424
1425      @Override
1426      public Base addChild(String name) throws FHIRException {
1427        if (name.equals("material")) {
1428          this.material = new CodeableConcept();
1429          return this.material;
1430        }
1431        else if (name.equals("type")) {
1432          this.type = new CodeableConcept();
1433          return this.type;
1434        }
1435        else if (name.equals("cap")) {
1436          this.cap = new CodeableConcept();
1437          return this.cap;
1438        }
1439        else if (name.equals("description")) {
1440          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.container.description");
1441        }
1442        else if (name.equals("capacity")) {
1443          this.capacity = new Quantity();
1444          return this.capacity;
1445        }
1446        else if (name.equals("minimumVolumeQuantity")) {
1447          this.minimumVolume = new Quantity();
1448          return this.minimumVolume;
1449        }
1450        else if (name.equals("minimumVolumeString")) {
1451          this.minimumVolume = new StringType();
1452          return this.minimumVolume;
1453        }
1454        else if (name.equals("additive")) {
1455          return addAdditive();
1456        }
1457        else if (name.equals("preparation")) {
1458          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.container.preparation");
1459        }
1460        else
1461          return super.addChild(name);
1462      }
1463
1464      public SpecimenDefinitionTypeTestedContainerComponent copy() {
1465        SpecimenDefinitionTypeTestedContainerComponent dst = new SpecimenDefinitionTypeTestedContainerComponent();
1466        copyValues(dst);
1467        return dst;
1468      }
1469
1470      public void copyValues(SpecimenDefinitionTypeTestedContainerComponent dst) {
1471        super.copyValues(dst);
1472        dst.material = material == null ? null : material.copy();
1473        dst.type = type == null ? null : type.copy();
1474        dst.cap = cap == null ? null : cap.copy();
1475        dst.description = description == null ? null : description.copy();
1476        dst.capacity = capacity == null ? null : capacity.copy();
1477        dst.minimumVolume = minimumVolume == null ? null : minimumVolume.copy();
1478        if (additive != null) {
1479          dst.additive = new ArrayList<SpecimenDefinitionTypeTestedContainerAdditiveComponent>();
1480          for (SpecimenDefinitionTypeTestedContainerAdditiveComponent i : additive)
1481            dst.additive.add(i.copy());
1482        };
1483        dst.preparation = preparation == null ? null : preparation.copy();
1484      }
1485
1486      @Override
1487      public boolean equalsDeep(Base other_) {
1488        if (!super.equalsDeep(other_))
1489          return false;
1490        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerComponent))
1491          return false;
1492        SpecimenDefinitionTypeTestedContainerComponent o = (SpecimenDefinitionTypeTestedContainerComponent) other_;
1493        return compareDeep(material, o.material, true) && compareDeep(type, o.type, true) && compareDeep(cap, o.cap, true)
1494           && compareDeep(description, o.description, true) && compareDeep(capacity, o.capacity, true) && compareDeep(minimumVolume, o.minimumVolume, true)
1495           && compareDeep(additive, o.additive, true) && compareDeep(preparation, o.preparation, true);
1496      }
1497
1498      @Override
1499      public boolean equalsShallow(Base other_) {
1500        if (!super.equalsShallow(other_))
1501          return false;
1502        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerComponent))
1503          return false;
1504        SpecimenDefinitionTypeTestedContainerComponent o = (SpecimenDefinitionTypeTestedContainerComponent) other_;
1505        return compareValues(description, o.description, true) && compareValues(preparation, o.preparation, true)
1506          ;
1507      }
1508
1509      public boolean isEmpty() {
1510        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(material, type, cap, description
1511          , capacity, minimumVolume, additive, preparation);
1512      }
1513
1514  public String fhirType() {
1515    return "SpecimenDefinition.typeTested.container";
1516
1517  }
1518
1519  }
1520
1521    @Block()
1522    public static class SpecimenDefinitionTypeTestedContainerAdditiveComponent extends BackboneElement implements IBaseBackboneElement {
1523        /**
1524         * Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.
1525         */
1526        @Child(name = "additive", type = {CodeableConcept.class, SubstanceDefinition.class}, order=1, min=1, max=1, modifier=false, summary=false)
1527        @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." )
1528        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0371")
1529        protected DataType additive;
1530
1531        private static final long serialVersionUID = 201856258L;
1532
1533    /**
1534     * Constructor
1535     */
1536      public SpecimenDefinitionTypeTestedContainerAdditiveComponent() {
1537        super();
1538      }
1539
1540    /**
1541     * Constructor
1542     */
1543      public SpecimenDefinitionTypeTestedContainerAdditiveComponent(DataType additive) {
1544        super();
1545        this.setAdditive(additive);
1546      }
1547
1548        /**
1549         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1550         */
1551        public DataType getAdditive() { 
1552          return this.additive;
1553        }
1554
1555        /**
1556         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1557         */
1558        public CodeableConcept getAdditiveCodeableConcept() throws FHIRException { 
1559          if (this.additive == null)
1560            this.additive = new CodeableConcept();
1561          if (!(this.additive instanceof CodeableConcept))
1562            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.additive.getClass().getName()+" was encountered");
1563          return (CodeableConcept) this.additive;
1564        }
1565
1566        public boolean hasAdditiveCodeableConcept() { 
1567          return this != null && this.additive instanceof CodeableConcept;
1568        }
1569
1570        /**
1571         * @return {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1572         */
1573        public Reference getAdditiveReference() throws FHIRException { 
1574          if (this.additive == null)
1575            this.additive = new Reference();
1576          if (!(this.additive instanceof Reference))
1577            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.additive.getClass().getName()+" was encountered");
1578          return (Reference) this.additive;
1579        }
1580
1581        public boolean hasAdditiveReference() { 
1582          return this != null && this.additive instanceof Reference;
1583        }
1584
1585        public boolean hasAdditive() { 
1586          return this.additive != null && !this.additive.isEmpty();
1587        }
1588
1589        /**
1590         * @param value {@link #additive} (Substance introduced in the kind of container to preserve, maintain or enhance the specimen. Examples: Formalin, Citrate, EDTA.)
1591         */
1592        public SpecimenDefinitionTypeTestedContainerAdditiveComponent setAdditive(DataType value) { 
1593          if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
1594            throw new FHIRException("Not the right type for SpecimenDefinition.typeTested.container.additive.additive[x]: "+value.fhirType());
1595          this.additive = value;
1596          return this;
1597        }
1598
1599        protected void listChildren(List<Property> children) {
1600          super.listChildren(children);
1601          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));
1602        }
1603
1604        @Override
1605        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1606          switch (_hash) {
1607          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);
1608          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);
1609          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);
1610          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);
1611          default: return super.getNamedProperty(_hash, _name, _checkValid);
1612          }
1613
1614        }
1615
1616      @Override
1617      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1618        switch (hash) {
1619        case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : new Base[] {this.additive}; // DataType
1620        default: return super.getProperty(hash, name, checkValid);
1621        }
1622
1623      }
1624
1625      @Override
1626      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1627        switch (hash) {
1628        case -1226589236: // additive
1629          this.additive = TypeConvertor.castToType(value); // DataType
1630          return value;
1631        default: return super.setProperty(hash, name, value);
1632        }
1633
1634      }
1635
1636      @Override
1637      public Base setProperty(String name, Base value) throws FHIRException {
1638        if (name.equals("additive[x]")) {
1639          this.additive = TypeConvertor.castToType(value); // DataType
1640        } else
1641          return super.setProperty(name, value);
1642        return value;
1643      }
1644
1645      @Override
1646      public Base makeProperty(int hash, String name) throws FHIRException {
1647        switch (hash) {
1648        case 261915956:  return getAdditive();
1649        case -1226589236:  return getAdditive();
1650        default: return super.makeProperty(hash, name);
1651        }
1652
1653      }
1654
1655      @Override
1656      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1657        switch (hash) {
1658        case -1226589236: /*additive*/ return new String[] {"CodeableConcept", "Reference"};
1659        default: return super.getTypesForProperty(hash, name);
1660        }
1661
1662      }
1663
1664      @Override
1665      public Base addChild(String name) throws FHIRException {
1666        if (name.equals("additiveCodeableConcept")) {
1667          this.additive = new CodeableConcept();
1668          return this.additive;
1669        }
1670        else if (name.equals("additiveReference")) {
1671          this.additive = new Reference();
1672          return this.additive;
1673        }
1674        else
1675          return super.addChild(name);
1676      }
1677
1678      public SpecimenDefinitionTypeTestedContainerAdditiveComponent copy() {
1679        SpecimenDefinitionTypeTestedContainerAdditiveComponent dst = new SpecimenDefinitionTypeTestedContainerAdditiveComponent();
1680        copyValues(dst);
1681        return dst;
1682      }
1683
1684      public void copyValues(SpecimenDefinitionTypeTestedContainerAdditiveComponent dst) {
1685        super.copyValues(dst);
1686        dst.additive = additive == null ? null : additive.copy();
1687      }
1688
1689      @Override
1690      public boolean equalsDeep(Base other_) {
1691        if (!super.equalsDeep(other_))
1692          return false;
1693        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerAdditiveComponent))
1694          return false;
1695        SpecimenDefinitionTypeTestedContainerAdditiveComponent o = (SpecimenDefinitionTypeTestedContainerAdditiveComponent) other_;
1696        return compareDeep(additive, o.additive, true);
1697      }
1698
1699      @Override
1700      public boolean equalsShallow(Base other_) {
1701        if (!super.equalsShallow(other_))
1702          return false;
1703        if (!(other_ instanceof SpecimenDefinitionTypeTestedContainerAdditiveComponent))
1704          return false;
1705        SpecimenDefinitionTypeTestedContainerAdditiveComponent o = (SpecimenDefinitionTypeTestedContainerAdditiveComponent) other_;
1706        return true;
1707      }
1708
1709      public boolean isEmpty() {
1710        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(additive);
1711      }
1712
1713  public String fhirType() {
1714    return "SpecimenDefinition.typeTested.container.additive";
1715
1716  }
1717
1718  }
1719
1720    @Block()
1721    public static class SpecimenDefinitionTypeTestedHandlingComponent extends BackboneElement implements IBaseBackboneElement {
1722        /**
1723         * 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.
1724         */
1725        @Child(name = "temperatureQualifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
1726        @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." )
1727        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/handling-condition")
1728        protected CodeableConcept temperatureQualifier;
1729
1730        /**
1731         * The temperature interval for this set of handling instructions.
1732         */
1733        @Child(name = "temperatureRange", type = {Range.class}, order=2, min=0, max=1, modifier=false, summary=false)
1734        @Description(shortDefinition="Temperature range for these handling instructions", formalDefinition="The temperature interval for this set of handling instructions." )
1735        protected Range temperatureRange;
1736
1737        /**
1738         * The maximum time interval of preservation of the specimen with these conditions.
1739         */
1740        @Child(name = "maxDuration", type = {Duration.class}, order=3, min=0, max=1, modifier=false, summary=false)
1741        @Description(shortDefinition="Maximum preservation time", formalDefinition="The maximum time interval of preservation of the specimen with these conditions." )
1742        protected Duration maxDuration;
1743
1744        /**
1745         * Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.
1746         */
1747        @Child(name = "instruction", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1748        @Description(shortDefinition="Preservation instruction", formalDefinition="Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'." )
1749        protected MarkdownType instruction;
1750
1751        private static final long serialVersionUID = 113016318L;
1752
1753    /**
1754     * Constructor
1755     */
1756      public SpecimenDefinitionTypeTestedHandlingComponent() {
1757        super();
1758      }
1759
1760        /**
1761         * @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.)
1762         */
1763        public CodeableConcept getTemperatureQualifier() { 
1764          if (this.temperatureQualifier == null)
1765            if (Configuration.errorOnAutoCreate())
1766              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.temperatureQualifier");
1767            else if (Configuration.doAutoCreate())
1768              this.temperatureQualifier = new CodeableConcept(); // cc
1769          return this.temperatureQualifier;
1770        }
1771
1772        public boolean hasTemperatureQualifier() { 
1773          return this.temperatureQualifier != null && !this.temperatureQualifier.isEmpty();
1774        }
1775
1776        /**
1777         * @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.)
1778         */
1779        public SpecimenDefinitionTypeTestedHandlingComponent setTemperatureQualifier(CodeableConcept value) { 
1780          this.temperatureQualifier = value;
1781          return this;
1782        }
1783
1784        /**
1785         * @return {@link #temperatureRange} (The temperature interval for this set of handling instructions.)
1786         */
1787        public Range getTemperatureRange() { 
1788          if (this.temperatureRange == null)
1789            if (Configuration.errorOnAutoCreate())
1790              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.temperatureRange");
1791            else if (Configuration.doAutoCreate())
1792              this.temperatureRange = new Range(); // cc
1793          return this.temperatureRange;
1794        }
1795
1796        public boolean hasTemperatureRange() { 
1797          return this.temperatureRange != null && !this.temperatureRange.isEmpty();
1798        }
1799
1800        /**
1801         * @param value {@link #temperatureRange} (The temperature interval for this set of handling instructions.)
1802         */
1803        public SpecimenDefinitionTypeTestedHandlingComponent setTemperatureRange(Range value) { 
1804          this.temperatureRange = value;
1805          return this;
1806        }
1807
1808        /**
1809         * @return {@link #maxDuration} (The maximum time interval of preservation of the specimen with these conditions.)
1810         */
1811        public Duration getMaxDuration() { 
1812          if (this.maxDuration == null)
1813            if (Configuration.errorOnAutoCreate())
1814              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.maxDuration");
1815            else if (Configuration.doAutoCreate())
1816              this.maxDuration = new Duration(); // cc
1817          return this.maxDuration;
1818        }
1819
1820        public boolean hasMaxDuration() { 
1821          return this.maxDuration != null && !this.maxDuration.isEmpty();
1822        }
1823
1824        /**
1825         * @param value {@link #maxDuration} (The maximum time interval of preservation of the specimen with these conditions.)
1826         */
1827        public SpecimenDefinitionTypeTestedHandlingComponent setMaxDuration(Duration value) { 
1828          this.maxDuration = value;
1829          return this;
1830        }
1831
1832        /**
1833         * @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
1834         */
1835        public MarkdownType getInstructionElement() { 
1836          if (this.instruction == null)
1837            if (Configuration.errorOnAutoCreate())
1838              throw new Error("Attempt to auto-create SpecimenDefinitionTypeTestedHandlingComponent.instruction");
1839            else if (Configuration.doAutoCreate())
1840              this.instruction = new MarkdownType(); // bb
1841          return this.instruction;
1842        }
1843
1844        public boolean hasInstructionElement() { 
1845          return this.instruction != null && !this.instruction.isEmpty();
1846        }
1847
1848        public boolean hasInstruction() { 
1849          return this.instruction != null && !this.instruction.isEmpty();
1850        }
1851
1852        /**
1853         * @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
1854         */
1855        public SpecimenDefinitionTypeTestedHandlingComponent setInstructionElement(MarkdownType value) { 
1856          this.instruction = value;
1857          return this;
1858        }
1859
1860        /**
1861         * @return Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.
1862         */
1863        public String getInstruction() { 
1864          return this.instruction == null ? null : this.instruction.getValue();
1865        }
1866
1867        /**
1868         * @param value Additional textual instructions for the preservation or transport of the specimen. For instance, 'Protect from light exposure'.
1869         */
1870        public SpecimenDefinitionTypeTestedHandlingComponent setInstruction(String value) { 
1871          if (Utilities.noString(value))
1872            this.instruction = null;
1873          else {
1874            if (this.instruction == null)
1875              this.instruction = new MarkdownType();
1876            this.instruction.setValue(value);
1877          }
1878          return this;
1879        }
1880
1881        protected void listChildren(List<Property> children) {
1882          super.listChildren(children);
1883          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));
1884          children.add(new Property("temperatureRange", "Range", "The temperature interval for this set of handling instructions.", 0, 1, temperatureRange));
1885          children.add(new Property("maxDuration", "Duration", "The maximum time interval of preservation of the specimen with these conditions.", 0, 1, maxDuration));
1886          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));
1887        }
1888
1889        @Override
1890        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1891          switch (_hash) {
1892          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);
1893          case -39203799: /*temperatureRange*/  return new Property("temperatureRange", "Range", "The temperature interval for this set of handling instructions.", 0, 1, temperatureRange);
1894          case 40284952: /*maxDuration*/  return new Property("maxDuration", "Duration", "The maximum time interval of preservation of the specimen with these conditions.", 0, 1, maxDuration);
1895          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);
1896          default: return super.getNamedProperty(_hash, _name, _checkValid);
1897          }
1898
1899        }
1900
1901      @Override
1902      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1903        switch (hash) {
1904        case 548941206: /*temperatureQualifier*/ return this.temperatureQualifier == null ? new Base[0] : new Base[] {this.temperatureQualifier}; // CodeableConcept
1905        case -39203799: /*temperatureRange*/ return this.temperatureRange == null ? new Base[0] : new Base[] {this.temperatureRange}; // Range
1906        case 40284952: /*maxDuration*/ return this.maxDuration == null ? new Base[0] : new Base[] {this.maxDuration}; // Duration
1907        case 301526158: /*instruction*/ return this.instruction == null ? new Base[0] : new Base[] {this.instruction}; // MarkdownType
1908        default: return super.getProperty(hash, name, checkValid);
1909        }
1910
1911      }
1912
1913      @Override
1914      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1915        switch (hash) {
1916        case 548941206: // temperatureQualifier
1917          this.temperatureQualifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1918          return value;
1919        case -39203799: // temperatureRange
1920          this.temperatureRange = TypeConvertor.castToRange(value); // Range
1921          return value;
1922        case 40284952: // maxDuration
1923          this.maxDuration = TypeConvertor.castToDuration(value); // Duration
1924          return value;
1925        case 301526158: // instruction
1926          this.instruction = TypeConvertor.castToMarkdown(value); // MarkdownType
1927          return value;
1928        default: return super.setProperty(hash, name, value);
1929        }
1930
1931      }
1932
1933      @Override
1934      public Base setProperty(String name, Base value) throws FHIRException {
1935        if (name.equals("temperatureQualifier")) {
1936          this.temperatureQualifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1937        } else if (name.equals("temperatureRange")) {
1938          this.temperatureRange = TypeConvertor.castToRange(value); // Range
1939        } else if (name.equals("maxDuration")) {
1940          this.maxDuration = TypeConvertor.castToDuration(value); // Duration
1941        } else if (name.equals("instruction")) {
1942          this.instruction = TypeConvertor.castToMarkdown(value); // MarkdownType
1943        } else
1944          return super.setProperty(name, value);
1945        return value;
1946      }
1947
1948      @Override
1949      public Base makeProperty(int hash, String name) throws FHIRException {
1950        switch (hash) {
1951        case 548941206:  return getTemperatureQualifier();
1952        case -39203799:  return getTemperatureRange();
1953        case 40284952:  return getMaxDuration();
1954        case 301526158:  return getInstructionElement();
1955        default: return super.makeProperty(hash, name);
1956        }
1957
1958      }
1959
1960      @Override
1961      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1962        switch (hash) {
1963        case 548941206: /*temperatureQualifier*/ return new String[] {"CodeableConcept"};
1964        case -39203799: /*temperatureRange*/ return new String[] {"Range"};
1965        case 40284952: /*maxDuration*/ return new String[] {"Duration"};
1966        case 301526158: /*instruction*/ return new String[] {"markdown"};
1967        default: return super.getTypesForProperty(hash, name);
1968        }
1969
1970      }
1971
1972      @Override
1973      public Base addChild(String name) throws FHIRException {
1974        if (name.equals("temperatureQualifier")) {
1975          this.temperatureQualifier = new CodeableConcept();
1976          return this.temperatureQualifier;
1977        }
1978        else if (name.equals("temperatureRange")) {
1979          this.temperatureRange = new Range();
1980          return this.temperatureRange;
1981        }
1982        else if (name.equals("maxDuration")) {
1983          this.maxDuration = new Duration();
1984          return this.maxDuration;
1985        }
1986        else if (name.equals("instruction")) {
1987          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.typeTested.handling.instruction");
1988        }
1989        else
1990          return super.addChild(name);
1991      }
1992
1993      public SpecimenDefinitionTypeTestedHandlingComponent copy() {
1994        SpecimenDefinitionTypeTestedHandlingComponent dst = new SpecimenDefinitionTypeTestedHandlingComponent();
1995        copyValues(dst);
1996        return dst;
1997      }
1998
1999      public void copyValues(SpecimenDefinitionTypeTestedHandlingComponent dst) {
2000        super.copyValues(dst);
2001        dst.temperatureQualifier = temperatureQualifier == null ? null : temperatureQualifier.copy();
2002        dst.temperatureRange = temperatureRange == null ? null : temperatureRange.copy();
2003        dst.maxDuration = maxDuration == null ? null : maxDuration.copy();
2004        dst.instruction = instruction == null ? null : instruction.copy();
2005      }
2006
2007      @Override
2008      public boolean equalsDeep(Base other_) {
2009        if (!super.equalsDeep(other_))
2010          return false;
2011        if (!(other_ instanceof SpecimenDefinitionTypeTestedHandlingComponent))
2012          return false;
2013        SpecimenDefinitionTypeTestedHandlingComponent o = (SpecimenDefinitionTypeTestedHandlingComponent) other_;
2014        return compareDeep(temperatureQualifier, o.temperatureQualifier, true) && compareDeep(temperatureRange, o.temperatureRange, true)
2015           && compareDeep(maxDuration, o.maxDuration, true) && compareDeep(instruction, o.instruction, true)
2016          ;
2017      }
2018
2019      @Override
2020      public boolean equalsShallow(Base other_) {
2021        if (!super.equalsShallow(other_))
2022          return false;
2023        if (!(other_ instanceof SpecimenDefinitionTypeTestedHandlingComponent))
2024          return false;
2025        SpecimenDefinitionTypeTestedHandlingComponent o = (SpecimenDefinitionTypeTestedHandlingComponent) other_;
2026        return compareValues(instruction, o.instruction, true);
2027      }
2028
2029      public boolean isEmpty() {
2030        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(temperatureQualifier, temperatureRange
2031          , maxDuration, instruction);
2032      }
2033
2034  public String fhirType() {
2035    return "SpecimenDefinition.typeTested.handling";
2036
2037  }
2038
2039  }
2040
2041    /**
2042     * 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.
2043     */
2044    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
2045    @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." )
2046    protected UriType url;
2047
2048    /**
2049     * A business identifier assigned to this SpecimenDefinition.
2050     */
2051    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true)
2052    @Description(shortDefinition="Business identifier", formalDefinition="A business identifier assigned to this SpecimenDefinition." )
2053    protected Identifier identifier;
2054
2055    /**
2056     * 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.
2057     */
2058    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
2059    @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." )
2060    protected StringType version;
2061
2062    /**
2063     * Indicates the mechanism used to compare versions to determine which is more current.
2064     */
2065    @Child(name = "versionAlgorithm", type = {StringType.class, Coding.class}, order=3, min=0, max=1, modifier=false, summary=true)
2066    @Description(shortDefinition="How to compare versions", formalDefinition="Indicates the mechanism used to compare versions to determine which is more current." )
2067    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/version-algorithm")
2068    protected DataType versionAlgorithm;
2069
2070    /**
2071     * 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.
2072     */
2073    @Child(name = "name", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
2074    @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." )
2075    protected StringType name;
2076
2077    /**
2078     * A short, descriptive, user-friendly title for the SpecimenDefinition.
2079     */
2080    @Child(name = "title", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
2081    @Description(shortDefinition="Name for this SpecimenDefinition (Human friendly)", formalDefinition="A short, descriptive, user-friendly title for the SpecimenDefinition." )
2082    protected StringType title;
2083
2084    /**
2085     * The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.
2086     */
2087    @Child(name = "derivedFromCanonical", type = {CanonicalType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2088    @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." )
2089    protected List<CanonicalType> derivedFromCanonical;
2090
2091    /**
2092     * 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.
2093     */
2094    @Child(name = "derivedFromUri", type = {UriType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2095    @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." )
2096    protected List<UriType> derivedFromUri;
2097
2098    /**
2099     * The current state of theSpecimenDefinition.
2100     */
2101    @Child(name = "status", type = {CodeType.class}, order=8, min=1, max=1, modifier=true, summary=true)
2102    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The current state of theSpecimenDefinition." )
2103    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
2104    protected Enumeration<PublicationStatus> status;
2105
2106    /**
2107     * A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.
2108     */
2109    @Child(name = "experimental", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=true)
2110    @Description(shortDefinition="If this SpecimenDefinition is not for real usage", formalDefinition="A flag to indicate that this SpecimenDefinition is not authored for  genuine usage." )
2111    protected BooleanType experimental;
2112
2113    /**
2114     * A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.
2115     */
2116    @Child(name = "subject", type = {CodeableConcept.class, Group.class}, order=10, min=0, max=1, modifier=false, summary=true)
2117    @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." )
2118    protected DataType subject;
2119
2120    /**
2121     * 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.
2122     */
2123    @Child(name = "date", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true)
2124    @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." )
2125    protected DateTimeType date;
2126
2127    /**
2128     * Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.
2129     */
2130    @Child(name = "publisher", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=true)
2131    @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." )
2132    protected StringType publisher;
2133
2134    /**
2135     * Contact details to assist a user in finding and communicating with the publisher.
2136     */
2137    @Child(name = "contact", type = {ContactDetail.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2138    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
2139    protected List<ContactDetail> contact;
2140
2141    /**
2142     * A free text natural language description of the SpecimenDefinition from the consumer's perspective.
2143     */
2144    @Child(name = "description", type = {MarkdownType.class}, order=14, min=0, max=1, modifier=false, summary=false)
2145    @Description(shortDefinition="Natural language description of the SpecimenDefinition", formalDefinition="A free text natural language description of the SpecimenDefinition from the consumer's perspective." )
2146    protected MarkdownType description;
2147
2148    /**
2149     * 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.
2150     */
2151    @Child(name = "useContext", type = {UsageContext.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2152    @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." )
2153    protected List<UsageContext> useContext;
2154
2155    /**
2156     * A jurisdiction in which the SpecimenDefinition is intended to be used.
2157     */
2158    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2159    @Description(shortDefinition="Intended jurisdiction for this SpecimenDefinition (if applicable)", formalDefinition="A jurisdiction in which the SpecimenDefinition is intended to be used." )
2160    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
2161    protected List<CodeableConcept> jurisdiction;
2162
2163    /**
2164     * Explains why this SpecimeDefinition is needed and why it has been designed as it has.
2165     */
2166    @Child(name = "purpose", type = {MarkdownType.class}, order=17, min=0, max=1, modifier=false, summary=false)
2167    @Description(shortDefinition="Why this SpecimenDefinition is defined", formalDefinition="Explains why this SpecimeDefinition is needed and why it has been designed as it has." )
2168    protected MarkdownType purpose;
2169
2170    /**
2171     * Copyright statement relating to the SpecimenDefinition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the SpecimenDefinition.
2172     */
2173    @Child(name = "copyright", type = {MarkdownType.class}, order=18, min=0, max=1, modifier=false, summary=false)
2174    @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." )
2175    protected MarkdownType copyright;
2176
2177    /**
2178     * 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').
2179     */
2180    @Child(name = "copyrightLabel", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=false)
2181    @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')." )
2182    protected StringType copyrightLabel;
2183
2184    /**
2185     * The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2186     */
2187    @Child(name = "approvalDate", type = {DateType.class}, order=20, min=0, max=1, modifier=false, summary=false)
2188    @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." )
2189    protected DateType approvalDate;
2190
2191    /**
2192     * The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
2193     */
2194    @Child(name = "lastReviewDate", type = {DateType.class}, order=21, min=0, max=1, modifier=false, summary=false)
2195    @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." )
2196    protected DateType lastReviewDate;
2197
2198    /**
2199     * The period during which the SpecimenDefinition content was or is planned to be effective.
2200     */
2201    @Child(name = "effectivePeriod", type = {Period.class}, order=22, min=0, max=1, modifier=false, summary=true)
2202    @Description(shortDefinition="The effective date range for the SpecimenDefinition", formalDefinition="The period during which the SpecimenDefinition content was or is planned to be effective." )
2203    protected Period effectivePeriod;
2204
2205    /**
2206     * The kind of material to be collected.
2207     */
2208    @Child(name = "typeCollected", type = {CodeableConcept.class}, order=23, min=0, max=1, modifier=false, summary=true)
2209    @Description(shortDefinition="Kind of material to collect", formalDefinition="The kind of material to be collected." )
2210    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v2-0487")
2211    protected CodeableConcept typeCollected;
2212
2213    /**
2214     * Preparation of the patient for specimen collection.
2215     */
2216    @Child(name = "patientPreparation", type = {CodeableConcept.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2217    @Description(shortDefinition="Patient preparation for collection", formalDefinition="Preparation of the patient for specimen collection." )
2218    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/prepare-patient-prior-specimen-collection")
2219    protected List<CodeableConcept> patientPreparation;
2220
2221    /**
2222     * Time aspect of specimen collection (duration or offset).
2223     */
2224    @Child(name = "timeAspect", type = {StringType.class}, order=25, min=0, max=1, modifier=false, summary=true)
2225    @Description(shortDefinition="Time aspect for collection", formalDefinition="Time aspect of specimen collection (duration or offset)." )
2226    protected StringType timeAspect;
2227
2228    /**
2229     * The action to be performed for collecting the specimen.
2230     */
2231    @Child(name = "collection", type = {CodeableConcept.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2232    @Description(shortDefinition="Specimen collection procedure", formalDefinition="The action to be performed for collecting the specimen." )
2233    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/specimen-collection")
2234    protected List<CodeableConcept> collection;
2235
2236    /**
2237     * Specimen conditioned in a container as expected by the testing laboratory.
2238     */
2239    @Child(name = "typeTested", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2240    @Description(shortDefinition="Specimen in container intended for testing by lab", formalDefinition="Specimen conditioned in a container as expected by the testing laboratory." )
2241    protected List<SpecimenDefinitionTypeTestedComponent> typeTested;
2242
2243    private static final long serialVersionUID = 1698015458L;
2244
2245  /**
2246   * Constructor
2247   */
2248    public SpecimenDefinition() {
2249      super();
2250    }
2251
2252  /**
2253   * Constructor
2254   */
2255    public SpecimenDefinition(PublicationStatus status) {
2256      super();
2257      this.setStatus(status);
2258    }
2259
2260    /**
2261     * @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
2262     */
2263    public UriType getUrlElement() { 
2264      if (this.url == null)
2265        if (Configuration.errorOnAutoCreate())
2266          throw new Error("Attempt to auto-create SpecimenDefinition.url");
2267        else if (Configuration.doAutoCreate())
2268          this.url = new UriType(); // bb
2269      return this.url;
2270    }
2271
2272    public boolean hasUrlElement() { 
2273      return this.url != null && !this.url.isEmpty();
2274    }
2275
2276    public boolean hasUrl() { 
2277      return this.url != null && !this.url.isEmpty();
2278    }
2279
2280    /**
2281     * @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
2282     */
2283    public SpecimenDefinition setUrlElement(UriType value) { 
2284      this.url = value;
2285      return this;
2286    }
2287
2288    /**
2289     * @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.
2290     */
2291    public String getUrl() { 
2292      return this.url == null ? null : this.url.getValue();
2293    }
2294
2295    /**
2296     * @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.
2297     */
2298    public SpecimenDefinition setUrl(String value) { 
2299      if (Utilities.noString(value))
2300        this.url = null;
2301      else {
2302        if (this.url == null)
2303          this.url = new UriType();
2304        this.url.setValue(value);
2305      }
2306      return this;
2307    }
2308
2309    /**
2310     * @return {@link #identifier} (A business identifier assigned to this SpecimenDefinition.)
2311     */
2312    public Identifier getIdentifier() { 
2313      if (this.identifier == null)
2314        if (Configuration.errorOnAutoCreate())
2315          throw new Error("Attempt to auto-create SpecimenDefinition.identifier");
2316        else if (Configuration.doAutoCreate())
2317          this.identifier = new Identifier(); // cc
2318      return this.identifier;
2319    }
2320
2321    public boolean hasIdentifier() { 
2322      return this.identifier != null && !this.identifier.isEmpty();
2323    }
2324
2325    /**
2326     * @param value {@link #identifier} (A business identifier assigned to this SpecimenDefinition.)
2327     */
2328    public SpecimenDefinition setIdentifier(Identifier value) { 
2329      this.identifier = value;
2330      return this;
2331    }
2332
2333    /**
2334     * @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
2335     */
2336    public StringType getVersionElement() { 
2337      if (this.version == null)
2338        if (Configuration.errorOnAutoCreate())
2339          throw new Error("Attempt to auto-create SpecimenDefinition.version");
2340        else if (Configuration.doAutoCreate())
2341          this.version = new StringType(); // bb
2342      return this.version;
2343    }
2344
2345    public boolean hasVersionElement() { 
2346      return this.version != null && !this.version.isEmpty();
2347    }
2348
2349    public boolean hasVersion() { 
2350      return this.version != null && !this.version.isEmpty();
2351    }
2352
2353    /**
2354     * @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
2355     */
2356    public SpecimenDefinition setVersionElement(StringType value) { 
2357      this.version = value;
2358      return this;
2359    }
2360
2361    /**
2362     * @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.
2363     */
2364    public String getVersion() { 
2365      return this.version == null ? null : this.version.getValue();
2366    }
2367
2368    /**
2369     * @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.
2370     */
2371    public SpecimenDefinition setVersion(String value) { 
2372      if (Utilities.noString(value))
2373        this.version = null;
2374      else {
2375        if (this.version == null)
2376          this.version = new StringType();
2377        this.version.setValue(value);
2378      }
2379      return this;
2380    }
2381
2382    /**
2383     * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2384     */
2385    public DataType getVersionAlgorithm() { 
2386      return this.versionAlgorithm;
2387    }
2388
2389    /**
2390     * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2391     */
2392    public StringType getVersionAlgorithmStringType() throws FHIRException { 
2393      if (this.versionAlgorithm == null)
2394        this.versionAlgorithm = new StringType();
2395      if (!(this.versionAlgorithm instanceof StringType))
2396        throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.versionAlgorithm.getClass().getName()+" was encountered");
2397      return (StringType) this.versionAlgorithm;
2398    }
2399
2400    public boolean hasVersionAlgorithmStringType() { 
2401      return this != null && this.versionAlgorithm instanceof StringType;
2402    }
2403
2404    /**
2405     * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2406     */
2407    public Coding getVersionAlgorithmCoding() throws FHIRException { 
2408      if (this.versionAlgorithm == null)
2409        this.versionAlgorithm = new Coding();
2410      if (!(this.versionAlgorithm instanceof Coding))
2411        throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.versionAlgorithm.getClass().getName()+" was encountered");
2412      return (Coding) this.versionAlgorithm;
2413    }
2414
2415    public boolean hasVersionAlgorithmCoding() { 
2416      return this != null && this.versionAlgorithm instanceof Coding;
2417    }
2418
2419    public boolean hasVersionAlgorithm() { 
2420      return this.versionAlgorithm != null && !this.versionAlgorithm.isEmpty();
2421    }
2422
2423    /**
2424     * @param value {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.)
2425     */
2426    public SpecimenDefinition setVersionAlgorithm(DataType value) { 
2427      if (value != null && !(value instanceof StringType || value instanceof Coding))
2428        throw new FHIRException("Not the right type for SpecimenDefinition.versionAlgorithm[x]: "+value.fhirType());
2429      this.versionAlgorithm = value;
2430      return this;
2431    }
2432
2433    /**
2434     * @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
2435     */
2436    public StringType getNameElement() { 
2437      if (this.name == null)
2438        if (Configuration.errorOnAutoCreate())
2439          throw new Error("Attempt to auto-create SpecimenDefinition.name");
2440        else if (Configuration.doAutoCreate())
2441          this.name = new StringType(); // bb
2442      return this.name;
2443    }
2444
2445    public boolean hasNameElement() { 
2446      return this.name != null && !this.name.isEmpty();
2447    }
2448
2449    public boolean hasName() { 
2450      return this.name != null && !this.name.isEmpty();
2451    }
2452
2453    /**
2454     * @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
2455     */
2456    public SpecimenDefinition setNameElement(StringType value) { 
2457      this.name = value;
2458      return this;
2459    }
2460
2461    /**
2462     * @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.
2463     */
2464    public String getName() { 
2465      return this.name == null ? null : this.name.getValue();
2466    }
2467
2468    /**
2469     * @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.
2470     */
2471    public SpecimenDefinition setName(String value) { 
2472      if (Utilities.noString(value))
2473        this.name = null;
2474      else {
2475        if (this.name == null)
2476          this.name = new StringType();
2477        this.name.setValue(value);
2478      }
2479      return this;
2480    }
2481
2482    /**
2483     * @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
2484     */
2485    public StringType getTitleElement() { 
2486      if (this.title == null)
2487        if (Configuration.errorOnAutoCreate())
2488          throw new Error("Attempt to auto-create SpecimenDefinition.title");
2489        else if (Configuration.doAutoCreate())
2490          this.title = new StringType(); // bb
2491      return this.title;
2492    }
2493
2494    public boolean hasTitleElement() { 
2495      return this.title != null && !this.title.isEmpty();
2496    }
2497
2498    public boolean hasTitle() { 
2499      return this.title != null && !this.title.isEmpty();
2500    }
2501
2502    /**
2503     * @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
2504     */
2505    public SpecimenDefinition setTitleElement(StringType value) { 
2506      this.title = value;
2507      return this;
2508    }
2509
2510    /**
2511     * @return A short, descriptive, user-friendly title for the SpecimenDefinition.
2512     */
2513    public String getTitle() { 
2514      return this.title == null ? null : this.title.getValue();
2515    }
2516
2517    /**
2518     * @param value A short, descriptive, user-friendly title for the SpecimenDefinition.
2519     */
2520    public SpecimenDefinition setTitle(String value) { 
2521      if (Utilities.noString(value))
2522        this.title = null;
2523      else {
2524        if (this.title == null)
2525          this.title = new StringType();
2526        this.title.setValue(value);
2527      }
2528      return this;
2529    }
2530
2531    /**
2532     * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.)
2533     */
2534    public List<CanonicalType> getDerivedFromCanonical() { 
2535      if (this.derivedFromCanonical == null)
2536        this.derivedFromCanonical = new ArrayList<CanonicalType>();
2537      return this.derivedFromCanonical;
2538    }
2539
2540    /**
2541     * @return Returns a reference to <code>this</code> for easy method chaining
2542     */
2543    public SpecimenDefinition setDerivedFromCanonical(List<CanonicalType> theDerivedFromCanonical) { 
2544      this.derivedFromCanonical = theDerivedFromCanonical;
2545      return this;
2546    }
2547
2548    public boolean hasDerivedFromCanonical() { 
2549      if (this.derivedFromCanonical == null)
2550        return false;
2551      for (CanonicalType item : this.derivedFromCanonical)
2552        if (!item.isEmpty())
2553          return true;
2554      return false;
2555    }
2556
2557    /**
2558     * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined SpecimenDefinition that is adhered to in whole or in part by this definition.)
2559     */
2560    public CanonicalType addDerivedFromCanonicalElement() {//2 
2561      CanonicalType t = new CanonicalType();
2562      if (this.derivedFromCanonical == null)
2563        this.derivedFromCanonical = new ArrayList<CanonicalType>();
2564      this.derivedFromCanonical.add(t);
2565      return t;
2566    }
2567
2568    /**
2569     * @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.)
2570     */
2571    public SpecimenDefinition addDerivedFromCanonical(String value) { //1
2572      CanonicalType t = new CanonicalType();
2573      t.setValue(value);
2574      if (this.derivedFromCanonical == null)
2575        this.derivedFromCanonical = new ArrayList<CanonicalType>();
2576      this.derivedFromCanonical.add(t);
2577      return this;
2578    }
2579
2580    /**
2581     * @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.)
2582     */
2583    public boolean hasDerivedFromCanonical(String value) { 
2584      if (this.derivedFromCanonical == null)
2585        return false;
2586      for (CanonicalType v : this.derivedFromCanonical)
2587        if (v.getValue().equals(value)) // canonical
2588          return true;
2589      return false;
2590    }
2591
2592    /**
2593     * @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.)
2594     */
2595    public List<UriType> getDerivedFromUri() { 
2596      if (this.derivedFromUri == null)
2597        this.derivedFromUri = new ArrayList<UriType>();
2598      return this.derivedFromUri;
2599    }
2600
2601    /**
2602     * @return Returns a reference to <code>this</code> for easy method chaining
2603     */
2604    public SpecimenDefinition setDerivedFromUri(List<UriType> theDerivedFromUri) { 
2605      this.derivedFromUri = theDerivedFromUri;
2606      return this;
2607    }
2608
2609    public boolean hasDerivedFromUri() { 
2610      if (this.derivedFromUri == null)
2611        return false;
2612      for (UriType item : this.derivedFromUri)
2613        if (!item.isEmpty())
2614          return true;
2615      return false;
2616    }
2617
2618    /**
2619     * @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.)
2620     */
2621    public UriType addDerivedFromUriElement() {//2 
2622      UriType t = new UriType();
2623      if (this.derivedFromUri == null)
2624        this.derivedFromUri = new ArrayList<UriType>();
2625      this.derivedFromUri.add(t);
2626      return t;
2627    }
2628
2629    /**
2630     * @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.)
2631     */
2632    public SpecimenDefinition addDerivedFromUri(String value) { //1
2633      UriType t = new UriType();
2634      t.setValue(value);
2635      if (this.derivedFromUri == null)
2636        this.derivedFromUri = new ArrayList<UriType>();
2637      this.derivedFromUri.add(t);
2638      return this;
2639    }
2640
2641    /**
2642     * @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.)
2643     */
2644    public boolean hasDerivedFromUri(String value) { 
2645      if (this.derivedFromUri == null)
2646        return false;
2647      for (UriType v : this.derivedFromUri)
2648        if (v.getValue().equals(value)) // uri
2649          return true;
2650      return false;
2651    }
2652
2653    /**
2654     * @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
2655     */
2656    public Enumeration<PublicationStatus> getStatusElement() { 
2657      if (this.status == null)
2658        if (Configuration.errorOnAutoCreate())
2659          throw new Error("Attempt to auto-create SpecimenDefinition.status");
2660        else if (Configuration.doAutoCreate())
2661          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2662      return this.status;
2663    }
2664
2665    public boolean hasStatusElement() { 
2666      return this.status != null && !this.status.isEmpty();
2667    }
2668
2669    public boolean hasStatus() { 
2670      return this.status != null && !this.status.isEmpty();
2671    }
2672
2673    /**
2674     * @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
2675     */
2676    public SpecimenDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
2677      this.status = value;
2678      return this;
2679    }
2680
2681    /**
2682     * @return The current state of theSpecimenDefinition.
2683     */
2684    public PublicationStatus getStatus() { 
2685      return this.status == null ? null : this.status.getValue();
2686    }
2687
2688    /**
2689     * @param value The current state of theSpecimenDefinition.
2690     */
2691    public SpecimenDefinition setStatus(PublicationStatus value) { 
2692        if (this.status == null)
2693          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2694        this.status.setValue(value);
2695      return this;
2696    }
2697
2698    /**
2699     * @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
2700     */
2701    public BooleanType getExperimentalElement() { 
2702      if (this.experimental == null)
2703        if (Configuration.errorOnAutoCreate())
2704          throw new Error("Attempt to auto-create SpecimenDefinition.experimental");
2705        else if (Configuration.doAutoCreate())
2706          this.experimental = new BooleanType(); // bb
2707      return this.experimental;
2708    }
2709
2710    public boolean hasExperimentalElement() { 
2711      return this.experimental != null && !this.experimental.isEmpty();
2712    }
2713
2714    public boolean hasExperimental() { 
2715      return this.experimental != null && !this.experimental.isEmpty();
2716    }
2717
2718    /**
2719     * @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
2720     */
2721    public SpecimenDefinition setExperimentalElement(BooleanType value) { 
2722      this.experimental = value;
2723      return this;
2724    }
2725
2726    /**
2727     * @return A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.
2728     */
2729    public boolean getExperimental() { 
2730      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2731    }
2732
2733    /**
2734     * @param value A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.
2735     */
2736    public SpecimenDefinition setExperimental(boolean value) { 
2737        if (this.experimental == null)
2738          this.experimental = new BooleanType();
2739        this.experimental.setValue(value);
2740      return this;
2741    }
2742
2743    /**
2744     * @return {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2745     */
2746    public DataType getSubject() { 
2747      return this.subject;
2748    }
2749
2750    /**
2751     * @return {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2752     */
2753    public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 
2754      if (this.subject == null)
2755        this.subject = new CodeableConcept();
2756      if (!(this.subject instanceof CodeableConcept))
2757        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered");
2758      return (CodeableConcept) this.subject;
2759    }
2760
2761    public boolean hasSubjectCodeableConcept() { 
2762      return this != null && this.subject instanceof CodeableConcept;
2763    }
2764
2765    /**
2766     * @return {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2767     */
2768    public Reference getSubjectReference() throws FHIRException { 
2769      if (this.subject == null)
2770        this.subject = new Reference();
2771      if (!(this.subject instanceof Reference))
2772        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered");
2773      return (Reference) this.subject;
2774    }
2775
2776    public boolean hasSubjectReference() { 
2777      return this != null && this.subject instanceof Reference;
2778    }
2779
2780    public boolean hasSubject() { 
2781      return this.subject != null && !this.subject.isEmpty();
2782    }
2783
2784    /**
2785     * @param value {@link #subject} (A code or group definition that describes the intended subject  from which this kind of specimen is to be collected.)
2786     */
2787    public SpecimenDefinition setSubject(DataType value) { 
2788      if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
2789        throw new FHIRException("Not the right type for SpecimenDefinition.subject[x]: "+value.fhirType());
2790      this.subject = value;
2791      return this;
2792    }
2793
2794    /**
2795     * @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
2796     */
2797    public DateTimeType getDateElement() { 
2798      if (this.date == null)
2799        if (Configuration.errorOnAutoCreate())
2800          throw new Error("Attempt to auto-create SpecimenDefinition.date");
2801        else if (Configuration.doAutoCreate())
2802          this.date = new DateTimeType(); // bb
2803      return this.date;
2804    }
2805
2806    public boolean hasDateElement() { 
2807      return this.date != null && !this.date.isEmpty();
2808    }
2809
2810    public boolean hasDate() { 
2811      return this.date != null && !this.date.isEmpty();
2812    }
2813
2814    /**
2815     * @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
2816     */
2817    public SpecimenDefinition setDateElement(DateTimeType value) { 
2818      this.date = value;
2819      return this;
2820    }
2821
2822    /**
2823     * @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.
2824     */
2825    public Date getDate() { 
2826      return this.date == null ? null : this.date.getValue();
2827    }
2828
2829    /**
2830     * @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.
2831     */
2832    public SpecimenDefinition setDate(Date value) { 
2833      if (value == null)
2834        this.date = null;
2835      else {
2836        if (this.date == null)
2837          this.date = new DateTimeType();
2838        this.date.setValue(value);
2839      }
2840      return this;
2841    }
2842
2843    /**
2844     * @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
2845     */
2846    public StringType getPublisherElement() { 
2847      if (this.publisher == null)
2848        if (Configuration.errorOnAutoCreate())
2849          throw new Error("Attempt to auto-create SpecimenDefinition.publisher");
2850        else if (Configuration.doAutoCreate())
2851          this.publisher = new StringType(); // bb
2852      return this.publisher;
2853    }
2854
2855    public boolean hasPublisherElement() { 
2856      return this.publisher != null && !this.publisher.isEmpty();
2857    }
2858
2859    public boolean hasPublisher() { 
2860      return this.publisher != null && !this.publisher.isEmpty();
2861    }
2862
2863    /**
2864     * @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
2865     */
2866    public SpecimenDefinition setPublisherElement(StringType value) { 
2867      this.publisher = value;
2868      return this;
2869    }
2870
2871    /**
2872     * @return Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.
2873     */
2874    public String getPublisher() { 
2875      return this.publisher == null ? null : this.publisher.getValue();
2876    }
2877
2878    /**
2879     * @param value Helps establish the "authority/credibility" of the SpecimenDefinition. May also allow for contact.
2880     */
2881    public SpecimenDefinition setPublisher(String value) { 
2882      if (Utilities.noString(value))
2883        this.publisher = null;
2884      else {
2885        if (this.publisher == null)
2886          this.publisher = new StringType();
2887        this.publisher.setValue(value);
2888      }
2889      return this;
2890    }
2891
2892    /**
2893     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2894     */
2895    public List<ContactDetail> getContact() { 
2896      if (this.contact == null)
2897        this.contact = new ArrayList<ContactDetail>();
2898      return this.contact;
2899    }
2900
2901    /**
2902     * @return Returns a reference to <code>this</code> for easy method chaining
2903     */
2904    public SpecimenDefinition setContact(List<ContactDetail> theContact) { 
2905      this.contact = theContact;
2906      return this;
2907    }
2908
2909    public boolean hasContact() { 
2910      if (this.contact == null)
2911        return false;
2912      for (ContactDetail item : this.contact)
2913        if (!item.isEmpty())
2914          return true;
2915      return false;
2916    }
2917
2918    public ContactDetail addContact() { //3
2919      ContactDetail t = new ContactDetail();
2920      if (this.contact == null)
2921        this.contact = new ArrayList<ContactDetail>();
2922      this.contact.add(t);
2923      return t;
2924    }
2925
2926    public SpecimenDefinition addContact(ContactDetail t) { //3
2927      if (t == null)
2928        return this;
2929      if (this.contact == null)
2930        this.contact = new ArrayList<ContactDetail>();
2931      this.contact.add(t);
2932      return this;
2933    }
2934
2935    /**
2936     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
2937     */
2938    public ContactDetail getContactFirstRep() { 
2939      if (getContact().isEmpty()) {
2940        addContact();
2941      }
2942      return getContact().get(0);
2943    }
2944
2945    /**
2946     * @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
2947     */
2948    public MarkdownType getDescriptionElement() { 
2949      if (this.description == null)
2950        if (Configuration.errorOnAutoCreate())
2951          throw new Error("Attempt to auto-create SpecimenDefinition.description");
2952        else if (Configuration.doAutoCreate())
2953          this.description = new MarkdownType(); // bb
2954      return this.description;
2955    }
2956
2957    public boolean hasDescriptionElement() { 
2958      return this.description != null && !this.description.isEmpty();
2959    }
2960
2961    public boolean hasDescription() { 
2962      return this.description != null && !this.description.isEmpty();
2963    }
2964
2965    /**
2966     * @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
2967     */
2968    public SpecimenDefinition setDescriptionElement(MarkdownType value) { 
2969      this.description = value;
2970      return this;
2971    }
2972
2973    /**
2974     * @return A free text natural language description of the SpecimenDefinition from the consumer's perspective.
2975     */
2976    public String getDescription() { 
2977      return this.description == null ? null : this.description.getValue();
2978    }
2979
2980    /**
2981     * @param value A free text natural language description of the SpecimenDefinition from the consumer's perspective.
2982     */
2983    public SpecimenDefinition setDescription(String value) { 
2984      if (Utilities.noString(value))
2985        this.description = null;
2986      else {
2987        if (this.description == null)
2988          this.description = new MarkdownType();
2989        this.description.setValue(value);
2990      }
2991      return this;
2992    }
2993
2994    /**
2995     * @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.)
2996     */
2997    public List<UsageContext> getUseContext() { 
2998      if (this.useContext == null)
2999        this.useContext = new ArrayList<UsageContext>();
3000      return this.useContext;
3001    }
3002
3003    /**
3004     * @return Returns a reference to <code>this</code> for easy method chaining
3005     */
3006    public SpecimenDefinition setUseContext(List<UsageContext> theUseContext) { 
3007      this.useContext = theUseContext;
3008      return this;
3009    }
3010
3011    public boolean hasUseContext() { 
3012      if (this.useContext == null)
3013        return false;
3014      for (UsageContext item : this.useContext)
3015        if (!item.isEmpty())
3016          return true;
3017      return false;
3018    }
3019
3020    public UsageContext addUseContext() { //3
3021      UsageContext t = new UsageContext();
3022      if (this.useContext == null)
3023        this.useContext = new ArrayList<UsageContext>();
3024      this.useContext.add(t);
3025      return t;
3026    }
3027
3028    public SpecimenDefinition addUseContext(UsageContext t) { //3
3029      if (t == null)
3030        return this;
3031      if (this.useContext == null)
3032        this.useContext = new ArrayList<UsageContext>();
3033      this.useContext.add(t);
3034      return this;
3035    }
3036
3037    /**
3038     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
3039     */
3040    public UsageContext getUseContextFirstRep() { 
3041      if (getUseContext().isEmpty()) {
3042        addUseContext();
3043      }
3044      return getUseContext().get(0);
3045    }
3046
3047    /**
3048     * @return {@link #jurisdiction} (A jurisdiction in which the SpecimenDefinition is intended to be used.)
3049     */
3050    public List<CodeableConcept> getJurisdiction() { 
3051      if (this.jurisdiction == null)
3052        this.jurisdiction = new ArrayList<CodeableConcept>();
3053      return this.jurisdiction;
3054    }
3055
3056    /**
3057     * @return Returns a reference to <code>this</code> for easy method chaining
3058     */
3059    public SpecimenDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
3060      this.jurisdiction = theJurisdiction;
3061      return this;
3062    }
3063
3064    public boolean hasJurisdiction() { 
3065      if (this.jurisdiction == null)
3066        return false;
3067      for (CodeableConcept item : this.jurisdiction)
3068        if (!item.isEmpty())
3069          return true;
3070      return false;
3071    }
3072
3073    public CodeableConcept addJurisdiction() { //3
3074      CodeableConcept t = new CodeableConcept();
3075      if (this.jurisdiction == null)
3076        this.jurisdiction = new ArrayList<CodeableConcept>();
3077      this.jurisdiction.add(t);
3078      return t;
3079    }
3080
3081    public SpecimenDefinition addJurisdiction(CodeableConcept t) { //3
3082      if (t == null)
3083        return this;
3084      if (this.jurisdiction == null)
3085        this.jurisdiction = new ArrayList<CodeableConcept>();
3086      this.jurisdiction.add(t);
3087      return this;
3088    }
3089
3090    /**
3091     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
3092     */
3093    public CodeableConcept getJurisdictionFirstRep() { 
3094      if (getJurisdiction().isEmpty()) {
3095        addJurisdiction();
3096      }
3097      return getJurisdiction().get(0);
3098    }
3099
3100    /**
3101     * @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
3102     */
3103    public MarkdownType getPurposeElement() { 
3104      if (this.purpose == null)
3105        if (Configuration.errorOnAutoCreate())
3106          throw new Error("Attempt to auto-create SpecimenDefinition.purpose");
3107        else if (Configuration.doAutoCreate())
3108          this.purpose = new MarkdownType(); // bb
3109      return this.purpose;
3110    }
3111
3112    public boolean hasPurposeElement() { 
3113      return this.purpose != null && !this.purpose.isEmpty();
3114    }
3115
3116    public boolean hasPurpose() { 
3117      return this.purpose != null && !this.purpose.isEmpty();
3118    }
3119
3120    /**
3121     * @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
3122     */
3123    public SpecimenDefinition setPurposeElement(MarkdownType value) { 
3124      this.purpose = value;
3125      return this;
3126    }
3127
3128    /**
3129     * @return Explains why this SpecimeDefinition is needed and why it has been designed as it has.
3130     */
3131    public String getPurpose() { 
3132      return this.purpose == null ? null : this.purpose.getValue();
3133    }
3134
3135    /**
3136     * @param value Explains why this SpecimeDefinition is needed and why it has been designed as it has.
3137     */
3138    public SpecimenDefinition setPurpose(String value) { 
3139      if (Utilities.noString(value))
3140        this.purpose = null;
3141      else {
3142        if (this.purpose == null)
3143          this.purpose = new MarkdownType();
3144        this.purpose.setValue(value);
3145      }
3146      return this;
3147    }
3148
3149    /**
3150     * @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
3151     */
3152    public MarkdownType getCopyrightElement() { 
3153      if (this.copyright == null)
3154        if (Configuration.errorOnAutoCreate())
3155          throw new Error("Attempt to auto-create SpecimenDefinition.copyright");
3156        else if (Configuration.doAutoCreate())
3157          this.copyright = new MarkdownType(); // bb
3158      return this.copyright;
3159    }
3160
3161    public boolean hasCopyrightElement() { 
3162      return this.copyright != null && !this.copyright.isEmpty();
3163    }
3164
3165    public boolean hasCopyright() { 
3166      return this.copyright != null && !this.copyright.isEmpty();
3167    }
3168
3169    /**
3170     * @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
3171     */
3172    public SpecimenDefinition setCopyrightElement(MarkdownType value) { 
3173      this.copyright = value;
3174      return this;
3175    }
3176
3177    /**
3178     * @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.
3179     */
3180    public String getCopyright() { 
3181      return this.copyright == null ? null : this.copyright.getValue();
3182    }
3183
3184    /**
3185     * @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.
3186     */
3187    public SpecimenDefinition setCopyright(String value) { 
3188      if (Utilities.noString(value))
3189        this.copyright = null;
3190      else {
3191        if (this.copyright == null)
3192          this.copyright = new MarkdownType();
3193        this.copyright.setValue(value);
3194      }
3195      return this;
3196    }
3197
3198    /**
3199     * @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
3200     */
3201    public StringType getCopyrightLabelElement() { 
3202      if (this.copyrightLabel == null)
3203        if (Configuration.errorOnAutoCreate())
3204          throw new Error("Attempt to auto-create SpecimenDefinition.copyrightLabel");
3205        else if (Configuration.doAutoCreate())
3206          this.copyrightLabel = new StringType(); // bb
3207      return this.copyrightLabel;
3208    }
3209
3210    public boolean hasCopyrightLabelElement() { 
3211      return this.copyrightLabel != null && !this.copyrightLabel.isEmpty();
3212    }
3213
3214    public boolean hasCopyrightLabel() { 
3215      return this.copyrightLabel != null && !this.copyrightLabel.isEmpty();
3216    }
3217
3218    /**
3219     * @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
3220     */
3221    public SpecimenDefinition setCopyrightLabelElement(StringType value) { 
3222      this.copyrightLabel = value;
3223      return this;
3224    }
3225
3226    /**
3227     * @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').
3228     */
3229    public String getCopyrightLabel() { 
3230      return this.copyrightLabel == null ? null : this.copyrightLabel.getValue();
3231    }
3232
3233    /**
3234     * @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').
3235     */
3236    public SpecimenDefinition setCopyrightLabel(String value) { 
3237      if (Utilities.noString(value))
3238        this.copyrightLabel = null;
3239      else {
3240        if (this.copyrightLabel == null)
3241          this.copyrightLabel = new StringType();
3242        this.copyrightLabel.setValue(value);
3243      }
3244      return this;
3245    }
3246
3247    /**
3248     * @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
3249     */
3250    public DateType getApprovalDateElement() { 
3251      if (this.approvalDate == null)
3252        if (Configuration.errorOnAutoCreate())
3253          throw new Error("Attempt to auto-create SpecimenDefinition.approvalDate");
3254        else if (Configuration.doAutoCreate())
3255          this.approvalDate = new DateType(); // bb
3256      return this.approvalDate;
3257    }
3258
3259    public boolean hasApprovalDateElement() { 
3260      return this.approvalDate != null && !this.approvalDate.isEmpty();
3261    }
3262
3263    public boolean hasApprovalDate() { 
3264      return this.approvalDate != null && !this.approvalDate.isEmpty();
3265    }
3266
3267    /**
3268     * @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
3269     */
3270    public SpecimenDefinition setApprovalDateElement(DateType value) { 
3271      this.approvalDate = value;
3272      return this;
3273    }
3274
3275    /**
3276     * @return The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
3277     */
3278    public Date getApprovalDate() { 
3279      return this.approvalDate == null ? null : this.approvalDate.getValue();
3280    }
3281
3282    /**
3283     * @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.
3284     */
3285    public SpecimenDefinition setApprovalDate(Date value) { 
3286      if (value == null)
3287        this.approvalDate = null;
3288      else {
3289        if (this.approvalDate == null)
3290          this.approvalDate = new DateType();
3291        this.approvalDate.setValue(value);
3292      }
3293      return this;
3294    }
3295
3296    /**
3297     * @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
3298     */
3299    public DateType getLastReviewDateElement() { 
3300      if (this.lastReviewDate == null)
3301        if (Configuration.errorOnAutoCreate())
3302          throw new Error("Attempt to auto-create SpecimenDefinition.lastReviewDate");
3303        else if (Configuration.doAutoCreate())
3304          this.lastReviewDate = new DateType(); // bb
3305      return this.lastReviewDate;
3306    }
3307
3308    public boolean hasLastReviewDateElement() { 
3309      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3310    }
3311
3312    public boolean hasLastReviewDate() { 
3313      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3314    }
3315
3316    /**
3317     * @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
3318     */
3319    public SpecimenDefinition setLastReviewDateElement(DateType value) { 
3320      this.lastReviewDate = value;
3321      return this;
3322    }
3323
3324    /**
3325     * @return The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
3326     */
3327    public Date getLastReviewDate() { 
3328      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
3329    }
3330
3331    /**
3332     * @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.
3333     */
3334    public SpecimenDefinition setLastReviewDate(Date value) { 
3335      if (value == null)
3336        this.lastReviewDate = null;
3337      else {
3338        if (this.lastReviewDate == null)
3339          this.lastReviewDate = new DateType();
3340        this.lastReviewDate.setValue(value);
3341      }
3342      return this;
3343    }
3344
3345    /**
3346     * @return {@link #effectivePeriod} (The period during which the SpecimenDefinition content was or is planned to be effective.)
3347     */
3348    public Period getEffectivePeriod() { 
3349      if (this.effectivePeriod == null)
3350        if (Configuration.errorOnAutoCreate())
3351          throw new Error("Attempt to auto-create SpecimenDefinition.effectivePeriod");
3352        else if (Configuration.doAutoCreate())
3353          this.effectivePeriod = new Period(); // cc
3354      return this.effectivePeriod;
3355    }
3356
3357    public boolean hasEffectivePeriod() { 
3358      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
3359    }
3360
3361    /**
3362     * @param value {@link #effectivePeriod} (The period during which the SpecimenDefinition content was or is planned to be effective.)
3363     */
3364    public SpecimenDefinition setEffectivePeriod(Period value) { 
3365      this.effectivePeriod = value;
3366      return this;
3367    }
3368
3369    /**
3370     * @return {@link #typeCollected} (The kind of material to be collected.)
3371     */
3372    public CodeableConcept getTypeCollected() { 
3373      if (this.typeCollected == null)
3374        if (Configuration.errorOnAutoCreate())
3375          throw new Error("Attempt to auto-create SpecimenDefinition.typeCollected");
3376        else if (Configuration.doAutoCreate())
3377          this.typeCollected = new CodeableConcept(); // cc
3378      return this.typeCollected;
3379    }
3380
3381    public boolean hasTypeCollected() { 
3382      return this.typeCollected != null && !this.typeCollected.isEmpty();
3383    }
3384
3385    /**
3386     * @param value {@link #typeCollected} (The kind of material to be collected.)
3387     */
3388    public SpecimenDefinition setTypeCollected(CodeableConcept value) { 
3389      this.typeCollected = value;
3390      return this;
3391    }
3392
3393    /**
3394     * @return {@link #patientPreparation} (Preparation of the patient for specimen collection.)
3395     */
3396    public List<CodeableConcept> getPatientPreparation() { 
3397      if (this.patientPreparation == null)
3398        this.patientPreparation = new ArrayList<CodeableConcept>();
3399      return this.patientPreparation;
3400    }
3401
3402    /**
3403     * @return Returns a reference to <code>this</code> for easy method chaining
3404     */
3405    public SpecimenDefinition setPatientPreparation(List<CodeableConcept> thePatientPreparation) { 
3406      this.patientPreparation = thePatientPreparation;
3407      return this;
3408    }
3409
3410    public boolean hasPatientPreparation() { 
3411      if (this.patientPreparation == null)
3412        return false;
3413      for (CodeableConcept item : this.patientPreparation)
3414        if (!item.isEmpty())
3415          return true;
3416      return false;
3417    }
3418
3419    public CodeableConcept addPatientPreparation() { //3
3420      CodeableConcept t = new CodeableConcept();
3421      if (this.patientPreparation == null)
3422        this.patientPreparation = new ArrayList<CodeableConcept>();
3423      this.patientPreparation.add(t);
3424      return t;
3425    }
3426
3427    public SpecimenDefinition addPatientPreparation(CodeableConcept t) { //3
3428      if (t == null)
3429        return this;
3430      if (this.patientPreparation == null)
3431        this.patientPreparation = new ArrayList<CodeableConcept>();
3432      this.patientPreparation.add(t);
3433      return this;
3434    }
3435
3436    /**
3437     * @return The first repetition of repeating field {@link #patientPreparation}, creating it if it does not already exist {3}
3438     */
3439    public CodeableConcept getPatientPreparationFirstRep() { 
3440      if (getPatientPreparation().isEmpty()) {
3441        addPatientPreparation();
3442      }
3443      return getPatientPreparation().get(0);
3444    }
3445
3446    /**
3447     * @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
3448     */
3449    public StringType getTimeAspectElement() { 
3450      if (this.timeAspect == null)
3451        if (Configuration.errorOnAutoCreate())
3452          throw new Error("Attempt to auto-create SpecimenDefinition.timeAspect");
3453        else if (Configuration.doAutoCreate())
3454          this.timeAspect = new StringType(); // bb
3455      return this.timeAspect;
3456    }
3457
3458    public boolean hasTimeAspectElement() { 
3459      return this.timeAspect != null && !this.timeAspect.isEmpty();
3460    }
3461
3462    public boolean hasTimeAspect() { 
3463      return this.timeAspect != null && !this.timeAspect.isEmpty();
3464    }
3465
3466    /**
3467     * @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
3468     */
3469    public SpecimenDefinition setTimeAspectElement(StringType value) { 
3470      this.timeAspect = value;
3471      return this;
3472    }
3473
3474    /**
3475     * @return Time aspect of specimen collection (duration or offset).
3476     */
3477    public String getTimeAspect() { 
3478      return this.timeAspect == null ? null : this.timeAspect.getValue();
3479    }
3480
3481    /**
3482     * @param value Time aspect of specimen collection (duration or offset).
3483     */
3484    public SpecimenDefinition setTimeAspect(String value) { 
3485      if (Utilities.noString(value))
3486        this.timeAspect = null;
3487      else {
3488        if (this.timeAspect == null)
3489          this.timeAspect = new StringType();
3490        this.timeAspect.setValue(value);
3491      }
3492      return this;
3493    }
3494
3495    /**
3496     * @return {@link #collection} (The action to be performed for collecting the specimen.)
3497     */
3498    public List<CodeableConcept> getCollection() { 
3499      if (this.collection == null)
3500        this.collection = new ArrayList<CodeableConcept>();
3501      return this.collection;
3502    }
3503
3504    /**
3505     * @return Returns a reference to <code>this</code> for easy method chaining
3506     */
3507    public SpecimenDefinition setCollection(List<CodeableConcept> theCollection) { 
3508      this.collection = theCollection;
3509      return this;
3510    }
3511
3512    public boolean hasCollection() { 
3513      if (this.collection == null)
3514        return false;
3515      for (CodeableConcept item : this.collection)
3516        if (!item.isEmpty())
3517          return true;
3518      return false;
3519    }
3520
3521    public CodeableConcept addCollection() { //3
3522      CodeableConcept t = new CodeableConcept();
3523      if (this.collection == null)
3524        this.collection = new ArrayList<CodeableConcept>();
3525      this.collection.add(t);
3526      return t;
3527    }
3528
3529    public SpecimenDefinition addCollection(CodeableConcept t) { //3
3530      if (t == null)
3531        return this;
3532      if (this.collection == null)
3533        this.collection = new ArrayList<CodeableConcept>();
3534      this.collection.add(t);
3535      return this;
3536    }
3537
3538    /**
3539     * @return The first repetition of repeating field {@link #collection}, creating it if it does not already exist {3}
3540     */
3541    public CodeableConcept getCollectionFirstRep() { 
3542      if (getCollection().isEmpty()) {
3543        addCollection();
3544      }
3545      return getCollection().get(0);
3546    }
3547
3548    /**
3549     * @return {@link #typeTested} (Specimen conditioned in a container as expected by the testing laboratory.)
3550     */
3551    public List<SpecimenDefinitionTypeTestedComponent> getTypeTested() { 
3552      if (this.typeTested == null)
3553        this.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
3554      return this.typeTested;
3555    }
3556
3557    /**
3558     * @return Returns a reference to <code>this</code> for easy method chaining
3559     */
3560    public SpecimenDefinition setTypeTested(List<SpecimenDefinitionTypeTestedComponent> theTypeTested) { 
3561      this.typeTested = theTypeTested;
3562      return this;
3563    }
3564
3565    public boolean hasTypeTested() { 
3566      if (this.typeTested == null)
3567        return false;
3568      for (SpecimenDefinitionTypeTestedComponent item : this.typeTested)
3569        if (!item.isEmpty())
3570          return true;
3571      return false;
3572    }
3573
3574    public SpecimenDefinitionTypeTestedComponent addTypeTested() { //3
3575      SpecimenDefinitionTypeTestedComponent t = new SpecimenDefinitionTypeTestedComponent();
3576      if (this.typeTested == null)
3577        this.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
3578      this.typeTested.add(t);
3579      return t;
3580    }
3581
3582    public SpecimenDefinition addTypeTested(SpecimenDefinitionTypeTestedComponent t) { //3
3583      if (t == null)
3584        return this;
3585      if (this.typeTested == null)
3586        this.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
3587      this.typeTested.add(t);
3588      return this;
3589    }
3590
3591    /**
3592     * @return The first repetition of repeating field {@link #typeTested}, creating it if it does not already exist {3}
3593     */
3594    public SpecimenDefinitionTypeTestedComponent getTypeTestedFirstRep() { 
3595      if (getTypeTested().isEmpty()) {
3596        addTypeTested();
3597      }
3598      return getTypeTested().get(0);
3599    }
3600
3601      protected void listChildren(List<Property> children) {
3602        super.listChildren(children);
3603        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));
3604        children.add(new Property("identifier", "Identifier", "A business identifier assigned to this SpecimenDefinition.", 0, 1, identifier));
3605        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));
3606        children.add(new Property("versionAlgorithm[x]", "string|Coding", "Indicates the mechanism used to compare versions to determine which is more current.", 0, 1, versionAlgorithm));
3607        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));
3608        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the SpecimenDefinition.", 0, 1, title));
3609        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));
3610        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));
3611        children.add(new Property("status", "code", "The current state of theSpecimenDefinition.", 0, 1, status));
3612        children.add(new Property("experimental", "boolean", "A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.", 0, 1, experimental));
3613        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));
3614        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));
3615        children.add(new Property("publisher", "string", "Helps establish the \"authority/credibility\" of the SpecimenDefinition. May also allow for contact.", 0, 1, publisher));
3616        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));
3617        children.add(new Property("description", "markdown", "A free text natural language description of the SpecimenDefinition from the consumer's perspective.", 0, 1, description));
3618        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));
3619        children.add(new Property("jurisdiction", "CodeableConcept", "A jurisdiction in which the SpecimenDefinition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
3620        children.add(new Property("purpose", "markdown", "Explains why this SpecimeDefinition is needed and why it has been designed as it has.", 0, 1, purpose));
3621        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));
3622        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));
3623        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));
3624        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));
3625        children.add(new Property("effectivePeriod", "Period", "The period during which the SpecimenDefinition content was or is planned to be effective.", 0, 1, effectivePeriod));
3626        children.add(new Property("typeCollected", "CodeableConcept", "The kind of material to be collected.", 0, 1, typeCollected));
3627        children.add(new Property("patientPreparation", "CodeableConcept", "Preparation of the patient for specimen collection.", 0, java.lang.Integer.MAX_VALUE, patientPreparation));
3628        children.add(new Property("timeAspect", "string", "Time aspect of specimen collection (duration or offset).", 0, 1, timeAspect));
3629        children.add(new Property("collection", "CodeableConcept", "The action to be performed for collecting the specimen.", 0, java.lang.Integer.MAX_VALUE, collection));
3630        children.add(new Property("typeTested", "", "Specimen conditioned in a container as expected by the testing laboratory.", 0, java.lang.Integer.MAX_VALUE, typeTested));
3631      }
3632
3633      @Override
3634      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3635        switch (_hash) {
3636        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);
3637        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A business identifier assigned to this SpecimenDefinition.", 0, 1, identifier);
3638        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);
3639        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);
3640        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);
3641        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);
3642        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);
3643        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);
3644        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the SpecimenDefinition.", 0, 1, title);
3645        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);
3646        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);
3647        case -892481550: /*status*/  return new Property("status", "code", "The current state of theSpecimenDefinition.", 0, 1, status);
3648        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A flag to indicate that this SpecimenDefinition is not authored for  genuine usage.", 0, 1, experimental);
3649        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);
3650        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);
3651        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);
3652        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);
3653        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);
3654        case 1447404028: /*publisher*/  return new Property("publisher", "string", "Helps establish the \"authority/credibility\" of the SpecimenDefinition. May also allow for contact.", 0, 1, publisher);
3655        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);
3656        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);
3657        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);
3658        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);
3659        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);
3660        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);
3661        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);
3662        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);
3663        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);
3664        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);
3665        case 588504367: /*typeCollected*/  return new Property("typeCollected", "CodeableConcept", "The kind of material to be collected.", 0, 1, typeCollected);
3666        case -879411630: /*patientPreparation*/  return new Property("patientPreparation", "CodeableConcept", "Preparation of the patient for specimen collection.", 0, java.lang.Integer.MAX_VALUE, patientPreparation);
3667        case 276972933: /*timeAspect*/  return new Property("timeAspect", "string", "Time aspect of specimen collection (duration or offset).", 0, 1, timeAspect);
3668        case -1741312354: /*collection*/  return new Property("collection", "CodeableConcept", "The action to be performed for collecting the specimen.", 0, java.lang.Integer.MAX_VALUE, collection);
3669        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);
3670        default: return super.getNamedProperty(_hash, _name, _checkValid);
3671        }
3672
3673      }
3674
3675      @Override
3676      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3677        switch (hash) {
3678        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3679        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
3680        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3681        case 1508158071: /*versionAlgorithm*/ return this.versionAlgorithm == null ? new Base[0] : new Base[] {this.versionAlgorithm}; // DataType
3682        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3683        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3684        case -978133683: /*derivedFromCanonical*/ return this.derivedFromCanonical == null ? new Base[0] : this.derivedFromCanonical.toArray(new Base[this.derivedFromCanonical.size()]); // CanonicalType
3685        case -1076333435: /*derivedFromUri*/ return this.derivedFromUri == null ? new Base[0] : this.derivedFromUri.toArray(new Base[this.derivedFromUri.size()]); // UriType
3686        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3687        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3688        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // DataType
3689        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3690        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3691        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3692        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3693        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3694        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3695        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
3696        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
3697        case 765157229: /*copyrightLabel*/ return this.copyrightLabel == null ? new Base[0] : new Base[] {this.copyrightLabel}; // StringType
3698        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
3699        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
3700        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
3701        case 588504367: /*typeCollected*/ return this.typeCollected == null ? new Base[0] : new Base[] {this.typeCollected}; // CodeableConcept
3702        case -879411630: /*patientPreparation*/ return this.patientPreparation == null ? new Base[0] : this.patientPreparation.toArray(new Base[this.patientPreparation.size()]); // CodeableConcept
3703        case 276972933: /*timeAspect*/ return this.timeAspect == null ? new Base[0] : new Base[] {this.timeAspect}; // StringType
3704        case -1741312354: /*collection*/ return this.collection == null ? new Base[0] : this.collection.toArray(new Base[this.collection.size()]); // CodeableConcept
3705        case -1407902581: /*typeTested*/ return this.typeTested == null ? new Base[0] : this.typeTested.toArray(new Base[this.typeTested.size()]); // SpecimenDefinitionTypeTestedComponent
3706        default: return super.getProperty(hash, name, checkValid);
3707        }
3708
3709      }
3710
3711      @Override
3712      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3713        switch (hash) {
3714        case 116079: // url
3715          this.url = TypeConvertor.castToUri(value); // UriType
3716          return value;
3717        case -1618432855: // identifier
3718          this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
3719          return value;
3720        case 351608024: // version
3721          this.version = TypeConvertor.castToString(value); // StringType
3722          return value;
3723        case 1508158071: // versionAlgorithm
3724          this.versionAlgorithm = TypeConvertor.castToType(value); // DataType
3725          return value;
3726        case 3373707: // name
3727          this.name = TypeConvertor.castToString(value); // StringType
3728          return value;
3729        case 110371416: // title
3730          this.title = TypeConvertor.castToString(value); // StringType
3731          return value;
3732        case -978133683: // derivedFromCanonical
3733          this.getDerivedFromCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
3734          return value;
3735        case -1076333435: // derivedFromUri
3736          this.getDerivedFromUri().add(TypeConvertor.castToUri(value)); // UriType
3737          return value;
3738        case -892481550: // status
3739          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3740          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3741          return value;
3742        case -404562712: // experimental
3743          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3744          return value;
3745        case -1867885268: // subject
3746          this.subject = TypeConvertor.castToType(value); // DataType
3747          return value;
3748        case 3076014: // date
3749          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3750          return value;
3751        case 1447404028: // publisher
3752          this.publisher = TypeConvertor.castToString(value); // StringType
3753          return value;
3754        case 951526432: // contact
3755          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3756          return value;
3757        case -1724546052: // description
3758          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3759          return value;
3760        case -669707736: // useContext
3761          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
3762          return value;
3763        case -507075711: // jurisdiction
3764          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3765          return value;
3766        case -220463842: // purpose
3767          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
3768          return value;
3769        case 1522889671: // copyright
3770          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
3771          return value;
3772        case 765157229: // copyrightLabel
3773          this.copyrightLabel = TypeConvertor.castToString(value); // StringType
3774          return value;
3775        case 223539345: // approvalDate
3776          this.approvalDate = TypeConvertor.castToDate(value); // DateType
3777          return value;
3778        case -1687512484: // lastReviewDate
3779          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
3780          return value;
3781        case -403934648: // effectivePeriod
3782          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
3783          return value;
3784        case 588504367: // typeCollected
3785          this.typeCollected = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3786          return value;
3787        case -879411630: // patientPreparation
3788          this.getPatientPreparation().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3789          return value;
3790        case 276972933: // timeAspect
3791          this.timeAspect = TypeConvertor.castToString(value); // StringType
3792          return value;
3793        case -1741312354: // collection
3794          this.getCollection().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3795          return value;
3796        case -1407902581: // typeTested
3797          this.getTypeTested().add((SpecimenDefinitionTypeTestedComponent) value); // SpecimenDefinitionTypeTestedComponent
3798          return value;
3799        default: return super.setProperty(hash, name, value);
3800        }
3801
3802      }
3803
3804      @Override
3805      public Base setProperty(String name, Base value) throws FHIRException {
3806        if (name.equals("url")) {
3807          this.url = TypeConvertor.castToUri(value); // UriType
3808        } else if (name.equals("identifier")) {
3809          this.identifier = TypeConvertor.castToIdentifier(value); // Identifier
3810        } else if (name.equals("version")) {
3811          this.version = TypeConvertor.castToString(value); // StringType
3812        } else if (name.equals("versionAlgorithm[x]")) {
3813          this.versionAlgorithm = TypeConvertor.castToType(value); // DataType
3814        } else if (name.equals("name")) {
3815          this.name = TypeConvertor.castToString(value); // StringType
3816        } else if (name.equals("title")) {
3817          this.title = TypeConvertor.castToString(value); // StringType
3818        } else if (name.equals("derivedFromCanonical")) {
3819          this.getDerivedFromCanonical().add(TypeConvertor.castToCanonical(value));
3820        } else if (name.equals("derivedFromUri")) {
3821          this.getDerivedFromUri().add(TypeConvertor.castToUri(value));
3822        } else if (name.equals("status")) {
3823          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3824          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3825        } else if (name.equals("experimental")) {
3826          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3827        } else if (name.equals("subject[x]")) {
3828          this.subject = TypeConvertor.castToType(value); // DataType
3829        } else if (name.equals("date")) {
3830          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3831        } else if (name.equals("publisher")) {
3832          this.publisher = TypeConvertor.castToString(value); // StringType
3833        } else if (name.equals("contact")) {
3834          this.getContact().add(TypeConvertor.castToContactDetail(value));
3835        } else if (name.equals("description")) {
3836          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3837        } else if (name.equals("useContext")) {
3838          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
3839        } else if (name.equals("jurisdiction")) {
3840          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
3841        } else if (name.equals("purpose")) {
3842          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
3843        } else if (name.equals("copyright")) {
3844          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
3845        } else if (name.equals("copyrightLabel")) {
3846          this.copyrightLabel = TypeConvertor.castToString(value); // StringType
3847        } else if (name.equals("approvalDate")) {
3848          this.approvalDate = TypeConvertor.castToDate(value); // DateType
3849        } else if (name.equals("lastReviewDate")) {
3850          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
3851        } else if (name.equals("effectivePeriod")) {
3852          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
3853        } else if (name.equals("typeCollected")) {
3854          this.typeCollected = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3855        } else if (name.equals("patientPreparation")) {
3856          this.getPatientPreparation().add(TypeConvertor.castToCodeableConcept(value));
3857        } else if (name.equals("timeAspect")) {
3858          this.timeAspect = TypeConvertor.castToString(value); // StringType
3859        } else if (name.equals("collection")) {
3860          this.getCollection().add(TypeConvertor.castToCodeableConcept(value));
3861        } else if (name.equals("typeTested")) {
3862          this.getTypeTested().add((SpecimenDefinitionTypeTestedComponent) value);
3863        } else
3864          return super.setProperty(name, value);
3865        return value;
3866      }
3867
3868      @Override
3869      public Base makeProperty(int hash, String name) throws FHIRException {
3870        switch (hash) {
3871        case 116079:  return getUrlElement();
3872        case -1618432855:  return getIdentifier();
3873        case 351608024:  return getVersionElement();
3874        case -115699031:  return getVersionAlgorithm();
3875        case 1508158071:  return getVersionAlgorithm();
3876        case 3373707:  return getNameElement();
3877        case 110371416:  return getTitleElement();
3878        case -978133683:  return addDerivedFromCanonicalElement();
3879        case -1076333435:  return addDerivedFromUriElement();
3880        case -892481550:  return getStatusElement();
3881        case -404562712:  return getExperimentalElement();
3882        case -573640748:  return getSubject();
3883        case -1867885268:  return getSubject();
3884        case 3076014:  return getDateElement();
3885        case 1447404028:  return getPublisherElement();
3886        case 951526432:  return addContact(); 
3887        case -1724546052:  return getDescriptionElement();
3888        case -669707736:  return addUseContext(); 
3889        case -507075711:  return addJurisdiction(); 
3890        case -220463842:  return getPurposeElement();
3891        case 1522889671:  return getCopyrightElement();
3892        case 765157229:  return getCopyrightLabelElement();
3893        case 223539345:  return getApprovalDateElement();
3894        case -1687512484:  return getLastReviewDateElement();
3895        case -403934648:  return getEffectivePeriod();
3896        case 588504367:  return getTypeCollected();
3897        case -879411630:  return addPatientPreparation(); 
3898        case 276972933:  return getTimeAspectElement();
3899        case -1741312354:  return addCollection(); 
3900        case -1407902581:  return addTypeTested(); 
3901        default: return super.makeProperty(hash, name);
3902        }
3903
3904      }
3905
3906      @Override
3907      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3908        switch (hash) {
3909        case 116079: /*url*/ return new String[] {"uri"};
3910        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
3911        case 351608024: /*version*/ return new String[] {"string"};
3912        case 1508158071: /*versionAlgorithm*/ return new String[] {"string", "Coding"};
3913        case 3373707: /*name*/ return new String[] {"string"};
3914        case 110371416: /*title*/ return new String[] {"string"};
3915        case -978133683: /*derivedFromCanonical*/ return new String[] {"canonical"};
3916        case -1076333435: /*derivedFromUri*/ return new String[] {"uri"};
3917        case -892481550: /*status*/ return new String[] {"code"};
3918        case -404562712: /*experimental*/ return new String[] {"boolean"};
3919        case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference"};
3920        case 3076014: /*date*/ return new String[] {"dateTime"};
3921        case 1447404028: /*publisher*/ return new String[] {"string"};
3922        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3923        case -1724546052: /*description*/ return new String[] {"markdown"};
3924        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3925        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
3926        case -220463842: /*purpose*/ return new String[] {"markdown"};
3927        case 1522889671: /*copyright*/ return new String[] {"markdown"};
3928        case 765157229: /*copyrightLabel*/ return new String[] {"string"};
3929        case 223539345: /*approvalDate*/ return new String[] {"date"};
3930        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
3931        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
3932        case 588504367: /*typeCollected*/ return new String[] {"CodeableConcept"};
3933        case -879411630: /*patientPreparation*/ return new String[] {"CodeableConcept"};
3934        case 276972933: /*timeAspect*/ return new String[] {"string"};
3935        case -1741312354: /*collection*/ return new String[] {"CodeableConcept"};
3936        case -1407902581: /*typeTested*/ return new String[] {};
3937        default: return super.getTypesForProperty(hash, name);
3938        }
3939
3940      }
3941
3942      @Override
3943      public Base addChild(String name) throws FHIRException {
3944        if (name.equals("url")) {
3945          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.url");
3946        }
3947        else if (name.equals("identifier")) {
3948          this.identifier = new Identifier();
3949          return this.identifier;
3950        }
3951        else if (name.equals("version")) {
3952          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.version");
3953        }
3954        else if (name.equals("versionAlgorithmString")) {
3955          this.versionAlgorithm = new StringType();
3956          return this.versionAlgorithm;
3957        }
3958        else if (name.equals("versionAlgorithmCoding")) {
3959          this.versionAlgorithm = new Coding();
3960          return this.versionAlgorithm;
3961        }
3962        else if (name.equals("name")) {
3963          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.name");
3964        }
3965        else if (name.equals("title")) {
3966          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.title");
3967        }
3968        else if (name.equals("derivedFromCanonical")) {
3969          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.derivedFromCanonical");
3970        }
3971        else if (name.equals("derivedFromUri")) {
3972          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.derivedFromUri");
3973        }
3974        else if (name.equals("status")) {
3975          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.status");
3976        }
3977        else if (name.equals("experimental")) {
3978          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.experimental");
3979        }
3980        else if (name.equals("subjectCodeableConcept")) {
3981          this.subject = new CodeableConcept();
3982          return this.subject;
3983        }
3984        else if (name.equals("subjectReference")) {
3985          this.subject = new Reference();
3986          return this.subject;
3987        }
3988        else if (name.equals("date")) {
3989          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.date");
3990        }
3991        else if (name.equals("publisher")) {
3992          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.publisher");
3993        }
3994        else if (name.equals("contact")) {
3995          return addContact();
3996        }
3997        else if (name.equals("description")) {
3998          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.description");
3999        }
4000        else if (name.equals("useContext")) {
4001          return addUseContext();
4002        }
4003        else if (name.equals("jurisdiction")) {
4004          return addJurisdiction();
4005        }
4006        else if (name.equals("purpose")) {
4007          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.purpose");
4008        }
4009        else if (name.equals("copyright")) {
4010          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.copyright");
4011        }
4012        else if (name.equals("copyrightLabel")) {
4013          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.copyrightLabel");
4014        }
4015        else if (name.equals("approvalDate")) {
4016          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.approvalDate");
4017        }
4018        else if (name.equals("lastReviewDate")) {
4019          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.lastReviewDate");
4020        }
4021        else if (name.equals("effectivePeriod")) {
4022          this.effectivePeriod = new Period();
4023          return this.effectivePeriod;
4024        }
4025        else if (name.equals("typeCollected")) {
4026          this.typeCollected = new CodeableConcept();
4027          return this.typeCollected;
4028        }
4029        else if (name.equals("patientPreparation")) {
4030          return addPatientPreparation();
4031        }
4032        else if (name.equals("timeAspect")) {
4033          throw new FHIRException("Cannot call addChild on a singleton property SpecimenDefinition.timeAspect");
4034        }
4035        else if (name.equals("collection")) {
4036          return addCollection();
4037        }
4038        else if (name.equals("typeTested")) {
4039          return addTypeTested();
4040        }
4041        else
4042          return super.addChild(name);
4043      }
4044
4045  public String fhirType() {
4046    return "SpecimenDefinition";
4047
4048  }
4049
4050      public SpecimenDefinition copy() {
4051        SpecimenDefinition dst = new SpecimenDefinition();
4052        copyValues(dst);
4053        return dst;
4054      }
4055
4056      public void copyValues(SpecimenDefinition dst) {
4057        super.copyValues(dst);
4058        dst.url = url == null ? null : url.copy();
4059        dst.identifier = identifier == null ? null : identifier.copy();
4060        dst.version = version == null ? null : version.copy();
4061        dst.versionAlgorithm = versionAlgorithm == null ? null : versionAlgorithm.copy();
4062        dst.name = name == null ? null : name.copy();
4063        dst.title = title == null ? null : title.copy();
4064        if (derivedFromCanonical != null) {
4065          dst.derivedFromCanonical = new ArrayList<CanonicalType>();
4066          for (CanonicalType i : derivedFromCanonical)
4067            dst.derivedFromCanonical.add(i.copy());
4068        };
4069        if (derivedFromUri != null) {
4070          dst.derivedFromUri = new ArrayList<UriType>();
4071          for (UriType i : derivedFromUri)
4072            dst.derivedFromUri.add(i.copy());
4073        };
4074        dst.status = status == null ? null : status.copy();
4075        dst.experimental = experimental == null ? null : experimental.copy();
4076        dst.subject = subject == null ? null : subject.copy();
4077        dst.date = date == null ? null : date.copy();
4078        dst.publisher = publisher == null ? null : publisher.copy();
4079        if (contact != null) {
4080          dst.contact = new ArrayList<ContactDetail>();
4081          for (ContactDetail i : contact)
4082            dst.contact.add(i.copy());
4083        };
4084        dst.description = description == null ? null : description.copy();
4085        if (useContext != null) {
4086          dst.useContext = new ArrayList<UsageContext>();
4087          for (UsageContext i : useContext)
4088            dst.useContext.add(i.copy());
4089        };
4090        if (jurisdiction != null) {
4091          dst.jurisdiction = new ArrayList<CodeableConcept>();
4092          for (CodeableConcept i : jurisdiction)
4093            dst.jurisdiction.add(i.copy());
4094        };
4095        dst.purpose = purpose == null ? null : purpose.copy();
4096        dst.copyright = copyright == null ? null : copyright.copy();
4097        dst.copyrightLabel = copyrightLabel == null ? null : copyrightLabel.copy();
4098        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
4099        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
4100        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
4101        dst.typeCollected = typeCollected == null ? null : typeCollected.copy();
4102        if (patientPreparation != null) {
4103          dst.patientPreparation = new ArrayList<CodeableConcept>();
4104          for (CodeableConcept i : patientPreparation)
4105            dst.patientPreparation.add(i.copy());
4106        };
4107        dst.timeAspect = timeAspect == null ? null : timeAspect.copy();
4108        if (collection != null) {
4109          dst.collection = new ArrayList<CodeableConcept>();
4110          for (CodeableConcept i : collection)
4111            dst.collection.add(i.copy());
4112        };
4113        if (typeTested != null) {
4114          dst.typeTested = new ArrayList<SpecimenDefinitionTypeTestedComponent>();
4115          for (SpecimenDefinitionTypeTestedComponent i : typeTested)
4116            dst.typeTested.add(i.copy());
4117        };
4118      }
4119
4120      protected SpecimenDefinition typedCopy() {
4121        return copy();
4122      }
4123
4124      @Override
4125      public boolean equalsDeep(Base other_) {
4126        if (!super.equalsDeep(other_))
4127          return false;
4128        if (!(other_ instanceof SpecimenDefinition))
4129          return false;
4130        SpecimenDefinition o = (SpecimenDefinition) other_;
4131        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
4132           && compareDeep(versionAlgorithm, o.versionAlgorithm, true) && compareDeep(name, o.name, true) && compareDeep(title, o.title, true)
4133           && compareDeep(derivedFromCanonical, o.derivedFromCanonical, true) && compareDeep(derivedFromUri, o.derivedFromUri, true)
4134           && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(subject, o.subject, true)
4135           && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true)
4136           && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
4137           && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
4138           && compareDeep(copyrightLabel, o.copyrightLabel, true) && compareDeep(approvalDate, o.approvalDate, true)
4139           && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true)
4140           && compareDeep(typeCollected, o.typeCollected, true) && compareDeep(patientPreparation, o.patientPreparation, true)
4141           && compareDeep(timeAspect, o.timeAspect, true) && compareDeep(collection, o.collection, true) && compareDeep(typeTested, o.typeTested, true)
4142          ;
4143      }
4144
4145      @Override
4146      public boolean equalsShallow(Base other_) {
4147        if (!super.equalsShallow(other_))
4148          return false;
4149        if (!(other_ instanceof SpecimenDefinition))
4150          return false;
4151        SpecimenDefinition o = (SpecimenDefinition) other_;
4152        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
4153           && compareValues(title, o.title, true) && compareValues(derivedFromCanonical, o.derivedFromCanonical, true)
4154           && compareValues(derivedFromUri, o.derivedFromUri, true) && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true)
4155           && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) && compareValues(description, o.description, true)
4156           && compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true) && compareValues(copyrightLabel, o.copyrightLabel, true)
4157           && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
4158           && compareValues(timeAspect, o.timeAspect, true);
4159      }
4160
4161      public boolean isEmpty() {
4162        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
4163          , versionAlgorithm, name, title, derivedFromCanonical, derivedFromUri, status, experimental
4164          , subject, date, publisher, contact, description, useContext, jurisdiction, purpose
4165          , copyright, copyrightLabel, approvalDate, lastReviewDate, effectivePeriod, typeCollected
4166          , patientPreparation, timeAspect, collection, typeTested);
4167      }
4168
4169  @Override
4170  public ResourceType getResourceType() {
4171    return ResourceType.SpecimenDefinition;
4172   }
4173
4174 /**
4175   * Search parameter: <b>identifier</b>
4176   * <p>
4177   * Description: <b>Multiple Resources: 
4178
4179* [ActivityDefinition](activitydefinition.html): External identifier for the activity definition
4180* [ActorDefinition](actordefinition.html): External identifier for the Actor Definition
4181* [CapabilityStatement](capabilitystatement.html): External identifier for the capability statement
4182* [ChargeItemDefinition](chargeitemdefinition.html): External identifier for the charge item definition
4183* [Citation](citation.html): External identifier for the citation
4184* [CodeSystem](codesystem.html): External identifier for the code system
4185* [ConceptMap](conceptmap.html): External identifier for the concept map
4186* [ConditionDefinition](conditiondefinition.html): External identifier for the condition definition
4187* [EventDefinition](eventdefinition.html): External identifier for the event definition
4188* [Evidence](evidence.html): External identifier for the evidence
4189* [EvidenceReport](evidencereport.html): External identifier for the evidence report
4190* [EvidenceVariable](evidencevariable.html): External identifier for the evidence variable
4191* [ExampleScenario](examplescenario.html): External identifier for the example scenario
4192* [GraphDefinition](graphdefinition.html): External identifier for the graph definition
4193* [ImplementationGuide](implementationguide.html): External identifier for the implementation guide
4194* [Library](library.html): External identifier for the library
4195* [Measure](measure.html): External identifier for the measure
4196* [MedicationKnowledge](medicationknowledge.html): Business identifier for this medication
4197* [MessageDefinition](messagedefinition.html): External identifier for the message definition
4198* [NamingSystem](namingsystem.html): External identifier for the naming system
4199* [ObservationDefinition](observationdefinition.html): The unique identifier associated with the specimen definition
4200* [OperationDefinition](operationdefinition.html): External identifier for the search parameter
4201* [PlanDefinition](plandefinition.html): External identifier for the plan definition
4202* [Questionnaire](questionnaire.html): External identifier for the questionnaire
4203* [Requirements](requirements.html): External identifier for the requirements
4204* [SearchParameter](searchparameter.html): External identifier for the search parameter
4205* [SpecimenDefinition](specimendefinition.html): The unique identifier associated with the SpecimenDefinition
4206* [StructureDefinition](structuredefinition.html): External identifier for the structure definition
4207* [StructureMap](structuremap.html): External identifier for the structure map
4208* [SubscriptionTopic](subscriptiontopic.html): Business Identifier for SubscriptionTopic
4209* [TerminologyCapabilities](terminologycapabilities.html): External identifier for the terminology capabilities
4210* [TestPlan](testplan.html): An identifier for the test plan
4211* [TestScript](testscript.html): External identifier for the test script
4212* [ValueSet](valueset.html): External identifier for the value set
4213</b><br>
4214   * Type: <b>token</b><br>
4215   * 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>
4216   * </p>
4217   */
4218  @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" )
4219  public static final String SP_IDENTIFIER = "identifier";
4220 /**
4221   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
4222   * <p>
4223   * Description: <b>Multiple Resources: 
4224
4225* [ActivityDefinition](activitydefinition.html): External identifier for the activity definition
4226* [ActorDefinition](actordefinition.html): External identifier for the Actor Definition
4227* [CapabilityStatement](capabilitystatement.html): External identifier for the capability statement
4228* [ChargeItemDefinition](chargeitemdefinition.html): External identifier for the charge item definition
4229* [Citation](citation.html): External identifier for the citation
4230* [CodeSystem](codesystem.html): External identifier for the code system
4231* [ConceptMap](conceptmap.html): External identifier for the concept map
4232* [ConditionDefinition](conditiondefinition.html): External identifier for the condition definition
4233* [EventDefinition](eventdefinition.html): External identifier for the event definition
4234* [Evidence](evidence.html): External identifier for the evidence
4235* [EvidenceReport](evidencereport.html): External identifier for the evidence report
4236* [EvidenceVariable](evidencevariable.html): External identifier for the evidence variable
4237* [ExampleScenario](examplescenario.html): External identifier for the example scenario
4238* [GraphDefinition](graphdefinition.html): External identifier for the graph definition
4239* [ImplementationGuide](implementationguide.html): External identifier for the implementation guide
4240* [Library](library.html): External identifier for the library
4241* [Measure](measure.html): External identifier for the measure
4242* [MedicationKnowledge](medicationknowledge.html): Business identifier for this medication
4243* [MessageDefinition](messagedefinition.html): External identifier for the message definition
4244* [NamingSystem](namingsystem.html): External identifier for the naming system
4245* [ObservationDefinition](observationdefinition.html): The unique identifier associated with the specimen definition
4246* [OperationDefinition](operationdefinition.html): External identifier for the search parameter
4247* [PlanDefinition](plandefinition.html): External identifier for the plan definition
4248* [Questionnaire](questionnaire.html): External identifier for the questionnaire
4249* [Requirements](requirements.html): External identifier for the requirements
4250* [SearchParameter](searchparameter.html): External identifier for the search parameter
4251* [SpecimenDefinition](specimendefinition.html): The unique identifier associated with the SpecimenDefinition
4252* [StructureDefinition](structuredefinition.html): External identifier for the structure definition
4253* [StructureMap](structuremap.html): External identifier for the structure map
4254* [SubscriptionTopic](subscriptiontopic.html): Business Identifier for SubscriptionTopic
4255* [TerminologyCapabilities](terminologycapabilities.html): External identifier for the terminology capabilities
4256* [TestPlan](testplan.html): An identifier for the test plan
4257* [TestScript](testscript.html): External identifier for the test script
4258* [ValueSet](valueset.html): External identifier for the value set
4259</b><br>
4260   * Type: <b>token</b><br>
4261   * 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>
4262   * </p>
4263   */
4264  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
4265
4266 /**
4267   * Search parameter: <b>status</b>
4268   * <p>
4269   * Description: <b>Multiple Resources: 
4270
4271* [ActivityDefinition](activitydefinition.html): The current status of the activity definition
4272* [ActorDefinition](actordefinition.html): The current status of the Actor Definition
4273* [CapabilityStatement](capabilitystatement.html): The current status of the capability statement
4274* [ChargeItemDefinition](chargeitemdefinition.html): The current status of the charge item definition
4275* [Citation](citation.html): The current status of the citation
4276* [CodeSystem](codesystem.html): The current status of the code system
4277* [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition
4278* [ConceptMap](conceptmap.html): The current status of the concept map
4279* [ConditionDefinition](conditiondefinition.html): The current status of the condition definition
4280* [EventDefinition](eventdefinition.html): The current status of the event definition
4281* [Evidence](evidence.html): The current status of the evidence
4282* [EvidenceReport](evidencereport.html): The current status of the evidence report
4283* [EvidenceVariable](evidencevariable.html): The current status of the evidence variable
4284* [ExampleScenario](examplescenario.html): The current status of the example scenario
4285* [GraphDefinition](graphdefinition.html): The current status of the graph definition
4286* [ImplementationGuide](implementationguide.html): The current status of the implementation guide
4287* [Library](library.html): The current status of the library
4288* [Measure](measure.html): The current status of the measure
4289* [MedicationKnowledge](medicationknowledge.html): active | inactive | entered-in-error
4290* [MessageDefinition](messagedefinition.html): The current status of the message definition
4291* [NamingSystem](namingsystem.html): The current status of the naming system
4292* [ObservationDefinition](observationdefinition.html): Publication status of the ObservationDefinition: draft, active, retired, unknown
4293* [OperationDefinition](operationdefinition.html): The current status of the operation definition
4294* [PlanDefinition](plandefinition.html): The current status of the plan definition
4295* [Questionnaire](questionnaire.html): The current status of the questionnaire
4296* [Requirements](requirements.html): The current status of the requirements
4297* [SearchParameter](searchparameter.html): The current status of the search parameter
4298* [SpecimenDefinition](specimendefinition.html): Publication status of the SpecimenDefinition: draft, active, retired, unknown
4299* [StructureDefinition](structuredefinition.html): The current status of the structure definition
4300* [StructureMap](structuremap.html): The current status of the structure map
4301* [SubscriptionTopic](subscriptiontopic.html): draft | active | retired | unknown
4302* [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities
4303* [TestPlan](testplan.html): The current status of the test plan
4304* [TestScript](testscript.html): The current status of the test script
4305* [ValueSet](valueset.html): The current status of the value set
4306</b><br>
4307   * Type: <b>token</b><br>
4308   * 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>
4309   * </p>
4310   */
4311  @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" )
4312  public static final String SP_STATUS = "status";
4313 /**
4314   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4315   * <p>
4316   * Description: <b>Multiple Resources: 
4317
4318* [ActivityDefinition](activitydefinition.html): The current status of the activity definition
4319* [ActorDefinition](actordefinition.html): The current status of the Actor Definition
4320* [CapabilityStatement](capabilitystatement.html): The current status of the capability statement
4321* [ChargeItemDefinition](chargeitemdefinition.html): The current status of the charge item definition
4322* [Citation](citation.html): The current status of the citation
4323* [CodeSystem](codesystem.html): The current status of the code system
4324* [CompartmentDefinition](compartmentdefinition.html): The current status of the compartment definition
4325* [ConceptMap](conceptmap.html): The current status of the concept map
4326* [ConditionDefinition](conditiondefinition.html): The current status of the condition definition
4327* [EventDefinition](eventdefinition.html): The current status of the event definition
4328* [Evidence](evidence.html): The current status of the evidence
4329* [EvidenceReport](evidencereport.html): The current status of the evidence report
4330* [EvidenceVariable](evidencevariable.html): The current status of the evidence variable
4331* [ExampleScenario](examplescenario.html): The current status of the example scenario
4332* [GraphDefinition](graphdefinition.html): The current status of the graph definition
4333* [ImplementationGuide](implementationguide.html): The current status of the implementation guide
4334* [Library](library.html): The current status of the library
4335* [Measure](measure.html): The current status of the measure
4336* [MedicationKnowledge](medicationknowledge.html): active | inactive | entered-in-error
4337* [MessageDefinition](messagedefinition.html): The current status of the message definition
4338* [NamingSystem](namingsystem.html): The current status of the naming system
4339* [ObservationDefinition](observationdefinition.html): Publication status of the ObservationDefinition: draft, active, retired, unknown
4340* [OperationDefinition](operationdefinition.html): The current status of the operation definition
4341* [PlanDefinition](plandefinition.html): The current status of the plan definition
4342* [Questionnaire](questionnaire.html): The current status of the questionnaire
4343* [Requirements](requirements.html): The current status of the requirements
4344* [SearchParameter](searchparameter.html): The current status of the search parameter
4345* [SpecimenDefinition](specimendefinition.html): Publication status of the SpecimenDefinition: draft, active, retired, unknown
4346* [StructureDefinition](structuredefinition.html): The current status of the structure definition
4347* [StructureMap](structuremap.html): The current status of the structure map
4348* [SubscriptionTopic](subscriptiontopic.html): draft | active | retired | unknown
4349* [TerminologyCapabilities](terminologycapabilities.html): The current status of the terminology capabilities
4350* [TestPlan](testplan.html): The current status of the test plan
4351* [TestScript](testscript.html): The current status of the test script
4352* [ValueSet](valueset.html): The current status of the value set
4353</b><br>
4354   * Type: <b>token</b><br>
4355   * 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>
4356   * </p>
4357   */
4358  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4359
4360 /**
4361   * Search parameter: <b>title</b>
4362   * <p>
4363   * Description: <b>Multiple Resources: 
4364
4365* [ActivityDefinition](activitydefinition.html): The human-friendly name of the activity definition
4366* [ActorDefinition](actordefinition.html): The human-friendly name of the Actor Definition
4367* [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement
4368* [ChargeItemDefinition](chargeitemdefinition.html): The human-friendly name of the charge item definition
4369* [Citation](citation.html): The human-friendly name of the citation
4370* [CodeSystem](codesystem.html): The human-friendly name of the code system
4371* [ConceptMap](conceptmap.html): The human-friendly name of the concept map
4372* [ConditionDefinition](conditiondefinition.html): The human-friendly name of the condition definition
4373* [EventDefinition](eventdefinition.html): The human-friendly name of the event definition
4374* [Evidence](evidence.html): The human-friendly name of the evidence
4375* [EvidenceVariable](evidencevariable.html): The human-friendly name of the evidence variable
4376* [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide
4377* [Library](library.html): The human-friendly name of the library
4378* [Measure](measure.html): The human-friendly name of the measure
4379* [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition
4380* [ObservationDefinition](observationdefinition.html): Human-friendly name of the ObservationDefinition
4381* [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition
4382* [PlanDefinition](plandefinition.html): The human-friendly name of the plan definition
4383* [Questionnaire](questionnaire.html): The human-friendly name of the questionnaire
4384* [Requirements](requirements.html): The human-friendly name of the requirements
4385* [SpecimenDefinition](specimendefinition.html): Human-friendly name of the SpecimenDefinition
4386* [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition
4387* [StructureMap](structuremap.html): The human-friendly name of the structure map
4388* [SubscriptionTopic](subscriptiontopic.html): Name for this SubscriptionTopic (Human friendly)
4389* [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities
4390* [TestScript](testscript.html): The human-friendly name of the test script
4391* [ValueSet](valueset.html): The human-friendly name of the value set
4392</b><br>
4393   * Type: <b>string</b><br>
4394   * 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>
4395   * </p>
4396   */
4397  @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" )
4398  public static final String SP_TITLE = "title";
4399 /**
4400   * <b>Fluent Client</b> search parameter constant for <b>title</b>
4401   * <p>
4402   * Description: <b>Multiple Resources: 
4403
4404* [ActivityDefinition](activitydefinition.html): The human-friendly name of the activity definition
4405* [ActorDefinition](actordefinition.html): The human-friendly name of the Actor Definition
4406* [CapabilityStatement](capabilitystatement.html): The human-friendly name of the capability statement
4407* [ChargeItemDefinition](chargeitemdefinition.html): The human-friendly name of the charge item definition
4408* [Citation](citation.html): The human-friendly name of the citation
4409* [CodeSystem](codesystem.html): The human-friendly name of the code system
4410* [ConceptMap](conceptmap.html): The human-friendly name of the concept map
4411* [ConditionDefinition](conditiondefinition.html): The human-friendly name of the condition definition
4412* [EventDefinition](eventdefinition.html): The human-friendly name of the event definition
4413* [Evidence](evidence.html): The human-friendly name of the evidence
4414* [EvidenceVariable](evidencevariable.html): The human-friendly name of the evidence variable
4415* [ImplementationGuide](implementationguide.html): The human-friendly name of the implementation guide
4416* [Library](library.html): The human-friendly name of the library
4417* [Measure](measure.html): The human-friendly name of the measure
4418* [MessageDefinition](messagedefinition.html): The human-friendly name of the message definition
4419* [ObservationDefinition](observationdefinition.html): Human-friendly name of the ObservationDefinition
4420* [OperationDefinition](operationdefinition.html): The human-friendly name of the operation definition
4421* [PlanDefinition](plandefinition.html): The human-friendly name of the plan definition
4422* [Questionnaire](questionnaire.html): The human-friendly name of the questionnaire
4423* [Requirements](requirements.html): The human-friendly name of the requirements
4424* [SpecimenDefinition](specimendefinition.html): Human-friendly name of the SpecimenDefinition
4425* [StructureDefinition](structuredefinition.html): The human-friendly name of the structure definition
4426* [StructureMap](structuremap.html): The human-friendly name of the structure map
4427* [SubscriptionTopic](subscriptiontopic.html): Name for this SubscriptionTopic (Human friendly)
4428* [TerminologyCapabilities](terminologycapabilities.html): The human-friendly name of the terminology capabilities
4429* [TestScript](testscript.html): The human-friendly name of the test script
4430* [ValueSet](valueset.html): The human-friendly name of the value set
4431</b><br>
4432   * Type: <b>string</b><br>
4433   * 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>
4434   * </p>
4435   */
4436  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
4437
4438 /**
4439   * Search parameter: <b>url</b>
4440   * <p>
4441   * Description: <b>Multiple Resources: 
4442
4443* [ActivityDefinition](activitydefinition.html): The uri that identifies the activity definition
4444* [ActorDefinition](actordefinition.html): The uri that identifies the Actor Definition
4445* [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement
4446* [ChargeItemDefinition](chargeitemdefinition.html): The uri that identifies the charge item definition
4447* [Citation](citation.html): The uri that identifies the citation
4448* [CodeSystem](codesystem.html): The uri that identifies the code system
4449* [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition
4450* [ConceptMap](conceptmap.html): The URI that identifies the concept map
4451* [ConditionDefinition](conditiondefinition.html): The uri that identifies the condition definition
4452* [EventDefinition](eventdefinition.html): The uri that identifies the event definition
4453* [Evidence](evidence.html): The uri that identifies the evidence
4454* [EvidenceReport](evidencereport.html): The uri that identifies the evidence report
4455* [EvidenceVariable](evidencevariable.html): The uri that identifies the evidence variable
4456* [ExampleScenario](examplescenario.html): The uri that identifies the example scenario
4457* [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition
4458* [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide
4459* [Library](library.html): The uri that identifies the library
4460* [Measure](measure.html): The uri that identifies the measure
4461* [MessageDefinition](messagedefinition.html): The uri that identifies the message definition
4462* [NamingSystem](namingsystem.html): The uri that identifies the naming system
4463* [ObservationDefinition](observationdefinition.html): The uri that identifies the observation definition
4464* [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition
4465* [PlanDefinition](plandefinition.html): The uri that identifies the plan definition
4466* [Questionnaire](questionnaire.html): The uri that identifies the questionnaire
4467* [Requirements](requirements.html): The uri that identifies the requirements
4468* [SearchParameter](searchparameter.html): The uri that identifies the search parameter
4469* [SpecimenDefinition](specimendefinition.html): The uri that identifies the specimen definition
4470* [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition
4471* [StructureMap](structuremap.html): The uri that identifies the structure map
4472* [SubscriptionTopic](subscriptiontopic.html): Logical canonical URL to reference this SubscriptionTopic (globally unique)
4473* [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities
4474* [TestPlan](testplan.html): The uri that identifies the test plan
4475* [TestScript](testscript.html): The uri that identifies the test script
4476* [ValueSet](valueset.html): The uri that identifies the value set
4477</b><br>
4478   * Type: <b>uri</b><br>
4479   * 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>
4480   * </p>
4481   */
4482  @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" )
4483  public static final String SP_URL = "url";
4484 /**
4485   * <b>Fluent Client</b> search parameter constant for <b>url</b>
4486   * <p>
4487   * Description: <b>Multiple Resources: 
4488
4489* [ActivityDefinition](activitydefinition.html): The uri that identifies the activity definition
4490* [ActorDefinition](actordefinition.html): The uri that identifies the Actor Definition
4491* [CapabilityStatement](capabilitystatement.html): The uri that identifies the capability statement
4492* [ChargeItemDefinition](chargeitemdefinition.html): The uri that identifies the charge item definition
4493* [Citation](citation.html): The uri that identifies the citation
4494* [CodeSystem](codesystem.html): The uri that identifies the code system
4495* [CompartmentDefinition](compartmentdefinition.html): The uri that identifies the compartment definition
4496* [ConceptMap](conceptmap.html): The URI that identifies the concept map
4497* [ConditionDefinition](conditiondefinition.html): The uri that identifies the condition definition
4498* [EventDefinition](eventdefinition.html): The uri that identifies the event definition
4499* [Evidence](evidence.html): The uri that identifies the evidence
4500* [EvidenceReport](evidencereport.html): The uri that identifies the evidence report
4501* [EvidenceVariable](evidencevariable.html): The uri that identifies the evidence variable
4502* [ExampleScenario](examplescenario.html): The uri that identifies the example scenario
4503* [GraphDefinition](graphdefinition.html): The uri that identifies the graph definition
4504* [ImplementationGuide](implementationguide.html): The uri that identifies the implementation guide
4505* [Library](library.html): The uri that identifies the library
4506* [Measure](measure.html): The uri that identifies the measure
4507* [MessageDefinition](messagedefinition.html): The uri that identifies the message definition
4508* [NamingSystem](namingsystem.html): The uri that identifies the naming system
4509* [ObservationDefinition](observationdefinition.html): The uri that identifies the observation definition
4510* [OperationDefinition](operationdefinition.html): The uri that identifies the operation definition
4511* [PlanDefinition](plandefinition.html): The uri that identifies the plan definition
4512* [Questionnaire](questionnaire.html): The uri that identifies the questionnaire
4513* [Requirements](requirements.html): The uri that identifies the requirements
4514* [SearchParameter](searchparameter.html): The uri that identifies the search parameter
4515* [SpecimenDefinition](specimendefinition.html): The uri that identifies the specimen definition
4516* [StructureDefinition](structuredefinition.html): The uri that identifies the structure definition
4517* [StructureMap](structuremap.html): The uri that identifies the structure map
4518* [SubscriptionTopic](subscriptiontopic.html): Logical canonical URL to reference this SubscriptionTopic (globally unique)
4519* [TerminologyCapabilities](terminologycapabilities.html): The uri that identifies the terminology capabilities
4520* [TestPlan](testplan.html): The uri that identifies the test plan
4521* [TestScript](testscript.html): The uri that identifies the test script
4522* [ValueSet](valueset.html): The uri that identifies the value set
4523</b><br>
4524   * Type: <b>uri</b><br>
4525   * 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>
4526   * </p>
4527   */
4528  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
4529
4530 /**
4531   * Search parameter: <b>container</b>
4532   * <p>
4533   * Description: <b>The type of specimen conditioned in container expected by the lab</b><br>
4534   * Type: <b>token</b><br>
4535   * Path: <b>SpecimenDefinition.typeTested.container.type</b><br>
4536   * </p>
4537   */
4538  @SearchParamDefinition(name="container", path="SpecimenDefinition.typeTested.container.type", description="The type of specimen conditioned in container expected by the lab", type="token" )
4539  public static final String SP_CONTAINER = "container";
4540 /**
4541   * <b>Fluent Client</b> search parameter constant for <b>container</b>
4542   * <p>
4543   * Description: <b>The type of specimen conditioned in container expected by the lab</b><br>
4544   * Type: <b>token</b><br>
4545   * Path: <b>SpecimenDefinition.typeTested.container.type</b><br>
4546   * </p>
4547   */
4548  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTAINER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTAINER);
4549
4550 /**
4551   * Search parameter: <b>experimental</b>
4552   * <p>
4553   * Description: <b>Not for genuine usage (true)</b><br>
4554   * Type: <b>token</b><br>
4555   * Path: <b>SpecimenDefinition.experimental</b><br>
4556   * </p>
4557   */
4558  @SearchParamDefinition(name="experimental", path="SpecimenDefinition.experimental", description="Not for genuine usage (true)", type="token" )
4559  public static final String SP_EXPERIMENTAL = "experimental";
4560 /**
4561   * <b>Fluent Client</b> search parameter constant for <b>experimental</b>
4562   * <p>
4563   * Description: <b>Not for genuine usage (true)</b><br>
4564   * Type: <b>token</b><br>
4565   * Path: <b>SpecimenDefinition.experimental</b><br>
4566   * </p>
4567   */
4568  public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXPERIMENTAL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXPERIMENTAL);
4569
4570 /**
4571   * Search parameter: <b>is-derived</b>
4572   * <p>
4573   * Description: <b>Primary specimen (false) or derived specimen (true)</b><br>
4574   * Type: <b>token</b><br>
4575   * Path: <b>SpecimenDefinition.typeTested.isDerived</b><br>
4576   * </p>
4577   */
4578  @SearchParamDefinition(name="is-derived", path="SpecimenDefinition.typeTested.isDerived", description="Primary specimen (false) or derived specimen (true)", type="token" )
4579  public static final String SP_IS_DERIVED = "is-derived";
4580 /**
4581   * <b>Fluent Client</b> search parameter constant for <b>is-derived</b>
4582   * <p>
4583   * Description: <b>Primary specimen (false) or derived specimen (true)</b><br>
4584   * Type: <b>token</b><br>
4585   * Path: <b>SpecimenDefinition.typeTested.isDerived</b><br>
4586   * </p>
4587   */
4588  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IS_DERIVED = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IS_DERIVED);
4589
4590 /**
4591   * Search parameter: <b>type-tested</b>
4592   * <p>
4593   * Description: <b>The type of specimen conditioned for testing</b><br>
4594   * Type: <b>token</b><br>
4595   * Path: <b>SpecimenDefinition.typeTested.type</b><br>
4596   * </p>
4597   */
4598  @SearchParamDefinition(name="type-tested", path="SpecimenDefinition.typeTested.type", description="The type of specimen conditioned for testing", type="token" )
4599  public static final String SP_TYPE_TESTED = "type-tested";
4600 /**
4601   * <b>Fluent Client</b> search parameter constant for <b>type-tested</b>
4602   * <p>
4603   * Description: <b>The type of specimen conditioned for testing</b><br>
4604   * Type: <b>token</b><br>
4605   * Path: <b>SpecimenDefinition.typeTested.type</b><br>
4606   * </p>
4607   */
4608  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE_TESTED = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE_TESTED);
4609
4610 /**
4611   * Search parameter: <b>type</b>
4612   * <p>
4613   * Description: <b>The type of collected specimen</b><br>
4614   * Type: <b>token</b><br>
4615   * Path: <b>SpecimenDefinition.typeCollected</b><br>
4616   * </p>
4617   */
4618  @SearchParamDefinition(name="type", path="SpecimenDefinition.typeCollected", description="The type of collected specimen", type="token" )
4619  public static final String SP_TYPE = "type";
4620 /**
4621   * <b>Fluent Client</b> search parameter constant for <b>type</b>
4622   * <p>
4623   * Description: <b>The type of collected specimen</b><br>
4624   * Type: <b>token</b><br>
4625   * Path: <b>SpecimenDefinition.typeCollected</b><br>
4626   * </p>
4627   */
4628  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
4629
4630
4631}
4632