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 Fri, Jul 15, 2022 11:20+1000 for FHIR v5.0.0-snapshot2
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 biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity.
052 */
053@ResourceDef(name="BiologicallyDerivedProduct", profile="http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct")
054public class BiologicallyDerivedProduct extends DomainResource {
055
056    @Block()
057    public static class BiologicallyDerivedProductCollectionComponent extends BackboneElement implements IBaseBackboneElement {
058        /**
059         * Healthcare professional who is performing the collection.
060         */
061        @Child(name = "collector", type = {Practitioner.class, PractitionerRole.class}, order=1, min=0, max=1, modifier=false, summary=false)
062        @Description(shortDefinition="Individual performing collection", formalDefinition="Healthcare professional who is performing the collection." )
063        protected Reference collector;
064
065        /**
066         * The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.
067         */
068        @Child(name = "source", type = {Patient.class, Organization.class}, order=2, min=0, max=1, modifier=false, summary=false)
069        @Description(shortDefinition="The patient or entity providing the product", formalDefinition="The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product." )
070        protected Reference source;
071
072        /**
073         * Time of product collection.
074         */
075        @Child(name = "collected", type = {DateTimeType.class, Period.class}, order=3, min=0, max=1, modifier=false, summary=false)
076        @Description(shortDefinition="Time of product collection", formalDefinition="Time of product collection." )
077        protected DataType collected;
078
079        private static final long serialVersionUID = 626956533L;
080
081    /**
082     * Constructor
083     */
084      public BiologicallyDerivedProductCollectionComponent() {
085        super();
086      }
087
088        /**
089         * @return {@link #collector} (Healthcare professional who is performing the collection.)
090         */
091        public Reference getCollector() { 
092          if (this.collector == null)
093            if (Configuration.errorOnAutoCreate())
094              throw new Error("Attempt to auto-create BiologicallyDerivedProductCollectionComponent.collector");
095            else if (Configuration.doAutoCreate())
096              this.collector = new Reference(); // cc
097          return this.collector;
098        }
099
100        public boolean hasCollector() { 
101          return this.collector != null && !this.collector.isEmpty();
102        }
103
104        /**
105         * @param value {@link #collector} (Healthcare professional who is performing the collection.)
106         */
107        public BiologicallyDerivedProductCollectionComponent setCollector(Reference value) { 
108          this.collector = value;
109          return this;
110        }
111
112        /**
113         * @return {@link #source} (The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.)
114         */
115        public Reference getSource() { 
116          if (this.source == null)
117            if (Configuration.errorOnAutoCreate())
118              throw new Error("Attempt to auto-create BiologicallyDerivedProductCollectionComponent.source");
119            else if (Configuration.doAutoCreate())
120              this.source = new Reference(); // cc
121          return this.source;
122        }
123
124        public boolean hasSource() { 
125          return this.source != null && !this.source.isEmpty();
126        }
127
128        /**
129         * @param value {@link #source} (The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.)
130         */
131        public BiologicallyDerivedProductCollectionComponent setSource(Reference value) { 
132          this.source = value;
133          return this;
134        }
135
136        /**
137         * @return {@link #collected} (Time of product collection.)
138         */
139        public DataType getCollected() { 
140          return this.collected;
141        }
142
143        /**
144         * @return {@link #collected} (Time of product collection.)
145         */
146        public DateTimeType getCollectedDateTimeType() throws FHIRException { 
147          if (this.collected == null)
148            this.collected = new DateTimeType();
149          if (!(this.collected instanceof DateTimeType))
150            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.collected.getClass().getName()+" was encountered");
151          return (DateTimeType) this.collected;
152        }
153
154        public boolean hasCollectedDateTimeType() { 
155          return this != null && this.collected instanceof DateTimeType;
156        }
157
158        /**
159         * @return {@link #collected} (Time of product collection.)
160         */
161        public Period getCollectedPeriod() throws FHIRException { 
162          if (this.collected == null)
163            this.collected = new Period();
164          if (!(this.collected instanceof Period))
165            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.collected.getClass().getName()+" was encountered");
166          return (Period) this.collected;
167        }
168
169        public boolean hasCollectedPeriod() { 
170          return this != null && this.collected instanceof Period;
171        }
172
173        public boolean hasCollected() { 
174          return this.collected != null && !this.collected.isEmpty();
175        }
176
177        /**
178         * @param value {@link #collected} (Time of product collection.)
179         */
180        public BiologicallyDerivedProductCollectionComponent setCollected(DataType value) { 
181          if (value != null && !(value instanceof DateTimeType || value instanceof Period))
182            throw new Error("Not the right type for BiologicallyDerivedProduct.collection.collected[x]: "+value.fhirType());
183          this.collected = value;
184          return this;
185        }
186
187        protected void listChildren(List<Property> children) {
188          super.listChildren(children);
189          children.add(new Property("collector", "Reference(Practitioner|PractitionerRole)", "Healthcare professional who is performing the collection.", 0, 1, collector));
190          children.add(new Property("source", "Reference(Patient|Organization)", "The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.", 0, 1, source));
191          children.add(new Property("collected[x]", "dateTime|Period", "Time of product collection.", 0, 1, collected));
192        }
193
194        @Override
195        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
196          switch (_hash) {
197          case 1883491469: /*collector*/  return new Property("collector", "Reference(Practitioner|PractitionerRole)", "Healthcare professional who is performing the collection.", 0, 1, collector);
198          case -896505829: /*source*/  return new Property("source", "Reference(Patient|Organization)", "The patient or entity, such as a hospital or vendor in the case of a processed/manipulated/manufactured product, providing the product.", 0, 1, source);
199          case 1632037015: /*collected[x]*/  return new Property("collected[x]", "dateTime|Period", "Time of product collection.", 0, 1, collected);
200          case 1883491145: /*collected*/  return new Property("collected[x]", "dateTime|Period", "Time of product collection.", 0, 1, collected);
201          case 2005009924: /*collectedDateTime*/  return new Property("collected[x]", "dateTime", "Time of product collection.", 0, 1, collected);
202          case 653185642: /*collectedPeriod*/  return new Property("collected[x]", "Period", "Time of product collection.", 0, 1, collected);
203          default: return super.getNamedProperty(_hash, _name, _checkValid);
204          }
205
206        }
207
208      @Override
209      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
210        switch (hash) {
211        case 1883491469: /*collector*/ return this.collector == null ? new Base[0] : new Base[] {this.collector}; // Reference
212        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
213        case 1883491145: /*collected*/ return this.collected == null ? new Base[0] : new Base[] {this.collected}; // DataType
214        default: return super.getProperty(hash, name, checkValid);
215        }
216
217      }
218
219      @Override
220      public Base setProperty(int hash, String name, Base value) throws FHIRException {
221        switch (hash) {
222        case 1883491469: // collector
223          this.collector = TypeConvertor.castToReference(value); // Reference
224          return value;
225        case -896505829: // source
226          this.source = TypeConvertor.castToReference(value); // Reference
227          return value;
228        case 1883491145: // collected
229          this.collected = TypeConvertor.castToType(value); // DataType
230          return value;
231        default: return super.setProperty(hash, name, value);
232        }
233
234      }
235
236      @Override
237      public Base setProperty(String name, Base value) throws FHIRException {
238        if (name.equals("collector")) {
239          this.collector = TypeConvertor.castToReference(value); // Reference
240        } else if (name.equals("source")) {
241          this.source = TypeConvertor.castToReference(value); // Reference
242        } else if (name.equals("collected[x]")) {
243          this.collected = TypeConvertor.castToType(value); // DataType
244        } else
245          return super.setProperty(name, value);
246        return value;
247      }
248
249      @Override
250      public Base makeProperty(int hash, String name) throws FHIRException {
251        switch (hash) {
252        case 1883491469:  return getCollector();
253        case -896505829:  return getSource();
254        case 1632037015:  return getCollected();
255        case 1883491145:  return getCollected();
256        default: return super.makeProperty(hash, name);
257        }
258
259      }
260
261      @Override
262      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
263        switch (hash) {
264        case 1883491469: /*collector*/ return new String[] {"Reference"};
265        case -896505829: /*source*/ return new String[] {"Reference"};
266        case 1883491145: /*collected*/ return new String[] {"dateTime", "Period"};
267        default: return super.getTypesForProperty(hash, name);
268        }
269
270      }
271
272      @Override
273      public Base addChild(String name) throws FHIRException {
274        if (name.equals("collector")) {
275          this.collector = new Reference();
276          return this.collector;
277        }
278        else if (name.equals("source")) {
279          this.source = new Reference();
280          return this.source;
281        }
282        else if (name.equals("collectedDateTime")) {
283          this.collected = new DateTimeType();
284          return this.collected;
285        }
286        else if (name.equals("collectedPeriod")) {
287          this.collected = new Period();
288          return this.collected;
289        }
290        else
291          return super.addChild(name);
292      }
293
294      public BiologicallyDerivedProductCollectionComponent copy() {
295        BiologicallyDerivedProductCollectionComponent dst = new BiologicallyDerivedProductCollectionComponent();
296        copyValues(dst);
297        return dst;
298      }
299
300      public void copyValues(BiologicallyDerivedProductCollectionComponent dst) {
301        super.copyValues(dst);
302        dst.collector = collector == null ? null : collector.copy();
303        dst.source = source == null ? null : source.copy();
304        dst.collected = collected == null ? null : collected.copy();
305      }
306
307      @Override
308      public boolean equalsDeep(Base other_) {
309        if (!super.equalsDeep(other_))
310          return false;
311        if (!(other_ instanceof BiologicallyDerivedProductCollectionComponent))
312          return false;
313        BiologicallyDerivedProductCollectionComponent o = (BiologicallyDerivedProductCollectionComponent) other_;
314        return compareDeep(collector, o.collector, true) && compareDeep(source, o.source, true) && compareDeep(collected, o.collected, true)
315          ;
316      }
317
318      @Override
319      public boolean equalsShallow(Base other_) {
320        if (!super.equalsShallow(other_))
321          return false;
322        if (!(other_ instanceof BiologicallyDerivedProductCollectionComponent))
323          return false;
324        BiologicallyDerivedProductCollectionComponent o = (BiologicallyDerivedProductCollectionComponent) other_;
325        return true;
326      }
327
328      public boolean isEmpty() {
329        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(collector, source, collected
330          );
331      }
332
333  public String fhirType() {
334    return "BiologicallyDerivedProduct.collection";
335
336  }
337
338  }
339
340    @Block()
341    public static class BiologicallyDerivedProductPropertyComponent extends BackboneElement implements IBaseBackboneElement {
342        /**
343         * Code that specifies the property. It should reference an established coding system.
344         */
345        @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false)
346        @Description(shortDefinition="Code that specifies the property", formalDefinition="Code that specifies the property. It should reference an established coding system." )
347        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/biologicallyderived-product-property-type-codes")
348        protected Coding type;
349
350        /**
351         * Property values.
352         */
353        @Child(name = "value", type = {BooleanType.class, IntegerType.class, CodeableConcept.class, Period.class, Quantity.class, Range.class, Ratio.class, StringType.class, Attachment.class}, order=2, min=1, max=1, modifier=false, summary=false)
354        @Description(shortDefinition="Property values", formalDefinition="Property values." )
355        protected DataType value;
356
357        private static final long serialVersionUID = -1544667497L;
358
359    /**
360     * Constructor
361     */
362      public BiologicallyDerivedProductPropertyComponent() {
363        super();
364      }
365
366    /**
367     * Constructor
368     */
369      public BiologicallyDerivedProductPropertyComponent(Coding type, DataType value) {
370        super();
371        this.setType(type);
372        this.setValue(value);
373      }
374
375        /**
376         * @return {@link #type} (Code that specifies the property. It should reference an established coding system.)
377         */
378        public Coding getType() { 
379          if (this.type == null)
380            if (Configuration.errorOnAutoCreate())
381              throw new Error("Attempt to auto-create BiologicallyDerivedProductPropertyComponent.type");
382            else if (Configuration.doAutoCreate())
383              this.type = new Coding(); // cc
384          return this.type;
385        }
386
387        public boolean hasType() { 
388          return this.type != null && !this.type.isEmpty();
389        }
390
391        /**
392         * @param value {@link #type} (Code that specifies the property. It should reference an established coding system.)
393         */
394        public BiologicallyDerivedProductPropertyComponent setType(Coding value) { 
395          this.type = value;
396          return this;
397        }
398
399        /**
400         * @return {@link #value} (Property values.)
401         */
402        public DataType getValue() { 
403          return this.value;
404        }
405
406        /**
407         * @return {@link #value} (Property values.)
408         */
409        public BooleanType getValueBooleanType() throws FHIRException { 
410          if (this.value == null)
411            this.value = new BooleanType();
412          if (!(this.value instanceof BooleanType))
413            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
414          return (BooleanType) this.value;
415        }
416
417        public boolean hasValueBooleanType() { 
418          return this != null && this.value instanceof BooleanType;
419        }
420
421        /**
422         * @return {@link #value} (Property values.)
423         */
424        public IntegerType getValueIntegerType() throws FHIRException { 
425          if (this.value == null)
426            this.value = new IntegerType();
427          if (!(this.value instanceof IntegerType))
428            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
429          return (IntegerType) this.value;
430        }
431
432        public boolean hasValueIntegerType() { 
433          return this != null && this.value instanceof IntegerType;
434        }
435
436        /**
437         * @return {@link #value} (Property values.)
438         */
439        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
440          if (this.value == null)
441            this.value = new CodeableConcept();
442          if (!(this.value instanceof CodeableConcept))
443            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
444          return (CodeableConcept) this.value;
445        }
446
447        public boolean hasValueCodeableConcept() { 
448          return this != null && this.value instanceof CodeableConcept;
449        }
450
451        /**
452         * @return {@link #value} (Property values.)
453         */
454        public Period getValuePeriod() throws FHIRException { 
455          if (this.value == null)
456            this.value = new Period();
457          if (!(this.value instanceof Period))
458            throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered");
459          return (Period) this.value;
460        }
461
462        public boolean hasValuePeriod() { 
463          return this != null && this.value instanceof Period;
464        }
465
466        /**
467         * @return {@link #value} (Property values.)
468         */
469        public Quantity getValueQuantity() throws FHIRException { 
470          if (this.value == null)
471            this.value = new Quantity();
472          if (!(this.value instanceof Quantity))
473            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
474          return (Quantity) this.value;
475        }
476
477        public boolean hasValueQuantity() { 
478          return this != null && this.value instanceof Quantity;
479        }
480
481        /**
482         * @return {@link #value} (Property values.)
483         */
484        public Range getValueRange() throws FHIRException { 
485          if (this.value == null)
486            this.value = new Range();
487          if (!(this.value instanceof Range))
488            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
489          return (Range) this.value;
490        }
491
492        public boolean hasValueRange() { 
493          return this != null && this.value instanceof Range;
494        }
495
496        /**
497         * @return {@link #value} (Property values.)
498         */
499        public Ratio getValueRatio() throws FHIRException { 
500          if (this.value == null)
501            this.value = new Ratio();
502          if (!(this.value instanceof Ratio))
503            throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered");
504          return (Ratio) this.value;
505        }
506
507        public boolean hasValueRatio() { 
508          return this != null && this.value instanceof Ratio;
509        }
510
511        /**
512         * @return {@link #value} (Property values.)
513         */
514        public StringType getValueStringType() throws FHIRException { 
515          if (this.value == null)
516            this.value = new StringType();
517          if (!(this.value instanceof StringType))
518            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
519          return (StringType) this.value;
520        }
521
522        public boolean hasValueStringType() { 
523          return this != null && this.value instanceof StringType;
524        }
525
526        /**
527         * @return {@link #value} (Property values.)
528         */
529        public Attachment getValueAttachment() throws FHIRException { 
530          if (this.value == null)
531            this.value = new Attachment();
532          if (!(this.value instanceof Attachment))
533            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
534          return (Attachment) this.value;
535        }
536
537        public boolean hasValueAttachment() { 
538          return this != null && this.value instanceof Attachment;
539        }
540
541        public boolean hasValue() { 
542          return this.value != null && !this.value.isEmpty();
543        }
544
545        /**
546         * @param value {@link #value} (Property values.)
547         */
548        public BiologicallyDerivedProductPropertyComponent setValue(DataType value) { 
549          if (value != null && !(value instanceof BooleanType || value instanceof IntegerType || value instanceof CodeableConcept || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof StringType || value instanceof Attachment))
550            throw new Error("Not the right type for BiologicallyDerivedProduct.property.value[x]: "+value.fhirType());
551          this.value = value;
552          return this;
553        }
554
555        protected void listChildren(List<Property> children) {
556          super.listChildren(children);
557          children.add(new Property("type", "Coding", "Code that specifies the property. It should reference an established coding system.", 0, 1, type));
558          children.add(new Property("value[x]", "boolean|integer|CodeableConcept|Period|Quantity|Range|Ratio|string|Attachment", "Property values.", 0, 1, value));
559        }
560
561        @Override
562        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
563          switch (_hash) {
564          case 3575610: /*type*/  return new Property("type", "Coding", "Code that specifies the property. It should reference an established coding system.", 0, 1, type);
565          case -1410166417: /*value[x]*/  return new Property("value[x]", "boolean|integer|CodeableConcept|Period|Quantity|Range|Ratio|string|Attachment", "Property values.", 0, 1, value);
566          case 111972721: /*value*/  return new Property("value[x]", "boolean|integer|CodeableConcept|Period|Quantity|Range|Ratio|string|Attachment", "Property values.", 0, 1, value);
567          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "Property values.", 0, 1, value);
568          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "Property values.", 0, 1, value);
569          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "Property values.", 0, 1, value);
570          case -1524344174: /*valuePeriod*/  return new Property("value[x]", "Period", "Property values.", 0, 1, value);
571          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "Property values.", 0, 1, value);
572          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "Property values.", 0, 1, value);
573          case 2030767386: /*valueRatio*/  return new Property("value[x]", "Ratio", "Property values.", 0, 1, value);
574          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "Property values.", 0, 1, value);
575          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "Property values.", 0, 1, value);
576          default: return super.getNamedProperty(_hash, _name, _checkValid);
577          }
578
579        }
580
581      @Override
582      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
583        switch (hash) {
584        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
585        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
586        default: return super.getProperty(hash, name, checkValid);
587        }
588
589      }
590
591      @Override
592      public Base setProperty(int hash, String name, Base value) throws FHIRException {
593        switch (hash) {
594        case 3575610: // type
595          this.type = TypeConvertor.castToCoding(value); // Coding
596          return value;
597        case 111972721: // value
598          this.value = TypeConvertor.castToType(value); // DataType
599          return value;
600        default: return super.setProperty(hash, name, value);
601        }
602
603      }
604
605      @Override
606      public Base setProperty(String name, Base value) throws FHIRException {
607        if (name.equals("type")) {
608          this.type = TypeConvertor.castToCoding(value); // Coding
609        } else if (name.equals("value[x]")) {
610          this.value = TypeConvertor.castToType(value); // DataType
611        } else
612          return super.setProperty(name, value);
613        return value;
614      }
615
616      @Override
617      public Base makeProperty(int hash, String name) throws FHIRException {
618        switch (hash) {
619        case 3575610:  return getType();
620        case -1410166417:  return getValue();
621        case 111972721:  return getValue();
622        default: return super.makeProperty(hash, name);
623        }
624
625      }
626
627      @Override
628      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
629        switch (hash) {
630        case 3575610: /*type*/ return new String[] {"Coding"};
631        case 111972721: /*value*/ return new String[] {"boolean", "integer", "CodeableConcept", "Period", "Quantity", "Range", "Ratio", "string", "Attachment"};
632        default: return super.getTypesForProperty(hash, name);
633        }
634
635      }
636
637      @Override
638      public Base addChild(String name) throws FHIRException {
639        if (name.equals("type")) {
640          this.type = new Coding();
641          return this.type;
642        }
643        else if (name.equals("valueBoolean")) {
644          this.value = new BooleanType();
645          return this.value;
646        }
647        else if (name.equals("valueInteger")) {
648          this.value = new IntegerType();
649          return this.value;
650        }
651        else if (name.equals("valueCodeableConcept")) {
652          this.value = new CodeableConcept();
653          return this.value;
654        }
655        else if (name.equals("valuePeriod")) {
656          this.value = new Period();
657          return this.value;
658        }
659        else if (name.equals("valueQuantity")) {
660          this.value = new Quantity();
661          return this.value;
662        }
663        else if (name.equals("valueRange")) {
664          this.value = new Range();
665          return this.value;
666        }
667        else if (name.equals("valueRatio")) {
668          this.value = new Ratio();
669          return this.value;
670        }
671        else if (name.equals("valueString")) {
672          this.value = new StringType();
673          return this.value;
674        }
675        else if (name.equals("valueAttachment")) {
676          this.value = new Attachment();
677          return this.value;
678        }
679        else
680          return super.addChild(name);
681      }
682
683      public BiologicallyDerivedProductPropertyComponent copy() {
684        BiologicallyDerivedProductPropertyComponent dst = new BiologicallyDerivedProductPropertyComponent();
685        copyValues(dst);
686        return dst;
687      }
688
689      public void copyValues(BiologicallyDerivedProductPropertyComponent dst) {
690        super.copyValues(dst);
691        dst.type = type == null ? null : type.copy();
692        dst.value = value == null ? null : value.copy();
693      }
694
695      @Override
696      public boolean equalsDeep(Base other_) {
697        if (!super.equalsDeep(other_))
698          return false;
699        if (!(other_ instanceof BiologicallyDerivedProductPropertyComponent))
700          return false;
701        BiologicallyDerivedProductPropertyComponent o = (BiologicallyDerivedProductPropertyComponent) other_;
702        return compareDeep(type, o.type, true) && compareDeep(value, o.value, true);
703      }
704
705      @Override
706      public boolean equalsShallow(Base other_) {
707        if (!super.equalsShallow(other_))
708          return false;
709        if (!(other_ instanceof BiologicallyDerivedProductPropertyComponent))
710          return false;
711        BiologicallyDerivedProductPropertyComponent o = (BiologicallyDerivedProductPropertyComponent) other_;
712        return true;
713      }
714
715      public boolean isEmpty() {
716        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, value);
717      }
718
719  public String fhirType() {
720    return "BiologicallyDerivedProduct.property";
721
722  }
723
724  }
725
726    /**
727     * Broad category of this product.
728     */
729    @Child(name = "productCategory", type = {Coding.class}, order=0, min=0, max=1, modifier=false, summary=false)
730    @Description(shortDefinition="organ | tissue | fluid | cells | biologicalAgent", formalDefinition="Broad category of this product." )
731    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/product-category")
732    protected Coding productCategory;
733
734    /**
735     * A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.
736     */
737    @Child(name = "productCode", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false)
738    @Description(shortDefinition="A code that identifies the kind of this biologically derived product", formalDefinition="A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions." )
739    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/biologicallyderived-product-codes")
740    protected Coding productCode;
741
742    /**
743     * Parent product (if any) for this biologically-derived product.
744     */
745    @Child(name = "parent", type = {BiologicallyDerivedProduct.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
746    @Description(shortDefinition="The parent biologically-derived product", formalDefinition="Parent product (if any) for this biologically-derived product." )
747    protected List<Reference> parent;
748
749    /**
750     * Request to obtain and/or infuse this biologically derived product.
751     */
752    @Child(name = "request", type = {ServiceRequest.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
753    @Description(shortDefinition="Request to obtain and/or infuse this product", formalDefinition="Request to obtain and/or infuse this biologically derived product." )
754    protected List<Reference> request;
755
756    /**
757     * Unique instance identifiers assigned to a biologically derived product. Note: This is a business identifier, not a resource identifier.
758     */
759    @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
760    @Description(shortDefinition="Instance identifier", formalDefinition="Unique instance identifiers assigned to a biologically derived product. Note: This is a business identifier, not a resource identifier." )
761    protected List<Identifier> identifier;
762
763    /**
764     * An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.
765     */
766    @Child(name = "biologicalSourceEvent", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true)
767    @Description(shortDefinition="An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled", formalDefinition="An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled." )
768    protected Identifier biologicalSourceEvent;
769
770    /**
771     * Processing facilities responsible for the labeling and distribution of this biologically derived product.
772     */
773    @Child(name = "processingFacility", type = {Organization.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
774    @Description(shortDefinition="Processing facilities responsible for the labeling and distribution of this biologically derived product", formalDefinition="Processing facilities responsible for the labeling and distribution of this biologically derived product." )
775    protected List<Reference> processingFacility;
776
777    /**
778     * A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.
779     */
780    @Child(name = "division", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
781    @Description(shortDefinition="A unique identifier for an aliquot of a product", formalDefinition="A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers." )
782    protected StringType division;
783
784    /**
785     * Whether the product is currently available.
786     */
787    @Child(name = "productStatus", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=false)
788    @Description(shortDefinition="available | unavailable", formalDefinition="Whether the product is currently available." )
789    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/biologicallyderived-product-status")
790    protected Coding productStatus;
791
792    /**
793     * Date, and where relevant time, of expiration.
794     */
795    @Child(name = "expirationDate", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=false)
796    @Description(shortDefinition="Date, and where relevant time, of expiration", formalDefinition="Date, and where relevant time, of expiration." )
797    protected DateTimeType expirationDate;
798
799    /**
800     * How this product was collected.
801     */
802    @Child(name = "collection", type = {}, order=10, min=0, max=1, modifier=false, summary=false)
803    @Description(shortDefinition="How this product was collected", formalDefinition="How this product was collected." )
804    protected BiologicallyDerivedProductCollectionComponent collection;
805
806    /**
807     * The temperature requirements for storage of the biologically-derived product.
808     */
809    @Child(name = "storageTempRequirements", type = {Range.class}, order=11, min=0, max=1, modifier=false, summary=false)
810    @Description(shortDefinition="Product storage temperature requirements", formalDefinition="The temperature requirements for storage of the biologically-derived product." )
811    protected Range storageTempRequirements;
812
813    /**
814     * A property that is specific to this BiologicallyDerviedProduct instance.
815     */
816    @Child(name = "property", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
817    @Description(shortDefinition="A property that is specific to this BiologicallyDerviedProduct instance", formalDefinition="A property that is specific to this BiologicallyDerviedProduct instance." )
818    protected List<BiologicallyDerivedProductPropertyComponent> property;
819
820    private static final long serialVersionUID = 823916581L;
821
822  /**
823   * Constructor
824   */
825    public BiologicallyDerivedProduct() {
826      super();
827    }
828
829    /**
830     * @return {@link #productCategory} (Broad category of this product.)
831     */
832    public Coding getProductCategory() { 
833      if (this.productCategory == null)
834        if (Configuration.errorOnAutoCreate())
835          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.productCategory");
836        else if (Configuration.doAutoCreate())
837          this.productCategory = new Coding(); // cc
838      return this.productCategory;
839    }
840
841    public boolean hasProductCategory() { 
842      return this.productCategory != null && !this.productCategory.isEmpty();
843    }
844
845    /**
846     * @param value {@link #productCategory} (Broad category of this product.)
847     */
848    public BiologicallyDerivedProduct setProductCategory(Coding value) { 
849      this.productCategory = value;
850      return this;
851    }
852
853    /**
854     * @return {@link #productCode} (A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.)
855     */
856    public Coding getProductCode() { 
857      if (this.productCode == null)
858        if (Configuration.errorOnAutoCreate())
859          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.productCode");
860        else if (Configuration.doAutoCreate())
861          this.productCode = new Coding(); // cc
862      return this.productCode;
863    }
864
865    public boolean hasProductCode() { 
866      return this.productCode != null && !this.productCode.isEmpty();
867    }
868
869    /**
870     * @param value {@link #productCode} (A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.)
871     */
872    public BiologicallyDerivedProduct setProductCode(Coding value) { 
873      this.productCode = value;
874      return this;
875    }
876
877    /**
878     * @return {@link #parent} (Parent product (if any) for this biologically-derived product.)
879     */
880    public List<Reference> getParent() { 
881      if (this.parent == null)
882        this.parent = new ArrayList<Reference>();
883      return this.parent;
884    }
885
886    /**
887     * @return Returns a reference to <code>this</code> for easy method chaining
888     */
889    public BiologicallyDerivedProduct setParent(List<Reference> theParent) { 
890      this.parent = theParent;
891      return this;
892    }
893
894    public boolean hasParent() { 
895      if (this.parent == null)
896        return false;
897      for (Reference item : this.parent)
898        if (!item.isEmpty())
899          return true;
900      return false;
901    }
902
903    public Reference addParent() { //3
904      Reference t = new Reference();
905      if (this.parent == null)
906        this.parent = new ArrayList<Reference>();
907      this.parent.add(t);
908      return t;
909    }
910
911    public BiologicallyDerivedProduct addParent(Reference t) { //3
912      if (t == null)
913        return this;
914      if (this.parent == null)
915        this.parent = new ArrayList<Reference>();
916      this.parent.add(t);
917      return this;
918    }
919
920    /**
921     * @return The first repetition of repeating field {@link #parent}, creating it if it does not already exist {3}
922     */
923    public Reference getParentFirstRep() { 
924      if (getParent().isEmpty()) {
925        addParent();
926      }
927      return getParent().get(0);
928    }
929
930    /**
931     * @return {@link #request} (Request to obtain and/or infuse this biologically derived product.)
932     */
933    public List<Reference> getRequest() { 
934      if (this.request == null)
935        this.request = new ArrayList<Reference>();
936      return this.request;
937    }
938
939    /**
940     * @return Returns a reference to <code>this</code> for easy method chaining
941     */
942    public BiologicallyDerivedProduct setRequest(List<Reference> theRequest) { 
943      this.request = theRequest;
944      return this;
945    }
946
947    public boolean hasRequest() { 
948      if (this.request == null)
949        return false;
950      for (Reference item : this.request)
951        if (!item.isEmpty())
952          return true;
953      return false;
954    }
955
956    public Reference addRequest() { //3
957      Reference t = new Reference();
958      if (this.request == null)
959        this.request = new ArrayList<Reference>();
960      this.request.add(t);
961      return t;
962    }
963
964    public BiologicallyDerivedProduct addRequest(Reference t) { //3
965      if (t == null)
966        return this;
967      if (this.request == null)
968        this.request = new ArrayList<Reference>();
969      this.request.add(t);
970      return this;
971    }
972
973    /**
974     * @return The first repetition of repeating field {@link #request}, creating it if it does not already exist {3}
975     */
976    public Reference getRequestFirstRep() { 
977      if (getRequest().isEmpty()) {
978        addRequest();
979      }
980      return getRequest().get(0);
981    }
982
983    /**
984     * @return {@link #identifier} (Unique instance identifiers assigned to a biologically derived product. Note: This is a business identifier, not a resource identifier.)
985     */
986    public List<Identifier> getIdentifier() { 
987      if (this.identifier == null)
988        this.identifier = new ArrayList<Identifier>();
989      return this.identifier;
990    }
991
992    /**
993     * @return Returns a reference to <code>this</code> for easy method chaining
994     */
995    public BiologicallyDerivedProduct setIdentifier(List<Identifier> theIdentifier) { 
996      this.identifier = theIdentifier;
997      return this;
998    }
999
1000    public boolean hasIdentifier() { 
1001      if (this.identifier == null)
1002        return false;
1003      for (Identifier item : this.identifier)
1004        if (!item.isEmpty())
1005          return true;
1006      return false;
1007    }
1008
1009    public Identifier addIdentifier() { //3
1010      Identifier t = new Identifier();
1011      if (this.identifier == null)
1012        this.identifier = new ArrayList<Identifier>();
1013      this.identifier.add(t);
1014      return t;
1015    }
1016
1017    public BiologicallyDerivedProduct addIdentifier(Identifier t) { //3
1018      if (t == null)
1019        return this;
1020      if (this.identifier == null)
1021        this.identifier = new ArrayList<Identifier>();
1022      this.identifier.add(t);
1023      return this;
1024    }
1025
1026    /**
1027     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1028     */
1029    public Identifier getIdentifierFirstRep() { 
1030      if (getIdentifier().isEmpty()) {
1031        addIdentifier();
1032      }
1033      return getIdentifier().get(0);
1034    }
1035
1036    /**
1037     * @return {@link #biologicalSourceEvent} (An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.)
1038     */
1039    public Identifier getBiologicalSourceEvent() { 
1040      if (this.biologicalSourceEvent == null)
1041        if (Configuration.errorOnAutoCreate())
1042          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.biologicalSourceEvent");
1043        else if (Configuration.doAutoCreate())
1044          this.biologicalSourceEvent = new Identifier(); // cc
1045      return this.biologicalSourceEvent;
1046    }
1047
1048    public boolean hasBiologicalSourceEvent() { 
1049      return this.biologicalSourceEvent != null && !this.biologicalSourceEvent.isEmpty();
1050    }
1051
1052    /**
1053     * @param value {@link #biologicalSourceEvent} (An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.)
1054     */
1055    public BiologicallyDerivedProduct setBiologicalSourceEvent(Identifier value) { 
1056      this.biologicalSourceEvent = value;
1057      return this;
1058    }
1059
1060    /**
1061     * @return {@link #processingFacility} (Processing facilities responsible for the labeling and distribution of this biologically derived product.)
1062     */
1063    public List<Reference> getProcessingFacility() { 
1064      if (this.processingFacility == null)
1065        this.processingFacility = new ArrayList<Reference>();
1066      return this.processingFacility;
1067    }
1068
1069    /**
1070     * @return Returns a reference to <code>this</code> for easy method chaining
1071     */
1072    public BiologicallyDerivedProduct setProcessingFacility(List<Reference> theProcessingFacility) { 
1073      this.processingFacility = theProcessingFacility;
1074      return this;
1075    }
1076
1077    public boolean hasProcessingFacility() { 
1078      if (this.processingFacility == null)
1079        return false;
1080      for (Reference item : this.processingFacility)
1081        if (!item.isEmpty())
1082          return true;
1083      return false;
1084    }
1085
1086    public Reference addProcessingFacility() { //3
1087      Reference t = new Reference();
1088      if (this.processingFacility == null)
1089        this.processingFacility = new ArrayList<Reference>();
1090      this.processingFacility.add(t);
1091      return t;
1092    }
1093
1094    public BiologicallyDerivedProduct addProcessingFacility(Reference t) { //3
1095      if (t == null)
1096        return this;
1097      if (this.processingFacility == null)
1098        this.processingFacility = new ArrayList<Reference>();
1099      this.processingFacility.add(t);
1100      return this;
1101    }
1102
1103    /**
1104     * @return The first repetition of repeating field {@link #processingFacility}, creating it if it does not already exist {3}
1105     */
1106    public Reference getProcessingFacilityFirstRep() { 
1107      if (getProcessingFacility().isEmpty()) {
1108        addProcessingFacility();
1109      }
1110      return getProcessingFacility().get(0);
1111    }
1112
1113    /**
1114     * @return {@link #division} (A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.). This is the underlying object with id, value and extensions. The accessor "getDivision" gives direct access to the value
1115     */
1116    public StringType getDivisionElement() { 
1117      if (this.division == null)
1118        if (Configuration.errorOnAutoCreate())
1119          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.division");
1120        else if (Configuration.doAutoCreate())
1121          this.division = new StringType(); // bb
1122      return this.division;
1123    }
1124
1125    public boolean hasDivisionElement() { 
1126      return this.division != null && !this.division.isEmpty();
1127    }
1128
1129    public boolean hasDivision() { 
1130      return this.division != null && !this.division.isEmpty();
1131    }
1132
1133    /**
1134     * @param value {@link #division} (A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.). This is the underlying object with id, value and extensions. The accessor "getDivision" gives direct access to the value
1135     */
1136    public BiologicallyDerivedProduct setDivisionElement(StringType value) { 
1137      this.division = value;
1138      return this;
1139    }
1140
1141    /**
1142     * @return A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.
1143     */
1144    public String getDivision() { 
1145      return this.division == null ? null : this.division.getValue();
1146    }
1147
1148    /**
1149     * @param value A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.
1150     */
1151    public BiologicallyDerivedProduct setDivision(String value) { 
1152      if (Utilities.noString(value))
1153        this.division = null;
1154      else {
1155        if (this.division == null)
1156          this.division = new StringType();
1157        this.division.setValue(value);
1158      }
1159      return this;
1160    }
1161
1162    /**
1163     * @return {@link #productStatus} (Whether the product is currently available.)
1164     */
1165    public Coding getProductStatus() { 
1166      if (this.productStatus == null)
1167        if (Configuration.errorOnAutoCreate())
1168          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.productStatus");
1169        else if (Configuration.doAutoCreate())
1170          this.productStatus = new Coding(); // cc
1171      return this.productStatus;
1172    }
1173
1174    public boolean hasProductStatus() { 
1175      return this.productStatus != null && !this.productStatus.isEmpty();
1176    }
1177
1178    /**
1179     * @param value {@link #productStatus} (Whether the product is currently available.)
1180     */
1181    public BiologicallyDerivedProduct setProductStatus(Coding value) { 
1182      this.productStatus = value;
1183      return this;
1184    }
1185
1186    /**
1187     * @return {@link #expirationDate} (Date, and where relevant time, of expiration.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value
1188     */
1189    public DateTimeType getExpirationDateElement() { 
1190      if (this.expirationDate == null)
1191        if (Configuration.errorOnAutoCreate())
1192          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.expirationDate");
1193        else if (Configuration.doAutoCreate())
1194          this.expirationDate = new DateTimeType(); // bb
1195      return this.expirationDate;
1196    }
1197
1198    public boolean hasExpirationDateElement() { 
1199      return this.expirationDate != null && !this.expirationDate.isEmpty();
1200    }
1201
1202    public boolean hasExpirationDate() { 
1203      return this.expirationDate != null && !this.expirationDate.isEmpty();
1204    }
1205
1206    /**
1207     * @param value {@link #expirationDate} (Date, and where relevant time, of expiration.). This is the underlying object with id, value and extensions. The accessor "getExpirationDate" gives direct access to the value
1208     */
1209    public BiologicallyDerivedProduct setExpirationDateElement(DateTimeType value) { 
1210      this.expirationDate = value;
1211      return this;
1212    }
1213
1214    /**
1215     * @return Date, and where relevant time, of expiration.
1216     */
1217    public Date getExpirationDate() { 
1218      return this.expirationDate == null ? null : this.expirationDate.getValue();
1219    }
1220
1221    /**
1222     * @param value Date, and where relevant time, of expiration.
1223     */
1224    public BiologicallyDerivedProduct setExpirationDate(Date value) { 
1225      if (value == null)
1226        this.expirationDate = null;
1227      else {
1228        if (this.expirationDate == null)
1229          this.expirationDate = new DateTimeType();
1230        this.expirationDate.setValue(value);
1231      }
1232      return this;
1233    }
1234
1235    /**
1236     * @return {@link #collection} (How this product was collected.)
1237     */
1238    public BiologicallyDerivedProductCollectionComponent getCollection() { 
1239      if (this.collection == null)
1240        if (Configuration.errorOnAutoCreate())
1241          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.collection");
1242        else if (Configuration.doAutoCreate())
1243          this.collection = new BiologicallyDerivedProductCollectionComponent(); // cc
1244      return this.collection;
1245    }
1246
1247    public boolean hasCollection() { 
1248      return this.collection != null && !this.collection.isEmpty();
1249    }
1250
1251    /**
1252     * @param value {@link #collection} (How this product was collected.)
1253     */
1254    public BiologicallyDerivedProduct setCollection(BiologicallyDerivedProductCollectionComponent value) { 
1255      this.collection = value;
1256      return this;
1257    }
1258
1259    /**
1260     * @return {@link #storageTempRequirements} (The temperature requirements for storage of the biologically-derived product.)
1261     */
1262    public Range getStorageTempRequirements() { 
1263      if (this.storageTempRequirements == null)
1264        if (Configuration.errorOnAutoCreate())
1265          throw new Error("Attempt to auto-create BiologicallyDerivedProduct.storageTempRequirements");
1266        else if (Configuration.doAutoCreate())
1267          this.storageTempRequirements = new Range(); // cc
1268      return this.storageTempRequirements;
1269    }
1270
1271    public boolean hasStorageTempRequirements() { 
1272      return this.storageTempRequirements != null && !this.storageTempRequirements.isEmpty();
1273    }
1274
1275    /**
1276     * @param value {@link #storageTempRequirements} (The temperature requirements for storage of the biologically-derived product.)
1277     */
1278    public BiologicallyDerivedProduct setStorageTempRequirements(Range value) { 
1279      this.storageTempRequirements = value;
1280      return this;
1281    }
1282
1283    /**
1284     * @return {@link #property} (A property that is specific to this BiologicallyDerviedProduct instance.)
1285     */
1286    public List<BiologicallyDerivedProductPropertyComponent> getProperty() { 
1287      if (this.property == null)
1288        this.property = new ArrayList<BiologicallyDerivedProductPropertyComponent>();
1289      return this.property;
1290    }
1291
1292    /**
1293     * @return Returns a reference to <code>this</code> for easy method chaining
1294     */
1295    public BiologicallyDerivedProduct setProperty(List<BiologicallyDerivedProductPropertyComponent> theProperty) { 
1296      this.property = theProperty;
1297      return this;
1298    }
1299
1300    public boolean hasProperty() { 
1301      if (this.property == null)
1302        return false;
1303      for (BiologicallyDerivedProductPropertyComponent item : this.property)
1304        if (!item.isEmpty())
1305          return true;
1306      return false;
1307    }
1308
1309    public BiologicallyDerivedProductPropertyComponent addProperty() { //3
1310      BiologicallyDerivedProductPropertyComponent t = new BiologicallyDerivedProductPropertyComponent();
1311      if (this.property == null)
1312        this.property = new ArrayList<BiologicallyDerivedProductPropertyComponent>();
1313      this.property.add(t);
1314      return t;
1315    }
1316
1317    public BiologicallyDerivedProduct addProperty(BiologicallyDerivedProductPropertyComponent t) { //3
1318      if (t == null)
1319        return this;
1320      if (this.property == null)
1321        this.property = new ArrayList<BiologicallyDerivedProductPropertyComponent>();
1322      this.property.add(t);
1323      return this;
1324    }
1325
1326    /**
1327     * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist {3}
1328     */
1329    public BiologicallyDerivedProductPropertyComponent getPropertyFirstRep() { 
1330      if (getProperty().isEmpty()) {
1331        addProperty();
1332      }
1333      return getProperty().get(0);
1334    }
1335
1336      protected void listChildren(List<Property> children) {
1337        super.listChildren(children);
1338        children.add(new Property("productCategory", "Coding", "Broad category of this product.", 0, 1, productCategory));
1339        children.add(new Property("productCode", "Coding", "A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.", 0, 1, productCode));
1340        children.add(new Property("parent", "Reference(BiologicallyDerivedProduct)", "Parent product (if any) for this biologically-derived product.", 0, java.lang.Integer.MAX_VALUE, parent));
1341        children.add(new Property("request", "Reference(ServiceRequest)", "Request to obtain and/or infuse this biologically derived product.", 0, java.lang.Integer.MAX_VALUE, request));
1342        children.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a biologically derived product. Note: This is a business identifier, not a resource identifier.", 0, java.lang.Integer.MAX_VALUE, identifier));
1343        children.add(new Property("biologicalSourceEvent", "Identifier", "An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.", 0, 1, biologicalSourceEvent));
1344        children.add(new Property("processingFacility", "Reference(Organization)", "Processing facilities responsible for the labeling and distribution of this biologically derived product.", 0, java.lang.Integer.MAX_VALUE, processingFacility));
1345        children.add(new Property("division", "string", "A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.", 0, 1, division));
1346        children.add(new Property("productStatus", "Coding", "Whether the product is currently available.", 0, 1, productStatus));
1347        children.add(new Property("expirationDate", "dateTime", "Date, and where relevant time, of expiration.", 0, 1, expirationDate));
1348        children.add(new Property("collection", "", "How this product was collected.", 0, 1, collection));
1349        children.add(new Property("storageTempRequirements", "Range", "The temperature requirements for storage of the biologically-derived product.", 0, 1, storageTempRequirements));
1350        children.add(new Property("property", "", "A property that is specific to this BiologicallyDerviedProduct instance.", 0, java.lang.Integer.MAX_VALUE, property));
1351      }
1352
1353      @Override
1354      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1355        switch (_hash) {
1356        case 197299981: /*productCategory*/  return new Property("productCategory", "Coding", "Broad category of this product.", 0, 1, productCategory);
1357        case -1492131972: /*productCode*/  return new Property("productCode", "Coding", "A codified value that systematically supports characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.", 0, 1, productCode);
1358        case -995424086: /*parent*/  return new Property("parent", "Reference(BiologicallyDerivedProduct)", "Parent product (if any) for this biologically-derived product.", 0, java.lang.Integer.MAX_VALUE, parent);
1359        case 1095692943: /*request*/  return new Property("request", "Reference(ServiceRequest)", "Request to obtain and/or infuse this biologically derived product.", 0, java.lang.Integer.MAX_VALUE, request);
1360        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Unique instance identifiers assigned to a biologically derived product. Note: This is a business identifier, not a resource identifier.", 0, java.lang.Integer.MAX_VALUE, identifier);
1361        case -654468482: /*biologicalSourceEvent*/  return new Property("biologicalSourceEvent", "Identifier", "An identifier that supports traceability to the event during which material in this product from one or more biological entities was obtained or pooled.", 0, 1, biologicalSourceEvent);
1362        case 39337686: /*processingFacility*/  return new Property("processingFacility", "Reference(Organization)", "Processing facilities responsible for the labeling and distribution of this biologically derived product.", 0, java.lang.Integer.MAX_VALUE, processingFacility);
1363        case 364720301: /*division*/  return new Property("division", "string", "A unique identifier for an aliquot of a product.  Used to distinguish individual aliquots of a product carrying the same biologicalSource and productCode identifiers.", 0, 1, division);
1364        case 1042864577: /*productStatus*/  return new Property("productStatus", "Coding", "Whether the product is currently available.", 0, 1, productStatus);
1365        case -668811523: /*expirationDate*/  return new Property("expirationDate", "dateTime", "Date, and where relevant time, of expiration.", 0, 1, expirationDate);
1366        case -1741312354: /*collection*/  return new Property("collection", "", "How this product was collected.", 0, 1, collection);
1367        case 1643599647: /*storageTempRequirements*/  return new Property("storageTempRequirements", "Range", "The temperature requirements for storage of the biologically-derived product.", 0, 1, storageTempRequirements);
1368        case -993141291: /*property*/  return new Property("property", "", "A property that is specific to this BiologicallyDerviedProduct instance.", 0, java.lang.Integer.MAX_VALUE, property);
1369        default: return super.getNamedProperty(_hash, _name, _checkValid);
1370        }
1371
1372      }
1373
1374      @Override
1375      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1376        switch (hash) {
1377        case 197299981: /*productCategory*/ return this.productCategory == null ? new Base[0] : new Base[] {this.productCategory}; // Coding
1378        case -1492131972: /*productCode*/ return this.productCode == null ? new Base[0] : new Base[] {this.productCode}; // Coding
1379        case -995424086: /*parent*/ return this.parent == null ? new Base[0] : this.parent.toArray(new Base[this.parent.size()]); // Reference
1380        case 1095692943: /*request*/ return this.request == null ? new Base[0] : this.request.toArray(new Base[this.request.size()]); // Reference
1381        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1382        case -654468482: /*biologicalSourceEvent*/ return this.biologicalSourceEvent == null ? new Base[0] : new Base[] {this.biologicalSourceEvent}; // Identifier
1383        case 39337686: /*processingFacility*/ return this.processingFacility == null ? new Base[0] : this.processingFacility.toArray(new Base[this.processingFacility.size()]); // Reference
1384        case 364720301: /*division*/ return this.division == null ? new Base[0] : new Base[] {this.division}; // StringType
1385        case 1042864577: /*productStatus*/ return this.productStatus == null ? new Base[0] : new Base[] {this.productStatus}; // Coding
1386        case -668811523: /*expirationDate*/ return this.expirationDate == null ? new Base[0] : new Base[] {this.expirationDate}; // DateTimeType
1387        case -1741312354: /*collection*/ return this.collection == null ? new Base[0] : new Base[] {this.collection}; // BiologicallyDerivedProductCollectionComponent
1388        case 1643599647: /*storageTempRequirements*/ return this.storageTempRequirements == null ? new Base[0] : new Base[] {this.storageTempRequirements}; // Range
1389        case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // BiologicallyDerivedProductPropertyComponent
1390        default: return super.getProperty(hash, name, checkValid);
1391        }
1392
1393      }
1394
1395      @Override
1396      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1397        switch (hash) {
1398        case 197299981: // productCategory
1399          this.productCategory = TypeConvertor.castToCoding(value); // Coding
1400          return value;
1401        case -1492131972: // productCode
1402          this.productCode = TypeConvertor.castToCoding(value); // Coding
1403          return value;
1404        case -995424086: // parent
1405          this.getParent().add(TypeConvertor.castToReference(value)); // Reference
1406          return value;
1407        case 1095692943: // request
1408          this.getRequest().add(TypeConvertor.castToReference(value)); // Reference
1409          return value;
1410        case -1618432855: // identifier
1411          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1412          return value;
1413        case -654468482: // biologicalSourceEvent
1414          this.biologicalSourceEvent = TypeConvertor.castToIdentifier(value); // Identifier
1415          return value;
1416        case 39337686: // processingFacility
1417          this.getProcessingFacility().add(TypeConvertor.castToReference(value)); // Reference
1418          return value;
1419        case 364720301: // division
1420          this.division = TypeConvertor.castToString(value); // StringType
1421          return value;
1422        case 1042864577: // productStatus
1423          this.productStatus = TypeConvertor.castToCoding(value); // Coding
1424          return value;
1425        case -668811523: // expirationDate
1426          this.expirationDate = TypeConvertor.castToDateTime(value); // DateTimeType
1427          return value;
1428        case -1741312354: // collection
1429          this.collection = (BiologicallyDerivedProductCollectionComponent) value; // BiologicallyDerivedProductCollectionComponent
1430          return value;
1431        case 1643599647: // storageTempRequirements
1432          this.storageTempRequirements = TypeConvertor.castToRange(value); // Range
1433          return value;
1434        case -993141291: // property
1435          this.getProperty().add((BiologicallyDerivedProductPropertyComponent) value); // BiologicallyDerivedProductPropertyComponent
1436          return value;
1437        default: return super.setProperty(hash, name, value);
1438        }
1439
1440      }
1441
1442      @Override
1443      public Base setProperty(String name, Base value) throws FHIRException {
1444        if (name.equals("productCategory")) {
1445          this.productCategory = TypeConvertor.castToCoding(value); // Coding
1446        } else if (name.equals("productCode")) {
1447          this.productCode = TypeConvertor.castToCoding(value); // Coding
1448        } else if (name.equals("parent")) {
1449          this.getParent().add(TypeConvertor.castToReference(value));
1450        } else if (name.equals("request")) {
1451          this.getRequest().add(TypeConvertor.castToReference(value));
1452        } else if (name.equals("identifier")) {
1453          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1454        } else if (name.equals("biologicalSourceEvent")) {
1455          this.biologicalSourceEvent = TypeConvertor.castToIdentifier(value); // Identifier
1456        } else if (name.equals("processingFacility")) {
1457          this.getProcessingFacility().add(TypeConvertor.castToReference(value));
1458        } else if (name.equals("division")) {
1459          this.division = TypeConvertor.castToString(value); // StringType
1460        } else if (name.equals("productStatus")) {
1461          this.productStatus = TypeConvertor.castToCoding(value); // Coding
1462        } else if (name.equals("expirationDate")) {
1463          this.expirationDate = TypeConvertor.castToDateTime(value); // DateTimeType
1464        } else if (name.equals("collection")) {
1465          this.collection = (BiologicallyDerivedProductCollectionComponent) value; // BiologicallyDerivedProductCollectionComponent
1466        } else if (name.equals("storageTempRequirements")) {
1467          this.storageTempRequirements = TypeConvertor.castToRange(value); // Range
1468        } else if (name.equals("property")) {
1469          this.getProperty().add((BiologicallyDerivedProductPropertyComponent) value);
1470        } else
1471          return super.setProperty(name, value);
1472        return value;
1473      }
1474
1475      @Override
1476      public Base makeProperty(int hash, String name) throws FHIRException {
1477        switch (hash) {
1478        case 197299981:  return getProductCategory();
1479        case -1492131972:  return getProductCode();
1480        case -995424086:  return addParent(); 
1481        case 1095692943:  return addRequest(); 
1482        case -1618432855:  return addIdentifier(); 
1483        case -654468482:  return getBiologicalSourceEvent();
1484        case 39337686:  return addProcessingFacility(); 
1485        case 364720301:  return getDivisionElement();
1486        case 1042864577:  return getProductStatus();
1487        case -668811523:  return getExpirationDateElement();
1488        case -1741312354:  return getCollection();
1489        case 1643599647:  return getStorageTempRequirements();
1490        case -993141291:  return addProperty(); 
1491        default: return super.makeProperty(hash, name);
1492        }
1493
1494      }
1495
1496      @Override
1497      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1498        switch (hash) {
1499        case 197299981: /*productCategory*/ return new String[] {"Coding"};
1500        case -1492131972: /*productCode*/ return new String[] {"Coding"};
1501        case -995424086: /*parent*/ return new String[] {"Reference"};
1502        case 1095692943: /*request*/ return new String[] {"Reference"};
1503        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1504        case -654468482: /*biologicalSourceEvent*/ return new String[] {"Identifier"};
1505        case 39337686: /*processingFacility*/ return new String[] {"Reference"};
1506        case 364720301: /*division*/ return new String[] {"string"};
1507        case 1042864577: /*productStatus*/ return new String[] {"Coding"};
1508        case -668811523: /*expirationDate*/ return new String[] {"dateTime"};
1509        case -1741312354: /*collection*/ return new String[] {};
1510        case 1643599647: /*storageTempRequirements*/ return new String[] {"Range"};
1511        case -993141291: /*property*/ return new String[] {};
1512        default: return super.getTypesForProperty(hash, name);
1513        }
1514
1515      }
1516
1517      @Override
1518      public Base addChild(String name) throws FHIRException {
1519        if (name.equals("productCategory")) {
1520          this.productCategory = new Coding();
1521          return this.productCategory;
1522        }
1523        else if (name.equals("productCode")) {
1524          this.productCode = new Coding();
1525          return this.productCode;
1526        }
1527        else if (name.equals("parent")) {
1528          return addParent();
1529        }
1530        else if (name.equals("request")) {
1531          return addRequest();
1532        }
1533        else if (name.equals("identifier")) {
1534          return addIdentifier();
1535        }
1536        else if (name.equals("biologicalSourceEvent")) {
1537          this.biologicalSourceEvent = new Identifier();
1538          return this.biologicalSourceEvent;
1539        }
1540        else if (name.equals("processingFacility")) {
1541          return addProcessingFacility();
1542        }
1543        else if (name.equals("division")) {
1544          throw new FHIRException("Cannot call addChild on a primitive type BiologicallyDerivedProduct.division");
1545        }
1546        else if (name.equals("productStatus")) {
1547          this.productStatus = new Coding();
1548          return this.productStatus;
1549        }
1550        else if (name.equals("expirationDate")) {
1551          throw new FHIRException("Cannot call addChild on a primitive type BiologicallyDerivedProduct.expirationDate");
1552        }
1553        else if (name.equals("collection")) {
1554          this.collection = new BiologicallyDerivedProductCollectionComponent();
1555          return this.collection;
1556        }
1557        else if (name.equals("storageTempRequirements")) {
1558          this.storageTempRequirements = new Range();
1559          return this.storageTempRequirements;
1560        }
1561        else if (name.equals("property")) {
1562          return addProperty();
1563        }
1564        else
1565          return super.addChild(name);
1566      }
1567
1568  public String fhirType() {
1569    return "BiologicallyDerivedProduct";
1570
1571  }
1572
1573      public BiologicallyDerivedProduct copy() {
1574        BiologicallyDerivedProduct dst = new BiologicallyDerivedProduct();
1575        copyValues(dst);
1576        return dst;
1577      }
1578
1579      public void copyValues(BiologicallyDerivedProduct dst) {
1580        super.copyValues(dst);
1581        dst.productCategory = productCategory == null ? null : productCategory.copy();
1582        dst.productCode = productCode == null ? null : productCode.copy();
1583        if (parent != null) {
1584          dst.parent = new ArrayList<Reference>();
1585          for (Reference i : parent)
1586            dst.parent.add(i.copy());
1587        };
1588        if (request != null) {
1589          dst.request = new ArrayList<Reference>();
1590          for (Reference i : request)
1591            dst.request.add(i.copy());
1592        };
1593        if (identifier != null) {
1594          dst.identifier = new ArrayList<Identifier>();
1595          for (Identifier i : identifier)
1596            dst.identifier.add(i.copy());
1597        };
1598        dst.biologicalSourceEvent = biologicalSourceEvent == null ? null : biologicalSourceEvent.copy();
1599        if (processingFacility != null) {
1600          dst.processingFacility = new ArrayList<Reference>();
1601          for (Reference i : processingFacility)
1602            dst.processingFacility.add(i.copy());
1603        };
1604        dst.division = division == null ? null : division.copy();
1605        dst.productStatus = productStatus == null ? null : productStatus.copy();
1606        dst.expirationDate = expirationDate == null ? null : expirationDate.copy();
1607        dst.collection = collection == null ? null : collection.copy();
1608        dst.storageTempRequirements = storageTempRequirements == null ? null : storageTempRequirements.copy();
1609        if (property != null) {
1610          dst.property = new ArrayList<BiologicallyDerivedProductPropertyComponent>();
1611          for (BiologicallyDerivedProductPropertyComponent i : property)
1612            dst.property.add(i.copy());
1613        };
1614      }
1615
1616      protected BiologicallyDerivedProduct typedCopy() {
1617        return copy();
1618      }
1619
1620      @Override
1621      public boolean equalsDeep(Base other_) {
1622        if (!super.equalsDeep(other_))
1623          return false;
1624        if (!(other_ instanceof BiologicallyDerivedProduct))
1625          return false;
1626        BiologicallyDerivedProduct o = (BiologicallyDerivedProduct) other_;
1627        return compareDeep(productCategory, o.productCategory, true) && compareDeep(productCode, o.productCode, true)
1628           && compareDeep(parent, o.parent, true) && compareDeep(request, o.request, true) && compareDeep(identifier, o.identifier, true)
1629           && compareDeep(biologicalSourceEvent, o.biologicalSourceEvent, true) && compareDeep(processingFacility, o.processingFacility, true)
1630           && compareDeep(division, o.division, true) && compareDeep(productStatus, o.productStatus, true)
1631           && compareDeep(expirationDate, o.expirationDate, true) && compareDeep(collection, o.collection, true)
1632           && compareDeep(storageTempRequirements, o.storageTempRequirements, true) && compareDeep(property, o.property, true)
1633          ;
1634      }
1635
1636      @Override
1637      public boolean equalsShallow(Base other_) {
1638        if (!super.equalsShallow(other_))
1639          return false;
1640        if (!(other_ instanceof BiologicallyDerivedProduct))
1641          return false;
1642        BiologicallyDerivedProduct o = (BiologicallyDerivedProduct) other_;
1643        return compareValues(division, o.division, true) && compareValues(expirationDate, o.expirationDate, true)
1644          ;
1645      }
1646
1647      public boolean isEmpty() {
1648        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(productCategory, productCode
1649          , parent, request, identifier, biologicalSourceEvent, processingFacility, division
1650          , productStatus, expirationDate, collection, storageTempRequirements, property);
1651      }
1652
1653  @Override
1654  public ResourceType getResourceType() {
1655    return ResourceType.BiologicallyDerivedProduct;
1656   }
1657
1658 /**
1659   * Search parameter: <b>biological-source-event</b>
1660   * <p>
1661   * Description: <b>The biological source for the biologically derived product</b><br>
1662   * Type: <b>token</b><br>
1663   * Path: <b>BiologicallyDerivedProduct.biologicalSourceEvent</b><br>
1664   * </p>
1665   */
1666  @SearchParamDefinition(name="biological-source-event", path="BiologicallyDerivedProduct.biologicalSourceEvent", description="The biological source for the biologically derived product", type="token" )
1667  public static final String SP_BIOLOGICAL_SOURCE_EVENT = "biological-source-event";
1668 /**
1669   * <b>Fluent Client</b> search parameter constant for <b>biological-source-event</b>
1670   * <p>
1671   * Description: <b>The biological source for the biologically derived product</b><br>
1672   * Type: <b>token</b><br>
1673   * Path: <b>BiologicallyDerivedProduct.biologicalSourceEvent</b><br>
1674   * </p>
1675   */
1676  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BIOLOGICAL_SOURCE_EVENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BIOLOGICAL_SOURCE_EVENT);
1677
1678 /**
1679   * Search parameter: <b>collector</b>
1680   * <p>
1681   * Description: <b>Procedure request to obtain this biologically derived product.</b><br>
1682   * Type: <b>reference</b><br>
1683   * Path: <b>BiologicallyDerivedProduct.collection.collector</b><br>
1684   * </p>
1685   */
1686  @SearchParamDefinition(name="collector", path="BiologicallyDerivedProduct.collection.collector", description="Procedure request to obtain this biologically derived product.", type="reference", target={Practitioner.class, PractitionerRole.class } )
1687  public static final String SP_COLLECTOR = "collector";
1688 /**
1689   * <b>Fluent Client</b> search parameter constant for <b>collector</b>
1690   * <p>
1691   * Description: <b>Procedure request to obtain this biologically derived product.</b><br>
1692   * Type: <b>reference</b><br>
1693   * Path: <b>BiologicallyDerivedProduct.collection.collector</b><br>
1694   * </p>
1695   */
1696  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COLLECTOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COLLECTOR);
1697
1698/**
1699   * Constant for fluent queries to be used to add include statements. Specifies
1700   * the path value of "<b>BiologicallyDerivedProduct:collector</b>".
1701   */
1702  public static final ca.uhn.fhir.model.api.Include INCLUDE_COLLECTOR = new ca.uhn.fhir.model.api.Include("BiologicallyDerivedProduct:collector").toLocked();
1703
1704 /**
1705   * Search parameter: <b>identifier</b>
1706   * <p>
1707   * Description: <b>Identifier</b><br>
1708   * Type: <b>token</b><br>
1709   * Path: <b>BiologicallyDerivedProduct.identifier</b><br>
1710   * </p>
1711   */
1712  @SearchParamDefinition(name="identifier", path="BiologicallyDerivedProduct.identifier", description="Identifier", type="token" )
1713  public static final String SP_IDENTIFIER = "identifier";
1714 /**
1715   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1716   * <p>
1717   * Description: <b>Identifier</b><br>
1718   * Type: <b>token</b><br>
1719   * Path: <b>BiologicallyDerivedProduct.identifier</b><br>
1720   * </p>
1721   */
1722  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1723
1724 /**
1725   * Search parameter: <b>product-category</b>
1726   * <p>
1727   * Description: <b>Broad category of this product.</b><br>
1728   * Type: <b>token</b><br>
1729   * Path: <b>BiologicallyDerivedProduct.productCategory</b><br>
1730   * </p>
1731   */
1732  @SearchParamDefinition(name="product-category", path="BiologicallyDerivedProduct.productCategory", description="Broad category of this product.", type="token" )
1733  public static final String SP_PRODUCT_CATEGORY = "product-category";
1734 /**
1735   * <b>Fluent Client</b> search parameter constant for <b>product-category</b>
1736   * <p>
1737   * Description: <b>Broad category of this product.</b><br>
1738   * Type: <b>token</b><br>
1739   * Path: <b>BiologicallyDerivedProduct.productCategory</b><br>
1740   * </p>
1741   */
1742  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRODUCT_CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRODUCT_CATEGORY);
1743
1744 /**
1745   * Search parameter: <b>product-code</b>
1746   * <p>
1747   * Description: <b>A code that identifies the kind of this biologically derived product (SNOMED CT code).</b><br>
1748   * Type: <b>token</b><br>
1749   * Path: <b>BiologicallyDerivedProduct.productCode</b><br>
1750   * </p>
1751   */
1752  @SearchParamDefinition(name="product-code", path="BiologicallyDerivedProduct.productCode", description="A code that identifies the kind of this biologically derived product (SNOMED CT code).", type="token" )
1753  public static final String SP_PRODUCT_CODE = "product-code";
1754 /**
1755   * <b>Fluent Client</b> search parameter constant for <b>product-code</b>
1756   * <p>
1757   * Description: <b>A code that identifies the kind of this biologically derived product (SNOMED CT code).</b><br>
1758   * Type: <b>token</b><br>
1759   * Path: <b>BiologicallyDerivedProduct.productCode</b><br>
1760   * </p>
1761   */
1762  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRODUCT_CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRODUCT_CODE);
1763
1764 /**
1765   * Search parameter: <b>product-status</b>
1766   * <p>
1767   * Description: <b>Whether the product is currently available.</b><br>
1768   * Type: <b>token</b><br>
1769   * Path: <b>BiologicallyDerivedProduct.productStatus</b><br>
1770   * </p>
1771   */
1772  @SearchParamDefinition(name="product-status", path="BiologicallyDerivedProduct.productStatus", description="Whether the product is currently available.", type="token" )
1773  public static final String SP_PRODUCT_STATUS = "product-status";
1774 /**
1775   * <b>Fluent Client</b> search parameter constant for <b>product-status</b>
1776   * <p>
1777   * Description: <b>Whether the product is currently available.</b><br>
1778   * Type: <b>token</b><br>
1779   * Path: <b>BiologicallyDerivedProduct.productStatus</b><br>
1780   * </p>
1781   */
1782  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRODUCT_STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRODUCT_STATUS);
1783
1784 /**
1785   * Search parameter: <b>request</b>
1786   * <p>
1787   * Description: <b>Procedure request to obtain this biologically derived product.</b><br>
1788   * Type: <b>reference</b><br>
1789   * Path: <b>BiologicallyDerivedProduct.request</b><br>
1790   * </p>
1791   */
1792  @SearchParamDefinition(name="request", path="BiologicallyDerivedProduct.request", description="Procedure request to obtain this biologically derived product.", type="reference", target={ServiceRequest.class } )
1793  public static final String SP_REQUEST = "request";
1794 /**
1795   * <b>Fluent Client</b> search parameter constant for <b>request</b>
1796   * <p>
1797   * Description: <b>Procedure request to obtain this biologically derived product.</b><br>
1798   * Type: <b>reference</b><br>
1799   * Path: <b>BiologicallyDerivedProduct.request</b><br>
1800   * </p>
1801   */
1802  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUEST = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUEST);
1803
1804/**
1805   * Constant for fluent queries to be used to add include statements. Specifies
1806   * the path value of "<b>BiologicallyDerivedProduct:request</b>".
1807   */
1808  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUEST = new ca.uhn.fhir.model.api.Include("BiologicallyDerivedProduct:request").toLocked();
1809
1810
1811}
1812