001package org.hl7.fhir.r4.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056
057import org.hl7.fhir.exceptions.FHIRException;
058
059import ca.uhn.fhir.model.api.annotation.Child;
060import ca.uhn.fhir.model.api.annotation.Description;
061import ca.uhn.fhir.model.api.annotation.ResourceDef;
062import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
063/**
064 * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.
065 */
066@ResourceDef(name="GuidanceResponse", profile="http://hl7.org/fhir/StructureDefinition/GuidanceResponse")
067public class GuidanceResponse extends DomainResource {
068
069    public enum GuidanceResponseStatus {
070        /**
071         * The request was processed successfully.
072         */
073        SUCCESS, 
074        /**
075         * The request was processed successfully, but more data may result in a more complete evaluation.
076         */
077        DATAREQUESTED, 
078        /**
079         * The request was processed, but more data is required to complete the evaluation.
080         */
081        DATAREQUIRED, 
082        /**
083         * The request is currently being processed.
084         */
085        INPROGRESS, 
086        /**
087         * The request was not processed successfully.
088         */
089        FAILURE, 
090        /**
091         * The response was entered in error.
092         */
093        ENTEREDINERROR, 
094        /**
095         * added to help the parsers with the generic types
096         */
097        NULL;
098        public static GuidanceResponseStatus fromCode(String codeString) throws FHIRException {
099            if (codeString == null || "".equals(codeString))
100                return null;
101        if ("success".equals(codeString))
102          return SUCCESS;
103        if ("data-requested".equals(codeString))
104          return DATAREQUESTED;
105        if ("data-required".equals(codeString))
106          return DATAREQUIRED;
107        if ("in-progress".equals(codeString))
108          return INPROGRESS;
109        if ("failure".equals(codeString))
110          return FAILURE;
111        if ("entered-in-error".equals(codeString))
112          return ENTEREDINERROR;
113        if (Configuration.isAcceptInvalidEnums())
114          return null;
115        else
116          throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'");
117        }
118        public String toCode() {
119          switch (this) {
120            case SUCCESS: return "success";
121            case DATAREQUESTED: return "data-requested";
122            case DATAREQUIRED: return "data-required";
123            case INPROGRESS: return "in-progress";
124            case FAILURE: return "failure";
125            case ENTEREDINERROR: return "entered-in-error";
126            default: return "?";
127          }
128        }
129        public String getSystem() {
130          switch (this) {
131            case SUCCESS: return "http://hl7.org/fhir/guidance-response-status";
132            case DATAREQUESTED: return "http://hl7.org/fhir/guidance-response-status";
133            case DATAREQUIRED: return "http://hl7.org/fhir/guidance-response-status";
134            case INPROGRESS: return "http://hl7.org/fhir/guidance-response-status";
135            case FAILURE: return "http://hl7.org/fhir/guidance-response-status";
136            case ENTEREDINERROR: return "http://hl7.org/fhir/guidance-response-status";
137            default: return "?";
138          }
139        }
140        public String getDefinition() {
141          switch (this) {
142            case SUCCESS: return "The request was processed successfully.";
143            case DATAREQUESTED: return "The request was processed successfully, but more data may result in a more complete evaluation.";
144            case DATAREQUIRED: return "The request was processed, but more data is required to complete the evaluation.";
145            case INPROGRESS: return "The request is currently being processed.";
146            case FAILURE: return "The request was not processed successfully.";
147            case ENTEREDINERROR: return "The response was entered in error.";
148            default: return "?";
149          }
150        }
151        public String getDisplay() {
152          switch (this) {
153            case SUCCESS: return "Success";
154            case DATAREQUESTED: return "Data Requested";
155            case DATAREQUIRED: return "Data Required";
156            case INPROGRESS: return "In Progress";
157            case FAILURE: return "Failure";
158            case ENTEREDINERROR: return "Entered In Error";
159            default: return "?";
160          }
161        }
162    }
163
164  public static class GuidanceResponseStatusEnumFactory implements EnumFactory<GuidanceResponseStatus> {
165    public GuidanceResponseStatus fromCode(String codeString) throws IllegalArgumentException {
166      if (codeString == null || "".equals(codeString))
167            if (codeString == null || "".equals(codeString))
168                return null;
169        if ("success".equals(codeString))
170          return GuidanceResponseStatus.SUCCESS;
171        if ("data-requested".equals(codeString))
172          return GuidanceResponseStatus.DATAREQUESTED;
173        if ("data-required".equals(codeString))
174          return GuidanceResponseStatus.DATAREQUIRED;
175        if ("in-progress".equals(codeString))
176          return GuidanceResponseStatus.INPROGRESS;
177        if ("failure".equals(codeString))
178          return GuidanceResponseStatus.FAILURE;
179        if ("entered-in-error".equals(codeString))
180          return GuidanceResponseStatus.ENTEREDINERROR;
181        throw new IllegalArgumentException("Unknown GuidanceResponseStatus code '"+codeString+"'");
182        }
183        public Enumeration<GuidanceResponseStatus> fromType(Base code) throws FHIRException {
184          if (code == null)
185            return null;
186          if (code.isEmpty())
187            return new Enumeration<GuidanceResponseStatus>(this);
188          String codeString = ((PrimitiveType) code).asStringValue();
189          if (codeString == null || "".equals(codeString))
190            return null;
191        if ("success".equals(codeString))
192          return new Enumeration<GuidanceResponseStatus>(this, GuidanceResponseStatus.SUCCESS);
193        if ("data-requested".equals(codeString))
194          return new Enumeration<GuidanceResponseStatus>(this, GuidanceResponseStatus.DATAREQUESTED);
195        if ("data-required".equals(codeString))
196          return new Enumeration<GuidanceResponseStatus>(this, GuidanceResponseStatus.DATAREQUIRED);
197        if ("in-progress".equals(codeString))
198          return new Enumeration<GuidanceResponseStatus>(this, GuidanceResponseStatus.INPROGRESS);
199        if ("failure".equals(codeString))
200          return new Enumeration<GuidanceResponseStatus>(this, GuidanceResponseStatus.FAILURE);
201        if ("entered-in-error".equals(codeString))
202          return new Enumeration<GuidanceResponseStatus>(this, GuidanceResponseStatus.ENTEREDINERROR);
203        throw new FHIRException("Unknown GuidanceResponseStatus code '"+codeString+"'");
204        }
205    public String toCode(GuidanceResponseStatus code) {
206      if (code == GuidanceResponseStatus.SUCCESS)
207        return "success";
208      if (code == GuidanceResponseStatus.DATAREQUESTED)
209        return "data-requested";
210      if (code == GuidanceResponseStatus.DATAREQUIRED)
211        return "data-required";
212      if (code == GuidanceResponseStatus.INPROGRESS)
213        return "in-progress";
214      if (code == GuidanceResponseStatus.FAILURE)
215        return "failure";
216      if (code == GuidanceResponseStatus.ENTEREDINERROR)
217        return "entered-in-error";
218      return "?";
219      }
220    public String toSystem(GuidanceResponseStatus code) {
221      return code.getSystem();
222      }
223    }
224
225    /**
226     * The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.
227     */
228    @Child(name = "requestIdentifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true)
229    @Description(shortDefinition="The identifier of the request associated with this response, if any", formalDefinition="The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario." )
230    protected Identifier requestIdentifier;
231
232    /**
233     * Allows a service to provide  unique, business identifiers for the response.
234     */
235    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
236    @Description(shortDefinition="Business identifier", formalDefinition="Allows a service to provide  unique, business identifiers for the response." )
237    protected List<Identifier> identifier;
238
239    /**
240     * An identifier, CodeableConcept or canonical reference to the guidance that was requested.
241     */
242    @Child(name = "module", type = {UriType.class, CanonicalType.class, CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=true)
243    @Description(shortDefinition="What guidance was requested", formalDefinition="An identifier, CodeableConcept or canonical reference to the guidance that was requested." )
244    protected Type module;
245
246    /**
247     * The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.
248     */
249    @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true)
250    @Description(shortDefinition="success | data-requested | data-required | in-progress | failure | entered-in-error", formalDefinition="The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information." )
251    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/guidance-response-status")
252    protected Enumeration<GuidanceResponseStatus> status;
253
254    /**
255     * The patient for which the request was processed.
256     */
257    @Child(name = "subject", type = {Patient.class, Group.class}, order=4, min=0, max=1, modifier=false, summary=false)
258    @Description(shortDefinition="Patient the request was performed for", formalDefinition="The patient for which the request was processed." )
259    protected Reference subject;
260
261    /**
262     * The actual object that is the target of the reference (The patient for which the request was processed.)
263     */
264    protected Resource subjectTarget;
265
266    /**
267     * The encounter during which this response was created or to which the creation of this record is tightly associated.
268     */
269    @Child(name = "encounter", type = {Encounter.class}, order=5, min=0, max=1, modifier=false, summary=false)
270    @Description(shortDefinition="Encounter during which the response was returned", formalDefinition="The encounter during which this response was created or to which the creation of this record is tightly associated." )
271    protected Reference encounter;
272
273    /**
274     * The actual object that is the target of the reference (The encounter during which this response was created or to which the creation of this record is tightly associated.)
275     */
276    protected Encounter encounterTarget;
277
278    /**
279     * Indicates when the guidance response was processed.
280     */
281    @Child(name = "occurrenceDateTime", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
282    @Description(shortDefinition="When the guidance response was processed", formalDefinition="Indicates when the guidance response was processed." )
283    protected DateTimeType occurrenceDateTime;
284
285    /**
286     * Provides a reference to the device that performed the guidance.
287     */
288    @Child(name = "performer", type = {Device.class}, order=7, min=0, max=1, modifier=false, summary=false)
289    @Description(shortDefinition="Device returning the guidance", formalDefinition="Provides a reference to the device that performed the guidance." )
290    protected Reference performer;
291
292    /**
293     * The actual object that is the target of the reference (Provides a reference to the device that performed the guidance.)
294     */
295    protected Device performerTarget;
296
297    /**
298     * Describes the reason for the guidance response in coded or textual form.
299     */
300    @Child(name = "reasonCode", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
301    @Description(shortDefinition="Why guidance is needed", formalDefinition="Describes the reason for the guidance response in coded or textual form." )
302    protected List<CodeableConcept> reasonCode;
303
304    /**
305     * Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.
306     */
307    @Child(name = "reasonReference", type = {Condition.class, Observation.class, DiagnosticReport.class, DocumentReference.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
308    @Description(shortDefinition="Why guidance is needed", formalDefinition="Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response." )
309    protected List<Reference> reasonReference;
310    /**
311     * The actual objects that are the target of the reference (Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.)
312     */
313    protected List<Resource> reasonReferenceTarget;
314
315
316    /**
317     * Provides a mechanism to communicate additional information about the response.
318     */
319    @Child(name = "note", type = {Annotation.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
320    @Description(shortDefinition="Additional notes about the response", formalDefinition="Provides a mechanism to communicate additional information about the response." )
321    protected List<Annotation> note;
322
323    /**
324     * Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.
325     */
326    @Child(name = "evaluationMessage", type = {OperationOutcome.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
327    @Description(shortDefinition="Messages resulting from the evaluation of the artifact or artifacts", formalDefinition="Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element." )
328    protected List<Reference> evaluationMessage;
329    /**
330     * The actual objects that are the target of the reference (Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.)
331     */
332    protected List<OperationOutcome> evaluationMessageTarget;
333
334
335    /**
336     * The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.
337     */
338    @Child(name = "outputParameters", type = {Parameters.class}, order=12, min=0, max=1, modifier=false, summary=false)
339    @Description(shortDefinition="The output parameters of the evaluation, if any", formalDefinition="The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element." )
340    protected Reference outputParameters;
341
342    /**
343     * The actual object that is the target of the reference (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.)
344     */
345    protected Parameters outputParametersTarget;
346
347    /**
348     * The actions, if any, produced by the evaluation of the artifact.
349     */
350    @Child(name = "result", type = {CarePlan.class, RequestGroup.class}, order=13, min=0, max=1, modifier=false, summary=false)
351    @Description(shortDefinition="Proposed actions, if any", formalDefinition="The actions, if any, produced by the evaluation of the artifact." )
352    protected Reference result;
353
354    /**
355     * The actual object that is the target of the reference (The actions, if any, produced by the evaluation of the artifact.)
356     */
357    protected Resource resultTarget;
358
359    /**
360     * If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.
361     */
362    @Child(name = "dataRequirement", type = {DataRequirement.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
363    @Description(shortDefinition="Additional required data", formalDefinition="If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data." )
364    protected List<DataRequirement> dataRequirement;
365
366    private static final long serialVersionUID = -760182193L;
367
368  /**
369   * Constructor
370   */
371    public GuidanceResponse() {
372      super();
373    }
374
375  /**
376   * Constructor
377   */
378    public GuidanceResponse(Type module, Enumeration<GuidanceResponseStatus> status) {
379      super();
380      this.module = module;
381      this.status = status;
382    }
383
384    /**
385     * @return {@link #requestIdentifier} (The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.)
386     */
387    public Identifier getRequestIdentifier() { 
388      if (this.requestIdentifier == null)
389        if (Configuration.errorOnAutoCreate())
390          throw new Error("Attempt to auto-create GuidanceResponse.requestIdentifier");
391        else if (Configuration.doAutoCreate())
392          this.requestIdentifier = new Identifier(); // cc
393      return this.requestIdentifier;
394    }
395
396    public boolean hasRequestIdentifier() { 
397      return this.requestIdentifier != null && !this.requestIdentifier.isEmpty();
398    }
399
400    /**
401     * @param value {@link #requestIdentifier} (The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.)
402     */
403    public GuidanceResponse setRequestIdentifier(Identifier value) { 
404      this.requestIdentifier = value;
405      return this;
406    }
407
408    /**
409     * @return {@link #identifier} (Allows a service to provide  unique, business identifiers for the response.)
410     */
411    public List<Identifier> getIdentifier() { 
412      if (this.identifier == null)
413        this.identifier = new ArrayList<Identifier>();
414      return this.identifier;
415    }
416
417    /**
418     * @return Returns a reference to <code>this</code> for easy method chaining
419     */
420    public GuidanceResponse setIdentifier(List<Identifier> theIdentifier) { 
421      this.identifier = theIdentifier;
422      return this;
423    }
424
425    public boolean hasIdentifier() { 
426      if (this.identifier == null)
427        return false;
428      for (Identifier item : this.identifier)
429        if (!item.isEmpty())
430          return true;
431      return false;
432    }
433
434    public Identifier addIdentifier() { //3
435      Identifier t = new Identifier();
436      if (this.identifier == null)
437        this.identifier = new ArrayList<Identifier>();
438      this.identifier.add(t);
439      return t;
440    }
441
442    public GuidanceResponse addIdentifier(Identifier t) { //3
443      if (t == null)
444        return this;
445      if (this.identifier == null)
446        this.identifier = new ArrayList<Identifier>();
447      this.identifier.add(t);
448      return this;
449    }
450
451    /**
452     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
453     */
454    public Identifier getIdentifierFirstRep() { 
455      if (getIdentifier().isEmpty()) {
456        addIdentifier();
457      }
458      return getIdentifier().get(0);
459    }
460
461    /**
462     * @return {@link #module} (An identifier, CodeableConcept or canonical reference to the guidance that was requested.)
463     */
464    public Type getModule() { 
465      return this.module;
466    }
467
468    /**
469     * @return {@link #module} (An identifier, CodeableConcept or canonical reference to the guidance that was requested.)
470     */
471    public UriType getModuleUriType() throws FHIRException { 
472      if (this.module == null)
473        this.module = new UriType();
474      if (!(this.module instanceof UriType))
475        throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.module.getClass().getName()+" was encountered");
476      return (UriType) this.module;
477    }
478
479    public boolean hasModuleUriType() { 
480      return this != null && this.module instanceof UriType;
481    }
482
483    /**
484     * @return {@link #module} (An identifier, CodeableConcept or canonical reference to the guidance that was requested.)
485     */
486    public CanonicalType getModuleCanonicalType() throws FHIRException { 
487      if (this.module == null)
488        this.module = new CanonicalType();
489      if (!(this.module instanceof CanonicalType))
490        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.module.getClass().getName()+" was encountered");
491      return (CanonicalType) this.module;
492    }
493
494    public boolean hasModuleCanonicalType() { 
495      return this != null && this.module instanceof CanonicalType;
496    }
497
498    /**
499     * @return {@link #module} (An identifier, CodeableConcept or canonical reference to the guidance that was requested.)
500     */
501    public CodeableConcept getModuleCodeableConcept() throws FHIRException { 
502      if (this.module == null)
503        this.module = new CodeableConcept();
504      if (!(this.module instanceof CodeableConcept))
505        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.module.getClass().getName()+" was encountered");
506      return (CodeableConcept) this.module;
507    }
508
509    public boolean hasModuleCodeableConcept() { 
510      return this != null && this.module instanceof CodeableConcept;
511    }
512
513    public boolean hasModule() { 
514      return this.module != null && !this.module.isEmpty();
515    }
516
517    /**
518     * @param value {@link #module} (An identifier, CodeableConcept or canonical reference to the guidance that was requested.)
519     */
520    public GuidanceResponse setModule(Type value) { 
521      if (value != null && !(value instanceof UriType || value instanceof CanonicalType || value instanceof CodeableConcept))
522        throw new Error("Not the right type for GuidanceResponse.module[x]: "+value.fhirType());
523      this.module = value;
524      return this;
525    }
526
527    /**
528     * @return {@link #status} (The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
529     */
530    public Enumeration<GuidanceResponseStatus> getStatusElement() { 
531      if (this.status == null)
532        if (Configuration.errorOnAutoCreate())
533          throw new Error("Attempt to auto-create GuidanceResponse.status");
534        else if (Configuration.doAutoCreate())
535          this.status = new Enumeration<GuidanceResponseStatus>(new GuidanceResponseStatusEnumFactory()); // bb
536      return this.status;
537    }
538
539    public boolean hasStatusElement() { 
540      return this.status != null && !this.status.isEmpty();
541    }
542
543    public boolean hasStatus() { 
544      return this.status != null && !this.status.isEmpty();
545    }
546
547    /**
548     * @param value {@link #status} (The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
549     */
550    public GuidanceResponse setStatusElement(Enumeration<GuidanceResponseStatus> value) { 
551      this.status = value;
552      return this;
553    }
554
555    /**
556     * @return The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.
557     */
558    public GuidanceResponseStatus getStatus() { 
559      return this.status == null ? null : this.status.getValue();
560    }
561
562    /**
563     * @param value The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.
564     */
565    public GuidanceResponse setStatus(GuidanceResponseStatus value) { 
566        if (this.status == null)
567          this.status = new Enumeration<GuidanceResponseStatus>(new GuidanceResponseStatusEnumFactory());
568        this.status.setValue(value);
569      return this;
570    }
571
572    /**
573     * @return {@link #subject} (The patient for which the request was processed.)
574     */
575    public Reference getSubject() { 
576      if (this.subject == null)
577        if (Configuration.errorOnAutoCreate())
578          throw new Error("Attempt to auto-create GuidanceResponse.subject");
579        else if (Configuration.doAutoCreate())
580          this.subject = new Reference(); // cc
581      return this.subject;
582    }
583
584    public boolean hasSubject() { 
585      return this.subject != null && !this.subject.isEmpty();
586    }
587
588    /**
589     * @param value {@link #subject} (The patient for which the request was processed.)
590     */
591    public GuidanceResponse setSubject(Reference value) { 
592      this.subject = value;
593      return this;
594    }
595
596    /**
597     * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient for which the request was processed.)
598     */
599    public Resource getSubjectTarget() { 
600      return this.subjectTarget;
601    }
602
603    /**
604     * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient for which the request was processed.)
605     */
606    public GuidanceResponse setSubjectTarget(Resource value) { 
607      this.subjectTarget = value;
608      return this;
609    }
610
611    /**
612     * @return {@link #encounter} (The encounter during which this response was created or to which the creation of this record is tightly associated.)
613     */
614    public Reference getEncounter() { 
615      if (this.encounter == null)
616        if (Configuration.errorOnAutoCreate())
617          throw new Error("Attempt to auto-create GuidanceResponse.encounter");
618        else if (Configuration.doAutoCreate())
619          this.encounter = new Reference(); // cc
620      return this.encounter;
621    }
622
623    public boolean hasEncounter() { 
624      return this.encounter != null && !this.encounter.isEmpty();
625    }
626
627    /**
628     * @param value {@link #encounter} (The encounter during which this response was created or to which the creation of this record is tightly associated.)
629     */
630    public GuidanceResponse setEncounter(Reference value) { 
631      this.encounter = value;
632      return this;
633    }
634
635    /**
636     * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter during which this response was created or to which the creation of this record is tightly associated.)
637     */
638    public Encounter getEncounterTarget() { 
639      if (this.encounterTarget == null)
640        if (Configuration.errorOnAutoCreate())
641          throw new Error("Attempt to auto-create GuidanceResponse.encounter");
642        else if (Configuration.doAutoCreate())
643          this.encounterTarget = new Encounter(); // aa
644      return this.encounterTarget;
645    }
646
647    /**
648     * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter during which this response was created or to which the creation of this record is tightly associated.)
649     */
650    public GuidanceResponse setEncounterTarget(Encounter value) { 
651      this.encounterTarget = value;
652      return this;
653    }
654
655    /**
656     * @return {@link #occurrenceDateTime} (Indicates when the guidance response was processed.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceDateTime" gives direct access to the value
657     */
658    public DateTimeType getOccurrenceDateTimeElement() { 
659      if (this.occurrenceDateTime == null)
660        if (Configuration.errorOnAutoCreate())
661          throw new Error("Attempt to auto-create GuidanceResponse.occurrenceDateTime");
662        else if (Configuration.doAutoCreate())
663          this.occurrenceDateTime = new DateTimeType(); // bb
664      return this.occurrenceDateTime;
665    }
666
667    public boolean hasOccurrenceDateTimeElement() { 
668      return this.occurrenceDateTime != null && !this.occurrenceDateTime.isEmpty();
669    }
670
671    public boolean hasOccurrenceDateTime() { 
672      return this.occurrenceDateTime != null && !this.occurrenceDateTime.isEmpty();
673    }
674
675    /**
676     * @param value {@link #occurrenceDateTime} (Indicates when the guidance response was processed.). This is the underlying object with id, value and extensions. The accessor "getOccurrenceDateTime" gives direct access to the value
677     */
678    public GuidanceResponse setOccurrenceDateTimeElement(DateTimeType value) { 
679      this.occurrenceDateTime = value;
680      return this;
681    }
682
683    /**
684     * @return Indicates when the guidance response was processed.
685     */
686    public Date getOccurrenceDateTime() { 
687      return this.occurrenceDateTime == null ? null : this.occurrenceDateTime.getValue();
688    }
689
690    /**
691     * @param value Indicates when the guidance response was processed.
692     */
693    public GuidanceResponse setOccurrenceDateTime(Date value) { 
694      if (value == null)
695        this.occurrenceDateTime = null;
696      else {
697        if (this.occurrenceDateTime == null)
698          this.occurrenceDateTime = new DateTimeType();
699        this.occurrenceDateTime.setValue(value);
700      }
701      return this;
702    }
703
704    /**
705     * @return {@link #performer} (Provides a reference to the device that performed the guidance.)
706     */
707    public Reference getPerformer() { 
708      if (this.performer == null)
709        if (Configuration.errorOnAutoCreate())
710          throw new Error("Attempt to auto-create GuidanceResponse.performer");
711        else if (Configuration.doAutoCreate())
712          this.performer = new Reference(); // cc
713      return this.performer;
714    }
715
716    public boolean hasPerformer() { 
717      return this.performer != null && !this.performer.isEmpty();
718    }
719
720    /**
721     * @param value {@link #performer} (Provides a reference to the device that performed the guidance.)
722     */
723    public GuidanceResponse setPerformer(Reference value) { 
724      this.performer = value;
725      return this;
726    }
727
728    /**
729     * @return {@link #performer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Provides a reference to the device that performed the guidance.)
730     */
731    public Device getPerformerTarget() { 
732      if (this.performerTarget == null)
733        if (Configuration.errorOnAutoCreate())
734          throw new Error("Attempt to auto-create GuidanceResponse.performer");
735        else if (Configuration.doAutoCreate())
736          this.performerTarget = new Device(); // aa
737      return this.performerTarget;
738    }
739
740    /**
741     * @param value {@link #performer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Provides a reference to the device that performed the guidance.)
742     */
743    public GuidanceResponse setPerformerTarget(Device value) { 
744      this.performerTarget = value;
745      return this;
746    }
747
748    /**
749     * @return {@link #reasonCode} (Describes the reason for the guidance response in coded or textual form.)
750     */
751    public List<CodeableConcept> getReasonCode() { 
752      if (this.reasonCode == null)
753        this.reasonCode = new ArrayList<CodeableConcept>();
754      return this.reasonCode;
755    }
756
757    /**
758     * @return Returns a reference to <code>this</code> for easy method chaining
759     */
760    public GuidanceResponse setReasonCode(List<CodeableConcept> theReasonCode) { 
761      this.reasonCode = theReasonCode;
762      return this;
763    }
764
765    public boolean hasReasonCode() { 
766      if (this.reasonCode == null)
767        return false;
768      for (CodeableConcept item : this.reasonCode)
769        if (!item.isEmpty())
770          return true;
771      return false;
772    }
773
774    public CodeableConcept addReasonCode() { //3
775      CodeableConcept t = new CodeableConcept();
776      if (this.reasonCode == null)
777        this.reasonCode = new ArrayList<CodeableConcept>();
778      this.reasonCode.add(t);
779      return t;
780    }
781
782    public GuidanceResponse addReasonCode(CodeableConcept t) { //3
783      if (t == null)
784        return this;
785      if (this.reasonCode == null)
786        this.reasonCode = new ArrayList<CodeableConcept>();
787      this.reasonCode.add(t);
788      return this;
789    }
790
791    /**
792     * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist
793     */
794    public CodeableConcept getReasonCodeFirstRep() { 
795      if (getReasonCode().isEmpty()) {
796        addReasonCode();
797      }
798      return getReasonCode().get(0);
799    }
800
801    /**
802     * @return {@link #reasonReference} (Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.)
803     */
804    public List<Reference> getReasonReference() { 
805      if (this.reasonReference == null)
806        this.reasonReference = new ArrayList<Reference>();
807      return this.reasonReference;
808    }
809
810    /**
811     * @return Returns a reference to <code>this</code> for easy method chaining
812     */
813    public GuidanceResponse setReasonReference(List<Reference> theReasonReference) { 
814      this.reasonReference = theReasonReference;
815      return this;
816    }
817
818    public boolean hasReasonReference() { 
819      if (this.reasonReference == null)
820        return false;
821      for (Reference item : this.reasonReference)
822        if (!item.isEmpty())
823          return true;
824      return false;
825    }
826
827    public Reference addReasonReference() { //3
828      Reference t = new Reference();
829      if (this.reasonReference == null)
830        this.reasonReference = new ArrayList<Reference>();
831      this.reasonReference.add(t);
832      return t;
833    }
834
835    public GuidanceResponse addReasonReference(Reference t) { //3
836      if (t == null)
837        return this;
838      if (this.reasonReference == null)
839        this.reasonReference = new ArrayList<Reference>();
840      this.reasonReference.add(t);
841      return this;
842    }
843
844    /**
845     * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist
846     */
847    public Reference getReasonReferenceFirstRep() { 
848      if (getReasonReference().isEmpty()) {
849        addReasonReference();
850      }
851      return getReasonReference().get(0);
852    }
853
854    /**
855     * @deprecated Use Reference#setResource(IBaseResource) instead
856     */
857    @Deprecated
858    public List<Resource> getReasonReferenceTarget() { 
859      if (this.reasonReferenceTarget == null)
860        this.reasonReferenceTarget = new ArrayList<Resource>();
861      return this.reasonReferenceTarget;
862    }
863
864    /**
865     * @return {@link #note} (Provides a mechanism to communicate additional information about the response.)
866     */
867    public List<Annotation> getNote() { 
868      if (this.note == null)
869        this.note = new ArrayList<Annotation>();
870      return this.note;
871    }
872
873    /**
874     * @return Returns a reference to <code>this</code> for easy method chaining
875     */
876    public GuidanceResponse setNote(List<Annotation> theNote) { 
877      this.note = theNote;
878      return this;
879    }
880
881    public boolean hasNote() { 
882      if (this.note == null)
883        return false;
884      for (Annotation item : this.note)
885        if (!item.isEmpty())
886          return true;
887      return false;
888    }
889
890    public Annotation addNote() { //3
891      Annotation t = new Annotation();
892      if (this.note == null)
893        this.note = new ArrayList<Annotation>();
894      this.note.add(t);
895      return t;
896    }
897
898    public GuidanceResponse addNote(Annotation t) { //3
899      if (t == null)
900        return this;
901      if (this.note == null)
902        this.note = new ArrayList<Annotation>();
903      this.note.add(t);
904      return this;
905    }
906
907    /**
908     * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist
909     */
910    public Annotation getNoteFirstRep() { 
911      if (getNote().isEmpty()) {
912        addNote();
913      }
914      return getNote().get(0);
915    }
916
917    /**
918     * @return {@link #evaluationMessage} (Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.)
919     */
920    public List<Reference> getEvaluationMessage() { 
921      if (this.evaluationMessage == null)
922        this.evaluationMessage = new ArrayList<Reference>();
923      return this.evaluationMessage;
924    }
925
926    /**
927     * @return Returns a reference to <code>this</code> for easy method chaining
928     */
929    public GuidanceResponse setEvaluationMessage(List<Reference> theEvaluationMessage) { 
930      this.evaluationMessage = theEvaluationMessage;
931      return this;
932    }
933
934    public boolean hasEvaluationMessage() { 
935      if (this.evaluationMessage == null)
936        return false;
937      for (Reference item : this.evaluationMessage)
938        if (!item.isEmpty())
939          return true;
940      return false;
941    }
942
943    public Reference addEvaluationMessage() { //3
944      Reference t = new Reference();
945      if (this.evaluationMessage == null)
946        this.evaluationMessage = new ArrayList<Reference>();
947      this.evaluationMessage.add(t);
948      return t;
949    }
950
951    public GuidanceResponse addEvaluationMessage(Reference t) { //3
952      if (t == null)
953        return this;
954      if (this.evaluationMessage == null)
955        this.evaluationMessage = new ArrayList<Reference>();
956      this.evaluationMessage.add(t);
957      return this;
958    }
959
960    /**
961     * @return The first repetition of repeating field {@link #evaluationMessage}, creating it if it does not already exist
962     */
963    public Reference getEvaluationMessageFirstRep() { 
964      if (getEvaluationMessage().isEmpty()) {
965        addEvaluationMessage();
966      }
967      return getEvaluationMessage().get(0);
968    }
969
970    /**
971     * @deprecated Use Reference#setResource(IBaseResource) instead
972     */
973    @Deprecated
974    public List<OperationOutcome> getEvaluationMessageTarget() { 
975      if (this.evaluationMessageTarget == null)
976        this.evaluationMessageTarget = new ArrayList<OperationOutcome>();
977      return this.evaluationMessageTarget;
978    }
979
980    /**
981     * @deprecated Use Reference#setResource(IBaseResource) instead
982     */
983    @Deprecated
984    public OperationOutcome addEvaluationMessageTarget() { 
985      OperationOutcome r = new OperationOutcome();
986      if (this.evaluationMessageTarget == null)
987        this.evaluationMessageTarget = new ArrayList<OperationOutcome>();
988      this.evaluationMessageTarget.add(r);
989      return r;
990    }
991
992    /**
993     * @return {@link #outputParameters} (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.)
994     */
995    public Reference getOutputParameters() { 
996      if (this.outputParameters == null)
997        if (Configuration.errorOnAutoCreate())
998          throw new Error("Attempt to auto-create GuidanceResponse.outputParameters");
999        else if (Configuration.doAutoCreate())
1000          this.outputParameters = new Reference(); // cc
1001      return this.outputParameters;
1002    }
1003
1004    public boolean hasOutputParameters() { 
1005      return this.outputParameters != null && !this.outputParameters.isEmpty();
1006    }
1007
1008    /**
1009     * @param value {@link #outputParameters} (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.)
1010     */
1011    public GuidanceResponse setOutputParameters(Reference value) { 
1012      this.outputParameters = value;
1013      return this;
1014    }
1015
1016    /**
1017     * @return {@link #outputParameters} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.)
1018     */
1019    public Parameters getOutputParametersTarget() { 
1020      if (this.outputParametersTarget == null)
1021        if (Configuration.errorOnAutoCreate())
1022          throw new Error("Attempt to auto-create GuidanceResponse.outputParameters");
1023        else if (Configuration.doAutoCreate())
1024          this.outputParametersTarget = new Parameters(); // aa
1025      return this.outputParametersTarget;
1026    }
1027
1028    /**
1029     * @param value {@link #outputParameters} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.)
1030     */
1031    public GuidanceResponse setOutputParametersTarget(Parameters value) { 
1032      this.outputParametersTarget = value;
1033      return this;
1034    }
1035
1036    /**
1037     * @return {@link #result} (The actions, if any, produced by the evaluation of the artifact.)
1038     */
1039    public Reference getResult() { 
1040      if (this.result == null)
1041        if (Configuration.errorOnAutoCreate())
1042          throw new Error("Attempt to auto-create GuidanceResponse.result");
1043        else if (Configuration.doAutoCreate())
1044          this.result = new Reference(); // cc
1045      return this.result;
1046    }
1047
1048    public boolean hasResult() { 
1049      return this.result != null && !this.result.isEmpty();
1050    }
1051
1052    /**
1053     * @param value {@link #result} (The actions, if any, produced by the evaluation of the artifact.)
1054     */
1055    public GuidanceResponse setResult(Reference value) { 
1056      this.result = value;
1057      return this;
1058    }
1059
1060    /**
1061     * @return {@link #result} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The actions, if any, produced by the evaluation of the artifact.)
1062     */
1063    public Resource getResultTarget() { 
1064      return this.resultTarget;
1065    }
1066
1067    /**
1068     * @param value {@link #result} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The actions, if any, produced by the evaluation of the artifact.)
1069     */
1070    public GuidanceResponse setResultTarget(Resource value) { 
1071      this.resultTarget = value;
1072      return this;
1073    }
1074
1075    /**
1076     * @return {@link #dataRequirement} (If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.)
1077     */
1078    public List<DataRequirement> getDataRequirement() { 
1079      if (this.dataRequirement == null)
1080        this.dataRequirement = new ArrayList<DataRequirement>();
1081      return this.dataRequirement;
1082    }
1083
1084    /**
1085     * @return Returns a reference to <code>this</code> for easy method chaining
1086     */
1087    public GuidanceResponse setDataRequirement(List<DataRequirement> theDataRequirement) { 
1088      this.dataRequirement = theDataRequirement;
1089      return this;
1090    }
1091
1092    public boolean hasDataRequirement() { 
1093      if (this.dataRequirement == null)
1094        return false;
1095      for (DataRequirement item : this.dataRequirement)
1096        if (!item.isEmpty())
1097          return true;
1098      return false;
1099    }
1100
1101    public DataRequirement addDataRequirement() { //3
1102      DataRequirement t = new DataRequirement();
1103      if (this.dataRequirement == null)
1104        this.dataRequirement = new ArrayList<DataRequirement>();
1105      this.dataRequirement.add(t);
1106      return t;
1107    }
1108
1109    public GuidanceResponse addDataRequirement(DataRequirement t) { //3
1110      if (t == null)
1111        return this;
1112      if (this.dataRequirement == null)
1113        this.dataRequirement = new ArrayList<DataRequirement>();
1114      this.dataRequirement.add(t);
1115      return this;
1116    }
1117
1118    /**
1119     * @return The first repetition of repeating field {@link #dataRequirement}, creating it if it does not already exist
1120     */
1121    public DataRequirement getDataRequirementFirstRep() { 
1122      if (getDataRequirement().isEmpty()) {
1123        addDataRequirement();
1124      }
1125      return getDataRequirement().get(0);
1126    }
1127
1128      protected void listChildren(List<Property> children) {
1129        super.listChildren(children);
1130        children.add(new Property("requestIdentifier", "Identifier", "The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.", 0, 1, requestIdentifier));
1131        children.add(new Property("identifier", "Identifier", "Allows a service to provide  unique, business identifiers for the response.", 0, java.lang.Integer.MAX_VALUE, identifier));
1132        children.add(new Property("module[x]", "uri|canonical|CodeableConcept", "An identifier, CodeableConcept or canonical reference to the guidance that was requested.", 0, 1, module));
1133        children.add(new Property("status", "code", "The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.", 0, 1, status));
1134        children.add(new Property("subject", "Reference(Patient|Group)", "The patient for which the request was processed.", 0, 1, subject));
1135        children.add(new Property("encounter", "Reference(Encounter)", "The encounter during which this response was created or to which the creation of this record is tightly associated.", 0, 1, encounter));
1136        children.add(new Property("occurrenceDateTime", "dateTime", "Indicates when the guidance response was processed.", 0, 1, occurrenceDateTime));
1137        children.add(new Property("performer", "Reference(Device)", "Provides a reference to the device that performed the guidance.", 0, 1, performer));
1138        children.add(new Property("reasonCode", "CodeableConcept", "Describes the reason for the guidance response in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode));
1139        children.add(new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", 0, java.lang.Integer.MAX_VALUE, reasonReference));
1140        children.add(new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note));
1141        children.add(new Property("evaluationMessage", "Reference(OperationOutcome)", "Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.", 0, java.lang.Integer.MAX_VALUE, evaluationMessage));
1142        children.add(new Property("outputParameters", "Reference(Parameters)", "The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.", 0, 1, outputParameters));
1143        children.add(new Property("result", "Reference(CarePlan|RequestGroup)", "The actions, if any, produced by the evaluation of the artifact.", 0, 1, result));
1144        children.add(new Property("dataRequirement", "DataRequirement", "If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.", 0, java.lang.Integer.MAX_VALUE, dataRequirement));
1145      }
1146
1147      @Override
1148      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1149        switch (_hash) {
1150        case -354233192: /*requestIdentifier*/  return new Property("requestIdentifier", "Identifier", "The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.", 0, 1, requestIdentifier);
1151        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Allows a service to provide  unique, business identifiers for the response.", 0, java.lang.Integer.MAX_VALUE, identifier);
1152        case -1552083308: /*module[x]*/  return new Property("module[x]", "uri|canonical|CodeableConcept", "An identifier, CodeableConcept or canonical reference to the guidance that was requested.", 0, 1, module);
1153        case -1068784020: /*module*/  return new Property("module[x]", "uri|canonical|CodeableConcept", "An identifier, CodeableConcept or canonical reference to the guidance that was requested.", 0, 1, module);
1154        case -1552089248: /*moduleUri*/  return new Property("module[x]", "uri|canonical|CodeableConcept", "An identifier, CodeableConcept or canonical reference to the guidance that was requested.", 0, 1, module);
1155        case -1153656856: /*moduleCanonical*/  return new Property("module[x]", "uri|canonical|CodeableConcept", "An identifier, CodeableConcept or canonical reference to the guidance that was requested.", 0, 1, module);
1156        case -1157899371: /*moduleCodeableConcept*/  return new Property("module[x]", "uri|canonical|CodeableConcept", "An identifier, CodeableConcept or canonical reference to the guidance that was requested.", 0, 1, module);
1157        case -892481550: /*status*/  return new Property("status", "code", "The status of the response. If the evaluation is completed successfully, the status will indicate success. However, in order to complete the evaluation, the engine may require more information. In this case, the status will be data-required, and the response will contain a description of the additional required information. If the evaluation completed successfully, but the engine determines that a potentially more accurate response could be provided if more data was available, the status will be data-requested, and the response will contain a description of the additional requested information.", 0, 1, status);
1158        case -1867885268: /*subject*/  return new Property("subject", "Reference(Patient|Group)", "The patient for which the request was processed.", 0, 1, subject);
1159        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The encounter during which this response was created or to which the creation of this record is tightly associated.", 0, 1, encounter);
1160        case -298443636: /*occurrenceDateTime*/  return new Property("occurrenceDateTime", "dateTime", "Indicates when the guidance response was processed.", 0, 1, occurrenceDateTime);
1161        case 481140686: /*performer*/  return new Property("performer", "Reference(Device)", "Provides a reference to the device that performed the guidance.", 0, 1, performer);
1162        case 722137681: /*reasonCode*/  return new Property("reasonCode", "CodeableConcept", "Describes the reason for the guidance response in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode);
1163        case -1146218137: /*reasonReference*/  return new Property("reasonReference", "Reference(Condition|Observation|DiagnosticReport|DocumentReference)", "Indicates the reason the request was initiated. This is typically provided as a parameter to the evaluation and echoed by the service, although for some use cases, such as subscription- or event-based scenarios, it may provide an indication of the cause for the response.", 0, java.lang.Integer.MAX_VALUE, reasonReference);
1164        case 3387378: /*note*/  return new Property("note", "Annotation", "Provides a mechanism to communicate additional information about the response.", 0, java.lang.Integer.MAX_VALUE, note);
1165        case 1081619755: /*evaluationMessage*/  return new Property("evaluationMessage", "Reference(OperationOutcome)", "Messages resulting from the evaluation of the artifact or artifacts. As part of evaluating the request, the engine may produce informational or warning messages. These messages will be provided by this element.", 0, java.lang.Integer.MAX_VALUE, evaluationMessage);
1166        case 525609419: /*outputParameters*/  return new Property("outputParameters", "Reference(Parameters)", "The output parameters of the evaluation, if any. Many modules will result in the return of specific resources such as procedure or communication requests that are returned as part of the operation result. However, modules may define specific outputs that would be returned as the result of the evaluation, and these would be returned in this element.", 0, 1, outputParameters);
1167        case -934426595: /*result*/  return new Property("result", "Reference(CarePlan|RequestGroup)", "The actions, if any, produced by the evaluation of the artifact.", 0, 1, result);
1168        case 629147193: /*dataRequirement*/  return new Property("dataRequirement", "DataRequirement", "If the evaluation could not be completed due to lack of information, or additional information would potentially result in a more accurate response, this element will a description of the data required in order to proceed with the evaluation. A subsequent request to the service should include this data.", 0, java.lang.Integer.MAX_VALUE, dataRequirement);
1169        default: return super.getNamedProperty(_hash, _name, _checkValid);
1170        }
1171
1172      }
1173
1174      @Override
1175      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1176        switch (hash) {
1177        case -354233192: /*requestIdentifier*/ return this.requestIdentifier == null ? new Base[0] : new Base[] {this.requestIdentifier}; // Identifier
1178        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1179        case -1068784020: /*module*/ return this.module == null ? new Base[0] : new Base[] {this.module}; // Type
1180        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<GuidanceResponseStatus>
1181        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1182        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1183        case -298443636: /*occurrenceDateTime*/ return this.occurrenceDateTime == null ? new Base[0] : new Base[] {this.occurrenceDateTime}; // DateTimeType
1184        case 481140686: /*performer*/ return this.performer == null ? new Base[0] : new Base[] {this.performer}; // Reference
1185        case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept
1186        case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference
1187        case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation
1188        case 1081619755: /*evaluationMessage*/ return this.evaluationMessage == null ? new Base[0] : this.evaluationMessage.toArray(new Base[this.evaluationMessage.size()]); // Reference
1189        case 525609419: /*outputParameters*/ return this.outputParameters == null ? new Base[0] : new Base[] {this.outputParameters}; // Reference
1190        case -934426595: /*result*/ return this.result == null ? new Base[0] : new Base[] {this.result}; // Reference
1191        case 629147193: /*dataRequirement*/ return this.dataRequirement == null ? new Base[0] : this.dataRequirement.toArray(new Base[this.dataRequirement.size()]); // DataRequirement
1192        default: return super.getProperty(hash, name, checkValid);
1193        }
1194
1195      }
1196
1197      @Override
1198      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1199        switch (hash) {
1200        case -354233192: // requestIdentifier
1201          this.requestIdentifier = castToIdentifier(value); // Identifier
1202          return value;
1203        case -1618432855: // identifier
1204          this.getIdentifier().add(castToIdentifier(value)); // Identifier
1205          return value;
1206        case -1068784020: // module
1207          this.module = castToType(value); // Type
1208          return value;
1209        case -892481550: // status
1210          value = new GuidanceResponseStatusEnumFactory().fromType(castToCode(value));
1211          this.status = (Enumeration) value; // Enumeration<GuidanceResponseStatus>
1212          return value;
1213        case -1867885268: // subject
1214          this.subject = castToReference(value); // Reference
1215          return value;
1216        case 1524132147: // encounter
1217          this.encounter = castToReference(value); // Reference
1218          return value;
1219        case -298443636: // occurrenceDateTime
1220          this.occurrenceDateTime = castToDateTime(value); // DateTimeType
1221          return value;
1222        case 481140686: // performer
1223          this.performer = castToReference(value); // Reference
1224          return value;
1225        case 722137681: // reasonCode
1226          this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept
1227          return value;
1228        case -1146218137: // reasonReference
1229          this.getReasonReference().add(castToReference(value)); // Reference
1230          return value;
1231        case 3387378: // note
1232          this.getNote().add(castToAnnotation(value)); // Annotation
1233          return value;
1234        case 1081619755: // evaluationMessage
1235          this.getEvaluationMessage().add(castToReference(value)); // Reference
1236          return value;
1237        case 525609419: // outputParameters
1238          this.outputParameters = castToReference(value); // Reference
1239          return value;
1240        case -934426595: // result
1241          this.result = castToReference(value); // Reference
1242          return value;
1243        case 629147193: // dataRequirement
1244          this.getDataRequirement().add(castToDataRequirement(value)); // DataRequirement
1245          return value;
1246        default: return super.setProperty(hash, name, value);
1247        }
1248
1249      }
1250
1251      @Override
1252      public Base setProperty(String name, Base value) throws FHIRException {
1253        if (name.equals("requestIdentifier")) {
1254          this.requestIdentifier = castToIdentifier(value); // Identifier
1255        } else if (name.equals("identifier")) {
1256          this.getIdentifier().add(castToIdentifier(value));
1257        } else if (name.equals("module[x]")) {
1258          this.module = castToType(value); // Type
1259        } else if (name.equals("status")) {
1260          value = new GuidanceResponseStatusEnumFactory().fromType(castToCode(value));
1261          this.status = (Enumeration) value; // Enumeration<GuidanceResponseStatus>
1262        } else if (name.equals("subject")) {
1263          this.subject = castToReference(value); // Reference
1264        } else if (name.equals("encounter")) {
1265          this.encounter = castToReference(value); // Reference
1266        } else if (name.equals("occurrenceDateTime")) {
1267          this.occurrenceDateTime = castToDateTime(value); // DateTimeType
1268        } else if (name.equals("performer")) {
1269          this.performer = castToReference(value); // Reference
1270        } else if (name.equals("reasonCode")) {
1271          this.getReasonCode().add(castToCodeableConcept(value));
1272        } else if (name.equals("reasonReference")) {
1273          this.getReasonReference().add(castToReference(value));
1274        } else if (name.equals("note")) {
1275          this.getNote().add(castToAnnotation(value));
1276        } else if (name.equals("evaluationMessage")) {
1277          this.getEvaluationMessage().add(castToReference(value));
1278        } else if (name.equals("outputParameters")) {
1279          this.outputParameters = castToReference(value); // Reference
1280        } else if (name.equals("result")) {
1281          this.result = castToReference(value); // Reference
1282        } else if (name.equals("dataRequirement")) {
1283          this.getDataRequirement().add(castToDataRequirement(value));
1284        } else
1285          return super.setProperty(name, value);
1286        return value;
1287      }
1288
1289      @Override
1290      public Base makeProperty(int hash, String name) throws FHIRException {
1291        switch (hash) {
1292        case -354233192:  return getRequestIdentifier(); 
1293        case -1618432855:  return addIdentifier(); 
1294        case -1552083308:  return getModule(); 
1295        case -1068784020:  return getModule(); 
1296        case -892481550:  return getStatusElement();
1297        case -1867885268:  return getSubject(); 
1298        case 1524132147:  return getEncounter(); 
1299        case -298443636:  return getOccurrenceDateTimeElement();
1300        case 481140686:  return getPerformer(); 
1301        case 722137681:  return addReasonCode(); 
1302        case -1146218137:  return addReasonReference(); 
1303        case 3387378:  return addNote(); 
1304        case 1081619755:  return addEvaluationMessage(); 
1305        case 525609419:  return getOutputParameters(); 
1306        case -934426595:  return getResult(); 
1307        case 629147193:  return addDataRequirement(); 
1308        default: return super.makeProperty(hash, name);
1309        }
1310
1311      }
1312
1313      @Override
1314      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1315        switch (hash) {
1316        case -354233192: /*requestIdentifier*/ return new String[] {"Identifier"};
1317        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1318        case -1068784020: /*module*/ return new String[] {"uri", "canonical", "CodeableConcept"};
1319        case -892481550: /*status*/ return new String[] {"code"};
1320        case -1867885268: /*subject*/ return new String[] {"Reference"};
1321        case 1524132147: /*encounter*/ return new String[] {"Reference"};
1322        case -298443636: /*occurrenceDateTime*/ return new String[] {"dateTime"};
1323        case 481140686: /*performer*/ return new String[] {"Reference"};
1324        case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"};
1325        case -1146218137: /*reasonReference*/ return new String[] {"Reference"};
1326        case 3387378: /*note*/ return new String[] {"Annotation"};
1327        case 1081619755: /*evaluationMessage*/ return new String[] {"Reference"};
1328        case 525609419: /*outputParameters*/ return new String[] {"Reference"};
1329        case -934426595: /*result*/ return new String[] {"Reference"};
1330        case 629147193: /*dataRequirement*/ return new String[] {"DataRequirement"};
1331        default: return super.getTypesForProperty(hash, name);
1332        }
1333
1334      }
1335
1336      @Override
1337      public Base addChild(String name) throws FHIRException {
1338        if (name.equals("requestIdentifier")) {
1339          this.requestIdentifier = new Identifier();
1340          return this.requestIdentifier;
1341        }
1342        else if (name.equals("identifier")) {
1343          return addIdentifier();
1344        }
1345        else if (name.equals("moduleUri")) {
1346          this.module = new UriType();
1347          return this.module;
1348        }
1349        else if (name.equals("moduleCanonical")) {
1350          this.module = new CanonicalType();
1351          return this.module;
1352        }
1353        else if (name.equals("moduleCodeableConcept")) {
1354          this.module = new CodeableConcept();
1355          return this.module;
1356        }
1357        else if (name.equals("status")) {
1358          throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.status");
1359        }
1360        else if (name.equals("subject")) {
1361          this.subject = new Reference();
1362          return this.subject;
1363        }
1364        else if (name.equals("encounter")) {
1365          this.encounter = new Reference();
1366          return this.encounter;
1367        }
1368        else if (name.equals("occurrenceDateTime")) {
1369          throw new FHIRException("Cannot call addChild on a primitive type GuidanceResponse.occurrenceDateTime");
1370        }
1371        else if (name.equals("performer")) {
1372          this.performer = new Reference();
1373          return this.performer;
1374        }
1375        else if (name.equals("reasonCode")) {
1376          return addReasonCode();
1377        }
1378        else if (name.equals("reasonReference")) {
1379          return addReasonReference();
1380        }
1381        else if (name.equals("note")) {
1382          return addNote();
1383        }
1384        else if (name.equals("evaluationMessage")) {
1385          return addEvaluationMessage();
1386        }
1387        else if (name.equals("outputParameters")) {
1388          this.outputParameters = new Reference();
1389          return this.outputParameters;
1390        }
1391        else if (name.equals("result")) {
1392          this.result = new Reference();
1393          return this.result;
1394        }
1395        else if (name.equals("dataRequirement")) {
1396          return addDataRequirement();
1397        }
1398        else
1399          return super.addChild(name);
1400      }
1401
1402  public String fhirType() {
1403    return "GuidanceResponse";
1404
1405  }
1406
1407      public GuidanceResponse copy() {
1408        GuidanceResponse dst = new GuidanceResponse();
1409        copyValues(dst);
1410        dst.requestIdentifier = requestIdentifier == null ? null : requestIdentifier.copy();
1411        if (identifier != null) {
1412          dst.identifier = new ArrayList<Identifier>();
1413          for (Identifier i : identifier)
1414            dst.identifier.add(i.copy());
1415        };
1416        dst.module = module == null ? null : module.copy();
1417        dst.status = status == null ? null : status.copy();
1418        dst.subject = subject == null ? null : subject.copy();
1419        dst.encounter = encounter == null ? null : encounter.copy();
1420        dst.occurrenceDateTime = occurrenceDateTime == null ? null : occurrenceDateTime.copy();
1421        dst.performer = performer == null ? null : performer.copy();
1422        if (reasonCode != null) {
1423          dst.reasonCode = new ArrayList<CodeableConcept>();
1424          for (CodeableConcept i : reasonCode)
1425            dst.reasonCode.add(i.copy());
1426        };
1427        if (reasonReference != null) {
1428          dst.reasonReference = new ArrayList<Reference>();
1429          for (Reference i : reasonReference)
1430            dst.reasonReference.add(i.copy());
1431        };
1432        if (note != null) {
1433          dst.note = new ArrayList<Annotation>();
1434          for (Annotation i : note)
1435            dst.note.add(i.copy());
1436        };
1437        if (evaluationMessage != null) {
1438          dst.evaluationMessage = new ArrayList<Reference>();
1439          for (Reference i : evaluationMessage)
1440            dst.evaluationMessage.add(i.copy());
1441        };
1442        dst.outputParameters = outputParameters == null ? null : outputParameters.copy();
1443        dst.result = result == null ? null : result.copy();
1444        if (dataRequirement != null) {
1445          dst.dataRequirement = new ArrayList<DataRequirement>();
1446          for (DataRequirement i : dataRequirement)
1447            dst.dataRequirement.add(i.copy());
1448        };
1449        return dst;
1450      }
1451
1452      protected GuidanceResponse typedCopy() {
1453        return copy();
1454      }
1455
1456      @Override
1457      public boolean equalsDeep(Base other_) {
1458        if (!super.equalsDeep(other_))
1459          return false;
1460        if (!(other_ instanceof GuidanceResponse))
1461          return false;
1462        GuidanceResponse o = (GuidanceResponse) other_;
1463        return compareDeep(requestIdentifier, o.requestIdentifier, true) && compareDeep(identifier, o.identifier, true)
1464           && compareDeep(module, o.module, true) && compareDeep(status, o.status, true) && compareDeep(subject, o.subject, true)
1465           && compareDeep(encounter, o.encounter, true) && compareDeep(occurrenceDateTime, o.occurrenceDateTime, true)
1466           && compareDeep(performer, o.performer, true) && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true)
1467           && compareDeep(note, o.note, true) && compareDeep(evaluationMessage, o.evaluationMessage, true)
1468           && compareDeep(outputParameters, o.outputParameters, true) && compareDeep(result, o.result, true)
1469           && compareDeep(dataRequirement, o.dataRequirement, true);
1470      }
1471
1472      @Override
1473      public boolean equalsShallow(Base other_) {
1474        if (!super.equalsShallow(other_))
1475          return false;
1476        if (!(other_ instanceof GuidanceResponse))
1477          return false;
1478        GuidanceResponse o = (GuidanceResponse) other_;
1479        return compareValues(status, o.status, true) && compareValues(occurrenceDateTime, o.occurrenceDateTime, true)
1480          ;
1481      }
1482
1483      public boolean isEmpty() {
1484        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(requestIdentifier, identifier
1485          , module, status, subject, encounter, occurrenceDateTime, performer, reasonCode
1486          , reasonReference, note, evaluationMessage, outputParameters, result, dataRequirement
1487          );
1488      }
1489
1490  @Override
1491  public ResourceType getResourceType() {
1492    return ResourceType.GuidanceResponse;
1493   }
1494
1495 /**
1496   * Search parameter: <b>request</b>
1497   * <p>
1498   * Description: <b>The identifier of the request associated with the response</b><br>
1499   * Type: <b>token</b><br>
1500   * Path: <b>GuidanceResponse.requestIdentifier</b><br>
1501   * </p>
1502   */
1503  @SearchParamDefinition(name="request", path="GuidanceResponse.requestIdentifier", description="The identifier of the request associated with the response", type="token" )
1504  public static final String SP_REQUEST = "request";
1505 /**
1506   * <b>Fluent Client</b> search parameter constant for <b>request</b>
1507   * <p>
1508   * Description: <b>The identifier of the request associated with the response</b><br>
1509   * Type: <b>token</b><br>
1510   * Path: <b>GuidanceResponse.requestIdentifier</b><br>
1511   * </p>
1512   */
1513  public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUEST = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUEST);
1514
1515 /**
1516   * Search parameter: <b>identifier</b>
1517   * <p>
1518   * Description: <b>The identifier of the guidance response</b><br>
1519   * Type: <b>token</b><br>
1520   * Path: <b>GuidanceResponse.identifier</b><br>
1521   * </p>
1522   */
1523  @SearchParamDefinition(name="identifier", path="GuidanceResponse.identifier", description="The identifier of the guidance response", type="token" )
1524  public static final String SP_IDENTIFIER = "identifier";
1525 /**
1526   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
1527   * <p>
1528   * Description: <b>The identifier of the guidance response</b><br>
1529   * Type: <b>token</b><br>
1530   * Path: <b>GuidanceResponse.identifier</b><br>
1531   * </p>
1532   */
1533  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
1534
1535 /**
1536   * Search parameter: <b>patient</b>
1537   * <p>
1538   * Description: <b>The identity of a patient to search for guidance response results</b><br>
1539   * Type: <b>reference</b><br>
1540   * Path: <b>GuidanceResponse.subject</b><br>
1541   * </p>
1542   */
1543  @SearchParamDefinition(name="patient", path="GuidanceResponse.subject.where(resolve() is Patient)", description="The identity of a patient to search for guidance response results", type="reference", target={Patient.class } )
1544  public static final String SP_PATIENT = "patient";
1545 /**
1546   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
1547   * <p>
1548   * Description: <b>The identity of a patient to search for guidance response results</b><br>
1549   * Type: <b>reference</b><br>
1550   * Path: <b>GuidanceResponse.subject</b><br>
1551   * </p>
1552   */
1553  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
1554
1555/**
1556   * Constant for fluent queries to be used to add include statements. Specifies
1557   * the path value of "<b>GuidanceResponse:patient</b>".
1558   */
1559  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("GuidanceResponse:patient").toLocked();
1560
1561 /**
1562   * Search parameter: <b>subject</b>
1563   * <p>
1564   * Description: <b>The subject that the guidance response is about</b><br>
1565   * Type: <b>reference</b><br>
1566   * Path: <b>GuidanceResponse.subject</b><br>
1567   * </p>
1568   */
1569  @SearchParamDefinition(name="subject", path="GuidanceResponse.subject", description="The subject that the guidance response is about", type="reference", target={Group.class, Patient.class } )
1570  public static final String SP_SUBJECT = "subject";
1571 /**
1572   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
1573   * <p>
1574   * Description: <b>The subject that the guidance response is about</b><br>
1575   * Type: <b>reference</b><br>
1576   * Path: <b>GuidanceResponse.subject</b><br>
1577   * </p>
1578   */
1579  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
1580
1581/**
1582   * Constant for fluent queries to be used to add include statements. Specifies
1583   * the path value of "<b>GuidanceResponse:subject</b>".
1584   */
1585  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("GuidanceResponse:subject").toLocked();
1586
1587
1588}
1589