001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
052 */
053@ResourceDef(name="QuestionnaireResponse", profile="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse")
054public class QuestionnaireResponse extends DomainResource {
055
056    public enum QuestionnaireResponseStatus {
057        /**
058         * This QuestionnaireResponse has been partially filled out with answers but changes or additions are still expected to be made to it.
059         */
060        INPROGRESS, 
061        /**
062         * This QuestionnaireResponse has been filled out with answers and the current content is regarded as definitive.
063         */
064        COMPLETED, 
065        /**
066         * This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards.
067         */
068        AMENDED, 
069        /**
070         * This QuestionnaireResponse was entered in error and voided.
071         */
072        ENTEREDINERROR, 
073        /**
074         * This QuestionnaireResponse has been partially filled out with answers but has been abandoned. No subsequent changes can be made.
075         */
076        STOPPED, 
077        /**
078         * added to help the parsers with the generic types
079         */
080        NULL;
081        public static QuestionnaireResponseStatus fromCode(String codeString) throws FHIRException {
082            if (codeString == null || "".equals(codeString))
083                return null;
084        if ("in-progress".equals(codeString))
085          return INPROGRESS;
086        if ("completed".equals(codeString))
087          return COMPLETED;
088        if ("amended".equals(codeString))
089          return AMENDED;
090        if ("entered-in-error".equals(codeString))
091          return ENTEREDINERROR;
092        if ("stopped".equals(codeString))
093          return STOPPED;
094        if (Configuration.isAcceptInvalidEnums())
095          return null;
096        else
097          throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case INPROGRESS: return "in-progress";
102            case COMPLETED: return "completed";
103            case AMENDED: return "amended";
104            case ENTEREDINERROR: return "entered-in-error";
105            case STOPPED: return "stopped";
106            case NULL: return null;
107            default: return "?";
108          }
109        }
110        public String getSystem() {
111          switch (this) {
112            case INPROGRESS: return "http://hl7.org/fhir/questionnaire-answers-status";
113            case COMPLETED: return "http://hl7.org/fhir/questionnaire-answers-status";
114            case AMENDED: return "http://hl7.org/fhir/questionnaire-answers-status";
115            case ENTEREDINERROR: return "http://hl7.org/fhir/questionnaire-answers-status";
116            case STOPPED: return "http://hl7.org/fhir/questionnaire-answers-status";
117            case NULL: return null;
118            default: return "?";
119          }
120        }
121        public String getDefinition() {
122          switch (this) {
123            case INPROGRESS: return "This QuestionnaireResponse has been partially filled out with answers but changes or additions are still expected to be made to it.";
124            case COMPLETED: return "This QuestionnaireResponse has been filled out with answers and the current content is regarded as definitive.";
125            case AMENDED: return "This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards.";
126            case ENTEREDINERROR: return "This QuestionnaireResponse was entered in error and voided.";
127            case STOPPED: return "This QuestionnaireResponse has been partially filled out with answers but has been abandoned. No subsequent changes can be made.";
128            case NULL: return null;
129            default: return "?";
130          }
131        }
132        public String getDisplay() {
133          switch (this) {
134            case INPROGRESS: return "In Progress";
135            case COMPLETED: return "Completed";
136            case AMENDED: return "Amended";
137            case ENTEREDINERROR: return "Entered in Error";
138            case STOPPED: return "Stopped";
139            case NULL: return null;
140            default: return "?";
141          }
142        }
143    }
144
145  public static class QuestionnaireResponseStatusEnumFactory implements EnumFactory<QuestionnaireResponseStatus> {
146    public QuestionnaireResponseStatus fromCode(String codeString) throws IllegalArgumentException {
147      if (codeString == null || "".equals(codeString))
148            if (codeString == null || "".equals(codeString))
149                return null;
150        if ("in-progress".equals(codeString))
151          return QuestionnaireResponseStatus.INPROGRESS;
152        if ("completed".equals(codeString))
153          return QuestionnaireResponseStatus.COMPLETED;
154        if ("amended".equals(codeString))
155          return QuestionnaireResponseStatus.AMENDED;
156        if ("entered-in-error".equals(codeString))
157          return QuestionnaireResponseStatus.ENTEREDINERROR;
158        if ("stopped".equals(codeString))
159          return QuestionnaireResponseStatus.STOPPED;
160        throw new IllegalArgumentException("Unknown QuestionnaireResponseStatus code '"+codeString+"'");
161        }
162        public Enumeration<QuestionnaireResponseStatus> fromType(PrimitiveType<?> code) throws FHIRException {
163          if (code == null)
164            return null;
165          if (code.isEmpty())
166            return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.NULL, code);
167          String codeString = ((PrimitiveType) code).asStringValue();
168          if (codeString == null || "".equals(codeString))
169            return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.NULL, code);
170        if ("in-progress".equals(codeString))
171          return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.INPROGRESS, code);
172        if ("completed".equals(codeString))
173          return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.COMPLETED, code);
174        if ("amended".equals(codeString))
175          return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.AMENDED, code);
176        if ("entered-in-error".equals(codeString))
177          return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.ENTEREDINERROR, code);
178        if ("stopped".equals(codeString))
179          return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.STOPPED, code);
180        throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'");
181        }
182    public String toCode(QuestionnaireResponseStatus code) {
183      if (code == QuestionnaireResponseStatus.INPROGRESS)
184        return "in-progress";
185      if (code == QuestionnaireResponseStatus.COMPLETED)
186        return "completed";
187      if (code == QuestionnaireResponseStatus.AMENDED)
188        return "amended";
189      if (code == QuestionnaireResponseStatus.ENTEREDINERROR)
190        return "entered-in-error";
191      if (code == QuestionnaireResponseStatus.STOPPED)
192        return "stopped";
193      return "?";
194      }
195    public String toSystem(QuestionnaireResponseStatus code) {
196      return code.getSystem();
197      }
198    }
199
200    @Block()
201    public static class QuestionnaireResponseItemComponent extends BackboneElement implements IBaseBackboneElement {
202        /**
203         * The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.
204         */
205        @Child(name = "linkId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
206        @Description(shortDefinition="Pointer to specific item from Questionnaire", formalDefinition="The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource." )
207        protected StringType linkId;
208
209        /**
210         * A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.
211         */
212        @Child(name = "definition", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false)
213        @Description(shortDefinition="ElementDefinition - details for the item", formalDefinition="A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item." )
214        protected UriType definition;
215
216        /**
217         * Text that is displayed above the contents of the group or as the text of the question being answered.
218         */
219        @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
220        @Description(shortDefinition="Name for group or question text", formalDefinition="Text that is displayed above the contents of the group or as the text of the question being answered." )
221        protected StringType text;
222
223        /**
224         * The respondent's answer(s) to the question.
225         */
226        @Child(name = "answer", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
227        @Description(shortDefinition="The response(s) to the question", formalDefinition="The respondent's answer(s) to the question." )
228        protected List<QuestionnaireResponseItemAnswerComponent> answer;
229
230        /**
231         * Sub-questions, sub-groups or display items nested beneath a group.
232         */
233        @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
234        @Description(shortDefinition="Child items of group item", formalDefinition="Sub-questions, sub-groups or display items nested beneath a group." )
235        protected List<QuestionnaireResponseItemComponent> item;
236
237        private static final long serialVersionUID = -1395483402L;
238
239    /**
240     * Constructor
241     */
242      public QuestionnaireResponseItemComponent() {
243        super();
244      }
245
246    /**
247     * Constructor
248     */
249      public QuestionnaireResponseItemComponent(String linkId) {
250        super();
251        this.setLinkId(linkId);
252      }
253
254        /**
255         * @return {@link #linkId} (The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value
256         */
257        public StringType getLinkIdElement() { 
258          if (this.linkId == null)
259            if (Configuration.errorOnAutoCreate())
260              throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.linkId");
261            else if (Configuration.doAutoCreate())
262              this.linkId = new StringType(); // bb
263          return this.linkId;
264        }
265
266        public boolean hasLinkIdElement() { 
267          return this.linkId != null && !this.linkId.isEmpty();
268        }
269
270        public boolean hasLinkId() { 
271          return this.linkId != null && !this.linkId.isEmpty();
272        }
273
274        /**
275         * @param value {@link #linkId} (The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value
276         */
277        public QuestionnaireResponseItemComponent setLinkIdElement(StringType value) { 
278          this.linkId = value;
279          return this;
280        }
281
282        /**
283         * @return The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.
284         */
285        public String getLinkId() { 
286          return this.linkId == null ? null : this.linkId.getValue();
287        }
288
289        /**
290         * @param value The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.
291         */
292        public QuestionnaireResponseItemComponent setLinkId(String value) { 
293            if (this.linkId == null)
294              this.linkId = new StringType();
295            this.linkId.setValue(value);
296          return this;
297        }
298
299        /**
300         * @return {@link #definition} (A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
301         */
302        public UriType getDefinitionElement() { 
303          if (this.definition == null)
304            if (Configuration.errorOnAutoCreate())
305              throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.definition");
306            else if (Configuration.doAutoCreate())
307              this.definition = new UriType(); // bb
308          return this.definition;
309        }
310
311        public boolean hasDefinitionElement() { 
312          return this.definition != null && !this.definition.isEmpty();
313        }
314
315        public boolean hasDefinition() { 
316          return this.definition != null && !this.definition.isEmpty();
317        }
318
319        /**
320         * @param value {@link #definition} (A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value
321         */
322        public QuestionnaireResponseItemComponent setDefinitionElement(UriType value) { 
323          this.definition = value;
324          return this;
325        }
326
327        /**
328         * @return A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.
329         */
330        public String getDefinition() { 
331          return this.definition == null ? null : this.definition.getValue();
332        }
333
334        /**
335         * @param value A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.
336         */
337        public QuestionnaireResponseItemComponent setDefinition(String value) { 
338          if (Utilities.noString(value))
339            this.definition = null;
340          else {
341            if (this.definition == null)
342              this.definition = new UriType();
343            this.definition.setValue(value);
344          }
345          return this;
346        }
347
348        /**
349         * @return {@link #text} (Text that is displayed above the contents of the group or as the text of the question being answered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
350         */
351        public StringType getTextElement() { 
352          if (this.text == null)
353            if (Configuration.errorOnAutoCreate())
354              throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.text");
355            else if (Configuration.doAutoCreate())
356              this.text = new StringType(); // bb
357          return this.text;
358        }
359
360        public boolean hasTextElement() { 
361          return this.text != null && !this.text.isEmpty();
362        }
363
364        public boolean hasText() { 
365          return this.text != null && !this.text.isEmpty();
366        }
367
368        /**
369         * @param value {@link #text} (Text that is displayed above the contents of the group or as the text of the question being answered.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value
370         */
371        public QuestionnaireResponseItemComponent setTextElement(StringType value) { 
372          this.text = value;
373          return this;
374        }
375
376        /**
377         * @return Text that is displayed above the contents of the group or as the text of the question being answered.
378         */
379        public String getText() { 
380          return this.text == null ? null : this.text.getValue();
381        }
382
383        /**
384         * @param value Text that is displayed above the contents of the group or as the text of the question being answered.
385         */
386        public QuestionnaireResponseItemComponent setText(String value) { 
387          if (Utilities.noString(value))
388            this.text = null;
389          else {
390            if (this.text == null)
391              this.text = new StringType();
392            this.text.setValue(value);
393          }
394          return this;
395        }
396
397        /**
398         * @return {@link #answer} (The respondent's answer(s) to the question.)
399         */
400        public List<QuestionnaireResponseItemAnswerComponent> getAnswer() { 
401          if (this.answer == null)
402            this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>();
403          return this.answer;
404        }
405
406        /**
407         * @return Returns a reference to <code>this</code> for easy method chaining
408         */
409        public QuestionnaireResponseItemComponent setAnswer(List<QuestionnaireResponseItemAnswerComponent> theAnswer) { 
410          this.answer = theAnswer;
411          return this;
412        }
413
414        public boolean hasAnswer() { 
415          if (this.answer == null)
416            return false;
417          for (QuestionnaireResponseItemAnswerComponent item : this.answer)
418            if (!item.isEmpty())
419              return true;
420          return false;
421        }
422
423        public QuestionnaireResponseItemAnswerComponent addAnswer() { //3
424          QuestionnaireResponseItemAnswerComponent t = new QuestionnaireResponseItemAnswerComponent();
425          if (this.answer == null)
426            this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>();
427          this.answer.add(t);
428          return t;
429        }
430
431        public QuestionnaireResponseItemComponent addAnswer(QuestionnaireResponseItemAnswerComponent t) { //3
432          if (t == null)
433            return this;
434          if (this.answer == null)
435            this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>();
436          this.answer.add(t);
437          return this;
438        }
439
440        /**
441         * @return The first repetition of repeating field {@link #answer}, creating it if it does not already exist {3}
442         */
443        public QuestionnaireResponseItemAnswerComponent getAnswerFirstRep() { 
444          if (getAnswer().isEmpty()) {
445            addAnswer();
446          }
447          return getAnswer().get(0);
448        }
449
450        /**
451         * @return {@link #item} (Sub-questions, sub-groups or display items nested beneath a group.)
452         */
453        public List<QuestionnaireResponseItemComponent> getItem() { 
454          if (this.item == null)
455            this.item = new ArrayList<QuestionnaireResponseItemComponent>();
456          return this.item;
457        }
458
459        /**
460         * @return Returns a reference to <code>this</code> for easy method chaining
461         */
462        public QuestionnaireResponseItemComponent setItem(List<QuestionnaireResponseItemComponent> theItem) { 
463          this.item = theItem;
464          return this;
465        }
466
467        public boolean hasItem() { 
468          if (this.item == null)
469            return false;
470          for (QuestionnaireResponseItemComponent item : this.item)
471            if (!item.isEmpty())
472              return true;
473          return false;
474        }
475
476        public QuestionnaireResponseItemComponent addItem() { //3
477          QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent();
478          if (this.item == null)
479            this.item = new ArrayList<QuestionnaireResponseItemComponent>();
480          this.item.add(t);
481          return t;
482        }
483
484        public QuestionnaireResponseItemComponent addItem(QuestionnaireResponseItemComponent t) { //3
485          if (t == null)
486            return this;
487          if (this.item == null)
488            this.item = new ArrayList<QuestionnaireResponseItemComponent>();
489          this.item.add(t);
490          return this;
491        }
492
493        /**
494         * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist {3}
495         */
496        public QuestionnaireResponseItemComponent getItemFirstRep() { 
497          if (getItem().isEmpty()) {
498            addItem();
499          }
500          return getItem().get(0);
501        }
502
503        protected void listChildren(List<Property> children) {
504          super.listChildren(children);
505          children.add(new Property("linkId", "string", "The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.", 0, 1, linkId));
506          children.add(new Property("definition", "uri", "A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.", 0, 1, definition));
507          children.add(new Property("text", "string", "Text that is displayed above the contents of the group or as the text of the question being answered.", 0, 1, text));
508          children.add(new Property("answer", "", "The respondent's answer(s) to the question.", 0, java.lang.Integer.MAX_VALUE, answer));
509          children.add(new Property("item", "@QuestionnaireResponse.item", "Sub-questions, sub-groups or display items nested beneath a group.", 0, java.lang.Integer.MAX_VALUE, item));
510        }
511
512        @Override
513        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
514          switch (_hash) {
515          case -1102667083: /*linkId*/  return new Property("linkId", "string", "The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.", 0, 1, linkId);
516          case -1014418093: /*definition*/  return new Property("definition", "uri", "A reference to an [ElementDefinition](elementdefinition.html) that provides the details for the item.", 0, 1, definition);
517          case 3556653: /*text*/  return new Property("text", "string", "Text that is displayed above the contents of the group or as the text of the question being answered.", 0, 1, text);
518          case -1412808770: /*answer*/  return new Property("answer", "", "The respondent's answer(s) to the question.", 0, java.lang.Integer.MAX_VALUE, answer);
519          case 3242771: /*item*/  return new Property("item", "@QuestionnaireResponse.item", "Sub-questions, sub-groups or display items nested beneath a group.", 0, java.lang.Integer.MAX_VALUE, item);
520          default: return super.getNamedProperty(_hash, _name, _checkValid);
521          }
522
523        }
524
525      @Override
526      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
527        switch (hash) {
528        case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : new Base[] {this.linkId}; // StringType
529        case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // UriType
530        case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
531        case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : this.answer.toArray(new Base[this.answer.size()]); // QuestionnaireResponseItemAnswerComponent
532        case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent
533        default: return super.getProperty(hash, name, checkValid);
534        }
535
536      }
537
538      @Override
539      public Base setProperty(int hash, String name, Base value) throws FHIRException {
540        switch (hash) {
541        case -1102667083: // linkId
542          this.linkId = TypeConvertor.castToString(value); // StringType
543          return value;
544        case -1014418093: // definition
545          this.definition = TypeConvertor.castToUri(value); // UriType
546          return value;
547        case 3556653: // text
548          this.text = TypeConvertor.castToString(value); // StringType
549          return value;
550        case -1412808770: // answer
551          this.getAnswer().add((QuestionnaireResponseItemAnswerComponent) value); // QuestionnaireResponseItemAnswerComponent
552          return value;
553        case 3242771: // item
554          this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent
555          return value;
556        default: return super.setProperty(hash, name, value);
557        }
558
559      }
560
561      @Override
562      public Base setProperty(String name, Base value) throws FHIRException {
563        if (name.equals("linkId")) {
564          this.linkId = TypeConvertor.castToString(value); // StringType
565        } else if (name.equals("definition")) {
566          this.definition = TypeConvertor.castToUri(value); // UriType
567        } else if (name.equals("text")) {
568          this.text = TypeConvertor.castToString(value); // StringType
569        } else if (name.equals("answer")) {
570          this.getAnswer().add((QuestionnaireResponseItemAnswerComponent) value);
571        } else if (name.equals("item")) {
572          this.getItem().add((QuestionnaireResponseItemComponent) value);
573        } else
574          return super.setProperty(name, value);
575        return value;
576      }
577
578  @Override
579  public void removeChild(String name, Base value) throws FHIRException {
580        if (name.equals("linkId")) {
581          this.linkId = null;
582        } else if (name.equals("definition")) {
583          this.definition = null;
584        } else if (name.equals("text")) {
585          this.text = null;
586        } else if (name.equals("answer")) {
587          this.getAnswer().remove((QuestionnaireResponseItemAnswerComponent) value);
588        } else if (name.equals("item")) {
589          this.getItem().remove((QuestionnaireResponseItemComponent) value);
590        } else
591          super.removeChild(name, value);
592        
593      }
594
595      @Override
596      public Base makeProperty(int hash, String name) throws FHIRException {
597        switch (hash) {
598        case -1102667083:  return getLinkIdElement();
599        case -1014418093:  return getDefinitionElement();
600        case 3556653:  return getTextElement();
601        case -1412808770:  return addAnswer(); 
602        case 3242771:  return addItem(); 
603        default: return super.makeProperty(hash, name);
604        }
605
606      }
607
608      @Override
609      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
610        switch (hash) {
611        case -1102667083: /*linkId*/ return new String[] {"string"};
612        case -1014418093: /*definition*/ return new String[] {"uri"};
613        case 3556653: /*text*/ return new String[] {"string"};
614        case -1412808770: /*answer*/ return new String[] {};
615        case 3242771: /*item*/ return new String[] {"@QuestionnaireResponse.item"};
616        default: return super.getTypesForProperty(hash, name);
617        }
618
619      }
620
621      @Override
622      public Base addChild(String name) throws FHIRException {
623        if (name.equals("linkId")) {
624          throw new FHIRException("Cannot call addChild on a singleton property QuestionnaireResponse.item.linkId");
625        }
626        else if (name.equals("definition")) {
627          throw new FHIRException("Cannot call addChild on a singleton property QuestionnaireResponse.item.definition");
628        }
629        else if (name.equals("text")) {
630          throw new FHIRException("Cannot call addChild on a singleton property QuestionnaireResponse.item.text");
631        }
632        else if (name.equals("answer")) {
633          return addAnswer();
634        }
635        else if (name.equals("item")) {
636          return addItem();
637        }
638        else
639          return super.addChild(name);
640      }
641
642      public QuestionnaireResponseItemComponent copy() {
643        QuestionnaireResponseItemComponent dst = new QuestionnaireResponseItemComponent();
644        copyValues(dst);
645        return dst;
646      }
647
648      public void copyValues(QuestionnaireResponseItemComponent dst) {
649        super.copyValues(dst);
650        dst.linkId = linkId == null ? null : linkId.copy();
651        dst.definition = definition == null ? null : definition.copy();
652        dst.text = text == null ? null : text.copy();
653        if (answer != null) {
654          dst.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>();
655          for (QuestionnaireResponseItemAnswerComponent i : answer)
656            dst.answer.add(i.copy());
657        };
658        if (item != null) {
659          dst.item = new ArrayList<QuestionnaireResponseItemComponent>();
660          for (QuestionnaireResponseItemComponent i : item)
661            dst.item.add(i.copy());
662        };
663      }
664
665      @Override
666      public boolean equalsDeep(Base other_) {
667        if (!super.equalsDeep(other_))
668          return false;
669        if (!(other_ instanceof QuestionnaireResponseItemComponent))
670          return false;
671        QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other_;
672        return compareDeep(linkId, o.linkId, true) && compareDeep(definition, o.definition, true) && compareDeep(text, o.text, true)
673           && compareDeep(answer, o.answer, true) && compareDeep(item, o.item, true);
674      }
675
676      @Override
677      public boolean equalsShallow(Base other_) {
678        if (!super.equalsShallow(other_))
679          return false;
680        if (!(other_ instanceof QuestionnaireResponseItemComponent))
681          return false;
682        QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other_;
683        return compareValues(linkId, o.linkId, true) && compareValues(definition, o.definition, true) && compareValues(text, o.text, true)
684          ;
685      }
686
687      public boolean isEmpty() {
688        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(linkId, definition, text
689          , answer, item);
690      }
691
692  public String fhirType() {
693    return "QuestionnaireResponse.item";
694
695  }
696
697  }
698
699    @Block()
700    public static class QuestionnaireResponseItemAnswerComponent extends BackboneElement implements IBaseBackboneElement {
701        /**
702         * The answer (or one of the answers) provided by the respondent to the question.
703         */
704        @Child(name = "value", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class, Reference.class}, order=1, min=1, max=1, modifier=false, summary=false)
705        @Description(shortDefinition="Single-valued answer to the question", formalDefinition="The answer (or one of the answers) provided by the respondent to the question." )
706        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-answers")
707        protected DataType value;
708
709        /**
710         * Nested groups and/or questions found within this particular answer.
711         */
712        @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
713        @Description(shortDefinition="Child items of question", formalDefinition="Nested groups and/or questions found within this particular answer." )
714        protected List<QuestionnaireResponseItemComponent> item;
715
716        private static final long serialVersionUID = 1790747618L;
717
718    /**
719     * Constructor
720     */
721      public QuestionnaireResponseItemAnswerComponent() {
722        super();
723      }
724
725    /**
726     * Constructor
727     */
728      public QuestionnaireResponseItemAnswerComponent(DataType value) {
729        super();
730        this.setValue(value);
731      }
732
733        /**
734         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
735         */
736        public DataType getValue() { 
737          return this.value;
738        }
739
740        /**
741         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
742         */
743        public BooleanType getValueBooleanType() throws FHIRException { 
744          if (this.value == null)
745            this.value = new BooleanType();
746          if (!(this.value instanceof BooleanType))
747            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
748          return (BooleanType) this.value;
749        }
750
751        public boolean hasValueBooleanType() { 
752          return this != null && this.value instanceof BooleanType;
753        }
754
755        /**
756         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
757         */
758        public DecimalType getValueDecimalType() throws FHIRException { 
759          if (this.value == null)
760            this.value = new DecimalType();
761          if (!(this.value instanceof DecimalType))
762            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
763          return (DecimalType) this.value;
764        }
765
766        public boolean hasValueDecimalType() { 
767          return this != null && this.value instanceof DecimalType;
768        }
769
770        /**
771         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
772         */
773        public IntegerType getValueIntegerType() throws FHIRException { 
774          if (this.value == null)
775            this.value = new IntegerType();
776          if (!(this.value instanceof IntegerType))
777            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
778          return (IntegerType) this.value;
779        }
780
781        public boolean hasValueIntegerType() { 
782          return this != null && this.value instanceof IntegerType;
783        }
784
785        /**
786         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
787         */
788        public DateType getValueDateType() throws FHIRException { 
789          if (this.value == null)
790            this.value = new DateType();
791          if (!(this.value instanceof DateType))
792            throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered");
793          return (DateType) this.value;
794        }
795
796        public boolean hasValueDateType() { 
797          return this != null && this.value instanceof DateType;
798        }
799
800        /**
801         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
802         */
803        public DateTimeType getValueDateTimeType() throws FHIRException { 
804          if (this.value == null)
805            this.value = new DateTimeType();
806          if (!(this.value instanceof DateTimeType))
807            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
808          return (DateTimeType) this.value;
809        }
810
811        public boolean hasValueDateTimeType() { 
812          return this != null && this.value instanceof DateTimeType;
813        }
814
815        /**
816         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
817         */
818        public TimeType getValueTimeType() throws FHIRException { 
819          if (this.value == null)
820            this.value = new TimeType();
821          if (!(this.value instanceof TimeType))
822            throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered");
823          return (TimeType) this.value;
824        }
825
826        public boolean hasValueTimeType() { 
827          return this != null && this.value instanceof TimeType;
828        }
829
830        /**
831         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
832         */
833        public StringType getValueStringType() throws FHIRException { 
834          if (this.value == null)
835            this.value = new StringType();
836          if (!(this.value instanceof StringType))
837            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
838          return (StringType) this.value;
839        }
840
841        public boolean hasValueStringType() { 
842          return this != null && this.value instanceof StringType;
843        }
844
845        /**
846         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
847         */
848        public UriType getValueUriType() throws FHIRException { 
849          if (this.value == null)
850            this.value = new UriType();
851          if (!(this.value instanceof UriType))
852            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
853          return (UriType) this.value;
854        }
855
856        public boolean hasValueUriType() { 
857          return this != null && this.value instanceof UriType;
858        }
859
860        /**
861         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
862         */
863        public Attachment getValueAttachment() throws FHIRException { 
864          if (this.value == null)
865            this.value = new Attachment();
866          if (!(this.value instanceof Attachment))
867            throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered");
868          return (Attachment) this.value;
869        }
870
871        public boolean hasValueAttachment() { 
872          return this != null && this.value instanceof Attachment;
873        }
874
875        /**
876         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
877         */
878        public Coding getValueCoding() throws FHIRException { 
879          if (this.value == null)
880            this.value = new Coding();
881          if (!(this.value instanceof Coding))
882            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
883          return (Coding) this.value;
884        }
885
886        public boolean hasValueCoding() { 
887          return this != null && this.value instanceof Coding;
888        }
889
890        /**
891         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
892         */
893        public Quantity getValueQuantity() throws FHIRException { 
894          if (this.value == null)
895            this.value = new Quantity();
896          if (!(this.value instanceof Quantity))
897            throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered");
898          return (Quantity) this.value;
899        }
900
901        public boolean hasValueQuantity() { 
902          return this != null && this.value instanceof Quantity;
903        }
904
905        /**
906         * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
907         */
908        public Reference getValueReference() throws FHIRException { 
909          if (this.value == null)
910            this.value = new Reference();
911          if (!(this.value instanceof Reference))
912            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered");
913          return (Reference) this.value;
914        }
915
916        public boolean hasValueReference() { 
917          return this != null && this.value instanceof Reference;
918        }
919
920        public boolean hasValue() { 
921          return this.value != null && !this.value.isEmpty();
922        }
923
924        /**
925         * @param value {@link #value} (The answer (or one of the answers) provided by the respondent to the question.)
926         */
927        public QuestionnaireResponseItemAnswerComponent setValue(DataType value) { 
928          if (value != null && !(value instanceof BooleanType || value instanceof DecimalType || value instanceof IntegerType || value instanceof DateType || value instanceof DateTimeType || value instanceof TimeType || value instanceof StringType || value instanceof UriType || value instanceof Attachment || value instanceof Coding || value instanceof Quantity || value instanceof Reference))
929            throw new FHIRException("Not the right type for QuestionnaireResponse.item.answer.value[x]: "+value.fhirType());
930          this.value = value;
931          return this;
932        }
933
934        /**
935         * @return {@link #item} (Nested groups and/or questions found within this particular answer.)
936         */
937        public List<QuestionnaireResponseItemComponent> getItem() { 
938          if (this.item == null)
939            this.item = new ArrayList<QuestionnaireResponseItemComponent>();
940          return this.item;
941        }
942
943        /**
944         * @return Returns a reference to <code>this</code> for easy method chaining
945         */
946        public QuestionnaireResponseItemAnswerComponent setItem(List<QuestionnaireResponseItemComponent> theItem) { 
947          this.item = theItem;
948          return this;
949        }
950
951        public boolean hasItem() { 
952          if (this.item == null)
953            return false;
954          for (QuestionnaireResponseItemComponent item : this.item)
955            if (!item.isEmpty())
956              return true;
957          return false;
958        }
959
960        public QuestionnaireResponseItemComponent addItem() { //3
961          QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent();
962          if (this.item == null)
963            this.item = new ArrayList<QuestionnaireResponseItemComponent>();
964          this.item.add(t);
965          return t;
966        }
967
968        public QuestionnaireResponseItemAnswerComponent addItem(QuestionnaireResponseItemComponent t) { //3
969          if (t == null)
970            return this;
971          if (this.item == null)
972            this.item = new ArrayList<QuestionnaireResponseItemComponent>();
973          this.item.add(t);
974          return this;
975        }
976
977        /**
978         * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist {3}
979         */
980        public QuestionnaireResponseItemComponent getItemFirstRep() { 
981          if (getItem().isEmpty()) {
982            addItem();
983          }
984          return getItem().get(0);
985        }
986
987        protected void listChildren(List<Property> children) {
988          super.listChildren(children);
989          children.add(new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value));
990          children.add(new Property("item", "@QuestionnaireResponse.item", "Nested groups and/or questions found within this particular answer.", 0, java.lang.Integer.MAX_VALUE, item));
991        }
992
993        @Override
994        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
995          switch (_hash) {
996          case -1410166417: /*value[x]*/  return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
997          case 111972721: /*value*/  return new Property("value[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
998          case 733421943: /*valueBoolean*/  return new Property("value[x]", "boolean", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
999          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "decimal", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1000          case -1668204915: /*valueInteger*/  return new Property("value[x]", "integer", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1001          case -766192449: /*valueDate*/  return new Property("value[x]", "date", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1002          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "dateTime", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1003          case -765708322: /*valueTime*/  return new Property("value[x]", "time", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1004          case -1424603934: /*valueString*/  return new Property("value[x]", "string", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1005          case -1410172357: /*valueUri*/  return new Property("value[x]", "uri", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1006          case -475566732: /*valueAttachment*/  return new Property("value[x]", "Attachment", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1007          case -1887705029: /*valueCoding*/  return new Property("value[x]", "Coding", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1008          case -2029823716: /*valueQuantity*/  return new Property("value[x]", "Quantity", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1009          case 1755241690: /*valueReference*/  return new Property("value[x]", "Reference(Any)", "The answer (or one of the answers) provided by the respondent to the question.", 0, 1, value);
1010          case 3242771: /*item*/  return new Property("item", "@QuestionnaireResponse.item", "Nested groups and/or questions found within this particular answer.", 0, java.lang.Integer.MAX_VALUE, item);
1011          default: return super.getNamedProperty(_hash, _name, _checkValid);
1012          }
1013
1014        }
1015
1016      @Override
1017      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1018        switch (hash) {
1019        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType
1020        case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent
1021        default: return super.getProperty(hash, name, checkValid);
1022        }
1023
1024      }
1025
1026      @Override
1027      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1028        switch (hash) {
1029        case 111972721: // value
1030          this.value = TypeConvertor.castToType(value); // DataType
1031          return value;
1032        case 3242771: // item
1033          this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent
1034          return value;
1035        default: return super.setProperty(hash, name, value);
1036        }
1037
1038      }
1039
1040      @Override
1041      public Base setProperty(String name, Base value) throws FHIRException {
1042        if (name.equals("value[x]")) {
1043          this.value = TypeConvertor.castToType(value); // DataType
1044        } else if (name.equals("item")) {
1045          this.getItem().add((QuestionnaireResponseItemComponent) value);
1046        } else
1047          return super.setProperty(name, value);
1048        return value;
1049      }
1050
1051  @Override
1052  public void removeChild(String name, Base value) throws FHIRException {
1053        if (name.equals("value[x]")) {
1054          this.value = null;
1055        } else if (name.equals("item")) {
1056          this.getItem().remove((QuestionnaireResponseItemComponent) value);
1057        } else
1058          super.removeChild(name, value);
1059        
1060      }
1061
1062      @Override
1063      public Base makeProperty(int hash, String name) throws FHIRException {
1064        switch (hash) {
1065        case -1410166417:  return getValue();
1066        case 111972721:  return getValue();
1067        case 3242771:  return addItem(); 
1068        default: return super.makeProperty(hash, name);
1069        }
1070
1071      }
1072
1073      @Override
1074      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1075        switch (hash) {
1076        case 111972721: /*value*/ return new String[] {"boolean", "decimal", "integer", "date", "dateTime", "time", "string", "uri", "Attachment", "Coding", "Quantity", "Reference"};
1077        case 3242771: /*item*/ return new String[] {"@QuestionnaireResponse.item"};
1078        default: return super.getTypesForProperty(hash, name);
1079        }
1080
1081      }
1082
1083      @Override
1084      public Base addChild(String name) throws FHIRException {
1085        if (name.equals("valueBoolean")) {
1086          this.value = new BooleanType();
1087          return this.value;
1088        }
1089        else if (name.equals("valueDecimal")) {
1090          this.value = new DecimalType();
1091          return this.value;
1092        }
1093        else if (name.equals("valueInteger")) {
1094          this.value = new IntegerType();
1095          return this.value;
1096        }
1097        else if (name.equals("valueDate")) {
1098          this.value = new DateType();
1099          return this.value;
1100        }
1101        else if (name.equals("valueDateTime")) {
1102          this.value = new DateTimeType();
1103          return this.value;
1104        }
1105        else if (name.equals("valueTime")) {
1106          this.value = new TimeType();
1107          return this.value;
1108        }
1109        else if (name.equals("valueString")) {
1110          this.value = new StringType();
1111          return this.value;
1112        }
1113        else if (name.equals("valueUri")) {
1114          this.value = new UriType();
1115          return this.value;
1116        }
1117        else if (name.equals("valueAttachment")) {
1118          this.value = new Attachment();
1119          return this.value;
1120        }
1121        else if (name.equals("valueCoding")) {
1122          this.value = new Coding();
1123          return this.value;
1124        }
1125        else if (name.equals("valueQuantity")) {
1126          this.value = new Quantity();
1127          return this.value;
1128        }
1129        else if (name.equals("valueReference")) {
1130          this.value = new Reference();
1131          return this.value;
1132        }
1133        else if (name.equals("item")) {
1134          return addItem();
1135        }
1136        else
1137          return super.addChild(name);
1138      }
1139
1140      public QuestionnaireResponseItemAnswerComponent copy() {
1141        QuestionnaireResponseItemAnswerComponent dst = new QuestionnaireResponseItemAnswerComponent();
1142        copyValues(dst);
1143        return dst;
1144      }
1145
1146      public void copyValues(QuestionnaireResponseItemAnswerComponent dst) {
1147        super.copyValues(dst);
1148        dst.value = value == null ? null : value.copy();
1149        if (item != null) {
1150          dst.item = new ArrayList<QuestionnaireResponseItemComponent>();
1151          for (QuestionnaireResponseItemComponent i : item)
1152            dst.item.add(i.copy());
1153        };
1154      }
1155
1156      @Override
1157      public boolean equalsDeep(Base other_) {
1158        if (!super.equalsDeep(other_))
1159          return false;
1160        if (!(other_ instanceof QuestionnaireResponseItemAnswerComponent))
1161          return false;
1162        QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other_;
1163        return compareDeep(value, o.value, true) && compareDeep(item, o.item, true);
1164      }
1165
1166      @Override
1167      public boolean equalsShallow(Base other_) {
1168        if (!super.equalsShallow(other_))
1169          return false;
1170        if (!(other_ instanceof QuestionnaireResponseItemAnswerComponent))
1171          return false;
1172        QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other_;
1173        return true;
1174      }
1175
1176      public boolean isEmpty() {
1177        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, item);
1178      }
1179
1180  public String fhirType() {
1181    return "QuestionnaireResponse.item.answer";
1182
1183  }
1184
1185  }
1186
1187    /**
1188     * Business identifiers assigned to this questionnaire response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.
1189     */
1190    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1191    @Description(shortDefinition="Business identifier for this set of answers", formalDefinition="Business identifiers assigned to this questionnaire response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server." )
1192    protected List<Identifier> identifier;
1193
1194    /**
1195     * A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.
1196     */
1197    @Child(name = "basedOn", type = {CarePlan.class, ServiceRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1198    @Description(shortDefinition="Request fulfilled by this QuestionnaireResponse", formalDefinition="A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression." )
1199    protected List<Reference> basedOn;
1200
1201    /**
1202     * A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of.
1203     */
1204    @Child(name = "partOf", type = {Observation.class, Procedure.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1205    @Description(shortDefinition="Part of referenced event", formalDefinition="A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of." )
1206    protected List<Reference> partOf;
1207
1208    /**
1209     * The Questionnaire that defines and organizes the questions for which answers are being provided.
1210     */
1211    @Child(name = "questionnaire", type = {CanonicalType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1212    @Description(shortDefinition="Canonical URL of Questionnaire being answered", formalDefinition="The Questionnaire that defines and organizes the questions for which answers are being provided." )
1213    protected CanonicalType questionnaire;
1214
1215    /**
1216     * The current state of the questionnaire response.
1217     */
1218    @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true)
1219    @Description(shortDefinition="in-progress | completed | amended | entered-in-error | stopped", formalDefinition="The current state of the questionnaire response." )
1220    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-answers-status")
1221    protected Enumeration<QuestionnaireResponseStatus> status;
1222
1223    /**
1224     * The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.
1225     */
1226    @Child(name = "subject", type = {Reference.class}, order=5, min=0, max=1, modifier=false, summary=true)
1227    @Description(shortDefinition="The subject of the questions", formalDefinition="The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information." )
1228    protected Reference subject;
1229
1230    /**
1231     * The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.
1232     */
1233    @Child(name = "encounter", type = {Encounter.class}, order=6, min=0, max=1, modifier=false, summary=true)
1234    @Description(shortDefinition="Encounter the questionnaire response is part of", formalDefinition="The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated." )
1235    protected Reference encounter;
1236
1237    /**
1238     * The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.
1239     */
1240    @Child(name = "authored", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true)
1241    @Description(shortDefinition="Date the answers were gathered", formalDefinition="The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status." )
1242    protected DateTimeType authored;
1243
1244    /**
1245     * The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system.
1246     */
1247    @Child(name = "author", type = {Device.class, Practitioner.class, PractitionerRole.class, Patient.class, RelatedPerson.class, Organization.class}, order=8, min=0, max=1, modifier=false, summary=true)
1248    @Description(shortDefinition="The individual or device that received and recorded the answers", formalDefinition="The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system." )
1249    protected Reference author;
1250
1251    /**
1252     * The individual or device that answered the questions about the subject.
1253     */
1254    @Child(name = "source", type = {Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=9, min=0, max=1, modifier=false, summary=true)
1255    @Description(shortDefinition="The individual or device that answered the questions", formalDefinition="The individual or device that answered the questions about the subject." )
1256    protected Reference source;
1257
1258    /**
1259     * A group or question item from the original questionnaire for which answers are provided.
1260     */
1261    @Child(name = "item", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1262    @Description(shortDefinition="Groups and questions", formalDefinition="A group or question item from the original questionnaire for which answers are provided." )
1263    protected List<QuestionnaireResponseItemComponent> item;
1264
1265    private static final long serialVersionUID = 1660467089L;
1266
1267  /**
1268   * Constructor
1269   */
1270    public QuestionnaireResponse() {
1271      super();
1272    }
1273
1274  /**
1275   * Constructor
1276   */
1277    public QuestionnaireResponse(String questionnaire, QuestionnaireResponseStatus status) {
1278      super();
1279      this.setQuestionnaire(questionnaire);
1280      this.setStatus(status);
1281    }
1282
1283    /**
1284     * @return {@link #identifier} (Business identifiers assigned to this questionnaire response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.)
1285     */
1286    public List<Identifier> getIdentifier() { 
1287      if (this.identifier == null)
1288        this.identifier = new ArrayList<Identifier>();
1289      return this.identifier;
1290    }
1291
1292    /**
1293     * @return Returns a reference to <code>this</code> for easy method chaining
1294     */
1295    public QuestionnaireResponse setIdentifier(List<Identifier> theIdentifier) { 
1296      this.identifier = theIdentifier;
1297      return this;
1298    }
1299
1300    public boolean hasIdentifier() { 
1301      if (this.identifier == null)
1302        return false;
1303      for (Identifier item : this.identifier)
1304        if (!item.isEmpty())
1305          return true;
1306      return false;
1307    }
1308
1309    public Identifier addIdentifier() { //3
1310      Identifier t = new Identifier();
1311      if (this.identifier == null)
1312        this.identifier = new ArrayList<Identifier>();
1313      this.identifier.add(t);
1314      return t;
1315    }
1316
1317    public QuestionnaireResponse addIdentifier(Identifier t) { //3
1318      if (t == null)
1319        return this;
1320      if (this.identifier == null)
1321        this.identifier = new ArrayList<Identifier>();
1322      this.identifier.add(t);
1323      return this;
1324    }
1325
1326    /**
1327     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1328     */
1329    public Identifier getIdentifierFirstRep() { 
1330      if (getIdentifier().isEmpty()) {
1331        addIdentifier();
1332      }
1333      return getIdentifier().get(0);
1334    }
1335
1336    /**
1337     * @return {@link #basedOn} (A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.)
1338     */
1339    public List<Reference> getBasedOn() { 
1340      if (this.basedOn == null)
1341        this.basedOn = new ArrayList<Reference>();
1342      return this.basedOn;
1343    }
1344
1345    /**
1346     * @return Returns a reference to <code>this</code> for easy method chaining
1347     */
1348    public QuestionnaireResponse setBasedOn(List<Reference> theBasedOn) { 
1349      this.basedOn = theBasedOn;
1350      return this;
1351    }
1352
1353    public boolean hasBasedOn() { 
1354      if (this.basedOn == null)
1355        return false;
1356      for (Reference item : this.basedOn)
1357        if (!item.isEmpty())
1358          return true;
1359      return false;
1360    }
1361
1362    public Reference addBasedOn() { //3
1363      Reference t = new Reference();
1364      if (this.basedOn == null)
1365        this.basedOn = new ArrayList<Reference>();
1366      this.basedOn.add(t);
1367      return t;
1368    }
1369
1370    public QuestionnaireResponse addBasedOn(Reference t) { //3
1371      if (t == null)
1372        return this;
1373      if (this.basedOn == null)
1374        this.basedOn = new ArrayList<Reference>();
1375      this.basedOn.add(t);
1376      return this;
1377    }
1378
1379    /**
1380     * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3}
1381     */
1382    public Reference getBasedOnFirstRep() { 
1383      if (getBasedOn().isEmpty()) {
1384        addBasedOn();
1385      }
1386      return getBasedOn().get(0);
1387    }
1388
1389    /**
1390     * @return {@link #partOf} (A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of.)
1391     */
1392    public List<Reference> getPartOf() { 
1393      if (this.partOf == null)
1394        this.partOf = new ArrayList<Reference>();
1395      return this.partOf;
1396    }
1397
1398    /**
1399     * @return Returns a reference to <code>this</code> for easy method chaining
1400     */
1401    public QuestionnaireResponse setPartOf(List<Reference> thePartOf) { 
1402      this.partOf = thePartOf;
1403      return this;
1404    }
1405
1406    public boolean hasPartOf() { 
1407      if (this.partOf == null)
1408        return false;
1409      for (Reference item : this.partOf)
1410        if (!item.isEmpty())
1411          return true;
1412      return false;
1413    }
1414
1415    public Reference addPartOf() { //3
1416      Reference t = new Reference();
1417      if (this.partOf == null)
1418        this.partOf = new ArrayList<Reference>();
1419      this.partOf.add(t);
1420      return t;
1421    }
1422
1423    public QuestionnaireResponse addPartOf(Reference t) { //3
1424      if (t == null)
1425        return this;
1426      if (this.partOf == null)
1427        this.partOf = new ArrayList<Reference>();
1428      this.partOf.add(t);
1429      return this;
1430    }
1431
1432    /**
1433     * @return The first repetition of repeating field {@link #partOf}, creating it if it does not already exist {3}
1434     */
1435    public Reference getPartOfFirstRep() { 
1436      if (getPartOf().isEmpty()) {
1437        addPartOf();
1438      }
1439      return getPartOf().get(0);
1440    }
1441
1442    /**
1443     * @return {@link #questionnaire} (The Questionnaire that defines and organizes the questions for which answers are being provided.). This is the underlying object with id, value and extensions. The accessor "getQuestionnaire" gives direct access to the value
1444     */
1445    public CanonicalType getQuestionnaireElement() { 
1446      if (this.questionnaire == null)
1447        if (Configuration.errorOnAutoCreate())
1448          throw new Error("Attempt to auto-create QuestionnaireResponse.questionnaire");
1449        else if (Configuration.doAutoCreate())
1450          this.questionnaire = new CanonicalType(); // bb
1451      return this.questionnaire;
1452    }
1453
1454    public boolean hasQuestionnaireElement() { 
1455      return this.questionnaire != null && !this.questionnaire.isEmpty();
1456    }
1457
1458    public boolean hasQuestionnaire() { 
1459      return this.questionnaire != null && !this.questionnaire.isEmpty();
1460    }
1461
1462    /**
1463     * @param value {@link #questionnaire} (The Questionnaire that defines and organizes the questions for which answers are being provided.). This is the underlying object with id, value and extensions. The accessor "getQuestionnaire" gives direct access to the value
1464     */
1465    public QuestionnaireResponse setQuestionnaireElement(CanonicalType value) { 
1466      this.questionnaire = value;
1467      return this;
1468    }
1469
1470    /**
1471     * @return The Questionnaire that defines and organizes the questions for which answers are being provided.
1472     */
1473    public String getQuestionnaire() { 
1474      return this.questionnaire == null ? null : this.questionnaire.getValue();
1475    }
1476
1477    /**
1478     * @param value The Questionnaire that defines and organizes the questions for which answers are being provided.
1479     */
1480    public QuestionnaireResponse setQuestionnaire(String value) { 
1481        if (this.questionnaire == null)
1482          this.questionnaire = new CanonicalType();
1483        this.questionnaire.setValue(value);
1484      return this;
1485    }
1486
1487    /**
1488     * @return {@link #status} (The current state of the questionnaire response.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1489     */
1490    public Enumeration<QuestionnaireResponseStatus> getStatusElement() { 
1491      if (this.status == null)
1492        if (Configuration.errorOnAutoCreate())
1493          throw new Error("Attempt to auto-create QuestionnaireResponse.status");
1494        else if (Configuration.doAutoCreate())
1495          this.status = new Enumeration<QuestionnaireResponseStatus>(new QuestionnaireResponseStatusEnumFactory()); // bb
1496      return this.status;
1497    }
1498
1499    public boolean hasStatusElement() { 
1500      return this.status != null && !this.status.isEmpty();
1501    }
1502
1503    public boolean hasStatus() { 
1504      return this.status != null && !this.status.isEmpty();
1505    }
1506
1507    /**
1508     * @param value {@link #status} (The current state of the questionnaire response.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1509     */
1510    public QuestionnaireResponse setStatusElement(Enumeration<QuestionnaireResponseStatus> value) { 
1511      this.status = value;
1512      return this;
1513    }
1514
1515    /**
1516     * @return The current state of the questionnaire response.
1517     */
1518    public QuestionnaireResponseStatus getStatus() { 
1519      return this.status == null ? null : this.status.getValue();
1520    }
1521
1522    /**
1523     * @param value The current state of the questionnaire response.
1524     */
1525    public QuestionnaireResponse setStatus(QuestionnaireResponseStatus value) { 
1526        if (this.status == null)
1527          this.status = new Enumeration<QuestionnaireResponseStatus>(new QuestionnaireResponseStatusEnumFactory());
1528        this.status.setValue(value);
1529      return this;
1530    }
1531
1532    /**
1533     * @return {@link #subject} (The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.)
1534     */
1535    public Reference getSubject() { 
1536      if (this.subject == null)
1537        if (Configuration.errorOnAutoCreate())
1538          throw new Error("Attempt to auto-create QuestionnaireResponse.subject");
1539        else if (Configuration.doAutoCreate())
1540          this.subject = new Reference(); // cc
1541      return this.subject;
1542    }
1543
1544    public boolean hasSubject() { 
1545      return this.subject != null && !this.subject.isEmpty();
1546    }
1547
1548    /**
1549     * @param value {@link #subject} (The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.)
1550     */
1551    public QuestionnaireResponse setSubject(Reference value) { 
1552      this.subject = value;
1553      return this;
1554    }
1555
1556    /**
1557     * @return {@link #encounter} (The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.)
1558     */
1559    public Reference getEncounter() { 
1560      if (this.encounter == null)
1561        if (Configuration.errorOnAutoCreate())
1562          throw new Error("Attempt to auto-create QuestionnaireResponse.encounter");
1563        else if (Configuration.doAutoCreate())
1564          this.encounter = new Reference(); // cc
1565      return this.encounter;
1566    }
1567
1568    public boolean hasEncounter() { 
1569      return this.encounter != null && !this.encounter.isEmpty();
1570    }
1571
1572    /**
1573     * @param value {@link #encounter} (The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.)
1574     */
1575    public QuestionnaireResponse setEncounter(Reference value) { 
1576      this.encounter = value;
1577      return this;
1578    }
1579
1580    /**
1581     * @return {@link #authored} (The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value
1582     */
1583    public DateTimeType getAuthoredElement() { 
1584      if (this.authored == null)
1585        if (Configuration.errorOnAutoCreate())
1586          throw new Error("Attempt to auto-create QuestionnaireResponse.authored");
1587        else if (Configuration.doAutoCreate())
1588          this.authored = new DateTimeType(); // bb
1589      return this.authored;
1590    }
1591
1592    public boolean hasAuthoredElement() { 
1593      return this.authored != null && !this.authored.isEmpty();
1594    }
1595
1596    public boolean hasAuthored() { 
1597      return this.authored != null && !this.authored.isEmpty();
1598    }
1599
1600    /**
1601     * @param value {@link #authored} (The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value
1602     */
1603    public QuestionnaireResponse setAuthoredElement(DateTimeType value) { 
1604      this.authored = value;
1605      return this;
1606    }
1607
1608    /**
1609     * @return The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.
1610     */
1611    public Date getAuthored() { 
1612      return this.authored == null ? null : this.authored.getValue();
1613    }
1614
1615    /**
1616     * @param value The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.
1617     */
1618    public QuestionnaireResponse setAuthored(Date value) { 
1619      if (value == null)
1620        this.authored = null;
1621      else {
1622        if (this.authored == null)
1623          this.authored = new DateTimeType();
1624        this.authored.setValue(value);
1625      }
1626      return this;
1627    }
1628
1629    /**
1630     * @return {@link #author} (The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system.)
1631     */
1632    public Reference getAuthor() { 
1633      if (this.author == null)
1634        if (Configuration.errorOnAutoCreate())
1635          throw new Error("Attempt to auto-create QuestionnaireResponse.author");
1636        else if (Configuration.doAutoCreate())
1637          this.author = new Reference(); // cc
1638      return this.author;
1639    }
1640
1641    public boolean hasAuthor() { 
1642      return this.author != null && !this.author.isEmpty();
1643    }
1644
1645    /**
1646     * @param value {@link #author} (The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system.)
1647     */
1648    public QuestionnaireResponse setAuthor(Reference value) { 
1649      this.author = value;
1650      return this;
1651    }
1652
1653    /**
1654     * @return {@link #source} (The individual or device that answered the questions about the subject.)
1655     */
1656    public Reference getSource() { 
1657      if (this.source == null)
1658        if (Configuration.errorOnAutoCreate())
1659          throw new Error("Attempt to auto-create QuestionnaireResponse.source");
1660        else if (Configuration.doAutoCreate())
1661          this.source = new Reference(); // cc
1662      return this.source;
1663    }
1664
1665    public boolean hasSource() { 
1666      return this.source != null && !this.source.isEmpty();
1667    }
1668
1669    /**
1670     * @param value {@link #source} (The individual or device that answered the questions about the subject.)
1671     */
1672    public QuestionnaireResponse setSource(Reference value) { 
1673      this.source = value;
1674      return this;
1675    }
1676
1677    /**
1678     * @return {@link #item} (A group or question item from the original questionnaire for which answers are provided.)
1679     */
1680    public List<QuestionnaireResponseItemComponent> getItem() { 
1681      if (this.item == null)
1682        this.item = new ArrayList<QuestionnaireResponseItemComponent>();
1683      return this.item;
1684    }
1685
1686    /**
1687     * @return Returns a reference to <code>this</code> for easy method chaining
1688     */
1689    public QuestionnaireResponse setItem(List<QuestionnaireResponseItemComponent> theItem) { 
1690      this.item = theItem;
1691      return this;
1692    }
1693
1694    public boolean hasItem() { 
1695      if (this.item == null)
1696        return false;
1697      for (QuestionnaireResponseItemComponent item : this.item)
1698        if (!item.isEmpty())
1699          return true;
1700      return false;
1701    }
1702
1703    public QuestionnaireResponseItemComponent addItem() { //3
1704      QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent();
1705      if (this.item == null)
1706        this.item = new ArrayList<QuestionnaireResponseItemComponent>();
1707      this.item.add(t);
1708      return t;
1709    }
1710
1711    public QuestionnaireResponse addItem(QuestionnaireResponseItemComponent t) { //3
1712      if (t == null)
1713        return this;
1714      if (this.item == null)
1715        this.item = new ArrayList<QuestionnaireResponseItemComponent>();
1716      this.item.add(t);
1717      return this;
1718    }
1719
1720    /**
1721     * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist {3}
1722     */
1723    public QuestionnaireResponseItemComponent getItemFirstRep() { 
1724      if (getItem().isEmpty()) {
1725        addItem();
1726      }
1727      return getItem().get(0);
1728    }
1729
1730      protected void listChildren(List<Property> children) {
1731        super.listChildren(children);
1732        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this questionnaire response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
1733        children.add(new Property("basedOn", "Reference(CarePlan|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.", 0, java.lang.Integer.MAX_VALUE, basedOn));
1734        children.add(new Property("partOf", "Reference(Observation|Procedure)", "A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of.", 0, java.lang.Integer.MAX_VALUE, partOf));
1735        children.add(new Property("questionnaire", "canonical(Questionnaire)", "The Questionnaire that defines and organizes the questions for which answers are being provided.", 0, 1, questionnaire));
1736        children.add(new Property("status", "code", "The current state of the questionnaire response.", 0, 1, status));
1737        children.add(new Property("subject", "Reference(Any)", "The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.", 0, 1, subject));
1738        children.add(new Property("encounter", "Reference(Encounter)", "The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.", 0, 1, encounter));
1739        children.add(new Property("authored", "dateTime", "The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.", 0, 1, authored));
1740        children.add(new Property("author", "Reference(Device|Practitioner|PractitionerRole|Patient|RelatedPerson|Organization)", "The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system.", 0, 1, author));
1741        children.add(new Property("source", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The individual or device that answered the questions about the subject.", 0, 1, source));
1742        children.add(new Property("item", "", "A group or question item from the original questionnaire for which answers are provided.", 0, java.lang.Integer.MAX_VALUE, item));
1743      }
1744
1745      @Override
1746      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1747        switch (_hash) {
1748        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this questionnaire response by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
1749        case -332612366: /*basedOn*/  return new Property("basedOn", "Reference(CarePlan|ServiceRequest)", "A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.", 0, java.lang.Integer.MAX_VALUE, basedOn);
1750        case -995410646: /*partOf*/  return new Property("partOf", "Reference(Observation|Procedure)", "A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of.", 0, java.lang.Integer.MAX_VALUE, partOf);
1751        case -1017049693: /*questionnaire*/  return new Property("questionnaire", "canonical(Questionnaire)", "The Questionnaire that defines and organizes the questions for which answers are being provided.", 0, 1, questionnaire);
1752        case -892481550: /*status*/  return new Property("status", "code", "The current state of the questionnaire response.", 0, 1, status);
1753        case -1867885268: /*subject*/  return new Property("subject", "Reference(Any)", "The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.", 0, 1, subject);
1754        case 1524132147: /*encounter*/  return new Property("encounter", "Reference(Encounter)", "The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.", 0, 1, encounter);
1755        case 1433073514: /*authored*/  return new Property("authored", "dateTime", "The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.", 0, 1, authored);
1756        case -1406328437: /*author*/  return new Property("author", "Reference(Device|Practitioner|PractitionerRole|Patient|RelatedPerson|Organization)", "The individual or device that received the answers to the questions in the QuestionnaireResponse and recorded them in the system.", 0, 1, author);
1757        case -896505829: /*source*/  return new Property("source", "Reference(Device|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The individual or device that answered the questions about the subject.", 0, 1, source);
1758        case 3242771: /*item*/  return new Property("item", "", "A group or question item from the original questionnaire for which answers are provided.", 0, java.lang.Integer.MAX_VALUE, item);
1759        default: return super.getNamedProperty(_hash, _name, _checkValid);
1760        }
1761
1762      }
1763
1764      @Override
1765      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1766        switch (hash) {
1767        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1768        case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference
1769        case -995410646: /*partOf*/ return this.partOf == null ? new Base[0] : this.partOf.toArray(new Base[this.partOf.size()]); // Reference
1770        case -1017049693: /*questionnaire*/ return this.questionnaire == null ? new Base[0] : new Base[] {this.questionnaire}; // CanonicalType
1771        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<QuestionnaireResponseStatus>
1772        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference
1773        case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference
1774        case 1433073514: /*authored*/ return this.authored == null ? new Base[0] : new Base[] {this.authored}; // DateTimeType
1775        case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference
1776        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference
1777        case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent
1778        default: return super.getProperty(hash, name, checkValid);
1779        }
1780
1781      }
1782
1783      @Override
1784      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1785        switch (hash) {
1786        case -1618432855: // identifier
1787          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1788          return value;
1789        case -332612366: // basedOn
1790          this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference
1791          return value;
1792        case -995410646: // partOf
1793          this.getPartOf().add(TypeConvertor.castToReference(value)); // Reference
1794          return value;
1795        case -1017049693: // questionnaire
1796          this.questionnaire = TypeConvertor.castToCanonical(value); // CanonicalType
1797          return value;
1798        case -892481550: // status
1799          value = new QuestionnaireResponseStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1800          this.status = (Enumeration) value; // Enumeration<QuestionnaireResponseStatus>
1801          return value;
1802        case -1867885268: // subject
1803          this.subject = TypeConvertor.castToReference(value); // Reference
1804          return value;
1805        case 1524132147: // encounter
1806          this.encounter = TypeConvertor.castToReference(value); // Reference
1807          return value;
1808        case 1433073514: // authored
1809          this.authored = TypeConvertor.castToDateTime(value); // DateTimeType
1810          return value;
1811        case -1406328437: // author
1812          this.author = TypeConvertor.castToReference(value); // Reference
1813          return value;
1814        case -896505829: // source
1815          this.source = TypeConvertor.castToReference(value); // Reference
1816          return value;
1817        case 3242771: // item
1818          this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent
1819          return value;
1820        default: return super.setProperty(hash, name, value);
1821        }
1822
1823      }
1824
1825      @Override
1826      public Base setProperty(String name, Base value) throws FHIRException {
1827        if (name.equals("identifier")) {
1828          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1829        } else if (name.equals("basedOn")) {
1830          this.getBasedOn().add(TypeConvertor.castToReference(value));
1831        } else if (name.equals("partOf")) {
1832          this.getPartOf().add(TypeConvertor.castToReference(value));
1833        } else if (name.equals("questionnaire")) {
1834          this.questionnaire = TypeConvertor.castToCanonical(value); // CanonicalType
1835        } else if (name.equals("status")) {
1836          value = new QuestionnaireResponseStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1837          this.status = (Enumeration) value; // Enumeration<QuestionnaireResponseStatus>
1838        } else if (name.equals("subject")) {
1839          this.subject = TypeConvertor.castToReference(value); // Reference
1840        } else if (name.equals("encounter")) {
1841          this.encounter = TypeConvertor.castToReference(value); // Reference
1842        } else if (name.equals("authored")) {
1843          this.authored = TypeConvertor.castToDateTime(value); // DateTimeType
1844        } else if (name.equals("author")) {
1845          this.author = TypeConvertor.castToReference(value); // Reference
1846        } else if (name.equals("source")) {
1847          this.source = TypeConvertor.castToReference(value); // Reference
1848        } else if (name.equals("item")) {
1849          this.getItem().add((QuestionnaireResponseItemComponent) value);
1850        } else
1851          return super.setProperty(name, value);
1852        return value;
1853      }
1854
1855  @Override
1856  public void removeChild(String name, Base value) throws FHIRException {
1857        if (name.equals("identifier")) {
1858          this.getIdentifier().remove(value);
1859        } else if (name.equals("basedOn")) {
1860          this.getBasedOn().remove(value);
1861        } else if (name.equals("partOf")) {
1862          this.getPartOf().remove(value);
1863        } else if (name.equals("questionnaire")) {
1864          this.questionnaire = null;
1865        } else if (name.equals("status")) {
1866          value = new QuestionnaireResponseStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
1867          this.status = (Enumeration) value; // Enumeration<QuestionnaireResponseStatus>
1868        } else if (name.equals("subject")) {
1869          this.subject = null;
1870        } else if (name.equals("encounter")) {
1871          this.encounter = null;
1872        } else if (name.equals("authored")) {
1873          this.authored = null;
1874        } else if (name.equals("author")) {
1875          this.author = null;
1876        } else if (name.equals("source")) {
1877          this.source = null;
1878        } else if (name.equals("item")) {
1879          this.getItem().remove((QuestionnaireResponseItemComponent) value);
1880        } else
1881          super.removeChild(name, value);
1882        
1883      }
1884
1885      @Override
1886      public Base makeProperty(int hash, String name) throws FHIRException {
1887        switch (hash) {
1888        case -1618432855:  return addIdentifier(); 
1889        case -332612366:  return addBasedOn(); 
1890        case -995410646:  return addPartOf(); 
1891        case -1017049693:  return getQuestionnaireElement();
1892        case -892481550:  return getStatusElement();
1893        case -1867885268:  return getSubject();
1894        case 1524132147:  return getEncounter();
1895        case 1433073514:  return getAuthoredElement();
1896        case -1406328437:  return getAuthor();
1897        case -896505829:  return getSource();
1898        case 3242771:  return addItem(); 
1899        default: return super.makeProperty(hash, name);
1900        }
1901
1902      }
1903
1904      @Override
1905      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1906        switch (hash) {
1907        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1908        case -332612366: /*basedOn*/ return new String[] {"Reference"};
1909        case -995410646: /*partOf*/ return new String[] {"Reference"};
1910        case -1017049693: /*questionnaire*/ return new String[] {"canonical"};
1911        case -892481550: /*status*/ return new String[] {"code"};
1912        case -1867885268: /*subject*/ return new String[] {"Reference"};
1913        case 1524132147: /*encounter*/ return new String[] {"Reference"};
1914        case 1433073514: /*authored*/ return new String[] {"dateTime"};
1915        case -1406328437: /*author*/ return new String[] {"Reference"};
1916        case -896505829: /*source*/ return new String[] {"Reference"};
1917        case 3242771: /*item*/ return new String[] {};
1918        default: return super.getTypesForProperty(hash, name);
1919        }
1920
1921      }
1922
1923      @Override
1924      public Base addChild(String name) throws FHIRException {
1925        if (name.equals("identifier")) {
1926          return addIdentifier();
1927        }
1928        else if (name.equals("basedOn")) {
1929          return addBasedOn();
1930        }
1931        else if (name.equals("partOf")) {
1932          return addPartOf();
1933        }
1934        else if (name.equals("questionnaire")) {
1935          throw new FHIRException("Cannot call addChild on a singleton property QuestionnaireResponse.questionnaire");
1936        }
1937        else if (name.equals("status")) {
1938          throw new FHIRException("Cannot call addChild on a singleton property QuestionnaireResponse.status");
1939        }
1940        else if (name.equals("subject")) {
1941          this.subject = new Reference();
1942          return this.subject;
1943        }
1944        else if (name.equals("encounter")) {
1945          this.encounter = new Reference();
1946          return this.encounter;
1947        }
1948        else if (name.equals("authored")) {
1949          throw new FHIRException("Cannot call addChild on a singleton property QuestionnaireResponse.authored");
1950        }
1951        else if (name.equals("author")) {
1952          this.author = new Reference();
1953          return this.author;
1954        }
1955        else if (name.equals("source")) {
1956          this.source = new Reference();
1957          return this.source;
1958        }
1959        else if (name.equals("item")) {
1960          return addItem();
1961        }
1962        else
1963          return super.addChild(name);
1964      }
1965
1966  public String fhirType() {
1967    return "QuestionnaireResponse";
1968
1969  }
1970
1971      public QuestionnaireResponse copy() {
1972        QuestionnaireResponse dst = new QuestionnaireResponse();
1973        copyValues(dst);
1974        return dst;
1975      }
1976
1977      public void copyValues(QuestionnaireResponse dst) {
1978        super.copyValues(dst);
1979        if (identifier != null) {
1980          dst.identifier = new ArrayList<Identifier>();
1981          for (Identifier i : identifier)
1982            dst.identifier.add(i.copy());
1983        };
1984        if (basedOn != null) {
1985          dst.basedOn = new ArrayList<Reference>();
1986          for (Reference i : basedOn)
1987            dst.basedOn.add(i.copy());
1988        };
1989        if (partOf != null) {
1990          dst.partOf = new ArrayList<Reference>();
1991          for (Reference i : partOf)
1992            dst.partOf.add(i.copy());
1993        };
1994        dst.questionnaire = questionnaire == null ? null : questionnaire.copy();
1995        dst.status = status == null ? null : status.copy();
1996        dst.subject = subject == null ? null : subject.copy();
1997        dst.encounter = encounter == null ? null : encounter.copy();
1998        dst.authored = authored == null ? null : authored.copy();
1999        dst.author = author == null ? null : author.copy();
2000        dst.source = source == null ? null : source.copy();
2001        if (item != null) {
2002          dst.item = new ArrayList<QuestionnaireResponseItemComponent>();
2003          for (QuestionnaireResponseItemComponent i : item)
2004            dst.item.add(i.copy());
2005        };
2006      }
2007
2008      protected QuestionnaireResponse typedCopy() {
2009        return copy();
2010      }
2011
2012      @Override
2013      public boolean equalsDeep(Base other_) {
2014        if (!super.equalsDeep(other_))
2015          return false;
2016        if (!(other_ instanceof QuestionnaireResponse))
2017          return false;
2018        QuestionnaireResponse o = (QuestionnaireResponse) other_;
2019        return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(partOf, o.partOf, true)
2020           && compareDeep(questionnaire, o.questionnaire, true) && compareDeep(status, o.status, true) && compareDeep(subject, o.subject, true)
2021           && compareDeep(encounter, o.encounter, true) && compareDeep(authored, o.authored, true) && compareDeep(author, o.author, true)
2022           && compareDeep(source, o.source, true) && compareDeep(item, o.item, true);
2023      }
2024
2025      @Override
2026      public boolean equalsShallow(Base other_) {
2027        if (!super.equalsShallow(other_))
2028          return false;
2029        if (!(other_ instanceof QuestionnaireResponse))
2030          return false;
2031        QuestionnaireResponse o = (QuestionnaireResponse) other_;
2032        return compareValues(questionnaire, o.questionnaire, true) && compareValues(status, o.status, true)
2033           && compareValues(authored, o.authored, true);
2034      }
2035
2036      public boolean isEmpty() {
2037        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, partOf
2038          , questionnaire, status, subject, encounter, authored, author, source, item
2039          );
2040      }
2041
2042  @Override
2043  public ResourceType getResourceType() {
2044    return ResourceType.QuestionnaireResponse;
2045   }
2046
2047 /**
2048   * Search parameter: <b>author</b>
2049   * <p>
2050   * Description: <b>The author of the questionnaire response</b><br>
2051   * Type: <b>reference</b><br>
2052   * Path: <b>QuestionnaireResponse.author</b><br>
2053   * </p>
2054   */
2055  @SearchParamDefinition(name="author", path="QuestionnaireResponse.author", description="The author of the questionnaire response", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2056  public static final String SP_AUTHOR = "author";
2057 /**
2058   * <b>Fluent Client</b> search parameter constant for <b>author</b>
2059   * <p>
2060   * Description: <b>The author of the questionnaire response</b><br>
2061   * Type: <b>reference</b><br>
2062   * Path: <b>QuestionnaireResponse.author</b><br>
2063   * </p>
2064   */
2065  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR);
2066
2067/**
2068   * Constant for fluent queries to be used to add include statements. Specifies
2069   * the path value of "<b>QuestionnaireResponse:author</b>".
2070   */
2071  public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:author").toLocked();
2072
2073 /**
2074   * Search parameter: <b>authored</b>
2075   * <p>
2076   * Description: <b>When the questionnaire response was last changed</b><br>
2077   * Type: <b>date</b><br>
2078   * Path: <b>QuestionnaireResponse.authored</b><br>
2079   * </p>
2080   */
2081  @SearchParamDefinition(name="authored", path="QuestionnaireResponse.authored", description="When the questionnaire response was last changed", type="date" )
2082  public static final String SP_AUTHORED = "authored";
2083 /**
2084   * <b>Fluent Client</b> search parameter constant for <b>authored</b>
2085   * <p>
2086   * Description: <b>When the questionnaire response was last changed</b><br>
2087   * Type: <b>date</b><br>
2088   * Path: <b>QuestionnaireResponse.authored</b><br>
2089   * </p>
2090   */
2091  public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED);
2092
2093 /**
2094   * Search parameter: <b>based-on</b>
2095   * <p>
2096   * Description: <b>Plan/proposal/order fulfilled by this questionnaire response</b><br>
2097   * Type: <b>reference</b><br>
2098   * Path: <b>QuestionnaireResponse.basedOn</b><br>
2099   * </p>
2100   */
2101  @SearchParamDefinition(name="based-on", path="QuestionnaireResponse.basedOn", description="Plan/proposal/order fulfilled by this questionnaire response", type="reference", target={CarePlan.class, ServiceRequest.class } )
2102  public static final String SP_BASED_ON = "based-on";
2103 /**
2104   * <b>Fluent Client</b> search parameter constant for <b>based-on</b>
2105   * <p>
2106   * Description: <b>Plan/proposal/order fulfilled by this questionnaire response</b><br>
2107   * Type: <b>reference</b><br>
2108   * Path: <b>QuestionnaireResponse.basedOn</b><br>
2109   * </p>
2110   */
2111  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON);
2112
2113/**
2114   * Constant for fluent queries to be used to add include statements. Specifies
2115   * the path value of "<b>QuestionnaireResponse:based-on</b>".
2116   */
2117  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:based-on").toLocked();
2118
2119 /**
2120   * Search parameter: <b>item-subject</b>
2121   * <p>
2122   * Description: <b>Allows searching for QuestionnaireResponses by item value where the item has isSubject=true</b><br>
2123   * Type: <b>reference</b><br>
2124   * Path: <b>QuestionnaireResponse.item.where(extension('http://hl7.org/fhir/StructureDefinition/questionnaireresponse-isSubject').exists()).answer.value.ofType(Reference)</b><br>
2125   * </p>
2126   */
2127  @SearchParamDefinition(name="item-subject", path="QuestionnaireResponse.item.where(extension('http://hl7.org/fhir/StructureDefinition/questionnaireresponse-isSubject').exists()).answer.value.ofType(Reference)", description="Allows searching for QuestionnaireResponses by item value where the item has isSubject=true", type="reference", target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2128  public static final String SP_ITEM_SUBJECT = "item-subject";
2129 /**
2130   * <b>Fluent Client</b> search parameter constant for <b>item-subject</b>
2131   * <p>
2132   * Description: <b>Allows searching for QuestionnaireResponses by item value where the item has isSubject=true</b><br>
2133   * Type: <b>reference</b><br>
2134   * Path: <b>QuestionnaireResponse.item.where(extension('http://hl7.org/fhir/StructureDefinition/questionnaireresponse-isSubject').exists()).answer.value.ofType(Reference)</b><br>
2135   * </p>
2136   */
2137  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ITEM_SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ITEM_SUBJECT);
2138
2139/**
2140   * Constant for fluent queries to be used to add include statements. Specifies
2141   * the path value of "<b>QuestionnaireResponse:item-subject</b>".
2142   */
2143  public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM_SUBJECT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:item-subject").toLocked();
2144
2145 /**
2146   * Search parameter: <b>part-of</b>
2147   * <p>
2148   * Description: <b>Procedure or observation this questionnaire response was performed as a part of</b><br>
2149   * Type: <b>reference</b><br>
2150   * Path: <b>QuestionnaireResponse.partOf</b><br>
2151   * </p>
2152   */
2153  @SearchParamDefinition(name="part-of", path="QuestionnaireResponse.partOf", description="Procedure or observation this questionnaire response was performed as a part of", type="reference", target={Observation.class, Procedure.class } )
2154  public static final String SP_PART_OF = "part-of";
2155 /**
2156   * <b>Fluent Client</b> search parameter constant for <b>part-of</b>
2157   * <p>
2158   * Description: <b>Procedure or observation this questionnaire response was performed as a part of</b><br>
2159   * Type: <b>reference</b><br>
2160   * Path: <b>QuestionnaireResponse.partOf</b><br>
2161   * </p>
2162   */
2163  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PART_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PART_OF);
2164
2165/**
2166   * Constant for fluent queries to be used to add include statements. Specifies
2167   * the path value of "<b>QuestionnaireResponse:part-of</b>".
2168   */
2169  public static final ca.uhn.fhir.model.api.Include INCLUDE_PART_OF = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:part-of").toLocked();
2170
2171 /**
2172   * Search parameter: <b>questionnaire</b>
2173   * <p>
2174   * Description: <b>The questionnaire the answers are provided for</b><br>
2175   * Type: <b>reference</b><br>
2176   * Path: <b>QuestionnaireResponse.questionnaire</b><br>
2177   * </p>
2178   */
2179  @SearchParamDefinition(name="questionnaire", path="QuestionnaireResponse.questionnaire", description="The questionnaire the answers are provided for", type="reference", target={Questionnaire.class } )
2180  public static final String SP_QUESTIONNAIRE = "questionnaire";
2181 /**
2182   * <b>Fluent Client</b> search parameter constant for <b>questionnaire</b>
2183   * <p>
2184   * Description: <b>The questionnaire the answers are provided for</b><br>
2185   * Type: <b>reference</b><br>
2186   * Path: <b>QuestionnaireResponse.questionnaire</b><br>
2187   * </p>
2188   */
2189  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam QUESTIONNAIRE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_QUESTIONNAIRE);
2190
2191/**
2192   * Constant for fluent queries to be used to add include statements. Specifies
2193   * the path value of "<b>QuestionnaireResponse:questionnaire</b>".
2194   */
2195  public static final ca.uhn.fhir.model.api.Include INCLUDE_QUESTIONNAIRE = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:questionnaire").toLocked();
2196
2197 /**
2198   * Search parameter: <b>source</b>
2199   * <p>
2200   * Description: <b>The individual providing the information reflected in the questionnaire respose</b><br>
2201   * Type: <b>reference</b><br>
2202   * Path: <b>QuestionnaireResponse.source</b><br>
2203   * </p>
2204   */
2205  @SearchParamDefinition(name="source", path="QuestionnaireResponse.source", description="The individual providing the information reflected in the questionnaire respose", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for RelatedPerson") }, target={Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } )
2206  public static final String SP_SOURCE = "source";
2207 /**
2208   * <b>Fluent Client</b> search parameter constant for <b>source</b>
2209   * <p>
2210   * Description: <b>The individual providing the information reflected in the questionnaire respose</b><br>
2211   * Type: <b>reference</b><br>
2212   * Path: <b>QuestionnaireResponse.source</b><br>
2213   * </p>
2214   */
2215  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE);
2216
2217/**
2218   * Constant for fluent queries to be used to add include statements. Specifies
2219   * the path value of "<b>QuestionnaireResponse:source</b>".
2220   */
2221  public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:source").toLocked();
2222
2223 /**
2224   * Search parameter: <b>status</b>
2225   * <p>
2226   * Description: <b>The status of the questionnaire response</b><br>
2227   * Type: <b>token</b><br>
2228   * Path: <b>QuestionnaireResponse.status</b><br>
2229   * </p>
2230   */
2231  @SearchParamDefinition(name="status", path="QuestionnaireResponse.status", description="The status of the questionnaire response", type="token" )
2232  public static final String SP_STATUS = "status";
2233 /**
2234   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2235   * <p>
2236   * Description: <b>The status of the questionnaire response</b><br>
2237   * Type: <b>token</b><br>
2238   * Path: <b>QuestionnaireResponse.status</b><br>
2239   * </p>
2240   */
2241  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2242
2243 /**
2244   * Search parameter: <b>subject</b>
2245   * <p>
2246   * Description: <b>The subject of the questionnaire response</b><br>
2247   * Type: <b>reference</b><br>
2248   * Path: <b>QuestionnaireResponse.subject</b><br>
2249   * </p>
2250   */
2251  @SearchParamDefinition(name="subject", path="QuestionnaireResponse.subject", description="The subject of the questionnaire response", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Account.class, ActivityDefinition.class, ActorDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BiologicallyDerivedProductDispense.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceAssociation.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentReference.class, Encounter.class, EncounterHistory.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, FormularyItem.class, GenomicStudy.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryItem.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationStatement.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Parameters.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestOrchestration.class, Requirements.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestPlan.class, TestReport.class, TestScript.class, Transport.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
2252  public static final String SP_SUBJECT = "subject";
2253 /**
2254   * <b>Fluent Client</b> search parameter constant for <b>subject</b>
2255   * <p>
2256   * Description: <b>The subject of the questionnaire response</b><br>
2257   * Type: <b>reference</b><br>
2258   * Path: <b>QuestionnaireResponse.subject</b><br>
2259   * </p>
2260   */
2261  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT);
2262
2263/**
2264   * Constant for fluent queries to be used to add include statements. Specifies
2265   * the path value of "<b>QuestionnaireResponse:subject</b>".
2266   */
2267  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:subject").toLocked();
2268
2269 /**
2270   * Search parameter: <b>encounter</b>
2271   * <p>
2272   * Description: <b>Multiple Resources: 
2273
2274* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2275* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2276* [ChargeItem](chargeitem.html): Encounter associated with event
2277* [Claim](claim.html): Encounters associated with a billed line item
2278* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2279* [Communication](communication.html): The Encounter during which this Communication was created
2280* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2281* [Composition](composition.html): Context of the Composition
2282* [Condition](condition.html): The Encounter during which this Condition was created
2283* [DeviceRequest](devicerequest.html): Encounter during which request was created
2284* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2285* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2286* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2287* [Flag](flag.html): Alert relevant during encounter
2288* [ImagingStudy](imagingstudy.html): The context of the study
2289* [List](list.html): Context in which list created
2290* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2291* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2292* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2293* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2294* [Observation](observation.html): Encounter related to the observation
2295* [Procedure](procedure.html): The Encounter during which this Procedure was created
2296* [Provenance](provenance.html): Encounter related to the Provenance
2297* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2298* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2299* [RiskAssessment](riskassessment.html): Where was assessment performed?
2300* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2301* [Task](task.html): Search by encounter
2302* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2303</b><br>
2304   * Type: <b>reference</b><br>
2305   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2306   * </p>
2307   */
2308  @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } )
2309  public static final String SP_ENCOUNTER = "encounter";
2310 /**
2311   * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
2312   * <p>
2313   * Description: <b>Multiple Resources: 
2314
2315* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent
2316* [CarePlan](careplan.html): The Encounter during which this CarePlan was created
2317* [ChargeItem](chargeitem.html): Encounter associated with event
2318* [Claim](claim.html): Encounters associated with a billed line item
2319* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created
2320* [Communication](communication.html): The Encounter during which this Communication was created
2321* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created
2322* [Composition](composition.html): Context of the Composition
2323* [Condition](condition.html): The Encounter during which this Condition was created
2324* [DeviceRequest](devicerequest.html): Encounter during which request was created
2325* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made
2326* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values
2327* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item
2328* [Flag](flag.html): Alert relevant during encounter
2329* [ImagingStudy](imagingstudy.html): The context of the study
2330* [List](list.html): Context in which list created
2331* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter
2332* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter
2333* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter
2334* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier
2335* [Observation](observation.html): Encounter related to the observation
2336* [Procedure](procedure.html): The Encounter during which this Procedure was created
2337* [Provenance](provenance.html): Encounter related to the Provenance
2338* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response
2339* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to
2340* [RiskAssessment](riskassessment.html): Where was assessment performed?
2341* [ServiceRequest](servicerequest.html): An encounter in which this request is made
2342* [Task](task.html): Search by encounter
2343* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier
2344</b><br>
2345   * Type: <b>reference</b><br>
2346   * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br>
2347   * </p>
2348   */
2349  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER);
2350
2351/**
2352   * Constant for fluent queries to be used to add include statements. Specifies
2353   * the path value of "<b>QuestionnaireResponse:encounter</b>".
2354   */
2355  public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:encounter").toLocked();
2356
2357 /**
2358   * Search parameter: <b>identifier</b>
2359   * <p>
2360   * Description: <b>Multiple Resources: 
2361
2362* [Account](account.html): Account number
2363* [AdverseEvent](adverseevent.html): Business identifier for the event
2364* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2365* [Appointment](appointment.html): An Identifier of the Appointment
2366* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2367* [Basic](basic.html): Business identifier
2368* [BodyStructure](bodystructure.html): Bodystructure identifier
2369* [CarePlan](careplan.html): External Ids for this plan
2370* [CareTeam](careteam.html): External Ids for this team
2371* [ChargeItem](chargeitem.html): Business Identifier for item
2372* [Claim](claim.html): The primary identifier of the financial resource
2373* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2374* [ClinicalImpression](clinicalimpression.html): Business identifier
2375* [Communication](communication.html): Unique identifier
2376* [CommunicationRequest](communicationrequest.html): Unique identifier
2377* [Composition](composition.html): Version-independent identifier for the Composition
2378* [Condition](condition.html): A unique identifier of the condition record
2379* [Consent](consent.html): Identifier for this record (external references)
2380* [Contract](contract.html): The identity of the contract
2381* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2382* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2383* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2384* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2385* [DeviceRequest](devicerequest.html): Business identifier for request/order
2386* [DeviceUsage](deviceusage.html): Search by identifier
2387* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2388* [DocumentReference](documentreference.html): Identifier of the attachment binary
2389* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2390* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2391* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2392* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2393* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2394* [Flag](flag.html): Business identifier
2395* [Goal](goal.html): External Ids for this goal
2396* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2397* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2398* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2399* [Immunization](immunization.html): Business identifier
2400* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2401* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2402* [Invoice](invoice.html): Business Identifier for item
2403* [List](list.html): Business identifier
2404* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2405* [Medication](medication.html): Returns medications with this external identifier
2406* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2407* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2408* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2409* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2410* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2411* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2412* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2413* [Observation](observation.html): The unique id for a particular observation
2414* [Person](person.html): A person Identifier
2415* [Procedure](procedure.html): A unique identifier for a procedure
2416* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2417* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2418* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2419* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2420* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2421* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2422* [Specimen](specimen.html): The unique identifier associated with the specimen
2423* [SupplyDelivery](supplydelivery.html): External identifier
2424* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2425* [Task](task.html): Search for a task instance by its business identifier
2426* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2427</b><br>
2428   * Type: <b>token</b><br>
2429   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2430   * </p>
2431   */
2432  @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" )
2433  public static final String SP_IDENTIFIER = "identifier";
2434 /**
2435   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2436   * <p>
2437   * Description: <b>Multiple Resources: 
2438
2439* [Account](account.html): Account number
2440* [AdverseEvent](adverseevent.html): Business identifier for the event
2441* [AllergyIntolerance](allergyintolerance.html): External ids for this item
2442* [Appointment](appointment.html): An Identifier of the Appointment
2443* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response
2444* [Basic](basic.html): Business identifier
2445* [BodyStructure](bodystructure.html): Bodystructure identifier
2446* [CarePlan](careplan.html): External Ids for this plan
2447* [CareTeam](careteam.html): External Ids for this team
2448* [ChargeItem](chargeitem.html): Business Identifier for item
2449* [Claim](claim.html): The primary identifier of the financial resource
2450* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse
2451* [ClinicalImpression](clinicalimpression.html): Business identifier
2452* [Communication](communication.html): Unique identifier
2453* [CommunicationRequest](communicationrequest.html): Unique identifier
2454* [Composition](composition.html): Version-independent identifier for the Composition
2455* [Condition](condition.html): A unique identifier of the condition record
2456* [Consent](consent.html): Identifier for this record (external references)
2457* [Contract](contract.html): The identity of the contract
2458* [Coverage](coverage.html): The primary identifier of the insured and the coverage
2459* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility
2460* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier
2461* [DetectedIssue](detectedissue.html): Unique id for the detected issue
2462* [DeviceRequest](devicerequest.html): Business identifier for request/order
2463* [DeviceUsage](deviceusage.html): Search by identifier
2464* [DiagnosticReport](diagnosticreport.html): An identifier for the report
2465* [DocumentReference](documentreference.html): Identifier of the attachment binary
2466* [Encounter](encounter.html): Identifier(s) by which this encounter is known
2467* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment
2468* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare
2469* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit
2470* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier
2471* [Flag](flag.html): Business identifier
2472* [Goal](goal.html): External Ids for this goal
2473* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response
2474* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection
2475* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID
2476* [Immunization](immunization.html): Business identifier
2477* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation
2478* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier
2479* [Invoice](invoice.html): Business Identifier for item
2480* [List](list.html): Business identifier
2481* [MeasureReport](measurereport.html): External identifier of the measure report to be returned
2482* [Medication](medication.html): Returns medications with this external identifier
2483* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier
2484* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier
2485* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier
2486* [MedicationStatement](medicationstatement.html): Return statements with this external identifier
2487* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence
2488* [NutritionIntake](nutritionintake.html): Return statements with this external identifier
2489* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier
2490* [Observation](observation.html): The unique id for a particular observation
2491* [Person](person.html): A person Identifier
2492* [Procedure](procedure.html): A unique identifier for a procedure
2493* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response
2494* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson
2495* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration
2496* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study
2497* [RiskAssessment](riskassessment.html): Unique identifier for the assessment
2498* [ServiceRequest](servicerequest.html): Identifiers assigned to this order
2499* [Specimen](specimen.html): The unique identifier associated with the specimen
2500* [SupplyDelivery](supplydelivery.html): External identifier
2501* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest
2502* [Task](task.html): Search for a task instance by its business identifier
2503* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier
2504</b><br>
2505   * Type: <b>token</b><br>
2506   * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br>
2507   * </p>
2508   */
2509  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2510
2511 /**
2512   * Search parameter: <b>patient</b>
2513   * <p>
2514   * Description: <b>Multiple Resources: 
2515
2516* [Account](account.html): The entity that caused the expenses
2517* [AdverseEvent](adverseevent.html): Subject impacted by event
2518* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2519* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2520* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2521* [AuditEvent](auditevent.html): Where the activity involved patient data
2522* [Basic](basic.html): Identifies the focus of this resource
2523* [BodyStructure](bodystructure.html): Who this is about
2524* [CarePlan](careplan.html): Who the care plan is for
2525* [CareTeam](careteam.html): Who care team is for
2526* [ChargeItem](chargeitem.html): Individual service was done for/to
2527* [Claim](claim.html): Patient receiving the products or services
2528* [ClaimResponse](claimresponse.html): The subject of care
2529* [ClinicalImpression](clinicalimpression.html): Patient assessed
2530* [Communication](communication.html): Focus of message
2531* [CommunicationRequest](communicationrequest.html): Focus of message
2532* [Composition](composition.html): Who and/or what the composition is about
2533* [Condition](condition.html): Who has the condition?
2534* [Consent](consent.html): Who the consent applies to
2535* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2536* [Coverage](coverage.html): Retrieve coverages for a patient
2537* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2538* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2539* [DetectedIssue](detectedissue.html): Associated patient
2540* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2541* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2542* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2543* [DocumentReference](documentreference.html): Who/what is the subject of the document
2544* [Encounter](encounter.html): The patient present at the encounter
2545* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2546* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2547* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2548* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2549* [Flag](flag.html): The identity of a subject to list flags for
2550* [Goal](goal.html): Who this goal is intended for
2551* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2552* [ImagingSelection](imagingselection.html): Who the study is about
2553* [ImagingStudy](imagingstudy.html): Who the study is about
2554* [Immunization](immunization.html): The patient for the vaccination record
2555* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2556* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2557* [Invoice](invoice.html): Recipient(s) of goods and services
2558* [List](list.html): If all resources have the same subject
2559* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2560* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2561* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2562* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2563* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2564* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2565* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2566* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2567* [Observation](observation.html): The subject that the observation is about (if patient)
2568* [Person](person.html): The Person links to this Patient
2569* [Procedure](procedure.html): Search by subject - a patient
2570* [Provenance](provenance.html): Where the activity involved patient data
2571* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2572* [RelatedPerson](relatedperson.html): The patient this related person is related to
2573* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2574* [ResearchSubject](researchsubject.html): Who or what is part of study
2575* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2576* [ServiceRequest](servicerequest.html): Search by subject - a patient
2577* [Specimen](specimen.html): The patient the specimen comes from
2578* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2579* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2580* [Task](task.html): Search by patient
2581* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2582</b><br>
2583   * Type: <b>reference</b><br>
2584   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
2585   * </p>
2586   */
2587  @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", target={Patient.class } )
2588  public static final String SP_PATIENT = "patient";
2589 /**
2590   * <b>Fluent Client</b> search parameter constant for <b>patient</b>
2591   * <p>
2592   * Description: <b>Multiple Resources: 
2593
2594* [Account](account.html): The entity that caused the expenses
2595* [AdverseEvent](adverseevent.html): Subject impacted by event
2596* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for
2597* [Appointment](appointment.html): One of the individuals of the appointment is this patient
2598* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient
2599* [AuditEvent](auditevent.html): Where the activity involved patient data
2600* [Basic](basic.html): Identifies the focus of this resource
2601* [BodyStructure](bodystructure.html): Who this is about
2602* [CarePlan](careplan.html): Who the care plan is for
2603* [CareTeam](careteam.html): Who care team is for
2604* [ChargeItem](chargeitem.html): Individual service was done for/to
2605* [Claim](claim.html): Patient receiving the products or services
2606* [ClaimResponse](claimresponse.html): The subject of care
2607* [ClinicalImpression](clinicalimpression.html): Patient assessed
2608* [Communication](communication.html): Focus of message
2609* [CommunicationRequest](communicationrequest.html): Focus of message
2610* [Composition](composition.html): Who and/or what the composition is about
2611* [Condition](condition.html): Who has the condition?
2612* [Consent](consent.html): Who the consent applies to
2613* [Contract](contract.html): The identity of the subject of the contract (if a patient)
2614* [Coverage](coverage.html): Retrieve coverages for a patient
2615* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient
2616* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient
2617* [DetectedIssue](detectedissue.html): Associated patient
2618* [DeviceRequest](devicerequest.html): Individual the service is ordered for
2619* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device
2620* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient
2621* [DocumentReference](documentreference.html): Who/what is the subject of the document
2622* [Encounter](encounter.html): The patient present at the encounter
2623* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled
2624* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care
2625* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient
2626* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for
2627* [Flag](flag.html): The identity of a subject to list flags for
2628* [Goal](goal.html): Who this goal is intended for
2629* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results
2630* [ImagingSelection](imagingselection.html): Who the study is about
2631* [ImagingStudy](imagingstudy.html): Who the study is about
2632* [Immunization](immunization.html): The patient for the vaccination record
2633* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated
2634* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for
2635* [Invoice](invoice.html): Recipient(s) of goods and services
2636* [List](list.html): If all resources have the same subject
2637* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for
2638* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations  for
2639* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses  for
2640* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient
2641* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.
2642* [MolecularSequence](molecularsequence.html): The subject that the sequence is about
2643* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.
2644* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement
2645* [Observation](observation.html): The subject that the observation is about (if patient)
2646* [Person](person.html): The Person links to this Patient
2647* [Procedure](procedure.html): Search by subject - a patient
2648* [Provenance](provenance.html): Where the activity involved patient data
2649* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response
2650* [RelatedPerson](relatedperson.html): The patient this related person is related to
2651* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations
2652* [ResearchSubject](researchsubject.html): Who or what is part of study
2653* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?
2654* [ServiceRequest](servicerequest.html): Search by subject - a patient
2655* [Specimen](specimen.html): The patient the specimen comes from
2656* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied
2657* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined
2658* [Task](task.html): Search by patient
2659* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for
2660</b><br>
2661   * Type: <b>reference</b><br>
2662   * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br>
2663   * </p>
2664   */
2665  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT);
2666
2667/**
2668   * Constant for fluent queries to be used to add include statements. Specifies
2669   * the path value of "<b>QuestionnaireResponse:patient</b>".
2670   */
2671  public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:patient").toLocked();
2672
2673
2674}
2675