001package org.hl7.fhir.r5.model;
002
003
004/*
005 * #%L
006 * org.hl7.fhir.r5
007 * %%
008 * Copyright (C) 2014 - 2019 Health Level 7
009 * %%
010 * Licensed under the Apache License, Version 2.0 (the \"License\");
011 * you may not use this file except in compliance with the License.
012 * You may obtain a copy of the License at
013 * 
014 *      http://www.apache.org/licenses/LICENSE-2.0
015 * 
016 * Unless required by applicable law or agreed to in writing, software
017 * distributed under the License is distributed on an \"AS IS\" BASIS,
018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019 * See the License for the specific language governing permissions and
020 * limitations under the License.
021 * #L%
022 */
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, \
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this \
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, \
034     this list of conditions and the following disclaimer in the documentation \
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
049  POSSIBILITY OF SUCH DAMAGE.
050  */
051
052// Generated on Tue, Dec 31, 2019 12:12+1100 for FHIR vcurrent
053
054import java.util.ArrayList;
055import java.util.Date;
056import java.util.List;
057import org.hl7.fhir.utilities.Utilities;
058import org.hl7.fhir.r5.model.Enumerations.*;
059import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
060import org.hl7.fhir.exceptions.FHIRException;
061import org.hl7.fhir.instance.model.api.ICompositeType;
062import ca.uhn.fhir.model.api.annotation.ResourceDef;
063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
064import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
065import ca.uhn.fhir.model.api.annotation.Child;
066import ca.uhn.fhir.model.api.annotation.ChildOrder;
067import ca.uhn.fhir.model.api.annotation.Description;
068import ca.uhn.fhir.model.api.annotation.Block;
069
070/**
071 * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
072 */
073@ResourceDef(name="ServiceRequest", profile="http://hl7.org/fhir/StructureDefinition/ServiceRequest")
074public class ServiceRequest extends DomainResource {
075
076    /**
077     * Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.
078     */
079    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
080    @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller." )
081    protected List<Identifier> identifier;
082
083    /**
084     * The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.
085     */
086    @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
087    @Description(shortDefinition="Instantiates FHIR protocol or definition", formalDefinition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest." )
088    protected List<CanonicalType> instantiatesCanonical;
089
090    /**
091     * The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.
092     */
093    @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
094    @Description(shortDefinition="Instantiates external protocol or definition", formalDefinition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest." )
095    protected List<UriType> instantiatesUri;
096
097    /**
098     * Plan/proposal/order fulfilled by this request.
099     */
100    @Child(name = "basedOn", type = {CarePlan.class, ServiceRequest.class, MedicationRequest.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
101    @Description(shortDefinition="What request fulfills", formalDefinition="Plan/proposal/order fulfilled by this request." )
102    protected List<Reference> basedOn;
103
104    /**
105     * The request takes the place of the referenced completed or terminated request(s).
106     */
107    @Child(name = "replaces", type = {ServiceRequest.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
108    @Description(shortDefinition="What request replaces", formalDefinition="The request takes the place of the referenced completed or terminated request(s)." )
109    protected List<Reference> replaces;
110
111    /**
112     * A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.
113     */
114    @Child(name = "requisition", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true)
115    @Description(shortDefinition="Composite Request ID", formalDefinition="A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier." )
116    protected Identifier requisition;
117
118    /**
119     * The status of the order.
120     */
121    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
122    @Description(shortDefinition="draft | active | on-hold | revoked | completed | entered-in-error | unknown", formalDefinition="The status of the order." )
123    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-status")
124    protected Enumeration<RequestStatus> status;
125
126    /**
127     * Whether the request is a proposal, plan, an original order or a reflex order.
128     */
129    @Child(name = "intent", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true)
130    @Description(shortDefinition="proposal | plan | directive | order +", formalDefinition="Whether the request is a proposal, plan, an original order or a reflex order." )
131    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-intent")
132    protected Enumeration<RequestIntent> intent;
133
134    /**
135     * A code that classifies the service for searching, sorting and display purposes (e.g. "Surgical Procedure").
136     */
137    @Child(name = "category", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
138    @Description(shortDefinition="Classification of service", formalDefinition="A code that classifies the service for searching, sorting and display purposes (e.g. \"Surgical Procedure\")." )
139    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/servicerequest-category")
140    protected List<CodeableConcept> category;
141
142    /**
143     * Indicates how quickly the ServiceRequest should be addressed with respect to other requests.
144     */
145    @Child(name = "priority", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=true)
146    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the ServiceRequest should be addressed with respect to other requests." )
147    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
148    protected Enumeration<RequestPriority> priority;
149
150    /**
151     * Set this to true if the record is saying that the service/procedure should NOT be performed.
152     */
153    @Child(name = "doNotPerform", type = {BooleanType.class}, order=10, min=0, max=1, modifier=true, summary=true)
154    @Description(shortDefinition="True if service/procedure should not be performed", formalDefinition="Set this to true if the record is saying that the service/procedure should NOT be performed." )
155    protected BooleanType doNotPerform;
156
157    /**
158     * A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.
159     */
160    @Child(name = "code", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=true)
161    @Description(shortDefinition="What is being requested/ordered", formalDefinition="A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested." )
162    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-code")
163    protected CodeableConcept code;
164
165    /**
166     * Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.
167     */
168    @Child(name = "orderDetail", type = {CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
169    @Description(shortDefinition="Additional order information", formalDefinition="Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied." )
170    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/servicerequest-orderdetail")
171    protected List<CodeableConcept> orderDetail;
172
173    /**
174     * An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).
175     */
176    @Child(name = "quantity", type = {Quantity.class, Ratio.class, Range.class}, order=13, min=0, max=1, modifier=false, summary=true)
177    @Description(shortDefinition="Service amount", formalDefinition="An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction)." )
178    protected DataType quantity;
179
180    /**
181     * On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).
182     */
183    @Child(name = "subject", type = {Patient.class, Group.class, Location.class, Device.class}, order=14, min=1, max=1, modifier=false, summary=true)
184    @Description(shortDefinition="Individual or Entity the service is ordered for", formalDefinition="On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans)." )
185    protected Reference subject;
186
187    /**
188     * An encounter that provides additional information about the healthcare context in which this request is made.
189     */
190    @Child(name = "encounter", type = {Encounter.class}, order=15, min=0, max=1, modifier=false, summary=true)
191    @Description(shortDefinition="Encounter in which the request was created", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." )
192    protected Reference encounter;
193
194    /**
195     * The date/time at which the requested service should occur.
196     */
197    @Child(name = "occurrence", type = {DateTimeType.class, Period.class, Timing.class}, order=16, min=0, max=1, modifier=false, summary=true)
198    @Description(shortDefinition="When service should occur", formalDefinition="The date/time at which the requested service should occur." )
199    protected DataType occurrence;
200
201    /**
202     * If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.
203     */
204    @Child(name = "asNeeded", type = {BooleanType.class, CodeableConcept.class}, order=17, min=0, max=1, modifier=false, summary=true)
205    @Description(shortDefinition="Preconditions for service", formalDefinition="If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc." )
206    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-as-needed-reason")
207    protected DataType asNeeded;
208
209    /**
210     * When the request transitioned to being actionable.
211     */
212    @Child(name = "authoredOn", type = {DateTimeType.class}, order=18, min=0, max=1, modifier=false, summary=true)
213    @Description(shortDefinition="Date request signed", formalDefinition="When the request transitioned to being actionable." )
214    protected DateTimeType authoredOn;
215
216    /**
217     * The individual who initiated the request and has responsibility for its activation.
218     */
219    @Child(name = "requester", type = {Practitioner.class, PractitionerRole.class, Organization.class, Patient.class, RelatedPerson.class, Device.class}, order=19, min=0, max=1, modifier=false, summary=true)
220    @Description(shortDefinition="Who/what is requesting service", formalDefinition="The individual who initiated the request and has responsibility for its activation." )
221    protected Reference requester;
222
223    /**
224     * Desired type of performer for doing the requested service.
225     */
226    @Child(name = "performerType", type = {CodeableConcept.class}, order=20, min=0, max=1, modifier=false, summary=true)
227    @Description(shortDefinition="Performer role", formalDefinition="Desired type of performer for doing the requested service." )
228    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/participant-role")
229    protected CodeableConcept performerType;
230
231    /**
232     * The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc.
233     */
234    @Child(name = "performer", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, HealthcareService.class, Patient.class, Device.class, RelatedPerson.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
235    @Description(shortDefinition="Requested performer", formalDefinition="The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc." )
236    protected List<Reference> performer;
237
238    /**
239     * The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.
240     */
241    @Child(name = "location", type = {CodeableReference.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
242    @Description(shortDefinition="Requested location", formalDefinition="The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center." )
243    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType")
244    protected List<CodeableReference> location;
245
246    /**
247     * An explanation or justification for why this service is being requested in coded or textual form.   This is often for billing purposes.  May relate to the resources referred to in `supportingInfo`.
248     */
249    @Child(name = "reason", type = {CodeableReference.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
250    @Description(shortDefinition="Explanation/Justification for procedure or service", formalDefinition="An explanation or justification for why this service is being requested in coded or textual form.   This is often for billing purposes.  May relate to the resources referred to in `supportingInfo`." )
251    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-reason")
252    protected List<CodeableReference> reason;
253
254    /**
255     * Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.
256     */
257    @Child(name = "insurance", type = {Coverage.class, ClaimResponse.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
258    @Description(shortDefinition="Associated insurance coverage", formalDefinition="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service." )
259    protected List<Reference> insurance;
260
261    /**
262     * Additional clinical information about the patient or specimen that may influence the services or their interpretations.     This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as "ask at order entry questions (AOEs)".  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements.
263     */
264    @Child(name = "supportingInfo", type = {Reference.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
265    @Description(shortDefinition="Additional clinical information", formalDefinition="Additional clinical information about the patient or specimen that may influence the services or their interpretations.     This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as \"ask at order entry questions (AOEs)\".  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements." )
266    protected List<Reference> supportingInfo;
267
268    /**
269     * One or more specimens that the laboratory procedure will use.
270     */
271    @Child(name = "specimen", type = {Specimen.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
272    @Description(shortDefinition="Procedure Samples", formalDefinition="One or more specimens that the laboratory procedure will use." )
273    protected List<Reference> specimen;
274
275    /**
276     * Anatomic location where the procedure should be performed. This is the target site.
277     */
278    @Child(name = "bodySite", type = {CodeableConcept.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
279    @Description(shortDefinition="Location on Body", formalDefinition="Anatomic location where the procedure should be performed. This is the target site." )
280    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
281    protected List<CodeableConcept> bodySite;
282
283    /**
284     * Any other notes and comments made about the service request. For example, internal billing notes.
285     */
286    @Child(name = "note", type = {Annotation.class}, order=28, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
287    @Description(shortDefinition="Comments", formalDefinition="Any other notes and comments made about the service request. For example, internal billing notes." )
288    protected List<Annotation> note;
289
290    /**
291     * Instructions in terms that are understood by the patient or consumer.
292     */
293    @Child(name = "patientInstruction", type = {StringType.class}, order=29, min=0, max=1, modifier=false, summary=true)
294    @Description(shortDefinition="Patient or consumer-oriented instructions", formalDefinition="Instructions in terms that are understood by the patient or consumer." )
295    protected StringType patientInstruction;
296
297    /**
298     * Key events in the history of the request.
299     */
300    @Child(name = "relevantHistory", type = {Provenance.class}, order=30, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
301    @Description(shortDefinition="Request provenance", formalDefinition="Key events in the history of the request." )
302    protected List<Reference> relevantHistory;
303
304    private static final long serialVersionUID = -578395935L;
305
306  /**
307   * Constructor
308   */
309    public ServiceRequest() {
310      super();
311    }
312
313  /**
314   * Constructor
315   */
316    public ServiceRequest(RequestStatus status, RequestIntent intent, Reference subject) {
317      super();
318      this.setStatus(status);
319      this.setIntent(intent);
320      this.setSubject(subject);
321    }
322
323    /**
324     * @return {@link #identifier} (Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.)
325     */
326    public List<Identifier> getIdentifier() { 
327      if (this.identifier == null)
328        this.identifier = new ArrayList<Identifier>();
329      return this.identifier;
330    }
331
332    /**
333     * @return Returns a reference to <code>this</code> for easy method chaining
334     */
335    public ServiceRequest setIdentifier(List<Identifier> theIdentifier) { 
336      this.identifier = theIdentifier;
337      return this;
338    }
339
340    public boolean hasIdentifier() { 
341      if (this.identifier == null)
342        return false;
343      for (Identifier item : this.identifier)
344        if (!item.isEmpty())
345          return true;
346      return false;
347    }
348
349    public Identifier addIdentifier() { //3
350      Identifier t = new Identifier();
351      if (this.identifier == null)
352        this.identifier = new ArrayList<Identifier>();
353      this.identifier.add(t);
354      return t;
355    }
356
357    public ServiceRequest addIdentifier(Identifier t) { //3
358      if (t == null)
359        return this;
360      if (this.identifier == null)
361        this.identifier = new ArrayList<Identifier>();
362      this.identifier.add(t);
363      return this;
364    }
365
366    /**
367     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
368     */
369    public Identifier getIdentifierFirstRep() { 
370      if (getIdentifier().isEmpty()) {
371        addIdentifier();
372      }
373      return getIdentifier().get(0);
374    }
375
376    /**
377     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
378     */
379    public List<CanonicalType> getInstantiatesCanonical() { 
380      if (this.instantiatesCanonical == null)
381        this.instantiatesCanonical = new ArrayList<CanonicalType>();
382      return this.instantiatesCanonical;
383    }
384
385    /**
386     * @return Returns a reference to <code>this</code> for easy method chaining
387     */
388    public ServiceRequest setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 
389      this.instantiatesCanonical = theInstantiatesCanonical;
390      return this;
391    }
392
393    public boolean hasInstantiatesCanonical() { 
394      if (this.instantiatesCanonical == null)
395        return false;
396      for (CanonicalType item : this.instantiatesCanonical)
397        if (!item.isEmpty())
398          return true;
399      return false;
400    }
401
402    /**
403     * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
404     */
405    public CanonicalType addInstantiatesCanonicalElement() {//2 
406      CanonicalType t = new CanonicalType();
407      if (this.instantiatesCanonical == null)
408        this.instantiatesCanonical = new ArrayList<CanonicalType>();
409      this.instantiatesCanonical.add(t);
410      return t;
411    }
412
413    /**
414     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
415     */
416    public ServiceRequest addInstantiatesCanonical(String value) { //1
417      CanonicalType t = new CanonicalType();
418      t.setValue(value);
419      if (this.instantiatesCanonical == null)
420        this.instantiatesCanonical = new ArrayList<CanonicalType>();
421      this.instantiatesCanonical.add(t);
422      return this;
423    }
424
425    /**
426     * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
427     */
428    public boolean hasInstantiatesCanonical(String value) { 
429      if (this.instantiatesCanonical == null)
430        return false;
431      for (CanonicalType v : this.instantiatesCanonical)
432        if (v.getValue().equals(value)) // canonical
433          return true;
434      return false;
435    }
436
437    /**
438     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
439     */
440    public List<UriType> getInstantiatesUri() { 
441      if (this.instantiatesUri == null)
442        this.instantiatesUri = new ArrayList<UriType>();
443      return this.instantiatesUri;
444    }
445
446    /**
447     * @return Returns a reference to <code>this</code> for easy method chaining
448     */
449    public ServiceRequest setInstantiatesUri(List<UriType> theInstantiatesUri) { 
450      this.instantiatesUri = theInstantiatesUri;
451      return this;
452    }
453
454    public boolean hasInstantiatesUri() { 
455      if (this.instantiatesUri == null)
456        return false;
457      for (UriType item : this.instantiatesUri)
458        if (!item.isEmpty())
459          return true;
460      return false;
461    }
462
463    /**
464     * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
465     */
466    public UriType addInstantiatesUriElement() {//2 
467      UriType t = new UriType();
468      if (this.instantiatesUri == null)
469        this.instantiatesUri = new ArrayList<UriType>();
470      this.instantiatesUri.add(t);
471      return t;
472    }
473
474    /**
475     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
476     */
477    public ServiceRequest addInstantiatesUri(String value) { //1
478      UriType t = new UriType();
479      t.setValue(value);
480      if (this.instantiatesUri == null)
481        this.instantiatesUri = new ArrayList<UriType>();
482      this.instantiatesUri.add(t);
483      return this;
484    }
485
486    /**
487     * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.)
488     */
489    public boolean hasInstantiatesUri(String value) { 
490      if (this.instantiatesUri == null)
491        return false;
492      for (UriType v : this.instantiatesUri)
493        if (v.getValue().equals(value)) // uri
494          return true;
495      return false;
496    }
497
498    /**
499     * @return {@link #basedOn} (Plan/proposal/order fulfilled by this request.)
500     */
501    public List<Reference> getBasedOn() { 
502      if (this.basedOn == null)
503        this.basedOn = new ArrayList<Reference>();
504      return this.basedOn;
505    }
506
507    /**
508     * @return Returns a reference to <code>this</code> for easy method chaining
509     */
510    public ServiceRequest setBasedOn(List<Reference> theBasedOn) { 
511      this.basedOn = theBasedOn;
512      return this;
513    }
514
515    public boolean hasBasedOn() { 
516      if (this.basedOn == null)
517        return false;
518      for (Reference item : this.basedOn)
519        if (!item.isEmpty())
520          return true;
521      return false;
522    }
523
524    public Reference addBasedOn() { //3
525      Reference t = new Reference();
526      if (this.basedOn == null)
527        this.basedOn = new ArrayList<Reference>();
528      this.basedOn.add(t);
529      return t;
530    }
531
532    public ServiceRequest addBasedOn(Reference t) { //3
533      if (t == null)
534        return this;
535      if (this.basedOn == null)
536        this.basedOn = new ArrayList<Reference>();
537      this.basedOn.add(t);
538      return this;
539    }
540
541    /**
542     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
543     */
544    public Reference getBasedOnFirstRep() { 
545      if (getBasedOn().isEmpty()) {
546        addBasedOn();
547      }
548      return getBasedOn().get(0);
549    }
550
551    /**
552     * @return {@link #replaces} (The request takes the place of the referenced completed or terminated request(s).)
553     */
554    public List<Reference> getReplaces() { 
555      if (this.replaces == null)
556        this.replaces = new ArrayList<Reference>();
557      return this.replaces;
558    }
559
560    /**
561     * @return Returns a reference to <code>this</code> for easy method chaining
562     */
563    public ServiceRequest setReplaces(List<Reference> theReplaces) { 
564      this.replaces = theReplaces;
565      return this;
566    }
567
568    public boolean hasReplaces() { 
569      if (this.replaces == null)
570        return false;
571      for (Reference item : this.replaces)
572        if (!item.isEmpty())
573          return true;
574      return false;
575    }
576
577    public Reference addReplaces() { //3
578      Reference t = new Reference();
579      if (this.replaces == null)
580        this.replaces = new ArrayList<Reference>();
581      this.replaces.add(t);
582      return t;
583    }
584
585    public ServiceRequest addReplaces(Reference t) { //3
586      if (t == null)
587        return this;
588      if (this.replaces == null)
589        this.replaces = new ArrayList<Reference>();
590      this.replaces.add(t);
591      return this;
592    }
593
594    /**
595     * @return The first repetition of repeating field {@link #replaces}, creating it if it does not already exist {3}
596     */
597    public Reference getReplacesFirstRep() { 
598      if (getReplaces().isEmpty()) {
599        addReplaces();
600      }
601      return getReplaces().get(0);
602    }
603
604    /**
605     * @return {@link #requisition} (A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.)
606     */
607    public Identifier getRequisition() { 
608      if (this.requisition == null)
609        if (Configuration.errorOnAutoCreate())
610          throw new Error("Attempt to auto-create ServiceRequest.requisition");
611        else if (Configuration.doAutoCreate())
612          this.requisition = new Identifier(); // cc
613      return this.requisition;
614    }
615
616    public boolean hasRequisition() { 
617      return this.requisition != null && !this.requisition.isEmpty();
618    }
619
620    /**
621     * @param value {@link #requisition} (A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.)
622     */
623    public ServiceRequest setRequisition(Identifier value) { 
624      this.requisition = value;
625      return this;
626    }
627
628    /**
629     * @return {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
630     */
631    public Enumeration<RequestStatus> getStatusElement() { 
632      if (this.status == null)
633        if (Configuration.errorOnAutoCreate())
634          throw new Error("Attempt to auto-create ServiceRequest.status");
635        else if (Configuration.doAutoCreate())
636          this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); // bb
637      return this.status;
638    }
639
640    public boolean hasStatusElement() { 
641      return this.status != null && !this.status.isEmpty();
642    }
643
644    public boolean hasStatus() { 
645      return this.status != null && !this.status.isEmpty();
646    }
647
648    /**
649     * @param value {@link #status} (The status of the order.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
650     */
651    public ServiceRequest setStatusElement(Enumeration<RequestStatus> value) { 
652      this.status = value;
653      return this;
654    }
655
656    /**
657     * @return The status of the order.
658     */
659    public RequestStatus getStatus() { 
660      return this.status == null ? null : this.status.getValue();
661    }
662
663    /**
664     * @param value The status of the order.
665     */
666    public ServiceRequest setStatus(RequestStatus value) { 
667        if (this.status == null)
668          this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory());
669        this.status.setValue(value);
670      return this;
671    }
672
673    /**
674     * @return {@link #intent} (Whether the request is a proposal, plan, an original order or a reflex order.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
675     */
676    public Enumeration<RequestIntent> getIntentElement() { 
677      if (this.intent == null)
678        if (Configuration.errorOnAutoCreate())
679          throw new Error("Attempt to auto-create ServiceRequest.intent");
680        else if (Configuration.doAutoCreate())
681          this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); // bb
682      return this.intent;
683    }
684
685    public boolean hasIntentElement() { 
686      return this.intent != null && !this.intent.isEmpty();
687    }
688
689    public boolean hasIntent() { 
690      return this.intent != null && !this.intent.isEmpty();
691    }
692
693    /**
694     * @param value {@link #intent} (Whether the request is a proposal, plan, an original order or a reflex order.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
695     */
696    public ServiceRequest setIntentElement(Enumeration<RequestIntent> value) { 
697      this.intent = value;
698      return this;
699    }
700
701    /**
702     * @return Whether the request is a proposal, plan, an original order or a reflex order.
703     */
704    public RequestIntent getIntent() { 
705      return this.intent == null ? null : this.intent.getValue();
706    }
707
708    /**
709     * @param value Whether the request is a proposal, plan, an original order or a reflex order.
710     */
711    public ServiceRequest setIntent(RequestIntent value) { 
712        if (this.intent == null)
713          this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory());
714        this.intent.setValue(value);
715      return this;
716    }
717
718    /**
719     * @return {@link #category} (A code that classifies the service for searching, sorting and display purposes (e.g. "Surgical Procedure").)
720     */
721    public List<CodeableConcept> getCategory() { 
722      if (this.category == null)
723        this.category = new ArrayList<CodeableConcept>();
724      return this.category;
725    }
726
727    /**
728     * @return Returns a reference to <code>this</code> for easy method chaining
729     */
730    public ServiceRequest setCategory(List<CodeableConcept> theCategory) { 
731      this.category = theCategory;
732      return this;
733    }
734
735    public boolean hasCategory() { 
736      if (this.category == null)
737        return false;
738      for (CodeableConcept item : this.category)
739        if (!item.isEmpty())
740          return true;
741      return false;
742    }
743
744    public CodeableConcept addCategory() { //3
745      CodeableConcept t = new CodeableConcept();
746      if (this.category == null)
747        this.category = new ArrayList<CodeableConcept>();
748      this.category.add(t);
749      return t;
750    }
751
752    public ServiceRequest addCategory(CodeableConcept t) { //3
753      if (t == null)
754        return this;
755      if (this.category == null)
756        this.category = new ArrayList<CodeableConcept>();
757      this.category.add(t);
758      return this;
759    }
760
761    /**
762     * @return The first repetition of repeating field {@link #category}, creating it if it does not already exist {3}
763     */
764    public CodeableConcept getCategoryFirstRep() { 
765      if (getCategory().isEmpty()) {
766        addCategory();
767      }
768      return getCategory().get(0);
769    }
770
771    /**
772     * @return {@link #priority} (Indicates how quickly the ServiceRequest 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
773     */
774    public Enumeration<RequestPriority> getPriorityElement() { 
775      if (this.priority == null)
776        if (Configuration.errorOnAutoCreate())
777          throw new Error("Attempt to auto-create ServiceRequest.priority");
778        else if (Configuration.doAutoCreate())
779          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
780      return this.priority;
781    }
782
783    public boolean hasPriorityElement() { 
784      return this.priority != null && !this.priority.isEmpty();
785    }
786
787    public boolean hasPriority() { 
788      return this.priority != null && !this.priority.isEmpty();
789    }
790
791    /**
792     * @param value {@link #priority} (Indicates how quickly the ServiceRequest 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
793     */
794    public ServiceRequest setPriorityElement(Enumeration<RequestPriority> value) { 
795      this.priority = value;
796      return this;
797    }
798
799    /**
800     * @return Indicates how quickly the ServiceRequest should be addressed with respect to other requests.
801     */
802    public RequestPriority getPriority() { 
803      return this.priority == null ? null : this.priority.getValue();
804    }
805
806    /**
807     * @param value Indicates how quickly the ServiceRequest should be addressed with respect to other requests.
808     */
809    public ServiceRequest setPriority(RequestPriority value) { 
810      if (value == null)
811        this.priority = null;
812      else {
813        if (this.priority == null)
814          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
815        this.priority.setValue(value);
816      }
817      return this;
818    }
819
820    /**
821     * @return {@link #doNotPerform} (Set this to true if the record is saying that the service/procedure should NOT be performed.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
822     */
823    public BooleanType getDoNotPerformElement() { 
824      if (this.doNotPerform == null)
825        if (Configuration.errorOnAutoCreate())
826          throw new Error("Attempt to auto-create ServiceRequest.doNotPerform");
827        else if (Configuration.doAutoCreate())
828          this.doNotPerform = new BooleanType(); // bb
829      return this.doNotPerform;
830    }
831
832    public boolean hasDoNotPerformElement() { 
833      return this.doNotPerform != null && !this.doNotPerform.isEmpty();
834    }
835
836    public boolean hasDoNotPerform() { 
837      return this.doNotPerform != null && !this.doNotPerform.isEmpty();
838    }
839
840    /**
841     * @param value {@link #doNotPerform} (Set this to true if the record is saying that the service/procedure should NOT be performed.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
842     */
843    public ServiceRequest setDoNotPerformElement(BooleanType value) { 
844      this.doNotPerform = value;
845      return this;
846    }
847
848    /**
849     * @return Set this to true if the record is saying that the service/procedure should NOT be performed.
850     */
851    public boolean getDoNotPerform() { 
852      return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue();
853    }
854
855    /**
856     * @param value Set this to true if the record is saying that the service/procedure should NOT be performed.
857     */
858    public ServiceRequest setDoNotPerform(boolean value) { 
859        if (this.doNotPerform == null)
860          this.doNotPerform = new BooleanType();
861        this.doNotPerform.setValue(value);
862      return this;
863    }
864
865    /**
866     * @return {@link #code} (A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.)
867     */
868    public CodeableConcept getCode() { 
869      if (this.code == null)
870        if (Configuration.errorOnAutoCreate())
871          throw new Error("Attempt to auto-create ServiceRequest.code");
872        else if (Configuration.doAutoCreate())
873          this.code = new CodeableConcept(); // cc
874      return this.code;
875    }
876
877    public boolean hasCode() { 
878      return this.code != null && !this.code.isEmpty();
879    }
880
881    /**
882     * @param value {@link #code} (A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.)
883     */
884    public ServiceRequest setCode(CodeableConcept value) { 
885      this.code = value;
886      return this;
887    }
888
889    /**
890     * @return {@link #orderDetail} (Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.)
891     */
892    public List<CodeableConcept> getOrderDetail() { 
893      if (this.orderDetail == null)
894        this.orderDetail = new ArrayList<CodeableConcept>();
895      return this.orderDetail;
896    }
897
898    /**
899     * @return Returns a reference to <code>this</code> for easy method chaining
900     */
901    public ServiceRequest setOrderDetail(List<CodeableConcept> theOrderDetail) { 
902      this.orderDetail = theOrderDetail;
903      return this;
904    }
905
906    public boolean hasOrderDetail() { 
907      if (this.orderDetail == null)
908        return false;
909      for (CodeableConcept item : this.orderDetail)
910        if (!item.isEmpty())
911          return true;
912      return false;
913    }
914
915    public CodeableConcept addOrderDetail() { //3
916      CodeableConcept t = new CodeableConcept();
917      if (this.orderDetail == null)
918        this.orderDetail = new ArrayList<CodeableConcept>();
919      this.orderDetail.add(t);
920      return t;
921    }
922
923    public ServiceRequest addOrderDetail(CodeableConcept t) { //3
924      if (t == null)
925        return this;
926      if (this.orderDetail == null)
927        this.orderDetail = new ArrayList<CodeableConcept>();
928      this.orderDetail.add(t);
929      return this;
930    }
931
932    /**
933     * @return The first repetition of repeating field {@link #orderDetail}, creating it if it does not already exist {3}
934     */
935    public CodeableConcept getOrderDetailFirstRep() { 
936      if (getOrderDetail().isEmpty()) {
937        addOrderDetail();
938      }
939      return getOrderDetail().get(0);
940    }
941
942    /**
943     * @return {@link #quantity} (An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).)
944     */
945    public DataType getQuantity() { 
946      return this.quantity;
947    }
948
949    /**
950     * @return {@link #quantity} (An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).)
951     */
952    public Quantity getQuantityQuantity() throws FHIRException { 
953      if (this.quantity == null)
954        this.quantity = new Quantity();
955      if (!(this.quantity instanceof Quantity))
956        throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.quantity.getClass().getName()+" was encountered");
957      return (Quantity) this.quantity;
958    }
959
960    public boolean hasQuantityQuantity() { 
961      return this != null && this.quantity instanceof Quantity;
962    }
963
964    /**
965     * @return {@link #quantity} (An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).)
966     */
967    public Ratio getQuantityRatio() throws FHIRException { 
968      if (this.quantity == null)
969        this.quantity = new Ratio();
970      if (!(this.quantity instanceof Ratio))
971        throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.quantity.getClass().getName()+" was encountered");
972      return (Ratio) this.quantity;
973    }
974
975    public boolean hasQuantityRatio() { 
976      return this != null && this.quantity instanceof Ratio;
977    }
978
979    /**
980     * @return {@link #quantity} (An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).)
981     */
982    public Range getQuantityRange() throws FHIRException { 
983      if (this.quantity == null)
984        this.quantity = new Range();
985      if (!(this.quantity instanceof Range))
986        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.quantity.getClass().getName()+" was encountered");
987      return (Range) this.quantity;
988    }
989
990    public boolean hasQuantityRange() { 
991      return this != null && this.quantity instanceof Range;
992    }
993
994    public boolean hasQuantity() { 
995      return this.quantity != null && !this.quantity.isEmpty();
996    }
997
998    /**
999     * @param value {@link #quantity} (An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).)
1000     */
1001    public ServiceRequest setQuantity(DataType value) { 
1002      if (value != null && !(value instanceof Quantity || value instanceof Ratio || value instanceof Range))
1003        throw new Error("Not the right type for ServiceRequest.quantity[x]: "+value.fhirType());
1004      this.quantity = value;
1005      return this;
1006    }
1007
1008    /**
1009     * @return {@link #subject} (On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).)
1010     */
1011    public Reference getSubject() { 
1012      if (this.subject == null)
1013        if (Configuration.errorOnAutoCreate())
1014          throw new Error("Attempt to auto-create ServiceRequest.subject");
1015        else if (Configuration.doAutoCreate())
1016          this.subject = new Reference(); // cc
1017      return this.subject;
1018    }
1019
1020    public boolean hasSubject() { 
1021      return this.subject != null && !this.subject.isEmpty();
1022    }
1023
1024    /**
1025     * @param value {@link #subject} (On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).)
1026     */
1027    public ServiceRequest setSubject(Reference value) { 
1028      this.subject = value;
1029      return this;
1030    }
1031
1032    /**
1033     * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.)
1034     */
1035    public Reference getEncounter() { 
1036      if (this.encounter == null)
1037        if (Configuration.errorOnAutoCreate())
1038          throw new Error("Attempt to auto-create ServiceRequest.encounter");
1039        else if (Configuration.doAutoCreate())
1040          this.encounter = new Reference(); // cc
1041      return this.encounter;
1042    }
1043
1044    public boolean hasEncounter() { 
1045      return this.encounter != null && !this.encounter.isEmpty();
1046    }
1047
1048    /**
1049     * @param value {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.)
1050     */
1051    public ServiceRequest setEncounter(Reference value) { 
1052      this.encounter = value;
1053      return this;
1054    }
1055
1056    /**
1057     * @return {@link #occurrence} (The date/time at which the requested service should occur.)
1058     */
1059    public DataType getOccurrence() { 
1060      return this.occurrence;
1061    }
1062
1063    /**
1064     * @return {@link #occurrence} (The date/time at which the requested service should occur.)
1065     */
1066    public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 
1067      if (this.occurrence == null)
1068        this.occurrence = new DateTimeType();
1069      if (!(this.occurrence instanceof DateTimeType))
1070        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1071      return (DateTimeType) this.occurrence;
1072    }
1073
1074    public boolean hasOccurrenceDateTimeType() { 
1075      return this != null && this.occurrence instanceof DateTimeType;
1076    }
1077
1078    /**
1079     * @return {@link #occurrence} (The date/time at which the requested service should occur.)
1080     */
1081    public Period getOccurrencePeriod() throws FHIRException { 
1082      if (this.occurrence == null)
1083        this.occurrence = new Period();
1084      if (!(this.occurrence instanceof Period))
1085        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1086      return (Period) this.occurrence;
1087    }
1088
1089    public boolean hasOccurrencePeriod() { 
1090      return this != null && this.occurrence instanceof Period;
1091    }
1092
1093    /**
1094     * @return {@link #occurrence} (The date/time at which the requested service should occur.)
1095     */
1096    public Timing getOccurrenceTiming() throws FHIRException { 
1097      if (this.occurrence == null)
1098        this.occurrence = new Timing();
1099      if (!(this.occurrence instanceof Timing))
1100        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.occurrence.getClass().getName()+" was encountered");
1101      return (Timing) this.occurrence;
1102    }
1103
1104    public boolean hasOccurrenceTiming() { 
1105      return this != null && this.occurrence instanceof Timing;
1106    }
1107
1108    public boolean hasOccurrence() { 
1109      return this.occurrence != null && !this.occurrence.isEmpty();
1110    }
1111
1112    /**
1113     * @param value {@link #occurrence} (The date/time at which the requested service should occur.)
1114     */
1115    public ServiceRequest setOccurrence(DataType value) { 
1116      if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Timing))
1117        throw new Error("Not the right type for ServiceRequest.occurrence[x]: "+value.fhirType());
1118      this.occurrence = value;
1119      return this;
1120    }
1121
1122    /**
1123     * @return {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.)
1124     */
1125    public DataType getAsNeeded() { 
1126      return this.asNeeded;
1127    }
1128
1129    /**
1130     * @return {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.)
1131     */
1132    public BooleanType getAsNeededBooleanType() throws FHIRException { 
1133      if (this.asNeeded == null)
1134        this.asNeeded = new BooleanType();
1135      if (!(this.asNeeded instanceof BooleanType))
1136        throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.asNeeded.getClass().getName()+" was encountered");
1137      return (BooleanType) this.asNeeded;
1138    }
1139
1140    public boolean hasAsNeededBooleanType() { 
1141      return this != null && this.asNeeded instanceof BooleanType;
1142    }
1143
1144    /**
1145     * @return {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.)
1146     */
1147    public CodeableConcept getAsNeededCodeableConcept() throws FHIRException { 
1148      if (this.asNeeded == null)
1149        this.asNeeded = new CodeableConcept();
1150      if (!(this.asNeeded instanceof CodeableConcept))
1151        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.asNeeded.getClass().getName()+" was encountered");
1152      return (CodeableConcept) this.asNeeded;
1153    }
1154
1155    public boolean hasAsNeededCodeableConcept() { 
1156      return this != null && this.asNeeded instanceof CodeableConcept;
1157    }
1158
1159    public boolean hasAsNeeded() { 
1160      return this.asNeeded != null && !this.asNeeded.isEmpty();
1161    }
1162
1163    /**
1164     * @param value {@link #asNeeded} (If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example "pain", "on flare-up", etc.)
1165     */
1166    public ServiceRequest setAsNeeded(DataType value) { 
1167      if (value != null && !(value instanceof BooleanType || value instanceof CodeableConcept))
1168        throw new Error("Not the right type for ServiceRequest.asNeeded[x]: "+value.fhirType());
1169      this.asNeeded = value;
1170      return this;
1171    }
1172
1173    /**
1174     * @return {@link #authoredOn} (When the request transitioned to being actionable.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
1175     */
1176    public DateTimeType getAuthoredOnElement() { 
1177      if (this.authoredOn == null)
1178        if (Configuration.errorOnAutoCreate())
1179          throw new Error("Attempt to auto-create ServiceRequest.authoredOn");
1180        else if (Configuration.doAutoCreate())
1181          this.authoredOn = new DateTimeType(); // bb
1182      return this.authoredOn;
1183    }
1184
1185    public boolean hasAuthoredOnElement() { 
1186      return this.authoredOn != null && !this.authoredOn.isEmpty();
1187    }
1188
1189    public boolean hasAuthoredOn() { 
1190      return this.authoredOn != null && !this.authoredOn.isEmpty();
1191    }
1192
1193    /**
1194     * @param value {@link #authoredOn} (When the request transitioned to being actionable.). This is the underlying object with id, value and extensions. The accessor "getAuthoredOn" gives direct access to the value
1195     */
1196    public ServiceRequest setAuthoredOnElement(DateTimeType value) { 
1197      this.authoredOn = value;
1198      return this;
1199    }
1200
1201    /**
1202     * @return When the request transitioned to being actionable.
1203     */
1204    public Date getAuthoredOn() { 
1205      return this.authoredOn == null ? null : this.authoredOn.getValue();
1206    }
1207
1208    /**
1209     * @param value When the request transitioned to being actionable.
1210     */
1211    public ServiceRequest setAuthoredOn(Date value) { 
1212      if (value == null)
1213        this.authoredOn = null;
1214      else {
1215        if (this.authoredOn == null)
1216          this.authoredOn = new DateTimeType();
1217        this.authoredOn.setValue(value);
1218      }
1219      return this;
1220    }
1221
1222    /**
1223     * @return {@link #requester} (The individual who initiated the request and has responsibility for its activation.)
1224     */
1225    public Reference getRequester() { 
1226      if (this.requester == null)
1227        if (Configuration.errorOnAutoCreate())
1228          throw new Error("Attempt to auto-create ServiceRequest.requester");
1229        else if (Configuration.doAutoCreate())
1230          this.requester = new Reference(); // cc
1231      return this.requester;
1232    }
1233
1234    public boolean hasRequester() { 
1235      return this.requester != null && !this.requester.isEmpty();
1236    }
1237
1238    /**
1239     * @param value {@link #requester} (The individual who initiated the request and has responsibility for its activation.)
1240     */
1241    public ServiceRequest setRequester(Reference value) { 
1242      this.requester = value;
1243      return this;
1244    }
1245
1246    /**
1247     * @return {@link #performerType} (Desired type of performer for doing the requested service.)
1248     */
1249    public CodeableConcept getPerformerType() { 
1250      if (this.performerType == null)
1251        if (Configuration.errorOnAutoCreate())
1252          throw new Error("Attempt to auto-create ServiceRequest.performerType");
1253        else if (Configuration.doAutoCreate())
1254          this.performerType = new CodeableConcept(); // cc
1255      return this.performerType;
1256    }
1257
1258    public boolean hasPerformerType() { 
1259      return this.performerType != null && !this.performerType.isEmpty();
1260    }
1261
1262    /**
1263     * @param value {@link #performerType} (Desired type of performer for doing the requested service.)
1264     */
1265    public ServiceRequest setPerformerType(CodeableConcept value) { 
1266      this.performerType = value;
1267      return this;
1268    }
1269
1270    /**
1271     * @return {@link #performer} (The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc.)
1272     */
1273    public List<Reference> getPerformer() { 
1274      if (this.performer == null)
1275        this.performer = new ArrayList<Reference>();
1276      return this.performer;
1277    }
1278
1279    /**
1280     * @return Returns a reference to <code>this</code> for easy method chaining
1281     */
1282    public ServiceRequest setPerformer(List<Reference> thePerformer) { 
1283      this.performer = thePerformer;
1284      return this;
1285    }
1286
1287    public boolean hasPerformer() { 
1288      if (this.performer == null)
1289        return false;
1290      for (Reference item : this.performer)
1291        if (!item.isEmpty())
1292          return true;
1293      return false;
1294    }
1295
1296    public Reference addPerformer() { //3
1297      Reference t = new Reference();
1298      if (this.performer == null)
1299        this.performer = new ArrayList<Reference>();
1300      this.performer.add(t);
1301      return t;
1302    }
1303
1304    public ServiceRequest addPerformer(Reference t) { //3
1305      if (t == null)
1306        return this;
1307      if (this.performer == null)
1308        this.performer = new ArrayList<Reference>();
1309      this.performer.add(t);
1310      return this;
1311    }
1312
1313    /**
1314     * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3}
1315     */
1316    public Reference getPerformerFirstRep() { 
1317      if (getPerformer().isEmpty()) {
1318        addPerformer();
1319      }
1320      return getPerformer().get(0);
1321    }
1322
1323    /**
1324     * @return {@link #location} (The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.)
1325     */
1326    public List<CodeableReference> getLocation() { 
1327      if (this.location == null)
1328        this.location = new ArrayList<CodeableReference>();
1329      return this.location;
1330    }
1331
1332    /**
1333     * @return Returns a reference to <code>this</code> for easy method chaining
1334     */
1335    public ServiceRequest setLocation(List<CodeableReference> theLocation) { 
1336      this.location = theLocation;
1337      return this;
1338    }
1339
1340    public boolean hasLocation() { 
1341      if (this.location == null)
1342        return false;
1343      for (CodeableReference item : this.location)
1344        if (!item.isEmpty())
1345          return true;
1346      return false;
1347    }
1348
1349    public CodeableReference addLocation() { //3
1350      CodeableReference t = new CodeableReference();
1351      if (this.location == null)
1352        this.location = new ArrayList<CodeableReference>();
1353      this.location.add(t);
1354      return t;
1355    }
1356
1357    public ServiceRequest addLocation(CodeableReference t) { //3
1358      if (t == null)
1359        return this;
1360      if (this.location == null)
1361        this.location = new ArrayList<CodeableReference>();
1362      this.location.add(t);
1363      return this;
1364    }
1365
1366    /**
1367     * @return The first repetition of repeating field {@link #location}, creating it if it does not already exist {3}
1368     */
1369    public CodeableReference getLocationFirstRep() { 
1370      if (getLocation().isEmpty()) {
1371        addLocation();
1372      }
1373      return getLocation().get(0);
1374    }
1375
1376    /**
1377     * @return {@link #reason} (An explanation or justification for why this service is being requested in coded or textual form.   This is often for billing purposes.  May relate to the resources referred to in `supportingInfo`.)
1378     */
1379    public List<CodeableReference> getReason() { 
1380      if (this.reason == null)
1381        this.reason = new ArrayList<CodeableReference>();
1382      return this.reason;
1383    }
1384
1385    /**
1386     * @return Returns a reference to <code>this</code> for easy method chaining
1387     */
1388    public ServiceRequest setReason(List<CodeableReference> theReason) { 
1389      this.reason = theReason;
1390      return this;
1391    }
1392
1393    public boolean hasReason() { 
1394      if (this.reason == null)
1395        return false;
1396      for (CodeableReference item : this.reason)
1397        if (!item.isEmpty())
1398          return true;
1399      return false;
1400    }
1401
1402    public CodeableReference addReason() { //3
1403      CodeableReference t = new CodeableReference();
1404      if (this.reason == null)
1405        this.reason = new ArrayList<CodeableReference>();
1406      this.reason.add(t);
1407      return t;
1408    }
1409
1410    public ServiceRequest addReason(CodeableReference t) { //3
1411      if (t == null)
1412        return this;
1413      if (this.reason == null)
1414        this.reason = new ArrayList<CodeableReference>();
1415      this.reason.add(t);
1416      return this;
1417    }
1418
1419    /**
1420     * @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist {3}
1421     */
1422    public CodeableReference getReasonFirstRep() { 
1423      if (getReason().isEmpty()) {
1424        addReason();
1425      }
1426      return getReason().get(0);
1427    }
1428
1429    /**
1430     * @return {@link #insurance} (Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.)
1431     */
1432    public List<Reference> getInsurance() { 
1433      if (this.insurance == null)
1434        this.insurance = new ArrayList<Reference>();
1435      return this.insurance;
1436    }
1437
1438    /**
1439     * @return Returns a reference to <code>this</code> for easy method chaining
1440     */
1441    public ServiceRequest setInsurance(List<Reference> theInsurance) { 
1442      this.insurance = theInsurance;
1443      return this;
1444    }
1445
1446    public boolean hasInsurance() { 
1447      if (this.insurance == null)
1448        return false;
1449      for (Reference item : this.insurance)
1450        if (!item.isEmpty())
1451          return true;
1452      return false;
1453    }
1454
1455    public Reference addInsurance() { //3
1456      Reference t = new Reference();
1457      if (this.insurance == null)
1458        this.insurance = new ArrayList<Reference>();
1459      this.insurance.add(t);
1460      return t;
1461    }
1462
1463    public ServiceRequest addInsurance(Reference t) { //3
1464      if (t == null)
1465        return this;
1466      if (this.insurance == null)
1467        this.insurance = new ArrayList<Reference>();
1468      this.insurance.add(t);
1469      return this;
1470    }
1471
1472    /**
1473     * @return The first repetition of repeating field {@link #insurance}, creating it if it does not already exist {3}
1474     */
1475    public Reference getInsuranceFirstRep() { 
1476      if (getInsurance().isEmpty()) {
1477        addInsurance();
1478      }
1479      return getInsurance().get(0);
1480    }
1481
1482    /**
1483     * @return {@link #supportingInfo} (Additional clinical information about the patient or specimen that may influence the services or their interpretations.     This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as "ask at order entry questions (AOEs)".  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements.)
1484     */
1485    public List<Reference> getSupportingInfo() { 
1486      if (this.supportingInfo == null)
1487        this.supportingInfo = new ArrayList<Reference>();
1488      return this.supportingInfo;
1489    }
1490
1491    /**
1492     * @return Returns a reference to <code>this</code> for easy method chaining
1493     */
1494    public ServiceRequest setSupportingInfo(List<Reference> theSupportingInfo) { 
1495      this.supportingInfo = theSupportingInfo;
1496      return this;
1497    }
1498
1499    public boolean hasSupportingInfo() { 
1500      if (this.supportingInfo == null)
1501        return false;
1502      for (Reference item : this.supportingInfo)
1503        if (!item.isEmpty())
1504          return true;
1505      return false;
1506    }
1507
1508    public Reference addSupportingInfo() { //3
1509      Reference t = new Reference();
1510      if (this.supportingInfo == null)
1511        this.supportingInfo = new ArrayList<Reference>();
1512      this.supportingInfo.add(t);
1513      return t;
1514    }
1515
1516    public ServiceRequest addSupportingInfo(Reference t) { //3
1517      if (t == null)
1518        return this;
1519      if (this.supportingInfo == null)
1520        this.supportingInfo = new ArrayList<Reference>();
1521      this.supportingInfo.add(t);
1522      return this;
1523    }
1524
1525    /**
1526     * @return The first repetition of repeating field {@link #supportingInfo}, creating it if it does not already exist {3}
1527     */
1528    public Reference getSupportingInfoFirstRep() { 
1529      if (getSupportingInfo().isEmpty()) {
1530        addSupportingInfo();
1531      }
1532      return getSupportingInfo().get(0);
1533    }
1534
1535    /**
1536     * @return {@link #specimen} (One or more specimens that the laboratory procedure will use.)
1537     */
1538    public List<Reference> getSpecimen() { 
1539      if (this.specimen == null)
1540        this.specimen = new ArrayList<Reference>();
1541      return this.specimen;
1542    }
1543
1544    /**
1545     * @return Returns a reference to <code>this</code> for easy method chaining
1546     */
1547    public ServiceRequest setSpecimen(List<Reference> theSpecimen) { 
1548      this.specimen = theSpecimen;
1549      return this;
1550    }
1551
1552    public boolean hasSpecimen() { 
1553      if (this.specimen == null)
1554        return false;
1555      for (Reference item : this.specimen)
1556        if (!item.isEmpty())
1557          return true;
1558      return false;
1559    }
1560
1561    public Reference addSpecimen() { //3
1562      Reference t = new Reference();
1563      if (this.specimen == null)
1564        this.specimen = new ArrayList<Reference>();
1565      this.specimen.add(t);
1566      return t;
1567    }
1568
1569    public ServiceRequest addSpecimen(Reference t) { //3
1570      if (t == null)
1571        return this;
1572      if (this.specimen == null)
1573        this.specimen = new ArrayList<Reference>();
1574      this.specimen.add(t);
1575      return this;
1576    }
1577
1578    /**
1579     * @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist {3}
1580     */
1581    public Reference getSpecimenFirstRep() { 
1582      if (getSpecimen().isEmpty()) {
1583        addSpecimen();
1584      }
1585      return getSpecimen().get(0);
1586    }
1587
1588    /**
1589     * @return {@link #bodySite} (Anatomic location where the procedure should be performed. This is the target site.)
1590     */
1591    public List<CodeableConcept> getBodySite() { 
1592      if (this.bodySite == null)
1593        this.bodySite = new ArrayList<CodeableConcept>();
1594      return this.bodySite;
1595    }
1596
1597    /**
1598     * @return Returns a reference to <code>this</code> for easy method chaining
1599     */
1600    public ServiceRequest setBodySite(List<CodeableConcept> theBodySite) { 
1601      this.bodySite = theBodySite;
1602      return this;
1603    }
1604
1605    public boolean hasBodySite() { 
1606      if (this.bodySite == null)
1607        return false;
1608      for (CodeableConcept item : this.bodySite)
1609        if (!item.isEmpty())
1610          return true;
1611      return false;
1612    }
1613
1614    public CodeableConcept addBodySite() { //3
1615      CodeableConcept t = new CodeableConcept();
1616      if (this.bodySite == null)
1617        this.bodySite = new ArrayList<CodeableConcept>();
1618      this.bodySite.add(t);
1619      return t;
1620    }
1621
1622    public ServiceRequest addBodySite(CodeableConcept t) { //3
1623      if (t == null)
1624        return this;
1625      if (this.bodySite == null)
1626        this.bodySite = new ArrayList<CodeableConcept>();
1627      this.bodySite.add(t);
1628      return this;
1629    }
1630
1631    /**
1632     * @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist {3}
1633     */
1634    public CodeableConcept getBodySiteFirstRep() { 
1635      if (getBodySite().isEmpty()) {
1636        addBodySite();
1637      }
1638      return getBodySite().get(0);
1639    }
1640
1641    /**
1642     * @return {@link #note} (Any other notes and comments made about the service request. For example, internal billing notes.)
1643     */
1644    public List<Annotation> getNote() { 
1645      if (this.note == null)
1646        this.note = new ArrayList<Annotation>();
1647      return this.note;
1648    }
1649
1650    /**
1651     * @return Returns a reference to <code>this</code> for easy method chaining
1652     */
1653    public ServiceRequest setNote(List<Annotation> theNote) { 
1654      this.note = theNote;
1655      return this;
1656    }
1657
1658    public boolean hasNote() { 
1659      if (this.note == null)
1660        return false;
1661      for (Annotation item : this.note)
1662        if (!item.isEmpty())
1663          return true;
1664      return false;
1665    }
1666
1667    public Annotation addNote() { //3
1668      Annotation t = new Annotation();
1669      if (this.note == null)
1670        this.note = new ArrayList<Annotation>();
1671      this.note.add(t);
1672      return t;
1673    }
1674
1675    public ServiceRequest addNote(Annotation t) { //3
1676      if (t == null)
1677        return this;
1678      if (this.note == null)
1679        this.note = new ArrayList<Annotation>();
1680      this.note.add(t);
1681      return this;
1682    }
1683
1684    /**
1685     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3}
1686     */
1687    public Annotation getNoteFirstRep() { 
1688      if (getNote().isEmpty()) {
1689        addNote();
1690      }
1691      return getNote().get(0);
1692    }
1693
1694    /**
1695     * @return {@link #patientInstruction} (Instructions in terms that are understood by the patient or consumer.). This is the underlying object with id, value and extensions. The accessor "getPatientInstruction" gives direct access to the value
1696     */
1697    public StringType getPatientInstructionElement() { 
1698      if (this.patientInstruction == null)
1699        if (Configuration.errorOnAutoCreate())
1700          throw new Error("Attempt to auto-create ServiceRequest.patientInstruction");
1701        else if (Configuration.doAutoCreate())
1702          this.patientInstruction = new StringType(); // bb
1703      return this.patientInstruction;
1704    }
1705
1706    public boolean hasPatientInstructionElement() { 
1707      return this.patientInstruction != null && !this.patientInstruction.isEmpty();
1708    }
1709
1710    public boolean hasPatientInstruction() { 
1711      return this.patientInstruction != null && !this.patientInstruction.isEmpty();
1712    }
1713
1714    /**
1715     * @param value {@link #patientInstruction} (Instructions in terms that are understood by the patient or consumer.). This is the underlying object with id, value and extensions. The accessor "getPatientInstruction" gives direct access to the value
1716     */
1717    public ServiceRequest setPatientInstructionElement(StringType value) { 
1718      this.patientInstruction = value;
1719      return this;
1720    }
1721
1722    /**
1723     * @return Instructions in terms that are understood by the patient or consumer.
1724     */
1725    public String getPatientInstruction() { 
1726      return this.patientInstruction == null ? null : this.patientInstruction.getValue();
1727    }
1728
1729    /**
1730     * @param value Instructions in terms that are understood by the patient or consumer.
1731     */
1732    public ServiceRequest setPatientInstruction(String value) { 
1733      if (Utilities.noString(value))
1734        this.patientInstruction = null;
1735      else {
1736        if (this.patientInstruction == null)
1737          this.patientInstruction = new StringType();
1738        this.patientInstruction.setValue(value);
1739      }
1740      return this;
1741    }
1742
1743    /**
1744     * @return {@link #relevantHistory} (Key events in the history of the request.)
1745     */
1746    public List<Reference> getRelevantHistory() { 
1747      if (this.relevantHistory == null)
1748        this.relevantHistory = new ArrayList<Reference>();
1749      return this.relevantHistory;
1750    }
1751
1752    /**
1753     * @return Returns a reference to <code>this</code> for easy method chaining
1754     */
1755    public ServiceRequest setRelevantHistory(List<Reference> theRelevantHistory) { 
1756      this.relevantHistory = theRelevantHistory;
1757      return this;
1758    }
1759
1760    public boolean hasRelevantHistory() { 
1761      if (this.relevantHistory == null)
1762        return false;
1763      for (Reference item : this.relevantHistory)
1764        if (!item.isEmpty())
1765          return true;
1766      return false;
1767    }
1768
1769    public Reference addRelevantHistory() { //3
1770      Reference t = new Reference();
1771      if (this.relevantHistory == null)
1772        this.relevantHistory = new ArrayList<Reference>();
1773      this.relevantHistory.add(t);
1774      return t;
1775    }
1776
1777    public ServiceRequest addRelevantHistory(Reference t) { //3
1778      if (t == null)
1779        return this;
1780      if (this.relevantHistory == null)
1781        this.relevantHistory = new ArrayList<Reference>();
1782      this.relevantHistory.add(t);
1783      return this;
1784    }
1785
1786    /**
1787     * @return The first repetition of repeating field {@link #relevantHistory}, creating it if it does not already exist {3}
1788     */
1789    public Reference getRelevantHistoryFirstRep() { 
1790      if (getRelevantHistory().isEmpty()) {
1791        addRelevantHistory();
1792      }
1793      return getRelevantHistory().get(0);
1794    }
1795
1796      protected void listChildren(List<Property> children) {
1797        super.listChildren(children);
1798        children.add(new Property("identifier", "Identifier", "Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.", 0, java.lang.Integer.MAX_VALUE, identifier));
1799        children.add(new Property("instantiatesCanonical", "canonical(ActivityDefinition|PlanDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical));
1800        children.add(new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri));
1801        children.add(new Property("basedOn", "Reference(CarePlan|ServiceRequest|MedicationRequest)", "Plan/proposal/order fulfilled by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn));
1802        children.add(new Property("replaces", "Reference(ServiceRequest)", "The request takes the place of the referenced completed or terminated request(s).", 0, java.lang.Integer.MAX_VALUE, replaces));
1803        children.add(new Property("requisition", "Identifier", "A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.", 0, 1, requisition));
1804        children.add(new Property("status", "code", "The status of the order.", 0, 1, status));
1805        children.add(new Property("intent", "code", "Whether the request is a proposal, plan, an original order or a reflex order.", 0, 1, intent));
1806        children.add(new Property("category", "CodeableConcept", "A code that classifies the service for searching, sorting and display purposes (e.g. \"Surgical Procedure\").", 0, java.lang.Integer.MAX_VALUE, category));
1807        children.add(new Property("priority", "code", "Indicates how quickly the ServiceRequest should be addressed with respect to other requests.", 0, 1, priority));
1808        children.add(new Property("doNotPerform", "boolean", "Set this to true if the record is saying that the service/procedure should NOT be performed.", 0, 1, doNotPerform));
1809        children.add(new Property("code", "CodeableConcept", "A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.", 0, 1, code));
1810        children.add(new Property("orderDetail", "CodeableConcept", "Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.", 0, java.lang.Integer.MAX_VALUE, orderDetail));
1811        children.add(new Property("quantity[x]", "Quantity|Ratio|Range", "An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", 0, 1, quantity));
1812        children.add(new Property("subject", "Reference(Patient|Group|Location|Device)", "On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).", 0, 1, subject));
1813        children.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, 1, encounter));
1814        children.add(new Property("occurrence[x]", "dateTime|Period|Timing", "The date/time at which the requested service should occur.", 0, 1, occurrence));
1815        children.add(new Property("asNeeded[x]", "boolean|CodeableConcept", "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc.", 0, 1, asNeeded));
1816        children.add(new Property("authoredOn", "dateTime", "When the request transitioned to being actionable.", 0, 1, authoredOn));
1817        children.add(new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device)", "The individual who initiated the request and has responsibility for its activation.", 0, 1, requester));
1818        children.add(new Property("performerType", "CodeableConcept", "Desired type of performer for doing the requested service.", 0, 1, performerType));
1819        children.add(new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc.", 0, java.lang.Integer.MAX_VALUE, performer));
1820        children.add(new Property("location", "CodeableReference(Location)", "The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.", 0, java.lang.Integer.MAX_VALUE, location));
1821        children.add(new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "An explanation or justification for why this service is being requested in coded or textual form.   This is often for billing purposes.  May relate to the resources referred to in `supportingInfo`.", 0, java.lang.Integer.MAX_VALUE, reason));
1822        children.add(new Property("insurance", "Reference(Coverage|ClaimResponse)", "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.", 0, java.lang.Integer.MAX_VALUE, insurance));
1823        children.add(new Property("supportingInfo", "Reference(Any)", "Additional clinical information about the patient or specimen that may influence the services or their interpretations.     This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as \"ask at order entry questions (AOEs)\".  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements.", 0, java.lang.Integer.MAX_VALUE, supportingInfo));
1824        children.add(new Property("specimen", "Reference(Specimen)", "One or more specimens that the laboratory procedure will use.", 0, java.lang.Integer.MAX_VALUE, specimen));
1825        children.add(new Property("bodySite", "CodeableConcept", "Anatomic location where the procedure should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite));
1826        children.add(new Property("note", "Annotation", "Any other notes and comments made about the service request. For example, internal billing notes.", 0, java.lang.Integer.MAX_VALUE, note));
1827        children.add(new Property("patientInstruction", "string", "Instructions in terms that are understood by the patient or consumer.", 0, 1, patientInstruction));
1828        children.add(new Property("relevantHistory", "Reference(Provenance)", "Key events in the history of the request.", 0, java.lang.Integer.MAX_VALUE, relevantHistory));
1829      }
1830
1831      @Override
1832      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1833        switch (_hash) {
1834        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller.", 0, java.lang.Integer.MAX_VALUE, identifier);
1835        case 8911915: /*instantiatesCanonical*/  return new Property("instantiatesCanonical", "canonical(ActivityDefinition|PlanDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical);
1836        case -1926393373: /*instantiatesUri*/  return new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this ServiceRequest.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri);
1837        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(CarePlan|ServiceRequest|MedicationRequest)", "Plan/proposal/order fulfilled by this request.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1838        case -430332865: /*replaces*/  return new Property("replaces", "Reference(ServiceRequest)", "The request takes the place of the referenced completed or terminated request(s).", 0, java.lang.Integer.MAX_VALUE, replaces);
1839        case 395923612: /*requisition*/  return new Property("requisition", "Identifier", "A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier.", 0, 1, requisition);
1840        case -892481550: /*status*/  return new Property("status", "code", "The status of the order.", 0, 1, status);
1841        case -1183762788: /*intent*/  return new Property("intent", "code", "Whether the request is a proposal, plan, an original order or a reflex order.", 0, 1, intent);
1842        case 50511102: /*category*/  return new Property("category", "CodeableConcept", "A code that classifies the service for searching, sorting and display purposes (e.g. \"Surgical Procedure\").", 0, java.lang.Integer.MAX_VALUE, category);
1843        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the ServiceRequest should be addressed with respect to other requests.", 0, 1, priority);
1844        case -1788508167: /*doNotPerform*/  return new Property("doNotPerform", "boolean", "Set this to true if the record is saying that the service/procedure should NOT be performed.", 0, 1, doNotPerform);
1845        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested.", 0, 1, code);
1846        case 1187338559: /*orderDetail*/  return new Property("orderDetail", "CodeableConcept", "Additional details and instructions about the how the services are to be delivered.   For example, and order for a urinary catheter may have an order detail for an external or indwelling catheter, or an order for a bandage may require additional instructions specifying how the bandage should be applied.", 0, java.lang.Integer.MAX_VALUE, orderDetail);
1847        case -515002347: /*quantity[x]*/  return new Property("quantity[x]", "Quantity|Ratio|Range", "An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", 0, 1, quantity);
1848        case -1285004149: /*quantity*/  return new Property("quantity[x]", "Quantity|Ratio|Range", "An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", 0, 1, quantity);
1849        case -1087409610: /*quantityQuantity*/  return new Property("quantity[x]", "Quantity", "An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", 0, 1, quantity);
1850        case -1004987840: /*quantityRatio*/  return new Property("quantity[x]", "Ratio", "An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", 0, 1, quantity);
1851        case -1004993678: /*quantityRange*/  return new Property("quantity[x]", "Range", "An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction).", 0, 1, quantity);
1852        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group|Location|Device)", "On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans).", 0, 1, subject);
1853        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, 1, encounter);
1854        case -2022646513: /*occurrence[x]*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "The date/time at which the requested service should occur.", 0, 1, occurrence);
1855        case 1687874001: /*occurrence*/  return new Property("occurrence[x]", "dateTime|Period|Timing", "The date/time at which the requested service should occur.", 0, 1, occurrence);
1856        case -298443636: /*occurrenceDateTime*/  return new Property("occurrence[x]", "dateTime", "The date/time at which the requested service should occur.", 0, 1, occurrence);
1857        case 1397156594: /*occurrencePeriod*/  return new Property("occurrence[x]", "Period", "The date/time at which the requested service should occur.", 0, 1, occurrence);
1858        case 1515218299: /*occurrenceTiming*/  return new Property("occurrence[x]", "Timing", "The date/time at which the requested service should occur.", 0, 1, occurrence);
1859        case -544329575: /*asNeeded[x]*/  return new Property("asNeeded[x]", "boolean|CodeableConcept", "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc.", 0, 1, asNeeded);
1860        case -1432923513: /*asNeeded*/  return new Property("asNeeded[x]", "boolean|CodeableConcept", "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc.", 0, 1, asNeeded);
1861        case -591717471: /*asNeededBoolean*/  return new Property("asNeeded[x]", "boolean", "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc.", 0, 1, asNeeded);
1862        case 1556420122: /*asNeededCodeableConcept*/  return new Property("asNeeded[x]", "CodeableConcept", "If a CodeableConcept is present, it indicates the pre-condition for performing the service.  For example \"pain\", \"on flare-up\", etc.", 0, 1, asNeeded);
1863        case -1500852503: /*authoredOn*/  return new Property("authoredOn", "dateTime", "When the request transitioned to being actionable.", 0, 1, authoredOn);
1864        case 693933948: /*requester*/  return new Property("requester", "Reference(Practitioner|PractitionerRole|Organization|Patient|RelatedPerson|Device)", "The individual who initiated the request and has responsibility for its activation.", 0, 1, requester);
1865        case -901444568: /*performerType*/  return new Property("performerType", "CodeableConcept", "Desired type of performer for doing the requested service.", 0, 1, performerType);
1866        case 481140686: /*performer*/  return new Property("performer", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|HealthcareService|Patient|Device|RelatedPerson)", "The desired performer for doing the requested service.  For example, the surgeon, dermatopathologist, endoscopist, etc.", 0, java.lang.Integer.MAX_VALUE, performer);
1867        case 1901043637: /*location*/  return new Property("location", "CodeableReference(Location)", "The preferred location(s) where the procedure should actually happen in coded or free text form. E.g. at home or nursing day care center.", 0, java.lang.Integer.MAX_VALUE, location);
1868        case -934964668: /*reason*/  return new Property("reason", "CodeableReference(Condition|Observation|DiagnosticReport|DocumentReference)", "An explanation or justification for why this service is being requested in coded or textual form.   This is often for billing purposes.  May relate to the resources referred to in `supportingInfo`.", 0, java.lang.Integer.MAX_VALUE, reason);
1869        case 73049818: /*insurance*/  return new Property("insurance", "Reference(Coverage|ClaimResponse)", "Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service.", 0, java.lang.Integer.MAX_VALUE, insurance);
1870        case 1922406657: /*supportingInfo*/  return new Property("supportingInfo", "Reference(Any)", "Additional clinical information about the patient or specimen that may influence the services or their interpretations.     This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as \"ask at order entry questions (AOEs)\".  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements.", 0, java.lang.Integer.MAX_VALUE, supportingInfo);
1871        case -2132868344: /*specimen*/  return new Property("specimen", "Reference(Specimen)", "One or more specimens that the laboratory procedure will use.", 0, java.lang.Integer.MAX_VALUE, specimen);
1872        case 1702620169: /*bodySite*/  return new Property("bodySite", "CodeableConcept", "Anatomic location where the procedure should be performed. This is the target site.", 0, java.lang.Integer.MAX_VALUE, bodySite);
1873        case 3387378: /*note*/  return new Property("note", "Annotation", "Any other notes and comments made about the service request. For example, internal billing notes.", 0, java.lang.Integer.MAX_VALUE, note);
1874        case 737543241: /*patientInstruction*/  return new Property("patientInstruction", "string", "Instructions in terms that are understood by the patient or consumer.", 0, 1, patientInstruction);
1875        case 1538891575: /*relevantHistory*/  return new Property("relevantHistory", "Reference(Provenance)", "Key events in the history of the request.", 0, java.lang.Integer.MAX_VALUE, relevantHistory);
1876        default: return super.getNamedProperty(_hash, _name, _checkValid);
1877        }
1878
1879      }
1880
1881      @Override
1882      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1883        switch (hash) {
1884        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1885        case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType
1886        case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType
1887        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1888        case -430332865: /*replaces*/ return this.replaces == null ? new Base[0] : this.replaces.toArray(new Base[this.replaces.size()]); // Reference
1889        case 395923612: /*requisition*/ return this.requisition == null ? new Base[0] : new Base[] {this.requisition}; // Identifier
1890        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<RequestStatus>
1891        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<RequestIntent>
1892        case 50511102: /*category*/ return this.category == null ? new Base[0] : this.category.toArray(new Base[this.category.size()]); // CodeableConcept
1893        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
1894        case -1788508167: /*doNotPerform*/ return this.doNotPerform == null ? new Base[0] : new Base[] {this.doNotPerform}; // BooleanType
1895        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
1896        case 1187338559: /*orderDetail*/ return this.orderDetail == null ? new Base[0] : this.orderDetail.toArray(new Base[this.orderDetail.size()]); // CodeableConcept
1897        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // DataType
1898        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1899        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1900        case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // DataType
1901        case -1432923513: /*asNeeded*/ return this.asNeeded == null ? new Base[0] : new Base[] {this.asNeeded}; // DataType
1902        case -1500852503: /*authoredOn*/ return this.authoredOn == null ? new Base[0] : new Base[] {this.authoredOn}; // DateTimeType
1903        case 693933948: /*requester*/ return this.requester == null ? new Base[0] : new Base[] {this.requester}; // Reference
1904        case -901444568: /*performerType*/ return this.performerType == null ? new Base[0] : new Base[] {this.performerType}; // CodeableConcept
1905        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // Reference
1906        case 1901043637: /*location*/ return this.location == null ? new Base[0] : this.location.toArray(new Base[this.location.size()]); // CodeableReference
1907        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableReference
1908        case 73049818: /*insurance*/ return this.insurance == null ? new Base[0] : this.insurance.toArray(new Base[this.insurance.size()]); // Reference
1909        case 1922406657: /*supportingInfo*/ return this.supportingInfo == null ? new Base[0] : this.supportingInfo.toArray(new Base[this.supportingInfo.size()]); // Reference
1910        case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference
1911        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // CodeableConcept
1912        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1913        case 737543241: /*patientInstruction*/ return this.patientInstruction == null ? new Base[0] : new Base[] {this.patientInstruction}; // StringType
1914        case 1538891575: /*relevantHistory*/ return this.relevantHistory == null ? new Base[0] : this.relevantHistory.toArray(new Base[this.relevantHistory.size()]); // Reference
1915        default: return super.getProperty(hash, name, checkValid);
1916        }
1917
1918      }
1919
1920      @Override
1921      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1922        switch (hash) {
1923        case -1618432855: // identifier
1924          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1925          return value;
1926        case 8911915: // instantiatesCanonical
1927          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
1928          return value;
1929        case -1926393373: // instantiatesUri
1930          this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType
1931          return value;
1932        case -332612366: // basedOn
1933          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1934          return value;
1935        case -430332865: // replaces
1936          this.getReplaces().add(TypeConvertor.castToReference(value)); // Reference
1937          return value;
1938        case 395923612: // requisition
1939          this.requisition = TypeConvertor.castToIdentifier(value); // Identifier
1940          return value;
1941        case -892481550: // status
1942          value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1943          this.status = (Enumeration) value; // Enumeration<RequestStatus>
1944          return value;
1945        case -1183762788: // intent
1946          value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
1947          this.intent = (Enumeration) value; // Enumeration<RequestIntent>
1948          return value;
1949        case 50511102: // category
1950          this.getCategory().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1951          return value;
1952        case -1165461084: // priority
1953          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
1954          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
1955          return value;
1956        case -1788508167: // doNotPerform
1957          this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType
1958          return value;
1959        case 3059181: // code
1960          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1961          return value;
1962        case 1187338559: // orderDetail
1963          this.getOrderDetail().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
1964          return value;
1965        case -1285004149: // quantity
1966          this.quantity = TypeConvertor.castToType(value); // DataType
1967          return value;
1968        case -1867885268: // subject
1969          this.subject = TypeConvertor.castToReference(value); // Reference
1970          return value;
1971        case 1524132147: // encounter
1972          this.encounter = TypeConvertor.castToReference(value); // Reference
1973          return value;
1974        case 1687874001: // occurrence
1975          this.occurrence = TypeConvertor.castToType(value); // DataType
1976          return value;
1977        case -1432923513: // asNeeded
1978          this.asNeeded = TypeConvertor.castToType(value); // DataType
1979          return value;
1980        case -1500852503: // authoredOn
1981          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
1982          return value;
1983        case 693933948: // requester
1984          this.requester = TypeConvertor.castToReference(value); // Reference
1985          return value;
1986        case -901444568: // performerType
1987          this.performerType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
1988          return value;
1989        case 481140686: // performer
1990          this.getPerformer().add(TypeConvertor.castToReference(value)); // Reference
1991          return value;
1992        case 1901043637: // location
1993          this.getLocation().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1994          return value;
1995        case -934964668: // reason
1996          this.getReason().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference
1997          return value;
1998        case 73049818: // insurance
1999          this.getInsurance().add(TypeConvertor.castToReference(value)); // Reference
2000          return value;
2001        case 1922406657: // supportingInfo
2002          this.getSupportingInfo().add(TypeConvertor.castToReference(value)); // Reference
2003          return value;
2004        case -2132868344: // specimen
2005          this.getSpecimen().add(TypeConvertor.castToReference(value)); // Reference
2006          return value;
2007        case 1702620169: // bodySite
2008          this.getBodySite().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2009          return value;
2010        case 3387378: // note
2011          this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation
2012          return value;
2013        case 737543241: // patientInstruction
2014          this.patientInstruction = TypeConvertor.castToString(value); // StringType
2015          return value;
2016        case 1538891575: // relevantHistory
2017          this.getRelevantHistory().add(TypeConvertor.castToReference(value)); // Reference
2018          return value;
2019        default: return super.setProperty(hash, name, value);
2020        }
2021
2022      }
2023
2024      @Override
2025      public Base setProperty(String name, Base value) throws FHIRException {
2026        if (name.equals("identifier")) {
2027          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2028        } else if (name.equals("instantiatesCanonical")) {
2029          this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value));
2030        } else if (name.equals("instantiatesUri")) {
2031          this.getInstantiatesUri().add(TypeConvertor.castToUri(value));
2032        } else if (name.equals("basedOn")) {
2033          this.getBasedOn().add(TypeConvertor.castToReference(value));
2034        } else if (name.equals("replaces")) {
2035          this.getReplaces().add(TypeConvertor.castToReference(value));
2036        } else if (name.equals("requisition")) {
2037          this.requisition = TypeConvertor.castToIdentifier(value); // Identifier
2038        } else if (name.equals("status")) {
2039          value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2040          this.status = (Enumeration) value; // Enumeration<RequestStatus>
2041        } else if (name.equals("intent")) {
2042          value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
2043          this.intent = (Enumeration) value; // Enumeration<RequestIntent>
2044        } else if (name.equals("category")) {
2045          this.getCategory().add(TypeConvertor.castToCodeableConcept(value));
2046        } else if (name.equals("priority")) {
2047          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
2048          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
2049        } else if (name.equals("doNotPerform")) {
2050          this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType
2051        } else if (name.equals("code")) {
2052          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2053        } else if (name.equals("orderDetail")) {
2054          this.getOrderDetail().add(TypeConvertor.castToCodeableConcept(value));
2055        } else if (name.equals("quantity[x]")) {
2056          this.quantity = TypeConvertor.castToType(value); // DataType
2057        } else if (name.equals("subject")) {
2058          this.subject = TypeConvertor.castToReference(value); // Reference
2059        } else if (name.equals("encounter")) {
2060          this.encounter = TypeConvertor.castToReference(value); // Reference
2061        } else if (name.equals("occurrence[x]")) {
2062          this.occurrence = TypeConvertor.castToType(value); // DataType
2063        } else if (name.equals("asNeeded[x]")) {
2064          this.asNeeded = TypeConvertor.castToType(value); // DataType
2065        } else if (name.equals("authoredOn")) {
2066          this.authoredOn = TypeConvertor.castToDateTime(value); // DateTimeType
2067        } else if (name.equals("requester")) {
2068          this.requester = TypeConvertor.castToReference(value); // Reference
2069        } else if (name.equals("performerType")) {
2070          this.performerType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
2071        } else if (name.equals("performer")) {
2072          this.getPerformer().add(TypeConvertor.castToReference(value));
2073        } else if (name.equals("location")) {
2074          this.getLocation().add(TypeConvertor.castToCodeableReference(value));
2075        } else if (name.equals("reason")) {
2076          this.getReason().add(TypeConvertor.castToCodeableReference(value));
2077        } else if (name.equals("insurance")) {
2078          this.getInsurance().add(TypeConvertor.castToReference(value));
2079        } else if (name.equals("supportingInfo")) {
2080          this.getSupportingInfo().add(TypeConvertor.castToReference(value));
2081        } else if (name.equals("specimen")) {
2082          this.getSpecimen().add(TypeConvertor.castToReference(value));
2083        } else if (name.equals("bodySite")) {
2084          this.getBodySite().add(TypeConvertor.castToCodeableConcept(value));
2085        } else if (name.equals("note")) {
2086          this.getNote().add(TypeConvertor.castToAnnotation(value));
2087        } else if (name.equals("patientInstruction")) {
2088          this.patientInstruction = TypeConvertor.castToString(value); // StringType
2089        } else if (name.equals("relevantHistory")) {
2090          this.getRelevantHistory().add(TypeConvertor.castToReference(value));
2091        } else
2092          return super.setProperty(name, value);
2093        return value;
2094      }
2095
2096      @Override
2097      public Base makeProperty(int hash, String name) throws FHIRException {
2098        switch (hash) {
2099        case -1618432855:  return addIdentifier(); 
2100        case 8911915:  return addInstantiatesCanonicalElement();
2101        case -1926393373:  return addInstantiatesUriElement();
2102        case -332612366:  return addBasedOn(); 
2103        case -430332865:  return addReplaces(); 
2104        case 395923612:  return getRequisition();
2105        case -892481550:  return getStatusElement();
2106        case -1183762788:  return getIntentElement();
2107        case 50511102:  return addCategory(); 
2108        case -1165461084:  return getPriorityElement();
2109        case -1788508167:  return getDoNotPerformElement();
2110        case 3059181:  return getCode();
2111        case 1187338559:  return addOrderDetail(); 
2112        case -515002347:  return getQuantity();
2113        case -1285004149:  return getQuantity();
2114        case -1867885268:  return getSubject();
2115        case 1524132147:  return getEncounter();
2116        case -2022646513:  return getOccurrence();
2117        case 1687874001:  return getOccurrence();
2118        case -544329575:  return getAsNeeded();
2119        case -1432923513:  return getAsNeeded();
2120        case -1500852503:  return getAuthoredOnElement();
2121        case 693933948:  return getRequester();
2122        case -901444568:  return getPerformerType();
2123        case 481140686:  return addPerformer(); 
2124        case 1901043637:  return addLocation(); 
2125        case -934964668:  return addReason(); 
2126        case 73049818:  return addInsurance(); 
2127        case 1922406657:  return addSupportingInfo(); 
2128        case -2132868344:  return addSpecimen(); 
2129        case 1702620169:  return addBodySite(); 
2130        case 3387378:  return addNote(); 
2131        case 737543241:  return getPatientInstructionElement();
2132        case 1538891575:  return addRelevantHistory(); 
2133        default: return super.makeProperty(hash, name);
2134        }
2135
2136      }
2137
2138      @Override
2139      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2140        switch (hash) {
2141        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2142        case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"};
2143        case -1926393373: /*instantiatesUri*/ return new String[] {"uri"};
2144        case -332612366: /*basedOn*/ return new String[] {"Reference"};
2145        case -430332865: /*replaces*/ return new String[] {"Reference"};
2146        case 395923612: /*requisition*/ return new String[] {"Identifier"};
2147        case -892481550: /*status*/ return new String[] {"code"};
2148        case -1183762788: /*intent*/ return new String[] {"code"};
2149        case 50511102: /*category*/ return new String[] {"CodeableConcept"};
2150        case -1165461084: /*priority*/ return new String[] {"code"};
2151        case -1788508167: /*doNotPerform*/ return new String[] {"boolean"};
2152        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
2153        case 1187338559: /*orderDetail*/ return new String[] {"CodeableConcept"};
2154        case -1285004149: /*quantity*/ return new String[] {"Quantity", "Ratio", "Range"};
2155        case -1867885268: /*subject*/ return new String[] {"Reference"};
2156        case 1524132147: /*encounter*/ return new String[] {"Reference"};
2157        case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period", "Timing"};
2158        case -1432923513: /*asNeeded*/ return new String[] {"boolean", "CodeableConcept"};
2159        case -1500852503: /*authoredOn*/ return new String[] {"dateTime"};
2160        case 693933948: /*requester*/ return new String[] {"Reference"};
2161        case -901444568: /*performerType*/ return new String[] {"CodeableConcept"};
2162        case 481140686: /*performer*/ return new String[] {"Reference"};
2163        case 1901043637: /*location*/ return new String[] {"CodeableReference"};
2164        case -934964668: /*reason*/ return new String[] {"CodeableReference"};
2165        case 73049818: /*insurance*/ return new String[] {"Reference"};
2166        case 1922406657: /*supportingInfo*/ return new String[] {"Reference"};
2167        case -2132868344: /*specimen*/ return new String[] {"Reference"};
2168        case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"};
2169        case 3387378: /*note*/ return new String[] {"Annotation"};
2170        case 737543241: /*patientInstruction*/ return new String[] {"string"};
2171        case 1538891575: /*relevantHistory*/ return new String[] {"Reference"};
2172        default: return super.getTypesForProperty(hash, name);
2173        }
2174
2175      }
2176
2177      @Override
2178      public Base addChild(String name) throws FHIRException {
2179        if (name.equals("identifier")) {
2180          return addIdentifier();
2181        }
2182        else if (name.equals("instantiatesCanonical")) {
2183          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.instantiatesCanonical");
2184        }
2185        else if (name.equals("instantiatesUri")) {
2186          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.instantiatesUri");
2187        }
2188        else if (name.equals("basedOn")) {
2189          return addBasedOn();
2190        }
2191        else if (name.equals("replaces")) {
2192          return addReplaces();
2193        }
2194        else if (name.equals("requisition")) {
2195          this.requisition = new Identifier();
2196          return this.requisition;
2197        }
2198        else if (name.equals("status")) {
2199          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.status");
2200        }
2201        else if (name.equals("intent")) {
2202          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.intent");
2203        }
2204        else if (name.equals("category")) {
2205          return addCategory();
2206        }
2207        else if (name.equals("priority")) {
2208          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.priority");
2209        }
2210        else if (name.equals("doNotPerform")) {
2211          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.doNotPerform");
2212        }
2213        else if (name.equals("code")) {
2214          this.code = new CodeableConcept();
2215          return this.code;
2216        }
2217        else if (name.equals("orderDetail")) {
2218          return addOrderDetail();
2219        }
2220        else if (name.equals("quantityQuantity")) {
2221          this.quantity = new Quantity();
2222          return this.quantity;
2223        }
2224        else if (name.equals("quantityRatio")) {
2225          this.quantity = new Ratio();
2226          return this.quantity;
2227        }
2228        else if (name.equals("quantityRange")) {
2229          this.quantity = new Range();
2230          return this.quantity;
2231        }
2232        else if (name.equals("subject")) {
2233          this.subject = new Reference();
2234          return this.subject;
2235        }
2236        else if (name.equals("encounter")) {
2237          this.encounter = new Reference();
2238          return this.encounter;
2239        }
2240        else if (name.equals("occurrenceDateTime")) {
2241          this.occurrence = new DateTimeType();
2242          return this.occurrence;
2243        }
2244        else if (name.equals("occurrencePeriod")) {
2245          this.occurrence = new Period();
2246          return this.occurrence;
2247        }
2248        else if (name.equals("occurrenceTiming")) {
2249          this.occurrence = new Timing();
2250          return this.occurrence;
2251        }
2252        else if (name.equals("asNeededBoolean")) {
2253          this.asNeeded = new BooleanType();
2254          return this.asNeeded;
2255        }
2256        else if (name.equals("asNeededCodeableConcept")) {
2257          this.asNeeded = new CodeableConcept();
2258          return this.asNeeded;
2259        }
2260        else if (name.equals("authoredOn")) {
2261          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.authoredOn");
2262        }
2263        else if (name.equals("requester")) {
2264          this.requester = new Reference();
2265          return this.requester;
2266        }
2267        else if (name.equals("performerType")) {
2268          this.performerType = new CodeableConcept();
2269          return this.performerType;
2270        }
2271        else if (name.equals("performer")) {
2272          return addPerformer();
2273        }
2274        else if (name.equals("location")) {
2275          return addLocation();
2276        }
2277        else if (name.equals("reason")) {
2278          return addReason();
2279        }
2280        else if (name.equals("insurance")) {
2281          return addInsurance();
2282        }
2283        else if (name.equals("supportingInfo")) {
2284          return addSupportingInfo();
2285        }
2286        else if (name.equals("specimen")) {
2287          return addSpecimen();
2288        }
2289        else if (name.equals("bodySite")) {
2290          return addBodySite();
2291        }
2292        else if (name.equals("note")) {
2293          return addNote();
2294        }
2295        else if (name.equals("patientInstruction")) {
2296          throw new FHIRException("Cannot call addChild on a primitive type ServiceRequest.patientInstruction");
2297        }
2298        else if (name.equals("relevantHistory")) {
2299          return addRelevantHistory();
2300        }
2301        else
2302          return super.addChild(name);
2303      }
2304
2305  public String fhirType() {
2306    return "ServiceRequest";
2307
2308  }
2309
2310      public ServiceRequest copy() {
2311        ServiceRequest dst = new ServiceRequest();
2312        copyValues(dst);
2313        return dst;
2314      }
2315
2316      public void copyValues(ServiceRequest dst) {
2317        super.copyValues(dst);
2318        if (identifier != null) {
2319          dst.identifier = new ArrayList<Identifier>();
2320          for (Identifier i : identifier)
2321            dst.identifier.add(i.copy());
2322        };
2323        if (instantiatesCanonical != null) {
2324          dst.instantiatesCanonical = new ArrayList<CanonicalType>();
2325          for (CanonicalType i : instantiatesCanonical)
2326            dst.instantiatesCanonical.add(i.copy());
2327        };
2328        if (instantiatesUri != null) {
2329          dst.instantiatesUri = new ArrayList<UriType>();
2330          for (UriType i : instantiatesUri)
2331            dst.instantiatesUri.add(i.copy());
2332        };
2333        if (basedOn != null) {
2334          dst.basedOn = new ArrayList<Reference>();
2335          for (Reference i : basedOn)
2336            dst.basedOn.add(i.copy());
2337        };
2338        if (replaces != null) {
2339          dst.replaces = new ArrayList<Reference>();
2340          for (Reference i : replaces)
2341            dst.replaces.add(i.copy());
2342        };
2343        dst.requisition = requisition == null ? null : requisition.copy();
2344        dst.status = status == null ? null : status.copy();
2345        dst.intent = intent == null ? null : intent.copy();
2346        if (category != null) {
2347          dst.category = new ArrayList<CodeableConcept>();
2348          for (CodeableConcept i : category)
2349            dst.category.add(i.copy());
2350        };
2351        dst.priority = priority == null ? null : priority.copy();
2352        dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy();
2353        dst.code = code == null ? null : code.copy();
2354        if (orderDetail != null) {
2355          dst.orderDetail = new ArrayList<CodeableConcept>();
2356          for (CodeableConcept i : orderDetail)
2357            dst.orderDetail.add(i.copy());
2358        };
2359        dst.quantity = quantity == null ? null : quantity.copy();
2360        dst.subject = subject == null ? null : subject.copy();
2361        dst.encounter = encounter == null ? null : encounter.copy();
2362        dst.occurrence = occurrence == null ? null : occurrence.copy();
2363        dst.asNeeded = asNeeded == null ? null : asNeeded.copy();
2364        dst.authoredOn = authoredOn == null ? null : authoredOn.copy();
2365        dst.requester = requester == null ? null : requester.copy();
2366        dst.performerType = performerType == null ? null : performerType.copy();
2367        if (performer != null) {
2368          dst.performer = new ArrayList<Reference>();
2369          for (Reference i : performer)
2370            dst.performer.add(i.copy());
2371        };
2372        if (location != null) {
2373          dst.location = new ArrayList<CodeableReference>();
2374          for (CodeableReference i : location)
2375            dst.location.add(i.copy());
2376        };
2377        if (reason != null) {
2378          dst.reason = new ArrayList<CodeableReference>();
2379          for (CodeableReference i : reason)
2380            dst.reason.add(i.copy());
2381        };
2382        if (insurance != null) {
2383          dst.insurance = new ArrayList<Reference>();
2384          for (Reference i : insurance)
2385            dst.insurance.add(i.copy());
2386        };
2387        if (supportingInfo != null) {
2388          dst.supportingInfo = new ArrayList<Reference>();
2389          for (Reference i : supportingInfo)
2390            dst.supportingInfo.add(i.copy());
2391        };
2392        if (specimen != null) {
2393          dst.specimen = new ArrayList<Reference>();
2394          for (Reference i : specimen)
2395            dst.specimen.add(i.copy());
2396        };
2397        if (bodySite != null) {
2398          dst.bodySite = new ArrayList<CodeableConcept>();
2399          for (CodeableConcept i : bodySite)
2400            dst.bodySite.add(i.copy());
2401        };
2402        if (note != null) {
2403          dst.note = new ArrayList<Annotation>();
2404          for (Annotation i : note)
2405            dst.note.add(i.copy());
2406        };
2407        dst.patientInstruction = patientInstruction == null ? null : patientInstruction.copy();
2408        if (relevantHistory != null) {
2409          dst.relevantHistory = new ArrayList<Reference>();
2410          for (Reference i : relevantHistory)
2411            dst.relevantHistory.add(i.copy());
2412        };
2413      }
2414
2415      protected ServiceRequest typedCopy() {
2416        return copy();
2417      }
2418
2419      @Override
2420      public boolean equalsDeep(Base other_) {
2421        if (!super.equalsDeep(other_))
2422          return false;
2423        if (!(other_ instanceof ServiceRequest))
2424          return false;
2425        ServiceRequest o = (ServiceRequest) other_;
2426        return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true)
2427           && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(basedOn, o.basedOn, true)
2428           && compareDeep(replaces, o.replaces, true) && compareDeep(requisition, o.requisition, true) && compareDeep(status, o.status, true)
2429           && compareDeep(intent, o.intent, true) && compareDeep(category, o.category, true) && compareDeep(priority, o.priority, true)
2430           && compareDeep(doNotPerform, o.doNotPerform, true) && compareDeep(code, o.code, true) && compareDeep(orderDetail, o.orderDetail, true)
2431           && compareDeep(quantity, o.quantity, true) && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true)
2432           && compareDeep(occurrence, o.occurrence, true) && compareDeep(asNeeded, o.asNeeded, true) && compareDeep(authoredOn, o.authoredOn, true)
2433           && compareDeep(requester, o.requester, true) && compareDeep(performerType, o.performerType, true)
2434           && compareDeep(performer, o.performer, true) && compareDeep(location, o.location, true) && compareDeep(reason, o.reason, true)
2435           && compareDeep(insurance, o.insurance, true) && compareDeep(supportingInfo, o.supportingInfo, true)
2436           && compareDeep(specimen, o.specimen, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(note, o.note, true)
2437           && compareDeep(patientInstruction, o.patientInstruction, true) && compareDeep(relevantHistory, o.relevantHistory, true)
2438          ;
2439      }
2440
2441      @Override
2442      public boolean equalsShallow(Base other_) {
2443        if (!super.equalsShallow(other_))
2444          return false;
2445        if (!(other_ instanceof ServiceRequest))
2446          return false;
2447        ServiceRequest o = (ServiceRequest) other_;
2448        return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true)
2449           && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) && compareValues(priority, o.priority, true)
2450           && compareValues(doNotPerform, o.doNotPerform, true) && compareValues(authoredOn, o.authoredOn, true)
2451           && compareValues(patientInstruction, o.patientInstruction, true);
2452      }
2453
2454      public boolean isEmpty() {
2455        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical
2456          , instantiatesUri, basedOn, replaces, requisition, status, intent, category, priority
2457          , doNotPerform, code, orderDetail, quantity, subject, encounter, occurrence, asNeeded
2458          , authoredOn, requester, performerType, performer, location, reason, insurance
2459          , supportingInfo, specimen, bodySite, note, patientInstruction, relevantHistory
2460          );
2461      }
2462
2463  @Override
2464  public ResourceType getResourceType() {
2465    return ResourceType.ServiceRequest;
2466   }
2467
2468 /**
2469   * Search parameter: <b>authored</b>
2470   * <p>
2471   * Description: <b>Date request signed</b><br>
2472   * Type: <b>date</b><br>
2473   * Path: <b>ServiceRequest.authoredOn</b><br>
2474   * </p>
2475   */
2476  @SearchParamDefinition(name="authored", path="ServiceRequest.authoredOn", description="Date request signed", type="date" )
2477  public static final String SP_AUTHORED = "authored";
2478 /**
2479   * <b>Fluent Client</b> search parameter constant for <b>authored</b>
2480   * <p>
2481   * Description: <b>Date request signed</b><br>
2482   * Type: <b>date</b><br>
2483   * Path: <b>ServiceRequest.authoredOn</b><br>
2484   * </p>
2485   */
2486  public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED);
2487
2488 /**
2489   * Search parameter: <b>based-on</b>
2490   * <p>
2491   * Description: <b>What request fulfills</b><br>
2492   * Type: <b>reference</b><br>
2493   * Path: <b>ServiceRequest.basedOn</b><br>
2494   * </p>
2495   */
2496  @SearchParamDefinition(name="based-on", path="ServiceRequest.basedOn", description="What request fulfills", type="reference", target={CarePlan.class, MedicationRequest.class, ServiceRequest.class } )
2497  public static final String SP_BASED_ON = "based-on";
2498 /**
2499   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
2500   * <p>
2501   * Description: <b>What request fulfills</b><br>
2502   * Type: <b>reference</b><br>
2503   * Path: <b>ServiceRequest.basedOn</b><br>
2504   * </p>
2505   */
2506  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
2507
2508/**
2509   * Constant for fluent queries to be used to add include statements. Specifies
2510   * the path value of "<b>ServiceRequest:based-on</b>".
2511   */
2512  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("ServiceRequest:based-on").toLocked();
2513
2514 /**
2515   * Search parameter: <b>body-site</b>
2516   * <p>
2517   * Description: <b>Where procedure is going to be done</b><br>
2518   * Type: <b>token</b><br>
2519   * Path: <b>ServiceRequest.bodySite</b><br>
2520   * </p>
2521   */
2522  @SearchParamDefinition(name="body-site", path="ServiceRequest.bodySite", description="Where procedure is going to be done", type="token" )
2523  public static final String SP_BODY_SITE = "body-site";
2524 /**
2525   * <b>Fluent Client</b> search parameter constant for <b>body-site</b>
2526   * <p>
2527   * Description: <b>Where procedure is going to be done</b><br>
2528   * Type: <b>token</b><br>
2529   * Path: <b>ServiceRequest.bodySite</b><br>
2530   * </p>
2531   */
2532  public static final ca.uhn.fhir.rest.gclient.TokenClientParam BODY_SITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BODY_SITE);
2533
2534 /**
2535   * Search parameter: <b>category</b>
2536   * <p>
2537   * Description: <b>Classification of service</b><br>
2538   * Type: <b>token</b><br>
2539   * Path: <b>ServiceRequest.category</b><br>
2540   * </p>
2541   */
2542  @SearchParamDefinition(name="category", path="ServiceRequest.category", description="Classification of service", type="token" )
2543  public static final String SP_CATEGORY = "category";
2544 /**
2545   * <b>Fluent Client</b> search parameter constant for <b>category</b>
2546   * <p>
2547   * Description: <b>Classification of service</b><br>
2548   * Type: <b>token</b><br>
2549   * Path: <b>ServiceRequest.category</b><br>
2550   * </p>
2551   */
2552  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY);
2553
2554 /**
2555   * Search parameter: <b>instantiates-canonical</b>
2556   * <p>
2557   * Description: <b>Instantiates FHIR protocol or definition</b><br>
2558   * Type: <b>reference</b><br>
2559   * Path: <b>ServiceRequest.instantiatesCanonical</b><br>
2560   * </p>
2561   */
2562  @SearchParamDefinition(name="instantiates-canonical", path="ServiceRequest.instantiatesCanonical", description="Instantiates FHIR protocol or definition", type="reference", target={ActivityDefinition.class, PlanDefinition.class } )
2563  public static final String SP_INSTANTIATES_CANONICAL = "instantiates-canonical";
2564 /**
2565   * <b>Fluent Client</b> search parameter constant for <b>instantiates-canonical</b>
2566   * <p>
2567   * Description: <b>Instantiates FHIR protocol or definition</b><br>
2568   * Type: <b>reference</b><br>
2569   * Path: <b>ServiceRequest.instantiatesCanonical</b><br>
2570   * </p>
2571   */
2572  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INSTANTIATES_CANONICAL = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INSTANTIATES_CANONICAL);
2573
2574/**
2575   * Constant for fluent queries to be used to add include statements. Specifies
2576   * the path value of "<b>ServiceRequest:instantiates-canonical</b>".
2577   */
2578  public static final ca.uhn.fhir.model.api.Include INCLUDE_INSTANTIATES_CANONICAL = new ca.uhn.fhir.model.api.Include("ServiceRequest:instantiates-canonical").toLocked();
2579
2580 /**
2581   * Search parameter: <b>instantiates-uri</b>
2582   * <p>
2583   * Description: <b>Instantiates external protocol or definition</b><br>
2584   * Type: <b>uri</b><br>
2585   * Path: <b>ServiceRequest.instantiatesUri</b><br>
2586   * </p>
2587   */
2588  @SearchParamDefinition(name="instantiates-uri", path="ServiceRequest.instantiatesUri", description="Instantiates external protocol or definition", type="uri" )
2589  public static final String SP_INSTANTIATES_URI = "instantiates-uri";
2590 /**
2591   * <b>Fluent Client</b> search parameter constant for <b>instantiates-uri</b>
2592   * <p>
2593   * Description: <b>Instantiates external protocol or definition</b><br>
2594   * Type: <b>uri</b><br>
2595   * Path: <b>ServiceRequest.instantiatesUri</b><br>
2596   * </p>
2597   */
2598  public static final ca.uhn.fhir.rest.gclient.UriClientParam INSTANTIATES_URI = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_INSTANTIATES_URI);
2599
2600 /**
2601   * Search parameter: <b>intent</b>
2602   * <p>
2603   * Description: <b>proposal | plan | directive | order +</b><br>
2604   * Type: <b>token</b><br>
2605   * Path: <b>ServiceRequest.intent</b><br>
2606   * </p>
2607   */
2608  @SearchParamDefinition(name="intent", path="ServiceRequest.intent", description="proposal | plan | directive | order +", type="token" )
2609  public static final String SP_INTENT = "intent";
2610 /**
2611   * <b>Fluent Client</b> search parameter constant for <b>intent</b>
2612   * <p>
2613   * Description: <b>proposal | plan | directive | order +</b><br>
2614   * Type: <b>token</b><br>
2615   * Path: <b>ServiceRequest.intent</b><br>
2616   * </p>
2617   */
2618  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INTENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INTENT);
2619
2620 /**
2621   * Search parameter: <b>occurrence</b>
2622   * <p>
2623   * Description: <b>When service should occur</b><br>
2624   * Type: <b>date</b><br>
2625   * Path: <b>ServiceRequest.occurrence</b><br>
2626   * </p>
2627   */
2628  @SearchParamDefinition(name="occurrence", path="ServiceRequest.occurrence", description="When service should occur", type="date" )
2629  public static final String SP_OCCURRENCE = "occurrence";
2630 /**
2631   * <b>Fluent Client</b> search parameter constant for <b>occurrence</b>
2632   * <p>
2633   * Description: <b>When service should occur</b><br>
2634   * Type: <b>date</b><br>
2635   * Path: <b>ServiceRequest.occurrence</b><br>
2636   * </p>
2637   */
2638  public static final ca.uhn.fhir.rest.gclient.DateClientParam OCCURRENCE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_OCCURRENCE);
2639
2640 /**
2641   * Search parameter: <b>performer-type</b>
2642   * <p>
2643   * Description: <b>Performer role</b><br>
2644   * Type: <b>token</b><br>
2645   * Path: <b>ServiceRequest.performerType</b><br>
2646   * </p>
2647   */
2648  @SearchParamDefinition(name="performer-type", path="ServiceRequest.performerType", description="Performer role", type="token" )
2649  public static final String SP_PERFORMER_TYPE = "performer-type";
2650 /**
2651   * <b>Fluent Client</b> search parameter constant for <b>performer-type</b>
2652   * <p>
2653   * Description: <b>Performer role</b><br>
2654   * Type: <b>token</b><br>
2655   * Path: <b>ServiceRequest.performerType</b><br>
2656   * </p>
2657   */
2658  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PERFORMER_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PERFORMER_TYPE);
2659
2660 /**
2661   * Search parameter: <b>performer</b>
2662   * <p>
2663   * Description: <b>Requested performer</b><br>
2664   * Type: <b>reference</b><br>
2665   * Path: <b>ServiceRequest.performer</b><br>
2666   * </p>
2667   */
2668  @SearchParamDefinition(name="performer", path="ServiceRequest.performer", description="Requested performer", 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 Patient"), @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, HealthcareService.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2669  public static final String SP_PERFORMER = "performer";
2670 /**
2671   * <b>Fluent Client</b> search parameter constant for <b>performer</b>
2672   * <p>
2673   * Description: <b>Requested performer</b><br>
2674   * Type: <b>reference</b><br>
2675   * Path: <b>ServiceRequest.performer</b><br>
2676   * </p>
2677   */
2678  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER);
2679
2680/**
2681   * Constant for fluent queries to be used to add include statements. Specifies
2682   * the path value of "<b>ServiceRequest:performer</b>".
2683   */
2684  public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("ServiceRequest:performer").toLocked();
2685
2686 /**
2687   * Search parameter: <b>priority</b>
2688   * <p>
2689   * Description: <b>routine | urgent | asap | stat</b><br>
2690   * Type: <b>token</b><br>
2691   * Path: <b>ServiceRequest.priority</b><br>
2692   * </p>
2693   */
2694  @SearchParamDefinition(name="priority", path="ServiceRequest.priority", description="routine | urgent | asap | stat", type="token" )
2695  public static final String SP_PRIORITY = "priority";
2696 /**
2697   * <b>Fluent Client</b> search parameter constant for <b>priority</b>
2698   * <p>
2699   * Description: <b>routine | urgent | asap | stat</b><br>
2700   * Type: <b>token</b><br>
2701   * Path: <b>ServiceRequest.priority</b><br>
2702   * </p>
2703   */
2704  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY);
2705
2706 /**
2707   * Search parameter: <b>replaces</b>
2708   * <p>
2709   * Description: <b>What request replaces</b><br>
2710   * Type: <b>reference</b><br>
2711   * Path: <b>ServiceRequest.replaces</b><br>
2712   * </p>
2713   */
2714  @SearchParamDefinition(name="replaces", path="ServiceRequest.replaces", description="What request replaces", type="reference", target={ServiceRequest.class } )
2715  public static final String SP_REPLACES = "replaces";
2716 /**
2717   * <b>Fluent Client</b> search parameter constant for <b>replaces</b>
2718   * <p>
2719   * Description: <b>What request replaces</b><br>
2720   * Type: <b>reference</b><br>
2721   * Path: <b>ServiceRequest.replaces</b><br>
2722   * </p>
2723   */
2724  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REPLACES = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REPLACES);
2725
2726/**
2727   * Constant for fluent queries to be used to add include statements. Specifies
2728   * the path value of "<b>ServiceRequest:replaces</b>".
2729   */
2730  public static final ca.uhn.fhir.model.api.Include INCLUDE_REPLACES = new ca.uhn.fhir.model.api.Include("ServiceRequest:replaces").toLocked();
2731
2732 /**
2733   * Search parameter: <b>requester</b>
2734   * <p>
2735   * Description: <b>Who/what is requesting service</b><br>
2736   * Type: <b>reference</b><br>
2737   * Path: <b>ServiceRequest.requester</b><br>
2738   * </p>
2739   */
2740  @SearchParamDefinition(name="requester", path="ServiceRequest.requester", description="Who/what is requesting service", 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") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2741  public static final String SP_REQUESTER = "requester";
2742 /**
2743   * <b>Fluent Client</b> search parameter constant for <b>requester</b>
2744   * <p>
2745   * Description: <b>Who/what is requesting service</b><br>
2746   * Type: <b>reference</b><br>
2747   * Path: <b>ServiceRequest.requester</b><br>
2748   * </p>
2749   */
2750  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTER);
2751
2752/**
2753   * Constant for fluent queries to be used to add include statements. Specifies
2754   * the path value of "<b>ServiceRequest:requester</b>".
2755   */
2756  public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTER = new ca.uhn.fhir.model.api.Include("ServiceRequest:requester").toLocked();
2757
2758 /**
2759   * Search parameter: <b>requisition</b>
2760   * <p>
2761   * Description: <b>Composite Request ID</b><br>
2762   * Type: <b>token</b><br>
2763   * Path: <b>ServiceRequest.requisition</b><br>
2764   * </p>
2765   */
2766  @SearchParamDefinition(name="requisition", path="ServiceRequest.requisition", description="Composite Request ID", type="token" )
2767  public static final String SP_REQUISITION = "requisition";
2768 /**
2769   * <b>Fluent Client</b> search parameter constant for <b>requisition</b>
2770   * <p>
2771   * Description: <b>Composite Request ID</b><br>
2772   * Type: <b>token</b><br>
2773   * Path: <b>ServiceRequest.requisition</b><br>
2774   * </p>
2775   */
2776  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUISITION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUISITION);
2777
2778 /**
2779   * Search parameter: <b>specimen</b>
2780   * <p>
2781   * Description: <b>Specimen to be tested</b><br>
2782   * Type: <b>reference</b><br>
2783   * Path: <b>ServiceRequest.specimen</b><br>
2784   * </p>
2785   */
2786  @SearchParamDefinition(name="specimen", path="ServiceRequest.specimen", description="Specimen to be tested", type="reference", target={Specimen.class } )
2787  public static final String SP_SPECIMEN = "specimen";
2788 /**
2789   * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
2790   * <p>
2791   * Description: <b>Specimen to be tested</b><br>
2792   * Type: <b>reference</b><br>
2793   * Path: <b>ServiceRequest.specimen</b><br>
2794   * </p>
2795   */
2796  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SPECIMEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SPECIMEN);
2797
2798/**
2799   * Constant for fluent queries to be used to add include statements. Specifies
2800   * the path value of "<b>ServiceRequest:specimen</b>".
2801   */
2802  public static final ca.uhn.fhir.model.api.Include INCLUDE_SPECIMEN = new ca.uhn.fhir.model.api.Include("ServiceRequest:specimen").toLocked();
2803
2804 /**
2805   * Search parameter: <b>status</b>
2806   * <p>
2807   * Description: <b>draft | active | on-hold | revoked | completed | entered-in-error | unknown</b><br>
2808   * Type: <b>token</b><br>
2809   * Path: <b>ServiceRequest.status</b><br>
2810   * </p>
2811   */
2812  @SearchParamDefinition(name="status", path="ServiceRequest.status", description="draft | active | on-hold | revoked | completed | entered-in-error | unknown", type="token" )
2813  public static final String SP_STATUS = "status";
2814 /**
2815   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2816   * <p>
2817   * Description: <b>draft | active | on-hold | revoked | completed | entered-in-error | unknown</b><br>
2818   * Type: <b>token</b><br>
2819   * Path: <b>ServiceRequest.status</b><br>
2820   * </p>
2821   */
2822  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2823
2824 /**
2825   * Search parameter: <b>subject</b>
2826   * <p>
2827   * Description: <b>Search by subject</b><br>
2828   * Type: <b>reference</b><br>
2829   * Path: <b>ServiceRequest.subject</b><br>
2830   * </p>
2831   */
2832  @SearchParamDefinition(name="subject", path="ServiceRequest.subject", description="Search by subject", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Device.class, Group.class, Location.class, Patient.class } )
2833  public static final String SP_SUBJECT = "subject";
2834 /**
2835   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2836   * <p>
2837   * Description: <b>Search by subject</b><br>
2838   * Type: <b>reference</b><br>
2839   * Path: <b>ServiceRequest.subject</b><br>
2840   * </p>
2841   */
2842  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2843
2844/**
2845   * Constant for fluent queries to be used to add include statements. Specifies
2846   * the path value of "<b>ServiceRequest:subject</b>".
2847   */
2848  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ServiceRequest:subject").toLocked();
2849
2850 /**
2851   * Search parameter: <b>code</b>
2852   * <p>
2853   * Description: <b>Multiple Resources: 
2854
2855* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
2856* [Condition](condition.html): Code for the condition
2857* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
2858* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
2859* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
2860* [List](list.html): What the purpose of this list is
2861* [Medication](medication.html): Returns medications for a specific code
2862* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
2863* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
2864* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
2865* [MedicationUsage](medicationusage.html): Return statements of this medication code
2866* [Observation](observation.html): The code of the observation type
2867* [Procedure](procedure.html): A code to identify a  procedure
2868* [ServiceRequest](servicerequest.html): What is being requested/ordered
2869</b><br>
2870   * Type: <b>token</b><br>
2871   * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationUsage.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code</b><br>
2872   * </p>
2873   */
2874  @SearchParamDefinition(name="code", path="AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationUsage.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance\r\n* [Condition](condition.html): Code for the condition\r\n* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered\r\n* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code\r\n* [List](list.html): What the purpose of this list is\r\n* [Medication](medication.html): Returns medications for a specific code\r\n* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code\r\n* [MedicationUsage](medicationusage.html): Return statements of this medication code\r\n* [Observation](observation.html): The code of the observation type\r\n* [Procedure](procedure.html): A code to identify a  procedure\r\n* [ServiceRequest](servicerequest.html): What is being requested/ordered\r\n", type="token" )
2875  public static final String SP_CODE = "code";
2876 /**
2877   * <b>Fluent Client</b> search parameter constant for <b>code</b>
2878   * <p>
2879   * Description: <b>Multiple Resources: 
2880
2881* [AllergyIntolerance](allergyintolerance.html): Code that identifies the allergy or intolerance
2882* [Condition](condition.html): Code for the condition
2883* [DeviceRequest](devicerequest.html): Code for what is being requested/ordered
2884* [DiagnosticReport](diagnosticreport.html): The code for the report, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result
2885* [FamilyMemberHistory](familymemberhistory.html): A search by a condition code
2886* [List](list.html): What the purpose of this list is
2887* [Medication](medication.html): Returns medications for a specific code
2888* [MedicationAdministration](medicationadministration.html): Return administrations of this medication code
2889* [MedicationDispense](medicationdispense.html): Returns dispenses of this medicine code
2890* [MedicationRequest](medicationrequest.html): Return prescriptions of this medication code
2891* [MedicationUsage](medicationusage.html): Return statements of this medication code
2892* [Observation](observation.html): The code of the observation type
2893* [Procedure](procedure.html): A code to identify a  procedure
2894* [ServiceRequest](servicerequest.html): What is being requested/ordered
2895</b><br>
2896   * Type: <b>token</b><br>
2897   * Path: <b>AllergyIntolerance.code | AllergyIntolerance.reaction.substance | Condition.code | (DeviceRequest.code as CodeableConcept) | DiagnosticReport.code | FamilyMemberHistory.condition.code | List.code | Medication.code | (MedicationAdministration.medication as CodeableConcept) | (MedicationDispense.medication as CodeableConcept) | (MedicationRequest.medication as CodeableConcept) | (MedicationUsage.medication as CodeableConcept) | Observation.code | Procedure.code | ServiceRequest.code</b><br>
2898   * </p>
2899   */
2900  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
2901
2902 /**
2903   * Search parameter: <b>encounter</b>
2904   * <p>
2905   * Description: <b>Multiple Resources: 
2906
2907* [Composition](composition.html): Context of the Composition
2908* [DeviceRequest](devicerequest.html): Encounter during which request was created
2909* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2910* [DocumentReference](documentreference.html): Context of the document  content
2911* [Flag](flag.html): Alert relevant during encounter
2912* [List](list.html): Context in which list created
2913* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2914* [Observation](observation.html): Encounter related to the observation
2915* [Procedure](procedure.html): The Encounter during which this Procedure was created
2916* [RiskAssessment](riskassessment.html): Where was assessment performed?
2917* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2918* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2919</b><br>
2920   * Type: <b>reference</b><br>
2921   * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br>
2922   * </p>
2923   */
2924  @SearchParamDefinition(name="encounter", path="Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [Composition](composition.html): Context of the Composition\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [DocumentReference](documentreference.html): Context of the document  content\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [List](list.html): Context in which list created\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
2925  public static final String SP_ENCOUNTER = "encounter";
2926 /**
2927   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
2928   * <p>
2929   * Description: <b>Multiple Resources: 
2930
2931* [Composition](composition.html): Context of the Composition
2932* [DeviceRequest](devicerequest.html): Encounter during which request was created
2933* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2934* [DocumentReference](documentreference.html): Context of the document  content
2935* [Flag](flag.html): Alert relevant during encounter
2936* [List](list.html): Context in which list created
2937* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2938* [Observation](observation.html): Encounter related to the observation
2939* [Procedure](procedure.html): The Encounter during which this Procedure was created
2940* [RiskAssessment](riskassessment.html): Where was assessment performed?
2941* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2942* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2943</b><br>
2944   * Type: <b>reference</b><br>
2945   * Path: <b>Composition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | DocumentReference.context.encounter | Flag.encounter | List.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | RiskAssessment.encounter | ServiceRequest.encounter | VisionPrescription.encounter</b><br>
2946   * </p>
2947   */
2948  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
2949
2950/**
2951   * Constant for fluent queries to be used to add include statements. Specifies
2952   * the path value of "<b>ServiceRequest:encounter</b>".
2953   */
2954  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("ServiceRequest:encounter").toLocked();
2955
2956 /**
2957   * Search parameter: <b>identifier</b>
2958   * <p>
2959   * Description: <b>Multiple Resources: 
2960
2961* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2962* [CarePlan](careplan.html): External Ids for this plan
2963* [CareTeam](careteam.html): External Ids for this team
2964* [Composition](composition.html): Version-independent identifier for the Composition
2965* [Condition](condition.html): A unique identifier of the condition record
2966* [Consent](consent.html): Identifier for this record (external references)
2967* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2968* [DeviceRequest](devicerequest.html): Business identifier for request/order
2969* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2970* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
2971* [DocumentReference](documentreference.html): Master Version Specific Identifier
2972* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2973* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2974* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2975* [Goal](goal.html): External Ids for this goal
2976* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number
2977* [Immunization](immunization.html): Business identifier
2978* [List](list.html): Business identifier
2979* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2980* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2981* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2982* [MedicationUsage](medicationusage.html): Return statements with this external identifier
2983* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2984* [Observation](observation.html): The unique id for a particular observation
2985* [Procedure](procedure.html): A unique identifier for a procedure
2986* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2987* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2988* [SupplyDelivery](supplydelivery.html): External identifier
2989* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2990* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2991</b><br>
2992   * Type: <b>token</b><br>
2993   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
2994   * </p>
2995   */
2996  @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\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* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents\r\n* [DocumentReference](documentreference.html): Master Version Specific Identifier\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number\r\n* [Immunization](immunization.html): Business identifier\r\n* [List](list.html): Business 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* [MedicationUsage](medicationusage.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* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
2997  public static final String SP_IDENTIFIER = "identifier";
2998 /**
2999   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3000   * <p>
3001   * Description: <b>Multiple Resources: 
3002
3003* [AllergyIntolerance](allergyintolerance.html): External ids for this item
3004* [CarePlan](careplan.html): External Ids for this plan
3005* [CareTeam](careteam.html): External Ids for this team
3006* [Composition](composition.html): Version-independent identifier for the Composition
3007* [Condition](condition.html): A unique identifier of the condition record
3008* [Consent](consent.html): Identifier for this record (external references)
3009* [DetectedIssue](detectedissue.html): Unique id for the detected issue
3010* [DeviceRequest](devicerequest.html): Business identifier for request/order
3011* [DiagnosticReport](diagnosticreport.html): An identifier for the report
3012* [DocumentManifest](documentmanifest.html): Unique Identifier for the set of documents
3013* [DocumentReference](documentreference.html): Master Version Specific Identifier
3014* [Encounter](encounter.html): Identifier(s) by which this encounter is known
3015* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
3016* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
3017* [Goal](goal.html): External Ids for this goal
3018* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID and Accession number
3019* [Immunization](immunization.html): Business identifier
3020* [List](list.html): Business identifier
3021* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
3022* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
3023* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
3024* [MedicationUsage](medicationusage.html): Return statements with this external identifier
3025* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
3026* [Observation](observation.html): The unique id for a particular observation
3027* [Procedure](procedure.html): A unique identifier for a procedure
3028* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
3029* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
3030* [SupplyDelivery](supplydelivery.html): External identifier
3031* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
3032* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
3033</b><br>
3034   * Type: <b>token</b><br>
3035   * Path: <b>AllergyIntolerance.identifier | CarePlan.identifier | CareTeam.identifier | Composition.identifier | Condition.identifier | Consent.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DiagnosticReport.identifier | DocumentManifest.masterIdentifier | DocumentManifest.identifier | DocumentReference.masterIdentifier | DocumentReference.identifier | Encounter.identifier | EpisodeOfCare.identifier | FamilyMemberHistory.identifier | Goal.identifier | ImagingStudy.identifier | Immunization.identifier | List.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationUsage.identifier | NutritionOrder.identifier | Observation.identifier | Procedure.identifier | RiskAssessment.identifier | ServiceRequest.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | VisionPrescription.identifier</b><br>
3036   * </p>
3037   */
3038  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3039
3040 /**
3041   * Search parameter: <b>patient</b>
3042   * <p>
3043   * Description: <b>Multiple Resources: 
3044
3045* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3046* [CarePlan](careplan.html): Who the care plan is for
3047* [CareTeam](careteam.html): Who care team is for
3048* [ClinicalImpression](clinicalimpression.html): Patient or group assessed
3049* [Composition](composition.html): Who and/or what the composition is about
3050* [Condition](condition.html): Who has the condition?
3051* [Consent](consent.html): Who the consent applies to
3052* [DetectedIssue](detectedissue.html): Associated patient
3053* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3054* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient
3055* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3056* [DocumentManifest](documentmanifest.html): The subject of the set of documents
3057* [DocumentReference](documentreference.html): Who/what is the subject of the document
3058* [Encounter](encounter.html): The patient or group present at the encounter
3059* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3060* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3061* [Flag](flag.html): The identity of a subject to list flags for
3062* [Goal](goal.html): Who this goal is intended for
3063* [ImagingStudy](imagingstudy.html): Who the study is about
3064* [Immunization](immunization.html): The patient for the vaccination record
3065* [List](list.html): If all resources have the same subject
3066* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3067* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3068* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3069* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
3070* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
3071* [Observation](observation.html): The subject that the observation is about (if patient)
3072* [Procedure](procedure.html): Search by subject - a patient
3073* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3074* [ServiceRequest](servicerequest.html): Search by subject - a patient
3075* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3076* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3077</b><br>
3078   * Type: <b>reference</b><br>
3079   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
3080   * </p>
3081   */
3082  @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ClinicalImpression](clinicalimpression.html): Patient or group assessed\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* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentManifest](documentmanifest.html): The subject of the set of documents\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient or group present at the encounter\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\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* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [List](list.html): If all resources have the same subject\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* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Group.class, Patient.class } )
3083  public static final String SP_PATIENT = "patient";
3084 /**
3085   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
3086   * <p>
3087   * Description: <b>Multiple Resources: 
3088
3089* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
3090* [CarePlan](careplan.html): Who the care plan is for
3091* [CareTeam](careteam.html): Who care team is for
3092* [ClinicalImpression](clinicalimpression.html): Patient or group assessed
3093* [Composition](composition.html): Who and/or what the composition is about
3094* [Condition](condition.html): Who has the condition?
3095* [Consent](consent.html): Who the consent applies to
3096* [DetectedIssue](detectedissue.html): Associated patient
3097* [DeviceRequest](devicerequest.html): Individual the service is ordered for
3098* [DeviceUseStatement](deviceusestatement.html): Search by subject - a patient
3099* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
3100* [DocumentManifest](documentmanifest.html): The subject of the set of documents
3101* [DocumentReference](documentreference.html): Who/what is the subject of the document
3102* [Encounter](encounter.html): The patient or group present at the encounter
3103* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
3104* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
3105* [Flag](flag.html): The identity of a subject to list flags for
3106* [Goal](goal.html): Who this goal is intended for
3107* [ImagingStudy](imagingstudy.html): Who the study is about
3108* [Immunization](immunization.html): The patient for the vaccination record
3109* [List](list.html): If all resources have the same subject
3110* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
3111* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
3112* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
3113* [MedicationUsage](medicationusage.html): Returns statements for a specific patient.
3114* [NutritionOrder](nutritionorder.html): The identity of the person who requires the diet, formula or nutritional supplement
3115* [Observation](observation.html): The subject that the observation is about (if patient)
3116* [Procedure](procedure.html): Search by subject - a patient
3117* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
3118* [ServiceRequest](servicerequest.html): Search by subject - a patient
3119* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
3120* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
3121</b><br>
3122   * Type: <b>reference</b><br>
3123   * Path: <b>AllergyIntolerance.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ClinicalImpression.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.patient | DetectedIssue.patient | DeviceRequest.subject.where(resolve() is Patient) | DeviceUseStatement.subject | DiagnosticReport.subject.where(resolve() is Patient) | DocumentManifest.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EpisodeOfCare.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | List.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationUsage.subject.where(resolve() is Patient) | NutritionOrder.patient | Observation.subject.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | SupplyDelivery.patient | VisionPrescription.patient</b><br>
3124   * </p>
3125   */
3126  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
3127
3128/**
3129   * Constant for fluent queries to be used to add include statements. Specifies
3130   * the path value of "<b>ServiceRequest:patient</b>".
3131   */
3132  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ServiceRequest:patient").toLocked();
3133
3134
3135}
3136