001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045/** 046 * 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. 047 */ 048@ResourceDef(name="QuestionnaireResponse", profile="http://hl7.org/fhir/Profile/QuestionnaireResponse") 049public class QuestionnaireResponse extends DomainResource { 050 051 public enum QuestionnaireResponseStatus { 052 /** 053 * This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it. 054 */ 055 INPROGRESS, 056 /** 057 * This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive. 058 */ 059 COMPLETED, 060 /** 061 * This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards. 062 */ 063 AMENDED, 064 /** 065 * This QuestionnaireResponse was entered in error and voided. 066 */ 067 ENTEREDINERROR, 068 /** 069 * This QuestionnaireResponse has been partially filled out with answers, but has been abandoned. It is unknown whether changes or additions are expected to be made to it. 070 */ 071 STOPPED, 072 /** 073 * added to help the parsers with the generic types 074 */ 075 NULL; 076 public static QuestionnaireResponseStatus fromCode(String codeString) throws FHIRException { 077 if (codeString == null || "".equals(codeString)) 078 return null; 079 if ("in-progress".equals(codeString)) 080 return INPROGRESS; 081 if ("completed".equals(codeString)) 082 return COMPLETED; 083 if ("amended".equals(codeString)) 084 return AMENDED; 085 if ("entered-in-error".equals(codeString)) 086 return ENTEREDINERROR; 087 if ("stopped".equals(codeString)) 088 return STOPPED; 089 if (Configuration.isAcceptInvalidEnums()) 090 return null; 091 else 092 throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); 093 } 094 public String toCode() { 095 switch (this) { 096 case INPROGRESS: return "in-progress"; 097 case COMPLETED: return "completed"; 098 case AMENDED: return "amended"; 099 case ENTEREDINERROR: return "entered-in-error"; 100 case STOPPED: return "stopped"; 101 default: return "?"; 102 } 103 } 104 public String getSystem() { 105 switch (this) { 106 case INPROGRESS: return "http://hl7.org/fhir/questionnaire-answers-status"; 107 case COMPLETED: return "http://hl7.org/fhir/questionnaire-answers-status"; 108 case AMENDED: return "http://hl7.org/fhir/questionnaire-answers-status"; 109 case ENTEREDINERROR: return "http://hl7.org/fhir/questionnaire-answers-status"; 110 case STOPPED: return "http://hl7.org/fhir/questionnaire-answers-status"; 111 default: return "?"; 112 } 113 } 114 public String getDefinition() { 115 switch (this) { 116 case INPROGRESS: return "This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it."; 117 case COMPLETED: return "This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive."; 118 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."; 119 case ENTEREDINERROR: return "This QuestionnaireResponse was entered in error and voided."; 120 case STOPPED: return "This QuestionnaireResponse has been partially filled out with answers, but has been abandoned. It is unknown whether changes or additions are expected to be made to it."; 121 default: return "?"; 122 } 123 } 124 public String getDisplay() { 125 switch (this) { 126 case INPROGRESS: return "In Progress"; 127 case COMPLETED: return "Completed"; 128 case AMENDED: return "Amended"; 129 case ENTEREDINERROR: return "Entered in Error"; 130 case STOPPED: return "Stopped"; 131 default: return "?"; 132 } 133 } 134 } 135 136 public static class QuestionnaireResponseStatusEnumFactory implements EnumFactory<QuestionnaireResponseStatus> { 137 public QuestionnaireResponseStatus fromCode(String codeString) throws IllegalArgumentException { 138 if (codeString == null || "".equals(codeString)) 139 if (codeString == null || "".equals(codeString)) 140 return null; 141 if ("in-progress".equals(codeString)) 142 return QuestionnaireResponseStatus.INPROGRESS; 143 if ("completed".equals(codeString)) 144 return QuestionnaireResponseStatus.COMPLETED; 145 if ("amended".equals(codeString)) 146 return QuestionnaireResponseStatus.AMENDED; 147 if ("entered-in-error".equals(codeString)) 148 return QuestionnaireResponseStatus.ENTEREDINERROR; 149 if ("stopped".equals(codeString)) 150 return QuestionnaireResponseStatus.STOPPED; 151 throw new IllegalArgumentException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); 152 } 153 public Enumeration<QuestionnaireResponseStatus> fromType(Base code) throws FHIRException { 154 if (code == null) 155 return null; 156 if (code.isEmpty()) 157 return new Enumeration<QuestionnaireResponseStatus>(this); 158 String codeString = ((PrimitiveType) code).asStringValue(); 159 if (codeString == null || "".equals(codeString)) 160 return null; 161 if ("in-progress".equals(codeString)) 162 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.INPROGRESS); 163 if ("completed".equals(codeString)) 164 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.COMPLETED); 165 if ("amended".equals(codeString)) 166 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.AMENDED); 167 if ("entered-in-error".equals(codeString)) 168 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.ENTEREDINERROR); 169 if ("stopped".equals(codeString)) 170 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.STOPPED); 171 throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); 172 } 173 public String toCode(QuestionnaireResponseStatus code) { 174 if (code == QuestionnaireResponseStatus.INPROGRESS) 175 return "in-progress"; 176 if (code == QuestionnaireResponseStatus.COMPLETED) 177 return "completed"; 178 if (code == QuestionnaireResponseStatus.AMENDED) 179 return "amended"; 180 if (code == QuestionnaireResponseStatus.ENTEREDINERROR) 181 return "entered-in-error"; 182 if (code == QuestionnaireResponseStatus.STOPPED) 183 return "stopped"; 184 return "?"; 185 } 186 public String toSystem(QuestionnaireResponseStatus code) { 187 return code.getSystem(); 188 } 189 } 190 191 @Block() 192 public static class QuestionnaireResponseItemComponent extends BackboneElement implements IBaseBackboneElement { 193 /** 194 * The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. 195 */ 196 @Child(name = "linkId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 197 @Description(shortDefinition="Pointer to specific item from Questionnaire", formalDefinition="The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource." ) 198 protected StringType linkId; 199 200 /** 201 * A reference to an [[[ElementDefinition]]] that provides the details for the item. 202 */ 203 @Child(name = "definition", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) 204 @Description(shortDefinition="ElementDefinition - details for the item", formalDefinition="A reference to an [[[ElementDefinition]]] that provides the details for the item." ) 205 protected UriType definition; 206 207 /** 208 * Text that is displayed above the contents of the group or as the text of the question being answered. 209 */ 210 @Child(name = "text", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 211 @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." ) 212 protected StringType text; 213 214 /** 215 * More specific subject this section's answers are about, details the subject given in QuestionnaireResponse. 216 */ 217 @Child(name = "subject", type = {Reference.class}, order=4, min=0, max=1, modifier=false, summary=false) 218 @Description(shortDefinition="The subject this group's answers are about", formalDefinition="More specific subject this section's answers are about, details the subject given in QuestionnaireResponse." ) 219 protected Reference subject; 220 221 /** 222 * The actual object that is the target of the reference (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) 223 */ 224 protected Resource subjectTarget; 225 226 /** 227 * The respondent's answer(s) to the question. 228 */ 229 @Child(name = "answer", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 230 @Description(shortDefinition="The response(s) to the question", formalDefinition="The respondent's answer(s) to the question." ) 231 protected List<QuestionnaireResponseItemAnswerComponent> answer; 232 233 /** 234 * Questions or sub-groups nested beneath a question or group. 235 */ 236 @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 237 @Description(shortDefinition="Nested questionnaire response items", formalDefinition="Questions or sub-groups nested beneath a question or group." ) 238 protected List<QuestionnaireResponseItemComponent> item; 239 240 private static final long serialVersionUID = -154786340L; 241 242 /** 243 * Constructor 244 */ 245 public QuestionnaireResponseItemComponent() { 246 super(); 247 } 248 249 /** 250 * Constructor 251 */ 252 public QuestionnaireResponseItemComponent(StringType linkId) { 253 super(); 254 this.linkId = linkId; 255 } 256 257 /** 258 * @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 259 */ 260 public StringType getLinkIdElement() { 261 if (this.linkId == null) 262 if (Configuration.errorOnAutoCreate()) 263 throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.linkId"); 264 else if (Configuration.doAutoCreate()) 265 this.linkId = new StringType(); // bb 266 return this.linkId; 267 } 268 269 public boolean hasLinkIdElement() { 270 return this.linkId != null && !this.linkId.isEmpty(); 271 } 272 273 public boolean hasLinkId() { 274 return this.linkId != null && !this.linkId.isEmpty(); 275 } 276 277 /** 278 * @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 279 */ 280 public QuestionnaireResponseItemComponent setLinkIdElement(StringType value) { 281 this.linkId = value; 282 return this; 283 } 284 285 /** 286 * @return The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. 287 */ 288 public String getLinkId() { 289 return this.linkId == null ? null : this.linkId.getValue(); 290 } 291 292 /** 293 * @param value The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. 294 */ 295 public QuestionnaireResponseItemComponent setLinkId(String value) { 296 if (this.linkId == null) 297 this.linkId = new StringType(); 298 this.linkId.setValue(value); 299 return this; 300 } 301 302 /** 303 * @return {@link #definition} (A reference to an [[[ElementDefinition]]] 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 304 */ 305 public UriType getDefinitionElement() { 306 if (this.definition == null) 307 if (Configuration.errorOnAutoCreate()) 308 throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.definition"); 309 else if (Configuration.doAutoCreate()) 310 this.definition = new UriType(); // bb 311 return this.definition; 312 } 313 314 public boolean hasDefinitionElement() { 315 return this.definition != null && !this.definition.isEmpty(); 316 } 317 318 public boolean hasDefinition() { 319 return this.definition != null && !this.definition.isEmpty(); 320 } 321 322 /** 323 * @param value {@link #definition} (A reference to an [[[ElementDefinition]]] 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 324 */ 325 public QuestionnaireResponseItemComponent setDefinitionElement(UriType value) { 326 this.definition = value; 327 return this; 328 } 329 330 /** 331 * @return A reference to an [[[ElementDefinition]]] that provides the details for the item. 332 */ 333 public String getDefinition() { 334 return this.definition == null ? null : this.definition.getValue(); 335 } 336 337 /** 338 * @param value A reference to an [[[ElementDefinition]]] that provides the details for the item. 339 */ 340 public QuestionnaireResponseItemComponent setDefinition(String value) { 341 if (Utilities.noString(value)) 342 this.definition = null; 343 else { 344 if (this.definition == null) 345 this.definition = new UriType(); 346 this.definition.setValue(value); 347 } 348 return this; 349 } 350 351 /** 352 * @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 353 */ 354 public StringType getTextElement() { 355 if (this.text == null) 356 if (Configuration.errorOnAutoCreate()) 357 throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.text"); 358 else if (Configuration.doAutoCreate()) 359 this.text = new StringType(); // bb 360 return this.text; 361 } 362 363 public boolean hasTextElement() { 364 return this.text != null && !this.text.isEmpty(); 365 } 366 367 public boolean hasText() { 368 return this.text != null && !this.text.isEmpty(); 369 } 370 371 /** 372 * @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 373 */ 374 public QuestionnaireResponseItemComponent setTextElement(StringType value) { 375 this.text = value; 376 return this; 377 } 378 379 /** 380 * @return Text that is displayed above the contents of the group or as the text of the question being answered. 381 */ 382 public String getText() { 383 return this.text == null ? null : this.text.getValue(); 384 } 385 386 /** 387 * @param value Text that is displayed above the contents of the group or as the text of the question being answered. 388 */ 389 public QuestionnaireResponseItemComponent setText(String value) { 390 if (Utilities.noString(value)) 391 this.text = null; 392 else { 393 if (this.text == null) 394 this.text = new StringType(); 395 this.text.setValue(value); 396 } 397 return this; 398 } 399 400 /** 401 * @return {@link #subject} (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) 402 */ 403 public Reference getSubject() { 404 if (this.subject == null) 405 if (Configuration.errorOnAutoCreate()) 406 throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.subject"); 407 else if (Configuration.doAutoCreate()) 408 this.subject = new Reference(); // cc 409 return this.subject; 410 } 411 412 public boolean hasSubject() { 413 return this.subject != null && !this.subject.isEmpty(); 414 } 415 416 /** 417 * @param value {@link #subject} (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) 418 */ 419 public QuestionnaireResponseItemComponent setSubject(Reference value) { 420 this.subject = value; 421 return this; 422 } 423 424 /** 425 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) 426 */ 427 public Resource getSubjectTarget() { 428 return this.subjectTarget; 429 } 430 431 /** 432 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) 433 */ 434 public QuestionnaireResponseItemComponent setSubjectTarget(Resource value) { 435 this.subjectTarget = value; 436 return this; 437 } 438 439 /** 440 * @return {@link #answer} (The respondent's answer(s) to the question.) 441 */ 442 public List<QuestionnaireResponseItemAnswerComponent> getAnswer() { 443 if (this.answer == null) 444 this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 445 return this.answer; 446 } 447 448 /** 449 * @return Returns a reference to <code>this</code> for easy method chaining 450 */ 451 public QuestionnaireResponseItemComponent setAnswer(List<QuestionnaireResponseItemAnswerComponent> theAnswer) { 452 this.answer = theAnswer; 453 return this; 454 } 455 456 public boolean hasAnswer() { 457 if (this.answer == null) 458 return false; 459 for (QuestionnaireResponseItemAnswerComponent item : this.answer) 460 if (!item.isEmpty()) 461 return true; 462 return false; 463 } 464 465 public QuestionnaireResponseItemAnswerComponent addAnswer() { //3 466 QuestionnaireResponseItemAnswerComponent t = new QuestionnaireResponseItemAnswerComponent(); 467 if (this.answer == null) 468 this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 469 this.answer.add(t); 470 return t; 471 } 472 473 public QuestionnaireResponseItemComponent addAnswer(QuestionnaireResponseItemAnswerComponent t) { //3 474 if (t == null) 475 return this; 476 if (this.answer == null) 477 this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 478 this.answer.add(t); 479 return this; 480 } 481 482 /** 483 * @return The first repetition of repeating field {@link #answer}, creating it if it does not already exist 484 */ 485 public QuestionnaireResponseItemAnswerComponent getAnswerFirstRep() { 486 if (getAnswer().isEmpty()) { 487 addAnswer(); 488 } 489 return getAnswer().get(0); 490 } 491 492 /** 493 * @return {@link #item} (Questions or sub-groups nested beneath a question or group.) 494 */ 495 public List<QuestionnaireResponseItemComponent> getItem() { 496 if (this.item == null) 497 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 498 return this.item; 499 } 500 501 /** 502 * @return Returns a reference to <code>this</code> for easy method chaining 503 */ 504 public QuestionnaireResponseItemComponent setItem(List<QuestionnaireResponseItemComponent> theItem) { 505 this.item = theItem; 506 return this; 507 } 508 509 public boolean hasItem() { 510 if (this.item == null) 511 return false; 512 for (QuestionnaireResponseItemComponent item : this.item) 513 if (!item.isEmpty()) 514 return true; 515 return false; 516 } 517 518 public QuestionnaireResponseItemComponent addItem() { //3 519 QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); 520 if (this.item == null) 521 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 522 this.item.add(t); 523 return t; 524 } 525 526 public QuestionnaireResponseItemComponent addItem(QuestionnaireResponseItemComponent t) { //3 527 if (t == null) 528 return this; 529 if (this.item == null) 530 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 531 this.item.add(t); 532 return this; 533 } 534 535 /** 536 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist 537 */ 538 public QuestionnaireResponseItemComponent getItemFirstRep() { 539 if (getItem().isEmpty()) { 540 addItem(); 541 } 542 return getItem().get(0); 543 } 544 545 protected void listChildren(List<Property> childrenList) { 546 super.listChildren(childrenList); 547 childrenList.add(new Property("linkId", "string", "The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); 548 childrenList.add(new Property("definition", "uri", "A reference to an [[[ElementDefinition]]] that provides the details for the item.", 0, java.lang.Integer.MAX_VALUE, definition)); 549 childrenList.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, java.lang.Integer.MAX_VALUE, text)); 550 childrenList.add(new Property("subject", "Reference(Any)", "More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, subject)); 551 childrenList.add(new Property("answer", "", "The respondent's answer(s) to the question.", 0, java.lang.Integer.MAX_VALUE, answer)); 552 childrenList.add(new Property("item", "@QuestionnaireResponse.item", "Questions or sub-groups nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item)); 553 } 554 555 @Override 556 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 557 switch (hash) { 558 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : new Base[] {this.linkId}; // StringType 559 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // UriType 560 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 561 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 562 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : this.answer.toArray(new Base[this.answer.size()]); // QuestionnaireResponseItemAnswerComponent 563 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent 564 default: return super.getProperty(hash, name, checkValid); 565 } 566 567 } 568 569 @Override 570 public Base setProperty(int hash, String name, Base value) throws FHIRException { 571 switch (hash) { 572 case -1102667083: // linkId 573 this.linkId = castToString(value); // StringType 574 return value; 575 case -1014418093: // definition 576 this.definition = castToUri(value); // UriType 577 return value; 578 case 3556653: // text 579 this.text = castToString(value); // StringType 580 return value; 581 case -1867885268: // subject 582 this.subject = castToReference(value); // Reference 583 return value; 584 case -1412808770: // answer 585 this.getAnswer().add((QuestionnaireResponseItemAnswerComponent) value); // QuestionnaireResponseItemAnswerComponent 586 return value; 587 case 3242771: // item 588 this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent 589 return value; 590 default: return super.setProperty(hash, name, value); 591 } 592 593 } 594 595 @Override 596 public Base setProperty(String name, Base value) throws FHIRException { 597 if (name.equals("linkId")) { 598 this.linkId = castToString(value); // StringType 599 } else if (name.equals("definition")) { 600 this.definition = castToUri(value); // UriType 601 } else if (name.equals("text")) { 602 this.text = castToString(value); // StringType 603 } else if (name.equals("subject")) { 604 this.subject = castToReference(value); // Reference 605 } else if (name.equals("answer")) { 606 this.getAnswer().add((QuestionnaireResponseItemAnswerComponent) value); 607 } else if (name.equals("item")) { 608 this.getItem().add((QuestionnaireResponseItemComponent) value); 609 } else 610 return super.setProperty(name, value); 611 return value; 612 } 613 614 @Override 615 public Base makeProperty(int hash, String name) throws FHIRException { 616 switch (hash) { 617 case -1102667083: return getLinkIdElement(); 618 case -1014418093: return getDefinitionElement(); 619 case 3556653: return getTextElement(); 620 case -1867885268: return getSubject(); 621 case -1412808770: return addAnswer(); 622 case 3242771: return addItem(); 623 default: return super.makeProperty(hash, name); 624 } 625 626 } 627 628 @Override 629 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 630 switch (hash) { 631 case -1102667083: /*linkId*/ return new String[] {"string"}; 632 case -1014418093: /*definition*/ return new String[] {"uri"}; 633 case 3556653: /*text*/ return new String[] {"string"}; 634 case -1867885268: /*subject*/ return new String[] {"Reference"}; 635 case -1412808770: /*answer*/ return new String[] {}; 636 case 3242771: /*item*/ return new String[] {"@QuestionnaireResponse.item"}; 637 default: return super.getTypesForProperty(hash, name); 638 } 639 640 } 641 642 @Override 643 public Base addChild(String name) throws FHIRException { 644 if (name.equals("linkId")) { 645 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.linkId"); 646 } 647 else if (name.equals("definition")) { 648 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.definition"); 649 } 650 else if (name.equals("text")) { 651 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.text"); 652 } 653 else if (name.equals("subject")) { 654 this.subject = new Reference(); 655 return this.subject; 656 } 657 else if (name.equals("answer")) { 658 return addAnswer(); 659 } 660 else if (name.equals("item")) { 661 return addItem(); 662 } 663 else 664 return super.addChild(name); 665 } 666 667 public QuestionnaireResponseItemComponent copy() { 668 QuestionnaireResponseItemComponent dst = new QuestionnaireResponseItemComponent(); 669 copyValues(dst); 670 dst.linkId = linkId == null ? null : linkId.copy(); 671 dst.definition = definition == null ? null : definition.copy(); 672 dst.text = text == null ? null : text.copy(); 673 dst.subject = subject == null ? null : subject.copy(); 674 if (answer != null) { 675 dst.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 676 for (QuestionnaireResponseItemAnswerComponent i : answer) 677 dst.answer.add(i.copy()); 678 }; 679 if (item != null) { 680 dst.item = new ArrayList<QuestionnaireResponseItemComponent>(); 681 for (QuestionnaireResponseItemComponent i : item) 682 dst.item.add(i.copy()); 683 }; 684 return dst; 685 } 686 687 @Override 688 public boolean equalsDeep(Base other) { 689 if (!super.equalsDeep(other)) 690 return false; 691 if (!(other instanceof QuestionnaireResponseItemComponent)) 692 return false; 693 QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other; 694 return compareDeep(linkId, o.linkId, true) && compareDeep(definition, o.definition, true) && compareDeep(text, o.text, true) 695 && compareDeep(subject, o.subject, true) && compareDeep(answer, o.answer, true) && compareDeep(item, o.item, true) 696 ; 697 } 698 699 @Override 700 public boolean equalsShallow(Base other) { 701 if (!super.equalsShallow(other)) 702 return false; 703 if (!(other instanceof QuestionnaireResponseItemComponent)) 704 return false; 705 QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other; 706 return compareValues(linkId, o.linkId, true) && compareValues(definition, o.definition, true) && compareValues(text, o.text, true) 707 ; 708 } 709 710 public boolean isEmpty() { 711 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(linkId, definition, text 712 , subject, answer, item); 713 } 714 715 public String fhirType() { 716 return "QuestionnaireResponse.item"; 717 718 } 719 720 } 721 722 @Block() 723 public static class QuestionnaireResponseItemAnswerComponent extends BackboneElement implements IBaseBackboneElement { 724 /** 725 * The answer (or one of the answers) provided by the respondent to the question. 726 */ 727 @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=0, max=1, modifier=false, summary=false) 728 @Description(shortDefinition="Single-valued answer to the question", formalDefinition="The answer (or one of the answers) provided by the respondent to the question." ) 729 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-answers") 730 protected Type value; 731 732 /** 733 * Nested groups and/or questions found within this particular answer. 734 */ 735 @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 736 @Description(shortDefinition="Nested groups and questions", formalDefinition="Nested groups and/or questions found within this particular answer." ) 737 protected List<QuestionnaireResponseItemComponent> item; 738 739 private static final long serialVersionUID = 2052422636L; 740 741 /** 742 * Constructor 743 */ 744 public QuestionnaireResponseItemAnswerComponent() { 745 super(); 746 } 747 748 /** 749 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 750 */ 751 public Type getValue() { 752 return this.value; 753 } 754 755 /** 756 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 757 */ 758 public BooleanType getValueBooleanType() throws FHIRException { 759 if (!(this.value instanceof BooleanType)) 760 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 761 return (BooleanType) this.value; 762 } 763 764 public boolean hasValueBooleanType() { 765 return this.value instanceof BooleanType; 766 } 767 768 /** 769 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 770 */ 771 public DecimalType getValueDecimalType() throws FHIRException { 772 if (!(this.value instanceof DecimalType)) 773 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); 774 return (DecimalType) this.value; 775 } 776 777 public boolean hasValueDecimalType() { 778 return this.value instanceof DecimalType; 779 } 780 781 /** 782 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 783 */ 784 public IntegerType getValueIntegerType() throws FHIRException { 785 if (!(this.value instanceof IntegerType)) 786 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 787 return (IntegerType) this.value; 788 } 789 790 public boolean hasValueIntegerType() { 791 return this.value instanceof IntegerType; 792 } 793 794 /** 795 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 796 */ 797 public DateType getValueDateType() throws FHIRException { 798 if (!(this.value instanceof DateType)) 799 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 800 return (DateType) this.value; 801 } 802 803 public boolean hasValueDateType() { 804 return this.value instanceof DateType; 805 } 806 807 /** 808 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 809 */ 810 public DateTimeType getValueDateTimeType() throws FHIRException { 811 if (!(this.value instanceof DateTimeType)) 812 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 813 return (DateTimeType) this.value; 814 } 815 816 public boolean hasValueDateTimeType() { 817 return this.value instanceof DateTimeType; 818 } 819 820 /** 821 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 822 */ 823 public TimeType getValueTimeType() throws FHIRException { 824 if (!(this.value instanceof TimeType)) 825 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 826 return (TimeType) this.value; 827 } 828 829 public boolean hasValueTimeType() { 830 return this.value instanceof TimeType; 831 } 832 833 /** 834 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 835 */ 836 public StringType getValueStringType() throws FHIRException { 837 if (!(this.value instanceof StringType)) 838 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 839 return (StringType) this.value; 840 } 841 842 public boolean hasValueStringType() { 843 return this.value instanceof StringType; 844 } 845 846 /** 847 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 848 */ 849 public UriType getValueUriType() throws FHIRException { 850 if (!(this.value instanceof UriType)) 851 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); 852 return (UriType) this.value; 853 } 854 855 public boolean hasValueUriType() { 856 return this.value instanceof UriType; 857 } 858 859 /** 860 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 861 */ 862 public Attachment getValueAttachment() throws FHIRException { 863 if (!(this.value instanceof Attachment)) 864 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 865 return (Attachment) this.value; 866 } 867 868 public boolean hasValueAttachment() { 869 return this.value instanceof Attachment; 870 } 871 872 /** 873 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 874 */ 875 public Coding getValueCoding() throws FHIRException { 876 if (!(this.value instanceof Coding)) 877 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 878 return (Coding) this.value; 879 } 880 881 public boolean hasValueCoding() { 882 return this.value instanceof Coding; 883 } 884 885 /** 886 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 887 */ 888 public Quantity getValueQuantity() throws FHIRException { 889 if (!(this.value instanceof Quantity)) 890 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 891 return (Quantity) this.value; 892 } 893 894 public boolean hasValueQuantity() { 895 return this.value instanceof Quantity; 896 } 897 898 /** 899 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 900 */ 901 public Reference getValueReference() throws FHIRException { 902 if (!(this.value instanceof Reference)) 903 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 904 return (Reference) this.value; 905 } 906 907 public boolean hasValueReference() { 908 return this.value instanceof Reference; 909 } 910 911 public boolean hasValue() { 912 return this.value != null && !this.value.isEmpty(); 913 } 914 915 /** 916 * @param value {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 917 */ 918 public QuestionnaireResponseItemAnswerComponent setValue(Type value) { 919 this.value = value; 920 return this; 921 } 922 923 /** 924 * @return {@link #item} (Nested groups and/or questions found within this particular answer.) 925 */ 926 public List<QuestionnaireResponseItemComponent> getItem() { 927 if (this.item == null) 928 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 929 return this.item; 930 } 931 932 /** 933 * @return Returns a reference to <code>this</code> for easy method chaining 934 */ 935 public QuestionnaireResponseItemAnswerComponent setItem(List<QuestionnaireResponseItemComponent> theItem) { 936 this.item = theItem; 937 return this; 938 } 939 940 public boolean hasItem() { 941 if (this.item == null) 942 return false; 943 for (QuestionnaireResponseItemComponent item : this.item) 944 if (!item.isEmpty()) 945 return true; 946 return false; 947 } 948 949 public QuestionnaireResponseItemComponent addItem() { //3 950 QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); 951 if (this.item == null) 952 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 953 this.item.add(t); 954 return t; 955 } 956 957 public QuestionnaireResponseItemAnswerComponent addItem(QuestionnaireResponseItemComponent t) { //3 958 if (t == null) 959 return this; 960 if (this.item == null) 961 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 962 this.item.add(t); 963 return this; 964 } 965 966 /** 967 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist 968 */ 969 public QuestionnaireResponseItemComponent getItemFirstRep() { 970 if (getItem().isEmpty()) { 971 addItem(); 972 } 973 return getItem().get(0); 974 } 975 976 protected void listChildren(List<Property> childrenList) { 977 super.listChildren(childrenList); 978 childrenList.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, java.lang.Integer.MAX_VALUE, value)); 979 childrenList.add(new Property("item", "@QuestionnaireResponse.item", "Nested groups and/or questions found within this particular answer.", 0, java.lang.Integer.MAX_VALUE, item)); 980 } 981 982 @Override 983 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 984 switch (hash) { 985 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 986 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent 987 default: return super.getProperty(hash, name, checkValid); 988 } 989 990 } 991 992 @Override 993 public Base setProperty(int hash, String name, Base value) throws FHIRException { 994 switch (hash) { 995 case 111972721: // value 996 this.value = castToType(value); // Type 997 return value; 998 case 3242771: // item 999 this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent 1000 return value; 1001 default: return super.setProperty(hash, name, value); 1002 } 1003 1004 } 1005 1006 @Override 1007 public Base setProperty(String name, Base value) throws FHIRException { 1008 if (name.equals("value[x]")) { 1009 this.value = castToType(value); // Type 1010 } else if (name.equals("item")) { 1011 this.getItem().add((QuestionnaireResponseItemComponent) value); 1012 } else 1013 return super.setProperty(name, value); 1014 return value; 1015 } 1016 1017 @Override 1018 public Base makeProperty(int hash, String name) throws FHIRException { 1019 switch (hash) { 1020 case -1410166417: return getValue(); 1021 case 111972721: return getValue(); 1022 case 3242771: return addItem(); 1023 default: return super.makeProperty(hash, name); 1024 } 1025 1026 } 1027 1028 @Override 1029 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1030 switch (hash) { 1031 case 111972721: /*value*/ return new String[] {"boolean", "decimal", "integer", "date", "dateTime", "time", "string", "uri", "Attachment", "Coding", "Quantity", "Reference"}; 1032 case 3242771: /*item*/ return new String[] {"@QuestionnaireResponse.item"}; 1033 default: return super.getTypesForProperty(hash, name); 1034 } 1035 1036 } 1037 1038 @Override 1039 public Base addChild(String name) throws FHIRException { 1040 if (name.equals("valueBoolean")) { 1041 this.value = new BooleanType(); 1042 return this.value; 1043 } 1044 else if (name.equals("valueDecimal")) { 1045 this.value = new DecimalType(); 1046 return this.value; 1047 } 1048 else if (name.equals("valueInteger")) { 1049 this.value = new IntegerType(); 1050 return this.value; 1051 } 1052 else if (name.equals("valueDate")) { 1053 this.value = new DateType(); 1054 return this.value; 1055 } 1056 else if (name.equals("valueDateTime")) { 1057 this.value = new DateTimeType(); 1058 return this.value; 1059 } 1060 else if (name.equals("valueTime")) { 1061 this.value = new TimeType(); 1062 return this.value; 1063 } 1064 else if (name.equals("valueString")) { 1065 this.value = new StringType(); 1066 return this.value; 1067 } 1068 else if (name.equals("valueUri")) { 1069 this.value = new UriType(); 1070 return this.value; 1071 } 1072 else if (name.equals("valueAttachment")) { 1073 this.value = new Attachment(); 1074 return this.value; 1075 } 1076 else if (name.equals("valueCoding")) { 1077 this.value = new Coding(); 1078 return this.value; 1079 } 1080 else if (name.equals("valueQuantity")) { 1081 this.value = new Quantity(); 1082 return this.value; 1083 } 1084 else if (name.equals("valueReference")) { 1085 this.value = new Reference(); 1086 return this.value; 1087 } 1088 else if (name.equals("item")) { 1089 return addItem(); 1090 } 1091 else 1092 return super.addChild(name); 1093 } 1094 1095 public QuestionnaireResponseItemAnswerComponent copy() { 1096 QuestionnaireResponseItemAnswerComponent dst = new QuestionnaireResponseItemAnswerComponent(); 1097 copyValues(dst); 1098 dst.value = value == null ? null : value.copy(); 1099 if (item != null) { 1100 dst.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1101 for (QuestionnaireResponseItemComponent i : item) 1102 dst.item.add(i.copy()); 1103 }; 1104 return dst; 1105 } 1106 1107 @Override 1108 public boolean equalsDeep(Base other) { 1109 if (!super.equalsDeep(other)) 1110 return false; 1111 if (!(other instanceof QuestionnaireResponseItemAnswerComponent)) 1112 return false; 1113 QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other; 1114 return compareDeep(value, o.value, true) && compareDeep(item, o.item, true); 1115 } 1116 1117 @Override 1118 public boolean equalsShallow(Base other) { 1119 if (!super.equalsShallow(other)) 1120 return false; 1121 if (!(other instanceof QuestionnaireResponseItemAnswerComponent)) 1122 return false; 1123 QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other; 1124 return true; 1125 } 1126 1127 public boolean isEmpty() { 1128 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value, item); 1129 } 1130 1131 public String fhirType() { 1132 return "QuestionnaireResponse.item.answer"; 1133 1134 } 1135 1136 } 1137 1138 /** 1139 * A business identifier assigned to a particular completed (or partially completed) questionnaire. 1140 */ 1141 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 1142 @Description(shortDefinition="Unique id for this set of answers", formalDefinition="A business identifier assigned to a particular completed (or partially completed) questionnaire." ) 1143 protected Identifier identifier; 1144 1145 /** 1146 * The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression. 1147 */ 1148 @Child(name = "basedOn", type = {ReferralRequest.class, CarePlan.class, ProcedureRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1149 @Description(shortDefinition="Request fulfilled by this QuestionnaireResponse", formalDefinition="The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression." ) 1150 protected List<Reference> basedOn; 1151 /** 1152 * The actual objects that are the target of the reference (The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.) 1153 */ 1154 protected List<Resource> basedOnTarget; 1155 1156 1157 /** 1158 * 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. 1159 */ 1160 @Child(name = "parent", type = {Observation.class, Procedure.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1161 @Description(shortDefinition="Part of this action", 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." ) 1162 protected List<Reference> parent; 1163 /** 1164 * The actual objects that are the target of the reference (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.) 1165 */ 1166 protected List<Resource> parentTarget; 1167 1168 1169 /** 1170 * The Questionnaire that defines and organizes the questions for which answers are being provided. 1171 */ 1172 @Child(name = "questionnaire", type = {Questionnaire.class}, order=3, min=0, max=1, modifier=false, summary=true) 1173 @Description(shortDefinition="Form being answered", formalDefinition="The Questionnaire that defines and organizes the questions for which answers are being provided." ) 1174 protected Reference questionnaire; 1175 1176 /** 1177 * The actual object that is the target of the reference (The Questionnaire that defines and organizes the questions for which answers are being provided.) 1178 */ 1179 protected Questionnaire questionnaireTarget; 1180 1181 /** 1182 * The position of the questionnaire response within its overall lifecycle. 1183 */ 1184 @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true) 1185 @Description(shortDefinition="in-progress | completed | amended | entered-in-error | stopped", formalDefinition="The position of the questionnaire response within its overall lifecycle." ) 1186 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-answers-status") 1187 protected Enumeration<QuestionnaireResponseStatus> status; 1188 1189 /** 1190 * 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. 1191 */ 1192 @Child(name = "subject", type = {Reference.class}, order=5, min=0, max=1, modifier=false, summary=true) 1193 @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." ) 1194 protected Reference subject; 1195 1196 /** 1197 * The actual object that is the target of the reference (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.) 1198 */ 1199 protected Resource subjectTarget; 1200 1201 /** 1202 * The encounter or episode of care with primary association to the questionnaire response. 1203 */ 1204 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=6, min=0, max=1, modifier=false, summary=true) 1205 @Description(shortDefinition="Encounter or Episode during which questionnaire was completed", formalDefinition="The encounter or episode of care with primary association to the questionnaire response." ) 1206 protected Reference context; 1207 1208 /** 1209 * The actual object that is the target of the reference (The encounter or episode of care with primary association to the questionnaire response.) 1210 */ 1211 protected Resource contextTarget; 1212 1213 /** 1214 * The date and/or time that this set of answers were last changed. 1215 */ 1216 @Child(name = "authored", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) 1217 @Description(shortDefinition="Date the answers were gathered", formalDefinition="The date and/or time that this set of answers were last changed." ) 1218 protected DateTimeType authored; 1219 1220 /** 1221 * Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system. 1222 */ 1223 @Child(name = "author", type = {Device.class, Practitioner.class, Patient.class, RelatedPerson.class}, order=8, min=0, max=1, modifier=false, summary=true) 1224 @Description(shortDefinition="Person who received and recorded the answers", formalDefinition="Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system." ) 1225 protected Reference author; 1226 1227 /** 1228 * The actual object that is the target of the reference (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) 1229 */ 1230 protected Resource authorTarget; 1231 1232 /** 1233 * The person who answered the questions about the subject. 1234 */ 1235 @Child(name = "source", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=9, min=0, max=1, modifier=false, summary=true) 1236 @Description(shortDefinition="The person who answered the questions", formalDefinition="The person who answered the questions about the subject." ) 1237 protected Reference source; 1238 1239 /** 1240 * The actual object that is the target of the reference (The person who answered the questions about the subject.) 1241 */ 1242 protected Resource sourceTarget; 1243 1244 /** 1245 * A group or question item from the original questionnaire for which answers are provided. 1246 */ 1247 @Child(name = "item", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1248 @Description(shortDefinition="Groups and questions", formalDefinition="A group or question item from the original questionnaire for which answers are provided." ) 1249 protected List<QuestionnaireResponseItemComponent> item; 1250 1251 private static final long serialVersionUID = -1559552776L; 1252 1253 /** 1254 * Constructor 1255 */ 1256 public QuestionnaireResponse() { 1257 super(); 1258 } 1259 1260 /** 1261 * Constructor 1262 */ 1263 public QuestionnaireResponse(Enumeration<QuestionnaireResponseStatus> status) { 1264 super(); 1265 this.status = status; 1266 } 1267 1268 /** 1269 * @return {@link #identifier} (A business identifier assigned to a particular completed (or partially completed) questionnaire.) 1270 */ 1271 public Identifier getIdentifier() { 1272 if (this.identifier == null) 1273 if (Configuration.errorOnAutoCreate()) 1274 throw new Error("Attempt to auto-create QuestionnaireResponse.identifier"); 1275 else if (Configuration.doAutoCreate()) 1276 this.identifier = new Identifier(); // cc 1277 return this.identifier; 1278 } 1279 1280 public boolean hasIdentifier() { 1281 return this.identifier != null && !this.identifier.isEmpty(); 1282 } 1283 1284 /** 1285 * @param value {@link #identifier} (A business identifier assigned to a particular completed (or partially completed) questionnaire.) 1286 */ 1287 public QuestionnaireResponse setIdentifier(Identifier value) { 1288 this.identifier = value; 1289 return this; 1290 } 1291 1292 /** 1293 * @return {@link #basedOn} (The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.) 1294 */ 1295 public List<Reference> getBasedOn() { 1296 if (this.basedOn == null) 1297 this.basedOn = new ArrayList<Reference>(); 1298 return this.basedOn; 1299 } 1300 1301 /** 1302 * @return Returns a reference to <code>this</code> for easy method chaining 1303 */ 1304 public QuestionnaireResponse setBasedOn(List<Reference> theBasedOn) { 1305 this.basedOn = theBasedOn; 1306 return this; 1307 } 1308 1309 public boolean hasBasedOn() { 1310 if (this.basedOn == null) 1311 return false; 1312 for (Reference item : this.basedOn) 1313 if (!item.isEmpty()) 1314 return true; 1315 return false; 1316 } 1317 1318 public Reference addBasedOn() { //3 1319 Reference t = new Reference(); 1320 if (this.basedOn == null) 1321 this.basedOn = new ArrayList<Reference>(); 1322 this.basedOn.add(t); 1323 return t; 1324 } 1325 1326 public QuestionnaireResponse addBasedOn(Reference t) { //3 1327 if (t == null) 1328 return this; 1329 if (this.basedOn == null) 1330 this.basedOn = new ArrayList<Reference>(); 1331 this.basedOn.add(t); 1332 return this; 1333 } 1334 1335 /** 1336 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 1337 */ 1338 public Reference getBasedOnFirstRep() { 1339 if (getBasedOn().isEmpty()) { 1340 addBasedOn(); 1341 } 1342 return getBasedOn().get(0); 1343 } 1344 1345 /** 1346 * @deprecated Use Reference#setResource(IBaseResource) instead 1347 */ 1348 @Deprecated 1349 public List<Resource> getBasedOnTarget() { 1350 if (this.basedOnTarget == null) 1351 this.basedOnTarget = new ArrayList<Resource>(); 1352 return this.basedOnTarget; 1353 } 1354 1355 /** 1356 * @return {@link #parent} (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.) 1357 */ 1358 public List<Reference> getParent() { 1359 if (this.parent == null) 1360 this.parent = new ArrayList<Reference>(); 1361 return this.parent; 1362 } 1363 1364 /** 1365 * @return Returns a reference to <code>this</code> for easy method chaining 1366 */ 1367 public QuestionnaireResponse setParent(List<Reference> theParent) { 1368 this.parent = theParent; 1369 return this; 1370 } 1371 1372 public boolean hasParent() { 1373 if (this.parent == null) 1374 return false; 1375 for (Reference item : this.parent) 1376 if (!item.isEmpty()) 1377 return true; 1378 return false; 1379 } 1380 1381 public Reference addParent() { //3 1382 Reference t = new Reference(); 1383 if (this.parent == null) 1384 this.parent = new ArrayList<Reference>(); 1385 this.parent.add(t); 1386 return t; 1387 } 1388 1389 public QuestionnaireResponse addParent(Reference t) { //3 1390 if (t == null) 1391 return this; 1392 if (this.parent == null) 1393 this.parent = new ArrayList<Reference>(); 1394 this.parent.add(t); 1395 return this; 1396 } 1397 1398 /** 1399 * @return The first repetition of repeating field {@link #parent}, creating it if it does not already exist 1400 */ 1401 public Reference getParentFirstRep() { 1402 if (getParent().isEmpty()) { 1403 addParent(); 1404 } 1405 return getParent().get(0); 1406 } 1407 1408 /** 1409 * @deprecated Use Reference#setResource(IBaseResource) instead 1410 */ 1411 @Deprecated 1412 public List<Resource> getParentTarget() { 1413 if (this.parentTarget == null) 1414 this.parentTarget = new ArrayList<Resource>(); 1415 return this.parentTarget; 1416 } 1417 1418 /** 1419 * @return {@link #questionnaire} (The Questionnaire that defines and organizes the questions for which answers are being provided.) 1420 */ 1421 public Reference getQuestionnaire() { 1422 if (this.questionnaire == null) 1423 if (Configuration.errorOnAutoCreate()) 1424 throw new Error("Attempt to auto-create QuestionnaireResponse.questionnaire"); 1425 else if (Configuration.doAutoCreate()) 1426 this.questionnaire = new Reference(); // cc 1427 return this.questionnaire; 1428 } 1429 1430 public boolean hasQuestionnaire() { 1431 return this.questionnaire != null && !this.questionnaire.isEmpty(); 1432 } 1433 1434 /** 1435 * @param value {@link #questionnaire} (The Questionnaire that defines and organizes the questions for which answers are being provided.) 1436 */ 1437 public QuestionnaireResponse setQuestionnaire(Reference value) { 1438 this.questionnaire = value; 1439 return this; 1440 } 1441 1442 /** 1443 * @return {@link #questionnaire} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The Questionnaire that defines and organizes the questions for which answers are being provided.) 1444 */ 1445 public Questionnaire getQuestionnaireTarget() { 1446 if (this.questionnaireTarget == null) 1447 if (Configuration.errorOnAutoCreate()) 1448 throw new Error("Attempt to auto-create QuestionnaireResponse.questionnaire"); 1449 else if (Configuration.doAutoCreate()) 1450 this.questionnaireTarget = new Questionnaire(); // aa 1451 return this.questionnaireTarget; 1452 } 1453 1454 /** 1455 * @param value {@link #questionnaire} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The Questionnaire that defines and organizes the questions for which answers are being provided.) 1456 */ 1457 public QuestionnaireResponse setQuestionnaireTarget(Questionnaire value) { 1458 this.questionnaireTarget = value; 1459 return this; 1460 } 1461 1462 /** 1463 * @return {@link #status} (The position of the questionnaire response within its overall lifecycle.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1464 */ 1465 public Enumeration<QuestionnaireResponseStatus> getStatusElement() { 1466 if (this.status == null) 1467 if (Configuration.errorOnAutoCreate()) 1468 throw new Error("Attempt to auto-create QuestionnaireResponse.status"); 1469 else if (Configuration.doAutoCreate()) 1470 this.status = new Enumeration<QuestionnaireResponseStatus>(new QuestionnaireResponseStatusEnumFactory()); // bb 1471 return this.status; 1472 } 1473 1474 public boolean hasStatusElement() { 1475 return this.status != null && !this.status.isEmpty(); 1476 } 1477 1478 public boolean hasStatus() { 1479 return this.status != null && !this.status.isEmpty(); 1480 } 1481 1482 /** 1483 * @param value {@link #status} (The position of the questionnaire response within its overall lifecycle.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1484 */ 1485 public QuestionnaireResponse setStatusElement(Enumeration<QuestionnaireResponseStatus> value) { 1486 this.status = value; 1487 return this; 1488 } 1489 1490 /** 1491 * @return The position of the questionnaire response within its overall lifecycle. 1492 */ 1493 public QuestionnaireResponseStatus getStatus() { 1494 return this.status == null ? null : this.status.getValue(); 1495 } 1496 1497 /** 1498 * @param value The position of the questionnaire response within its overall lifecycle. 1499 */ 1500 public QuestionnaireResponse setStatus(QuestionnaireResponseStatus value) { 1501 if (this.status == null) 1502 this.status = new Enumeration<QuestionnaireResponseStatus>(new QuestionnaireResponseStatusEnumFactory()); 1503 this.status.setValue(value); 1504 return this; 1505 } 1506 1507 /** 1508 * @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.) 1509 */ 1510 public Reference getSubject() { 1511 if (this.subject == null) 1512 if (Configuration.errorOnAutoCreate()) 1513 throw new Error("Attempt to auto-create QuestionnaireResponse.subject"); 1514 else if (Configuration.doAutoCreate()) 1515 this.subject = new Reference(); // cc 1516 return this.subject; 1517 } 1518 1519 public boolean hasSubject() { 1520 return this.subject != null && !this.subject.isEmpty(); 1521 } 1522 1523 /** 1524 * @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.) 1525 */ 1526 public QuestionnaireResponse setSubject(Reference value) { 1527 this.subject = value; 1528 return this; 1529 } 1530 1531 /** 1532 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The 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.) 1533 */ 1534 public Resource getSubjectTarget() { 1535 return this.subjectTarget; 1536 } 1537 1538 /** 1539 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The 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.) 1540 */ 1541 public QuestionnaireResponse setSubjectTarget(Resource value) { 1542 this.subjectTarget = value; 1543 return this; 1544 } 1545 1546 /** 1547 * @return {@link #context} (The encounter or episode of care with primary association to the questionnaire response.) 1548 */ 1549 public Reference getContext() { 1550 if (this.context == null) 1551 if (Configuration.errorOnAutoCreate()) 1552 throw new Error("Attempt to auto-create QuestionnaireResponse.context"); 1553 else if (Configuration.doAutoCreate()) 1554 this.context = new Reference(); // cc 1555 return this.context; 1556 } 1557 1558 public boolean hasContext() { 1559 return this.context != null && !this.context.isEmpty(); 1560 } 1561 1562 /** 1563 * @param value {@link #context} (The encounter or episode of care with primary association to the questionnaire response.) 1564 */ 1565 public QuestionnaireResponse setContext(Reference value) { 1566 this.context = value; 1567 return this; 1568 } 1569 1570 /** 1571 * @return {@link #context} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter or episode of care with primary association to the questionnaire response.) 1572 */ 1573 public Resource getContextTarget() { 1574 return this.contextTarget; 1575 } 1576 1577 /** 1578 * @param value {@link #context} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter or episode of care with primary association to the questionnaire response.) 1579 */ 1580 public QuestionnaireResponse setContextTarget(Resource value) { 1581 this.contextTarget = value; 1582 return this; 1583 } 1584 1585 /** 1586 * @return {@link #authored} (The date and/or time that this set of answers were last changed.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value 1587 */ 1588 public DateTimeType getAuthoredElement() { 1589 if (this.authored == null) 1590 if (Configuration.errorOnAutoCreate()) 1591 throw new Error("Attempt to auto-create QuestionnaireResponse.authored"); 1592 else if (Configuration.doAutoCreate()) 1593 this.authored = new DateTimeType(); // bb 1594 return this.authored; 1595 } 1596 1597 public boolean hasAuthoredElement() { 1598 return this.authored != null && !this.authored.isEmpty(); 1599 } 1600 1601 public boolean hasAuthored() { 1602 return this.authored != null && !this.authored.isEmpty(); 1603 } 1604 1605 /** 1606 * @param value {@link #authored} (The date and/or time that this set of answers were last changed.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value 1607 */ 1608 public QuestionnaireResponse setAuthoredElement(DateTimeType value) { 1609 this.authored = value; 1610 return this; 1611 } 1612 1613 /** 1614 * @return The date and/or time that this set of answers were last changed. 1615 */ 1616 public Date getAuthored() { 1617 return this.authored == null ? null : this.authored.getValue(); 1618 } 1619 1620 /** 1621 * @param value The date and/or time that this set of answers were last changed. 1622 */ 1623 public QuestionnaireResponse setAuthored(Date value) { 1624 if (value == null) 1625 this.authored = null; 1626 else { 1627 if (this.authored == null) 1628 this.authored = new DateTimeType(); 1629 this.authored.setValue(value); 1630 } 1631 return this; 1632 } 1633 1634 /** 1635 * @return {@link #author} (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) 1636 */ 1637 public Reference getAuthor() { 1638 if (this.author == null) 1639 if (Configuration.errorOnAutoCreate()) 1640 throw new Error("Attempt to auto-create QuestionnaireResponse.author"); 1641 else if (Configuration.doAutoCreate()) 1642 this.author = new Reference(); // cc 1643 return this.author; 1644 } 1645 1646 public boolean hasAuthor() { 1647 return this.author != null && !this.author.isEmpty(); 1648 } 1649 1650 /** 1651 * @param value {@link #author} (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) 1652 */ 1653 public QuestionnaireResponse setAuthor(Reference value) { 1654 this.author = value; 1655 return this; 1656 } 1657 1658 /** 1659 * @return {@link #author} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) 1660 */ 1661 public Resource getAuthorTarget() { 1662 return this.authorTarget; 1663 } 1664 1665 /** 1666 * @param value {@link #author} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) 1667 */ 1668 public QuestionnaireResponse setAuthorTarget(Resource value) { 1669 this.authorTarget = value; 1670 return this; 1671 } 1672 1673 /** 1674 * @return {@link #source} (The person who answered the questions about the subject.) 1675 */ 1676 public Reference getSource() { 1677 if (this.source == null) 1678 if (Configuration.errorOnAutoCreate()) 1679 throw new Error("Attempt to auto-create QuestionnaireResponse.source"); 1680 else if (Configuration.doAutoCreate()) 1681 this.source = new Reference(); // cc 1682 return this.source; 1683 } 1684 1685 public boolean hasSource() { 1686 return this.source != null && !this.source.isEmpty(); 1687 } 1688 1689 /** 1690 * @param value {@link #source} (The person who answered the questions about the subject.) 1691 */ 1692 public QuestionnaireResponse setSource(Reference value) { 1693 this.source = value; 1694 return this; 1695 } 1696 1697 /** 1698 * @return {@link #source} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) 1699 */ 1700 public Resource getSourceTarget() { 1701 return this.sourceTarget; 1702 } 1703 1704 /** 1705 * @param value {@link #source} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who answered the questions about the subject.) 1706 */ 1707 public QuestionnaireResponse setSourceTarget(Resource value) { 1708 this.sourceTarget = value; 1709 return this; 1710 } 1711 1712 /** 1713 * @return {@link #item} (A group or question item from the original questionnaire for which answers are provided.) 1714 */ 1715 public List<QuestionnaireResponseItemComponent> getItem() { 1716 if (this.item == null) 1717 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1718 return this.item; 1719 } 1720 1721 /** 1722 * @return Returns a reference to <code>this</code> for easy method chaining 1723 */ 1724 public QuestionnaireResponse setItem(List<QuestionnaireResponseItemComponent> theItem) { 1725 this.item = theItem; 1726 return this; 1727 } 1728 1729 public boolean hasItem() { 1730 if (this.item == null) 1731 return false; 1732 for (QuestionnaireResponseItemComponent item : this.item) 1733 if (!item.isEmpty()) 1734 return true; 1735 return false; 1736 } 1737 1738 public QuestionnaireResponseItemComponent addItem() { //3 1739 QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); 1740 if (this.item == null) 1741 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1742 this.item.add(t); 1743 return t; 1744 } 1745 1746 public QuestionnaireResponse addItem(QuestionnaireResponseItemComponent t) { //3 1747 if (t == null) 1748 return this; 1749 if (this.item == null) 1750 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1751 this.item.add(t); 1752 return this; 1753 } 1754 1755 /** 1756 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist 1757 */ 1758 public QuestionnaireResponseItemComponent getItemFirstRep() { 1759 if (getItem().isEmpty()) { 1760 addItem(); 1761 } 1762 return getItem().get(0); 1763 } 1764 1765 protected void listChildren(List<Property> childrenList) { 1766 super.listChildren(childrenList); 1767 childrenList.add(new Property("identifier", "Identifier", "A business identifier assigned to a particular completed (or partially completed) questionnaire.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1768 childrenList.add(new Property("basedOn", "Reference(ReferralRequest|CarePlan|ProcedureRequest)", "The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse. For example, a ProcedureRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 1769 childrenList.add(new Property("parent", "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, parent)); 1770 childrenList.add(new Property("questionnaire", "Reference(Questionnaire)", "The Questionnaire that defines and organizes the questions for which answers are being provided.", 0, java.lang.Integer.MAX_VALUE, questionnaire)); 1771 childrenList.add(new Property("status", "code", "The position of the questionnaire response within its overall lifecycle.", 0, java.lang.Integer.MAX_VALUE, status)); 1772 childrenList.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, java.lang.Integer.MAX_VALUE, subject)); 1773 childrenList.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care with primary association to the questionnaire response.", 0, java.lang.Integer.MAX_VALUE, context)); 1774 childrenList.add(new Property("authored", "dateTime", "The date and/or time that this set of answers were last changed.", 0, java.lang.Integer.MAX_VALUE, authored)); 1775 childrenList.add(new Property("author", "Reference(Device|Practitioner|Patient|RelatedPerson)", "Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.", 0, java.lang.Integer.MAX_VALUE, author)); 1776 childrenList.add(new Property("source", "Reference(Patient|Practitioner|RelatedPerson)", "The person who answered the questions about the subject.", 0, java.lang.Integer.MAX_VALUE, source)); 1777 childrenList.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)); 1778 } 1779 1780 @Override 1781 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1782 switch (hash) { 1783 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1784 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 1785 case -995424086: /*parent*/ return this.parent == null ? new Base[0] : this.parent.toArray(new Base[this.parent.size()]); // Reference 1786 case -1017049693: /*questionnaire*/ return this.questionnaire == null ? new Base[0] : new Base[] {this.questionnaire}; // Reference 1787 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<QuestionnaireResponseStatus> 1788 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1789 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 1790 case 1433073514: /*authored*/ return this.authored == null ? new Base[0] : new Base[] {this.authored}; // DateTimeType 1791 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 1792 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference 1793 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent 1794 default: return super.getProperty(hash, name, checkValid); 1795 } 1796 1797 } 1798 1799 @Override 1800 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1801 switch (hash) { 1802 case -1618432855: // identifier 1803 this.identifier = castToIdentifier(value); // Identifier 1804 return value; 1805 case -332612366: // basedOn 1806 this.getBasedOn().add(castToReference(value)); // Reference 1807 return value; 1808 case -995424086: // parent 1809 this.getParent().add(castToReference(value)); // Reference 1810 return value; 1811 case -1017049693: // questionnaire 1812 this.questionnaire = castToReference(value); // Reference 1813 return value; 1814 case -892481550: // status 1815 value = new QuestionnaireResponseStatusEnumFactory().fromType(castToCode(value)); 1816 this.status = (Enumeration) value; // Enumeration<QuestionnaireResponseStatus> 1817 return value; 1818 case -1867885268: // subject 1819 this.subject = castToReference(value); // Reference 1820 return value; 1821 case 951530927: // context 1822 this.context = castToReference(value); // Reference 1823 return value; 1824 case 1433073514: // authored 1825 this.authored = castToDateTime(value); // DateTimeType 1826 return value; 1827 case -1406328437: // author 1828 this.author = castToReference(value); // Reference 1829 return value; 1830 case -896505829: // source 1831 this.source = castToReference(value); // Reference 1832 return value; 1833 case 3242771: // item 1834 this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent 1835 return value; 1836 default: return super.setProperty(hash, name, value); 1837 } 1838 1839 } 1840 1841 @Override 1842 public Base setProperty(String name, Base value) throws FHIRException { 1843 if (name.equals("identifier")) { 1844 this.identifier = castToIdentifier(value); // Identifier 1845 } else if (name.equals("basedOn")) { 1846 this.getBasedOn().add(castToReference(value)); 1847 } else if (name.equals("parent")) { 1848 this.getParent().add(castToReference(value)); 1849 } else if (name.equals("questionnaire")) { 1850 this.questionnaire = castToReference(value); // Reference 1851 } else if (name.equals("status")) { 1852 value = new QuestionnaireResponseStatusEnumFactory().fromType(castToCode(value)); 1853 this.status = (Enumeration) value; // Enumeration<QuestionnaireResponseStatus> 1854 } else if (name.equals("subject")) { 1855 this.subject = castToReference(value); // Reference 1856 } else if (name.equals("context")) { 1857 this.context = castToReference(value); // Reference 1858 } else if (name.equals("authored")) { 1859 this.authored = castToDateTime(value); // DateTimeType 1860 } else if (name.equals("author")) { 1861 this.author = castToReference(value); // Reference 1862 } else if (name.equals("source")) { 1863 this.source = castToReference(value); // Reference 1864 } else if (name.equals("item")) { 1865 this.getItem().add((QuestionnaireResponseItemComponent) value); 1866 } else 1867 return super.setProperty(name, value); 1868 return value; 1869 } 1870 1871 @Override 1872 public Base makeProperty(int hash, String name) throws FHIRException { 1873 switch (hash) { 1874 case -1618432855: return getIdentifier(); 1875 case -332612366: return addBasedOn(); 1876 case -995424086: return addParent(); 1877 case -1017049693: return getQuestionnaire(); 1878 case -892481550: return getStatusElement(); 1879 case -1867885268: return getSubject(); 1880 case 951530927: return getContext(); 1881 case 1433073514: return getAuthoredElement(); 1882 case -1406328437: return getAuthor(); 1883 case -896505829: return getSource(); 1884 case 3242771: return addItem(); 1885 default: return super.makeProperty(hash, name); 1886 } 1887 1888 } 1889 1890 @Override 1891 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1892 switch (hash) { 1893 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1894 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 1895 case -995424086: /*parent*/ return new String[] {"Reference"}; 1896 case -1017049693: /*questionnaire*/ return new String[] {"Reference"}; 1897 case -892481550: /*status*/ return new String[] {"code"}; 1898 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1899 case 951530927: /*context*/ return new String[] {"Reference"}; 1900 case 1433073514: /*authored*/ return new String[] {"dateTime"}; 1901 case -1406328437: /*author*/ return new String[] {"Reference"}; 1902 case -896505829: /*source*/ return new String[] {"Reference"}; 1903 case 3242771: /*item*/ return new String[] {}; 1904 default: return super.getTypesForProperty(hash, name); 1905 } 1906 1907 } 1908 1909 @Override 1910 public Base addChild(String name) throws FHIRException { 1911 if (name.equals("identifier")) { 1912 this.identifier = new Identifier(); 1913 return this.identifier; 1914 } 1915 else if (name.equals("basedOn")) { 1916 return addBasedOn(); 1917 } 1918 else if (name.equals("parent")) { 1919 return addParent(); 1920 } 1921 else if (name.equals("questionnaire")) { 1922 this.questionnaire = new Reference(); 1923 return this.questionnaire; 1924 } 1925 else if (name.equals("status")) { 1926 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.status"); 1927 } 1928 else if (name.equals("subject")) { 1929 this.subject = new Reference(); 1930 return this.subject; 1931 } 1932 else if (name.equals("context")) { 1933 this.context = new Reference(); 1934 return this.context; 1935 } 1936 else if (name.equals("authored")) { 1937 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.authored"); 1938 } 1939 else if (name.equals("author")) { 1940 this.author = new Reference(); 1941 return this.author; 1942 } 1943 else if (name.equals("source")) { 1944 this.source = new Reference(); 1945 return this.source; 1946 } 1947 else if (name.equals("item")) { 1948 return addItem(); 1949 } 1950 else 1951 return super.addChild(name); 1952 } 1953 1954 public String fhirType() { 1955 return "QuestionnaireResponse"; 1956 1957 } 1958 1959 public QuestionnaireResponse copy() { 1960 QuestionnaireResponse dst = new QuestionnaireResponse(); 1961 copyValues(dst); 1962 dst.identifier = identifier == null ? null : identifier.copy(); 1963 if (basedOn != null) { 1964 dst.basedOn = new ArrayList<Reference>(); 1965 for (Reference i : basedOn) 1966 dst.basedOn.add(i.copy()); 1967 }; 1968 if (parent != null) { 1969 dst.parent = new ArrayList<Reference>(); 1970 for (Reference i : parent) 1971 dst.parent.add(i.copy()); 1972 }; 1973 dst.questionnaire = questionnaire == null ? null : questionnaire.copy(); 1974 dst.status = status == null ? null : status.copy(); 1975 dst.subject = subject == null ? null : subject.copy(); 1976 dst.context = context == null ? null : context.copy(); 1977 dst.authored = authored == null ? null : authored.copy(); 1978 dst.author = author == null ? null : author.copy(); 1979 dst.source = source == null ? null : source.copy(); 1980 if (item != null) { 1981 dst.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1982 for (QuestionnaireResponseItemComponent i : item) 1983 dst.item.add(i.copy()); 1984 }; 1985 return dst; 1986 } 1987 1988 protected QuestionnaireResponse typedCopy() { 1989 return copy(); 1990 } 1991 1992 @Override 1993 public boolean equalsDeep(Base other) { 1994 if (!super.equalsDeep(other)) 1995 return false; 1996 if (!(other instanceof QuestionnaireResponse)) 1997 return false; 1998 QuestionnaireResponse o = (QuestionnaireResponse) other; 1999 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(parent, o.parent, true) 2000 && compareDeep(questionnaire, o.questionnaire, true) && compareDeep(status, o.status, true) && compareDeep(subject, o.subject, true) 2001 && compareDeep(context, o.context, true) && compareDeep(authored, o.authored, true) && compareDeep(author, o.author, true) 2002 && compareDeep(source, o.source, true) && compareDeep(item, o.item, true); 2003 } 2004 2005 @Override 2006 public boolean equalsShallow(Base other) { 2007 if (!super.equalsShallow(other)) 2008 return false; 2009 if (!(other instanceof QuestionnaireResponse)) 2010 return false; 2011 QuestionnaireResponse o = (QuestionnaireResponse) other; 2012 return compareValues(status, o.status, true) && compareValues(authored, o.authored, true); 2013 } 2014 2015 public boolean isEmpty() { 2016 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, parent 2017 , questionnaire, status, subject, context, authored, author, source, item); 2018 } 2019 2020 @Override 2021 public ResourceType getResourceType() { 2022 return ResourceType.QuestionnaireResponse; 2023 } 2024 2025 /** 2026 * Search parameter: <b>authored</b> 2027 * <p> 2028 * Description: <b>When the questionnaire response was last changed</b><br> 2029 * Type: <b>date</b><br> 2030 * Path: <b>QuestionnaireResponse.authored</b><br> 2031 * </p> 2032 */ 2033 @SearchParamDefinition(name="authored", path="QuestionnaireResponse.authored", description="When the questionnaire response was last changed", type="date" ) 2034 public static final String SP_AUTHORED = "authored"; 2035 /** 2036 * <b>Fluent Client</b> search parameter constant for <b>authored</b> 2037 * <p> 2038 * Description: <b>When the questionnaire response was last changed</b><br> 2039 * Type: <b>date</b><br> 2040 * Path: <b>QuestionnaireResponse.authored</b><br> 2041 * </p> 2042 */ 2043 public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED); 2044 2045 /** 2046 * Search parameter: <b>identifier</b> 2047 * <p> 2048 * Description: <b>The unique identifier for the questionnaire response</b><br> 2049 * Type: <b>token</b><br> 2050 * Path: <b>QuestionnaireResponse.identifier</b><br> 2051 * </p> 2052 */ 2053 @SearchParamDefinition(name="identifier", path="QuestionnaireResponse.identifier", description="The unique identifier for the questionnaire response", type="token" ) 2054 public static final String SP_IDENTIFIER = "identifier"; 2055 /** 2056 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2057 * <p> 2058 * Description: <b>The unique identifier for the questionnaire response</b><br> 2059 * Type: <b>token</b><br> 2060 * Path: <b>QuestionnaireResponse.identifier</b><br> 2061 * </p> 2062 */ 2063 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2064 2065 /** 2066 * Search parameter: <b>parent</b> 2067 * <p> 2068 * Description: <b>Procedure or observation this questionnaire response was performed as a part of</b><br> 2069 * Type: <b>reference</b><br> 2070 * Path: <b>QuestionnaireResponse.parent</b><br> 2071 * </p> 2072 */ 2073 @SearchParamDefinition(name="parent", path="QuestionnaireResponse.parent", description="Procedure or observation this questionnaire response was performed as a part of", type="reference", target={Observation.class, Procedure.class } ) 2074 public static final String SP_PARENT = "parent"; 2075 /** 2076 * <b>Fluent Client</b> search parameter constant for <b>parent</b> 2077 * <p> 2078 * Description: <b>Procedure or observation this questionnaire response was performed as a part of</b><br> 2079 * Type: <b>reference</b><br> 2080 * Path: <b>QuestionnaireResponse.parent</b><br> 2081 * </p> 2082 */ 2083 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARENT); 2084 2085/** 2086 * Constant for fluent queries to be used to add include statements. Specifies 2087 * the path value of "<b>QuestionnaireResponse:parent</b>". 2088 */ 2089 public static final ca.uhn.fhir.model.api.Include INCLUDE_PARENT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:parent").toLocked(); 2090 2091 /** 2092 * Search parameter: <b>questionnaire</b> 2093 * <p> 2094 * Description: <b>The questionnaire the answers are provided for</b><br> 2095 * Type: <b>reference</b><br> 2096 * Path: <b>QuestionnaireResponse.questionnaire</b><br> 2097 * </p> 2098 */ 2099 @SearchParamDefinition(name="questionnaire", path="QuestionnaireResponse.questionnaire", description="The questionnaire the answers are provided for", type="reference", target={Questionnaire.class } ) 2100 public static final String SP_QUESTIONNAIRE = "questionnaire"; 2101 /** 2102 * <b>Fluent Client</b> search parameter constant for <b>questionnaire</b> 2103 * <p> 2104 * Description: <b>The questionnaire the answers are provided for</b><br> 2105 * Type: <b>reference</b><br> 2106 * Path: <b>QuestionnaireResponse.questionnaire</b><br> 2107 * </p> 2108 */ 2109 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam QUESTIONNAIRE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_QUESTIONNAIRE); 2110 2111/** 2112 * Constant for fluent queries to be used to add include statements. Specifies 2113 * the path value of "<b>QuestionnaireResponse:questionnaire</b>". 2114 */ 2115 public static final ca.uhn.fhir.model.api.Include INCLUDE_QUESTIONNAIRE = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:questionnaire").toLocked(); 2116 2117 /** 2118 * Search parameter: <b>based-on</b> 2119 * <p> 2120 * Description: <b>Plan/proposal/order fulfilled by this questionnaire response</b><br> 2121 * Type: <b>reference</b><br> 2122 * Path: <b>QuestionnaireResponse.basedOn</b><br> 2123 * </p> 2124 */ 2125 @SearchParamDefinition(name="based-on", path="QuestionnaireResponse.basedOn", description="Plan/proposal/order fulfilled by this questionnaire response", type="reference", target={CarePlan.class, ProcedureRequest.class, ReferralRequest.class } ) 2126 public static final String SP_BASED_ON = "based-on"; 2127 /** 2128 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 2129 * <p> 2130 * Description: <b>Plan/proposal/order fulfilled by this questionnaire response</b><br> 2131 * Type: <b>reference</b><br> 2132 * Path: <b>QuestionnaireResponse.basedOn</b><br> 2133 * </p> 2134 */ 2135 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 2136 2137/** 2138 * Constant for fluent queries to be used to add include statements. Specifies 2139 * the path value of "<b>QuestionnaireResponse:based-on</b>". 2140 */ 2141 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:based-on").toLocked(); 2142 2143 /** 2144 * Search parameter: <b>subject</b> 2145 * <p> 2146 * Description: <b>The subject of the questionnaire response</b><br> 2147 * Type: <b>reference</b><br> 2148 * Path: <b>QuestionnaireResponse.subject</b><br> 2149 * </p> 2150 */ 2151 @SearchParamDefinition(name="subject", path="QuestionnaireResponse.subject", description="The subject of the questionnaire response", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") } ) 2152 public static final String SP_SUBJECT = "subject"; 2153 /** 2154 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2155 * <p> 2156 * Description: <b>The subject of the questionnaire response</b><br> 2157 * Type: <b>reference</b><br> 2158 * Path: <b>QuestionnaireResponse.subject</b><br> 2159 * </p> 2160 */ 2161 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2162 2163/** 2164 * Constant for fluent queries to be used to add include statements. Specifies 2165 * the path value of "<b>QuestionnaireResponse:subject</b>". 2166 */ 2167 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:subject").toLocked(); 2168 2169 /** 2170 * Search parameter: <b>author</b> 2171 * <p> 2172 * Description: <b>The author of the questionnaire response</b><br> 2173 * Type: <b>reference</b><br> 2174 * Path: <b>QuestionnaireResponse.author</b><br> 2175 * </p> 2176 */ 2177 @SearchParamDefinition(name="author", path="QuestionnaireResponse.author", description="The author of the questionnaire response", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Device.class, Patient.class, Practitioner.class, RelatedPerson.class } ) 2178 public static final String SP_AUTHOR = "author"; 2179 /** 2180 * <b>Fluent Client</b> search parameter constant for <b>author</b> 2181 * <p> 2182 * Description: <b>The author of the questionnaire response</b><br> 2183 * Type: <b>reference</b><br> 2184 * Path: <b>QuestionnaireResponse.author</b><br> 2185 * </p> 2186 */ 2187 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); 2188 2189/** 2190 * Constant for fluent queries to be used to add include statements. Specifies 2191 * the path value of "<b>QuestionnaireResponse:author</b>". 2192 */ 2193 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:author").toLocked(); 2194 2195 /** 2196 * Search parameter: <b>patient</b> 2197 * <p> 2198 * Description: <b>The patient that is the subject of the questionnaire response</b><br> 2199 * Type: <b>reference</b><br> 2200 * Path: <b>QuestionnaireResponse.subject</b><br> 2201 * </p> 2202 */ 2203 @SearchParamDefinition(name="patient", path="QuestionnaireResponse.subject", description="The patient that is the subject of the questionnaire response", type="reference", target={Patient.class } ) 2204 public static final String SP_PATIENT = "patient"; 2205 /** 2206 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2207 * <p> 2208 * Description: <b>The patient that is the subject of the questionnaire response</b><br> 2209 * Type: <b>reference</b><br> 2210 * Path: <b>QuestionnaireResponse.subject</b><br> 2211 * </p> 2212 */ 2213 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2214 2215/** 2216 * Constant for fluent queries to be used to add include statements. Specifies 2217 * the path value of "<b>QuestionnaireResponse:patient</b>". 2218 */ 2219 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:patient").toLocked(); 2220 2221 /** 2222 * Search parameter: <b>context</b> 2223 * <p> 2224 * Description: <b>Encounter or episode associated with the questionnaire response</b><br> 2225 * Type: <b>reference</b><br> 2226 * Path: <b>QuestionnaireResponse.context</b><br> 2227 * </p> 2228 */ 2229 @SearchParamDefinition(name="context", path="QuestionnaireResponse.context", description="Encounter or episode associated with the questionnaire response", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class, EpisodeOfCare.class } ) 2230 public static final String SP_CONTEXT = "context"; 2231 /** 2232 * <b>Fluent Client</b> search parameter constant for <b>context</b> 2233 * <p> 2234 * Description: <b>Encounter or episode associated with the questionnaire response</b><br> 2235 * Type: <b>reference</b><br> 2236 * Path: <b>QuestionnaireResponse.context</b><br> 2237 * </p> 2238 */ 2239 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); 2240 2241/** 2242 * Constant for fluent queries to be used to add include statements. Specifies 2243 * the path value of "<b>QuestionnaireResponse:context</b>". 2244 */ 2245 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:context").toLocked(); 2246 2247 /** 2248 * Search parameter: <b>source</b> 2249 * <p> 2250 * Description: <b>The individual providing the information reflected in the questionnaire respose</b><br> 2251 * Type: <b>reference</b><br> 2252 * Path: <b>QuestionnaireResponse.source</b><br> 2253 * </p> 2254 */ 2255 @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="Practitioner"), @ca.uhn.fhir.model.api.annotation.Compartment(name="RelatedPerson") }, target={Patient.class, Practitioner.class, RelatedPerson.class } ) 2256 public static final String SP_SOURCE = "source"; 2257 /** 2258 * <b>Fluent Client</b> search parameter constant for <b>source</b> 2259 * <p> 2260 * Description: <b>The individual providing the information reflected in the questionnaire respose</b><br> 2261 * Type: <b>reference</b><br> 2262 * Path: <b>QuestionnaireResponse.source</b><br> 2263 * </p> 2264 */ 2265 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE); 2266 2267/** 2268 * Constant for fluent queries to be used to add include statements. Specifies 2269 * the path value of "<b>QuestionnaireResponse:source</b>". 2270 */ 2271 public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:source").toLocked(); 2272 2273 /** 2274 * Search parameter: <b>status</b> 2275 * <p> 2276 * Description: <b>The status of the questionnaire response</b><br> 2277 * Type: <b>token</b><br> 2278 * Path: <b>QuestionnaireResponse.status</b><br> 2279 * </p> 2280 */ 2281 @SearchParamDefinition(name="status", path="QuestionnaireResponse.status", description="The status of the questionnaire response", type="token" ) 2282 public static final String SP_STATUS = "status"; 2283 /** 2284 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2285 * <p> 2286 * Description: <b>The status of the questionnaire response</b><br> 2287 * Type: <b>token</b><br> 2288 * Path: <b>QuestionnaireResponse.status</b><br> 2289 * </p> 2290 */ 2291 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2292 2293 2294} 2295