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 * Record of delivery of what is supplied.
052 */
053@ResourceDef(name="SupplyDelivery", profile="http://hl7.org/fhir/StructureDefinition/SupplyDelivery")
054public class SupplyDelivery extends DomainResource {
055
056    public enum SupplyDeliveryStatus {
057        /**
058         * Supply has been requested, but not delivered.
059         */
060        INPROGRESS, 
061        /**
062         * Supply has been delivered (\"completed\").
063         */
064        COMPLETED, 
065        /**
066         * Delivery was not completed.
067         */
068        ABANDONED, 
069        /**
070         * This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"abandoned\" rather than \"entered-in-error\".).
071         */
072        ENTEREDINERROR, 
073        /**
074         * added to help the parsers with the generic types
075         */
076        NULL;
077        public static SupplyDeliveryStatus fromCode(String codeString) throws FHIRException {
078            if (codeString == null || "".equals(codeString))
079                return null;
080        if ("in-progress".equals(codeString))
081          return INPROGRESS;
082        if ("completed".equals(codeString))
083          return COMPLETED;
084        if ("abandoned".equals(codeString))
085          return ABANDONED;
086        if ("entered-in-error".equals(codeString))
087          return ENTEREDINERROR;
088        if (Configuration.isAcceptInvalidEnums())
089          return null;
090        else
091          throw new FHIRException("Unknown SupplyDeliveryStatus code '"+codeString+"'");
092        }
093        public String toCode() {
094          switch (this) {
095            case INPROGRESS: return "in-progress";
096            case COMPLETED: return "completed";
097            case ABANDONED: return "abandoned";
098            case ENTEREDINERROR: return "entered-in-error";
099            case NULL: return null;
100            default: return "?";
101          }
102        }
103        public String getSystem() {
104          switch (this) {
105            case INPROGRESS: return "http://hl7.org/fhir/supplydelivery-status";
106            case COMPLETED: return "http://hl7.org/fhir/supplydelivery-status";
107            case ABANDONED: return "http://hl7.org/fhir/supplydelivery-status";
108            case ENTEREDINERROR: return "http://hl7.org/fhir/supplydelivery-status";
109            case NULL: return null;
110            default: return "?";
111          }
112        }
113        public String getDefinition() {
114          switch (this) {
115            case INPROGRESS: return "Supply has been requested, but not delivered.";
116            case COMPLETED: return "Supply has been delivered (\"completed\").";
117            case ABANDONED: return "Delivery was not completed.";
118            case ENTEREDINERROR: return "This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"abandoned\" rather than \"entered-in-error\".).";
119            case NULL: return null;
120            default: return "?";
121          }
122        }
123        public String getDisplay() {
124          switch (this) {
125            case INPROGRESS: return "In Progress";
126            case COMPLETED: return "Delivered";
127            case ABANDONED: return "Abandoned";
128            case ENTEREDINERROR: return "Entered In Error";
129            case NULL: return null;
130            default: return "?";
131          }
132        }
133    }
134
135  public static class SupplyDeliveryStatusEnumFactory implements EnumFactory<SupplyDeliveryStatus> {
136    public SupplyDeliveryStatus fromCode(String codeString) throws IllegalArgumentException {
137      if (codeString == null || "".equals(codeString))
138            if (codeString == null || "".equals(codeString))
139                return null;
140        if ("in-progress".equals(codeString))
141          return SupplyDeliveryStatus.INPROGRESS;
142        if ("completed".equals(codeString))
143          return SupplyDeliveryStatus.COMPLETED;
144        if ("abandoned".equals(codeString))
145          return SupplyDeliveryStatus.ABANDONED;
146        if ("entered-in-error".equals(codeString))
147          return SupplyDeliveryStatus.ENTEREDINERROR;
148        throw new IllegalArgumentException("Unknown SupplyDeliveryStatus code '"+codeString+"'");
149        }
150        public Enumeration<SupplyDeliveryStatus> fromType(PrimitiveType<?> code) throws FHIRException {
151          if (code == null)
152            return null;
153          if (code.isEmpty())
154            return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.NULL, code);
155          String codeString = ((PrimitiveType) code).asStringValue();
156          if (codeString == null || "".equals(codeString))
157            return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.NULL, code);
158        if ("in-progress".equals(codeString))
159          return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.INPROGRESS, code);
160        if ("completed".equals(codeString))
161          return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.COMPLETED, code);
162        if ("abandoned".equals(codeString))
163          return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.ABANDONED, code);
164        if ("entered-in-error".equals(codeString))
165          return new Enumeration<SupplyDeliveryStatus>(this, SupplyDeliveryStatus.ENTEREDINERROR, code);
166        throw new FHIRException("Unknown SupplyDeliveryStatus code '"+codeString+"'");
167        }
168    public String toCode(SupplyDeliveryStatus code) {
169      if (code == SupplyDeliveryStatus.INPROGRESS)
170        return "in-progress";
171      if (code == SupplyDeliveryStatus.COMPLETED)
172        return "completed";
173      if (code == SupplyDeliveryStatus.ABANDONED)
174        return "abandoned";
175      if (code == SupplyDeliveryStatus.ENTEREDINERROR)
176        return "entered-in-error";
177      return "?";
178      }
179    public String toSystem(SupplyDeliveryStatus code) {
180      return code.getSystem();
181      }
182    }
183
184    @Block()
185    public static class SupplyDeliverySuppliedItemComponent extends BackboneElement implements IBaseBackboneElement {
186        /**
187         * The amount of the item that has been supplied.  Unit of measure may be included.
188         */
189        @Child(name = "quantity", type = {Quantity.class}, order=1, min=0, max=1, modifier=false, summary=false)
190        @Description(shortDefinition="Amount supplied", formalDefinition="The amount of the item that has been supplied.  Unit of measure may be included." )
191        protected Quantity quantity;
192
193        /**
194         * Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.
195         */
196        @Child(name = "item", type = {CodeableConcept.class, Medication.class, Substance.class, Device.class, BiologicallyDerivedProduct.class, NutritionProduct.class, InventoryItem.class}, order=2, min=0, max=1, modifier=false, summary=false)
197        @Description(shortDefinition="Medication, Substance, Device or Biologically Derived Product supplied", formalDefinition="Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list." )
198        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplydelivery-supplyitemtype")
199        protected DataType item;
200
201        private static final long serialVersionUID = -615919419L;
202
203    /**
204     * Constructor
205     */
206      public SupplyDeliverySuppliedItemComponent() {
207        super();
208      }
209
210        /**
211         * @return {@link #quantity} (The amount of the item that has been supplied.  Unit of measure may be included.)
212         */
213        public Quantity getQuantity() { 
214          if (this.quantity == null)
215            if (Configuration.errorOnAutoCreate())
216              throw new Error("Attempt to auto-create SupplyDeliverySuppliedItemComponent.quantity");
217            else if (Configuration.doAutoCreate())
218              this.quantity = new Quantity(); // cc
219          return this.quantity;
220        }
221
222        public boolean hasQuantity() { 
223          return this.quantity != null && !this.quantity.isEmpty();
224        }
225
226        /**
227         * @param value {@link #quantity} (The amount of the item that has been supplied.  Unit of measure may be included.)
228         */
229        public SupplyDeliverySuppliedItemComponent setQuantity(Quantity value) { 
230          this.quantity = value;
231          return this;
232        }
233
234        /**
235         * @return {@link #item} (Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.)
236         */
237        public DataType getItem() { 
238          return this.item;
239        }
240
241        /**
242         * @return {@link #item} (Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.)
243         */
244        public CodeableConcept getItemCodeableConcept() throws FHIRException { 
245          if (this.item == null)
246            this.item = new CodeableConcept();
247          if (!(this.item instanceof CodeableConcept))
248            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.item.getClass().getName()+" was encountered");
249          return (CodeableConcept) this.item;
250        }
251
252        public boolean hasItemCodeableConcept() { 
253          return this != null && this.item instanceof CodeableConcept;
254        }
255
256        /**
257         * @return {@link #item} (Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.)
258         */
259        public Reference getItemReference() throws FHIRException { 
260          if (this.item == null)
261            this.item = new Reference();
262          if (!(this.item instanceof Reference))
263            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.item.getClass().getName()+" was encountered");
264          return (Reference) this.item;
265        }
266
267        public boolean hasItemReference() { 
268          return this != null && this.item instanceof Reference;
269        }
270
271        public boolean hasItem() { 
272          return this.item != null && !this.item.isEmpty();
273        }
274
275        /**
276         * @param value {@link #item} (Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.)
277         */
278        public SupplyDeliverySuppliedItemComponent setItem(DataType value) { 
279          if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
280            throw new FHIRException("Not the right type for SupplyDelivery.suppliedItem.item[x]: "+value.fhirType());
281          this.item = value;
282          return this;
283        }
284
285        protected void listChildren(List<Property> children) {
286          super.listChildren(children);
287          children.add(new Property("quantity", "Quantity", "The amount of the item that has been supplied.  Unit of measure may be included.", 0, 1, quantity));
288          children.add(new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device|BiologicallyDerivedProduct|NutritionProduct|InventoryItem)", "Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item));
289        }
290
291        @Override
292        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
293          switch (_hash) {
294          case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "The amount of the item that has been supplied.  Unit of measure may be included.", 0, 1, quantity);
295          case 2116201613: /*item[x]*/  return new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device|BiologicallyDerivedProduct|NutritionProduct|InventoryItem)", "Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item);
296          case 3242771: /*item*/  return new Property("item[x]", "CodeableConcept|Reference(Medication|Substance|Device|BiologicallyDerivedProduct|NutritionProduct|InventoryItem)", "Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item);
297          case 106644494: /*itemCodeableConcept*/  return new Property("item[x]", "CodeableConcept", "Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item);
298          case 1376364920: /*itemReference*/  return new Property("item[x]", "Reference(Medication|Substance|Device|BiologicallyDerivedProduct|NutritionProduct|InventoryItem)", "Identifies the medication, substance, device or biologically derived product being supplied. This is either a link to a resource representing the details of the item or a code that identifies the item from a known list.", 0, 1, item);
299          default: return super.getNamedProperty(_hash, _name, _checkValid);
300          }
301
302        }
303
304      @Override
305      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
306        switch (hash) {
307        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
308        case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // DataType
309        default: return super.getProperty(hash, name, checkValid);
310        }
311
312      }
313
314      @Override
315      public Base setProperty(int hash, String name, Base value) throws FHIRException {
316        switch (hash) {
317        case -1285004149: // quantity
318          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
319          return value;
320        case 3242771: // item
321          this.item = TypeConvertor.castToType(value); // DataType
322          return value;
323        default: return super.setProperty(hash, name, value);
324        }
325
326      }
327
328      @Override
329      public Base setProperty(String name, Base value) throws FHIRException {
330        if (name.equals("quantity")) {
331          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
332        } else if (name.equals("item[x]")) {
333          this.item = TypeConvertor.castToType(value); // DataType
334        } else
335          return super.setProperty(name, value);
336        return value;
337      }
338
339      @Override
340      public Base makeProperty(int hash, String name) throws FHIRException {
341        switch (hash) {
342        case -1285004149:  return getQuantity();
343        case 2116201613:  return getItem();
344        case 3242771:  return getItem();
345        default: return super.makeProperty(hash, name);
346        }
347
348      }
349
350      @Override
351      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
352        switch (hash) {
353        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
354        case 3242771: /*item*/ return new String[] {"CodeableConcept", "Reference"};
355        default: return super.getTypesForProperty(hash, name);
356        }
357
358      }
359
360      @Override
361      public Base addChild(String name) throws FHIRException {
362        if (name.equals("quantity")) {
363          this.quantity = new Quantity();
364          return this.quantity;
365        }
366        else if (name.equals("itemCodeableConcept")) {
367          this.item = new CodeableConcept();
368          return this.item;
369        }
370        else if (name.equals("itemReference")) {
371          this.item = new Reference();
372          return this.item;
373        }
374        else
375          return super.addChild(name);
376      }
377
378      public SupplyDeliverySuppliedItemComponent copy() {
379        SupplyDeliverySuppliedItemComponent dst = new SupplyDeliverySuppliedItemComponent();
380        copyValues(dst);
381        return dst;
382      }
383
384      public void copyValues(SupplyDeliverySuppliedItemComponent dst) {
385        super.copyValues(dst);
386        dst.quantity = quantity == null ? null : quantity.copy();
387        dst.item = item == null ? null : item.copy();
388      }
389
390      @Override
391      public boolean equalsDeep(Base other_) {
392        if (!super.equalsDeep(other_))
393          return false;
394        if (!(other_ instanceof SupplyDeliverySuppliedItemComponent))
395          return false;
396        SupplyDeliverySuppliedItemComponent o = (SupplyDeliverySuppliedItemComponent) other_;
397        return compareDeep(quantity, o.quantity, true) && compareDeep(item, o.item, true);
398      }
399
400      @Override
401      public boolean equalsShallow(Base other_) {
402        if (!super.equalsShallow(other_))
403          return false;
404        if (!(other_ instanceof SupplyDeliverySuppliedItemComponent))
405          return false;
406        SupplyDeliverySuppliedItemComponent o = (SupplyDeliverySuppliedItemComponent) other_;
407        return true;
408      }
409
410      public boolean isEmpty() {
411        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(quantity, item);
412      }
413
414  public String fhirType() {
415    return "SupplyDelivery.suppliedItem";
416
417  }
418
419  }
420
421    /**
422     * Identifier for the supply delivery event that is used to identify it across multiple disparate systems.
423     */
424    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
425    @Description(shortDefinition="External identifier", formalDefinition="Identifier for the supply delivery event that is used to identify it across multiple disparate systems." )
426    protected List<Identifier> identifier;
427
428    /**
429     * A plan, proposal or order that is fulfilled in whole or in part by this event.
430     */
431    @Child(name = "basedOn", type = {SupplyRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
432    @Description(shortDefinition="Fulfills plan, proposal or order", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this event." )
433    protected List<Reference> basedOn;
434
435    /**
436     * A larger event of which this particular event is a component or step.
437     */
438    @Child(name = "partOf", type = {SupplyDelivery.class, Contract.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
439    @Description(shortDefinition="Part of referenced event", formalDefinition="A larger event of which this particular event is a component or step." )
440    protected List<Reference> partOf;
441
442    /**
443     * A code specifying the state of the dispense event.
444     */
445    @Child(name = "status", type = {CodeType.class}, order=3, min=0, max=1, modifier=true, summary=true)
446    @Description(shortDefinition="in-progress | completed | abandoned | entered-in-error", formalDefinition="A code specifying the state of the dispense event." )
447    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplydelivery-status")
448    protected Enumeration<SupplyDeliveryStatus> status;
449
450    /**
451     * A link to a resource representing the person whom the delivered item is for.
452     */
453    @Child(name = "patient", type = {Patient.class}, order=4, min=0, max=1, modifier=false, summary=false)
454    @Description(shortDefinition="Patient for whom the item is supplied", formalDefinition="A link to a resource representing the person whom the delivered item is for." )
455    protected Reference patient;
456
457    /**
458     * Indicates the type of supply being provided.  Examples include: Medication, Device, Biologically Derived Product.
459     */
460    @Child(name = "type", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false)
461    @Description(shortDefinition="Category of supply event", formalDefinition="Indicates the type of supply being provided.  Examples include: Medication, Device, Biologically Derived Product." )
462    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplydelivery-supplyitemtype")
463    protected CodeableConcept type;
464
465    /**
466     * The item that is being delivered or has been supplied.
467     */
468    @Child(name = "suppliedItem", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
469    @Description(shortDefinition="The item that is delivered or supplied", formalDefinition="The item that is being delivered or has been supplied." )
470    protected List<SupplyDeliverySuppliedItemComponent> suppliedItem;
471
472    /**
473     * The date or time(s) the activity occurred.
474     */
475    @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=7, min=0, max=1, modifier=false, summary=true)
476    @Description(shortDefinition="When event occurred", formalDefinition="The date or time(s) the activity occurred." )
477    protected DataType occurrence;
478
479    /**
480     * The individual or organization responsible for supplying the delivery.
481     */
482    @Child(name = "supplier", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=false)
483    @Description(shortDefinition="The item supplier", formalDefinition="The individual or organization responsible for supplying the delivery." )
484    protected Reference supplier;
485
486    /**
487     * Identification of the facility/location where the delivery was shipped to.
488     */
489    @Child(name = "destination", type = {Location.class}, order=9, min=0, max=1, modifier=false, summary=false)
490    @Description(shortDefinition="Where the delivery was sent", formalDefinition="Identification of the facility/location where the delivery was shipped to." )
491    protected Reference destination;
492
493    /**
494     * Identifies the individual or organization that received the delivery.
495     */
496    @Child(name = "receiver", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
497    @Description(shortDefinition="Who received the delivery", formalDefinition="Identifies the individual or organization that received the delivery." )
498    protected List<Reference> receiver;
499
500    private static final long serialVersionUID = -734856482L;
501
502  /**
503   * Constructor
504   */
505    public SupplyDelivery() {
506      super();
507    }
508
509    /**
510     * @return {@link #identifier} (Identifier for the supply delivery event that is used to identify it across multiple disparate systems.)
511     */
512    public List<Identifier> getIdentifier() { 
513      if (this.identifier == null)
514        this.identifier = new ArrayList<Identifier>();
515      return this.identifier;
516    }
517
518    /**
519     * @return Returns a reference to <code>this</code> for easy method chaining
520     */
521    public SupplyDelivery setIdentifier(List<Identifier> theIdentifier) { 
522      this.identifier = theIdentifier;
523      return this;
524    }
525
526    public boolean hasIdentifier() { 
527      if (this.identifier == null)
528        return false;
529      for (Identifier item : this.identifier)
530        if (!item.isEmpty())
531          return true;
532      return false;
533    }
534
535    public Identifier addIdentifier() { //3
536      Identifier t = new Identifier();
537      if (this.identifier == null)
538        this.identifier = new ArrayList<Identifier>();
539      this.identifier.add(t);
540      return t;
541    }
542
543    public SupplyDelivery addIdentifier(Identifier t) { //3
544      if (t == null)
545        return this;
546      if (this.identifier == null)
547        this.identifier = new ArrayList<Identifier>();
548      this.identifier.add(t);
549      return this;
550    }
551
552    /**
553     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
554     */
555    public Identifier getIdentifierFirstRep() { 
556      if (getIdentifier().isEmpty()) {
557        addIdentifier();
558      }
559      return getIdentifier().get(0);
560    }
561
562    /**
563     * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this event.)
564     */
565    public List<Reference> getBasedOn() { 
566      if (this.basedOn == null)
567        this.basedOn = new ArrayList<Reference>();
568      return this.basedOn;
569    }
570
571    /**
572     * @return Returns a reference to <code>this</code> for easy method chaining
573     */
574    public SupplyDelivery setBasedOn(List<Reference> theBasedOn) { 
575      this.basedOn = theBasedOn;
576      return this;
577    }
578
579    public boolean hasBasedOn() { 
580      if (this.basedOn == null)
581        return false;
582      for (Reference item : this.basedOn)
583        if (!item.isEmpty())
584          return true;
585      return false;
586    }
587
588    public Reference addBasedOn() { //3
589      Reference t = new Reference();
590      if (this.basedOn == null)
591        this.basedOn = new ArrayList<Reference>();
592      this.basedOn.add(t);
593      return t;
594    }
595
596    public SupplyDelivery addBasedOn(Reference t) { //3
597      if (t == null)
598        return this;
599      if (this.basedOn == null)
600        this.basedOn = new ArrayList<Reference>();
601      this.basedOn.add(t);
602      return this;
603    }
604
605    /**
606     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
607     */
608    public Reference getBasedOnFirstRep() { 
609      if (getBasedOn().isEmpty()) {
610        addBasedOn();
611      }
612      return getBasedOn().get(0);
613    }
614
615    /**
616     * @return {@link #partOf} (A larger event of which this particular event is a component or step.)
617     */
618    public List<Reference> getPartOf() { 
619      if (this.partOf == null)
620        this.partOf = new ArrayList<Reference>();
621      return this.partOf;
622    }
623
624    /**
625     * @return Returns a reference to <code>this</code> for easy method chaining
626     */
627    public SupplyDelivery setPartOf(List<Reference> thePartOf) { 
628      this.partOf = thePartOf;
629      return this;
630    }
631
632    public boolean hasPartOf() { 
633      if (this.partOf == null)
634        return false;
635      for (Reference item : this.partOf)
636        if (!item.isEmpty())
637          return true;
638      return false;
639    }
640
641    public Reference addPartOf() { //3
642      Reference t = new Reference();
643      if (this.partOf == null)
644        this.partOf = new ArrayList<Reference>();
645      this.partOf.add(t);
646      return t;
647    }
648
649    public SupplyDelivery addPartOf(Reference t) { //3
650      if (t == null)
651        return this;
652      if (this.partOf == null)
653        this.partOf = new ArrayList<Reference>();
654      this.partOf.add(t);
655      return this;
656    }
657
658    /**
659     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
660     */
661    public Reference getPartOfFirstRep() { 
662      if (getPartOf().isEmpty()) {
663        addPartOf();
664      }
665      return getPartOf().get(0);
666    }
667
668    /**
669     * @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
670     */
671    public Enumeration<SupplyDeliveryStatus> getStatusElement() { 
672      if (this.status == null)
673        if (Configuration.errorOnAutoCreate())
674          throw new Error("Attempt to auto-create SupplyDelivery.status");
675        else if (Configuration.doAutoCreate())
676          this.status = new Enumeration<SupplyDeliveryStatus>(new SupplyDeliveryStatusEnumFactory()); // bb
677      return this.status;
678    }
679
680    public boolean hasStatusElement() { 
681      return this.status != null && !this.status.isEmpty();
682    }
683
684    public boolean hasStatus() { 
685      return this.status != null && !this.status.isEmpty();
686    }
687
688    /**
689     * @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
690     */
691    public SupplyDelivery setStatusElement(Enumeration<SupplyDeliveryStatus> value) { 
692      this.status = value;
693      return this;
694    }
695
696    /**
697     * @return A code specifying the state of the dispense event.
698     */
699    public SupplyDeliveryStatus getStatus() { 
700      return this.status == null ? null : this.status.getValue();
701    }
702
703    /**
704     * @param value A code specifying the state of the dispense event.
705     */
706    public SupplyDelivery setStatus(SupplyDeliveryStatus value) { 
707      if (value == null)
708        this.status = null;
709      else {
710        if (this.status == null)
711          this.status = new Enumeration<SupplyDeliveryStatus>(new SupplyDeliveryStatusEnumFactory());
712        this.status.setValue(value);
713      }
714      return this;
715    }
716
717    /**
718     * @return {@link #patient} (A link to a resource representing the person whom the delivered item is for.)
719     */
720    public Reference getPatient() { 
721      if (this.patient == null)
722        if (Configuration.errorOnAutoCreate())
723          throw new Error("Attempt to auto-create SupplyDelivery.patient");
724        else if (Configuration.doAutoCreate())
725          this.patient = new Reference(); // cc
726      return this.patient;
727    }
728
729    public boolean hasPatient() { 
730      return this.patient != null && !this.patient.isEmpty();
731    }
732
733    /**
734     * @param value {@link #patient} (A link to a resource representing the person whom the delivered item is for.)
735     */
736    public SupplyDelivery setPatient(Reference value) { 
737      this.patient = value;
738      return this;
739    }
740
741    /**
742     * @return {@link #type} (Indicates the type of supply being provided.  Examples include: Medication, Device, Biologically Derived Product.)
743     */
744    public CodeableConcept getType() { 
745      if (this.type == null)
746        if (Configuration.errorOnAutoCreate())
747          throw new Error("Attempt to auto-create SupplyDelivery.type");
748        else if (Configuration.doAutoCreate())
749          this.type = new CodeableConcept(); // cc
750      return this.type;
751    }
752
753    public boolean hasType() { 
754      return this.type != null && !this.type.isEmpty();
755    }
756
757    /**
758     * @param value {@link #type} (Indicates the type of supply being provided.  Examples include: Medication, Device, Biologically Derived Product.)
759     */
760    public SupplyDelivery setType(CodeableConcept value) { 
761      this.type = value;
762      return this;
763    }
764
765    /**
766     * @return {@link #suppliedItem} (The item that is being delivered or has been supplied.)
767     */
768    public List<SupplyDeliverySuppliedItemComponent> getSuppliedItem() { 
769      if (this.suppliedItem == null)
770        this.suppliedItem = new ArrayList<SupplyDeliverySuppliedItemComponent>();
771      return this.suppliedItem;
772    }
773
774    /**
775     * @return Returns a reference to <code>this</code> for easy method chaining
776     */
777    public SupplyDelivery setSuppliedItem(List<SupplyDeliverySuppliedItemComponent> theSuppliedItem) { 
778      this.suppliedItem = theSuppliedItem;
779      return this;
780    }
781
782    public boolean hasSuppliedItem() { 
783      if (this.suppliedItem == null)
784        return false;
785      for (SupplyDeliverySuppliedItemComponent item : this.suppliedItem)
786        if (!item.isEmpty())
787          return true;
788      return false;
789    }
790
791    public SupplyDeliverySuppliedItemComponent addSuppliedItem() { //3
792      SupplyDeliverySuppliedItemComponent t = new SupplyDeliverySuppliedItemComponent();
793      if (this.suppliedItem == null)
794        this.suppliedItem = new ArrayList<SupplyDeliverySuppliedItemComponent>();
795      this.suppliedItem.add(t);
796      return t;
797    }
798
799    public SupplyDelivery addSuppliedItem(SupplyDeliverySuppliedItemComponent t) { //3
800      if (t == null)
801        return this;
802      if (this.suppliedItem == null)
803        this.suppliedItem = new ArrayList<SupplyDeliverySuppliedItemComponent>();
804      this.suppliedItem.add(t);
805      return this;
806    }
807
808    /**
809     * @return The first repetition of repeating field {@link #suppliedItem}, creating it if it does not already exist {3}
810     */
811    public SupplyDeliverySuppliedItemComponent getSuppliedItemFirstRep() { 
812      if (getSuppliedItem().isEmpty()) {
813        addSuppliedItem();
814      }
815      return getSuppliedItem().get(0);
816    }
817
818    /**
819     * @return {@link #occurrence} (The date or time(s) the activity occurred.)
820     */
821    public DataType getOccurrence() { 
822      return this.occurrence;
823    }
824
825    /**
826     * @return {@link #occurrence} (The date or time(s) the activity occurred.)
827     */
828    public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 
829      if (this.occurrence == null)
830        this.occurrence = new DateTimeType();
831      if (!(this.occurrence instanceof DateTimeType))
832        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered");
833      return (DateTimeType) this.occurrence;
834    }
835
836    public boolean hasOccurrenceDateTimeType() { 
837      return this != null && this.occurrence instanceof DateTimeType;
838    }
839
840    /**
841     * @return {@link #occurrence} (The date or time(s) the activity occurred.)
842     */
843    public Period getOccurrencePeriod() throws FHIRException { 
844      if (this.occurrence == null)
845        this.occurrence = new Period();
846      if (!(this.occurrence instanceof Period))
847        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered");
848      return (Period) this.occurrence;
849    }
850
851    public boolean hasOccurrencePeriod() { 
852      return this != null && this.occurrence instanceof Period;
853    }
854
855    /**
856     * @return {@link #occurrence} (The date or time(s) the activity occurred.)
857     */
858    public Timing getOccurrenceTiming() throws FHIRException { 
859      if (this.occurrence == null)
860        this.occurrence = new Timing();
861      if (!(this.occurrence instanceof Timing))
862        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered");
863      return (Timing) this.occurrence;
864    }
865
866    public boolean hasOccurrenceTiming() { 
867      return this != null && this.occurrence instanceof Timing;
868    }
869
870    public boolean hasOccurrence() { 
871      return this.occurrence != null && !this.occurrence.isEmpty();
872    }
873
874    /**
875     * @param value {@link #occurrence} (The date or time(s) the activity occurred.)
876     */
877    public SupplyDelivery setOccurrence(DataType value) { 
878      if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing))
879        throw new FHIRException("Not the right type for SupplyDelivery.occurrence[x]: "+value.fhirType());
880      this.occurrence = value;
881      return this;
882    }
883
884    /**
885     * @return {@link #supplier} (The individual or organization responsible for supplying the delivery.)
886     */
887    public Reference getSupplier() { 
888      if (this.supplier == null)
889        if (Configuration.errorOnAutoCreate())
890          throw new Error("Attempt to auto-create SupplyDelivery.supplier");
891        else if (Configuration.doAutoCreate())
892          this.supplier = new Reference(); // cc
893      return this.supplier;
894    }
895
896    public boolean hasSupplier() { 
897      return this.supplier != null && !this.supplier.isEmpty();
898    }
899
900    /**
901     * @param value {@link #supplier} (The individual or organization responsible for supplying the delivery.)
902     */
903    public SupplyDelivery setSupplier(Reference value) { 
904      this.supplier = value;
905      return this;
906    }
907
908    /**
909     * @return {@link #destination} (Identification of the facility/location where the delivery was shipped to.)
910     */
911    public Reference getDestination() { 
912      if (this.destination == null)
913        if (Configuration.errorOnAutoCreate())
914          throw new Error("Attempt to auto-create SupplyDelivery.destination");
915        else if (Configuration.doAutoCreate())
916          this.destination = new Reference(); // cc
917      return this.destination;
918    }
919
920    public boolean hasDestination() { 
921      return this.destination != null && !this.destination.isEmpty();
922    }
923
924    /**
925     * @param value {@link #destination} (Identification of the facility/location where the delivery was shipped to.)
926     */
927    public SupplyDelivery setDestination(Reference value) { 
928      this.destination = value;
929      return this;
930    }
931
932    /**
933     * @return {@link #receiver} (Identifies the individual or organization that received the delivery.)
934     */
935    public List<Reference> getReceiver() { 
936      if (this.receiver == null)
937        this.receiver = new ArrayList<Reference>();
938      return this.receiver;
939    }
940
941    /**
942     * @return Returns a reference to <code>this</code> for easy method chaining
943     */
944    public SupplyDelivery setReceiver(List<Reference> theReceiver) { 
945      this.receiver = theReceiver;
946      return this;
947    }
948
949    public boolean hasReceiver() { 
950      if (this.receiver == null)
951        return false;
952      for (Reference item : this.receiver)
953        if (!item.isEmpty())
954          return true;
955      return false;
956    }
957
958    public Reference addReceiver() { //3
959      Reference t = new Reference();
960      if (this.receiver == null)
961        this.receiver = new ArrayList<Reference>();
962      this.receiver.add(t);
963      return t;
964    }
965
966    public SupplyDelivery addReceiver(Reference t) { //3
967      if (t == null)
968        return this;
969      if (this.receiver == null)
970        this.receiver = new ArrayList<Reference>();
971      this.receiver.add(t);
972      return this;
973    }
974
975    /**
976     * @return The first repetition of repeating field {@link #receiver}, creating it if it does not already exist {3}
977     */
978    public Reference getReceiverFirstRep() { 
979      if (getReceiver().isEmpty()) {
980        addReceiver();
981      }
982      return getReceiver().get(0);
983    }
984
985      protected void listChildren(List<Property> children) {
986        super.listChildren(children);
987        children.add(new Property("identifier", "Identifier", "Identifier for the supply delivery event that is used to identify it across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier));
988        children.add(new Property("basedOn", "Reference(SupplyRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, basedOn));
989        children.add(new Property("partOf", "Reference(SupplyDelivery|Contract)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf));
990        children.add(new Property("status", "code", "A code specifying the state of the dispense event.", 0, 1, status));
991        children.add(new Property("patient", "Reference(Patient)", "A link to a resource representing the person whom the delivered item is for.", 0, 1, patient));
992        children.add(new Property("type", "CodeableConcept", "Indicates the type of supply being provided.  Examples include: Medication, Device, Biologically Derived Product.", 0, 1, type));
993        children.add(new Property("suppliedItem", "", "The item that is being delivered or has been supplied.", 0, java.lang.Integer.MAX_VALUE, suppliedItem));
994        children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence));
995        children.add(new Property("supplier", "Reference(Practitioner|PractitionerRole|Organization)", "The individual or organization responsible for supplying the delivery.", 0, 1, supplier));
996        children.add(new Property("destination", "Reference(Location)", "Identification of the facility/location where the delivery was shipped to.", 0, 1, destination));
997        children.add(new Property("receiver", "Reference(Practitioner|PractitionerRole|Organization)", "Identifies the individual or organization that received the delivery.", 0, java.lang.Integer.MAX_VALUE, receiver));
998      }
999
1000      @Override
1001      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1002        switch (_hash) {
1003        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifier for the supply delivery event that is used to identify it across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier);
1004        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(SupplyRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this event.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1005        case -995410646: /*partOf*/  return new Property("partOf", "Reference(SupplyDelivery|Contract)", "A larger event of which this particular event is a component or step.", 0, java.lang.Integer.MAX_VALUE, partOf);
1006        case -892481550: /*status*/  return new Property("status", "code", "A code specifying the state of the dispense event.", 0, 1, status);
1007        case -791418107: /*patient*/  return new Property("patient", "Reference(Patient)", "A link to a resource representing the person whom the delivered item is for.", 0, 1, patient);
1008        case 3575610: /*type*/  return new Property("type", "CodeableConcept", "Indicates the type of supply being provided.  Examples include: Medication, Device, Biologically Derived Product.", 0, 1, type);
1009        case 1993333233: /*suppliedItem*/  return new Property("suppliedItem", "", "The item that is being delivered or has been supplied.", 0, java.lang.Integer.MAX_VALUE, suppliedItem);
1010        case -2022646513: /*occurrence[x]*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence);
1011        case 1687874001: /*occurrence*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence);
1012        case -298443636: /*occurrenceDateTime*/  return new Property("occurrence[x]", "dateTime", "The date or time(s) the activity occurred.", 0, 1, occurrence);
1013        case 1397156594: /*occurrencePeriod*/  return new Property("occurrence[x]", "Period", "The date or time(s) the activity occurred.", 0, 1, occurrence);
1014        case 1515218299: /*occurrenceTiming*/  return new Property("occurrence[x]", "Timing", "The date or time(s) the activity occurred.", 0, 1, occurrence);
1015        case -1663305268: /*supplier*/  return new Property("supplier", "Reference(Practitioner|PractitionerRole|Organization)", "The individual or organization responsible for supplying the delivery.", 0, 1, supplier);
1016        case -1429847026: /*destination*/  return new Property("destination", "Reference(Location)", "Identification of the facility/location where the delivery was shipped to.", 0, 1, destination);
1017        case -808719889: /*receiver*/  return new Property("receiver", "Reference(Practitioner|PractitionerRole|Organization)", "Identifies the individual or organization that received the delivery.", 0, java.lang.Integer.MAX_VALUE, receiver);
1018        default: return super.getNamedProperty(_hash, _name, _checkValid);
1019        }
1020
1021      }
1022
1023      @Override
1024      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1025        switch (hash) {
1026        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1027        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1028        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
1029        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<SupplyDeliveryStatus>
1030        case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference
1031        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
1032        case 1993333233: /*suppliedItem*/ return this.suppliedItem == null ? new Base[0] : this.suppliedItem.toArray(new Base[this.suppliedItem.size()]); // SupplyDeliverySuppliedItemComponent
1033        case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType
1034        case -1663305268: /*supplier*/ return this.supplier == null ? new Base[0] : new Base[] {this.supplier}; // Reference
1035        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // Reference
1036        case -808719889: /*receiver*/ return this.receiver == null ? new Base[0] : this.receiver.toArray(new Base[this.receiver.size()]); // Reference
1037        default: return super.getProperty(hash, name, checkValid);
1038        }
1039
1040      }
1041
1042      @Override
1043      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1044        switch (hash) {
1045        case -1618432855: // identifier
1046          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1047          return value;
1048        case -332612366: // basedOn
1049          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1050          return value;
1051        case -995410646: // partOf
1052          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
1053          return value;
1054        case -892481550: // status
1055          value = new SupplyDeliveryStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1056          this.status = (Enumeration) value; // Enumeration<SupplyDeliveryStatus>
1057          return value;
1058        case -791418107: // patient
1059          this.patient = TypeConvertor.castToReference(value); // Reference
1060          return value;
1061        case 3575610: // type
1062          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1063          return value;
1064        case 1993333233: // suppliedItem
1065          this.getSuppliedItem().add((SupplyDeliverySuppliedItemComponent) value); // SupplyDeliverySuppliedItemComponent
1066          return value;
1067        case 1687874001: // occurrence
1068          this.occurrence = TypeConvertor.castToType(value); // DataType
1069          return value;
1070        case -1663305268: // supplier
1071          this.supplier = TypeConvertor.castToReference(value); // Reference
1072          return value;
1073        case -1429847026: // destination
1074          this.destination = TypeConvertor.castToReference(value); // Reference
1075          return value;
1076        case -808719889: // receiver
1077          this.getReceiver().add(TypeConvertor.castToReference(value)); // Reference
1078          return value;
1079        default: return super.setProperty(hash, name, value);
1080        }
1081
1082      }
1083
1084      @Override
1085      public Base setProperty(String name, Base value) throws FHIRException {
1086        if (name.equals("identifier")) {
1087          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1088        } else if (name.equals("basedOn")) {
1089          this.getBasedOn().add(TypeConvertor.castToReference(value));
1090        } else if (name.equals("partOf")) {
1091          this.getPartOf().add(TypeConvertor.castToReference(value));
1092        } else if (name.equals("status")) {
1093          value = new SupplyDeliveryStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1094          this.status = (Enumeration) value; // Enumeration<SupplyDeliveryStatus>
1095        } else if (name.equals("patient")) {
1096          this.patient = TypeConvertor.castToReference(value); // Reference
1097        } else if (name.equals("type")) {
1098          this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1099        } else if (name.equals("suppliedItem")) {
1100          this.getSuppliedItem().add((SupplyDeliverySuppliedItemComponent) value);
1101        } else if (name.equals("occurrence[x]")) {
1102          this.occurrence = TypeConvertor.castToType(value); // DataType
1103        } else if (name.equals("supplier")) {
1104          this.supplier = TypeConvertor.castToReference(value); // Reference
1105        } else if (name.equals("destination")) {
1106          this.destination = TypeConvertor.castToReference(value); // Reference
1107        } else if (name.equals("receiver")) {
1108          this.getReceiver().add(TypeConvertor.castToReference(value));
1109        } else
1110          return super.setProperty(name, value);
1111        return value;
1112      }
1113
1114      @Override
1115      public Base makeProperty(int hash, String name) throws FHIRException {
1116        switch (hash) {
1117        case -1618432855:  return addIdentifier(); 
1118        case -332612366:  return addBasedOn(); 
1119        case -995410646:  return addPartOf(); 
1120        case -892481550:  return getStatusElement();
1121        case -791418107:  return getPatient();
1122        case 3575610:  return getType();
1123        case 1993333233:  return addSuppliedItem(); 
1124        case -2022646513:  return getOccurrence();
1125        case 1687874001:  return getOccurrence();
1126        case -1663305268:  return getSupplier();
1127        case -1429847026:  return getDestination();
1128        case -808719889:  return addReceiver(); 
1129        default: return super.makeProperty(hash, name);
1130        }
1131
1132      }
1133
1134      @Override
1135      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1136        switch (hash) {
1137        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1138        case -332612366: /*basedOn*/ return new String[] {"Reference"};
1139        case -995410646: /*partOf*/ return new String[] {"Reference"};
1140        case -892481550: /*status*/ return new String[] {"code"};
1141        case -791418107: /*patient*/ return new String[] {"Reference"};
1142        case 3575610: /*type*/ return new String[] {"CodeableConcept"};
1143        case 1993333233: /*suppliedItem*/ return new String[] {};
1144        case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"};
1145        case -1663305268: /*supplier*/ return new String[] {"Reference"};
1146        case -1429847026: /*destination*/ return new String[] {"Reference"};
1147        case -808719889: /*receiver*/ return new String[] {"Reference"};
1148        default: return super.getTypesForProperty(hash, name);
1149        }
1150
1151      }
1152
1153      @Override
1154      public Base addChild(String name) throws FHIRException {
1155        if (name.equals("identifier")) {
1156          return addIdentifier();
1157        }
1158        else if (name.equals("basedOn")) {
1159          return addBasedOn();
1160        }
1161        else if (name.equals("partOf")) {
1162          return addPartOf();
1163        }
1164        else if (name.equals("status")) {
1165          throw new FHIRException("Cannot call addChild on a singleton property SupplyDelivery.status");
1166        }
1167        else if (name.equals("patient")) {
1168          this.patient = new Reference();
1169          return this.patient;
1170        }
1171        else if (name.equals("type")) {
1172          this.type = new CodeableConcept();
1173          return this.type;
1174        }
1175        else if (name.equals("suppliedItem")) {
1176          return addSuppliedItem();
1177        }
1178        else if (name.equals("occurrenceDateTime")) {
1179          this.occurrence = new DateTimeType();
1180          return this.occurrence;
1181        }
1182        else if (name.equals("occurrencePeriod")) {
1183          this.occurrence = new Period();
1184          return this.occurrence;
1185        }
1186        else if (name.equals("occurrenceTiming")) {
1187          this.occurrence = new Timing();
1188          return this.occurrence;
1189        }
1190        else if (name.equals("supplier")) {
1191          this.supplier = new Reference();
1192          return this.supplier;
1193        }
1194        else if (name.equals("destination")) {
1195          this.destination = new Reference();
1196          return this.destination;
1197        }
1198        else if (name.equals("receiver")) {
1199          return addReceiver();
1200        }
1201        else
1202          return super.addChild(name);
1203      }
1204
1205  public String fhirType() {
1206    return "SupplyDelivery";
1207
1208  }
1209
1210      public SupplyDelivery copy() {
1211        SupplyDelivery dst = new SupplyDelivery();
1212        copyValues(dst);
1213        return dst;
1214      }
1215
1216      public void copyValues(SupplyDelivery dst) {
1217        super.copyValues(dst);
1218        if (identifier != null) {
1219          dst.identifier = new ArrayList<Identifier>();
1220          for (Identifier i : identifier)
1221            dst.identifier.add(i.copy());
1222        };
1223        if (basedOn != null) {
1224          dst.basedOn = new ArrayList<Reference>();
1225          for (Reference i : basedOn)
1226            dst.basedOn.add(i.copy());
1227        };
1228        if (partOf != null) {
1229          dst.partOf = new ArrayList<Reference>();
1230          for (Reference i : partOf)
1231            dst.partOf.add(i.copy());
1232        };
1233        dst.status = status == null ? null : status.copy();
1234        dst.patient = patient == null ? null : patient.copy();
1235        dst.type = type == null ? null : type.copy();
1236        if (suppliedItem != null) {
1237          dst.suppliedItem = new ArrayList<SupplyDeliverySuppliedItemComponent>();
1238          for (SupplyDeliverySuppliedItemComponent i : suppliedItem)
1239            dst.suppliedItem.add(i.copy());
1240        };
1241        dst.occurrence = occurrence == null ? null : occurrence.copy();
1242        dst.supplier = supplier == null ? null : supplier.copy();
1243        dst.destination = destination == null ? null : destination.copy();
1244        if (receiver != null) {
1245          dst.receiver = new ArrayList<Reference>();
1246          for (Reference i : receiver)
1247            dst.receiver.add(i.copy());
1248        };
1249      }
1250
1251      protected SupplyDelivery typedCopy() {
1252        return copy();
1253      }
1254
1255      @Override
1256      public boolean equalsDeep(Base other_) {
1257        if (!super.equalsDeep(other_))
1258          return false;
1259        if (!(other_ instanceof SupplyDelivery))
1260          return false;
1261        SupplyDelivery o = (SupplyDelivery) other_;
1262        return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true)
1263           && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) && compareDeep(type, o.type, true)
1264           && compareDeep(suppliedItem, o.suppliedItem, true) && compareDeep(occurrence, o.occurrence, true)
1265           && compareDeep(supplier, o.supplier, true) && compareDeep(destination, o.destination, true) && compareDeep(receiver, o.receiver, true)
1266          ;
1267      }
1268
1269      @Override
1270      public boolean equalsShallow(Base other_) {
1271        if (!super.equalsShallow(other_))
1272          return false;
1273        if (!(other_ instanceof SupplyDelivery))
1274          return false;
1275        SupplyDelivery o = (SupplyDelivery) other_;
1276        return compareValues(status, o.status, true);
1277      }
1278
1279      public boolean isEmpty() {
1280        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf
1281          , status, patient, type, suppliedItem, occurrence, supplier, destination, receiver
1282          );
1283      }
1284
1285  @Override
1286  public ResourceType getResourceType() {
1287    return ResourceType.SupplyDelivery;
1288   }
1289
1290 /**
1291   * Search parameter: <b>receiver</b>
1292   * <p>
1293   * Description: <b>Who collected the Supply</b><br>
1294   * Type: <b>reference</b><br>
1295   * Path: <b>SupplyDelivery.receiver</b><br>
1296   * </p>
1297   */
1298  @SearchParamDefinition(name="receiver", path="SupplyDelivery.receiver", description="Who collected the Supply", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } )
1299  public static final String SP_RECEIVER = "receiver";
1300 /**
1301   * <b>Fluent Client</b> search parameter constant for <b>receiver</b>
1302   * <p>
1303   * Description: <b>Who collected the Supply</b><br>
1304   * Type: <b>reference</b><br>
1305   * Path: <b>SupplyDelivery.receiver</b><br>
1306   * </p>
1307   */
1308  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RECEIVER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RECEIVER);
1309
1310/**
1311   * Constant for fluent queries to be used to add include statements. Specifies
1312   * the path value of "<b>SupplyDelivery:receiver</b>".
1313   */
1314  public static final ca.uhn.fhir.model.api.Include INCLUDE_RECEIVER = new ca.uhn.fhir.model.api.Include("SupplyDelivery:receiver").toLocked();
1315
1316 /**
1317   * Search parameter: <b>status</b>
1318   * <p>
1319   * Description: <b>in-progress | completed | abandoned | entered-in-error</b><br>
1320   * Type: <b>token</b><br>
1321   * Path: <b>SupplyDelivery.status</b><br>
1322   * </p>
1323   */
1324  @SearchParamDefinition(name="status", path="SupplyDelivery.status", description="in-progress | completed | abandoned | entered-in-error", type="token" )
1325  public static final String SP_STATUS = "status";
1326 /**
1327   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1328   * <p>
1329   * Description: <b>in-progress | completed | abandoned | entered-in-error</b><br>
1330   * Type: <b>token</b><br>
1331   * Path: <b>SupplyDelivery.status</b><br>
1332   * </p>
1333   */
1334  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1335
1336 /**
1337   * Search parameter: <b>supplier</b>
1338   * <p>
1339   * Description: <b>Dispenser</b><br>
1340   * Type: <b>reference</b><br>
1341   * Path: <b>SupplyDelivery.supplier</b><br>
1342   * </p>
1343   */
1344  @SearchParamDefinition(name="supplier", path="SupplyDelivery.supplier", description="Dispenser", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner") }, target={Organization.class, Practitioner.class, PractitionerRole.class } )
1345  public static final String SP_SUPPLIER = "supplier";
1346 /**
1347   * <b>Fluent Client</b> search parameter constant for <b>supplier</b>
1348   * <p>
1349   * Description: <b>Dispenser</b><br>
1350   * Type: <b>reference</b><br>
1351   * Path: <b>SupplyDelivery.supplier</b><br>
1352   * </p>
1353   */
1354  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPLIER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPLIER);
1355
1356/**
1357   * Constant for fluent queries to be used to add include statements. Specifies
1358   * the path value of "<b>SupplyDelivery:supplier</b>".
1359   */
1360  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPLIER = new ca.uhn.fhir.model.api.Include("SupplyDelivery:supplier").toLocked();
1361
1362 /**
1363   * Search parameter: <b>identifier</b>
1364   * <p>
1365   * Description: <b>Multiple Resources: 
1366
1367* [Account](account.html): Account number
1368* [AdverseEvent](adverseevent.html): Business identifier for the event
1369* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1370* [Appointment](appointment.html): An Identifier of the Appointment
1371* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1372* [Basic](basic.html): Business identifier
1373* [BodyStructure](bodystructure.html): Bodystructure identifier
1374* [CarePlan](careplan.html): External Ids for this plan
1375* [CareTeam](careteam.html): External Ids for this team
1376* [ChargeItem](chargeitem.html): Business Identifier for item
1377* [Claim](claim.html): The primary identifier of the financial resource
1378* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1379* [ClinicalImpression](clinicalimpression.html): Business identifier
1380* [Communication](communication.html): Unique identifier
1381* [CommunicationRequest](communicationrequest.html): Unique identifier
1382* [Composition](composition.html): Version-independent identifier for the Composition
1383* [Condition](condition.html): A unique identifier of the condition record
1384* [Consent](consent.html): Identifier for this record (external references)
1385* [Contract](contract.html): The identity of the contract
1386* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1387* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1388* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1389* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1390* [DeviceRequest](devicerequest.html): Business identifier for request/order
1391* [DeviceUsage](deviceusage.html): Search by identifier
1392* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1393* [DocumentReference](documentreference.html): Identifier of the attachment binary
1394* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1395* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1396* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1397* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1398* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1399* [Flag](flag.html): Business identifier
1400* [Goal](goal.html): External Ids for this goal
1401* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1402* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1403* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1404* [Immunization](immunization.html): Business identifier
1405* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1406* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1407* [Invoice](invoice.html): Business Identifier for item
1408* [List](list.html): Business identifier
1409* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1410* [Medication](medication.html): Returns medications with this external identifier
1411* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1412* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1413* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1414* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1415* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1416* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1417* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1418* [Observation](observation.html): The unique id for a particular observation
1419* [Person](person.html): A person Identifier
1420* [Procedure](procedure.html): A unique identifier for a procedure
1421* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1422* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1423* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1424* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1425* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1426* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1427* [Specimen](specimen.html): The unique identifier associated with the specimen
1428* [SupplyDelivery](supplydelivery.html): External identifier
1429* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1430* [Task](task.html): Search for a task instance by its business identifier
1431* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1432</b><br>
1433   * Type: <b>token</b><br>
1434   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
1435   * </p>
1436   */
1437  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
1438  public static final String SP_IDENTIFIER = "identifier";
1439 /**
1440   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1441   * <p>
1442   * Description: <b>Multiple Resources: 
1443
1444* [Account](account.html): Account number
1445* [AdverseEvent](adverseevent.html): Business identifier for the event
1446* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1447* [Appointment](appointment.html): An Identifier of the Appointment
1448* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1449* [Basic](basic.html): Business identifier
1450* [BodyStructure](bodystructure.html): Bodystructure identifier
1451* [CarePlan](careplan.html): External Ids for this plan
1452* [CareTeam](careteam.html): External Ids for this team
1453* [ChargeItem](chargeitem.html): Business Identifier for item
1454* [Claim](claim.html): The primary identifier of the financial resource
1455* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1456* [ClinicalImpression](clinicalimpression.html): Business identifier
1457* [Communication](communication.html): Unique identifier
1458* [CommunicationRequest](communicationrequest.html): Unique identifier
1459* [Composition](composition.html): Version-independent identifier for the Composition
1460* [Condition](condition.html): A unique identifier of the condition record
1461* [Consent](consent.html): Identifier for this record (external references)
1462* [Contract](contract.html): The identity of the contract
1463* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1464* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1465* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1466* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1467* [DeviceRequest](devicerequest.html): Business identifier for request/order
1468* [DeviceUsage](deviceusage.html): Search by identifier
1469* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1470* [DocumentReference](documentreference.html): Identifier of the attachment binary
1471* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1472* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1473* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1474* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1475* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1476* [Flag](flag.html): Business identifier
1477* [Goal](goal.html): External Ids for this goal
1478* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1479* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1480* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1481* [Immunization](immunization.html): Business identifier
1482* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1483* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1484* [Invoice](invoice.html): Business Identifier for item
1485* [List](list.html): Business identifier
1486* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1487* [Medication](medication.html): Returns medications with this external identifier
1488* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1489* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1490* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1491* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1492* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1493* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1494* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1495* [Observation](observation.html): The unique id for a particular observation
1496* [Person](person.html): A person Identifier
1497* [Procedure](procedure.html): A unique identifier for a procedure
1498* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1499* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1500* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1501* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1502* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1503* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1504* [Specimen](specimen.html): The unique identifier associated with the specimen
1505* [SupplyDelivery](supplydelivery.html): External identifier
1506* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1507* [Task](task.html): Search for a task instance by its business identifier
1508* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1509</b><br>
1510   * Type: <b>token</b><br>
1511   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
1512   * </p>
1513   */
1514  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1515
1516 /**
1517   * Search parameter: <b>patient</b>
1518   * <p>
1519   * Description: <b>Multiple Resources: 
1520
1521* [Account](account.html): The entity that caused the expenses
1522* [AdverseEvent](adverseevent.html): Subject impacted by event
1523* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1524* [Appointment](appointment.html): One of the individuals of the appointment is this patient
1525* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
1526* [AuditEvent](auditevent.html): Where the activity involved patient data
1527* [Basic](basic.html): Identifies the focus of this resource
1528* [BodyStructure](bodystructure.html): Who this is about
1529* [CarePlan](careplan.html): Who the care plan is for
1530* [CareTeam](careteam.html): Who care team is for
1531* [ChargeItem](chargeitem.html): Individual service was done for/to
1532* [Claim](claim.html): Patient receiving the products or services
1533* [ClaimResponse](claimresponse.html): The subject of care
1534* [ClinicalImpression](clinicalimpression.html): Patient assessed
1535* [Communication](communication.html): Focus of message
1536* [CommunicationRequest](communicationrequest.html): Focus of message
1537* [Composition](composition.html): Who and/or what the composition is about
1538* [Condition](condition.html): Who has the condition?
1539* [Consent](consent.html): Who the consent applies to
1540* [Contract](contract.html): The identity of the subject of the contract (if a patient)
1541* [Coverage](coverage.html): Retrieve coverages for a patient
1542* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
1543* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
1544* [DetectedIssue](detectedissue.html): Associated patient
1545* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1546* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1547* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1548* [DocumentReference](documentreference.html): Who/what is the subject of the document
1549* [Encounter](encounter.html): The patient present at the encounter
1550* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
1551* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1552* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
1553* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1554* [Flag](flag.html): The identity of a subject to list flags for
1555* [Goal](goal.html): Who this goal is intended for
1556* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
1557* [ImagingSelection](imagingselection.html): Who the study is about
1558* [ImagingStudy](imagingstudy.html): Who the study is about
1559* [Immunization](immunization.html): The patient for the vaccination record
1560* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
1561* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
1562* [Invoice](invoice.html): Recipient(s) of goods and services
1563* [List](list.html): If all resources have the same subject
1564* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
1565* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1566* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1567* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1568* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1569* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
1570* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
1571* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
1572* [Observation](observation.html): The subject that the observation is about (if patient)
1573* [Person](person.html): The Person links to this Patient
1574* [Procedure](procedure.html): Search by subject - a patient
1575* [Provenance](provenance.html): Where the activity involved patient data
1576* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
1577* [RelatedPerson](relatedperson.html): The patient this related person is related to
1578* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
1579* [ResearchSubject](researchsubject.html): Who or what is part of study
1580* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1581* [ServiceRequest](servicerequest.html): Search by subject - a patient
1582* [Specimen](specimen.html): The patient the specimen comes from
1583* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1584* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
1585* [Task](task.html): Search by patient
1586* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1587</b><br>
1588   * Type: <b>reference</b><br>
1589   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
1590   * </p>
1591   */
1592  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } )
1593  public static final String SP_PATIENT = "patient";
1594 /**
1595   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1596   * <p>
1597   * Description: <b>Multiple Resources: 
1598
1599* [Account](account.html): The entity that caused the expenses
1600* [AdverseEvent](adverseevent.html): Subject impacted by event
1601* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
1602* [Appointment](appointment.html): One of the individuals of the appointment is this patient
1603* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
1604* [AuditEvent](auditevent.html): Where the activity involved patient data
1605* [Basic](basic.html): Identifies the focus of this resource
1606* [BodyStructure](bodystructure.html): Who this is about
1607* [CarePlan](careplan.html): Who the care plan is for
1608* [CareTeam](careteam.html): Who care team is for
1609* [ChargeItem](chargeitem.html): Individual service was done for/to
1610* [Claim](claim.html): Patient receiving the products or services
1611* [ClaimResponse](claimresponse.html): The subject of care
1612* [ClinicalImpression](clinicalimpression.html): Patient assessed
1613* [Communication](communication.html): Focus of message
1614* [CommunicationRequest](communicationrequest.html): Focus of message
1615* [Composition](composition.html): Who and/or what the composition is about
1616* [Condition](condition.html): Who has the condition?
1617* [Consent](consent.html): Who the consent applies to
1618* [Contract](contract.html): The identity of the subject of the contract (if a patient)
1619* [Coverage](coverage.html): Retrieve coverages for a patient
1620* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
1621* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
1622* [DetectedIssue](detectedissue.html): Associated patient
1623* [DeviceRequest](devicerequest.html): Individual the service is ordered for
1624* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
1625* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
1626* [DocumentReference](documentreference.html): Who/what is the subject of the document
1627* [Encounter](encounter.html): The patient present at the encounter
1628* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
1629* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
1630* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
1631* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
1632* [Flag](flag.html): The identity of a subject to list flags for
1633* [Goal](goal.html): Who this goal is intended for
1634* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
1635* [ImagingSelection](imagingselection.html): Who the study is about
1636* [ImagingStudy](imagingstudy.html): Who the study is about
1637* [Immunization](immunization.html): The patient for the vaccination record
1638* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
1639* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
1640* [Invoice](invoice.html): Recipient(s) of goods and services
1641* [List](list.html): If all resources have the same subject
1642* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
1643* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
1644* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
1645* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
1646* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
1647* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
1648* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
1649* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
1650* [Observation](observation.html): The subject that the observation is about (if patient)
1651* [Person](person.html): The Person links to this Patient
1652* [Procedure](procedure.html): Search by subject - a patient
1653* [Provenance](provenance.html): Where the activity involved patient data
1654* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
1655* [RelatedPerson](relatedperson.html): The patient this related person is related to
1656* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
1657* [ResearchSubject](researchsubject.html): Who or what is part of study
1658* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
1659* [ServiceRequest](servicerequest.html): Search by subject - a patient
1660* [Specimen](specimen.html): The patient the specimen comes from
1661* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
1662* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
1663* [Task](task.html): Search by patient
1664* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
1665</b><br>
1666   * Type: <b>reference</b><br>
1667   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
1668   * </p>
1669   */
1670  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1671
1672/**
1673   * Constant for fluent queries to be used to add include statements. Specifies
1674   * the path value of "<b>SupplyDelivery:patient</b>".
1675   */
1676  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("SupplyDelivery:patient").toLocked();
1677
1678
1679}
1680