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