001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 042import org.hl7.fhir.utilities.Utilities; 043 044import ca.uhn.fhir.model.api.annotation.Block; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.Description; 047import ca.uhn.fhir.model.api.annotation.ResourceDef; 048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 049/** 050 * 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 underlying questions. 051 */ 052@ResourceDef(name="QuestionnaireResponse", profile="http://hl7.org/fhir/Profile/QuestionnaireResponse") 053public class QuestionnaireResponse extends DomainResource { 054 055 public enum QuestionnaireResponseStatus { 056 /** 057 * This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it. 058 */ 059 INPROGRESS, 060 /** 061 * This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive. 062 */ 063 COMPLETED, 064 /** 065 * This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards. 066 */ 067 AMENDED, 068 /** 069 * added to help the parsers 070 */ 071 NULL; 072 public static QuestionnaireResponseStatus fromCode(String codeString) throws FHIRException { 073 if (codeString == null || "".equals(codeString)) 074 return null; 075 if ("in-progress".equals(codeString)) 076 return INPROGRESS; 077 if ("completed".equals(codeString)) 078 return COMPLETED; 079 if ("amended".equals(codeString)) 080 return AMENDED; 081 throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); 082 } 083 public String toCode() { 084 switch (this) { 085 case INPROGRESS: return "in-progress"; 086 case COMPLETED: return "completed"; 087 case AMENDED: return "amended"; 088 case NULL: return null; 089 default: return "?"; 090 } 091 } 092 public String getSystem() { 093 switch (this) { 094 case INPROGRESS: return "http://hl7.org/fhir/questionnaire-answers-status"; 095 case COMPLETED: return "http://hl7.org/fhir/questionnaire-answers-status"; 096 case AMENDED: return "http://hl7.org/fhir/questionnaire-answers-status"; 097 case NULL: return null; 098 default: return "?"; 099 } 100 } 101 public String getDefinition() { 102 switch (this) { 103 case INPROGRESS: return "This QuestionnaireResponse has been partially filled out with answers, but changes or additions are still expected to be made to it."; 104 case COMPLETED: return "This QuestionnaireResponse has been filled out with answers, and the current content is regarded as definitive."; 105 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."; 106 case NULL: return null; 107 default: return "?"; 108 } 109 } 110 public String getDisplay() { 111 switch (this) { 112 case INPROGRESS: return "In Progress"; 113 case COMPLETED: return "Completed"; 114 case AMENDED: return "Amended"; 115 case NULL: return null; 116 default: return "?"; 117 } 118 } 119 } 120 121 public static class QuestionnaireResponseStatusEnumFactory implements EnumFactory<QuestionnaireResponseStatus> { 122 public QuestionnaireResponseStatus fromCode(String codeString) throws IllegalArgumentException { 123 if (codeString == null || "".equals(codeString)) 124 if (codeString == null || "".equals(codeString)) 125 return null; 126 if ("in-progress".equals(codeString)) 127 return QuestionnaireResponseStatus.INPROGRESS; 128 if ("completed".equals(codeString)) 129 return QuestionnaireResponseStatus.COMPLETED; 130 if ("amended".equals(codeString)) 131 return QuestionnaireResponseStatus.AMENDED; 132 throw new IllegalArgumentException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); 133 } 134 public Enumeration<QuestionnaireResponseStatus> fromType(Base code) throws FHIRException { 135 if (code == null || code.isEmpty()) 136 return null; 137 String codeString = ((PrimitiveType) code).asStringValue(); 138 if (codeString == null || "".equals(codeString)) 139 return null; 140 if ("in-progress".equals(codeString)) 141 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.INPROGRESS); 142 if ("completed".equals(codeString)) 143 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.COMPLETED); 144 if ("amended".equals(codeString)) 145 return new Enumeration<QuestionnaireResponseStatus>(this, QuestionnaireResponseStatus.AMENDED); 146 throw new FHIRException("Unknown QuestionnaireResponseStatus code '"+codeString+"'"); 147 } 148 public String toCode(QuestionnaireResponseStatus code) { 149 if (code == QuestionnaireResponseStatus.INPROGRESS) 150 return "in-progress"; 151 if (code == QuestionnaireResponseStatus.COMPLETED) 152 return "completed"; 153 if (code == QuestionnaireResponseStatus.AMENDED) 154 return "amended"; 155 return "?"; 156 } 157 public String toSystem(QuestionnaireResponseStatus code) { 158 return code.getSystem(); 159 } 160 } 161 162 @Block() 163 public static class QuestionnaireResponseItemComponent extends BackboneElement implements IBaseBackboneElement { 164 /** 165 * Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. 166 */ 167 @Child(name = "linkId", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 168 @Description(shortDefinition="Corresponding item within Questionnaire", formalDefinition="Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource." ) 169 protected StringType linkId; 170 171 /** 172 * Text that is displayed above the contents of the group or as the text of the question being answered. 173 */ 174 @Child(name = "text", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 175 @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." ) 176 protected StringType text; 177 178 /** 179 * More specific subject this section's answers are about, details the subject given in QuestionnaireResponse. 180 */ 181 @Child(name = "subject", type = {}, order=3, min=0, max=1, modifier=false, summary=false) 182 @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." ) 183 protected Reference subject; 184 185 /** 186 * 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.) 187 */ 188 protected Resource subjectTarget; 189 190 /** 191 * The respondent's answer(s) to the question. 192 */ 193 @Child(name = "answer", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 194 @Description(shortDefinition="The response(s) to the question", formalDefinition="The respondent's answer(s) to the question." ) 195 protected List<QuestionnaireResponseItemAnswerComponent> answer; 196 197 /** 198 * Questions or sub-groups nested beneath a question or group. 199 */ 200 @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 201 @Description(shortDefinition="Nested questionnaire response items", formalDefinition="Questions or sub-groups nested beneath a question or group." ) 202 protected List<QuestionnaireResponseItemComponent> item; 203 204 private static final long serialVersionUID = 1059526517L; 205 206 /** 207 * Constructor 208 */ 209 public QuestionnaireResponseItemComponent() { 210 super(); 211 } 212 213 /** 214 * @return {@link #linkId} (Identifies 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 215 */ 216 public StringType getLinkIdElement() { 217 if (this.linkId == null) 218 if (Configuration.errorOnAutoCreate()) 219 throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.linkId"); 220 else if (Configuration.doAutoCreate()) 221 this.linkId = new StringType(); // bb 222 return this.linkId; 223 } 224 225 public boolean hasLinkIdElement() { 226 return this.linkId != null && !this.linkId.isEmpty(); 227 } 228 229 public boolean hasLinkId() { 230 return this.linkId != null && !this.linkId.isEmpty(); 231 } 232 233 /** 234 * @param value {@link #linkId} (Identifies 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 235 */ 236 public QuestionnaireResponseItemComponent setLinkIdElement(StringType value) { 237 this.linkId = value; 238 return this; 239 } 240 241 /** 242 * @return Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. 243 */ 244 public String getLinkId() { 245 return this.linkId == null ? null : this.linkId.getValue(); 246 } 247 248 /** 249 * @param value Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource. 250 */ 251 public QuestionnaireResponseItemComponent setLinkId(String value) { 252 if (Utilities.noString(value)) 253 this.linkId = null; 254 else { 255 if (this.linkId == null) 256 this.linkId = new StringType(); 257 this.linkId.setValue(value); 258 } 259 return this; 260 } 261 262 /** 263 * @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 264 */ 265 public StringType getTextElement() { 266 if (this.text == null) 267 if (Configuration.errorOnAutoCreate()) 268 throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.text"); 269 else if (Configuration.doAutoCreate()) 270 this.text = new StringType(); // bb 271 return this.text; 272 } 273 274 public boolean hasTextElement() { 275 return this.text != null && !this.text.isEmpty(); 276 } 277 278 public boolean hasText() { 279 return this.text != null && !this.text.isEmpty(); 280 } 281 282 /** 283 * @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 284 */ 285 public QuestionnaireResponseItemComponent setTextElement(StringType value) { 286 this.text = value; 287 return this; 288 } 289 290 /** 291 * @return Text that is displayed above the contents of the group or as the text of the question being answered. 292 */ 293 public String getText() { 294 return this.text == null ? null : this.text.getValue(); 295 } 296 297 /** 298 * @param value Text that is displayed above the contents of the group or as the text of the question being answered. 299 */ 300 public QuestionnaireResponseItemComponent setText(String value) { 301 if (Utilities.noString(value)) 302 this.text = null; 303 else { 304 if (this.text == null) 305 this.text = new StringType(); 306 this.text.setValue(value); 307 } 308 return this; 309 } 310 311 /** 312 * @return {@link #subject} (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) 313 */ 314 public Reference getSubject() { 315 if (this.subject == null) 316 if (Configuration.errorOnAutoCreate()) 317 throw new Error("Attempt to auto-create QuestionnaireResponseItemComponent.subject"); 318 else if (Configuration.doAutoCreate()) 319 this.subject = new Reference(); // cc 320 return this.subject; 321 } 322 323 public boolean hasSubject() { 324 return this.subject != null && !this.subject.isEmpty(); 325 } 326 327 /** 328 * @param value {@link #subject} (More specific subject this section's answers are about, details the subject given in QuestionnaireResponse.) 329 */ 330 public QuestionnaireResponseItemComponent setSubject(Reference value) { 331 this.subject = value; 332 return this; 333 } 334 335 /** 336 * @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.) 337 */ 338 public Resource getSubjectTarget() { 339 return this.subjectTarget; 340 } 341 342 /** 343 * @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.) 344 */ 345 public QuestionnaireResponseItemComponent setSubjectTarget(Resource value) { 346 this.subjectTarget = value; 347 return this; 348 } 349 350 /** 351 * @return {@link #answer} (The respondent's answer(s) to the question.) 352 */ 353 public List<QuestionnaireResponseItemAnswerComponent> getAnswer() { 354 if (this.answer == null) 355 this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 356 return this.answer; 357 } 358 359 public boolean hasAnswer() { 360 if (this.answer == null) 361 return false; 362 for (QuestionnaireResponseItemAnswerComponent item : this.answer) 363 if (!item.isEmpty()) 364 return true; 365 return false; 366 } 367 368 /** 369 * @return {@link #answer} (The respondent's answer(s) to the question.) 370 */ 371 // syntactic sugar 372 public QuestionnaireResponseItemAnswerComponent addAnswer() { //3 373 QuestionnaireResponseItemAnswerComponent t = new QuestionnaireResponseItemAnswerComponent(); 374 if (this.answer == null) 375 this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 376 this.answer.add(t); 377 return t; 378 } 379 380 // syntactic sugar 381 public QuestionnaireResponseItemComponent addAnswer(QuestionnaireResponseItemAnswerComponent t) { //3 382 if (t == null) 383 return this; 384 if (this.answer == null) 385 this.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 386 this.answer.add(t); 387 return this; 388 } 389 390 /** 391 * @return {@link #item} (Questions or sub-groups nested beneath a question or group.) 392 */ 393 public List<QuestionnaireResponseItemComponent> getItem() { 394 if (this.item == null) 395 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 396 return this.item; 397 } 398 399 public boolean hasItem() { 400 if (this.item == null) 401 return false; 402 for (QuestionnaireResponseItemComponent item : this.item) 403 if (!item.isEmpty()) 404 return true; 405 return false; 406 } 407 408 /** 409 * @return {@link #item} (Questions or sub-groups nested beneath a question or group.) 410 */ 411 // syntactic sugar 412 public QuestionnaireResponseItemComponent addItem() { //3 413 QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); 414 if (this.item == null) 415 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 416 this.item.add(t); 417 return t; 418 } 419 420 // syntactic sugar 421 public QuestionnaireResponseItemComponent addItem(QuestionnaireResponseItemComponent t) { //3 422 if (t == null) 423 return this; 424 if (this.item == null) 425 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 426 this.item.add(t); 427 return this; 428 } 429 430 protected void listChildren(List<Property> childrenList) { 431 super.listChildren(childrenList); 432 childrenList.add(new Property("linkId", "string", "Identifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); 433 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)); 434 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)); 435 childrenList.add(new Property("answer", "", "The respondent's answer(s) to the question.", 0, java.lang.Integer.MAX_VALUE, answer)); 436 childrenList.add(new Property("item", "@QuestionnaireResponse.item", "Questions or sub-groups nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item)); 437 } 438 439 @Override 440 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 441 switch (hash) { 442 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : new Base[] {this.linkId}; // StringType 443 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 444 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 445 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : this.answer.toArray(new Base[this.answer.size()]); // QuestionnaireResponseItemAnswerComponent 446 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent 447 default: return super.getProperty(hash, name, checkValid); 448 } 449 450 } 451 452 @Override 453 public void setProperty(int hash, String name, Base value) throws FHIRException { 454 switch (hash) { 455 case -1102667083: // linkId 456 this.linkId = castToString(value); // StringType 457 break; 458 case 3556653: // text 459 this.text = castToString(value); // StringType 460 break; 461 case -1867885268: // subject 462 this.subject = castToReference(value); // Reference 463 break; 464 case -1412808770: // answer 465 this.getAnswer().add((QuestionnaireResponseItemAnswerComponent) value); // QuestionnaireResponseItemAnswerComponent 466 break; 467 case 3242771: // item 468 this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent 469 break; 470 default: super.setProperty(hash, name, value); 471 } 472 473 } 474 475 @Override 476 public void setProperty(String name, Base value) throws FHIRException { 477 if (name.equals("linkId")) 478 this.linkId = castToString(value); // StringType 479 else if (name.equals("text")) 480 this.text = castToString(value); // StringType 481 else if (name.equals("subject")) 482 this.subject = castToReference(value); // Reference 483 else if (name.equals("answer")) 484 this.getAnswer().add((QuestionnaireResponseItemAnswerComponent) value); 485 else if (name.equals("item")) 486 this.getItem().add((QuestionnaireResponseItemComponent) value); 487 else 488 super.setProperty(name, value); 489 } 490 491 @Override 492 public Base makeProperty(int hash, String name) throws FHIRException { 493 switch (hash) { 494 case -1102667083: throw new FHIRException("Cannot make property linkId as it is not a complex type"); // StringType 495 case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType 496 case -1867885268: return getSubject(); // Reference 497 case -1412808770: return addAnswer(); // QuestionnaireResponseItemAnswerComponent 498 case 3242771: return addItem(); // QuestionnaireResponseItemComponent 499 default: return super.makeProperty(hash, name); 500 } 501 502 } 503 504 @Override 505 public Base addChild(String name) throws FHIRException { 506 if (name.equals("linkId")) { 507 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.linkId"); 508 } 509 else if (name.equals("text")) { 510 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.text"); 511 } 512 else if (name.equals("subject")) { 513 this.subject = new Reference(); 514 return this.subject; 515 } 516 else if (name.equals("answer")) { 517 return addAnswer(); 518 } 519 else if (name.equals("item")) { 520 return addItem(); 521 } 522 else 523 return super.addChild(name); 524 } 525 526 public QuestionnaireResponseItemComponent copy() { 527 QuestionnaireResponseItemComponent dst = new QuestionnaireResponseItemComponent(); 528 copyValues(dst); 529 dst.linkId = linkId == null ? null : linkId.copy(); 530 dst.text = text == null ? null : text.copy(); 531 dst.subject = subject == null ? null : subject.copy(); 532 if (answer != null) { 533 dst.answer = new ArrayList<QuestionnaireResponseItemAnswerComponent>(); 534 for (QuestionnaireResponseItemAnswerComponent i : answer) 535 dst.answer.add(i.copy()); 536 }; 537 if (item != null) { 538 dst.item = new ArrayList<QuestionnaireResponseItemComponent>(); 539 for (QuestionnaireResponseItemComponent i : item) 540 dst.item.add(i.copy()); 541 }; 542 return dst; 543 } 544 545 @Override 546 public boolean equalsDeep(Base other) { 547 if (!super.equalsDeep(other)) 548 return false; 549 if (!(other instanceof QuestionnaireResponseItemComponent)) 550 return false; 551 QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other; 552 return compareDeep(linkId, o.linkId, true) && compareDeep(text, o.text, true) && compareDeep(subject, o.subject, true) 553 && compareDeep(answer, o.answer, true) && compareDeep(item, o.item, true); 554 } 555 556 @Override 557 public boolean equalsShallow(Base other) { 558 if (!super.equalsShallow(other)) 559 return false; 560 if (!(other instanceof QuestionnaireResponseItemComponent)) 561 return false; 562 QuestionnaireResponseItemComponent o = (QuestionnaireResponseItemComponent) other; 563 return compareValues(linkId, o.linkId, true) && compareValues(text, o.text, true); 564 } 565 566 public boolean isEmpty() { 567 return super.isEmpty() && (linkId == null || linkId.isEmpty()) && (text == null || text.isEmpty()) 568 && (subject == null || subject.isEmpty()) && (answer == null || answer.isEmpty()) && (item == null || item.isEmpty()) 569 ; 570 } 571 572 public String fhirType() { 573 return "QuestionnaireResponse.item"; 574 575 } 576 577 } 578 579 @Block() 580 public static class QuestionnaireResponseItemAnswerComponent extends BackboneElement implements IBaseBackboneElement { 581 /** 582 * The answer (or one of the answers) provided by the respondent to the question. 583 */ 584 @Child(name = "value", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=1, min=0, max=1, modifier=false, summary=false) 585 @Description(shortDefinition="Single-valued answer to the question", formalDefinition="The answer (or one of the answers) provided by the respondent to the question." ) 586 protected Type value; 587 588 /** 589 * Nested groups and/or questions found within this particular answer. 590 */ 591 @Child(name = "item", type = {QuestionnaireResponseItemComponent.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 592 @Description(shortDefinition="Nested groups and questions", formalDefinition="Nested groups and/or questions found within this particular answer." ) 593 protected List<QuestionnaireResponseItemComponent> item; 594 595 private static final long serialVersionUID = 2052422636L; 596 597 /** 598 * Constructor 599 */ 600 public QuestionnaireResponseItemAnswerComponent() { 601 super(); 602 } 603 604 /** 605 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 606 */ 607 public Type getValue() { 608 return this.value; 609 } 610 611 /** 612 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 613 */ 614 public BooleanType getValueBooleanType() throws FHIRException { 615 if (!(this.value instanceof BooleanType)) 616 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 617 return (BooleanType) this.value; 618 } 619 620 public boolean hasValueBooleanType() { 621 return this.value instanceof BooleanType; 622 } 623 624 /** 625 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 626 */ 627 public DecimalType getValueDecimalType() throws FHIRException { 628 if (!(this.value instanceof DecimalType)) 629 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); 630 return (DecimalType) this.value; 631 } 632 633 public boolean hasValueDecimalType() { 634 return this.value instanceof DecimalType; 635 } 636 637 /** 638 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 639 */ 640 public IntegerType getValueIntegerType() throws FHIRException { 641 if (!(this.value instanceof IntegerType)) 642 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 643 return (IntegerType) this.value; 644 } 645 646 public boolean hasValueIntegerType() { 647 return this.value instanceof IntegerType; 648 } 649 650 /** 651 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 652 */ 653 public DateType getValueDateType() throws FHIRException { 654 if (!(this.value instanceof DateType)) 655 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 656 return (DateType) this.value; 657 } 658 659 public boolean hasValueDateType() { 660 return this.value instanceof DateType; 661 } 662 663 /** 664 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 665 */ 666 public DateTimeType getValueDateTimeType() throws FHIRException { 667 if (!(this.value instanceof DateTimeType)) 668 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 669 return (DateTimeType) this.value; 670 } 671 672 public boolean hasValueDateTimeType() { 673 return this.value instanceof DateTimeType; 674 } 675 676 /** 677 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 678 */ 679 public InstantType getValueInstantType() throws FHIRException { 680 if (!(this.value instanceof InstantType)) 681 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered"); 682 return (InstantType) this.value; 683 } 684 685 public boolean hasValueInstantType() { 686 return this.value instanceof InstantType; 687 } 688 689 /** 690 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 691 */ 692 public TimeType getValueTimeType() throws FHIRException { 693 if (!(this.value instanceof TimeType)) 694 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 695 return (TimeType) this.value; 696 } 697 698 public boolean hasValueTimeType() { 699 return this.value instanceof TimeType; 700 } 701 702 /** 703 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 704 */ 705 public StringType getValueStringType() throws FHIRException { 706 if (!(this.value instanceof StringType)) 707 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 708 return (StringType) this.value; 709 } 710 711 public boolean hasValueStringType() { 712 return this.value instanceof StringType; 713 } 714 715 /** 716 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 717 */ 718 public UriType getValueUriType() throws FHIRException { 719 if (!(this.value instanceof UriType)) 720 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); 721 return (UriType) this.value; 722 } 723 724 public boolean hasValueUriType() { 725 return this.value instanceof UriType; 726 } 727 728 /** 729 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 730 */ 731 public Attachment getValueAttachment() throws FHIRException { 732 if (!(this.value instanceof Attachment)) 733 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 734 return (Attachment) this.value; 735 } 736 737 public boolean hasValueAttachment() { 738 return this.value instanceof Attachment; 739 } 740 741 /** 742 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 743 */ 744 public Coding getValueCoding() throws FHIRException { 745 if (!(this.value instanceof Coding)) 746 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 747 return (Coding) this.value; 748 } 749 750 public boolean hasValueCoding() { 751 return this.value instanceof Coding; 752 } 753 754 /** 755 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 756 */ 757 public Quantity getValueQuantity() throws FHIRException { 758 if (!(this.value instanceof Quantity)) 759 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 760 return (Quantity) this.value; 761 } 762 763 public boolean hasValueQuantity() { 764 return this.value instanceof Quantity; 765 } 766 767 /** 768 * @return {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 769 */ 770 public Reference getValueReference() throws FHIRException { 771 if (!(this.value instanceof Reference)) 772 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 773 return (Reference) this.value; 774 } 775 776 public boolean hasValueReference() { 777 return this.value instanceof Reference; 778 } 779 780 public boolean hasValue() { 781 return this.value != null && !this.value.isEmpty(); 782 } 783 784 /** 785 * @param value {@link #value} (The answer (or one of the answers) provided by the respondent to the question.) 786 */ 787 public QuestionnaireResponseItemAnswerComponent setValue(Type value) { 788 this.value = value; 789 return this; 790 } 791 792 /** 793 * @return {@link #item} (Nested groups and/or questions found within this particular answer.) 794 */ 795 public List<QuestionnaireResponseItemComponent> getItem() { 796 if (this.item == null) 797 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 798 return this.item; 799 } 800 801 public boolean hasItem() { 802 if (this.item == null) 803 return false; 804 for (QuestionnaireResponseItemComponent item : this.item) 805 if (!item.isEmpty()) 806 return true; 807 return false; 808 } 809 810 /** 811 * @return {@link #item} (Nested groups and/or questions found within this particular answer.) 812 */ 813 // syntactic sugar 814 public QuestionnaireResponseItemComponent addItem() { //3 815 QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); 816 if (this.item == null) 817 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 818 this.item.add(t); 819 return t; 820 } 821 822 // syntactic sugar 823 public QuestionnaireResponseItemAnswerComponent addItem(QuestionnaireResponseItemComponent t) { //3 824 if (t == null) 825 return this; 826 if (this.item == null) 827 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 828 this.item.add(t); 829 return this; 830 } 831 832 protected void listChildren(List<Property> childrenList) { 833 super.listChildren(childrenList); 834 childrenList.add(new Property("value[x]", "boolean|decimal|integer|date|dateTime|instant|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)); 835 childrenList.add(new Property("item", "@QuestionnaireResponse.item", "Nested groups and/or questions found within this particular answer.", 0, java.lang.Integer.MAX_VALUE, item)); 836 } 837 838 @Override 839 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 840 switch (hash) { 841 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 842 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent 843 default: return super.getProperty(hash, name, checkValid); 844 } 845 846 } 847 848 @Override 849 public void setProperty(int hash, String name, Base value) throws FHIRException { 850 switch (hash) { 851 case 111972721: // value 852 this.value = (Type) value; // Type 853 break; 854 case 3242771: // item 855 this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent 856 break; 857 default: super.setProperty(hash, name, value); 858 } 859 860 } 861 862 @Override 863 public void setProperty(String name, Base value) throws FHIRException { 864 if (name.equals("value[x]")) 865 this.value = (Type) value; // Type 866 else if (name.equals("item")) 867 this.getItem().add((QuestionnaireResponseItemComponent) value); 868 else 869 super.setProperty(name, value); 870 } 871 872 @Override 873 public Base makeProperty(int hash, String name) throws FHIRException { 874 switch (hash) { 875 case -1410166417: return getValue(); // Type 876 case 3242771: return addItem(); // QuestionnaireResponseItemComponent 877 default: return super.makeProperty(hash, name); 878 } 879 880 } 881 882 @Override 883 public Base addChild(String name) throws FHIRException { 884 if (name.equals("valueBoolean")) { 885 this.value = new BooleanType(); 886 return this.value; 887 } 888 else if (name.equals("valueDecimal")) { 889 this.value = new DecimalType(); 890 return this.value; 891 } 892 else if (name.equals("valueInteger")) { 893 this.value = new IntegerType(); 894 return this.value; 895 } 896 else if (name.equals("valueDate")) { 897 this.value = new DateType(); 898 return this.value; 899 } 900 else if (name.equals("valueDateTime")) { 901 this.value = new DateTimeType(); 902 return this.value; 903 } 904 else if (name.equals("valueInstant")) { 905 this.value = new InstantType(); 906 return this.value; 907 } 908 else if (name.equals("valueTime")) { 909 this.value = new TimeType(); 910 return this.value; 911 } 912 else if (name.equals("valueString")) { 913 this.value = new StringType(); 914 return this.value; 915 } 916 else if (name.equals("valueUri")) { 917 this.value = new UriType(); 918 return this.value; 919 } 920 else if (name.equals("valueAttachment")) { 921 this.value = new Attachment(); 922 return this.value; 923 } 924 else if (name.equals("valueCoding")) { 925 this.value = new Coding(); 926 return this.value; 927 } 928 else if (name.equals("valueQuantity")) { 929 this.value = new Quantity(); 930 return this.value; 931 } 932 else if (name.equals("valueReference")) { 933 this.value = new Reference(); 934 return this.value; 935 } 936 else if (name.equals("item")) { 937 return addItem(); 938 } 939 else 940 return super.addChild(name); 941 } 942 943 public QuestionnaireResponseItemAnswerComponent copy() { 944 QuestionnaireResponseItemAnswerComponent dst = new QuestionnaireResponseItemAnswerComponent(); 945 copyValues(dst); 946 dst.value = value == null ? null : value.copy(); 947 if (item != null) { 948 dst.item = new ArrayList<QuestionnaireResponseItemComponent>(); 949 for (QuestionnaireResponseItemComponent i : item) 950 dst.item.add(i.copy()); 951 }; 952 return dst; 953 } 954 955 @Override 956 public boolean equalsDeep(Base other) { 957 if (!super.equalsDeep(other)) 958 return false; 959 if (!(other instanceof QuestionnaireResponseItemAnswerComponent)) 960 return false; 961 QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other; 962 return compareDeep(value, o.value, true) && compareDeep(item, o.item, true); 963 } 964 965 @Override 966 public boolean equalsShallow(Base other) { 967 if (!super.equalsShallow(other)) 968 return false; 969 if (!(other instanceof QuestionnaireResponseItemAnswerComponent)) 970 return false; 971 QuestionnaireResponseItemAnswerComponent o = (QuestionnaireResponseItemAnswerComponent) other; 972 return true; 973 } 974 975 public boolean isEmpty() { 976 return super.isEmpty() && (value == null || value.isEmpty()) && (item == null || item.isEmpty()) 977 ; 978 } 979 980 public String fhirType() { 981 return "QuestionnaireResponse.item.answer"; 982 983 } 984 985 } 986 987 /** 988 * A business identifier assigned to a particular completed (or partially completed) questionnaire. 989 */ 990 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 991 @Description(shortDefinition="Unique id for this set of answers", formalDefinition="A business identifier assigned to a particular completed (or partially completed) questionnaire." ) 992 protected Identifier identifier; 993 994 /** 995 * Indicates the Questionnaire resource that defines the form for which answers are being provided. 996 */ 997 @Child(name = "questionnaire", type = {Questionnaire.class}, order=1, min=0, max=1, modifier=false, summary=true) 998 @Description(shortDefinition="Form being answered", formalDefinition="Indicates the Questionnaire resource that defines the form for which answers are being provided." ) 999 protected Reference questionnaire; 1000 1001 /** 1002 * The actual object that is the target of the reference (Indicates the Questionnaire resource that defines the form for which answers are being provided.) 1003 */ 1004 protected Questionnaire questionnaireTarget; 1005 1006 /** 1007 * The lifecycle status of the questionnaire response as a whole. 1008 */ 1009 @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) 1010 @Description(shortDefinition="in-progress | completed | amended", formalDefinition="The lifecycle status of the questionnaire response as a whole." ) 1011 protected Enumeration<QuestionnaireResponseStatus> status; 1012 1013 /** 1014 * 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. 1015 */ 1016 @Child(name = "subject", type = {}, order=3, min=0, max=1, modifier=false, summary=true) 1017 @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." ) 1018 protected Reference subject; 1019 1020 /** 1021 * 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.) 1022 */ 1023 protected Resource subjectTarget; 1024 1025 /** 1026 * Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system. 1027 */ 1028 @Child(name = "author", type = {Device.class, Practitioner.class, Patient.class, RelatedPerson.class}, order=4, min=0, max=1, modifier=false, summary=true) 1029 @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." ) 1030 protected Reference author; 1031 1032 /** 1033 * 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.) 1034 */ 1035 protected Resource authorTarget; 1036 1037 /** 1038 * The date and/or time that this version of the questionnaire response was authored. 1039 */ 1040 @Child(name = "authored", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1041 @Description(shortDefinition="Date this version was authored", formalDefinition="The date and/or time that this version of the questionnaire response was authored." ) 1042 protected DateTimeType authored; 1043 1044 /** 1045 * The person who answered the questions about the subject. 1046 */ 1047 @Child(name = "source", type = {Patient.class, Practitioner.class, RelatedPerson.class}, order=6, min=0, max=1, modifier=false, summary=true) 1048 @Description(shortDefinition="The person who answered the questions", formalDefinition="The person who answered the questions about the subject." ) 1049 protected Reference source; 1050 1051 /** 1052 * The actual object that is the target of the reference (The person who answered the questions about the subject.) 1053 */ 1054 protected Resource sourceTarget; 1055 1056 /** 1057 * Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers. 1058 */ 1059 @Child(name = "encounter", type = {Encounter.class}, order=7, min=0, max=1, modifier=false, summary=true) 1060 @Description(shortDefinition="Primary encounter during which the answers were collected", formalDefinition="Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers." ) 1061 protected Reference encounter; 1062 1063 /** 1064 * The actual object that is the target of the reference (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) 1065 */ 1066 protected Encounter encounterTarget; 1067 1068 /** 1069 * Corresponds to a group or question item from the original questionnaire. 1070 */ 1071 @Child(name = "item", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1072 @Description(shortDefinition="Groups and questions", formalDefinition="Corresponds to a group or question item from the original questionnaire." ) 1073 protected List<QuestionnaireResponseItemComponent> item; 1074 1075 private static final long serialVersionUID = 850624885L; 1076 1077 /** 1078 * Constructor 1079 */ 1080 public QuestionnaireResponse() { 1081 super(); 1082 } 1083 1084 /** 1085 * Constructor 1086 */ 1087 public QuestionnaireResponse(Enumeration<QuestionnaireResponseStatus> status) { 1088 super(); 1089 this.status = status; 1090 } 1091 1092 /** 1093 * @return {@link #identifier} (A business identifier assigned to a particular completed (or partially completed) questionnaire.) 1094 */ 1095 public Identifier getIdentifier() { 1096 if (this.identifier == null) 1097 if (Configuration.errorOnAutoCreate()) 1098 throw new Error("Attempt to auto-create QuestionnaireResponse.identifier"); 1099 else if (Configuration.doAutoCreate()) 1100 this.identifier = new Identifier(); // cc 1101 return this.identifier; 1102 } 1103 1104 public boolean hasIdentifier() { 1105 return this.identifier != null && !this.identifier.isEmpty(); 1106 } 1107 1108 /** 1109 * @param value {@link #identifier} (A business identifier assigned to a particular completed (or partially completed) questionnaire.) 1110 */ 1111 public QuestionnaireResponse setIdentifier(Identifier value) { 1112 this.identifier = value; 1113 return this; 1114 } 1115 1116 /** 1117 * @return {@link #questionnaire} (Indicates the Questionnaire resource that defines the form for which answers are being provided.) 1118 */ 1119 public Reference getQuestionnaire() { 1120 if (this.questionnaire == null) 1121 if (Configuration.errorOnAutoCreate()) 1122 throw new Error("Attempt to auto-create QuestionnaireResponse.questionnaire"); 1123 else if (Configuration.doAutoCreate()) 1124 this.questionnaire = new Reference(); // cc 1125 return this.questionnaire; 1126 } 1127 1128 public boolean hasQuestionnaire() { 1129 return this.questionnaire != null && !this.questionnaire.isEmpty(); 1130 } 1131 1132 /** 1133 * @param value {@link #questionnaire} (Indicates the Questionnaire resource that defines the form for which answers are being provided.) 1134 */ 1135 public QuestionnaireResponse setQuestionnaire(Reference value) { 1136 this.questionnaire = value; 1137 return this; 1138 } 1139 1140 /** 1141 * @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. (Indicates the Questionnaire resource that defines the form for which answers are being provided.) 1142 */ 1143 public Questionnaire getQuestionnaireTarget() { 1144 if (this.questionnaireTarget == null) 1145 if (Configuration.errorOnAutoCreate()) 1146 throw new Error("Attempt to auto-create QuestionnaireResponse.questionnaire"); 1147 else if (Configuration.doAutoCreate()) 1148 this.questionnaireTarget = new Questionnaire(); // aa 1149 return this.questionnaireTarget; 1150 } 1151 1152 /** 1153 * @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. (Indicates the Questionnaire resource that defines the form for which answers are being provided.) 1154 */ 1155 public QuestionnaireResponse setQuestionnaireTarget(Questionnaire value) { 1156 this.questionnaireTarget = value; 1157 return this; 1158 } 1159 1160 /** 1161 * @return {@link #status} (The lifecycle status of the questionnaire response as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1162 */ 1163 public Enumeration<QuestionnaireResponseStatus> getStatusElement() { 1164 if (this.status == null) 1165 if (Configuration.errorOnAutoCreate()) 1166 throw new Error("Attempt to auto-create QuestionnaireResponse.status"); 1167 else if (Configuration.doAutoCreate()) 1168 this.status = new Enumeration<QuestionnaireResponseStatus>(new QuestionnaireResponseStatusEnumFactory()); // bb 1169 return this.status; 1170 } 1171 1172 public boolean hasStatusElement() { 1173 return this.status != null && !this.status.isEmpty(); 1174 } 1175 1176 public boolean hasStatus() { 1177 return this.status != null && !this.status.isEmpty(); 1178 } 1179 1180 /** 1181 * @param value {@link #status} (The lifecycle status of the questionnaire response as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1182 */ 1183 public QuestionnaireResponse setStatusElement(Enumeration<QuestionnaireResponseStatus> value) { 1184 this.status = value; 1185 return this; 1186 } 1187 1188 /** 1189 * @return The lifecycle status of the questionnaire response as a whole. 1190 */ 1191 public QuestionnaireResponseStatus getStatus() { 1192 return this.status == null ? null : this.status.getValue(); 1193 } 1194 1195 /** 1196 * @param value The lifecycle status of the questionnaire response as a whole. 1197 */ 1198 public QuestionnaireResponse setStatus(QuestionnaireResponseStatus value) { 1199 if (this.status == null) 1200 this.status = new Enumeration<QuestionnaireResponseStatus>(new QuestionnaireResponseStatusEnumFactory()); 1201 this.status.setValue(value); 1202 return this; 1203 } 1204 1205 /** 1206 * @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.) 1207 */ 1208 public Reference getSubject() { 1209 if (this.subject == null) 1210 if (Configuration.errorOnAutoCreate()) 1211 throw new Error("Attempt to auto-create QuestionnaireResponse.subject"); 1212 else if (Configuration.doAutoCreate()) 1213 this.subject = new Reference(); // cc 1214 return this.subject; 1215 } 1216 1217 public boolean hasSubject() { 1218 return this.subject != null && !this.subject.isEmpty(); 1219 } 1220 1221 /** 1222 * @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.) 1223 */ 1224 public QuestionnaireResponse setSubject(Reference value) { 1225 this.subject = value; 1226 return this; 1227 } 1228 1229 /** 1230 * @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.) 1231 */ 1232 public Resource getSubjectTarget() { 1233 return this.subjectTarget; 1234 } 1235 1236 /** 1237 * @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.) 1238 */ 1239 public QuestionnaireResponse setSubjectTarget(Resource value) { 1240 this.subjectTarget = value; 1241 return this; 1242 } 1243 1244 /** 1245 * @return {@link #author} (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) 1246 */ 1247 public Reference getAuthor() { 1248 if (this.author == null) 1249 if (Configuration.errorOnAutoCreate()) 1250 throw new Error("Attempt to auto-create QuestionnaireResponse.author"); 1251 else if (Configuration.doAutoCreate()) 1252 this.author = new Reference(); // cc 1253 return this.author; 1254 } 1255 1256 public boolean hasAuthor() { 1257 return this.author != null && !this.author.isEmpty(); 1258 } 1259 1260 /** 1261 * @param value {@link #author} (Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.) 1262 */ 1263 public QuestionnaireResponse setAuthor(Reference value) { 1264 this.author = value; 1265 return this; 1266 } 1267 1268 /** 1269 * @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.) 1270 */ 1271 public Resource getAuthorTarget() { 1272 return this.authorTarget; 1273 } 1274 1275 /** 1276 * @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.) 1277 */ 1278 public QuestionnaireResponse setAuthorTarget(Resource value) { 1279 this.authorTarget = value; 1280 return this; 1281 } 1282 1283 /** 1284 * @return {@link #authored} (The date and/or time that this version of the questionnaire response was authored.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value 1285 */ 1286 public DateTimeType getAuthoredElement() { 1287 if (this.authored == null) 1288 if (Configuration.errorOnAutoCreate()) 1289 throw new Error("Attempt to auto-create QuestionnaireResponse.authored"); 1290 else if (Configuration.doAutoCreate()) 1291 this.authored = new DateTimeType(); // bb 1292 return this.authored; 1293 } 1294 1295 public boolean hasAuthoredElement() { 1296 return this.authored != null && !this.authored.isEmpty(); 1297 } 1298 1299 public boolean hasAuthored() { 1300 return this.authored != null && !this.authored.isEmpty(); 1301 } 1302 1303 /** 1304 * @param value {@link #authored} (The date and/or time that this version of the questionnaire response was authored.). This is the underlying object with id, value and extensions. The accessor "getAuthored" gives direct access to the value 1305 */ 1306 public QuestionnaireResponse setAuthoredElement(DateTimeType value) { 1307 this.authored = value; 1308 return this; 1309 } 1310 1311 /** 1312 * @return The date and/or time that this version of the questionnaire response was authored. 1313 */ 1314 public Date getAuthored() { 1315 return this.authored == null ? null : this.authored.getValue(); 1316 } 1317 1318 /** 1319 * @param value The date and/or time that this version of the questionnaire response was authored. 1320 */ 1321 public QuestionnaireResponse setAuthored(Date value) { 1322 if (value == null) 1323 this.authored = null; 1324 else { 1325 if (this.authored == null) 1326 this.authored = new DateTimeType(); 1327 this.authored.setValue(value); 1328 } 1329 return this; 1330 } 1331 1332 /** 1333 * @return {@link #source} (The person who answered the questions about the subject.) 1334 */ 1335 public Reference getSource() { 1336 if (this.source == null) 1337 if (Configuration.errorOnAutoCreate()) 1338 throw new Error("Attempt to auto-create QuestionnaireResponse.source"); 1339 else if (Configuration.doAutoCreate()) 1340 this.source = new Reference(); // cc 1341 return this.source; 1342 } 1343 1344 public boolean hasSource() { 1345 return this.source != null && !this.source.isEmpty(); 1346 } 1347 1348 /** 1349 * @param value {@link #source} (The person who answered the questions about the subject.) 1350 */ 1351 public QuestionnaireResponse setSource(Reference value) { 1352 this.source = value; 1353 return this; 1354 } 1355 1356 /** 1357 * @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.) 1358 */ 1359 public Resource getSourceTarget() { 1360 return this.sourceTarget; 1361 } 1362 1363 /** 1364 * @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.) 1365 */ 1366 public QuestionnaireResponse setSourceTarget(Resource value) { 1367 this.sourceTarget = value; 1368 return this; 1369 } 1370 1371 /** 1372 * @return {@link #encounter} (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) 1373 */ 1374 public Reference getEncounter() { 1375 if (this.encounter == null) 1376 if (Configuration.errorOnAutoCreate()) 1377 throw new Error("Attempt to auto-create QuestionnaireResponse.encounter"); 1378 else if (Configuration.doAutoCreate()) 1379 this.encounter = new Reference(); // cc 1380 return this.encounter; 1381 } 1382 1383 public boolean hasEncounter() { 1384 return this.encounter != null && !this.encounter.isEmpty(); 1385 } 1386 1387 /** 1388 * @param value {@link #encounter} (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) 1389 */ 1390 public QuestionnaireResponse setEncounter(Reference value) { 1391 this.encounter = value; 1392 return this; 1393 } 1394 1395 /** 1396 * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) 1397 */ 1398 public Encounter getEncounterTarget() { 1399 if (this.encounterTarget == null) 1400 if (Configuration.errorOnAutoCreate()) 1401 throw new Error("Attempt to auto-create QuestionnaireResponse.encounter"); 1402 else if (Configuration.doAutoCreate()) 1403 this.encounterTarget = new Encounter(); // aa 1404 return this.encounterTarget; 1405 } 1406 1407 /** 1408 * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.) 1409 */ 1410 public QuestionnaireResponse setEncounterTarget(Encounter value) { 1411 this.encounterTarget = value; 1412 return this; 1413 } 1414 1415 /** 1416 * @return {@link #item} (Corresponds to a group or question item from the original questionnaire.) 1417 */ 1418 public List<QuestionnaireResponseItemComponent> getItem() { 1419 if (this.item == null) 1420 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1421 return this.item; 1422 } 1423 1424 public boolean hasItem() { 1425 if (this.item == null) 1426 return false; 1427 for (QuestionnaireResponseItemComponent item : this.item) 1428 if (!item.isEmpty()) 1429 return true; 1430 return false; 1431 } 1432 1433 /** 1434 * @return {@link #item} (Corresponds to a group or question item from the original questionnaire.) 1435 */ 1436 // syntactic sugar 1437 public QuestionnaireResponseItemComponent addItem() { //3 1438 QuestionnaireResponseItemComponent t = new QuestionnaireResponseItemComponent(); 1439 if (this.item == null) 1440 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1441 this.item.add(t); 1442 return t; 1443 } 1444 1445 // syntactic sugar 1446 public QuestionnaireResponse addItem(QuestionnaireResponseItemComponent t) { //3 1447 if (t == null) 1448 return this; 1449 if (this.item == null) 1450 this.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1451 this.item.add(t); 1452 return this; 1453 } 1454 1455 protected void listChildren(List<Property> childrenList) { 1456 super.listChildren(childrenList); 1457 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)); 1458 childrenList.add(new Property("questionnaire", "Reference(Questionnaire)", "Indicates the Questionnaire resource that defines the form for which answers are being provided.", 0, java.lang.Integer.MAX_VALUE, questionnaire)); 1459 childrenList.add(new Property("status", "code", "The lifecycle status of the questionnaire response as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); 1460 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)); 1461 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)); 1462 childrenList.add(new Property("authored", "dateTime", "The date and/or time that this version of the questionnaire response was authored.", 0, java.lang.Integer.MAX_VALUE, authored)); 1463 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)); 1464 childrenList.add(new Property("encounter", "Reference(Encounter)", "Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answers.", 0, java.lang.Integer.MAX_VALUE, encounter)); 1465 childrenList.add(new Property("item", "", "Corresponds to a group or question item from the original questionnaire.", 0, java.lang.Integer.MAX_VALUE, item)); 1466 } 1467 1468 @Override 1469 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1470 switch (hash) { 1471 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1472 case -1017049693: /*questionnaire*/ return this.questionnaire == null ? new Base[0] : new Base[] {this.questionnaire}; // Reference 1473 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<QuestionnaireResponseStatus> 1474 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1475 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 1476 case 1433073514: /*authored*/ return this.authored == null ? new Base[0] : new Base[] {this.authored}; // DateTimeType 1477 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Reference 1478 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 1479 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireResponseItemComponent 1480 default: return super.getProperty(hash, name, checkValid); 1481 } 1482 1483 } 1484 1485 @Override 1486 public void setProperty(int hash, String name, Base value) throws FHIRException { 1487 switch (hash) { 1488 case -1618432855: // identifier 1489 this.identifier = castToIdentifier(value); // Identifier 1490 break; 1491 case -1017049693: // questionnaire 1492 this.questionnaire = castToReference(value); // Reference 1493 break; 1494 case -892481550: // status 1495 this.status = new QuestionnaireResponseStatusEnumFactory().fromType(value); // Enumeration<QuestionnaireResponseStatus> 1496 break; 1497 case -1867885268: // subject 1498 this.subject = castToReference(value); // Reference 1499 break; 1500 case -1406328437: // author 1501 this.author = castToReference(value); // Reference 1502 break; 1503 case 1433073514: // authored 1504 this.authored = castToDateTime(value); // DateTimeType 1505 break; 1506 case -896505829: // source 1507 this.source = castToReference(value); // Reference 1508 break; 1509 case 1524132147: // encounter 1510 this.encounter = castToReference(value); // Reference 1511 break; 1512 case 3242771: // item 1513 this.getItem().add((QuestionnaireResponseItemComponent) value); // QuestionnaireResponseItemComponent 1514 break; 1515 default: super.setProperty(hash, name, value); 1516 } 1517 1518 } 1519 1520 @Override 1521 public void setProperty(String name, Base value) throws FHIRException { 1522 if (name.equals("identifier")) 1523 this.identifier = castToIdentifier(value); // Identifier 1524 else if (name.equals("questionnaire")) 1525 this.questionnaire = castToReference(value); // Reference 1526 else if (name.equals("status")) 1527 this.status = new QuestionnaireResponseStatusEnumFactory().fromType(value); // Enumeration<QuestionnaireResponseStatus> 1528 else if (name.equals("subject")) 1529 this.subject = castToReference(value); // Reference 1530 else if (name.equals("author")) 1531 this.author = castToReference(value); // Reference 1532 else if (name.equals("authored")) 1533 this.authored = castToDateTime(value); // DateTimeType 1534 else if (name.equals("source")) 1535 this.source = castToReference(value); // Reference 1536 else if (name.equals("encounter")) 1537 this.encounter = castToReference(value); // Reference 1538 else if (name.equals("item")) 1539 this.getItem().add((QuestionnaireResponseItemComponent) value); 1540 else 1541 super.setProperty(name, value); 1542 } 1543 1544 @Override 1545 public Base makeProperty(int hash, String name) throws FHIRException { 1546 switch (hash) { 1547 case -1618432855: return getIdentifier(); // Identifier 1548 case -1017049693: return getQuestionnaire(); // Reference 1549 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<QuestionnaireResponseStatus> 1550 case -1867885268: return getSubject(); // Reference 1551 case -1406328437: return getAuthor(); // Reference 1552 case 1433073514: throw new FHIRException("Cannot make property authored as it is not a complex type"); // DateTimeType 1553 case -896505829: return getSource(); // Reference 1554 case 1524132147: return getEncounter(); // Reference 1555 case 3242771: return addItem(); // QuestionnaireResponseItemComponent 1556 default: return super.makeProperty(hash, name); 1557 } 1558 1559 } 1560 1561 @Override 1562 public Base addChild(String name) throws FHIRException { 1563 if (name.equals("identifier")) { 1564 this.identifier = new Identifier(); 1565 return this.identifier; 1566 } 1567 else if (name.equals("questionnaire")) { 1568 this.questionnaire = new Reference(); 1569 return this.questionnaire; 1570 } 1571 else if (name.equals("status")) { 1572 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.status"); 1573 } 1574 else if (name.equals("subject")) { 1575 this.subject = new Reference(); 1576 return this.subject; 1577 } 1578 else if (name.equals("author")) { 1579 this.author = new Reference(); 1580 return this.author; 1581 } 1582 else if (name.equals("authored")) { 1583 throw new FHIRException("Cannot call addChild on a primitive type QuestionnaireResponse.authored"); 1584 } 1585 else if (name.equals("source")) { 1586 this.source = new Reference(); 1587 return this.source; 1588 } 1589 else if (name.equals("encounter")) { 1590 this.encounter = new Reference(); 1591 return this.encounter; 1592 } 1593 else if (name.equals("item")) { 1594 return addItem(); 1595 } 1596 else 1597 return super.addChild(name); 1598 } 1599 1600 public String fhirType() { 1601 return "QuestionnaireResponse"; 1602 1603 } 1604 1605 public QuestionnaireResponse copy() { 1606 QuestionnaireResponse dst = new QuestionnaireResponse(); 1607 copyValues(dst); 1608 dst.identifier = identifier == null ? null : identifier.copy(); 1609 dst.questionnaire = questionnaire == null ? null : questionnaire.copy(); 1610 dst.status = status == null ? null : status.copy(); 1611 dst.subject = subject == null ? null : subject.copy(); 1612 dst.author = author == null ? null : author.copy(); 1613 dst.authored = authored == null ? null : authored.copy(); 1614 dst.source = source == null ? null : source.copy(); 1615 dst.encounter = encounter == null ? null : encounter.copy(); 1616 if (item != null) { 1617 dst.item = new ArrayList<QuestionnaireResponseItemComponent>(); 1618 for (QuestionnaireResponseItemComponent i : item) 1619 dst.item.add(i.copy()); 1620 }; 1621 return dst; 1622 } 1623 1624 protected QuestionnaireResponse typedCopy() { 1625 return copy(); 1626 } 1627 1628 @Override 1629 public boolean equalsDeep(Base other) { 1630 if (!super.equalsDeep(other)) 1631 return false; 1632 if (!(other instanceof QuestionnaireResponse)) 1633 return false; 1634 QuestionnaireResponse o = (QuestionnaireResponse) other; 1635 return compareDeep(identifier, o.identifier, true) && compareDeep(questionnaire, o.questionnaire, true) 1636 && compareDeep(status, o.status, true) && compareDeep(subject, o.subject, true) && compareDeep(author, o.author, true) 1637 && compareDeep(authored, o.authored, true) && compareDeep(source, o.source, true) && compareDeep(encounter, o.encounter, true) 1638 && compareDeep(item, o.item, true); 1639 } 1640 1641 @Override 1642 public boolean equalsShallow(Base other) { 1643 if (!super.equalsShallow(other)) 1644 return false; 1645 if (!(other instanceof QuestionnaireResponse)) 1646 return false; 1647 QuestionnaireResponse o = (QuestionnaireResponse) other; 1648 return compareValues(status, o.status, true) && compareValues(authored, o.authored, true); 1649 } 1650 1651 public boolean isEmpty() { 1652 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (questionnaire == null || questionnaire.isEmpty()) 1653 && (status == null || status.isEmpty()) && (subject == null || subject.isEmpty()) && (author == null || author.isEmpty()) 1654 && (authored == null || authored.isEmpty()) && (source == null || source.isEmpty()) && (encounter == null || encounter.isEmpty()) 1655 && (item == null || item.isEmpty()); 1656 } 1657 1658 @Override 1659 public ResourceType getResourceType() { 1660 return ResourceType.QuestionnaireResponse; 1661 } 1662 1663 /** 1664 * Search parameter: <b>author</b> 1665 * <p> 1666 * Description: <b>The author of the questionnaire</b><br> 1667 * Type: <b>reference</b><br> 1668 * Path: <b>QuestionnaireResponse.author</b><br> 1669 * </p> 1670 */ 1671 @SearchParamDefinition(name="author", path="QuestionnaireResponse.author", description="The author of the questionnaire", type="reference" ) 1672 public static final String SP_AUTHOR = "author"; 1673 /** 1674 * <b>Fluent Client</b> search parameter constant for <b>author</b> 1675 * <p> 1676 * Description: <b>The author of the questionnaire</b><br> 1677 * Type: <b>reference</b><br> 1678 * Path: <b>QuestionnaireResponse.author</b><br> 1679 * </p> 1680 */ 1681 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); 1682 1683/** 1684 * Constant for fluent queries to be used to add include statements. Specifies 1685 * the path value of "<b>QuestionnaireResponse:author</b>". 1686 */ 1687 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:author").toLocked(); 1688 1689 /** 1690 * Search parameter: <b>questionnaire</b> 1691 * <p> 1692 * Description: <b>The questionnaire the answers are provided for</b><br> 1693 * Type: <b>reference</b><br> 1694 * Path: <b>QuestionnaireResponse.questionnaire</b><br> 1695 * </p> 1696 */ 1697 @SearchParamDefinition(name="questionnaire", path="QuestionnaireResponse.questionnaire", description="The questionnaire the answers are provided for", type="reference" ) 1698 public static final String SP_QUESTIONNAIRE = "questionnaire"; 1699 /** 1700 * <b>Fluent Client</b> search parameter constant for <b>questionnaire</b> 1701 * <p> 1702 * Description: <b>The questionnaire the answers are provided for</b><br> 1703 * Type: <b>reference</b><br> 1704 * Path: <b>QuestionnaireResponse.questionnaire</b><br> 1705 * </p> 1706 */ 1707 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam QUESTIONNAIRE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_QUESTIONNAIRE); 1708 1709/** 1710 * Constant for fluent queries to be used to add include statements. Specifies 1711 * the path value of "<b>QuestionnaireResponse:questionnaire</b>". 1712 */ 1713 public static final ca.uhn.fhir.model.api.Include INCLUDE_QUESTIONNAIRE = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:questionnaire").toLocked(); 1714 1715 /** 1716 * Search parameter: <b>patient</b> 1717 * <p> 1718 * Description: <b>The patient that is the subject of the questionnaire</b><br> 1719 * Type: <b>reference</b><br> 1720 * Path: <b>QuestionnaireResponse.subject</b><br> 1721 * </p> 1722 */ 1723 @SearchParamDefinition(name="patient", path="QuestionnaireResponse.subject", description="The patient that is the subject of the questionnaire", type="reference" ) 1724 public static final String SP_PATIENT = "patient"; 1725 /** 1726 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1727 * <p> 1728 * Description: <b>The patient that is the subject of the questionnaire</b><br> 1729 * Type: <b>reference</b><br> 1730 * Path: <b>QuestionnaireResponse.subject</b><br> 1731 * </p> 1732 */ 1733 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1734 1735/** 1736 * Constant for fluent queries to be used to add include statements. Specifies 1737 * the path value of "<b>QuestionnaireResponse:patient</b>". 1738 */ 1739 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:patient").toLocked(); 1740 1741 /** 1742 * Search parameter: <b>authored</b> 1743 * <p> 1744 * Description: <b>When the questionnaire was authored</b><br> 1745 * Type: <b>date</b><br> 1746 * Path: <b>QuestionnaireResponse.authored</b><br> 1747 * </p> 1748 */ 1749 @SearchParamDefinition(name="authored", path="QuestionnaireResponse.authored", description="When the questionnaire was authored", type="date" ) 1750 public static final String SP_AUTHORED = "authored"; 1751 /** 1752 * <b>Fluent Client</b> search parameter constant for <b>authored</b> 1753 * <p> 1754 * Description: <b>When the questionnaire was authored</b><br> 1755 * Type: <b>date</b><br> 1756 * Path: <b>QuestionnaireResponse.authored</b><br> 1757 * </p> 1758 */ 1759 public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORED); 1760 1761 /** 1762 * Search parameter: <b>source</b> 1763 * <p> 1764 * Description: <b>The person who answered the questions</b><br> 1765 * Type: <b>reference</b><br> 1766 * Path: <b>QuestionnaireResponse.source</b><br> 1767 * </p> 1768 */ 1769 @SearchParamDefinition(name="source", path="QuestionnaireResponse.source", description="The person who answered the questions", type="reference" ) 1770 public static final String SP_SOURCE = "source"; 1771 /** 1772 * <b>Fluent Client</b> search parameter constant for <b>source</b> 1773 * <p> 1774 * Description: <b>The person who answered the questions</b><br> 1775 * Type: <b>reference</b><br> 1776 * Path: <b>QuestionnaireResponse.source</b><br> 1777 * </p> 1778 */ 1779 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SOURCE); 1780 1781/** 1782 * Constant for fluent queries to be used to add include statements. Specifies 1783 * the path value of "<b>QuestionnaireResponse:source</b>". 1784 */ 1785 public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:source").toLocked(); 1786 1787 /** 1788 * Search parameter: <b>status</b> 1789 * <p> 1790 * Description: <b>The status of the questionnaire response</b><br> 1791 * Type: <b>token</b><br> 1792 * Path: <b>QuestionnaireResponse.status</b><br> 1793 * </p> 1794 */ 1795 @SearchParamDefinition(name="status", path="QuestionnaireResponse.status", description="The status of the questionnaire response", type="token" ) 1796 public static final String SP_STATUS = "status"; 1797 /** 1798 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1799 * <p> 1800 * Description: <b>The status of the questionnaire response</b><br> 1801 * Type: <b>token</b><br> 1802 * Path: <b>QuestionnaireResponse.status</b><br> 1803 * </p> 1804 */ 1805 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1806 1807 /** 1808 * Search parameter: <b>subject</b> 1809 * <p> 1810 * Description: <b>The subject of the questionnaire</b><br> 1811 * Type: <b>reference</b><br> 1812 * Path: <b>QuestionnaireResponse.subject</b><br> 1813 * </p> 1814 */ 1815 @SearchParamDefinition(name="subject", path="QuestionnaireResponse.subject", description="The subject of the questionnaire", type="reference" ) 1816 public static final String SP_SUBJECT = "subject"; 1817 /** 1818 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1819 * <p> 1820 * Description: <b>The subject of the questionnaire</b><br> 1821 * Type: <b>reference</b><br> 1822 * Path: <b>QuestionnaireResponse.subject</b><br> 1823 * </p> 1824 */ 1825 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1826 1827/** 1828 * Constant for fluent queries to be used to add include statements. Specifies 1829 * the path value of "<b>QuestionnaireResponse:subject</b>". 1830 */ 1831 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:subject").toLocked(); 1832 1833 /** 1834 * Search parameter: <b>encounter</b> 1835 * <p> 1836 * Description: <b>Encounter during which questionnaire was authored</b><br> 1837 * Type: <b>reference</b><br> 1838 * Path: <b>QuestionnaireResponse.encounter</b><br> 1839 * </p> 1840 */ 1841 @SearchParamDefinition(name="encounter", path="QuestionnaireResponse.encounter", description="Encounter during which questionnaire was authored", type="reference" ) 1842 public static final String SP_ENCOUNTER = "encounter"; 1843 /** 1844 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 1845 * <p> 1846 * Description: <b>Encounter during which questionnaire was authored</b><br> 1847 * Type: <b>reference</b><br> 1848 * Path: <b>QuestionnaireResponse.encounter</b><br> 1849 * </p> 1850 */ 1851 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 1852 1853/** 1854 * Constant for fluent queries to be used to add include statements. Specifies 1855 * the path value of "<b>QuestionnaireResponse:encounter</b>". 1856 */ 1857 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("QuestionnaireResponse:encounter").toLocked(); 1858 1859 1860}