001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting.
052 */
053@ResourceDef(name="SupplyRequest", profile="http://hl7.org/fhir/StructureDefinition/SupplyRequest")
054public class SupplyRequest extends DomainResource {
055
056    public enum SupplyRequestStatus {
057        /**
058         * The request has been created but is not yet complete or ready for action.
059         */
060        DRAFT, 
061        /**
062         * The request is ready to be acted upon.
063         */
064        ACTIVE, 
065        /**
066         * The authorization/request to act has been temporarily withdrawn but is expected to resume in the future.
067         */
068        SUSPENDED, 
069        /**
070         * The authorization/request to act has been terminated prior to the full completion of the intended actions.  No further activity should occur.
071         */
072        CANCELLED, 
073        /**
074         * Activity against the request has been sufficiently completed to the satisfaction of the requester.
075         */
076        COMPLETED, 
077        /**
078         * 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 \"cancelled\" rather than \"entered-in-error\".).
079         */
080        ENTEREDINERROR, 
081        /**
082         * The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.
083         */
084        UNKNOWN, 
085        /**
086         * added to help the parsers with the generic types
087         */
088        NULL;
089        public static SupplyRequestStatus fromCode(String codeString) throws FHIRException {
090            if (codeString == null || "".equals(codeString))
091                return null;
092        if ("draft".equals(codeString))
093          return DRAFT;
094        if ("active".equals(codeString))
095          return ACTIVE;
096        if ("suspended".equals(codeString))
097          return SUSPENDED;
098        if ("cancelled".equals(codeString))
099          return CANCELLED;
100        if ("completed".equals(codeString))
101          return COMPLETED;
102        if ("entered-in-error".equals(codeString))
103          return ENTEREDINERROR;
104        if ("unknown".equals(codeString))
105          return UNKNOWN;
106        if (Configuration.isAcceptInvalidEnums())
107          return null;
108        else
109          throw new FHIRException("Unknown SupplyRequestStatus code '"+codeString+"'");
110        }
111        public String toCode() {
112          switch (this) {
113            case DRAFT: return "draft";
114            case ACTIVE: return "active";
115            case SUSPENDED: return "suspended";
116            case CANCELLED: return "cancelled";
117            case COMPLETED: return "completed";
118            case ENTEREDINERROR: return "entered-in-error";
119            case UNKNOWN: return "unknown";
120            case NULL: return null;
121            default: return "?";
122          }
123        }
124        public String getSystem() {
125          switch (this) {
126            case DRAFT: return "http://hl7.org/fhir/supplyrequest-status";
127            case ACTIVE: return "http://hl7.org/fhir/supplyrequest-status";
128            case SUSPENDED: return "http://hl7.org/fhir/supplyrequest-status";
129            case CANCELLED: return "http://hl7.org/fhir/supplyrequest-status";
130            case COMPLETED: return "http://hl7.org/fhir/supplyrequest-status";
131            case ENTEREDINERROR: return "http://hl7.org/fhir/supplyrequest-status";
132            case UNKNOWN: return "http://hl7.org/fhir/supplyrequest-status";
133            case NULL: return null;
134            default: return "?";
135          }
136        }
137        public String getDefinition() {
138          switch (this) {
139            case DRAFT: return "The request has been created but is not yet complete or ready for action.";
140            case ACTIVE: return "The request is ready to be acted upon.";
141            case SUSPENDED: return "The authorization/request to act has been temporarily withdrawn but is expected to resume in the future.";
142            case CANCELLED: return "The authorization/request to act has been terminated prior to the full completion of the intended actions.  No further activity should occur.";
143            case COMPLETED: return "Activity against the request has been sufficiently completed to the satisfaction of the requester.";
144            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 \"cancelled\" rather than \"entered-in-error\".).";
145            case UNKNOWN: return "The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which.";
146            case NULL: return null;
147            default: return "?";
148          }
149        }
150        public String getDisplay() {
151          switch (this) {
152            case DRAFT: return "Draft";
153            case ACTIVE: return "Active";
154            case SUSPENDED: return "Suspended";
155            case CANCELLED: return "Cancelled";
156            case COMPLETED: return "Completed";
157            case ENTEREDINERROR: return "Entered in Error";
158            case UNKNOWN: return "Unknown";
159            case NULL: return null;
160            default: return "?";
161          }
162        }
163    }
164
165  public static class SupplyRequestStatusEnumFactory implements EnumFactory<SupplyRequestStatus> {
166    public SupplyRequestStatus fromCode(String codeString) throws IllegalArgumentException {
167      if (codeString == null || "".equals(codeString))
168            if (codeString == null || "".equals(codeString))
169                return null;
170        if ("draft".equals(codeString))
171          return SupplyRequestStatus.DRAFT;
172        if ("active".equals(codeString))
173          return SupplyRequestStatus.ACTIVE;
174        if ("suspended".equals(codeString))
175          return SupplyRequestStatus.SUSPENDED;
176        if ("cancelled".equals(codeString))
177          return SupplyRequestStatus.CANCELLED;
178        if ("completed".equals(codeString))
179          return SupplyRequestStatus.COMPLETED;
180        if ("entered-in-error".equals(codeString))
181          return SupplyRequestStatus.ENTEREDINERROR;
182        if ("unknown".equals(codeString))
183          return SupplyRequestStatus.UNKNOWN;
184        throw new IllegalArgumentException("Unknown SupplyRequestStatus code '"+codeString+"'");
185        }
186        public Enumeration<SupplyRequestStatus> fromType(PrimitiveType<?> code) throws FHIRException {
187          if (code == null)
188            return null;
189          if (code.isEmpty())
190            return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.NULL, code);
191          String codeString = ((PrimitiveType) code).asStringValue();
192          if (codeString == null || "".equals(codeString))
193            return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.NULL, code);
194        if ("draft".equals(codeString))
195          return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.DRAFT, code);
196        if ("active".equals(codeString))
197          return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.ACTIVE, code);
198        if ("suspended".equals(codeString))
199          return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.SUSPENDED, code);
200        if ("cancelled".equals(codeString))
201          return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.CANCELLED, code);
202        if ("completed".equals(codeString))
203          return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.COMPLETED, code);
204        if ("entered-in-error".equals(codeString))
205          return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.ENTEREDINERROR, code);
206        if ("unknown".equals(codeString))
207          return new Enumeration<SupplyRequestStatus>(this, SupplyRequestStatus.UNKNOWN, code);
208        throw new FHIRException("Unknown SupplyRequestStatus code '"+codeString+"'");
209        }
210    public String toCode(SupplyRequestStatus code) {
211      if (code == SupplyRequestStatus.DRAFT)
212        return "draft";
213      if (code == SupplyRequestStatus.ACTIVE)
214        return "active";
215      if (code == SupplyRequestStatus.SUSPENDED)
216        return "suspended";
217      if (code == SupplyRequestStatus.CANCELLED)
218        return "cancelled";
219      if (code == SupplyRequestStatus.COMPLETED)
220        return "completed";
221      if (code == SupplyRequestStatus.ENTEREDINERROR)
222        return "entered-in-error";
223      if (code == SupplyRequestStatus.UNKNOWN)
224        return "unknown";
225      return "?";
226      }
227    public String toSystem(SupplyRequestStatus code) {
228      return code.getSystem();
229      }
230    }
231
232    @Block()
233    public static class SupplyRequestParameterComponent extends BackboneElement implements IBaseBackboneElement {
234        /**
235         * A code or string that identifies the device detail being asserted.
236         */
237        @Child(name = "code", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
238        @Description(shortDefinition="Item detail", formalDefinition="A code or string that identifies the device detail being asserted." )
239        protected CodeableConcept code;
240
241        /**
242         * The value of the device detail.
243         */
244        @Child(name = "value", type = {CodeableConcept.class, Quantity.class, Range.class, BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
245        @Description(shortDefinition="Value of detail", formalDefinition="The value of the device detail." )
246        protected DataType value;
247
248        private static final long serialVersionUID = -1950789033L;
249
250    /**
251     * Constructor
252     */
253      public SupplyRequestParameterComponent() {
254        super();
255      }
256
257        /**
258         * @return {@link #code} (A code or string that identifies the device detail being asserted.)
259         */
260        public CodeableConcept getCode() { 
261          if (this.code == null)
262            if (Configuration.errorOnAutoCreate())
263              throw new Error("Attempt to auto-create SupplyRequestParameterComponent.code");
264            else if (Configuration.doAutoCreate())
265              this.code = new CodeableConcept(); // cc
266          return this.code;
267        }
268
269        public boolean hasCode() { 
270          return this.code != null && !this.code.isEmpty();
271        }
272
273        /**
274         * @param value {@link #code} (A code or string that identifies the device detail being asserted.)
275         */
276        public SupplyRequestParameterComponent setCode(CodeableConcept value) { 
277          this.code = value;
278          return this;
279        }
280
281        /**
282         * @return {@link #value} (The value of the device detail.)
283         */
284        public DataType getValue() { 
285          return this.value;
286        }
287
288        /**
289         * @return {@link #value} (The value of the device detail.)
290         */
291        public CodeableConcept getValueCodeableConcept() throws FHIRException { 
292          if (this.value == null)
293            this.value = new CodeableConcept();
294          if (!(this.value instanceof CodeableConcept))
295            throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered");
296          return (CodeableConcept) this.value;
297        }
298
299        public boolean hasValueCodeableConcept() { 
300          return this != null && this.value instanceof CodeableConcept;
301        }
302
303        /**
304         * @return {@link #value} (The value of the device detail.)
305         */
306        public Quantity getValueQuantity() throws FHIRException { 
307          if (this.value == null)
308            this.value = new Quantity();
309          if (!(this.value instanceof Quantity))
310            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
311          return (Quantity) this.value;
312        }
313
314        public boolean hasValueQuantity() { 
315          return this != null && this.value instanceof Quantity;
316        }
317
318        /**
319         * @return {@link #value} (The value of the device detail.)
320         */
321        public Range getValueRange() throws FHIRException { 
322          if (this.value == null)
323            this.value = new Range();
324          if (!(this.value instanceof Range))
325            throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered");
326          return (Range) this.value;
327        }
328
329        public boolean hasValueRange() { 
330          return this != null && this.value instanceof Range;
331        }
332
333        /**
334         * @return {@link #value} (The value of the device detail.)
335         */
336        public BooleanType getValueBooleanType() throws FHIRException { 
337          if (this.value == null)
338            this.value = new BooleanType();
339          if (!(this.value instanceof BooleanType))
340            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
341          return (BooleanType) this.value;
342        }
343
344        public boolean hasValueBooleanType() { 
345          return this != null && this.value instanceof BooleanType;
346        }
347
348        public boolean hasValue() { 
349          return this.value != null && !this.value.isEmpty();
350        }
351
352        /**
353         * @param value {@link #value} (The value of the device detail.)
354         */
355        public SupplyRequestParameterComponent setValue(DataType value) { 
356          if (value != null && !(value instanceof CodeableConcept || value instanceof Quantity || value instanceof Range || value instanceof BooleanType))
357            throw new FHIRException("Not the right type for SupplyRequest.parameter.value[x]: "+value.fhirType());
358          this.value = value;
359          return this;
360        }
361
362        protected void listChildren(List<Property> children) {
363          super.listChildren(children);
364          children.add(new Property("code", "CodeableConcept", "A code or string that identifies the device detail being asserted.", 0, 1, code));
365          children.add(new Property("value[x]", "CodeableConcept|Quantity|Range|boolean", "The value of the device detail.", 0, 1, value));
366        }
367
368        @Override
369        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
370          switch (_hash) {
371          case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code or string that identifies the device detail being asserted.", 0, 1, code);
372          case -1410166417: /*value[x]*/  return new Property("value[x]", "CodeableConcept|Quantity|Range|boolean", "The value of the device detail.", 0, 1, value);
373          case 111972721: /*value*/  return new Property("value[x]", "CodeableConcept|Quantity|Range|boolean", "The value of the device detail.", 0, 1, value);
374          case 924902896: /*valueCodeableConcept*/  return new Property("value[x]", "CodeableConcept", "The value of the device detail.", 0, 1, value);
375          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The value of the device detail.", 0, 1, value);
376          case 2030761548: /*valueRange*/  return new Property("value[x]", "Range", "The value of the device detail.", 0, 1, value);
377          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The value of the device detail.", 0, 1, value);
378          default: return super.getNamedProperty(_hash, _name, _checkValid);
379          }
380
381        }
382
383      @Override
384      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
385        switch (hash) {
386        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
387        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
388        default: return super.getProperty(hash, name, checkValid);
389        }
390
391      }
392
393      @Override
394      public Base setProperty(int hash, String name, Base value) throws FHIRException {
395        switch (hash) {
396        case 3059181: // code
397          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
398          return value;
399        case 111972721: // value
400          this.value = TypeConvertor.castToType(value); // DataType
401          return value;
402        default: return super.setProperty(hash, name, value);
403        }
404
405      }
406
407      @Override
408      public Base setProperty(String name, Base value) throws FHIRException {
409        if (name.equals("code")) {
410          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
411        } else if (name.equals("value[x]")) {
412          this.value = TypeConvertor.castToType(value); // DataType
413        } else
414          return super.setProperty(name, value);
415        return value;
416      }
417
418  @Override
419  public void removeChild(String name, Base value) throws FHIRException {
420        if (name.equals("code")) {
421          this.code = null;
422        } else if (name.equals("value[x]")) {
423          this.value = null;
424        } else
425          super.removeChild(name, value);
426        
427      }
428
429      @Override
430      public Base makeProperty(int hash, String name) throws FHIRException {
431        switch (hash) {
432        case 3059181:  return getCode();
433        case -1410166417:  return getValue();
434        case 111972721:  return getValue();
435        default: return super.makeProperty(hash, name);
436        }
437
438      }
439
440      @Override
441      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
442        switch (hash) {
443        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
444        case 111972721: /*value*/ return new String[] {"CodeableConcept", "Quantity", "Range", "boolean"};
445        default: return super.getTypesForProperty(hash, name);
446        }
447
448      }
449
450      @Override
451      public Base addChild(String name) throws FHIRException {
452        if (name.equals("code")) {
453          this.code = new CodeableConcept();
454          return this.code;
455        }
456        else if (name.equals("valueCodeableConcept")) {
457          this.value = new CodeableConcept();
458          return this.value;
459        }
460        else if (name.equals("valueQuantity")) {
461          this.value = new Quantity();
462          return this.value;
463        }
464        else if (name.equals("valueRange")) {
465          this.value = new Range();
466          return this.value;
467        }
468        else if (name.equals("valueBoolean")) {
469          this.value = new BooleanType();
470          return this.value;
471        }
472        else
473          return super.addChild(name);
474      }
475
476      public SupplyRequestParameterComponent copy() {
477        SupplyRequestParameterComponent dst = new SupplyRequestParameterComponent();
478        copyValues(dst);
479        return dst;
480      }
481
482      public void copyValues(SupplyRequestParameterComponent dst) {
483        super.copyValues(dst);
484        dst.code = code == null ? null : code.copy();
485        dst.value = value == null ? null : value.copy();
486      }
487
488      @Override
489      public boolean equalsDeep(Base other_) {
490        if (!super.equalsDeep(other_))
491          return false;
492        if (!(other_ instanceof SupplyRequestParameterComponent))
493          return false;
494        SupplyRequestParameterComponent o = (SupplyRequestParameterComponent) other_;
495        return compareDeep(code, o.code, true) && compareDeep(value, o.value, true);
496      }
497
498      @Override
499      public boolean equalsShallow(Base other_) {
500        if (!super.equalsShallow(other_))
501          return false;
502        if (!(other_ instanceof SupplyRequestParameterComponent))
503          return false;
504        SupplyRequestParameterComponent o = (SupplyRequestParameterComponent) other_;
505        return true;
506      }
507
508      public boolean isEmpty() {
509        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value);
510      }
511
512  public String fhirType() {
513    return "SupplyRequest.parameter";
514
515  }
516
517  }
518
519    /**
520     * Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.
521     */
522    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
523    @Description(shortDefinition="Business Identifier for SupplyRequest", formalDefinition="Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server." )
524    protected List<Identifier> identifier;
525
526    /**
527     * Status of the supply request.
528     */
529    @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true)
530    @Description(shortDefinition="draft | active | suspended +", formalDefinition="Status of the supply request." )
531    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplyrequest-status")
532    protected Enumeration<SupplyRequestStatus> status;
533
534    /**
535     * Plan/proposal/order fulfilled by this request.
536     */
537    @Child(name = "basedOn", type = {Reference.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
538    @Description(shortDefinition="What other request is fulfilled by this supply request", formalDefinition="Plan/proposal/order fulfilled by this request." )
539    protected List<Reference> basedOn;
540
541    /**
542     * Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process.
543     */
544    @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
545    @Description(shortDefinition="The kind of supply (central, non-stock, etc.)", formalDefinition="Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process." )
546    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplyrequest-kind")
547    protected CodeableConcept category;
548
549    /**
550     * Indicates how quickly this SupplyRequest should be addressed with respect to other requests.
551     */
552    @Child(name = "priority", type = {CodeType.class}, order=4, min=0, max=1, modifier=false, summary=true)
553    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly this SupplyRequest should be addressed with respect to other requests." )
554    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
555    protected Enumeration<RequestPriority> priority;
556
557    /**
558     * The patient to whom the supply will be given or for whom they will be used.
559     */
560    @Child(name = "deliverFor", type = {Patient.class}, order=5, min=0, max=1, modifier=false, summary=false)
561    @Description(shortDefinition="The patient for who the supply request is for", formalDefinition="The patient to whom the supply will be given or for whom they will be used." )
562    protected Reference deliverFor;
563
564    /**
565     * The item that is requested to be 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.
566     */
567    @Child(name = "item", type = {CodeableReference.class}, order=6, min=1, max=1, modifier=false, summary=true)
568    @Description(shortDefinition="Medication, Substance, or Device requested to be supplied", formalDefinition="The item that is requested to be 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." )
569    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supply-item")
570    protected CodeableReference item;
571
572    /**
573     * The amount that is being ordered of the indicated item.
574     */
575    @Child(name = "quantity", type = {Quantity.class}, order=7, min=1, max=1, modifier=false, summary=true)
576    @Description(shortDefinition="The requested amount of the item indicated", formalDefinition="The amount that is being ordered of the indicated item." )
577    protected Quantity quantity;
578
579    /**
580     * Specific parameters for the ordered item.  For example, the size of the indicated item.
581     */
582    @Child(name = "parameter", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
583    @Description(shortDefinition="Ordered item details", formalDefinition="Specific parameters for the ordered item.  For example, the size of the indicated item." )
584    protected List<SupplyRequestParameterComponent> parameter;
585
586    /**
587     * When the request should be fulfilled.
588     */
589    @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=9, min=0, max=1, modifier=false, summary=true)
590    @Description(shortDefinition="When the request should be fulfilled", formalDefinition="When the request should be fulfilled." )
591    protected DataType occurrence;
592
593    /**
594     * When the request was made.
595     */
596    @Child(name = "authoredOn", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true)
597    @Description(shortDefinition="When the request was made", formalDefinition="When the request was made." )
598    protected DateTimeType authoredOn;
599
600    /**
601     * The device, practitioner, etc. who initiated the request.
602     */
603    @Child(name = "requester", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class, Device.class, CareTeam.class}, order=11, min=0, max=1, modifier=false, summary=true)
604    @Description(shortDefinition="Individual making the request", formalDefinition="The device, practitioner, etc. who initiated the request." )
605    protected Reference requester;
606
607    /**
608     * Who is intended to fulfill the request.
609     */
610    @Child(name = "supplier", type = {Organization.class, HealthcareService.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
611    @Description(shortDefinition="Who is intended to fulfill the request", formalDefinition="Who is intended to fulfill the request." )
612    protected List<Reference> supplier;
613
614    /**
615     * The reason why the supply item was requested.
616     */
617    @Child(name = "reason", type = {CodeableReference.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
618    @Description(shortDefinition="The reason why the supply item was requested", formalDefinition="The reason why the supply item was requested." )
619    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplyrequest-reason")
620    protected List<CodeableReference> reason;
621
622    /**
623     * Where the supply is expected to come from.
624     */
625    @Child(name = "deliverFrom", type = {Organization.class, Location.class}, order=14, min=0, max=1, modifier=false, summary=false)
626    @Description(shortDefinition="The origin of the supply", formalDefinition="Where the supply is expected to come from." )
627    protected Reference deliverFrom;
628
629    /**
630     * Where the supply is destined to go.
631     */
632    @Child(name = "deliverTo", type = {Organization.class, Location.class, Patient.class, RelatedPerson.class}, order=15, min=0, max=1, modifier=false, summary=false)
633    @Description(shortDefinition="The destination of the supply", formalDefinition="Where the supply is destined to go." )
634    protected Reference deliverTo;
635
636    private static final long serialVersionUID = -1701051976L;
637
638  /**
639   * Constructor
640   */
641    public SupplyRequest() {
642      super();
643    }
644
645  /**
646   * Constructor
647   */
648    public SupplyRequest(CodeableReference item, Quantity quantity) {
649      super();
650      this.setItem(item);
651      this.setQuantity(quantity);
652    }
653
654    /**
655     * @return {@link #identifier} (Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.)
656     */
657    public List<Identifier> getIdentifier() { 
658      if (this.identifier == null)
659        this.identifier = new ArrayList<Identifier>();
660      return this.identifier;
661    }
662
663    /**
664     * @return Returns a reference to <code>this</code> for easy method chaining
665     */
666    public SupplyRequest setIdentifier(List<Identifier> theIdentifier) { 
667      this.identifier = theIdentifier;
668      return this;
669    }
670
671    public boolean hasIdentifier() { 
672      if (this.identifier == null)
673        return false;
674      for (Identifier item : this.identifier)
675        if (!item.isEmpty())
676          return true;
677      return false;
678    }
679
680    public Identifier addIdentifier() { //3
681      Identifier t = new Identifier();
682      if (this.identifier == null)
683        this.identifier = new ArrayList<Identifier>();
684      this.identifier.add(t);
685      return t;
686    }
687
688    public SupplyRequest addIdentifier(Identifier t) { //3
689      if (t == null)
690        return this;
691      if (this.identifier == null)
692        this.identifier = new ArrayList<Identifier>();
693      this.identifier.add(t);
694      return this;
695    }
696
697    /**
698     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
699     */
700    public Identifier getIdentifierFirstRep() { 
701      if (getIdentifier().isEmpty()) {
702        addIdentifier();
703      }
704      return getIdentifier().get(0);
705    }
706
707    /**
708     * @return {@link #status} (Status of the supply request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
709     */
710    public Enumeration<SupplyRequestStatus> getStatusElement() { 
711      if (this.status == null)
712        if (Configuration.errorOnAutoCreate())
713          throw new Error("Attempt to auto-create SupplyRequest.status");
714        else if (Configuration.doAutoCreate())
715          this.status = new Enumeration<SupplyRequestStatus>(new SupplyRequestStatusEnumFactory()); // bb
716      return this.status;
717    }
718
719    public boolean hasStatusElement() { 
720      return this.status != null && !this.status.isEmpty();
721    }
722
723    public boolean hasStatus() { 
724      return this.status != null && !this.status.isEmpty();
725    }
726
727    /**
728     * @param value {@link #status} (Status of the supply request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
729     */
730    public SupplyRequest setStatusElement(Enumeration<SupplyRequestStatus> value) { 
731      this.status = value;
732      return this;
733    }
734
735    /**
736     * @return Status of the supply request.
737     */
738    public SupplyRequestStatus getStatus() { 
739      return this.status == null ? null : this.status.getValue();
740    }
741
742    /**
743     * @param value Status of the supply request.
744     */
745    public SupplyRequest setStatus(SupplyRequestStatus value) { 
746      if (value == null)
747        this.status = null;
748      else {
749        if (this.status == null)
750          this.status = new Enumeration<SupplyRequestStatus>(new SupplyRequestStatusEnumFactory());
751        this.status.setValue(value);
752      }
753      return this;
754    }
755
756    /**
757     * @return {@link #basedOn} (Plan/proposal/order fulfilled by this request.)
758     */
759    public List<Reference> getBasedOn() { 
760      if (this.basedOn == null)
761        this.basedOn = new ArrayList<Reference>();
762      return this.basedOn;
763    }
764
765    /**
766     * @return Returns a reference to <code>this</code> for easy method chaining
767     */
768    public SupplyRequest setBasedOn(List<Reference> theBasedOn) { 
769      this.basedOn = theBasedOn;
770      return this;
771    }
772
773    public boolean hasBasedOn() { 
774      if (this.basedOn == null)
775        return false;
776      for (Reference item : this.basedOn)
777        if (!item.isEmpty())
778          return true;
779      return false;
780    }
781
782    public Reference addBasedOn() { //3
783      Reference t = new Reference();
784      if (this.basedOn == null)
785        this.basedOn = new ArrayList<Reference>();
786      this.basedOn.add(t);
787      return t;
788    }
789
790    public SupplyRequest addBasedOn(Reference t) { //3
791      if (t == null)
792        return this;
793      if (this.basedOn == null)
794        this.basedOn = new ArrayList<Reference>();
795      this.basedOn.add(t);
796      return this;
797    }
798
799    /**
800     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
801     */
802    public Reference getBasedOnFirstRep() { 
803      if (getBasedOn().isEmpty()) {
804        addBasedOn();
805      }
806      return getBasedOn().get(0);
807    }
808
809    /**
810     * @return {@link #category} (Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process.)
811     */
812    public CodeableConcept getCategory() { 
813      if (this.category == null)
814        if (Configuration.errorOnAutoCreate())
815          throw new Error("Attempt to auto-create SupplyRequest.category");
816        else if (Configuration.doAutoCreate())
817          this.category = new CodeableConcept(); // cc
818      return this.category;
819    }
820
821    public boolean hasCategory() { 
822      return this.category != null && !this.category.isEmpty();
823    }
824
825    /**
826     * @param value {@link #category} (Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process.)
827     */
828    public SupplyRequest setCategory(CodeableConcept value) { 
829      this.category = value;
830      return this;
831    }
832
833    /**
834     * @return {@link #priority} (Indicates how quickly this SupplyRequest should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
835     */
836    public Enumeration<RequestPriority> getPriorityElement() { 
837      if (this.priority == null)
838        if (Configuration.errorOnAutoCreate())
839          throw new Error("Attempt to auto-create SupplyRequest.priority");
840        else if (Configuration.doAutoCreate())
841          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
842      return this.priority;
843    }
844
845    public boolean hasPriorityElement() { 
846      return this.priority != null && !this.priority.isEmpty();
847    }
848
849    public boolean hasPriority() { 
850      return this.priority != null && !this.priority.isEmpty();
851    }
852
853    /**
854     * @param value {@link #priority} (Indicates how quickly this SupplyRequest should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
855     */
856    public SupplyRequest setPriorityElement(Enumeration<RequestPriority> value) { 
857      this.priority = value;
858      return this;
859    }
860
861    /**
862     * @return Indicates how quickly this SupplyRequest should be addressed with respect to other requests.
863     */
864    public RequestPriority getPriority() { 
865      return this.priority == null ? null : this.priority.getValue();
866    }
867
868    /**
869     * @param value Indicates how quickly this SupplyRequest should be addressed with respect to other requests.
870     */
871    public SupplyRequest setPriority(RequestPriority value) { 
872      if (value == null)
873        this.priority = null;
874      else {
875        if (this.priority == null)
876          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
877        this.priority.setValue(value);
878      }
879      return this;
880    }
881
882    /**
883     * @return {@link #deliverFor} (The patient to whom the supply will be given or for whom they will be used.)
884     */
885    public Reference getDeliverFor() { 
886      if (this.deliverFor == null)
887        if (Configuration.errorOnAutoCreate())
888          throw new Error("Attempt to auto-create SupplyRequest.deliverFor");
889        else if (Configuration.doAutoCreate())
890          this.deliverFor = new Reference(); // cc
891      return this.deliverFor;
892    }
893
894    public boolean hasDeliverFor() { 
895      return this.deliverFor != null && !this.deliverFor.isEmpty();
896    }
897
898    /**
899     * @param value {@link #deliverFor} (The patient to whom the supply will be given or for whom they will be used.)
900     */
901    public SupplyRequest setDeliverFor(Reference value) { 
902      this.deliverFor = value;
903      return this;
904    }
905
906    /**
907     * @return {@link #item} (The item that is requested to be 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.)
908     */
909    public CodeableReference getItem() { 
910      if (this.item == null)
911        if (Configuration.errorOnAutoCreate())
912          throw new Error("Attempt to auto-create SupplyRequest.item");
913        else if (Configuration.doAutoCreate())
914          this.item = new CodeableReference(); // cc
915      return this.item;
916    }
917
918    public boolean hasItem() { 
919      return this.item != null && !this.item.isEmpty();
920    }
921
922    /**
923     * @param value {@link #item} (The item that is requested to be 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.)
924     */
925    public SupplyRequest setItem(CodeableReference value) { 
926      this.item = value;
927      return this;
928    }
929
930    /**
931     * @return {@link #quantity} (The amount that is being ordered of the indicated item.)
932     */
933    public Quantity getQuantity() { 
934      if (this.quantity == null)
935        if (Configuration.errorOnAutoCreate())
936          throw new Error("Attempt to auto-create SupplyRequest.quantity");
937        else if (Configuration.doAutoCreate())
938          this.quantity = new Quantity(); // cc
939      return this.quantity;
940    }
941
942    public boolean hasQuantity() { 
943      return this.quantity != null && !this.quantity.isEmpty();
944    }
945
946    /**
947     * @param value {@link #quantity} (The amount that is being ordered of the indicated item.)
948     */
949    public SupplyRequest setQuantity(Quantity value) { 
950      this.quantity = value;
951      return this;
952    }
953
954    /**
955     * @return {@link #parameter} (Specific parameters for the ordered item.  For example, the size of the indicated item.)
956     */
957    public List<SupplyRequestParameterComponent> getParameter() { 
958      if (this.parameter == null)
959        this.parameter = new ArrayList<SupplyRequestParameterComponent>();
960      return this.parameter;
961    }
962
963    /**
964     * @return Returns a reference to <code>this</code> for easy method chaining
965     */
966    public SupplyRequest setParameter(List<SupplyRequestParameterComponent> theParameter) { 
967      this.parameter = theParameter;
968      return this;
969    }
970
971    public boolean hasParameter() { 
972      if (this.parameter == null)
973        return false;
974      for (SupplyRequestParameterComponent item : this.parameter)
975        if (!item.isEmpty())
976          return true;
977      return false;
978    }
979
980    public SupplyRequestParameterComponent addParameter() { //3
981      SupplyRequestParameterComponent t = new SupplyRequestParameterComponent();
982      if (this.parameter == null)
983        this.parameter = new ArrayList<SupplyRequestParameterComponent>();
984      this.parameter.add(t);
985      return t;
986    }
987
988    public SupplyRequest addParameter(SupplyRequestParameterComponent t) { //3
989      if (t == null)
990        return this;
991      if (this.parameter == null)
992        this.parameter = new ArrayList<SupplyRequestParameterComponent>();
993      this.parameter.add(t);
994      return this;
995    }
996
997    /**
998     * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist {3}
999     */
1000    public SupplyRequestParameterComponent getParameterFirstRep() { 
1001      if (getParameter().isEmpty()) {
1002        addParameter();
1003      }
1004      return getParameter().get(0);
1005    }
1006
1007    /**
1008     * @return {@link #occurrence} (When the request should be fulfilled.)
1009     */
1010    public DataType getOccurrence() { 
1011      return this.occurrence;
1012    }
1013
1014    /**
1015     * @return {@link #occurrence} (When the request should be fulfilled.)
1016     */
1017    public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 
1018      if (this.occurrence == null)
1019        this.occurrence = new DateTimeType();
1020      if (!(this.occurrence instanceof DateTimeType))
1021        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1022      return (DateTimeType) this.occurrence;
1023    }
1024
1025    public boolean hasOccurrenceDateTimeType() { 
1026      return this != null && this.occurrence instanceof DateTimeType;
1027    }
1028
1029    /**
1030     * @return {@link #occurrence} (When the request should be fulfilled.)
1031     */
1032    public Period getOccurrencePeriod() throws FHIRException { 
1033      if (this.occurrence == null)
1034        this.occurrence = new Period();
1035      if (!(this.occurrence instanceof Period))
1036        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1037      return (Period) this.occurrence;
1038    }
1039
1040    public boolean hasOccurrencePeriod() { 
1041      return this != null && this.occurrence instanceof Period;
1042    }
1043
1044    /**
1045     * @return {@link #occurrence} (When the request should be fulfilled.)
1046     */
1047    public Timing getOccurrenceTiming() throws FHIRException { 
1048      if (this.occurrence == null)
1049        this.occurrence = new Timing();
1050      if (!(this.occurrence instanceof Timing))
1051        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1052      return (Timing) this.occurrence;
1053    }
1054
1055    public boolean hasOccurrenceTiming() { 
1056      return this != null && this.occurrence instanceof Timing;
1057    }
1058
1059    public boolean hasOccurrence() { 
1060      return this.occurrence != null && !this.occurrence.isEmpty();
1061    }
1062
1063    /**
1064     * @param value {@link #occurrence} (When the request should be fulfilled.)
1065     */
1066    public SupplyRequest setOccurrence(DataType value) { 
1067      if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing))
1068        throw new FHIRException("Not the right type for SupplyRequest.occurrence[x]: "+value.fhirType());
1069      this.occurrence = value;
1070      return this;
1071    }
1072
1073    /**
1074     * @return {@link #authoredOn} (When the request was made.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
1075     */
1076    public DateTimeType getAuthoredOnElement() { 
1077      if (this.authoredOn == null)
1078        if (Configuration.errorOnAutoCreate())
1079          throw new Error("Attempt to auto-create SupplyRequest.authoredOn");
1080        else if (Configuration.doAutoCreate())
1081          this.authoredOn = new DateTimeType(); // bb
1082      return this.authoredOn;
1083    }
1084
1085    public boolean hasAuthoredOnElement() { 
1086      return this.authoredOn != null && !this.authoredOn.isEmpty();
1087    }
1088
1089    public boolean hasAuthoredOn() { 
1090      return this.authoredOn != null && !this.authoredOn.isEmpty();
1091    }
1092
1093    /**
1094     * @param value {@link #authoredOn} (When the request was made.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
1095     */
1096    public SupplyRequest setAuthoredOnElement(DateTimeType value) { 
1097      this.authoredOn = value;
1098      return this;
1099    }
1100
1101    /**
1102     * @return When the request was made.
1103     */
1104    public Date getAuthoredOn() { 
1105      return this.authoredOn == null ? null : this.authoredOn.getValue();
1106    }
1107
1108    /**
1109     * @param value When the request was made.
1110     */
1111    public SupplyRequest setAuthoredOn(Date value) { 
1112      if (value == null)
1113        this.authoredOn = null;
1114      else {
1115        if (this.authoredOn == null)
1116          this.authoredOn = new DateTimeType();
1117        this.authoredOn.setValue(value);
1118      }
1119      return this;
1120    }
1121
1122    /**
1123     * @return {@link #requester} (The device, practitioner, etc. who initiated the request.)
1124     */
1125    public Reference getRequester() { 
1126      if (this.requester == null)
1127        if (Configuration.errorOnAutoCreate())
1128          throw new Error("Attempt to auto-create SupplyRequest.requester");
1129        else if (Configuration.doAutoCreate())
1130          this.requester = new Reference(); // cc
1131      return this.requester;
1132    }
1133
1134    public boolean hasRequester() { 
1135      return this.requester != null && !this.requester.isEmpty();
1136    }
1137
1138    /**
1139     * @param value {@link #requester} (The device, practitioner, etc. who initiated the request.)
1140     */
1141    public SupplyRequest setRequester(Reference value) { 
1142      this.requester = value;
1143      return this;
1144    }
1145
1146    /**
1147     * @return {@link #supplier} (Who is intended to fulfill the request.)
1148     */
1149    public List<Reference> getSupplier() { 
1150      if (this.supplier == null)
1151        this.supplier = new ArrayList<Reference>();
1152      return this.supplier;
1153    }
1154
1155    /**
1156     * @return Returns a reference to <code>this</code> for easy method chaining
1157     */
1158    public SupplyRequest setSupplier(List<Reference> theSupplier) { 
1159      this.supplier = theSupplier;
1160      return this;
1161    }
1162
1163    public boolean hasSupplier() { 
1164      if (this.supplier == null)
1165        return false;
1166      for (Reference item : this.supplier)
1167        if (!item.isEmpty())
1168          return true;
1169      return false;
1170    }
1171
1172    public Reference addSupplier() { //3
1173      Reference t = new Reference();
1174      if (this.supplier == null)
1175        this.supplier = new ArrayList<Reference>();
1176      this.supplier.add(t);
1177      return t;
1178    }
1179
1180    public SupplyRequest addSupplier(Reference t) { //3
1181      if (t == null)
1182        return this;
1183      if (this.supplier == null)
1184        this.supplier = new ArrayList<Reference>();
1185      this.supplier.add(t);
1186      return this;
1187    }
1188
1189    /**
1190     * @return The first repetition of repeating field {@link #supplier}, creating it if it does not already exist {3}
1191     */
1192    public Reference getSupplierFirstRep() { 
1193      if (getSupplier().isEmpty()) {
1194        addSupplier();
1195      }
1196      return getSupplier().get(0);
1197    }
1198
1199    /**
1200     * @return {@link #reason} (The reason why the supply item was requested.)
1201     */
1202    public List<CodeableReference> getReason() { 
1203      if (this.reason == null)
1204        this.reason = new ArrayList<CodeableReference>();
1205      return this.reason;
1206    }
1207
1208    /**
1209     * @return Returns a reference to <code>this</code> for easy method chaining
1210     */
1211    public SupplyRequest setReason(List<CodeableReference> theReason) { 
1212      this.reason = theReason;
1213      return this;
1214    }
1215
1216    public boolean hasReason() { 
1217      if (this.reason == null)
1218        return false;
1219      for (CodeableReference item : this.reason)
1220        if (!item.isEmpty())
1221          return true;
1222      return false;
1223    }
1224
1225    public CodeableReference addReason() { //3
1226      CodeableReference t = new CodeableReference();
1227      if (this.reason == null)
1228        this.reason = new ArrayList<CodeableReference>();
1229      this.reason.add(t);
1230      return t;
1231    }
1232
1233    public SupplyRequest addReason(CodeableReference t) { //3
1234      if (t == null)
1235        return this;
1236      if (this.reason == null)
1237        this.reason = new ArrayList<CodeableReference>();
1238      this.reason.add(t);
1239      return this;
1240    }
1241
1242    /**
1243     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
1244     */
1245    public CodeableReference getReasonFirstRep() { 
1246      if (getReason().isEmpty()) {
1247        addReason();
1248      }
1249      return getReason().get(0);
1250    }
1251
1252    /**
1253     * @return {@link #deliverFrom} (Where the supply is expected to come from.)
1254     */
1255    public Reference getDeliverFrom() { 
1256      if (this.deliverFrom == null)
1257        if (Configuration.errorOnAutoCreate())
1258          throw new Error("Attempt to auto-create SupplyRequest.deliverFrom");
1259        else if (Configuration.doAutoCreate())
1260          this.deliverFrom = new Reference(); // cc
1261      return this.deliverFrom;
1262    }
1263
1264    public boolean hasDeliverFrom() { 
1265      return this.deliverFrom != null && !this.deliverFrom.isEmpty();
1266    }
1267
1268    /**
1269     * @param value {@link #deliverFrom} (Where the supply is expected to come from.)
1270     */
1271    public SupplyRequest setDeliverFrom(Reference value) { 
1272      this.deliverFrom = value;
1273      return this;
1274    }
1275
1276    /**
1277     * @return {@link #deliverTo} (Where the supply is destined to go.)
1278     */
1279    public Reference getDeliverTo() { 
1280      if (this.deliverTo == null)
1281        if (Configuration.errorOnAutoCreate())
1282          throw new Error("Attempt to auto-create SupplyRequest.deliverTo");
1283        else if (Configuration.doAutoCreate())
1284          this.deliverTo = new Reference(); // cc
1285      return this.deliverTo;
1286    }
1287
1288    public boolean hasDeliverTo() { 
1289      return this.deliverTo != null && !this.deliverTo.isEmpty();
1290    }
1291
1292    /**
1293     * @param value {@link #deliverTo} (Where the supply is destined to go.)
1294     */
1295    public SupplyRequest setDeliverTo(Reference value) { 
1296      this.deliverTo = value;
1297      return this;
1298    }
1299
1300      protected void listChildren(List<Property> children) {
1301        super.listChildren(children);
1302        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1303        children.add(new Property("status", "code", "Status of the supply request.", 0, 1, status));
1304        children.add(new Property("basedOn", "Reference(Any)", "Plan/proposal/order fulfilled by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn));
1305        children.add(new Property("category", "CodeableConcept", "Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process.", 0, 1, category));
1306        children.add(new Property("priority", "code", "Indicates how quickly this SupplyRequest should be addressed with respect to other requests.", 0, 1, priority));
1307        children.add(new Property("deliverFor", "Reference(Patient)", "The patient to whom the supply will be given or for whom they will be used.", 0, 1, deliverFor));
1308        children.add(new Property("item", "CodeableReference(Medication|Substance|Device|DeviceDefinition|BiologicallyDerivedProduct|NutritionProduct|InventoryItem)", "The item that is requested to be 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));
1309        children.add(new Property("quantity", "Quantity", "The amount that is being ordered of the indicated item.", 0, 1, quantity));
1310        children.add(new Property("parameter", "", "Specific parameters for the ordered item.  For example, the size of the indicated item.", 0, java.lang.Integer.MAX_VALUE, parameter));
1311        children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "When the request should be fulfilled.", 0, 1, occurrence));
1312        children.add(new Property("authoredOn", "dateTime", "When the request was made.", 0, 1, authoredOn));
1313        children.add(new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device|CareTeam)", "The device, practitioner, etc. who initiated the request.", 0, 1, requester));
1314        children.add(new Property("supplier", "Reference(Organization|HealthcareService)", "Who is intended to fulfill the request.", 0, java.lang.Integer.MAX_VALUE, supplier));
1315        children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "The reason why the supply item was requested.", 0, java.lang.Integer.MAX_VALUE, reason));
1316        children.add(new Property("deliverFrom", "Reference(Organization|Location)", "Where the supply is expected to come from.", 0, 1, deliverFrom));
1317        children.add(new Property("deliverTo", "Reference(Organization|Location|Patient|RelatedPerson)", "Where the supply is destined to go.", 0, 1, deliverTo));
1318      }
1319
1320      @Override
1321      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1322        switch (_hash) {
1323        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
1324        case -892481550: /*status*/  return new Property("status", "code", "Status of the supply request.", 0, 1, status);
1325        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(Any)", "Plan/proposal/order fulfilled by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1326        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "Category of supply, e.g.  central, non-stock, etc. This is used to support work flows associated with the supply process.", 0, 1, category);
1327        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly this SupplyRequest should be addressed with respect to other requests.", 0, 1, priority);
1328        case 1077755236: /*deliverFor*/  return new Property("deliverFor", "Reference(Patient)", "The patient to whom the supply will be given or for whom they will be used.", 0, 1, deliverFor);
1329        case 3242771: /*item*/  return new Property("item", "CodeableReference(Medication|Substance|Device|DeviceDefinition|BiologicallyDerivedProduct|NutritionProduct|InventoryItem)", "The item that is requested to be 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);
1330        case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "The amount that is being ordered of the indicated item.", 0, 1, quantity);
1331        case 1954460585: /*parameter*/  return new Property("parameter", "", "Specific parameters for the ordered item.  For example, the size of the indicated item.", 0, java.lang.Integer.MAX_VALUE, parameter);
1332        case -2022646513: /*occurrence[x]*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "When the request should be fulfilled.", 0, 1, occurrence);
1333        case 1687874001: /*occurrence*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "When the request should be fulfilled.", 0, 1, occurrence);
1334        case -298443636: /*occurrenceDateTime*/  return new Property("occurrence[x]", "dateTime", "When the request should be fulfilled.", 0, 1, occurrence);
1335        case 1397156594: /*occurrencePeriod*/  return new Property("occurrence[x]", "Period", "When the request should be fulfilled.", 0, 1, occurrence);
1336        case 1515218299: /*occurrenceTiming*/  return new Property("occurrence[x]", "Timing", "When the request should be fulfilled.", 0, 1, occurrence);
1337        case -1500852503: /*authoredOn*/  return new Property("authoredOn", "dateTime", "When the request was made.", 0, 1, authoredOn);
1338        case 693933948: /*requester*/  return new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device|CareTeam)", "The device, practitioner, etc. who initiated the request.", 0, 1, requester);
1339        case -1663305268: /*supplier*/  return new Property("supplier", "Reference(Organization|HealthcareService)", "Who is intended to fulfill the request.", 0, java.lang.Integer.MAX_VALUE, supplier);
1340        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "The reason why the supply item was requested.", 0, java.lang.Integer.MAX_VALUE, reason);
1341        case -949323153: /*deliverFrom*/  return new Property("deliverFrom", "Reference(Organization|Location)", "Where the supply is expected to come from.", 0, 1, deliverFrom);
1342        case -242327936: /*deliverTo*/  return new Property("deliverTo", "Reference(Organization|Location|Patient|RelatedPerson)", "Where the supply is destined to go.", 0, 1, deliverTo);
1343        default: return super.getNamedProperty(_hash, _name, _checkValid);
1344        }
1345
1346      }
1347
1348      @Override
1349      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1350        switch (hash) {
1351        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1352        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<SupplyRequestStatus>
1353        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1354        case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
1355        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
1356        case 1077755236: /*deliverFor*/ return this.deliverFor == null ? new Base[0] : new Base[] {this.deliverFor}; // Reference
1357        case 3242771: /*item*/ return this.item == null ? new Base[0] : new Base[] {this.item}; // CodeableReference
1358        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
1359        case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // SupplyRequestParameterComponent
1360        case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType
1361        case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType
1362        case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
1363        case -1663305268: /*supplier*/ return this.supplier == null ? new Base[0] : this.supplier.toArray(new Base[this.supplier.size()]); // Reference
1364        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
1365        case -949323153: /*deliverFrom*/ return this.deliverFrom == null ? new Base[0] : new Base[] {this.deliverFrom}; // Reference
1366        case -242327936: /*deliverTo*/ return this.deliverTo == null ? new Base[0] : new Base[] {this.deliverTo}; // Reference
1367        default: return super.getProperty(hash, name, checkValid);
1368        }
1369
1370      }
1371
1372      @Override
1373      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1374        switch (hash) {
1375        case -1618432855: // identifier
1376          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1377          return value;
1378        case -892481550: // status
1379          value = new SupplyRequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1380          this.status = (Enumeration) value; // Enumeration<SupplyRequestStatus>
1381          return value;
1382        case -332612366: // basedOn
1383          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1384          return value;
1385        case 50511102: // category
1386          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1387          return value;
1388        case -1165461084: // priority
1389          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
1390          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
1391          return value;
1392        case 1077755236: // deliverFor
1393          this.deliverFor = TypeConvertor.castToReference(value); // Reference
1394          return value;
1395        case 3242771: // item
1396          this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference
1397          return value;
1398        case -1285004149: // quantity
1399          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1400          return value;
1401        case 1954460585: // parameter
1402          this.getParameter().add((SupplyRequestParameterComponent) value); // SupplyRequestParameterComponent
1403          return value;
1404        case 1687874001: // occurrence
1405          this.occurrence = TypeConvertor.castToType(value); // DataType
1406          return value;
1407        case -1500852503: // authoredOn
1408          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
1409          return value;
1410        case 693933948: // requester
1411          this.requester = TypeConvertor.castToReference(value); // Reference
1412          return value;
1413        case -1663305268: // supplier
1414          this.getSupplier().add(TypeConvertor.castToReference(value)); // Reference
1415          return value;
1416        case -934964668: // reason
1417          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1418          return value;
1419        case -949323153: // deliverFrom
1420          this.deliverFrom = TypeConvertor.castToReference(value); // Reference
1421          return value;
1422        case -242327936: // deliverTo
1423          this.deliverTo = TypeConvertor.castToReference(value); // Reference
1424          return value;
1425        default: return super.setProperty(hash, name, value);
1426        }
1427
1428      }
1429
1430      @Override
1431      public Base setProperty(String name, Base value) throws FHIRException {
1432        if (name.equals("identifier")) {
1433          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1434        } else if (name.equals("status")) {
1435          value = new SupplyRequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1436          this.status = (Enumeration) value; // Enumeration<SupplyRequestStatus>
1437        } else if (name.equals("basedOn")) {
1438          this.getBasedOn().add(TypeConvertor.castToReference(value));
1439        } else if (name.equals("category")) {
1440          this.category = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1441        } else if (name.equals("priority")) {
1442          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
1443          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
1444        } else if (name.equals("deliverFor")) {
1445          this.deliverFor = TypeConvertor.castToReference(value); // Reference
1446        } else if (name.equals("item")) {
1447          this.item = TypeConvertor.castToCodeableReference(value); // CodeableReference
1448        } else if (name.equals("quantity")) {
1449          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
1450        } else if (name.equals("parameter")) {
1451          this.getParameter().add((SupplyRequestParameterComponent) value);
1452        } else if (name.equals("occurrence[x]")) {
1453          this.occurrence = TypeConvertor.castToType(value); // DataType
1454        } else if (name.equals("authoredOn")) {
1455          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
1456        } else if (name.equals("requester")) {
1457          this.requester = TypeConvertor.castToReference(value); // Reference
1458        } else if (name.equals("supplier")) {
1459          this.getSupplier().add(TypeConvertor.castToReference(value));
1460        } else if (name.equals("reason")) {
1461          this.getReason().add(TypeConvertor.castToCodeableReference(value));
1462        } else if (name.equals("deliverFrom")) {
1463          this.deliverFrom = TypeConvertor.castToReference(value); // Reference
1464        } else if (name.equals("deliverTo")) {
1465          this.deliverTo = TypeConvertor.castToReference(value); // Reference
1466        } else
1467          return super.setProperty(name, value);
1468        return value;
1469      }
1470
1471  @Override
1472  public void removeChild(String name, Base value) throws FHIRException {
1473        if (name.equals("identifier")) {
1474          this.getIdentifier().remove(value);
1475        } else if (name.equals("status")) {
1476          value = new SupplyRequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1477          this.status = (Enumeration) value; // Enumeration<SupplyRequestStatus>
1478        } else if (name.equals("basedOn")) {
1479          this.getBasedOn().remove(value);
1480        } else if (name.equals("category")) {
1481          this.category = null;
1482        } else if (name.equals("priority")) {
1483          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
1484          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
1485        } else if (name.equals("deliverFor")) {
1486          this.deliverFor = null;
1487        } else if (name.equals("item")) {
1488          this.item = null;
1489        } else if (name.equals("quantity")) {
1490          this.quantity = null;
1491        } else if (name.equals("parameter")) {
1492          this.getParameter().remove((SupplyRequestParameterComponent) value);
1493        } else if (name.equals("occurrence[x]")) {
1494          this.occurrence = null;
1495        } else if (name.equals("authoredOn")) {
1496          this.authoredOn = null;
1497        } else if (name.equals("requester")) {
1498          this.requester = null;
1499        } else if (name.equals("supplier")) {
1500          this.getSupplier().remove(value);
1501        } else if (name.equals("reason")) {
1502          this.getReason().remove(value);
1503        } else if (name.equals("deliverFrom")) {
1504          this.deliverFrom = null;
1505        } else if (name.equals("deliverTo")) {
1506          this.deliverTo = null;
1507        } else
1508          super.removeChild(name, value);
1509        
1510      }
1511
1512      @Override
1513      public Base makeProperty(int hash, String name) throws FHIRException {
1514        switch (hash) {
1515        case -1618432855:  return addIdentifier(); 
1516        case -892481550:  return getStatusElement();
1517        case -332612366:  return addBasedOn(); 
1518        case 50511102:  return getCategory();
1519        case -1165461084:  return getPriorityElement();
1520        case 1077755236:  return getDeliverFor();
1521        case 3242771:  return getItem();
1522        case -1285004149:  return getQuantity();
1523        case 1954460585:  return addParameter(); 
1524        case -2022646513:  return getOccurrence();
1525        case 1687874001:  return getOccurrence();
1526        case -1500852503:  return getAuthoredOnElement();
1527        case 693933948:  return getRequester();
1528        case -1663305268:  return addSupplier(); 
1529        case -934964668:  return addReason(); 
1530        case -949323153:  return getDeliverFrom();
1531        case -242327936:  return getDeliverTo();
1532        default: return super.makeProperty(hash, name);
1533        }
1534
1535      }
1536
1537      @Override
1538      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1539        switch (hash) {
1540        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1541        case -892481550: /*status*/ return new String[] {"code"};
1542        case -332612366: /*basedOn*/ return new String[] {"Reference"};
1543        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
1544        case -1165461084: /*priority*/ return new String[] {"code"};
1545        case 1077755236: /*deliverFor*/ return new String[] {"Reference"};
1546        case 3242771: /*item*/ return new String[] {"CodeableReference"};
1547        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
1548        case 1954460585: /*parameter*/ return new String[] {};
1549        case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"};
1550        case -1500852503: /*authoredOn*/ return new String[] {"dateTime"};
1551        case 693933948: /*requester*/ return new String[] {"Reference"};
1552        case -1663305268: /*supplier*/ return new String[] {"Reference"};
1553        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
1554        case -949323153: /*deliverFrom*/ return new String[] {"Reference"};
1555        case -242327936: /*deliverTo*/ return new String[] {"Reference"};
1556        default: return super.getTypesForProperty(hash, name);
1557        }
1558
1559      }
1560
1561      @Override
1562      public Base addChild(String name) throws FHIRException {
1563        if (name.equals("identifier")) {
1564          return addIdentifier();
1565        }
1566        else if (name.equals("status")) {
1567          throw new FHIRException("Cannot call addChild on a singleton property SupplyRequest.status");
1568        }
1569        else if (name.equals("basedOn")) {
1570          return addBasedOn();
1571        }
1572        else if (name.equals("category")) {
1573          this.category = new CodeableConcept();
1574          return this.category;
1575        }
1576        else if (name.equals("priority")) {
1577          throw new FHIRException("Cannot call addChild on a singleton property SupplyRequest.priority");
1578        }
1579        else if (name.equals("deliverFor")) {
1580          this.deliverFor = new Reference();
1581          return this.deliverFor;
1582        }
1583        else if (name.equals("item")) {
1584          this.item = new CodeableReference();
1585          return this.item;
1586        }
1587        else if (name.equals("quantity")) {
1588          this.quantity = new Quantity();
1589          return this.quantity;
1590        }
1591        else if (name.equals("parameter")) {
1592          return addParameter();
1593        }
1594        else if (name.equals("occurrenceDateTime")) {
1595          this.occurrence = new DateTimeType();
1596          return this.occurrence;
1597        }
1598        else if (name.equals("occurrencePeriod")) {
1599          this.occurrence = new Period();
1600          return this.occurrence;
1601        }
1602        else if (name.equals("occurrenceTiming")) {
1603          this.occurrence = new Timing();
1604          return this.occurrence;
1605        }
1606        else if (name.equals("authoredOn")) {
1607          throw new FHIRException("Cannot call addChild on a singleton property SupplyRequest.authoredOn");
1608        }
1609        else if (name.equals("requester")) {
1610          this.requester = new Reference();
1611          return this.requester;
1612        }
1613        else if (name.equals("supplier")) {
1614          return addSupplier();
1615        }
1616        else if (name.equals("reason")) {
1617          return addReason();
1618        }
1619        else if (name.equals("deliverFrom")) {
1620          this.deliverFrom = new Reference();
1621          return this.deliverFrom;
1622        }
1623        else if (name.equals("deliverTo")) {
1624          this.deliverTo = new Reference();
1625          return this.deliverTo;
1626        }
1627        else
1628          return super.addChild(name);
1629      }
1630
1631  public String fhirType() {
1632    return "SupplyRequest";
1633
1634  }
1635
1636      public SupplyRequest copy() {
1637        SupplyRequest dst = new SupplyRequest();
1638        copyValues(dst);
1639        return dst;
1640      }
1641
1642      public void copyValues(SupplyRequest dst) {
1643        super.copyValues(dst);
1644        if (identifier != null) {
1645          dst.identifier = new ArrayList<Identifier>();
1646          for (Identifier i : identifier)
1647            dst.identifier.add(i.copy());
1648        };
1649        dst.status = status == null ? null : status.copy();
1650        if (basedOn != null) {
1651          dst.basedOn = new ArrayList<Reference>();
1652          for (Reference i : basedOn)
1653            dst.basedOn.add(i.copy());
1654        };
1655        dst.category = category == null ? null : category.copy();
1656        dst.priority = priority == null ? null : priority.copy();
1657        dst.deliverFor = deliverFor == null ? null : deliverFor.copy();
1658        dst.item = item == null ? null : item.copy();
1659        dst.quantity = quantity == null ? null : quantity.copy();
1660        if (parameter != null) {
1661          dst.parameter = new ArrayList<SupplyRequestParameterComponent>();
1662          for (SupplyRequestParameterComponent i : parameter)
1663            dst.parameter.add(i.copy());
1664        };
1665        dst.occurrence = occurrence == null ? null : occurrence.copy();
1666        dst.authoredOn = authoredOn == null ? null : authoredOn.copy();
1667        dst.requester = requester == null ? null : requester.copy();
1668        if (supplier != null) {
1669          dst.supplier = new ArrayList<Reference>();
1670          for (Reference i : supplier)
1671            dst.supplier.add(i.copy());
1672        };
1673        if (reason != null) {
1674          dst.reason = new ArrayList<CodeableReference>();
1675          for (CodeableReference i : reason)
1676            dst.reason.add(i.copy());
1677        };
1678        dst.deliverFrom = deliverFrom == null ? null : deliverFrom.copy();
1679        dst.deliverTo = deliverTo == null ? null : deliverTo.copy();
1680      }
1681
1682      protected SupplyRequest typedCopy() {
1683        return copy();
1684      }
1685
1686      @Override
1687      public boolean equalsDeep(Base other_) {
1688        if (!super.equalsDeep(other_))
1689          return false;
1690        if (!(other_ instanceof SupplyRequest))
1691          return false;
1692        SupplyRequest o = (SupplyRequest) other_;
1693        return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(basedOn, o.basedOn, true)
1694           && compareDeep(category, o.category, true) && compareDeep(priority, o.priority, true) && compareDeep(deliverFor, o.deliverFor, true)
1695           && compareDeep(item, o.item, true) && compareDeep(quantity, o.quantity, true) && compareDeep(parameter, o.parameter, true)
1696           && compareDeep(occurrence, o.occurrence, true) && compareDeep(authoredOn, o.authoredOn, true) && compareDeep(requester, o.requester, true)
1697           && compareDeep(supplier, o.supplier, true) && compareDeep(reason, o.reason, true) && compareDeep(deliverFrom, o.deliverFrom, true)
1698           && compareDeep(deliverTo, o.deliverTo, true);
1699      }
1700
1701      @Override
1702      public boolean equalsShallow(Base other_) {
1703        if (!super.equalsShallow(other_))
1704          return false;
1705        if (!(other_ instanceof SupplyRequest))
1706          return false;
1707        SupplyRequest o = (SupplyRequest) other_;
1708        return compareValues(status, o.status, true) && compareValues(priority, o.priority, true) && compareValues(authoredOn, o.authoredOn, true)
1709          ;
1710      }
1711
1712      public boolean isEmpty() {
1713        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, basedOn
1714          , category, priority, deliverFor, item, quantity, parameter, occurrence, authoredOn
1715          , requester, supplier, reason, deliverFrom, deliverTo);
1716      }
1717
1718  @Override
1719  public ResourceType getResourceType() {
1720    return ResourceType.SupplyRequest;
1721   }
1722
1723 /**
1724   * Search parameter: <b>category</b>
1725   * <p>
1726   * Description: <b>The kind of supply (central, non-stock, etc.)</b><br>
1727   * Type: <b>token</b><br>
1728   * Path: <b>SupplyRequest.category</b><br>
1729   * </p>
1730   */
1731  @SearchParamDefinition(name="category", path="SupplyRequest.category", description="The kind of supply (central, non-stock, etc.)", type="token" )
1732  public static final String SP_CATEGORY = "category";
1733 /**
1734   * <b>Fluent Client</b> search parameter constant for <b>category</b>
1735   * <p>
1736   * Description: <b>The kind of supply (central, non-stock, etc.)</b><br>
1737   * Type: <b>token</b><br>
1738   * Path: <b>SupplyRequest.category</b><br>
1739   * </p>
1740   */
1741  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
1742
1743 /**
1744   * Search parameter: <b>requester</b>
1745   * <p>
1746   * Description: <b>Individual making the request</b><br>
1747   * Type: <b>reference</b><br>
1748   * Path: <b>SupplyRequest.requester</b><br>
1749   * </p>
1750   */
1751  @SearchParamDefinition(name="requester", path="SupplyRequest.requester", description="Individual making the request", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={CareTeam.class, Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
1752  public static final String SP_REQUESTER = "requester";
1753 /**
1754   * <b>Fluent Client</b> search parameter constant for <b>requester</b>
1755   * <p>
1756   * Description: <b>Individual making the request</b><br>
1757   * Type: <b>reference</b><br>
1758   * Path: <b>SupplyRequest.requester</b><br>
1759   * </p>
1760   */
1761  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER);
1762
1763/**
1764   * Constant for fluent queries to be used to add include statements. Specifies
1765   * the path value of "<b>SupplyRequest:requester</b>".
1766   */
1767  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("SupplyRequest:requester").toLocked();
1768
1769 /**
1770   * Search parameter: <b>status</b>
1771   * <p>
1772   * Description: <b>draft | active | suspended +</b><br>
1773   * Type: <b>token</b><br>
1774   * Path: <b>SupplyRequest.status</b><br>
1775   * </p>
1776   */
1777  @SearchParamDefinition(name="status", path="SupplyRequest.status", description="draft | active | suspended +", type="token" )
1778  public static final String SP_STATUS = "status";
1779 /**
1780   * <b>Fluent Client</b> search parameter constant for <b>status</b>
1781   * <p>
1782   * Description: <b>draft | active | suspended +</b><br>
1783   * Type: <b>token</b><br>
1784   * Path: <b>SupplyRequest.status</b><br>
1785   * </p>
1786   */
1787  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
1788
1789 /**
1790   * Search parameter: <b>subject</b>
1791   * <p>
1792   * Description: <b>The destination of the supply</b><br>
1793   * Type: <b>reference</b><br>
1794   * Path: <b>SupplyRequest.deliverTo</b><br>
1795   * </p>
1796   */
1797  @SearchParamDefinition(name="subject", path="SupplyRequest.deliverTo", description="The destination of the supply", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Location.class, Organization.class, Patient.class, RelatedPerson.class } )
1798  public static final String SP_SUBJECT = "subject";
1799 /**
1800   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1801   * <p>
1802   * Description: <b>The destination of the supply</b><br>
1803   * Type: <b>reference</b><br>
1804   * Path: <b>SupplyRequest.deliverTo</b><br>
1805   * </p>
1806   */
1807  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1808
1809/**
1810   * Constant for fluent queries to be used to add include statements. Specifies
1811   * the path value of "<b>SupplyRequest:subject</b>".
1812   */
1813  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("SupplyRequest:subject").toLocked();
1814
1815 /**
1816   * Search parameter: <b>supplier</b>
1817   * <p>
1818   * Description: <b>Who is intended to fulfill the request</b><br>
1819   * Type: <b>reference</b><br>
1820   * Path: <b>SupplyRequest.supplier</b><br>
1821   * </p>
1822   */
1823  @SearchParamDefinition(name="supplier", path="SupplyRequest.supplier", description="Who is intended to fulfill the request", type="reference", target={HealthcareService.class, Organization.class } )
1824  public static final String SP_SUPPLIER = "supplier";
1825 /**
1826   * <b>Fluent Client</b> search parameter constant for <b>supplier</b>
1827   * <p>
1828   * Description: <b>Who is intended to fulfill the request</b><br>
1829   * Type: <b>reference</b><br>
1830   * Path: <b>SupplyRequest.supplier</b><br>
1831   * </p>
1832   */
1833  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUPPLIER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUPPLIER);
1834
1835/**
1836   * Constant for fluent queries to be used to add include statements. Specifies
1837   * the path value of "<b>SupplyRequest:supplier</b>".
1838   */
1839  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUPPLIER = new ca.uhn.fhir.model.api.Include("SupplyRequest:supplier").toLocked();
1840
1841 /**
1842   * Search parameter: <b>date</b>
1843   * <p>
1844   * Description: <b>Multiple Resources: 
1845
1846* [AdverseEvent](adverseevent.html): When the event occurred
1847* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1848* [Appointment](appointment.html): Appointment date/time.
1849* [AuditEvent](auditevent.html): Time when the event was recorded
1850* [CarePlan](careplan.html): Time period plan covers
1851* [CareTeam](careteam.html): A date within the coverage time period.
1852* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1853* [Composition](composition.html): Composition editing time
1854* [Consent](consent.html): When consent was agreed to
1855* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1856* [DocumentReference](documentreference.html): When this document reference was created
1857* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1858* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1859* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1860* [Flag](flag.html): Time period when flag is active
1861* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1862* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
1863* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
1864* [Invoice](invoice.html): Invoice date / posting date
1865* [List](list.html): When the list was prepared
1866* [MeasureReport](measurereport.html): The date of the measure report
1867* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
1868* [Observation](observation.html): Clinically relevant time/time-period for observation
1869* [Procedure](procedure.html): When the procedure occurred or is occurring
1870* [ResearchSubject](researchsubject.html): Start and end of participation
1871* [RiskAssessment](riskassessment.html): When was assessment made?
1872* [SupplyRequest](supplyrequest.html): When the request was made
1873</b><br>
1874   * Type: <b>date</b><br>
1875   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
1876   * </p>
1877   */
1878  @SearchParamDefinition(name="date", path="AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn", description="Multiple Resources: \r\n\r\n* [AdverseEvent](adverseevent.html): When the event occurred\r\n* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded\r\n* [Appointment](appointment.html): Appointment date/time.\r\n* [AuditEvent](auditevent.html): Time when the event was recorded\r\n* [CarePlan](careplan.html): Time period plan covers\r\n* [CareTeam](careteam.html): A date within the coverage time period.\r\n* [ClinicalImpression](clinicalimpression.html): When the assessment was documented\r\n* [Composition](composition.html): Composition editing time\r\n* [Consent](consent.html): When consent was agreed to\r\n* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report\r\n* [DocumentReference](documentreference.html): When this document reference was created\r\n* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted\r\n* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period\r\n* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated\r\n* [Flag](flag.html): Time period when flag is active\r\n* [Immunization](immunization.html): Vaccination  (non)-Administration Date\r\n* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created\r\n* [Invoice](invoice.html): Invoice date / posting date\r\n* [List](list.html): When the list was prepared\r\n* [MeasureReport](measurereport.html): The date of the measure report\r\n* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication\r\n* [Observation](observation.html): Clinically relevant time/time-period for observation\r\n* [Procedure](procedure.html): When the procedure occurred or is occurring\r\n* [ResearchSubject](researchsubject.html): Start and end of participation\r\n* [RiskAssessment](riskassessment.html): When was assessment made?\r\n* [SupplyRequest](supplyrequest.html): When the request was made\r\n", type="date" )
1879  public static final String SP_DATE = "date";
1880 /**
1881   * <b>Fluent Client</b> search parameter constant for <b>date</b>
1882   * <p>
1883   * Description: <b>Multiple Resources: 
1884
1885* [AdverseEvent](adverseevent.html): When the event occurred
1886* [AllergyIntolerance](allergyintolerance.html): Date first version of the resource instance was recorded
1887* [Appointment](appointment.html): Appointment date/time.
1888* [AuditEvent](auditevent.html): Time when the event was recorded
1889* [CarePlan](careplan.html): Time period plan covers
1890* [CareTeam](careteam.html): A date within the coverage time period.
1891* [ClinicalImpression](clinicalimpression.html): When the assessment was documented
1892* [Composition](composition.html): Composition editing time
1893* [Consent](consent.html): When consent was agreed to
1894* [DiagnosticReport](diagnosticreport.html): The clinically relevant time of the report
1895* [DocumentReference](documentreference.html): When this document reference was created
1896* [Encounter](encounter.html): A date within the actualPeriod the Encounter lasted
1897* [EpisodeOfCare](episodeofcare.html): The provided date search value falls within the episode of care's period
1898* [FamilyMemberHistory](familymemberhistory.html): When history was recorded or last updated
1899* [Flag](flag.html): Time period when flag is active
1900* [Immunization](immunization.html): Vaccination  (non)-Administration Date
1901* [ImmunizationEvaluation](immunizationevaluation.html): Date the evaluation was generated
1902* [ImmunizationRecommendation](immunizationrecommendation.html): Date recommendation(s) created
1903* [Invoice](invoice.html): Invoice date / posting date
1904* [List](list.html): When the list was prepared
1905* [MeasureReport](measurereport.html): The date of the measure report
1906* [NutritionIntake](nutritionintake.html): Date when patient was taking (or not taking) the medication
1907* [Observation](observation.html): Clinically relevant time/time-period for observation
1908* [Procedure](procedure.html): When the procedure occurred or is occurring
1909* [ResearchSubject](researchsubject.html): Start and end of participation
1910* [RiskAssessment](riskassessment.html): When was assessment made?
1911* [SupplyRequest](supplyrequest.html): When the request was made
1912</b><br>
1913   * Type: <b>date</b><br>
1914   * Path: <b>AdverseEvent.occurrence.ofType(dateTime) | AdverseEvent.occurrence.ofType(Period) | AdverseEvent.occurrence.ofType(Timing) | AllergyIntolerance.recordedDate | (start | requestedPeriod.start).first() | AuditEvent.recorded | CarePlan.period | ClinicalImpression.date | Composition.date | Consent.date | DiagnosticReport.effective.ofType(dateTime) | DiagnosticReport.effective.ofType(Period) | DocumentReference.date | Encounter.actualPeriod | EpisodeOfCare.period | FamilyMemberHistory.date | Flag.period | (Immunization.occurrence.ofType(dateTime)) | ImmunizationEvaluation.date | ImmunizationRecommendation.date | Invoice.date | List.date | MeasureReport.date | NutritionIntake.occurrence.ofType(dateTime) | NutritionIntake.occurrence.ofType(Period) | Observation.effective.ofType(dateTime) | Observation.effective.ofType(Period) | Observation.effective.ofType(Timing) | Observation.effective.ofType(instant) | Procedure.occurrence.ofType(dateTime) | Procedure.occurrence.ofType(Period) | Procedure.occurrence.ofType(Timing) | ResearchSubject.period | (RiskAssessment.occurrence.ofType(dateTime)) | SupplyRequest.authoredOn</b><br>
1915   * </p>
1916   */
1917  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
1918
1919 /**
1920   * Search parameter: <b>identifier</b>
1921   * <p>
1922   * Description: <b>Multiple Resources: 
1923
1924* [Account](account.html): Account number
1925* [AdverseEvent](adverseevent.html): Business identifier for the event
1926* [AllergyIntolerance](allergyintolerance.html): External ids for this item
1927* [Appointment](appointment.html): An Identifier of the Appointment
1928* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
1929* [Basic](basic.html): Business identifier
1930* [BodyStructure](bodystructure.html): Bodystructure identifier
1931* [CarePlan](careplan.html): External Ids for this plan
1932* [CareTeam](careteam.html): External Ids for this team
1933* [ChargeItem](chargeitem.html): Business Identifier for item
1934* [Claim](claim.html): The primary identifier of the financial resource
1935* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
1936* [ClinicalImpression](clinicalimpression.html): Business identifier
1937* [Communication](communication.html): Unique identifier
1938* [CommunicationRequest](communicationrequest.html): Unique identifier
1939* [Composition](composition.html): Version-independent identifier for the Composition
1940* [Condition](condition.html): A unique identifier of the condition record
1941* [Consent](consent.html): Identifier for this record (external references)
1942* [Contract](contract.html): The identity of the contract
1943* [Coverage](coverage.html): The primary identifier of the insured and the coverage
1944* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
1945* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
1946* [DetectedIssue](detectedissue.html): Unique id for the detected issue
1947* [DeviceRequest](devicerequest.html): Business identifier for request/order
1948* [DeviceUsage](deviceusage.html): Search by identifier
1949* [DiagnosticReport](diagnosticreport.html): An identifier for the report
1950* [DocumentReference](documentreference.html): Identifier of the attachment binary
1951* [Encounter](encounter.html): Identifier(s) by which this encounter is known
1952* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
1953* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
1954* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
1955* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
1956* [Flag](flag.html): Business identifier
1957* [Goal](goal.html): External Ids for this goal
1958* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
1959* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
1960* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
1961* [Immunization](immunization.html): Business identifier
1962* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
1963* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
1964* [Invoice](invoice.html): Business Identifier for item
1965* [List](list.html): Business identifier
1966* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
1967* [Medication](medication.html): Returns medications with this external identifier
1968* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
1969* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
1970* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
1971* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
1972* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
1973* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
1974* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
1975* [Observation](observation.html): The unique id for a particular observation
1976* [Person](person.html): A person Identifier
1977* [Procedure](procedure.html): A unique identifier for a procedure
1978* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
1979* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
1980* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
1981* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
1982* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
1983* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
1984* [Specimen](specimen.html): The unique identifier associated with the specimen
1985* [SupplyDelivery](supplydelivery.html): External identifier
1986* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
1987* [Task](task.html): Search for a task instance by its business identifier
1988* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
1989</b><br>
1990   * Type: <b>token</b><br>
1991   * 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>
1992   * </p>
1993   */
1994  @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" )
1995  public static final String SP_IDENTIFIER = "identifier";
1996 /**
1997   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1998   * <p>
1999   * Description: <b>Multiple Resources: 
2000
2001* [Account](account.html): Account number
2002* [AdverseEvent](adverseevent.html): Business identifier for the event
2003* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2004* [Appointment](appointment.html): An Identifier of the Appointment
2005* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2006* [Basic](basic.html): Business identifier
2007* [BodyStructure](bodystructure.html): Bodystructure identifier
2008* [CarePlan](careplan.html): External Ids for this plan
2009* [CareTeam](careteam.html): External Ids for this team
2010* [ChargeItem](chargeitem.html): Business Identifier for item
2011* [Claim](claim.html): The primary identifier of the financial resource
2012* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2013* [ClinicalImpression](clinicalimpression.html): Business identifier
2014* [Communication](communication.html): Unique identifier
2015* [CommunicationRequest](communicationrequest.html): Unique identifier
2016* [Composition](composition.html): Version-independent identifier for the Composition
2017* [Condition](condition.html): A unique identifier of the condition record
2018* [Consent](consent.html): Identifier for this record (external references)
2019* [Contract](contract.html): The identity of the contract
2020* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2021* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2022* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2023* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2024* [DeviceRequest](devicerequest.html): Business identifier for request/order
2025* [DeviceUsage](deviceusage.html): Search by identifier
2026* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2027* [DocumentReference](documentreference.html): Identifier of the attachment binary
2028* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2029* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2030* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2031* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2032* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2033* [Flag](flag.html): Business identifier
2034* [Goal](goal.html): External Ids for this goal
2035* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2036* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2037* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2038* [Immunization](immunization.html): Business identifier
2039* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2040* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2041* [Invoice](invoice.html): Business Identifier for item
2042* [List](list.html): Business identifier
2043* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2044* [Medication](medication.html): Returns medications with this external identifier
2045* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2046* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2047* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2048* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2049* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2050* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2051* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2052* [Observation](observation.html): The unique id for a particular observation
2053* [Person](person.html): A person Identifier
2054* [Procedure](procedure.html): A unique identifier for a procedure
2055* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2056* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2057* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2058* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2059* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2060* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2061* [Specimen](specimen.html): The unique identifier associated with the specimen
2062* [SupplyDelivery](supplydelivery.html): External identifier
2063* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2064* [Task](task.html): Search for a task instance by its business identifier
2065* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2066</b><br>
2067   * Type: <b>token</b><br>
2068   * 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>
2069   * </p>
2070   */
2071  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2072
2073 /**
2074   * Search parameter: <b>patient</b>
2075   * <p>
2076   * Description: <b>Multiple Resources: 
2077
2078* [Account](account.html): The entity that caused the expenses
2079* [AdverseEvent](adverseevent.html): Subject impacted by event
2080* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2081* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2082* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2083* [AuditEvent](auditevent.html): Where the activity involved patient data
2084* [Basic](basic.html): Identifies the focus of this resource
2085* [BodyStructure](bodystructure.html): Who this is about
2086* [CarePlan](careplan.html): Who the care plan is for
2087* [CareTeam](careteam.html): Who care team is for
2088* [ChargeItem](chargeitem.html): Individual service was done for/to
2089* [Claim](claim.html): Patient receiving the products or services
2090* [ClaimResponse](claimresponse.html): The subject of care
2091* [ClinicalImpression](clinicalimpression.html): Patient assessed
2092* [Communication](communication.html): Focus of message
2093* [CommunicationRequest](communicationrequest.html): Focus of message
2094* [Composition](composition.html): Who and/or what the composition is about
2095* [Condition](condition.html): Who has the condition?
2096* [Consent](consent.html): Who the consent applies to
2097* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2098* [Coverage](coverage.html): Retrieve coverages for a patient
2099* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2100* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2101* [DetectedIssue](detectedissue.html): Associated patient
2102* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2103* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2104* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2105* [DocumentReference](documentreference.html): Who/what is the subject of the document
2106* [Encounter](encounter.html): The patient present at the encounter
2107* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2108* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2109* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2110* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2111* [Flag](flag.html): The identity of a subject to list flags for
2112* [Goal](goal.html): Who this goal is intended for
2113* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2114* [ImagingSelection](imagingselection.html): Who the study is about
2115* [ImagingStudy](imagingstudy.html): Who the study is about
2116* [Immunization](immunization.html): The patient for the vaccination record
2117* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2118* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2119* [Invoice](invoice.html): Recipient(s) of goods and services
2120* [List](list.html): If all resources have the same subject
2121* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2122* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2123* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2124* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2125* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2126* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2127* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2128* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2129* [Observation](observation.html): The subject that the observation is about (if patient)
2130* [Person](person.html): The Person links to this Patient
2131* [Procedure](procedure.html): Search by subject - a patient
2132* [Provenance](provenance.html): Where the activity involved patient data
2133* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2134* [RelatedPerson](relatedperson.html): The patient this related person is related to
2135* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2136* [ResearchSubject](researchsubject.html): Who or what is part of study
2137* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2138* [ServiceRequest](servicerequest.html): Search by subject - a patient
2139* [Specimen](specimen.html): The patient the specimen comes from
2140* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2141* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2142* [Task](task.html): Search by patient
2143* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2144</b><br>
2145   * Type: <b>reference</b><br>
2146   * 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>
2147   * </p>
2148   */
2149  @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", target={Patient.class } )
2150  public static final String SP_PATIENT = "patient";
2151 /**
2152   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2153   * <p>
2154   * Description: <b>Multiple Resources: 
2155
2156* [Account](account.html): The entity that caused the expenses
2157* [AdverseEvent](adverseevent.html): Subject impacted by event
2158* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2159* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2160* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2161* [AuditEvent](auditevent.html): Where the activity involved patient data
2162* [Basic](basic.html): Identifies the focus of this resource
2163* [BodyStructure](bodystructure.html): Who this is about
2164* [CarePlan](careplan.html): Who the care plan is for
2165* [CareTeam](careteam.html): Who care team is for
2166* [ChargeItem](chargeitem.html): Individual service was done for/to
2167* [Claim](claim.html): Patient receiving the products or services
2168* [ClaimResponse](claimresponse.html): The subject of care
2169* [ClinicalImpression](clinicalimpression.html): Patient assessed
2170* [Communication](communication.html): Focus of message
2171* [CommunicationRequest](communicationrequest.html): Focus of message
2172* [Composition](composition.html): Who and/or what the composition is about
2173* [Condition](condition.html): Who has the condition?
2174* [Consent](consent.html): Who the consent applies to
2175* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2176* [Coverage](coverage.html): Retrieve coverages for a patient
2177* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2178* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2179* [DetectedIssue](detectedissue.html): Associated patient
2180* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2181* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2182* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2183* [DocumentReference](documentreference.html): Who/what is the subject of the document
2184* [Encounter](encounter.html): The patient present at the encounter
2185* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2186* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2187* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2188* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2189* [Flag](flag.html): The identity of a subject to list flags for
2190* [Goal](goal.html): Who this goal is intended for
2191* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2192* [ImagingSelection](imagingselection.html): Who the study is about
2193* [ImagingStudy](imagingstudy.html): Who the study is about
2194* [Immunization](immunization.html): The patient for the vaccination record
2195* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2196* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2197* [Invoice](invoice.html): Recipient(s) of goods and services
2198* [List](list.html): If all resources have the same subject
2199* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2200* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2201* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2202* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2203* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2204* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2205* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2206* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2207* [Observation](observation.html): The subject that the observation is about (if patient)
2208* [Person](person.html): The Person links to this Patient
2209* [Procedure](procedure.html): Search by subject - a patient
2210* [Provenance](provenance.html): Where the activity involved patient data
2211* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2212* [RelatedPerson](relatedperson.html): The patient this related person is related to
2213* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2214* [ResearchSubject](researchsubject.html): Who or what is part of study
2215* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2216* [ServiceRequest](servicerequest.html): Search by subject - a patient
2217* [Specimen](specimen.html): The patient the specimen comes from
2218* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2219* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2220* [Task](task.html): Search by patient
2221* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2222</b><br>
2223   * Type: <b>reference</b><br>
2224   * 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>
2225   * </p>
2226   */
2227  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2228
2229/**
2230   * Constant for fluent queries to be used to add include statements. Specifies
2231   * the path value of "<b>SupplyRequest:patient</b>".
2232   */
2233  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("SupplyRequest:patient").toLocked();
2234
2235
2236}
2237