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 record of dispensation of a biologically derived product.
052 */
053@ResourceDef(name="BiologicallyDerivedProductDispense", profile="http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProductDispense")
054public class BiologicallyDerivedProductDispense extends DomainResource {
055
056    public enum BiologicallyDerivedProductDispenseCodes {
057        /**
058         * The dispense process has started but not yet completed.
059         */
060        PREPARATION, 
061        /**
062         * The dispense process is in progress.
063         */
064        INPROGRESS, 
065        /**
066         * The requested product has been allocated and is ready for transport.
067         */
068        ALLOCATED, 
069        /**
070         * The dispensed product has been picked up.
071         */
072        ISSUED, 
073        /**
074         * The dispense could not be completed.
075         */
076        UNFULFILLED, 
077        /**
078         * The dispensed product was returned.
079         */
080        RETURNED, 
081        /**
082         * The dispense was entered in error and therefore nullified.
083         */
084        ENTEREDINERROR, 
085        /**
086         * The authoring system does not know which of the status values applies for this dispense. Note: this concept is not to be used for other - one of the listed statuses is presumed to apply, it's just not known which one.
087         */
088        UNKNOWN, 
089        /**
090         * added to help the parsers with the generic types
091         */
092        NULL;
093        public static BiologicallyDerivedProductDispenseCodes fromCode(String codeString) throws FHIRException {
094            if (codeString == null || "".equals(codeString))
095                return null;
096        if ("preparation".equals(codeString))
097          return PREPARATION;
098        if ("in-progress".equals(codeString))
099          return INPROGRESS;
100        if ("allocated".equals(codeString))
101          return ALLOCATED;
102        if ("issued".equals(codeString))
103          return ISSUED;
104        if ("unfulfilled".equals(codeString))
105          return UNFULFILLED;
106        if ("returned".equals(codeString))
107          return RETURNED;
108        if ("entered-in-error".equals(codeString))
109          return ENTEREDINERROR;
110        if ("unknown".equals(codeString))
111          return UNKNOWN;
112        if (Configuration.isAcceptInvalidEnums())
113          return null;
114        else
115          throw new FHIRException("Unknown BiologicallyDerivedProductDispenseCodes code '"+codeString+"'");
116        }
117        public String toCode() {
118          switch (this) {
119            case PREPARATION: return "preparation";
120            case INPROGRESS: return "in-progress";
121            case ALLOCATED: return "allocated";
122            case ISSUED: return "issued";
123            case UNFULFILLED: return "unfulfilled";
124            case RETURNED: return "returned";
125            case ENTEREDINERROR: return "entered-in-error";
126            case UNKNOWN: return "unknown";
127            case NULL: return null;
128            default: return "?";
129          }
130        }
131        public String getSystem() {
132          switch (this) {
133            case PREPARATION: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
134            case INPROGRESS: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
135            case ALLOCATED: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
136            case ISSUED: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
137            case UNFULFILLED: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
138            case RETURNED: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
139            case ENTEREDINERROR: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
140            case UNKNOWN: return "http://hl7.org/fhir/biologicallyderivedproductdispense-status";
141            case NULL: return null;
142            default: return "?";
143          }
144        }
145        public String getDefinition() {
146          switch (this) {
147            case PREPARATION: return "The dispense process has started but not yet completed.";
148            case INPROGRESS: return "The dispense process is in progress.";
149            case ALLOCATED: return "The requested product has been allocated and is ready for transport.";
150            case ISSUED: return "The dispensed product has been picked up.";
151            case UNFULFILLED: return "The dispense could not be completed.";
152            case RETURNED: return "The dispensed product was returned.";
153            case ENTEREDINERROR: return "The dispense was entered in error and therefore nullified.";
154            case UNKNOWN: return "The authoring system does not know which of the status values applies for this dispense. Note: this concept is not to be used for other - one of the listed statuses is presumed to apply, it's just not known which one.";
155            case NULL: return null;
156            default: return "?";
157          }
158        }
159        public String getDisplay() {
160          switch (this) {
161            case PREPARATION: return "Preparation";
162            case INPROGRESS: return "In Progress";
163            case ALLOCATED: return "Allocated";
164            case ISSUED: return "Issued";
165            case UNFULFILLED: return "Unfulfilled";
166            case RETURNED: return "Returned";
167            case ENTEREDINERROR: return "Entered in Error";
168            case UNKNOWN: return "Unknown";
169            case NULL: return null;
170            default: return "?";
171          }
172        }
173    }
174
175  public static class BiologicallyDerivedProductDispenseCodesEnumFactory implements EnumFactory<BiologicallyDerivedProductDispenseCodes> {
176    public BiologicallyDerivedProductDispenseCodes fromCode(String codeString) throws IllegalArgumentException {
177      if (codeString == null || "".equals(codeString))
178            if (codeString == null || "".equals(codeString))
179                return null;
180        if ("preparation".equals(codeString))
181          return BiologicallyDerivedProductDispenseCodes.PREPARATION;
182        if ("in-progress".equals(codeString))
183          return BiologicallyDerivedProductDispenseCodes.INPROGRESS;
184        if ("allocated".equals(codeString))
185          return BiologicallyDerivedProductDispenseCodes.ALLOCATED;
186        if ("issued".equals(codeString))
187          return BiologicallyDerivedProductDispenseCodes.ISSUED;
188        if ("unfulfilled".equals(codeString))
189          return BiologicallyDerivedProductDispenseCodes.UNFULFILLED;
190        if ("returned".equals(codeString))
191          return BiologicallyDerivedProductDispenseCodes.RETURNED;
192        if ("entered-in-error".equals(codeString))
193          return BiologicallyDerivedProductDispenseCodes.ENTEREDINERROR;
194        if ("unknown".equals(codeString))
195          return BiologicallyDerivedProductDispenseCodes.UNKNOWN;
196        throw new IllegalArgumentException("Unknown BiologicallyDerivedProductDispenseCodes code '"+codeString+"'");
197        }
198        public Enumeration<BiologicallyDerivedProductDispenseCodes> fromType(PrimitiveType<?> code) throws FHIRException {
199          if (code == null)
200            return null;
201          if (code.isEmpty())
202            return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.NULL, code);
203          String codeString = ((PrimitiveType) code).asStringValue();
204          if (codeString == null || "".equals(codeString))
205            return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.NULL, code);
206        if ("preparation".equals(codeString))
207          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.PREPARATION, code);
208        if ("in-progress".equals(codeString))
209          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.INPROGRESS, code);
210        if ("allocated".equals(codeString))
211          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.ALLOCATED, code);
212        if ("issued".equals(codeString))
213          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.ISSUED, code);
214        if ("unfulfilled".equals(codeString))
215          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.UNFULFILLED, code);
216        if ("returned".equals(codeString))
217          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.RETURNED, code);
218        if ("entered-in-error".equals(codeString))
219          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.ENTEREDINERROR, code);
220        if ("unknown".equals(codeString))
221          return new Enumeration<BiologicallyDerivedProductDispenseCodes>(this, BiologicallyDerivedProductDispenseCodes.UNKNOWN, code);
222        throw new FHIRException("Unknown BiologicallyDerivedProductDispenseCodes code '"+codeString+"'");
223        }
224    public String toCode(BiologicallyDerivedProductDispenseCodes code) {
225      if (code == BiologicallyDerivedProductDispenseCodes.PREPARATION)
226        return "preparation";
227      if (code == BiologicallyDerivedProductDispenseCodes.INPROGRESS)
228        return "in-progress";
229      if (code == BiologicallyDerivedProductDispenseCodes.ALLOCATED)
230        return "allocated";
231      if (code == BiologicallyDerivedProductDispenseCodes.ISSUED)
232        return "issued";
233      if (code == BiologicallyDerivedProductDispenseCodes.UNFULFILLED)
234        return "unfulfilled";
235      if (code == BiologicallyDerivedProductDispenseCodes.RETURNED)
236        return "returned";
237      if (code == BiologicallyDerivedProductDispenseCodes.ENTEREDINERROR)
238        return "entered-in-error";
239      if (code == BiologicallyDerivedProductDispenseCodes.UNKNOWN)
240        return "unknown";
241      return "?";
242      }
243    public String toSystem(BiologicallyDerivedProductDispenseCodes code) {
244      return code.getSystem();
245      }
246    }
247
248    @Block()
249    public static class BiologicallyDerivedProductDispensePerformerComponent extends BackboneElement implements IBaseBackboneElement {
250        /**
251         * Identifies the function of the performer during the dispense.
252         */
253        @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
254        @Description(shortDefinition="Identifies the function of the performer during the dispense", formalDefinition="Identifies the function of the performer during the dispense." )
255        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-performer-function")
256        protected CodeableConcept function;
257
258        /**
259         * Identifies the person responsible for the action.
260         */
261        @Child(name = "actor", type = {Practitioner.class}, order=2, min=1, max=1, modifier=false, summary=true)
262        @Description(shortDefinition="Who performed the action", formalDefinition="Identifies the person responsible for the action." )
263        protected Reference actor;
264
265        private static final long serialVersionUID = -576943815L;
266
267    /**
268     * Constructor
269     */
270      public BiologicallyDerivedProductDispensePerformerComponent() {
271        super();
272      }
273
274    /**
275     * Constructor
276     */
277      public BiologicallyDerivedProductDispensePerformerComponent(Reference actor) {
278        super();
279        this.setActor(actor);
280      }
281
282        /**
283         * @return {@link #function} (Identifies the function of the performer during the dispense.)
284         */
285        public CodeableConcept getFunction() { 
286          if (this.function == null)
287            if (Configuration.errorOnAutoCreate())
288              throw new Error("Attempt to auto-create BiologicallyDerivedProductDispensePerformerComponent.function");
289            else if (Configuration.doAutoCreate())
290              this.function = new CodeableConcept(); // cc
291          return this.function;
292        }
293
294        public boolean hasFunction() { 
295          return this.function != null && !this.function.isEmpty();
296        }
297
298        /**
299         * @param value {@link #function} (Identifies the function of the performer during the dispense.)
300         */
301        public BiologicallyDerivedProductDispensePerformerComponent setFunction(CodeableConcept value) { 
302          this.function = value;
303          return this;
304        }
305
306        /**
307         * @return {@link #actor} (Identifies the person responsible for the action.)
308         */
309        public Reference getActor() { 
310          if (this.actor == null)
311            if (Configuration.errorOnAutoCreate())
312              throw new Error("Attempt to auto-create BiologicallyDerivedProductDispensePerformerComponent.actor");
313            else if (Configuration.doAutoCreate())
314              this.actor = new Reference(); // cc
315          return this.actor;
316        }
317
318        public boolean hasActor() { 
319          return this.actor != null && !this.actor.isEmpty();
320        }
321
322        /**
323         * @param value {@link #actor} (Identifies the person responsible for the action.)
324         */
325        public BiologicallyDerivedProductDispensePerformerComponent setActor(Reference value) { 
326          this.actor = value;
327          return this;
328        }
329
330        protected void listChildren(List<Property> children) {
331          super.listChildren(children);
332          children.add(new Property("function", "CodeableConcept", "Identifies the function of the performer during the dispense.", 0, 1, function));
333          children.add(new Property("actor", "Reference(Practitioner)", "Identifies the person responsible for the action.", 0, 1, actor));
334        }
335
336        @Override
337        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
338          switch (_hash) {
339          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Identifies the function of the performer during the dispense.", 0, 1, function);
340          case 92645877: /*actor*/  return new Property("actor", "Reference(Practitioner)", "Identifies the person responsible for the action.", 0, 1, actor);
341          default: return super.getNamedProperty(_hash, _name, _checkValid);
342          }
343
344        }
345
346      @Override
347      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
348        switch (hash) {
349        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
350        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference
351        default: return super.getProperty(hash, name, checkValid);
352        }
353
354      }
355
356      @Override
357      public Base setProperty(int hash, String name, Base value) throws FHIRException {
358        switch (hash) {
359        case 1380938712: // function
360          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
361          return value;
362        case 92645877: // actor
363          this.actor = TypeConvertor.castToReference(value); // Reference
364          return value;
365        default: return super.setProperty(hash, name, value);
366        }
367
368      }
369
370      @Override
371      public Base setProperty(String name, Base value) throws FHIRException {
372        if (name.equals("function")) {
373          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
374        } else if (name.equals("actor")) {
375          this.actor = TypeConvertor.castToReference(value); // Reference
376        } else
377          return super.setProperty(name, value);
378        return value;
379      }
380
381  @Override
382  public void removeChild(String name, Base value) throws FHIRException {
383        if (name.equals("function")) {
384          this.function = null;
385        } else if (name.equals("actor")) {
386          this.actor = null;
387        } else
388          super.removeChild(name, value);
389        
390      }
391
392      @Override
393      public Base makeProperty(int hash, String name) throws FHIRException {
394        switch (hash) {
395        case 1380938712:  return getFunction();
396        case 92645877:  return getActor();
397        default: return super.makeProperty(hash, name);
398        }
399
400      }
401
402      @Override
403      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
404        switch (hash) {
405        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
406        case 92645877: /*actor*/ return new String[] {"Reference"};
407        default: return super.getTypesForProperty(hash, name);
408        }
409
410      }
411
412      @Override
413      public Base addChild(String name) throws FHIRException {
414        if (name.equals("function")) {
415          this.function = new CodeableConcept();
416          return this.function;
417        }
418        else if (name.equals("actor")) {
419          this.actor = new Reference();
420          return this.actor;
421        }
422        else
423          return super.addChild(name);
424      }
425
426      public BiologicallyDerivedProductDispensePerformerComponent copy() {
427        BiologicallyDerivedProductDispensePerformerComponent dst = new BiologicallyDerivedProductDispensePerformerComponent();
428        copyValues(dst);
429        return dst;
430      }
431
432      public void copyValues(BiologicallyDerivedProductDispensePerformerComponent dst) {
433        super.copyValues(dst);
434        dst.function = function == null ? null : function.copy();
435        dst.actor = actor == null ? null : actor.copy();
436      }
437
438      @Override
439      public boolean equalsDeep(Base other_) {
440        if (!super.equalsDeep(other_))
441          return false;
442        if (!(other_ instanceof BiologicallyDerivedProductDispensePerformerComponent))
443          return false;
444        BiologicallyDerivedProductDispensePerformerComponent o = (BiologicallyDerivedProductDispensePerformerComponent) other_;
445        return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true);
446      }
447
448      @Override
449      public boolean equalsShallow(Base other_) {
450        if (!super.equalsShallow(other_))
451          return false;
452        if (!(other_ instanceof BiologicallyDerivedProductDispensePerformerComponent))
453          return false;
454        BiologicallyDerivedProductDispensePerformerComponent o = (BiologicallyDerivedProductDispensePerformerComponent) other_;
455        return true;
456      }
457
458      public boolean isEmpty() {
459        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor);
460      }
461
462  public String fhirType() {
463    return "BiologicallyDerivedProductDispense.performer";
464
465  }
466
467  }
468
469    /**
470     * Unique instance identifiers assigned to a biologically derived product dispense. Note: This is a business identifier, not a resource identifier.
471     */
472    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
473    @Description(shortDefinition="Business identifier for this dispense", formalDefinition="Unique instance identifiers assigned to a biologically derived product dispense. Note: This is a business identifier, not a resource identifier." )
474    protected List<Identifier> identifier;
475
476    /**
477     * The order or request that the dispense is fulfilling. This is a reference to a ServiceRequest resource.
478     */
479    @Child(name = "basedOn", type = {ServiceRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
480    @Description(shortDefinition="The order or request that this dispense is fulfilling", formalDefinition="The order or request that the dispense is fulfilling. This is a reference to a ServiceRequest resource." )
481    protected List<Reference> basedOn;
482
483    /**
484     * A larger event of which this particular event is a component.
485     */
486    @Child(name = "partOf", type = {BiologicallyDerivedProductDispense.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
487    @Description(shortDefinition="Short description", formalDefinition="A larger event of which this particular event is a component." )
488    protected List<Reference> partOf;
489
490    /**
491     * A code specifying the state of the dispense event.
492     */
493    @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
494    @Description(shortDefinition="preparation | in-progress | allocated | issued | unfulfilled | returned | entered-in-error | unknown", formalDefinition="A code specifying the state of the dispense event." )
495    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-status")
496    protected Enumeration<BiologicallyDerivedProductDispenseCodes> status;
497
498    /**
499     * Indicates the relationship between the donor of the biologically derived product and the intended recipient.
500     */
501    @Child(name = "originRelationshipType", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true)
502    @Description(shortDefinition="Relationship between the donor and intended recipient", formalDefinition="Indicates the relationship between the donor of the biologically derived product and the intended recipient." )
503    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-origin-relationship")
504    protected CodeableConcept originRelationshipType;
505
506    /**
507     * A link to a resource identifying the biologically derived product that is being dispensed.
508     */
509    @Child(name = "product", type = {BiologicallyDerivedProduct.class}, order=5, min=1, max=1, modifier=false, summary=true)
510    @Description(shortDefinition="The BiologicallyDerivedProduct that is dispensed", formalDefinition="A link to a resource identifying the biologically derived product that is being dispensed." )
511    protected Reference product;
512
513    /**
514     * A link to a resource representing the patient that the product is dispensed for.
515     */
516    @Child(name = "patient", type = {Patient.class}, order=6, min=1, max=1, modifier=false, summary=true)
517    @Description(shortDefinition="The intended recipient of the dispensed product", formalDefinition="A link to a resource representing the patient that the product is dispensed for." )
518    protected Reference patient;
519
520    /**
521     * Indicates the type of matching associated with the dispense.
522     */
523    @Child(name = "matchStatus", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true)
524    @Description(shortDefinition="Indicates the type of matching associated with the dispense", formalDefinition="Indicates the type of matching associated with the dispense." )
525    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-match-status")
526    protected CodeableConcept matchStatus;
527
528    /**
529     * Indicates who or what performed an action.
530     */
531    @Child(name = "performer", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
532    @Description(shortDefinition="Indicates who or what performed an action", formalDefinition="Indicates who or what performed an action." )
533    protected List<BiologicallyDerivedProductDispensePerformerComponent> performer;
534
535    /**
536     * The physical location where the dispense was performed.
537     */
538    @Child(name = "location", type = {Location.class}, order=9, min=0, max=1, modifier=false, summary=true)
539    @Description(shortDefinition="Where the dispense occurred", formalDefinition="The physical location where the dispense was performed." )
540    protected Reference location;
541
542    /**
543     * The amount of product in the dispense. Quantity will depend on the product being dispensed. Examples are: volume; cell count; concentration.
544     */
545    @Child(name = "quantity", type = {Quantity.class}, order=10, min=0, max=1, modifier=false, summary=true)
546    @Description(shortDefinition="Amount dispensed", formalDefinition="The amount of product in the dispense. Quantity will depend on the product being dispensed. Examples are: volume; cell count; concentration." )
547    protected Quantity quantity;
548
549    /**
550     * When the product was selected/ matched.
551     */
552    @Child(name = "preparedDate", type = {DateTimeType.class}, order=11, min=0, max=1, modifier=false, summary=true)
553    @Description(shortDefinition="When product was selected/matched", formalDefinition="When the product was selected/ matched." )
554    protected DateTimeType preparedDate;
555
556    /**
557     * When the product was dispatched for clinical use.
558     */
559    @Child(name = "whenHandedOver", type = {DateTimeType.class}, order=12, min=0, max=1, modifier=false, summary=true)
560    @Description(shortDefinition="When the product was dispatched", formalDefinition="When the product was dispatched for clinical use." )
561    protected DateTimeType whenHandedOver;
562
563    /**
564     * Link to a resource identifying the physical location that the product was dispatched to.
565     */
566    @Child(name = "destination", type = {Location.class}, order=13, min=0, max=1, modifier=false, summary=true)
567    @Description(shortDefinition="Where the product was dispatched to", formalDefinition="Link to a resource identifying the physical location that the product was dispatched to." )
568    protected Reference destination;
569
570    /**
571     * Additional notes.
572     */
573    @Child(name = "note", type = {Annotation.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
574    @Description(shortDefinition="Additional notes", formalDefinition="Additional notes." )
575    protected List<Annotation> note;
576
577    /**
578     * Specific instructions for use.
579     */
580    @Child(name = "usageInstruction", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=true)
581    @Description(shortDefinition="Specific instructions for use", formalDefinition="Specific instructions for use." )
582    protected StringType usageInstruction;
583
584    private static final long serialVersionUID = -109945994L;
585
586  /**
587   * Constructor
588   */
589    public BiologicallyDerivedProductDispense() {
590      super();
591    }
592
593  /**
594   * Constructor
595   */
596    public BiologicallyDerivedProductDispense(BiologicallyDerivedProductDispenseCodes status, Reference product, Reference patient) {
597      super();
598      this.setStatus(status);
599      this.setProduct(product);
600      this.setPatient(patient);
601    }
602
603    /**
604     * @return {@link #identifier} (Unique instance identifiers assigned to a biologically derived product dispense. Note: This is a business identifier, not a resource identifier.)
605     */
606    public List<Identifier> getIdentifier() { 
607      if (this.identifier == null)
608        this.identifier = new ArrayList<Identifier>();
609      return this.identifier;
610    }
611
612    /**
613     * @return Returns a reference to <code>this</code> for easy method chaining
614     */
615    public BiologicallyDerivedProductDispense setIdentifier(List<Identifier> theIdentifier) { 
616      this.identifier = theIdentifier;
617      return this;
618    }
619
620    public boolean hasIdentifier() { 
621      if (this.identifier == null)
622        return false;
623      for (Identifier item : this.identifier)
624        if (!item.isEmpty())
625          return true;
626      return false;
627    }
628
629    public Identifier addIdentifier() { //3
630      Identifier t = new Identifier();
631      if (this.identifier == null)
632        this.identifier = new ArrayList<Identifier>();
633      this.identifier.add(t);
634      return t;
635    }
636
637    public BiologicallyDerivedProductDispense addIdentifier(Identifier t) { //3
638      if (t == null)
639        return this;
640      if (this.identifier == null)
641        this.identifier = new ArrayList<Identifier>();
642      this.identifier.add(t);
643      return this;
644    }
645
646    /**
647     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
648     */
649    public Identifier getIdentifierFirstRep() { 
650      if (getIdentifier().isEmpty()) {
651        addIdentifier();
652      }
653      return getIdentifier().get(0);
654    }
655
656    /**
657     * @return {@link #basedOn} (The order or request that the dispense is fulfilling. This is a reference to a ServiceRequest resource.)
658     */
659    public List<Reference> getBasedOn() { 
660      if (this.basedOn == null)
661        this.basedOn = new ArrayList<Reference>();
662      return this.basedOn;
663    }
664
665    /**
666     * @return Returns a reference to <code>this</code> for easy method chaining
667     */
668    public BiologicallyDerivedProductDispense setBasedOn(List<Reference> theBasedOn) { 
669      this.basedOn = theBasedOn;
670      return this;
671    }
672
673    public boolean hasBasedOn() { 
674      if (this.basedOn == null)
675        return false;
676      for (Reference item : this.basedOn)
677        if (!item.isEmpty())
678          return true;
679      return false;
680    }
681
682    public Reference addBasedOn() { //3
683      Reference t = new Reference();
684      if (this.basedOn == null)
685        this.basedOn = new ArrayList<Reference>();
686      this.basedOn.add(t);
687      return t;
688    }
689
690    public BiologicallyDerivedProductDispense addBasedOn(Reference t) { //3
691      if (t == null)
692        return this;
693      if (this.basedOn == null)
694        this.basedOn = new ArrayList<Reference>();
695      this.basedOn.add(t);
696      return this;
697    }
698
699    /**
700     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
701     */
702    public Reference getBasedOnFirstRep() { 
703      if (getBasedOn().isEmpty()) {
704        addBasedOn();
705      }
706      return getBasedOn().get(0);
707    }
708
709    /**
710     * @return {@link #partOf} (A larger event of which this particular event is a component.)
711     */
712    public List<Reference> getPartOf() { 
713      if (this.partOf == null)
714        this.partOf = new ArrayList<Reference>();
715      return this.partOf;
716    }
717
718    /**
719     * @return Returns a reference to <code>this</code> for easy method chaining
720     */
721    public BiologicallyDerivedProductDispense setPartOf(List<Reference> thePartOf) { 
722      this.partOf = thePartOf;
723      return this;
724    }
725
726    public boolean hasPartOf() { 
727      if (this.partOf == null)
728        return false;
729      for (Reference item : this.partOf)
730        if (!item.isEmpty())
731          return true;
732      return false;
733    }
734
735    public Reference addPartOf() { //3
736      Reference t = new Reference();
737      if (this.partOf == null)
738        this.partOf = new ArrayList<Reference>();
739      this.partOf.add(t);
740      return t;
741    }
742
743    public BiologicallyDerivedProductDispense addPartOf(Reference t) { //3
744      if (t == null)
745        return this;
746      if (this.partOf == null)
747        this.partOf = new ArrayList<Reference>();
748      this.partOf.add(t);
749      return this;
750    }
751
752    /**
753     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
754     */
755    public Reference getPartOfFirstRep() { 
756      if (getPartOf().isEmpty()) {
757        addPartOf();
758      }
759      return getPartOf().get(0);
760    }
761
762    /**
763     * @return {@link #status} (A code specifying the state of the dispense event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
764     */
765    public Enumeration<BiologicallyDerivedProductDispenseCodes> getStatusElement() { 
766      if (this.status == null)
767        if (Configuration.errorOnAutoCreate())
768          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.status");
769        else if (Configuration.doAutoCreate())
770          this.status = new Enumeration<BiologicallyDerivedProductDispenseCodes>(new BiologicallyDerivedProductDispenseCodesEnumFactory()); // bb
771      return this.status;
772    }
773
774    public boolean hasStatusElement() { 
775      return this.status != null && !this.status.isEmpty();
776    }
777
778    public boolean hasStatus() { 
779      return this.status != null && !this.status.isEmpty();
780    }
781
782    /**
783     * @param value {@link #status} (A code specifying the state of the dispense event.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
784     */
785    public BiologicallyDerivedProductDispense setStatusElement(Enumeration<BiologicallyDerivedProductDispenseCodes> value) { 
786      this.status = value;
787      return this;
788    }
789
790    /**
791     * @return A code specifying the state of the dispense event.
792     */
793    public BiologicallyDerivedProductDispenseCodes getStatus() { 
794      return this.status == null ? null : this.status.getValue();
795    }
796
797    /**
798     * @param value A code specifying the state of the dispense event.
799     */
800    public BiologicallyDerivedProductDispense setStatus(BiologicallyDerivedProductDispenseCodes value) { 
801        if (this.status == null)
802          this.status = new Enumeration<BiologicallyDerivedProductDispenseCodes>(new BiologicallyDerivedProductDispenseCodesEnumFactory());
803        this.status.setValue(value);
804      return this;
805    }
806
807    /**
808     * @return {@link #originRelationshipType} (Indicates the relationship between the donor of the biologically derived product and the intended recipient.)
809     */
810    public CodeableConcept getOriginRelationshipType() { 
811      if (this.originRelationshipType == null)
812        if (Configuration.errorOnAutoCreate())
813          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.originRelationshipType");
814        else if (Configuration.doAutoCreate())
815          this.originRelationshipType = new CodeableConcept(); // cc
816      return this.originRelationshipType;
817    }
818
819    public boolean hasOriginRelationshipType() { 
820      return this.originRelationshipType != null && !this.originRelationshipType.isEmpty();
821    }
822
823    /**
824     * @param value {@link #originRelationshipType} (Indicates the relationship between the donor of the biologically derived product and the intended recipient.)
825     */
826    public BiologicallyDerivedProductDispense setOriginRelationshipType(CodeableConcept value) { 
827      this.originRelationshipType = value;
828      return this;
829    }
830
831    /**
832     * @return {@link #product} (A link to a resource identifying the biologically derived product that is being dispensed.)
833     */
834    public Reference getProduct() { 
835      if (this.product == null)
836        if (Configuration.errorOnAutoCreate())
837          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.product");
838        else if (Configuration.doAutoCreate())
839          this.product = new Reference(); // cc
840      return this.product;
841    }
842
843    public boolean hasProduct() { 
844      return this.product != null && !this.product.isEmpty();
845    }
846
847    /**
848     * @param value {@link #product} (A link to a resource identifying the biologically derived product that is being dispensed.)
849     */
850    public BiologicallyDerivedProductDispense setProduct(Reference value) { 
851      this.product = value;
852      return this;
853    }
854
855    /**
856     * @return {@link #patient} (A link to a resource representing the patient that the product is dispensed for.)
857     */
858    public Reference getPatient() { 
859      if (this.patient == null)
860        if (Configuration.errorOnAutoCreate())
861          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.patient");
862        else if (Configuration.doAutoCreate())
863          this.patient = new Reference(); // cc
864      return this.patient;
865    }
866
867    public boolean hasPatient() { 
868      return this.patient != null && !this.patient.isEmpty();
869    }
870
871    /**
872     * @param value {@link #patient} (A link to a resource representing the patient that the product is dispensed for.)
873     */
874    public BiologicallyDerivedProductDispense setPatient(Reference value) { 
875      this.patient = value;
876      return this;
877    }
878
879    /**
880     * @return {@link #matchStatus} (Indicates the type of matching associated with the dispense.)
881     */
882    public CodeableConcept getMatchStatus() { 
883      if (this.matchStatus == null)
884        if (Configuration.errorOnAutoCreate())
885          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.matchStatus");
886        else if (Configuration.doAutoCreate())
887          this.matchStatus = new CodeableConcept(); // cc
888      return this.matchStatus;
889    }
890
891    public boolean hasMatchStatus() { 
892      return this.matchStatus != null && !this.matchStatus.isEmpty();
893    }
894
895    /**
896     * @param value {@link #matchStatus} (Indicates the type of matching associated with the dispense.)
897     */
898    public BiologicallyDerivedProductDispense setMatchStatus(CodeableConcept value) { 
899      this.matchStatus = value;
900      return this;
901    }
902
903    /**
904     * @return {@link #performer} (Indicates who or what performed an action.)
905     */
906    public List<BiologicallyDerivedProductDispensePerformerComponent> getPerformer() { 
907      if (this.performer == null)
908        this.performer = new ArrayList<BiologicallyDerivedProductDispensePerformerComponent>();
909      return this.performer;
910    }
911
912    /**
913     * @return Returns a reference to <code>this</code> for easy method chaining
914     */
915    public BiologicallyDerivedProductDispense setPerformer(List<BiologicallyDerivedProductDispensePerformerComponent> thePerformer) { 
916      this.performer = thePerformer;
917      return this;
918    }
919
920    public boolean hasPerformer() { 
921      if (this.performer == null)
922        return false;
923      for (BiologicallyDerivedProductDispensePerformerComponent item : this.performer)
924        if (!item.isEmpty())
925          return true;
926      return false;
927    }
928
929    public BiologicallyDerivedProductDispensePerformerComponent addPerformer() { //3
930      BiologicallyDerivedProductDispensePerformerComponent t = new BiologicallyDerivedProductDispensePerformerComponent();
931      if (this.performer == null)
932        this.performer = new ArrayList<BiologicallyDerivedProductDispensePerformerComponent>();
933      this.performer.add(t);
934      return t;
935    }
936
937    public BiologicallyDerivedProductDispense addPerformer(BiologicallyDerivedProductDispensePerformerComponent t) { //3
938      if (t == null)
939        return this;
940      if (this.performer == null)
941        this.performer = new ArrayList<BiologicallyDerivedProductDispensePerformerComponent>();
942      this.performer.add(t);
943      return this;
944    }
945
946    /**
947     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
948     */
949    public BiologicallyDerivedProductDispensePerformerComponent getPerformerFirstRep() { 
950      if (getPerformer().isEmpty()) {
951        addPerformer();
952      }
953      return getPerformer().get(0);
954    }
955
956    /**
957     * @return {@link #location} (The physical location where the dispense was performed.)
958     */
959    public Reference getLocation() { 
960      if (this.location == null)
961        if (Configuration.errorOnAutoCreate())
962          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.location");
963        else if (Configuration.doAutoCreate())
964          this.location = new Reference(); // cc
965      return this.location;
966    }
967
968    public boolean hasLocation() { 
969      return this.location != null && !this.location.isEmpty();
970    }
971
972    /**
973     * @param value {@link #location} (The physical location where the dispense was performed.)
974     */
975    public BiologicallyDerivedProductDispense setLocation(Reference value) { 
976      this.location = value;
977      return this;
978    }
979
980    /**
981     * @return {@link #quantity} (The amount of product in the dispense. Quantity will depend on the product being dispensed. Examples are: volume; cell count; concentration.)
982     */
983    public Quantity getQuantity() { 
984      if (this.quantity == null)
985        if (Configuration.errorOnAutoCreate())
986          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.quantity");
987        else if (Configuration.doAutoCreate())
988          this.quantity = new Quantity(); // cc
989      return this.quantity;
990    }
991
992    public boolean hasQuantity() { 
993      return this.quantity != null && !this.quantity.isEmpty();
994    }
995
996    /**
997     * @param value {@link #quantity} (The amount of product in the dispense. Quantity will depend on the product being dispensed. Examples are: volume; cell count; concentration.)
998     */
999    public BiologicallyDerivedProductDispense setQuantity(Quantity value) { 
1000      this.quantity = value;
1001      return this;
1002    }
1003
1004    /**
1005     * @return {@link #preparedDate} (When the product was selected/ matched.). This is the underlying object with id, value and extensions. The accessor "getPreparedDate" gives direct access to the value
1006     */
1007    public DateTimeType getPreparedDateElement() { 
1008      if (this.preparedDate == null)
1009        if (Configuration.errorOnAutoCreate())
1010          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.preparedDate");
1011        else if (Configuration.doAutoCreate())
1012          this.preparedDate = new DateTimeType(); // bb
1013      return this.preparedDate;
1014    }
1015
1016    public boolean hasPreparedDateElement() { 
1017      return this.preparedDate != null && !this.preparedDate.isEmpty();
1018    }
1019
1020    public boolean hasPreparedDate() { 
1021      return this.preparedDate != null && !this.preparedDate.isEmpty();
1022    }
1023
1024    /**
1025     * @param value {@link #preparedDate} (When the product was selected/ matched.). This is the underlying object with id, value and extensions. The accessor "getPreparedDate" gives direct access to the value
1026     */
1027    public BiologicallyDerivedProductDispense setPreparedDateElement(DateTimeType value) { 
1028      this.preparedDate = value;
1029      return this;
1030    }
1031
1032    /**
1033     * @return When the product was selected/ matched.
1034     */
1035    public Date getPreparedDate() { 
1036      return this.preparedDate == null ? null : this.preparedDate.getValue();
1037    }
1038
1039    /**
1040     * @param value When the product was selected/ matched.
1041     */
1042    public BiologicallyDerivedProductDispense setPreparedDate(Date value) { 
1043      if (value == null)
1044        this.preparedDate = null;
1045      else {
1046        if (this.preparedDate == null)
1047          this.preparedDate = new DateTimeType();
1048        this.preparedDate.setValue(value);
1049      }
1050      return this;
1051    }
1052
1053    /**
1054     * @return {@link #whenHandedOver} (When the product was dispatched for clinical use.). This is the underlying object with id, value and extensions. The accessor "getWhenHandedOver" gives direct access to the value
1055     */
1056    public DateTimeType getWhenHandedOverElement() { 
1057      if (this.whenHandedOver == null)
1058        if (Configuration.errorOnAutoCreate())
1059          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.whenHandedOver");
1060        else if (Configuration.doAutoCreate())
1061          this.whenHandedOver = new DateTimeType(); // bb
1062      return this.whenHandedOver;
1063    }
1064
1065    public boolean hasWhenHandedOverElement() { 
1066      return this.whenHandedOver != null && !this.whenHandedOver.isEmpty();
1067    }
1068
1069    public boolean hasWhenHandedOver() { 
1070      return this.whenHandedOver != null && !this.whenHandedOver.isEmpty();
1071    }
1072
1073    /**
1074     * @param value {@link #whenHandedOver} (When the product was dispatched for clinical use.). This is the underlying object with id, value and extensions. The accessor "getWhenHandedOver" gives direct access to the value
1075     */
1076    public BiologicallyDerivedProductDispense setWhenHandedOverElement(DateTimeType value) { 
1077      this.whenHandedOver = value;
1078      return this;
1079    }
1080
1081    /**
1082     * @return When the product was dispatched for clinical use.
1083     */
1084    public Date getWhenHandedOver() { 
1085      return this.whenHandedOver == null ? null : this.whenHandedOver.getValue();
1086    }
1087
1088    /**
1089     * @param value When the product was dispatched for clinical use.
1090     */
1091    public BiologicallyDerivedProductDispense setWhenHandedOver(Date value) { 
1092      if (value == null)
1093        this.whenHandedOver = null;
1094      else {
1095        if (this.whenHandedOver == null)
1096          this.whenHandedOver = new DateTimeType();
1097        this.whenHandedOver.setValue(value);
1098      }
1099      return this;
1100    }
1101
1102    /**
1103     * @return {@link #destination} (Link to a resource identifying the physical location that the product was dispatched to.)
1104     */
1105    public Reference getDestination() { 
1106      if (this.destination == null)
1107        if (Configuration.errorOnAutoCreate())
1108          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.destination");
1109        else if (Configuration.doAutoCreate())
1110          this.destination = new Reference(); // cc
1111      return this.destination;
1112    }
1113
1114    public boolean hasDestination() { 
1115      return this.destination != null && !this.destination.isEmpty();
1116    }
1117
1118    /**
1119     * @param value {@link #destination} (Link to a resource identifying the physical location that the product was dispatched to.)
1120     */
1121    public BiologicallyDerivedProductDispense setDestination(Reference value) { 
1122      this.destination = value;
1123      return this;
1124    }
1125
1126    /**
1127     * @return {@link #note} (Additional notes.)
1128     */
1129    public List<Annotation> getNote() { 
1130      if (this.note == null)
1131        this.note = new ArrayList<Annotation>();
1132      return this.note;
1133    }
1134
1135    /**
1136     * @return Returns a reference to <code>this</code> for easy method chaining
1137     */
1138    public BiologicallyDerivedProductDispense setNote(List<Annotation> theNote) { 
1139      this.note = theNote;
1140      return this;
1141    }
1142
1143    public boolean hasNote() { 
1144      if (this.note == null)
1145        return false;
1146      for (Annotation item : this.note)
1147        if (!item.isEmpty())
1148          return true;
1149      return false;
1150    }
1151
1152    public Annotation addNote() { //3
1153      Annotation t = new Annotation();
1154      if (this.note == null)
1155        this.note = new ArrayList<Annotation>();
1156      this.note.add(t);
1157      return t;
1158    }
1159
1160    public BiologicallyDerivedProductDispense addNote(Annotation t) { //3
1161      if (t == null)
1162        return this;
1163      if (this.note == null)
1164        this.note = new ArrayList<Annotation>();
1165      this.note.add(t);
1166      return this;
1167    }
1168
1169    /**
1170     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1171     */
1172    public Annotation getNoteFirstRep() { 
1173      if (getNote().isEmpty()) {
1174        addNote();
1175      }
1176      return getNote().get(0);
1177    }
1178
1179    /**
1180     * @return {@link #usageInstruction} (Specific instructions for use.). This is the underlying object with id, value and extensions. The accessor "getUsageInstruction" gives direct access to the value
1181     */
1182    public StringType getUsageInstructionElement() { 
1183      if (this.usageInstruction == null)
1184        if (Configuration.errorOnAutoCreate())
1185          throw new Error("Attempt to auto-create BiologicallyDerivedProductDispense.usageInstruction");
1186        else if (Configuration.doAutoCreate())
1187          this.usageInstruction = new StringType(); // bb
1188      return this.usageInstruction;
1189    }
1190
1191    public boolean hasUsageInstructionElement() { 
1192      return this.usageInstruction != null && !this.usageInstruction.isEmpty();
1193    }
1194
1195    public boolean hasUsageInstruction() { 
1196      return this.usageInstruction != null && !this.usageInstruction.isEmpty();
1197    }
1198
1199    /**
1200     * @param value {@link #usageInstruction} (Specific instructions for use.). This is the underlying object with id, value and extensions. The accessor "getUsageInstruction" gives direct access to the value
1201     */
1202    public BiologicallyDerivedProductDispense setUsageInstructionElement(StringType value) { 
1203      this.usageInstruction = value;
1204      return this;
1205    }
1206
1207    /**
1208     * @return Specific instructions for use.
1209     */
1210    public String getUsageInstruction() { 
1211      return this.usageInstruction == null ? null : this.usageInstruction.getValue();
1212    }
1213
1214    /**
1215     * @param value Specific instructions for use.
1216     */
1217    public BiologicallyDerivedProductDispense setUsageInstruction(String value) { 
1218      if (Utilities.noString(value))
1219        this.usageInstruction = null;
1220      else {
1221        if (this.usageInstruction == null)
1222          this.usageInstruction = new StringType();
1223        this.usageInstruction.setValue(value);
1224      }
1225      return this;
1226    }
1227
1228      protected void listChildren(List<Property> children) {
1229        super.listChildren(children);
1230        children.add(new Property("identifier", "Identifier", "Unique instance identifiers assigned to a biologically derived product dispense. Note: This is a business identifier, not a resource identifier.", 0, java.lang.Integer.MAX_VALUE, identifier));
1231        children.add(new Property("basedOn", "Reference(ServiceRequest)", "The order or request that the dispense is fulfilling. This is a reference to a ServiceRequest resource.", 0, java.lang.Integer.MAX_VALUE, basedOn));
1232        children.add(new Property("partOf", "Reference(BiologicallyDerivedProductDispense)", "A larger event of which this particular event is a component.", 0, java.lang.Integer.MAX_VALUE, partOf));
1233        children.add(new Property("status", "code", "A code specifying the state of the dispense event.", 0, 1, status));
1234        children.add(new Property("originRelationshipType", "CodeableConcept", "Indicates the relationship between the donor of the biologically derived product and the intended recipient.", 0, 1, originRelationshipType));
1235        children.add(new Property("product", "Reference(BiologicallyDerivedProduct)", "A link to a resource identifying the biologically derived product that is being dispensed.", 0, 1, product));
1236        children.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the patient that the product is dispensed for.", 0, 1, patient));
1237        children.add(new Property("matchStatus", "CodeableConcept", "Indicates the type of matching associated with the dispense.", 0, 1, matchStatus));
1238        children.add(new Property("performer", "", "Indicates who or what performed an action.", 0, java.lang.Integer.MAX_VALUE, performer));
1239        children.add(new Property("location", "Reference(Location)", "The physical location where the dispense was performed.", 0, 1, location));
1240        children.add(new Property("quantity", "Quantity", "The amount of product in the dispense. Quantity will depend on the product being dispensed. Examples are: volume; cell count; concentration.", 0, 1, quantity));
1241        children.add(new Property("preparedDate", "dateTime", "When the product was selected/ matched.", 0, 1, preparedDate));
1242        children.add(new Property("whenHandedOver", "dateTime", "When the product was dispatched for clinical use.", 0, 1, whenHandedOver));
1243        children.add(new Property("destination", "Reference(Location)", "Link to a resource identifying the physical location that the product was dispatched to.", 0, 1, destination));
1244        children.add(new Property("note", "Annotation", "Additional notes.", 0, java.lang.Integer.MAX_VALUE, note));
1245        children.add(new Property("usageInstruction", "string", "Specific instructions for use.", 0, 1, usageInstruction));
1246      }
1247
1248      @Override
1249      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1250        switch (_hash) {
1251        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Unique instance identifiers assigned to a biologically derived product dispense. Note: This is a business identifier, not a resource identifier.", 0, java.lang.Integer.MAX_VALUE, identifier);
1252        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(ServiceRequest)", "The order or request that the dispense is fulfilling. This is a reference to a ServiceRequest resource.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1253        case -995410646: /*partOf*/  return new Property("partOf", "Reference(BiologicallyDerivedProductDispense)", "A larger event of which this particular event is a component.", 0, java.lang.Integer.MAX_VALUE, partOf);
1254        case -892481550: /*status*/  return new Property("status", "code", "A code specifying the state of the dispense event.", 0, 1, status);
1255        case 1746240728: /*originRelationshipType*/  return new Property("originRelationshipType", "CodeableConcept", "Indicates the relationship between the donor of the biologically derived product and the intended recipient.", 0, 1, originRelationshipType);
1256        case -309474065: /*product*/  return new Property("product", "Reference(BiologicallyDerivedProduct)", "A link to a resource identifying the biologically derived product that is being dispensed.", 0, 1, product);
1257        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "A link to a resource representing the patient that the product is dispensed for.", 0, 1, patient);
1258        case 1644523031: /*matchStatus*/  return new Property("matchStatus", "CodeableConcept", "Indicates the type of matching associated with the dispense.", 0, 1, matchStatus);
1259        case 481140686: /*performer*/  return new Property("performer", "", "Indicates who or what performed an action.", 0, java.lang.Integer.MAX_VALUE, performer);
1260        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "The physical location where the dispense was performed.", 0, 1, location);
1261        case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "The amount of product in the dispense. Quantity will depend on the product being dispensed. Examples are: volume; cell count; concentration.", 0, 1, quantity);
1262        case -2024959605: /*preparedDate*/  return new Property("preparedDate", "dateTime", "When the product was selected/ matched.", 0, 1, preparedDate);
1263        case -940241380: /*whenHandedOver*/  return new Property("whenHandedOver", "dateTime", "When the product was dispatched for clinical use.", 0, 1, whenHandedOver);
1264        case -1429847026: /*destination*/  return new Property("destination", "Reference(Location)", "Link to a resource identifying the physical location that the product was dispatched to.", 0, 1, destination);
1265        case 3387378: /*note*/  return new Property("note", "Annotation", "Additional notes.", 0, java.lang.Integer.MAX_VALUE, note);
1266        case 2138372141: /*usageInstruction*/  return new Property("usageInstruction", "string", "Specific instructions for use.", 0, 1, usageInstruction);
1267        default: return super.getNamedProperty(_hash, _name, _checkValid);
1268        }
1269
1270      }
1271
1272      @Override
1273      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1274        switch (hash) {
1275        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1276        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1277        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
1278        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<BiologicallyDerivedProductDispenseCodes>
1279        case 1746240728: /*originRelationshipType*/ return this.originRelationshipType == null ? new Base[0] : new Base[] {this.originRelationshipType}; // CodeableConcept
1280        case -309474065: /*product*/ return this.product == null ? new Base[0] : new Base[] {this.product}; // Reference
1281        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
1282        case 1644523031: /*matchStatus*/ return this.matchStatus == null ? new Base[0] : new Base[] {this.matchStatus}; // CodeableConcept
1283        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // BiologicallyDerivedProductDispensePerformerComponent
1284        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
1285        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
1286        case -2024959605: /*preparedDate*/ return this.preparedDate == null ? new Base[0] : new Base[] {this.preparedDate}; // DateTimeType
1287        case -940241380: /*whenHandedOver*/ return this.whenHandedOver == null ? new Base[0] : new Base[] {this.whenHandedOver}; // DateTimeType
1288        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // Reference
1289        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1290        case 2138372141: /*usageInstruction*/ return this.usageInstruction == null ? new Base[0] : new Base[] {this.usageInstruction}; // StringType
1291        default: return super.getProperty(hash, name, checkValid);
1292        }
1293
1294      }
1295
1296      @Override
1297      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1298        switch (hash) {
1299        case -1618432855: // identifier
1300          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1301          return value;
1302        case -332612366: // basedOn
1303          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1304          return value;
1305        case -995410646: // partOf
1306          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
1307          return value;
1308        case -892481550: // status
1309          value = new BiologicallyDerivedProductDispenseCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
1310          this.status = (Enumeration) value; // Enumeration<BiologicallyDerivedProductDispenseCodes>
1311          return value;
1312        case 1746240728: // originRelationshipType
1313          this.originRelationshipType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1314          return value;
1315        case -309474065: // product
1316          this.product = TypeConvertor.castToReference(value); // Reference
1317          return value;
1318        case -791418107: // patient
1319          this.patient = TypeConvertor.castToReference(value); // Reference
1320          return value;
1321        case 1644523031: // matchStatus
1322          this.matchStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1323          return value;
1324        case 481140686: // performer
1325          this.getPerformer().add((BiologicallyDerivedProductDispensePerformerComponent) value); // BiologicallyDerivedProductDispensePerformerComponent
1326          return value;
1327        case 1901043637: // location
1328          this.location = TypeConvertor.castToReference(value); // Reference
1329          return value;
1330        case -1285004149: // quantity
1331          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1332          return value;
1333        case -2024959605: // preparedDate
1334          this.preparedDate = TypeConvertor.castToDateTime(value); // DateTimeType
1335          return value;
1336        case -940241380: // whenHandedOver
1337          this.whenHandedOver = TypeConvertor.castToDateTime(value); // DateTimeType
1338          return value;
1339        case -1429847026: // destination
1340          this.destination = TypeConvertor.castToReference(value); // Reference
1341          return value;
1342        case 3387378: // note
1343          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
1344          return value;
1345        case 2138372141: // usageInstruction
1346          this.usageInstruction = TypeConvertor.castToString(value); // StringType
1347          return value;
1348        default: return super.setProperty(hash, name, value);
1349        }
1350
1351      }
1352
1353      @Override
1354      public Base setProperty(String name, Base value) throws FHIRException {
1355        if (name.equals("identifier")) {
1356          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1357        } else if (name.equals("basedOn")) {
1358          this.getBasedOn().add(TypeConvertor.castToReference(value));
1359        } else if (name.equals("partOf")) {
1360          this.getPartOf().add(TypeConvertor.castToReference(value));
1361        } else if (name.equals("status")) {
1362          value = new BiologicallyDerivedProductDispenseCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
1363          this.status = (Enumeration) value; // Enumeration<BiologicallyDerivedProductDispenseCodes>
1364        } else if (name.equals("originRelationshipType")) {
1365          this.originRelationshipType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1366        } else if (name.equals("product")) {
1367          this.product = TypeConvertor.castToReference(value); // Reference
1368        } else if (name.equals("patient")) {
1369          this.patient = TypeConvertor.castToReference(value); // Reference
1370        } else if (name.equals("matchStatus")) {
1371          this.matchStatus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1372        } else if (name.equals("performer")) {
1373          this.getPerformer().add((BiologicallyDerivedProductDispensePerformerComponent) value);
1374        } else if (name.equals("location")) {
1375          this.location = TypeConvertor.castToReference(value); // Reference
1376        } else if (name.equals("quantity")) {
1377          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1378        } else if (name.equals("preparedDate")) {
1379          this.preparedDate = TypeConvertor.castToDateTime(value); // DateTimeType
1380        } else if (name.equals("whenHandedOver")) {
1381          this.whenHandedOver = TypeConvertor.castToDateTime(value); // DateTimeType
1382        } else if (name.equals("destination")) {
1383          this.destination = TypeConvertor.castToReference(value); // Reference
1384        } else if (name.equals("note")) {
1385          this.getNote().add(TypeConvertor.castToAnnotation(value));
1386        } else if (name.equals("usageInstruction")) {
1387          this.usageInstruction = TypeConvertor.castToString(value); // StringType
1388        } else
1389          return super.setProperty(name, value);
1390        return value;
1391      }
1392
1393  @Override
1394  public void removeChild(String name, Base value) throws FHIRException {
1395        if (name.equals("identifier")) {
1396          this.getIdentifier().remove(value);
1397        } else if (name.equals("basedOn")) {
1398          this.getBasedOn().remove(value);
1399        } else if (name.equals("partOf")) {
1400          this.getPartOf().remove(value);
1401        } else if (name.equals("status")) {
1402          value = new BiologicallyDerivedProductDispenseCodesEnumFactory().fromType(TypeConvertor.castToCode(value));
1403          this.status = (Enumeration) value; // Enumeration<BiologicallyDerivedProductDispenseCodes>
1404        } else if (name.equals("originRelationshipType")) {
1405          this.originRelationshipType = null;
1406        } else if (name.equals("product")) {
1407          this.product = null;
1408        } else if (name.equals("patient")) {
1409          this.patient = null;
1410        } else if (name.equals("matchStatus")) {
1411          this.matchStatus = null;
1412        } else if (name.equals("performer")) {
1413          this.getPerformer().remove((BiologicallyDerivedProductDispensePerformerComponent) value);
1414        } else if (name.equals("location")) {
1415          this.location = null;
1416        } else if (name.equals("quantity")) {
1417          this.quantity = null;
1418        } else if (name.equals("preparedDate")) {
1419          this.preparedDate = null;
1420        } else if (name.equals("whenHandedOver")) {
1421          this.whenHandedOver = null;
1422        } else if (name.equals("destination")) {
1423          this.destination = null;
1424        } else if (name.equals("note")) {
1425          this.getNote().remove(value);
1426        } else if (name.equals("usageInstruction")) {
1427          this.usageInstruction = null;
1428        } else
1429          super.removeChild(name, value);
1430        
1431      }
1432
1433      @Override
1434      public Base makeProperty(int hash, String name) throws FHIRException {
1435        switch (hash) {
1436        case -1618432855:  return addIdentifier(); 
1437        case -332612366:  return addBasedOn(); 
1438        case -995410646:  return addPartOf(); 
1439        case -892481550:  return getStatusElement();
1440        case 1746240728:  return getOriginRelationshipType();
1441        case -309474065:  return getProduct();
1442        case -791418107:  return getPatient();
1443        case 1644523031:  return getMatchStatus();
1444        case 481140686:  return addPerformer(); 
1445        case 1901043637:  return getLocation();
1446        case -1285004149:  return getQuantity();
1447        case -2024959605:  return getPreparedDateElement();
1448        case -940241380:  return getWhenHandedOverElement();
1449        case -1429847026:  return getDestination();
1450        case 3387378:  return addNote(); 
1451        case 2138372141:  return getUsageInstructionElement();
1452        default: return super.makeProperty(hash, name);
1453        }
1454
1455      }
1456
1457      @Override
1458      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1459        switch (hash) {
1460        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1461        case -332612366: /*basedOn*/ return new String[] {"Reference"};
1462        case -995410646: /*partOf*/ return new String[] {"Reference"};
1463        case -892481550: /*status*/ return new String[] {"code"};
1464        case 1746240728: /*originRelationshipType*/ return new String[] {"CodeableConcept"};
1465        case -309474065: /*product*/ return new String[] {"Reference"};
1466        case -791418107: /*patient*/ return new String[] {"Reference"};
1467        case 1644523031: /*matchStatus*/ return new String[] {"CodeableConcept"};
1468        case 481140686: /*performer*/ return new String[] {};
1469        case 1901043637: /*location*/ return new String[] {"Reference"};
1470        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
1471        case -2024959605: /*preparedDate*/ return new String[] {"dateTime"};
1472        case -940241380: /*whenHandedOver*/ return new String[] {"dateTime"};
1473        case -1429847026: /*destination*/ return new String[] {"Reference"};
1474        case 3387378: /*note*/ return new String[] {"Annotation"};
1475        case 2138372141: /*usageInstruction*/ return new String[] {"string"};
1476        default: return super.getTypesForProperty(hash, name);
1477        }
1478
1479      }
1480
1481      @Override
1482      public Base addChild(String name) throws FHIRException {
1483        if (name.equals("identifier")) {
1484          return addIdentifier();
1485        }
1486        else if (name.equals("basedOn")) {
1487          return addBasedOn();
1488        }
1489        else if (name.equals("partOf")) {
1490          return addPartOf();
1491        }
1492        else if (name.equals("status")) {
1493          throw new FHIRException("Cannot call addChild on a singleton property BiologicallyDerivedProductDispense.status");
1494        }
1495        else if (name.equals("originRelationshipType")) {
1496          this.originRelationshipType = new CodeableConcept();
1497          return this.originRelationshipType;
1498        }
1499        else if (name.equals("product")) {
1500          this.product = new Reference();
1501          return this.product;
1502        }
1503        else if (name.equals("patient")) {
1504          this.patient = new Reference();
1505          return this.patient;
1506        }
1507        else if (name.equals("matchStatus")) {
1508          this.matchStatus = new CodeableConcept();
1509          return this.matchStatus;
1510        }
1511        else if (name.equals("performer")) {
1512          return addPerformer();
1513        }
1514        else if (name.equals("location")) {
1515          this.location = new Reference();
1516          return this.location;
1517        }
1518        else if (name.equals("quantity")) {
1519          this.quantity = new Quantity();
1520          return this.quantity;
1521        }
1522        else if (name.equals("preparedDate")) {
1523          throw new FHIRException("Cannot call addChild on a singleton property BiologicallyDerivedProductDispense.preparedDate");
1524        }
1525        else if (name.equals("whenHandedOver")) {
1526          throw new FHIRException("Cannot call addChild on a singleton property BiologicallyDerivedProductDispense.whenHandedOver");
1527        }
1528        else if (name.equals("destination")) {
1529          this.destination = new Reference();
1530          return this.destination;
1531        }
1532        else if (name.equals("note")) {
1533          return addNote();
1534        }
1535        else if (name.equals("usageInstruction")) {
1536          throw new FHIRException("Cannot call addChild on a singleton property BiologicallyDerivedProductDispense.usageInstruction");
1537        }
1538        else
1539          return super.addChild(name);
1540      }
1541
1542  public String fhirType() {
1543    return "BiologicallyDerivedProductDispense";
1544
1545  }
1546
1547      public BiologicallyDerivedProductDispense copy() {
1548        BiologicallyDerivedProductDispense dst = new BiologicallyDerivedProductDispense();
1549        copyValues(dst);
1550        return dst;
1551      }
1552
1553      public void copyValues(BiologicallyDerivedProductDispense dst) {
1554        super.copyValues(dst);
1555        if (identifier != null) {
1556          dst.identifier = new ArrayList<Identifier>();
1557          for (Identifier i : identifier)
1558            dst.identifier.add(i.copy());
1559        };
1560        if (basedOn != null) {
1561          dst.basedOn = new ArrayList<Reference>();
1562          for (Reference i : basedOn)
1563            dst.basedOn.add(i.copy());
1564        };
1565        if (partOf != null) {
1566          dst.partOf = new ArrayList<Reference>();
1567          for (Reference i : partOf)
1568            dst.partOf.add(i.copy());
1569        };
1570        dst.status = status == null ? null : status.copy();
1571        dst.originRelationshipType = originRelationshipType == null ? null : originRelationshipType.copy();
1572        dst.product = product == null ? null : product.copy();
1573        dst.patient = patient == null ? null : patient.copy();
1574        dst.matchStatus = matchStatus == null ? null : matchStatus.copy();
1575        if (performer != null) {
1576          dst.performer = new ArrayList<BiologicallyDerivedProductDispensePerformerComponent>();
1577          for (BiologicallyDerivedProductDispensePerformerComponent i : performer)
1578            dst.performer.add(i.copy());
1579        };
1580        dst.location = location == null ? null : location.copy();
1581        dst.quantity = quantity == null ? null : quantity.copy();
1582        dst.preparedDate = preparedDate == null ? null : preparedDate.copy();
1583        dst.whenHandedOver = whenHandedOver == null ? null : whenHandedOver.copy();
1584        dst.destination = destination == null ? null : destination.copy();
1585        if (note != null) {
1586          dst.note = new ArrayList<Annotation>();
1587          for (Annotation i : note)
1588            dst.note.add(i.copy());
1589        };
1590        dst.usageInstruction = usageInstruction == null ? null : usageInstruction.copy();
1591      }
1592
1593      protected BiologicallyDerivedProductDispense typedCopy() {
1594        return copy();
1595      }
1596
1597      @Override
1598      public boolean equalsDeep(Base other_) {
1599        if (!super.equalsDeep(other_))
1600          return false;
1601        if (!(other_ instanceof BiologicallyDerivedProductDispense))
1602          return false;
1603        BiologicallyDerivedProductDispense o = (BiologicallyDerivedProductDispense) other_;
1604        return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true)
1605           && compareDeep(status, o.status, true) && compareDeep(originRelationshipType, o.originRelationshipType, true)
1606           && compareDeep(product, o.product, true) && compareDeep(patient, o.patient, true) && compareDeep(matchStatus, o.matchStatus, true)
1607           && compareDeep(performer, o.performer, true) && compareDeep(location, o.location, true) && compareDeep(quantity, o.quantity, true)
1608           && compareDeep(preparedDate, o.preparedDate, true) && compareDeep(whenHandedOver, o.whenHandedOver, true)
1609           && compareDeep(destination, o.destination, true) && compareDeep(note, o.note, true) && compareDeep(usageInstruction, o.usageInstruction, true)
1610          ;
1611      }
1612
1613      @Override
1614      public boolean equalsShallow(Base other_) {
1615        if (!super.equalsShallow(other_))
1616          return false;
1617        if (!(other_ instanceof BiologicallyDerivedProductDispense))
1618          return false;
1619        BiologicallyDerivedProductDispense o = (BiologicallyDerivedProductDispense) other_;
1620        return compareValues(status, o.status, true) && compareValues(preparedDate, o.preparedDate, true) && compareValues(whenHandedOver, o.whenHandedOver, true)
1621           && compareValues(usageInstruction, o.usageInstruction, true);
1622      }
1623
1624      public boolean isEmpty() {
1625        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf
1626          , status, originRelationshipType, product, patient, matchStatus, performer, location
1627          , quantity, preparedDate, whenHandedOver, destination, note, usageInstruction);
1628      }
1629
1630  @Override
1631  public ResourceType getResourceType() {
1632    return ResourceType.BiologicallyDerivedProductDispense;
1633   }
1634
1635 /**
1636   * Search parameter: <b>identifier</b>
1637   * <p>
1638   * Description: <b>The identifier of the dispense</b><br>
1639   * Type: <b>token</b><br>
1640   * Path: <b>BiologicallyDerivedProductDispense.identifier</b><br>
1641   * </p>
1642   */
1643  @SearchParamDefinition(name="identifier", path="BiologicallyDerivedProductDispense.identifier", description="The identifier of the dispense", type="token" )
1644  public static final String SP_IDENTIFIER = "identifier";
1645 /**
1646   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1647   * <p>
1648   * Description: <b>The identifier of the dispense</b><br>
1649   * Type: <b>token</b><br>
1650   * Path: <b>BiologicallyDerivedProductDispense.identifier</b><br>
1651   * </p>
1652   */
1653  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1654
1655 /**
1656   * Search parameter: <b>patient</b>
1657   * <p>
1658   * Description: <b>The identity of a patient for whom to list dispenses</b><br>
1659   * Type: <b>reference</b><br>
1660   * Path: <b>BiologicallyDerivedProductDispense.patient</b><br>
1661   * </p>
1662   */
1663  @SearchParamDefinition(name="patient", path="BiologicallyDerivedProductDispense.patient", description="The identity of a patient for whom to list dispenses", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
1664  public static final String SP_PATIENT = "patient";
1665 /**
1666   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1667   * <p>
1668   * Description: <b>The identity of a patient for whom to list dispenses</b><br>
1669   * Type: <b>reference</b><br>
1670   * Path: <b>BiologicallyDerivedProductDispense.patient</b><br>
1671   * </p>
1672   */
1673  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1674
1675/**
1676   * Constant for fluent queries to be used to add include statements. Specifies
1677   * the path value of "<b>BiologicallyDerivedProductDispense:patient</b>".
1678   */
1679  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("BiologicallyDerivedProductDispense:patient").toLocked();
1680
1681 /**
1682   * Search parameter: <b>performer</b>
1683   * <p>
1684   * Description: <b>The identity of a patient for whom to list dispenses</b><br>
1685   * Type: <b>reference</b><br>
1686   * Path: <b>BiologicallyDerivedProductDispense.performer.actor</b><br>
1687   * </p>
1688   */
1689  @SearchParamDefinition(name="performer", path="BiologicallyDerivedProductDispense.performer.actor", description="The identity of a patient for whom to list dispenses", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class } )
1690  public static final String SP_PERFORMER = "performer";
1691 /**
1692   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
1693   * <p>
1694   * Description: <b>The identity of a patient for whom to list dispenses</b><br>
1695   * Type: <b>reference</b><br>
1696   * Path: <b>BiologicallyDerivedProductDispense.performer.actor</b><br>
1697   * </p>
1698   */
1699  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
1700
1701/**
1702   * Constant for fluent queries to be used to add include statements. Specifies
1703   * the path value of "<b>BiologicallyDerivedProductDispense:performer</b>".
1704   */
1705  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("BiologicallyDerivedProductDispense:performer").toLocked();
1706
1707 /**
1708   * Search parameter: <b>product</b>
1709   * <p>
1710   * Description: <b>Search for products that match this code</b><br>
1711   * Type: <b>reference</b><br>
1712   * Path: <b>BiologicallyDerivedProductDispense.product</b><br>
1713   * </p>
1714   */
1715  @SearchParamDefinition(name="product", path="BiologicallyDerivedProductDispense.product", description="Search for products that match this code", type="reference", target={BiologicallyDerivedProduct.class } )
1716  public static final String SP_PRODUCT = "product";
1717 /**
1718   * <b>Fluent Client</b> search parameter constant for <b>product</b>
1719   * <p>
1720   * Description: <b>Search for products that match this code</b><br>
1721   * Type: <b>reference</b><br>
1722   * Path: <b>BiologicallyDerivedProductDispense.product</b><br>
1723   * </p>
1724   */
1725  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PRODUCT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PRODUCT);
1726
1727/**
1728   * Constant for fluent queries to be used to add include statements. Specifies
1729   * the path value of "<b>BiologicallyDerivedProductDispense:product</b>".
1730   */
1731  public static final ca.uhn.fhir.model.api.Include INCLUDE_PRODUCT = new ca.uhn.fhir.model.api.Include("BiologicallyDerivedProductDispense:product").toLocked();
1732
1733 /**
1734   * Search parameter: <b>status</b>
1735   * <p>
1736   * Description: <b>The status of the dispense</b><br>
1737   * Type: <b>token</b><br>
1738   * Path: <b>BiologicallyDerivedProductDispense.status</b><br>
1739   * </p>
1740   */
1741  @SearchParamDefinition(name="status", path="BiologicallyDerivedProductDispense.status", description="The status of the dispense", type="token" )
1742  public static final String SP_STATUS = "status";
1743 /**
1744   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1745   * <p>
1746   * Description: <b>The status of the dispense</b><br>
1747   * Type: <b>token</b><br>
1748   * Path: <b>BiologicallyDerivedProductDispense.status</b><br>
1749   * </p>
1750   */
1751  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1752
1753
1754}
1755