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