001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 042import org.hl7.fhir.utilities.Utilities; 043 044import ca.uhn.fhir.model.api.annotation.Block; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.Description; 047import ca.uhn.fhir.model.api.annotation.ResourceDef; 048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 049/** 050 * A structured set of questions intended to guide the collection of answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. 051 */ 052@ResourceDef(name="Questionnaire", profile="http://hl7.org/fhir/Profile/Questionnaire") 053public class Questionnaire extends DomainResource { 054 055 public enum QuestionnaireStatus { 056 /** 057 * This Questionnaire is not ready for official use. 058 */ 059 DRAFT, 060 /** 061 * This Questionnaire is ready for use. 062 */ 063 PUBLISHED, 064 /** 065 * This Questionnaire should no longer be used to gather data. 066 */ 067 RETIRED, 068 /** 069 * added to help the parsers 070 */ 071 NULL; 072 public static QuestionnaireStatus fromCode(String codeString) throws FHIRException { 073 if (codeString == null || "".equals(codeString)) 074 return null; 075 if ("draft".equals(codeString)) 076 return DRAFT; 077 if ("published".equals(codeString)) 078 return PUBLISHED; 079 if ("retired".equals(codeString)) 080 return RETIRED; 081 throw new FHIRException("Unknown QuestionnaireStatus code '"+codeString+"'"); 082 } 083 public String toCode() { 084 switch (this) { 085 case DRAFT: return "draft"; 086 case PUBLISHED: return "published"; 087 case RETIRED: return "retired"; 088 case NULL: return null; 089 default: return "?"; 090 } 091 } 092 public String getSystem() { 093 switch (this) { 094 case DRAFT: return "http://hl7.org/fhir/questionnaire-status"; 095 case PUBLISHED: return "http://hl7.org/fhir/questionnaire-status"; 096 case RETIRED: return "http://hl7.org/fhir/questionnaire-status"; 097 case NULL: return null; 098 default: return "?"; 099 } 100 } 101 public String getDefinition() { 102 switch (this) { 103 case DRAFT: return "This Questionnaire is not ready for official use."; 104 case PUBLISHED: return "This Questionnaire is ready for use."; 105 case RETIRED: return "This Questionnaire should no longer be used to gather data."; 106 case NULL: return null; 107 default: return "?"; 108 } 109 } 110 public String getDisplay() { 111 switch (this) { 112 case DRAFT: return "Draft"; 113 case PUBLISHED: return "Published"; 114 case RETIRED: return "Retired"; 115 case NULL: return null; 116 default: return "?"; 117 } 118 } 119 } 120 121 public static class QuestionnaireStatusEnumFactory implements EnumFactory<QuestionnaireStatus> { 122 public QuestionnaireStatus fromCode(String codeString) throws IllegalArgumentException { 123 if (codeString == null || "".equals(codeString)) 124 if (codeString == null || "".equals(codeString)) 125 return null; 126 if ("draft".equals(codeString)) 127 return QuestionnaireStatus.DRAFT; 128 if ("published".equals(codeString)) 129 return QuestionnaireStatus.PUBLISHED; 130 if ("retired".equals(codeString)) 131 return QuestionnaireStatus.RETIRED; 132 throw new IllegalArgumentException("Unknown QuestionnaireStatus code '"+codeString+"'"); 133 } 134 public Enumeration<QuestionnaireStatus> fromType(Base code) throws FHIRException { 135 if (code == null || code.isEmpty()) 136 return null; 137 String codeString = ((PrimitiveType) code).asStringValue(); 138 if (codeString == null || "".equals(codeString)) 139 return null; 140 if ("draft".equals(codeString)) 141 return new Enumeration<QuestionnaireStatus>(this, QuestionnaireStatus.DRAFT); 142 if ("published".equals(codeString)) 143 return new Enumeration<QuestionnaireStatus>(this, QuestionnaireStatus.PUBLISHED); 144 if ("retired".equals(codeString)) 145 return new Enumeration<QuestionnaireStatus>(this, QuestionnaireStatus.RETIRED); 146 throw new FHIRException("Unknown QuestionnaireStatus code '"+codeString+"'"); 147 } 148 public String toCode(QuestionnaireStatus code) { 149 if (code == QuestionnaireStatus.DRAFT) 150 return "draft"; 151 if (code == QuestionnaireStatus.PUBLISHED) 152 return "published"; 153 if (code == QuestionnaireStatus.RETIRED) 154 return "retired"; 155 return "?"; 156 } 157 public String toSystem(QuestionnaireStatus code) { 158 return code.getSystem(); 159 } 160 } 161 162 public enum QuestionnaireItemType { 163 /** 164 * An item with no direct answer but which has descendant items that are questions 165 */ 166 GROUP, 167 /** 168 * Text for display that will not capture an answer or have descendants 169 */ 170 DISPLAY, 171 /** 172 * An item that defines a specific answer to be captured (and may have descendant items) 173 */ 174 QUESTION, 175 /** 176 * Question with a yes/no answer 177 */ 178 BOOLEAN, 179 /** 180 * Question with is a real number answer 181 */ 182 DECIMAL, 183 /** 184 * Question with an integer answer 185 */ 186 INTEGER, 187 /** 188 * Question with adate answer 189 */ 190 DATE, 191 /** 192 * Question with a date and time answer 193 */ 194 DATETIME, 195 /** 196 * Question with a system timestamp answer 197 */ 198 INSTANT, 199 /** 200 * Question with a time (hour/minute/second) answer independent of date. 201 */ 202 TIME, 203 /** 204 * Question with a short (few words to short sentence) free-text entry answer 205 */ 206 STRING, 207 /** 208 * Question with a long (potentially multi-paragraph) free-text entry (still captured as a string) answer 209 */ 210 TEXT, 211 /** 212 * Question with a url (website, FTP site, etc.) answer 213 */ 214 URL, 215 /** 216 * Question with a Coding drawn from a list of options as an answer 217 */ 218 CHOICE, 219 /** 220 * Answer is a Coding drawn from a list of options or a free-text entry captured as Coding.display 221 */ 222 OPENCHOICE, 223 /** 224 * Question with binary content such as a image, PDF, etc. as an answer 225 */ 226 ATTACHMENT, 227 /** 228 * Question with a reference to another resource (practitioner, organization, etc.) as an answer 229 */ 230 REFERENCE, 231 /** 232 * Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. 233 */ 234 QUANTITY, 235 /** 236 * added to help the parsers 237 */ 238 NULL; 239 public static QuestionnaireItemType fromCode(String codeString) throws FHIRException { 240 if (codeString == null || "".equals(codeString)) 241 return null; 242 if ("group".equals(codeString)) 243 return GROUP; 244 if ("display".equals(codeString)) 245 return DISPLAY; 246 if ("question".equals(codeString)) 247 return QUESTION; 248 if ("boolean".equals(codeString)) 249 return BOOLEAN; 250 if ("decimal".equals(codeString)) 251 return DECIMAL; 252 if ("integer".equals(codeString)) 253 return INTEGER; 254 if ("date".equals(codeString)) 255 return DATE; 256 if ("dateTime".equals(codeString)) 257 return DATETIME; 258 if ("instant".equals(codeString)) 259 return INSTANT; 260 if ("time".equals(codeString)) 261 return TIME; 262 if ("string".equals(codeString)) 263 return STRING; 264 if ("text".equals(codeString)) 265 return TEXT; 266 if ("url".equals(codeString)) 267 return URL; 268 if ("choice".equals(codeString)) 269 return CHOICE; 270 if ("open-choice".equals(codeString)) 271 return OPENCHOICE; 272 if ("attachment".equals(codeString)) 273 return ATTACHMENT; 274 if ("reference".equals(codeString)) 275 return REFERENCE; 276 if ("quantity".equals(codeString)) 277 return QUANTITY; 278 throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); 279 } 280 public String toCode() { 281 switch (this) { 282 case GROUP: return "group"; 283 case DISPLAY: return "display"; 284 case QUESTION: return "question"; 285 case BOOLEAN: return "boolean"; 286 case DECIMAL: return "decimal"; 287 case INTEGER: return "integer"; 288 case DATE: return "date"; 289 case DATETIME: return "dateTime"; 290 case INSTANT: return "instant"; 291 case TIME: return "time"; 292 case STRING: return "string"; 293 case TEXT: return "text"; 294 case URL: return "url"; 295 case CHOICE: return "choice"; 296 case OPENCHOICE: return "open-choice"; 297 case ATTACHMENT: return "attachment"; 298 case REFERENCE: return "reference"; 299 case QUANTITY: return "quantity"; 300 case NULL: return null; 301 default: return "?"; 302 } 303 } 304 public String getSystem() { 305 switch (this) { 306 case GROUP: return "http://hl7.org/fhir/item-type"; 307 case DISPLAY: return "http://hl7.org/fhir/item-type"; 308 case QUESTION: return "http://hl7.org/fhir/item-type"; 309 case BOOLEAN: return "http://hl7.org/fhir/item-type"; 310 case DECIMAL: return "http://hl7.org/fhir/item-type"; 311 case INTEGER: return "http://hl7.org/fhir/item-type"; 312 case DATE: return "http://hl7.org/fhir/item-type"; 313 case DATETIME: return "http://hl7.org/fhir/item-type"; 314 case INSTANT: return "http://hl7.org/fhir/item-type"; 315 case TIME: return "http://hl7.org/fhir/item-type"; 316 case STRING: return "http://hl7.org/fhir/item-type"; 317 case TEXT: return "http://hl7.org/fhir/item-type"; 318 case URL: return "http://hl7.org/fhir/item-type"; 319 case CHOICE: return "http://hl7.org/fhir/item-type"; 320 case OPENCHOICE: return "http://hl7.org/fhir/item-type"; 321 case ATTACHMENT: return "http://hl7.org/fhir/item-type"; 322 case REFERENCE: return "http://hl7.org/fhir/item-type"; 323 case QUANTITY: return "http://hl7.org/fhir/item-type"; 324 case NULL: return null; 325 default: return "?"; 326 } 327 } 328 public String getDefinition() { 329 switch (this) { 330 case GROUP: return "An item with no direct answer but which has descendant items that are questions"; 331 case DISPLAY: return "Text for display that will not capture an answer or have descendants"; 332 case QUESTION: return "An item that defines a specific answer to be captured (and may have descendant items)"; 333 case BOOLEAN: return "Question with a yes/no answer"; 334 case DECIMAL: return "Question with is a real number answer"; 335 case INTEGER: return "Question with an integer answer"; 336 case DATE: return "Question with adate answer"; 337 case DATETIME: return "Question with a date and time answer"; 338 case INSTANT: return "Question with a system timestamp answer"; 339 case TIME: return "Question with a time (hour/minute/second) answer independent of date."; 340 case STRING: return "Question with a short (few words to short sentence) free-text entry answer"; 341 case TEXT: return "Question with a long (potentially multi-paragraph) free-text entry (still captured as a string) answer"; 342 case URL: return "Question with a url (website, FTP site, etc.) answer"; 343 case CHOICE: return "Question with a Coding drawn from a list of options as an answer"; 344 case OPENCHOICE: return "Answer is a Coding drawn from a list of options or a free-text entry captured as Coding.display"; 345 case ATTACHMENT: return "Question with binary content such as a image, PDF, etc. as an answer"; 346 case REFERENCE: return "Question with a reference to another resource (practitioner, organization, etc.) as an answer"; 347 case QUANTITY: return "Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer."; 348 case NULL: return null; 349 default: return "?"; 350 } 351 } 352 public String getDisplay() { 353 switch (this) { 354 case GROUP: return "Group"; 355 case DISPLAY: return "Display"; 356 case QUESTION: return "Question"; 357 case BOOLEAN: return "Boolean"; 358 case DECIMAL: return "Decimal"; 359 case INTEGER: return "Integer"; 360 case DATE: return "Date"; 361 case DATETIME: return "Date Time"; 362 case INSTANT: return "Instant"; 363 case TIME: return "Time"; 364 case STRING: return "String"; 365 case TEXT: return "Text"; 366 case URL: return "Url"; 367 case CHOICE: return "Choice"; 368 case OPENCHOICE: return "Open Choice"; 369 case ATTACHMENT: return "Attachment"; 370 case REFERENCE: return "Reference"; 371 case QUANTITY: return "Quantity"; 372 case NULL: return null; 373 default: return "?"; 374 } 375 } 376 } 377 378 public static class QuestionnaireItemTypeEnumFactory implements EnumFactory<QuestionnaireItemType> { 379 public QuestionnaireItemType fromCode(String codeString) throws IllegalArgumentException { 380 if (codeString == null || "".equals(codeString)) 381 if (codeString == null || "".equals(codeString)) 382 return null; 383 if ("group".equals(codeString)) 384 return QuestionnaireItemType.GROUP; 385 if ("display".equals(codeString)) 386 return QuestionnaireItemType.DISPLAY; 387 if ("question".equals(codeString)) 388 return QuestionnaireItemType.QUESTION; 389 if ("boolean".equals(codeString)) 390 return QuestionnaireItemType.BOOLEAN; 391 if ("decimal".equals(codeString)) 392 return QuestionnaireItemType.DECIMAL; 393 if ("integer".equals(codeString)) 394 return QuestionnaireItemType.INTEGER; 395 if ("date".equals(codeString)) 396 return QuestionnaireItemType.DATE; 397 if ("dateTime".equals(codeString)) 398 return QuestionnaireItemType.DATETIME; 399 if ("instant".equals(codeString)) 400 return QuestionnaireItemType.INSTANT; 401 if ("time".equals(codeString)) 402 return QuestionnaireItemType.TIME; 403 if ("string".equals(codeString)) 404 return QuestionnaireItemType.STRING; 405 if ("text".equals(codeString)) 406 return QuestionnaireItemType.TEXT; 407 if ("url".equals(codeString)) 408 return QuestionnaireItemType.URL; 409 if ("choice".equals(codeString)) 410 return QuestionnaireItemType.CHOICE; 411 if ("open-choice".equals(codeString)) 412 return QuestionnaireItemType.OPENCHOICE; 413 if ("attachment".equals(codeString)) 414 return QuestionnaireItemType.ATTACHMENT; 415 if ("reference".equals(codeString)) 416 return QuestionnaireItemType.REFERENCE; 417 if ("quantity".equals(codeString)) 418 return QuestionnaireItemType.QUANTITY; 419 throw new IllegalArgumentException("Unknown QuestionnaireItemType code '"+codeString+"'"); 420 } 421 public Enumeration<QuestionnaireItemType> fromType(Base code) throws FHIRException { 422 if (code == null || code.isEmpty()) 423 return null; 424 String codeString = ((PrimitiveType) code).asStringValue(); 425 if (codeString == null || "".equals(codeString)) 426 return null; 427 if ("group".equals(codeString)) 428 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.GROUP); 429 if ("display".equals(codeString)) 430 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DISPLAY); 431 if ("question".equals(codeString)) 432 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.QUESTION); 433 if ("boolean".equals(codeString)) 434 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.BOOLEAN); 435 if ("decimal".equals(codeString)) 436 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DECIMAL); 437 if ("integer".equals(codeString)) 438 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.INTEGER); 439 if ("date".equals(codeString)) 440 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DATE); 441 if ("dateTime".equals(codeString)) 442 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DATETIME); 443 if ("instant".equals(codeString)) 444 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.INSTANT); 445 if ("time".equals(codeString)) 446 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.TIME); 447 if ("string".equals(codeString)) 448 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.STRING); 449 if ("text".equals(codeString)) 450 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.TEXT); 451 if ("url".equals(codeString)) 452 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.URL); 453 if ("choice".equals(codeString)) 454 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.CHOICE); 455 if ("open-choice".equals(codeString)) 456 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.OPENCHOICE); 457 if ("attachment".equals(codeString)) 458 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.ATTACHMENT); 459 if ("reference".equals(codeString)) 460 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.REFERENCE); 461 if ("quantity".equals(codeString)) 462 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.QUANTITY); 463 throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); 464 } 465 public String toCode(QuestionnaireItemType code) { 466 if (code == QuestionnaireItemType.GROUP) 467 return "group"; 468 if (code == QuestionnaireItemType.DISPLAY) 469 return "display"; 470 if (code == QuestionnaireItemType.QUESTION) 471 return "question"; 472 if (code == QuestionnaireItemType.BOOLEAN) 473 return "boolean"; 474 if (code == QuestionnaireItemType.DECIMAL) 475 return "decimal"; 476 if (code == QuestionnaireItemType.INTEGER) 477 return "integer"; 478 if (code == QuestionnaireItemType.DATE) 479 return "date"; 480 if (code == QuestionnaireItemType.DATETIME) 481 return "dateTime"; 482 if (code == QuestionnaireItemType.INSTANT) 483 return "instant"; 484 if (code == QuestionnaireItemType.TIME) 485 return "time"; 486 if (code == QuestionnaireItemType.STRING) 487 return "string"; 488 if (code == QuestionnaireItemType.TEXT) 489 return "text"; 490 if (code == QuestionnaireItemType.URL) 491 return "url"; 492 if (code == QuestionnaireItemType.CHOICE) 493 return "choice"; 494 if (code == QuestionnaireItemType.OPENCHOICE) 495 return "open-choice"; 496 if (code == QuestionnaireItemType.ATTACHMENT) 497 return "attachment"; 498 if (code == QuestionnaireItemType.REFERENCE) 499 return "reference"; 500 if (code == QuestionnaireItemType.QUANTITY) 501 return "quantity"; 502 return "?"; 503 } 504 public String toSystem(QuestionnaireItemType code) { 505 return code.getSystem(); 506 } 507 } 508 509 @Block() 510 public static class QuestionnaireItemComponent extends BackboneElement implements IBaseBackboneElement { 511 /** 512 * An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. 513 */ 514 @Child(name = "linkId", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 515 @Description(shortDefinition="To link questionnaire with questionnaire response", formalDefinition="An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource." ) 516 protected StringType linkId; 517 518 /** 519 * Identifies a how this group of questions is known in a particular terminology such as LOINC. 520 */ 521 @Child(name = "concept", type = {Coding.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 522 @Description(shortDefinition="Concept that represents this item within in a questionnaire", formalDefinition="Identifies a how this group of questions is known in a particular terminology such as LOINC." ) 523 protected List<Coding> concept; 524 525 /** 526 * A short label for a particular group, question or set of display text within the questionnaire. 527 */ 528 @Child(name = "prefix", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 529 @Description(shortDefinition="E.g. \"1(a)\", \"2.5.3\"", formalDefinition="A short label for a particular group, question or set of display text within the questionnaire." ) 530 protected StringType prefix; 531 532 /** 533 * The name of a section, the text of a question or text content for a text item. 534 */ 535 @Child(name = "text", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 536 @Description(shortDefinition="Primary text for the item", formalDefinition="The name of a section, the text of a question or text content for a text item." ) 537 protected StringType text; 538 539 /** 540 * Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.). 541 */ 542 @Child(name = "type", type = {CodeType.class}, order=5, min=1, max=1, modifier=false, summary=false) 543 @Description(shortDefinition="group | display | boolean | decimal | integer | date | dateTime +", formalDefinition="Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.)." ) 544 protected Enumeration<QuestionnaireItemType> type; 545 546 /** 547 * If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true. 548 */ 549 @Child(name = "enableWhen", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=false) 550 @Description(shortDefinition="Only allow data when:", formalDefinition="If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true." ) 551 protected List<QuestionnaireItemEnableWhenComponent> enableWhen; 552 553 /** 554 * If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. 555 */ 556 @Child(name = "required", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false) 557 @Description(shortDefinition="Whether the item must be included in data results", formalDefinition="If true, indicates that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire." ) 558 protected BooleanType required; 559 560 /** 561 * Whether the item may occur multiple times in the instance, containing multiple sets of answers. 562 */ 563 @Child(name = "repeats", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 564 @Description(shortDefinition="Whether the item may repeat", formalDefinition="Whether the item may occur multiple times in the instance, containing multiple sets of answers." ) 565 protected BooleanType repeats; 566 567 /** 568 * If true, the value cannot be changed by a human respondent to the Questionnaire. 569 */ 570 @Child(name = "readOnly", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) 571 @Description(shortDefinition="Don't allow human editing", formalDefinition="If true, the value cannot be changed by a human respondent to the Questionnaire." ) 572 protected BooleanType readOnly; 573 574 /** 575 * The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. 576 */ 577 @Child(name = "maxLength", type = {IntegerType.class}, order=10, min=0, max=1, modifier=false, summary=false) 578 @Description(shortDefinition="No more than this many characters", formalDefinition="The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse." ) 579 protected IntegerType maxLength; 580 581 /** 582 * Reference to a value set containing a list of codes representing permitted answers for the question. 583 */ 584 @Child(name = "options", type = {ValueSet.class}, order=11, min=0, max=1, modifier=false, summary=false) 585 @Description(shortDefinition="Valueset containing permitted answers", formalDefinition="Reference to a value set containing a list of codes representing permitted answers for the question." ) 586 protected Reference options; 587 588 /** 589 * The actual object that is the target of the reference (Reference to a value set containing a list of codes representing permitted answers for the question.) 590 */ 591 protected ValueSet optionsTarget; 592 593 /** 594 * For a "choice" question, identifies one of the permitted answers for the question. 595 */ 596 @Child(name = "option", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 597 @Description(shortDefinition="Permitted answer", formalDefinition="For a \"choice\" question, identifies one of the permitted answers for the question." ) 598 protected List<QuestionnaireItemOptionComponent> option; 599 600 /** 601 * The value that should be pre-populated when rendering the questionnaire for user input. 602 */ 603 @Child(name = "initial", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=13, min=0, max=1, modifier=false, summary=false) 604 @Description(shortDefinition="Initial presumed answer for question", formalDefinition="The value that should be pre-populated when rendering the questionnaire for user input." ) 605 protected Type initial; 606 607 /** 608 * Allows text, questions and other groups to be nested beneath a question or group. 609 */ 610 @Child(name = "item", type = {QuestionnaireItemComponent.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 611 @Description(shortDefinition="Nested questionnaire items", formalDefinition="Allows text, questions and other groups to be nested beneath a question or group." ) 612 protected List<QuestionnaireItemComponent> item; 613 614 private static final long serialVersionUID = -1787693458L; 615 616 /** 617 * Constructor 618 */ 619 public QuestionnaireItemComponent() { 620 super(); 621 } 622 623 /** 624 * Constructor 625 */ 626 public QuestionnaireItemComponent(Enumeration<QuestionnaireItemType> type) { 627 super(); 628 this.type = type; 629 } 630 631 /** 632 * @return {@link #linkId} (An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value 633 */ 634 public StringType getLinkIdElement() { 635 if (this.linkId == null) 636 if (Configuration.errorOnAutoCreate()) 637 throw new Error("Attempt to auto-create QuestionnaireItemComponent.linkId"); 638 else if (Configuration.doAutoCreate()) 639 this.linkId = new StringType(); // bb 640 return this.linkId; 641 } 642 643 public boolean hasLinkIdElement() { 644 return this.linkId != null && !this.linkId.isEmpty(); 645 } 646 647 public boolean hasLinkId() { 648 return this.linkId != null && !this.linkId.isEmpty(); 649 } 650 651 /** 652 * @param value {@link #linkId} (An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.). This is the underlying object with id, value and extensions. The accessor "getLinkId" gives direct access to the value 653 */ 654 public QuestionnaireItemComponent setLinkIdElement(StringType value) { 655 this.linkId = value; 656 return this; 657 } 658 659 /** 660 * @return An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. 661 */ 662 public String getLinkId() { 663 return this.linkId == null ? null : this.linkId.getValue(); 664 } 665 666 /** 667 * @param value An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. 668 */ 669 public QuestionnaireItemComponent setLinkId(String value) { 670 if (Utilities.noString(value)) 671 this.linkId = null; 672 else { 673 if (this.linkId == null) 674 this.linkId = new StringType(); 675 this.linkId.setValue(value); 676 } 677 return this; 678 } 679 680 /** 681 * @return {@link #concept} (Identifies a how this group of questions is known in a particular terminology such as LOINC.) 682 */ 683 public List<Coding> getConcept() { 684 if (this.concept == null) 685 this.concept = new ArrayList<Coding>(); 686 return this.concept; 687 } 688 689 public boolean hasConcept() { 690 if (this.concept == null) 691 return false; 692 for (Coding item : this.concept) 693 if (!item.isEmpty()) 694 return true; 695 return false; 696 } 697 698 /** 699 * @return {@link #concept} (Identifies a how this group of questions is known in a particular terminology such as LOINC.) 700 */ 701 // syntactic sugar 702 public Coding addConcept() { //3 703 Coding t = new Coding(); 704 if (this.concept == null) 705 this.concept = new ArrayList<Coding>(); 706 this.concept.add(t); 707 return t; 708 } 709 710 // syntactic sugar 711 public QuestionnaireItemComponent addConcept(Coding t) { //3 712 if (t == null) 713 return this; 714 if (this.concept == null) 715 this.concept = new ArrayList<Coding>(); 716 this.concept.add(t); 717 return this; 718 } 719 720 /** 721 * @return {@link #prefix} (A short label for a particular group, question or set of display text within the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 722 */ 723 public StringType getPrefixElement() { 724 if (this.prefix == null) 725 if (Configuration.errorOnAutoCreate()) 726 throw new Error("Attempt to auto-create QuestionnaireItemComponent.prefix"); 727 else if (Configuration.doAutoCreate()) 728 this.prefix = new StringType(); // bb 729 return this.prefix; 730 } 731 732 public boolean hasPrefixElement() { 733 return this.prefix != null && !this.prefix.isEmpty(); 734 } 735 736 public boolean hasPrefix() { 737 return this.prefix != null && !this.prefix.isEmpty(); 738 } 739 740 /** 741 * @param value {@link #prefix} (A short label for a particular group, question or set of display text within the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 742 */ 743 public QuestionnaireItemComponent setPrefixElement(StringType value) { 744 this.prefix = value; 745 return this; 746 } 747 748 /** 749 * @return A short label for a particular group, question or set of display text within the questionnaire. 750 */ 751 public String getPrefix() { 752 return this.prefix == null ? null : this.prefix.getValue(); 753 } 754 755 /** 756 * @param value A short label for a particular group, question or set of display text within the questionnaire. 757 */ 758 public QuestionnaireItemComponent setPrefix(String value) { 759 if (Utilities.noString(value)) 760 this.prefix = null; 761 else { 762 if (this.prefix == null) 763 this.prefix = new StringType(); 764 this.prefix.setValue(value); 765 } 766 return this; 767 } 768 769 /** 770 * @return {@link #text} (The name of a section, the text of a question or text content for a text item.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 771 */ 772 public StringType getTextElement() { 773 if (this.text == null) 774 if (Configuration.errorOnAutoCreate()) 775 throw new Error("Attempt to auto-create QuestionnaireItemComponent.text"); 776 else if (Configuration.doAutoCreate()) 777 this.text = new StringType(); // bb 778 return this.text; 779 } 780 781 public boolean hasTextElement() { 782 return this.text != null && !this.text.isEmpty(); 783 } 784 785 public boolean hasText() { 786 return this.text != null && !this.text.isEmpty(); 787 } 788 789 /** 790 * @param value {@link #text} (The name of a section, the text of a question or text content for a text item.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 791 */ 792 public QuestionnaireItemComponent setTextElement(StringType value) { 793 this.text = value; 794 return this; 795 } 796 797 /** 798 * @return The name of a section, the text of a question or text content for a text item. 799 */ 800 public String getText() { 801 return this.text == null ? null : this.text.getValue(); 802 } 803 804 /** 805 * @param value The name of a section, the text of a question or text content for a text item. 806 */ 807 public QuestionnaireItemComponent setText(String value) { 808 if (Utilities.noString(value)) 809 this.text = null; 810 else { 811 if (this.text == null) 812 this.text = new StringType(); 813 this.text.setValue(value); 814 } 815 return this; 816 } 817 818 /** 819 * @return {@link #type} (Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 820 */ 821 public Enumeration<QuestionnaireItemType> getTypeElement() { 822 if (this.type == null) 823 if (Configuration.errorOnAutoCreate()) 824 throw new Error("Attempt to auto-create QuestionnaireItemComponent.type"); 825 else if (Configuration.doAutoCreate()) 826 this.type = new Enumeration<QuestionnaireItemType>(new QuestionnaireItemTypeEnumFactory()); // bb 827 return this.type; 828 } 829 830 public boolean hasTypeElement() { 831 return this.type != null && !this.type.isEmpty(); 832 } 833 834 public boolean hasType() { 835 return this.type != null && !this.type.isEmpty(); 836 } 837 838 /** 839 * @param value {@link #type} (Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 840 */ 841 public QuestionnaireItemComponent setTypeElement(Enumeration<QuestionnaireItemType> value) { 842 this.type = value; 843 return this; 844 } 845 846 /** 847 * @return Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.). 848 */ 849 public QuestionnaireItemType getType() { 850 return this.type == null ? null : this.type.getValue(); 851 } 852 853 /** 854 * @param value Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.). 855 */ 856 public QuestionnaireItemComponent setType(QuestionnaireItemType value) { 857 if (this.type == null) 858 this.type = new Enumeration<QuestionnaireItemType>(new QuestionnaireItemTypeEnumFactory()); 859 this.type.setValue(value); 860 return this; 861 } 862 863 /** 864 * @return {@link #enableWhen} (If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.) 865 */ 866 public List<QuestionnaireItemEnableWhenComponent> getEnableWhen() { 867 if (this.enableWhen == null) 868 this.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 869 return this.enableWhen; 870 } 871 872 public boolean hasEnableWhen() { 873 if (this.enableWhen == null) 874 return false; 875 for (QuestionnaireItemEnableWhenComponent item : this.enableWhen) 876 if (!item.isEmpty()) 877 return true; 878 return false; 879 } 880 881 /** 882 * @return {@link #enableWhen} (If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.) 883 */ 884 // syntactic sugar 885 public QuestionnaireItemEnableWhenComponent addEnableWhen() { //3 886 QuestionnaireItemEnableWhenComponent t = new QuestionnaireItemEnableWhenComponent(); 887 if (this.enableWhen == null) 888 this.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 889 this.enableWhen.add(t); 890 return t; 891 } 892 893 // syntactic sugar 894 public QuestionnaireItemComponent addEnableWhen(QuestionnaireItemEnableWhenComponent t) { //3 895 if (t == null) 896 return this; 897 if (this.enableWhen == null) 898 this.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 899 this.enableWhen.add(t); 900 return this; 901 } 902 903 /** 904 * @return {@link #required} (If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value 905 */ 906 public BooleanType getRequiredElement() { 907 if (this.required == null) 908 if (Configuration.errorOnAutoCreate()) 909 throw new Error("Attempt to auto-create QuestionnaireItemComponent.required"); 910 else if (Configuration.doAutoCreate()) 911 this.required = new BooleanType(); // bb 912 return this.required; 913 } 914 915 public boolean hasRequiredElement() { 916 return this.required != null && !this.required.isEmpty(); 917 } 918 919 public boolean hasRequired() { 920 return this.required != null && !this.required.isEmpty(); 921 } 922 923 /** 924 * @param value {@link #required} (If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value 925 */ 926 public QuestionnaireItemComponent setRequiredElement(BooleanType value) { 927 this.required = value; 928 return this; 929 } 930 931 /** 932 * @return If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. 933 */ 934 public boolean getRequired() { 935 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 936 } 937 938 /** 939 * @param value If true, indicates that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. 940 */ 941 public QuestionnaireItemComponent setRequired(boolean value) { 942 if (this.required == null) 943 this.required = new BooleanType(); 944 this.required.setValue(value); 945 return this; 946 } 947 948 /** 949 * @return {@link #repeats} (Whether the item may occur multiple times in the instance, containing multiple sets of answers.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value 950 */ 951 public BooleanType getRepeatsElement() { 952 if (this.repeats == null) 953 if (Configuration.errorOnAutoCreate()) 954 throw new Error("Attempt to auto-create QuestionnaireItemComponent.repeats"); 955 else if (Configuration.doAutoCreate()) 956 this.repeats = new BooleanType(); // bb 957 return this.repeats; 958 } 959 960 public boolean hasRepeatsElement() { 961 return this.repeats != null && !this.repeats.isEmpty(); 962 } 963 964 public boolean hasRepeats() { 965 return this.repeats != null && !this.repeats.isEmpty(); 966 } 967 968 /** 969 * @param value {@link #repeats} (Whether the item may occur multiple times in the instance, containing multiple sets of answers.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value 970 */ 971 public QuestionnaireItemComponent setRepeatsElement(BooleanType value) { 972 this.repeats = value; 973 return this; 974 } 975 976 /** 977 * @return Whether the item may occur multiple times in the instance, containing multiple sets of answers. 978 */ 979 public boolean getRepeats() { 980 return this.repeats == null || this.repeats.isEmpty() ? false : this.repeats.getValue(); 981 } 982 983 /** 984 * @param value Whether the item may occur multiple times in the instance, containing multiple sets of answers. 985 */ 986 public QuestionnaireItemComponent setRepeats(boolean value) { 987 if (this.repeats == null) 988 this.repeats = new BooleanType(); 989 this.repeats.setValue(value); 990 return this; 991 } 992 993 /** 994 * @return {@link #readOnly} (If true, the value cannot be changed by a human respondent to the Questionnaire.). This is the underlying object with id, value and extensions. The accessor "getReadOnly" gives direct access to the value 995 */ 996 public BooleanType getReadOnlyElement() { 997 if (this.readOnly == null) 998 if (Configuration.errorOnAutoCreate()) 999 throw new Error("Attempt to auto-create QuestionnaireItemComponent.readOnly"); 1000 else if (Configuration.doAutoCreate()) 1001 this.readOnly = new BooleanType(); // bb 1002 return this.readOnly; 1003 } 1004 1005 public boolean hasReadOnlyElement() { 1006 return this.readOnly != null && !this.readOnly.isEmpty(); 1007 } 1008 1009 public boolean hasReadOnly() { 1010 return this.readOnly != null && !this.readOnly.isEmpty(); 1011 } 1012 1013 /** 1014 * @param value {@link #readOnly} (If true, the value cannot be changed by a human respondent to the Questionnaire.). This is the underlying object with id, value and extensions. The accessor "getReadOnly" gives direct access to the value 1015 */ 1016 public QuestionnaireItemComponent setReadOnlyElement(BooleanType value) { 1017 this.readOnly = value; 1018 return this; 1019 } 1020 1021 /** 1022 * @return If true, the value cannot be changed by a human respondent to the Questionnaire. 1023 */ 1024 public boolean getReadOnly() { 1025 return this.readOnly == null || this.readOnly.isEmpty() ? false : this.readOnly.getValue(); 1026 } 1027 1028 /** 1029 * @param value If true, the value cannot be changed by a human respondent to the Questionnaire. 1030 */ 1031 public QuestionnaireItemComponent setReadOnly(boolean value) { 1032 if (this.readOnly == null) 1033 this.readOnly = new BooleanType(); 1034 this.readOnly.setValue(value); 1035 return this; 1036 } 1037 1038 /** 1039 * @return {@link #maxLength} (The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value 1040 */ 1041 public IntegerType getMaxLengthElement() { 1042 if (this.maxLength == null) 1043 if (Configuration.errorOnAutoCreate()) 1044 throw new Error("Attempt to auto-create QuestionnaireItemComponent.maxLength"); 1045 else if (Configuration.doAutoCreate()) 1046 this.maxLength = new IntegerType(); // bb 1047 return this.maxLength; 1048 } 1049 1050 public boolean hasMaxLengthElement() { 1051 return this.maxLength != null && !this.maxLength.isEmpty(); 1052 } 1053 1054 public boolean hasMaxLength() { 1055 return this.maxLength != null && !this.maxLength.isEmpty(); 1056 } 1057 1058 /** 1059 * @param value {@link #maxLength} (The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.). This is the underlying object with id, value and extensions. The accessor "getMaxLength" gives direct access to the value 1060 */ 1061 public QuestionnaireItemComponent setMaxLengthElement(IntegerType value) { 1062 this.maxLength = value; 1063 return this; 1064 } 1065 1066 /** 1067 * @return The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. 1068 */ 1069 public int getMaxLength() { 1070 return this.maxLength == null || this.maxLength.isEmpty() ? 0 : this.maxLength.getValue(); 1071 } 1072 1073 /** 1074 * @param value The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. 1075 */ 1076 public QuestionnaireItemComponent setMaxLength(int value) { 1077 if (this.maxLength == null) 1078 this.maxLength = new IntegerType(); 1079 this.maxLength.setValue(value); 1080 return this; 1081 } 1082 1083 /** 1084 * @return {@link #options} (Reference to a value set containing a list of codes representing permitted answers for the question.) 1085 */ 1086 public Reference getOptions() { 1087 if (this.options == null) 1088 if (Configuration.errorOnAutoCreate()) 1089 throw new Error("Attempt to auto-create QuestionnaireItemComponent.options"); 1090 else if (Configuration.doAutoCreate()) 1091 this.options = new Reference(); // cc 1092 return this.options; 1093 } 1094 1095 public boolean hasOptions() { 1096 return this.options != null && !this.options.isEmpty(); 1097 } 1098 1099 /** 1100 * @param value {@link #options} (Reference to a value set containing a list of codes representing permitted answers for the question.) 1101 */ 1102 public QuestionnaireItemComponent setOptions(Reference value) { 1103 this.options = value; 1104 return this; 1105 } 1106 1107 /** 1108 * @return {@link #options} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to a value set containing a list of codes representing permitted answers for the question.) 1109 */ 1110 public ValueSet getOptionsTarget() { 1111 if (this.optionsTarget == null) 1112 if (Configuration.errorOnAutoCreate()) 1113 throw new Error("Attempt to auto-create QuestionnaireItemComponent.options"); 1114 else if (Configuration.doAutoCreate()) 1115 this.optionsTarget = new ValueSet(); // aa 1116 return this.optionsTarget; 1117 } 1118 1119 /** 1120 * @param value {@link #options} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to a value set containing a list of codes representing permitted answers for the question.) 1121 */ 1122 public QuestionnaireItemComponent setOptionsTarget(ValueSet value) { 1123 this.optionsTarget = value; 1124 return this; 1125 } 1126 1127 /** 1128 * @return {@link #option} (For a "choice" question, identifies one of the permitted answers for the question.) 1129 */ 1130 public List<QuestionnaireItemOptionComponent> getOption() { 1131 if (this.option == null) 1132 this.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1133 return this.option; 1134 } 1135 1136 public boolean hasOption() { 1137 if (this.option == null) 1138 return false; 1139 for (QuestionnaireItemOptionComponent item : this.option) 1140 if (!item.isEmpty()) 1141 return true; 1142 return false; 1143 } 1144 1145 /** 1146 * @return {@link #option} (For a "choice" question, identifies one of the permitted answers for the question.) 1147 */ 1148 // syntactic sugar 1149 public QuestionnaireItemOptionComponent addOption() { //3 1150 QuestionnaireItemOptionComponent t = new QuestionnaireItemOptionComponent(); 1151 if (this.option == null) 1152 this.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1153 this.option.add(t); 1154 return t; 1155 } 1156 1157 // syntactic sugar 1158 public QuestionnaireItemComponent addOption(QuestionnaireItemOptionComponent t) { //3 1159 if (t == null) 1160 return this; 1161 if (this.option == null) 1162 this.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1163 this.option.add(t); 1164 return this; 1165 } 1166 1167 /** 1168 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1169 */ 1170 public Type getInitial() { 1171 return this.initial; 1172 } 1173 1174 /** 1175 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1176 */ 1177 public BooleanType getInitialBooleanType() throws FHIRException { 1178 if (!(this.initial instanceof BooleanType)) 1179 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1180 return (BooleanType) this.initial; 1181 } 1182 1183 public boolean hasInitialBooleanType() { 1184 return this.initial instanceof BooleanType; 1185 } 1186 1187 /** 1188 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1189 */ 1190 public DecimalType getInitialDecimalType() throws FHIRException { 1191 if (!(this.initial instanceof DecimalType)) 1192 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1193 return (DecimalType) this.initial; 1194 } 1195 1196 public boolean hasInitialDecimalType() { 1197 return this.initial instanceof DecimalType; 1198 } 1199 1200 /** 1201 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1202 */ 1203 public IntegerType getInitialIntegerType() throws FHIRException { 1204 if (!(this.initial instanceof IntegerType)) 1205 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1206 return (IntegerType) this.initial; 1207 } 1208 1209 public boolean hasInitialIntegerType() { 1210 return this.initial instanceof IntegerType; 1211 } 1212 1213 /** 1214 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1215 */ 1216 public DateType getInitialDateType() throws FHIRException { 1217 if (!(this.initial instanceof DateType)) 1218 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1219 return (DateType) this.initial; 1220 } 1221 1222 public boolean hasInitialDateType() { 1223 return this.initial instanceof DateType; 1224 } 1225 1226 /** 1227 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1228 */ 1229 public DateTimeType getInitialDateTimeType() throws FHIRException { 1230 if (!(this.initial instanceof DateTimeType)) 1231 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1232 return (DateTimeType) this.initial; 1233 } 1234 1235 public boolean hasInitialDateTimeType() { 1236 return this.initial instanceof DateTimeType; 1237 } 1238 1239 /** 1240 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1241 */ 1242 public InstantType getInitialInstantType() throws FHIRException { 1243 if (!(this.initial instanceof InstantType)) 1244 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1245 return (InstantType) this.initial; 1246 } 1247 1248 public boolean hasInitialInstantType() { 1249 return this.initial instanceof InstantType; 1250 } 1251 1252 /** 1253 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1254 */ 1255 public TimeType getInitialTimeType() throws FHIRException { 1256 if (!(this.initial instanceof TimeType)) 1257 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1258 return (TimeType) this.initial; 1259 } 1260 1261 public boolean hasInitialTimeType() { 1262 return this.initial instanceof TimeType; 1263 } 1264 1265 /** 1266 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1267 */ 1268 public StringType getInitialStringType() throws FHIRException { 1269 if (!(this.initial instanceof StringType)) 1270 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1271 return (StringType) this.initial; 1272 } 1273 1274 public boolean hasInitialStringType() { 1275 return this.initial instanceof StringType; 1276 } 1277 1278 /** 1279 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1280 */ 1281 public UriType getInitialUriType() throws FHIRException { 1282 if (!(this.initial instanceof UriType)) 1283 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1284 return (UriType) this.initial; 1285 } 1286 1287 public boolean hasInitialUriType() { 1288 return this.initial instanceof UriType; 1289 } 1290 1291 /** 1292 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1293 */ 1294 public Attachment getInitialAttachment() throws FHIRException { 1295 if (!(this.initial instanceof Attachment)) 1296 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.initial.getClass().getName()+" was encountered"); 1297 return (Attachment) this.initial; 1298 } 1299 1300 public boolean hasInitialAttachment() { 1301 return this.initial instanceof Attachment; 1302 } 1303 1304 /** 1305 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1306 */ 1307 public Coding getInitialCoding() throws FHIRException { 1308 if (!(this.initial instanceof Coding)) 1309 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.initial.getClass().getName()+" was encountered"); 1310 return (Coding) this.initial; 1311 } 1312 1313 public boolean hasInitialCoding() { 1314 return this.initial instanceof Coding; 1315 } 1316 1317 /** 1318 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1319 */ 1320 public Quantity getInitialQuantity() throws FHIRException { 1321 if (!(this.initial instanceof Quantity)) 1322 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.initial.getClass().getName()+" was encountered"); 1323 return (Quantity) this.initial; 1324 } 1325 1326 public boolean hasInitialQuantity() { 1327 return this.initial instanceof Quantity; 1328 } 1329 1330 /** 1331 * @return {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1332 */ 1333 public Reference getInitialReference() throws FHIRException { 1334 if (!(this.initial instanceof Reference)) 1335 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.initial.getClass().getName()+" was encountered"); 1336 return (Reference) this.initial; 1337 } 1338 1339 public boolean hasInitialReference() { 1340 return this.initial instanceof Reference; 1341 } 1342 1343 public boolean hasInitial() { 1344 return this.initial != null && !this.initial.isEmpty(); 1345 } 1346 1347 /** 1348 * @param value {@link #initial} (The value that should be pre-populated when rendering the questionnaire for user input.) 1349 */ 1350 public QuestionnaireItemComponent setInitial(Type value) { 1351 this.initial = value; 1352 return this; 1353 } 1354 1355 /** 1356 * @return {@link #item} (Allows text, questions and other groups to be nested beneath a question or group.) 1357 */ 1358 public List<QuestionnaireItemComponent> getItem() { 1359 if (this.item == null) 1360 this.item = new ArrayList<QuestionnaireItemComponent>(); 1361 return this.item; 1362 } 1363 1364 public boolean hasItem() { 1365 if (this.item == null) 1366 return false; 1367 for (QuestionnaireItemComponent item : this.item) 1368 if (!item.isEmpty()) 1369 return true; 1370 return false; 1371 } 1372 1373 /** 1374 * @return {@link #item} (Allows text, questions and other groups to be nested beneath a question or group.) 1375 */ 1376 // syntactic sugar 1377 public QuestionnaireItemComponent addItem() { //3 1378 QuestionnaireItemComponent t = new QuestionnaireItemComponent(); 1379 if (this.item == null) 1380 this.item = new ArrayList<QuestionnaireItemComponent>(); 1381 this.item.add(t); 1382 return t; 1383 } 1384 1385 // syntactic sugar 1386 public QuestionnaireItemComponent addItem(QuestionnaireItemComponent t) { //3 1387 if (t == null) 1388 return this; 1389 if (this.item == null) 1390 this.item = new ArrayList<QuestionnaireItemComponent>(); 1391 this.item.add(t); 1392 return this; 1393 } 1394 1395 protected void listChildren(List<Property> childrenList) { 1396 super.listChildren(childrenList); 1397 childrenList.add(new Property("linkId", "string", "An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.", 0, java.lang.Integer.MAX_VALUE, linkId)); 1398 childrenList.add(new Property("concept", "Coding", "Identifies a how this group of questions is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); 1399 childrenList.add(new Property("prefix", "string", "A short label for a particular group, question or set of display text within the questionnaire.", 0, java.lang.Integer.MAX_VALUE, prefix)); 1400 childrenList.add(new Property("text", "string", "The name of a section, the text of a question or text content for a text item.", 0, java.lang.Integer.MAX_VALUE, text)); 1401 childrenList.add(new Property("type", "code", "Identifies the type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.).", 0, java.lang.Integer.MAX_VALUE, type)); 1402 childrenList.add(new Property("enableWhen", "", "If present, indicates that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.", 0, java.lang.Integer.MAX_VALUE, enableWhen)); 1403 childrenList.add(new Property("required", "boolean", "If true, indicates that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", 0, java.lang.Integer.MAX_VALUE, required)); 1404 childrenList.add(new Property("repeats", "boolean", "Whether the item may occur multiple times in the instance, containing multiple sets of answers.", 0, java.lang.Integer.MAX_VALUE, repeats)); 1405 childrenList.add(new Property("readOnly", "boolean", "If true, the value cannot be changed by a human respondent to the Questionnaire.", 0, java.lang.Integer.MAX_VALUE, readOnly)); 1406 childrenList.add(new Property("maxLength", "integer", "The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse.", 0, java.lang.Integer.MAX_VALUE, maxLength)); 1407 childrenList.add(new Property("options", "Reference(ValueSet)", "Reference to a value set containing a list of codes representing permitted answers for the question.", 0, java.lang.Integer.MAX_VALUE, options)); 1408 childrenList.add(new Property("option", "", "For a \"choice\" question, identifies one of the permitted answers for the question.", 0, java.lang.Integer.MAX_VALUE, option)); 1409 childrenList.add(new Property("initial[x]", "boolean|decimal|integer|date|dateTime|instant|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be pre-populated when rendering the questionnaire for user input.", 0, java.lang.Integer.MAX_VALUE, initial)); 1410 childrenList.add(new Property("item", "@Questionnaire.item", "Allows text, questions and other groups to be nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item)); 1411 } 1412 1413 @Override 1414 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1415 switch (hash) { 1416 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : new Base[] {this.linkId}; // StringType 1417 case 951024232: /*concept*/ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // Coding 1418 case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : new Base[] {this.prefix}; // StringType 1419 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 1420 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<QuestionnaireItemType> 1421 case 1893321565: /*enableWhen*/ return this.enableWhen == null ? new Base[0] : this.enableWhen.toArray(new Base[this.enableWhen.size()]); // QuestionnaireItemEnableWhenComponent 1422 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 1423 case 1094288952: /*repeats*/ return this.repeats == null ? new Base[0] : new Base[] {this.repeats}; // BooleanType 1424 case -867683742: /*readOnly*/ return this.readOnly == null ? new Base[0] : new Base[] {this.readOnly}; // BooleanType 1425 case -791400086: /*maxLength*/ return this.maxLength == null ? new Base[0] : new Base[] {this.maxLength}; // IntegerType 1426 case -1249474914: /*options*/ return this.options == null ? new Base[0] : new Base[] {this.options}; // Reference 1427 case -1010136971: /*option*/ return this.option == null ? new Base[0] : this.option.toArray(new Base[this.option.size()]); // QuestionnaireItemOptionComponent 1428 case 1948342084: /*initial*/ return this.initial == null ? new Base[0] : new Base[] {this.initial}; // Type 1429 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireItemComponent 1430 default: return super.getProperty(hash, name, checkValid); 1431 } 1432 1433 } 1434 1435 @Override 1436 public void setProperty(int hash, String name, Base value) throws FHIRException { 1437 switch (hash) { 1438 case -1102667083: // linkId 1439 this.linkId = castToString(value); // StringType 1440 break; 1441 case 951024232: // concept 1442 this.getConcept().add(castToCoding(value)); // Coding 1443 break; 1444 case -980110702: // prefix 1445 this.prefix = castToString(value); // StringType 1446 break; 1447 case 3556653: // text 1448 this.text = castToString(value); // StringType 1449 break; 1450 case 3575610: // type 1451 this.type = new QuestionnaireItemTypeEnumFactory().fromType(value); // Enumeration<QuestionnaireItemType> 1452 break; 1453 case 1893321565: // enableWhen 1454 this.getEnableWhen().add((QuestionnaireItemEnableWhenComponent) value); // QuestionnaireItemEnableWhenComponent 1455 break; 1456 case -393139297: // required 1457 this.required = castToBoolean(value); // BooleanType 1458 break; 1459 case 1094288952: // repeats 1460 this.repeats = castToBoolean(value); // BooleanType 1461 break; 1462 case -867683742: // readOnly 1463 this.readOnly = castToBoolean(value); // BooleanType 1464 break; 1465 case -791400086: // maxLength 1466 this.maxLength = castToInteger(value); // IntegerType 1467 break; 1468 case -1249474914: // options 1469 this.options = castToReference(value); // Reference 1470 break; 1471 case -1010136971: // option 1472 this.getOption().add((QuestionnaireItemOptionComponent) value); // QuestionnaireItemOptionComponent 1473 break; 1474 case 1948342084: // initial 1475 this.initial = (Type) value; // Type 1476 break; 1477 case 3242771: // item 1478 this.getItem().add((QuestionnaireItemComponent) value); // QuestionnaireItemComponent 1479 break; 1480 default: super.setProperty(hash, name, value); 1481 } 1482 1483 } 1484 1485 @Override 1486 public void setProperty(String name, Base value) throws FHIRException { 1487 if (name.equals("linkId")) 1488 this.linkId = castToString(value); // StringType 1489 else if (name.equals("concept")) 1490 this.getConcept().add(castToCoding(value)); 1491 else if (name.equals("prefix")) 1492 this.prefix = castToString(value); // StringType 1493 else if (name.equals("text")) 1494 this.text = castToString(value); // StringType 1495 else if (name.equals("type")) 1496 this.type = new QuestionnaireItemTypeEnumFactory().fromType(value); // Enumeration<QuestionnaireItemType> 1497 else if (name.equals("enableWhen")) 1498 this.getEnableWhen().add((QuestionnaireItemEnableWhenComponent) value); 1499 else if (name.equals("required")) 1500 this.required = castToBoolean(value); // BooleanType 1501 else if (name.equals("repeats")) 1502 this.repeats = castToBoolean(value); // BooleanType 1503 else if (name.equals("readOnly")) 1504 this.readOnly = castToBoolean(value); // BooleanType 1505 else if (name.equals("maxLength")) 1506 this.maxLength = castToInteger(value); // IntegerType 1507 else if (name.equals("options")) 1508 this.options = castToReference(value); // Reference 1509 else if (name.equals("option")) 1510 this.getOption().add((QuestionnaireItemOptionComponent) value); 1511 else if (name.equals("initial[x]")) 1512 this.initial = (Type) value; // Type 1513 else if (name.equals("item")) 1514 this.getItem().add((QuestionnaireItemComponent) value); 1515 else 1516 super.setProperty(name, value); 1517 } 1518 1519 @Override 1520 public Base makeProperty(int hash, String name) throws FHIRException { 1521 switch (hash) { 1522 case -1102667083: throw new FHIRException("Cannot make property linkId as it is not a complex type"); // StringType 1523 case 951024232: return addConcept(); // Coding 1524 case -980110702: throw new FHIRException("Cannot make property prefix as it is not a complex type"); // StringType 1525 case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType 1526 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<QuestionnaireItemType> 1527 case 1893321565: return addEnableWhen(); // QuestionnaireItemEnableWhenComponent 1528 case -393139297: throw new FHIRException("Cannot make property required as it is not a complex type"); // BooleanType 1529 case 1094288952: throw new FHIRException("Cannot make property repeats as it is not a complex type"); // BooleanType 1530 case -867683742: throw new FHIRException("Cannot make property readOnly as it is not a complex type"); // BooleanType 1531 case -791400086: throw new FHIRException("Cannot make property maxLength as it is not a complex type"); // IntegerType 1532 case -1249474914: return getOptions(); // Reference 1533 case -1010136971: return addOption(); // QuestionnaireItemOptionComponent 1534 case 871077564: return getInitial(); // Type 1535 case 3242771: return addItem(); // QuestionnaireItemComponent 1536 default: return super.makeProperty(hash, name); 1537 } 1538 1539 } 1540 1541 @Override 1542 public Base addChild(String name) throws FHIRException { 1543 if (name.equals("linkId")) { 1544 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.linkId"); 1545 } 1546 else if (name.equals("concept")) { 1547 return addConcept(); 1548 } 1549 else if (name.equals("prefix")) { 1550 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.prefix"); 1551 } 1552 else if (name.equals("text")) { 1553 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.text"); 1554 } 1555 else if (name.equals("type")) { 1556 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.type"); 1557 } 1558 else if (name.equals("enableWhen")) { 1559 return addEnableWhen(); 1560 } 1561 else if (name.equals("required")) { 1562 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.required"); 1563 } 1564 else if (name.equals("repeats")) { 1565 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.repeats"); 1566 } 1567 else if (name.equals("readOnly")) { 1568 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.readOnly"); 1569 } 1570 else if (name.equals("maxLength")) { 1571 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.maxLength"); 1572 } 1573 else if (name.equals("options")) { 1574 this.options = new Reference(); 1575 return this.options; 1576 } 1577 else if (name.equals("option")) { 1578 return addOption(); 1579 } 1580 else if (name.equals("initialBoolean")) { 1581 this.initial = new BooleanType(); 1582 return this.initial; 1583 } 1584 else if (name.equals("initialDecimal")) { 1585 this.initial = new DecimalType(); 1586 return this.initial; 1587 } 1588 else if (name.equals("initialInteger")) { 1589 this.initial = new IntegerType(); 1590 return this.initial; 1591 } 1592 else if (name.equals("initialDate")) { 1593 this.initial = new DateType(); 1594 return this.initial; 1595 } 1596 else if (name.equals("initialDateTime")) { 1597 this.initial = new DateTimeType(); 1598 return this.initial; 1599 } 1600 else if (name.equals("initialInstant")) { 1601 this.initial = new InstantType(); 1602 return this.initial; 1603 } 1604 else if (name.equals("initialTime")) { 1605 this.initial = new TimeType(); 1606 return this.initial; 1607 } 1608 else if (name.equals("initialString")) { 1609 this.initial = new StringType(); 1610 return this.initial; 1611 } 1612 else if (name.equals("initialUri")) { 1613 this.initial = new UriType(); 1614 return this.initial; 1615 } 1616 else if (name.equals("initialAttachment")) { 1617 this.initial = new Attachment(); 1618 return this.initial; 1619 } 1620 else if (name.equals("initialCoding")) { 1621 this.initial = new Coding(); 1622 return this.initial; 1623 } 1624 else if (name.equals("initialQuantity")) { 1625 this.initial = new Quantity(); 1626 return this.initial; 1627 } 1628 else if (name.equals("initialReference")) { 1629 this.initial = new Reference(); 1630 return this.initial; 1631 } 1632 else if (name.equals("item")) { 1633 return addItem(); 1634 } 1635 else 1636 return super.addChild(name); 1637 } 1638 1639 public QuestionnaireItemComponent copy() { 1640 QuestionnaireItemComponent dst = new QuestionnaireItemComponent(); 1641 copyValues(dst); 1642 dst.linkId = linkId == null ? null : linkId.copy(); 1643 if (concept != null) { 1644 dst.concept = new ArrayList<Coding>(); 1645 for (Coding i : concept) 1646 dst.concept.add(i.copy()); 1647 }; 1648 dst.prefix = prefix == null ? null : prefix.copy(); 1649 dst.text = text == null ? null : text.copy(); 1650 dst.type = type == null ? null : type.copy(); 1651 if (enableWhen != null) { 1652 dst.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 1653 for (QuestionnaireItemEnableWhenComponent i : enableWhen) 1654 dst.enableWhen.add(i.copy()); 1655 }; 1656 dst.required = required == null ? null : required.copy(); 1657 dst.repeats = repeats == null ? null : repeats.copy(); 1658 dst.readOnly = readOnly == null ? null : readOnly.copy(); 1659 dst.maxLength = maxLength == null ? null : maxLength.copy(); 1660 dst.options = options == null ? null : options.copy(); 1661 if (option != null) { 1662 dst.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1663 for (QuestionnaireItemOptionComponent i : option) 1664 dst.option.add(i.copy()); 1665 }; 1666 dst.initial = initial == null ? null : initial.copy(); 1667 if (item != null) { 1668 dst.item = new ArrayList<QuestionnaireItemComponent>(); 1669 for (QuestionnaireItemComponent i : item) 1670 dst.item.add(i.copy()); 1671 }; 1672 return dst; 1673 } 1674 1675 @Override 1676 public boolean equalsDeep(Base other) { 1677 if (!super.equalsDeep(other)) 1678 return false; 1679 if (!(other instanceof QuestionnaireItemComponent)) 1680 return false; 1681 QuestionnaireItemComponent o = (QuestionnaireItemComponent) other; 1682 return compareDeep(linkId, o.linkId, true) && compareDeep(concept, o.concept, true) && compareDeep(prefix, o.prefix, true) 1683 && compareDeep(text, o.text, true) && compareDeep(type, o.type, true) && compareDeep(enableWhen, o.enableWhen, true) 1684 && compareDeep(required, o.required, true) && compareDeep(repeats, o.repeats, true) && compareDeep(readOnly, o.readOnly, true) 1685 && compareDeep(maxLength, o.maxLength, true) && compareDeep(options, o.options, true) && compareDeep(option, o.option, true) 1686 && compareDeep(initial, o.initial, true) && compareDeep(item, o.item, true); 1687 } 1688 1689 @Override 1690 public boolean equalsShallow(Base other) { 1691 if (!super.equalsShallow(other)) 1692 return false; 1693 if (!(other instanceof QuestionnaireItemComponent)) 1694 return false; 1695 QuestionnaireItemComponent o = (QuestionnaireItemComponent) other; 1696 return compareValues(linkId, o.linkId, true) && compareValues(prefix, o.prefix, true) && compareValues(text, o.text, true) 1697 && compareValues(type, o.type, true) && compareValues(required, o.required, true) && compareValues(repeats, o.repeats, true) 1698 && compareValues(readOnly, o.readOnly, true) && compareValues(maxLength, o.maxLength, true); 1699 } 1700 1701 public boolean isEmpty() { 1702 return super.isEmpty() && (linkId == null || linkId.isEmpty()) && (concept == null || concept.isEmpty()) 1703 && (prefix == null || prefix.isEmpty()) && (text == null || text.isEmpty()) && (type == null || type.isEmpty()) 1704 && (enableWhen == null || enableWhen.isEmpty()) && (required == null || required.isEmpty()) 1705 && (repeats == null || repeats.isEmpty()) && (readOnly == null || readOnly.isEmpty()) && (maxLength == null || maxLength.isEmpty()) 1706 && (options == null || options.isEmpty()) && (option == null || option.isEmpty()) && (initial == null || initial.isEmpty()) 1707 && (item == null || item.isEmpty()); 1708 } 1709 1710 public String fhirType() { 1711 return "Questionnaire.item"; 1712 1713 } 1714 1715 } 1716 1717 @Block() 1718 public static class QuestionnaireItemEnableWhenComponent extends BackboneElement implements IBaseBackboneElement { 1719 /** 1720 * The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. 1721 */ 1722 @Child(name = "question", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1723 @Description(shortDefinition="Question that determines whether item is enabled", formalDefinition="The linkId for the question whose answer (or lack of answer) governs whether this item is enabled." ) 1724 protected StringType question; 1725 1726 /** 1727 * If present, indicates that this item should be enabled only if the specified question is answered or not answered. 1728 */ 1729 @Child(name = "answered", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1730 @Description(shortDefinition="Enable when answered or not", formalDefinition="If present, indicates that this item should be enabled only if the specified question is answered or not answered." ) 1731 protected BooleanType answered; 1732 1733 /** 1734 * If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer. 1735 */ 1736 @Child(name = "answer", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, InstantType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class}, order=3, min=0, max=1, modifier=false, summary=false) 1737 @Description(shortDefinition="Value question must have", formalDefinition="If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer." ) 1738 protected Type answer; 1739 1740 private static final long serialVersionUID = 903205698L; 1741 1742 /** 1743 * Constructor 1744 */ 1745 public QuestionnaireItemEnableWhenComponent() { 1746 super(); 1747 } 1748 1749 /** 1750 * Constructor 1751 */ 1752 public QuestionnaireItemEnableWhenComponent(StringType question) { 1753 super(); 1754 this.question = question; 1755 } 1756 1757 /** 1758 * @return {@link #question} (The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.). This is the underlying object with id, value and extensions. The accessor "getQuestion" gives direct access to the value 1759 */ 1760 public StringType getQuestionElement() { 1761 if (this.question == null) 1762 if (Configuration.errorOnAutoCreate()) 1763 throw new Error("Attempt to auto-create QuestionnaireItemEnableWhenComponent.question"); 1764 else if (Configuration.doAutoCreate()) 1765 this.question = new StringType(); // bb 1766 return this.question; 1767 } 1768 1769 public boolean hasQuestionElement() { 1770 return this.question != null && !this.question.isEmpty(); 1771 } 1772 1773 public boolean hasQuestion() { 1774 return this.question != null && !this.question.isEmpty(); 1775 } 1776 1777 /** 1778 * @param value {@link #question} (The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.). This is the underlying object with id, value and extensions. The accessor "getQuestion" gives direct access to the value 1779 */ 1780 public QuestionnaireItemEnableWhenComponent setQuestionElement(StringType value) { 1781 this.question = value; 1782 return this; 1783 } 1784 1785 /** 1786 * @return The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. 1787 */ 1788 public String getQuestion() { 1789 return this.question == null ? null : this.question.getValue(); 1790 } 1791 1792 /** 1793 * @param value The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. 1794 */ 1795 public QuestionnaireItemEnableWhenComponent setQuestion(String value) { 1796 if (this.question == null) 1797 this.question = new StringType(); 1798 this.question.setValue(value); 1799 return this; 1800 } 1801 1802 /** 1803 * @return {@link #answered} (If present, indicates that this item should be enabled only if the specified question is answered or not answered.). This is the underlying object with id, value and extensions. The accessor "getAnswered" gives direct access to the value 1804 */ 1805 public BooleanType getAnsweredElement() { 1806 if (this.answered == null) 1807 if (Configuration.errorOnAutoCreate()) 1808 throw new Error("Attempt to auto-create QuestionnaireItemEnableWhenComponent.answered"); 1809 else if (Configuration.doAutoCreate()) 1810 this.answered = new BooleanType(); // bb 1811 return this.answered; 1812 } 1813 1814 public boolean hasAnsweredElement() { 1815 return this.answered != null && !this.answered.isEmpty(); 1816 } 1817 1818 public boolean hasAnswered() { 1819 return this.answered != null && !this.answered.isEmpty(); 1820 } 1821 1822 /** 1823 * @param value {@link #answered} (If present, indicates that this item should be enabled only if the specified question is answered or not answered.). This is the underlying object with id, value and extensions. The accessor "getAnswered" gives direct access to the value 1824 */ 1825 public QuestionnaireItemEnableWhenComponent setAnsweredElement(BooleanType value) { 1826 this.answered = value; 1827 return this; 1828 } 1829 1830 /** 1831 * @return If present, indicates that this item should be enabled only if the specified question is answered or not answered. 1832 */ 1833 public boolean getAnswered() { 1834 return this.answered == null || this.answered.isEmpty() ? false : this.answered.getValue(); 1835 } 1836 1837 /** 1838 * @param value If present, indicates that this item should be enabled only if the specified question is answered or not answered. 1839 */ 1840 public QuestionnaireItemEnableWhenComponent setAnswered(boolean value) { 1841 if (this.answered == null) 1842 this.answered = new BooleanType(); 1843 this.answered.setValue(value); 1844 return this; 1845 } 1846 1847 /** 1848 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1849 */ 1850 public Type getAnswer() { 1851 return this.answer; 1852 } 1853 1854 /** 1855 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1856 */ 1857 public BooleanType getAnswerBooleanType() throws FHIRException { 1858 if (!(this.answer instanceof BooleanType)) 1859 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1860 return (BooleanType) this.answer; 1861 } 1862 1863 public boolean hasAnswerBooleanType() { 1864 return this.answer instanceof BooleanType; 1865 } 1866 1867 /** 1868 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1869 */ 1870 public DecimalType getAnswerDecimalType() throws FHIRException { 1871 if (!(this.answer instanceof DecimalType)) 1872 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1873 return (DecimalType) this.answer; 1874 } 1875 1876 public boolean hasAnswerDecimalType() { 1877 return this.answer instanceof DecimalType; 1878 } 1879 1880 /** 1881 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1882 */ 1883 public IntegerType getAnswerIntegerType() throws FHIRException { 1884 if (!(this.answer instanceof IntegerType)) 1885 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1886 return (IntegerType) this.answer; 1887 } 1888 1889 public boolean hasAnswerIntegerType() { 1890 return this.answer instanceof IntegerType; 1891 } 1892 1893 /** 1894 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1895 */ 1896 public DateType getAnswerDateType() throws FHIRException { 1897 if (!(this.answer instanceof DateType)) 1898 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1899 return (DateType) this.answer; 1900 } 1901 1902 public boolean hasAnswerDateType() { 1903 return this.answer instanceof DateType; 1904 } 1905 1906 /** 1907 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1908 */ 1909 public DateTimeType getAnswerDateTimeType() throws FHIRException { 1910 if (!(this.answer instanceof DateTimeType)) 1911 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1912 return (DateTimeType) this.answer; 1913 } 1914 1915 public boolean hasAnswerDateTimeType() { 1916 return this.answer instanceof DateTimeType; 1917 } 1918 1919 /** 1920 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1921 */ 1922 public InstantType getAnswerInstantType() throws FHIRException { 1923 if (!(this.answer instanceof InstantType)) 1924 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1925 return (InstantType) this.answer; 1926 } 1927 1928 public boolean hasAnswerInstantType() { 1929 return this.answer instanceof InstantType; 1930 } 1931 1932 /** 1933 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1934 */ 1935 public TimeType getAnswerTimeType() throws FHIRException { 1936 if (!(this.answer instanceof TimeType)) 1937 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1938 return (TimeType) this.answer; 1939 } 1940 1941 public boolean hasAnswerTimeType() { 1942 return this.answer instanceof TimeType; 1943 } 1944 1945 /** 1946 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1947 */ 1948 public StringType getAnswerStringType() throws FHIRException { 1949 if (!(this.answer instanceof StringType)) 1950 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1951 return (StringType) this.answer; 1952 } 1953 1954 public boolean hasAnswerStringType() { 1955 return this.answer instanceof StringType; 1956 } 1957 1958 /** 1959 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1960 */ 1961 public UriType getAnswerUriType() throws FHIRException { 1962 if (!(this.answer instanceof UriType)) 1963 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.answer.getClass().getName()+" was encountered"); 1964 return (UriType) this.answer; 1965 } 1966 1967 public boolean hasAnswerUriType() { 1968 return this.answer instanceof UriType; 1969 } 1970 1971 /** 1972 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1973 */ 1974 public Attachment getAnswerAttachment() throws FHIRException { 1975 if (!(this.answer instanceof Attachment)) 1976 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.answer.getClass().getName()+" was encountered"); 1977 return (Attachment) this.answer; 1978 } 1979 1980 public boolean hasAnswerAttachment() { 1981 return this.answer instanceof Attachment; 1982 } 1983 1984 /** 1985 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1986 */ 1987 public Coding getAnswerCoding() throws FHIRException { 1988 if (!(this.answer instanceof Coding)) 1989 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.answer.getClass().getName()+" was encountered"); 1990 return (Coding) this.answer; 1991 } 1992 1993 public boolean hasAnswerCoding() { 1994 return this.answer instanceof Coding; 1995 } 1996 1997 /** 1998 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 1999 */ 2000 public Quantity getAnswerQuantity() throws FHIRException { 2001 if (!(this.answer instanceof Quantity)) 2002 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.answer.getClass().getName()+" was encountered"); 2003 return (Quantity) this.answer; 2004 } 2005 2006 public boolean hasAnswerQuantity() { 2007 return this.answer instanceof Quantity; 2008 } 2009 2010 /** 2011 * @return {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 2012 */ 2013 public Reference getAnswerReference() throws FHIRException { 2014 if (!(this.answer instanceof Reference)) 2015 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.answer.getClass().getName()+" was encountered"); 2016 return (Reference) this.answer; 2017 } 2018 2019 public boolean hasAnswerReference() { 2020 return this.answer instanceof Reference; 2021 } 2022 2023 public boolean hasAnswer() { 2024 return this.answer != null && !this.answer.isEmpty(); 2025 } 2026 2027 /** 2028 * @param value {@link #answer} (If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.) 2029 */ 2030 public QuestionnaireItemEnableWhenComponent setAnswer(Type value) { 2031 this.answer = value; 2032 return this; 2033 } 2034 2035 protected void listChildren(List<Property> childrenList) { 2036 super.listChildren(childrenList); 2037 childrenList.add(new Property("question", "string", "The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.", 0, java.lang.Integer.MAX_VALUE, question)); 2038 childrenList.add(new Property("answered", "boolean", "If present, indicates that this item should be enabled only if the specified question is answered or not answered.", 0, java.lang.Integer.MAX_VALUE, answered)); 2039 childrenList.add(new Property("answer[x]", "boolean|decimal|integer|date|dateTime|instant|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "If present, then the answer for the referenced question must match this answer for all components present in the enableWhen.answer.", 0, java.lang.Integer.MAX_VALUE, answer)); 2040 } 2041 2042 @Override 2043 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2044 switch (hash) { 2045 case -1165870106: /*question*/ return this.question == null ? new Base[0] : new Base[] {this.question}; // StringType 2046 case -499559203: /*answered*/ return this.answered == null ? new Base[0] : new Base[] {this.answered}; // BooleanType 2047 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : new Base[] {this.answer}; // Type 2048 default: return super.getProperty(hash, name, checkValid); 2049 } 2050 2051 } 2052 2053 @Override 2054 public void setProperty(int hash, String name, Base value) throws FHIRException { 2055 switch (hash) { 2056 case -1165870106: // question 2057 this.question = castToString(value); // StringType 2058 break; 2059 case -499559203: // answered 2060 this.answered = castToBoolean(value); // BooleanType 2061 break; 2062 case -1412808770: // answer 2063 this.answer = (Type) value; // Type 2064 break; 2065 default: super.setProperty(hash, name, value); 2066 } 2067 2068 } 2069 2070 @Override 2071 public void setProperty(String name, Base value) throws FHIRException { 2072 if (name.equals("question")) 2073 this.question = castToString(value); // StringType 2074 else if (name.equals("answered")) 2075 this.answered = castToBoolean(value); // BooleanType 2076 else if (name.equals("answer[x]")) 2077 this.answer = (Type) value; // Type 2078 else 2079 super.setProperty(name, value); 2080 } 2081 2082 @Override 2083 public Base makeProperty(int hash, String name) throws FHIRException { 2084 switch (hash) { 2085 case -1165870106: throw new FHIRException("Cannot make property question as it is not a complex type"); // StringType 2086 case -499559203: throw new FHIRException("Cannot make property answered as it is not a complex type"); // BooleanType 2087 case 1693524994: return getAnswer(); // Type 2088 default: return super.makeProperty(hash, name); 2089 } 2090 2091 } 2092 2093 @Override 2094 public Base addChild(String name) throws FHIRException { 2095 if (name.equals("question")) { 2096 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.question"); 2097 } 2098 else if (name.equals("answered")) { 2099 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.answered"); 2100 } 2101 else if (name.equals("answerBoolean")) { 2102 this.answer = new BooleanType(); 2103 return this.answer; 2104 } 2105 else if (name.equals("answerDecimal")) { 2106 this.answer = new DecimalType(); 2107 return this.answer; 2108 } 2109 else if (name.equals("answerInteger")) { 2110 this.answer = new IntegerType(); 2111 return this.answer; 2112 } 2113 else if (name.equals("answerDate")) { 2114 this.answer = new DateType(); 2115 return this.answer; 2116 } 2117 else if (name.equals("answerDateTime")) { 2118 this.answer = new DateTimeType(); 2119 return this.answer; 2120 } 2121 else if (name.equals("answerInstant")) { 2122 this.answer = new InstantType(); 2123 return this.answer; 2124 } 2125 else if (name.equals("answerTime")) { 2126 this.answer = new TimeType(); 2127 return this.answer; 2128 } 2129 else if (name.equals("answerString")) { 2130 this.answer = new StringType(); 2131 return this.answer; 2132 } 2133 else if (name.equals("answerUri")) { 2134 this.answer = new UriType(); 2135 return this.answer; 2136 } 2137 else if (name.equals("answerAttachment")) { 2138 this.answer = new Attachment(); 2139 return this.answer; 2140 } 2141 else if (name.equals("answerCoding")) { 2142 this.answer = new Coding(); 2143 return this.answer; 2144 } 2145 else if (name.equals("answerQuantity")) { 2146 this.answer = new Quantity(); 2147 return this.answer; 2148 } 2149 else if (name.equals("answerReference")) { 2150 this.answer = new Reference(); 2151 return this.answer; 2152 } 2153 else 2154 return super.addChild(name); 2155 } 2156 2157 public QuestionnaireItemEnableWhenComponent copy() { 2158 QuestionnaireItemEnableWhenComponent dst = new QuestionnaireItemEnableWhenComponent(); 2159 copyValues(dst); 2160 dst.question = question == null ? null : question.copy(); 2161 dst.answered = answered == null ? null : answered.copy(); 2162 dst.answer = answer == null ? null : answer.copy(); 2163 return dst; 2164 } 2165 2166 @Override 2167 public boolean equalsDeep(Base other) { 2168 if (!super.equalsDeep(other)) 2169 return false; 2170 if (!(other instanceof QuestionnaireItemEnableWhenComponent)) 2171 return false; 2172 QuestionnaireItemEnableWhenComponent o = (QuestionnaireItemEnableWhenComponent) other; 2173 return compareDeep(question, o.question, true) && compareDeep(answered, o.answered, true) && compareDeep(answer, o.answer, true) 2174 ; 2175 } 2176 2177 @Override 2178 public boolean equalsShallow(Base other) { 2179 if (!super.equalsShallow(other)) 2180 return false; 2181 if (!(other instanceof QuestionnaireItemEnableWhenComponent)) 2182 return false; 2183 QuestionnaireItemEnableWhenComponent o = (QuestionnaireItemEnableWhenComponent) other; 2184 return compareValues(question, o.question, true) && compareValues(answered, o.answered, true); 2185 } 2186 2187 public boolean isEmpty() { 2188 return super.isEmpty() && (question == null || question.isEmpty()) && (answered == null || answered.isEmpty()) 2189 && (answer == null || answer.isEmpty()); 2190 } 2191 2192 public String fhirType() { 2193 return "Questionnaire.item.enableWhen"; 2194 2195 } 2196 2197 } 2198 2199 @Block() 2200 public static class QuestionnaireItemOptionComponent extends BackboneElement implements IBaseBackboneElement { 2201 /** 2202 * Identifies a specific answer that's allowed as the answer to a question. 2203 */ 2204 @Child(name = "value", type = {IntegerType.class, DateType.class, TimeType.class, StringType.class, Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 2205 @Description(shortDefinition="Answer value", formalDefinition="Identifies a specific answer that's allowed as the answer to a question." ) 2206 protected Type value; 2207 2208 private static final long serialVersionUID = -732981989L; 2209 2210 /** 2211 * Constructor 2212 */ 2213 public QuestionnaireItemOptionComponent() { 2214 super(); 2215 } 2216 2217 /** 2218 * Constructor 2219 */ 2220 public QuestionnaireItemOptionComponent(Type value) { 2221 super(); 2222 this.value = value; 2223 } 2224 2225 /** 2226 * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) 2227 */ 2228 public Type getValue() { 2229 return this.value; 2230 } 2231 2232 /** 2233 * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) 2234 */ 2235 public IntegerType getValueIntegerType() throws FHIRException { 2236 if (!(this.value instanceof IntegerType)) 2237 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 2238 return (IntegerType) this.value; 2239 } 2240 2241 public boolean hasValueIntegerType() { 2242 return this.value instanceof IntegerType; 2243 } 2244 2245 /** 2246 * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) 2247 */ 2248 public DateType getValueDateType() throws FHIRException { 2249 if (!(this.value instanceof DateType)) 2250 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 2251 return (DateType) this.value; 2252 } 2253 2254 public boolean hasValueDateType() { 2255 return this.value instanceof DateType; 2256 } 2257 2258 /** 2259 * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) 2260 */ 2261 public TimeType getValueTimeType() throws FHIRException { 2262 if (!(this.value instanceof TimeType)) 2263 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 2264 return (TimeType) this.value; 2265 } 2266 2267 public boolean hasValueTimeType() { 2268 return this.value instanceof TimeType; 2269 } 2270 2271 /** 2272 * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) 2273 */ 2274 public StringType getValueStringType() throws FHIRException { 2275 if (!(this.value instanceof StringType)) 2276 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 2277 return (StringType) this.value; 2278 } 2279 2280 public boolean hasValueStringType() { 2281 return this.value instanceof StringType; 2282 } 2283 2284 /** 2285 * @return {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) 2286 */ 2287 public Coding getValueCoding() throws FHIRException { 2288 if (!(this.value instanceof Coding)) 2289 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 2290 return (Coding) this.value; 2291 } 2292 2293 public boolean hasValueCoding() { 2294 return this.value instanceof Coding; 2295 } 2296 2297 public boolean hasValue() { 2298 return this.value != null && !this.value.isEmpty(); 2299 } 2300 2301 /** 2302 * @param value {@link #value} (Identifies a specific answer that's allowed as the answer to a question.) 2303 */ 2304 public QuestionnaireItemOptionComponent setValue(Type value) { 2305 this.value = value; 2306 return this; 2307 } 2308 2309 protected void listChildren(List<Property> childrenList) { 2310 super.listChildren(childrenList); 2311 childrenList.add(new Property("value[x]", "integer|date|time|string|Coding", "Identifies a specific answer that's allowed as the answer to a question.", 0, java.lang.Integer.MAX_VALUE, value)); 2312 } 2313 2314 @Override 2315 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2316 switch (hash) { 2317 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 2318 default: return super.getProperty(hash, name, checkValid); 2319 } 2320 2321 } 2322 2323 @Override 2324 public void setProperty(int hash, String name, Base value) throws FHIRException { 2325 switch (hash) { 2326 case 111972721: // value 2327 this.value = (Type) value; // Type 2328 break; 2329 default: super.setProperty(hash, name, value); 2330 } 2331 2332 } 2333 2334 @Override 2335 public void setProperty(String name, Base value) throws FHIRException { 2336 if (name.equals("value[x]")) 2337 this.value = (Type) value; // Type 2338 else 2339 super.setProperty(name, value); 2340 } 2341 2342 @Override 2343 public Base makeProperty(int hash, String name) throws FHIRException { 2344 switch (hash) { 2345 case -1410166417: return getValue(); // Type 2346 default: return super.makeProperty(hash, name); 2347 } 2348 2349 } 2350 2351 @Override 2352 public Base addChild(String name) throws FHIRException { 2353 if (name.equals("valueInteger")) { 2354 this.value = new IntegerType(); 2355 return this.value; 2356 } 2357 else if (name.equals("valueDate")) { 2358 this.value = new DateType(); 2359 return this.value; 2360 } 2361 else if (name.equals("valueTime")) { 2362 this.value = new TimeType(); 2363 return this.value; 2364 } 2365 else if (name.equals("valueString")) { 2366 this.value = new StringType(); 2367 return this.value; 2368 } 2369 else if (name.equals("valueCoding")) { 2370 this.value = new Coding(); 2371 return this.value; 2372 } 2373 else 2374 return super.addChild(name); 2375 } 2376 2377 public QuestionnaireItemOptionComponent copy() { 2378 QuestionnaireItemOptionComponent dst = new QuestionnaireItemOptionComponent(); 2379 copyValues(dst); 2380 dst.value = value == null ? null : value.copy(); 2381 return dst; 2382 } 2383 2384 @Override 2385 public boolean equalsDeep(Base other) { 2386 if (!super.equalsDeep(other)) 2387 return false; 2388 if (!(other instanceof QuestionnaireItemOptionComponent)) 2389 return false; 2390 QuestionnaireItemOptionComponent o = (QuestionnaireItemOptionComponent) other; 2391 return compareDeep(value, o.value, true); 2392 } 2393 2394 @Override 2395 public boolean equalsShallow(Base other) { 2396 if (!super.equalsShallow(other)) 2397 return false; 2398 if (!(other instanceof QuestionnaireItemOptionComponent)) 2399 return false; 2400 QuestionnaireItemOptionComponent o = (QuestionnaireItemOptionComponent) other; 2401 return true; 2402 } 2403 2404 public boolean isEmpty() { 2405 return super.isEmpty() && (value == null || value.isEmpty()); 2406 } 2407 2408 public String fhirType() { 2409 return "Questionnaire.item.option"; 2410 2411 } 2412 2413 } 2414 2415 /** 2416 * An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. 2417 */ 2418 @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) 2419 @Description(shortDefinition="Globally unique logical identifier for questionnaire", formalDefinition="An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published." ) 2420 protected UriType url; 2421 2422 /** 2423 * This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation). 2424 */ 2425 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2426 @Description(shortDefinition="External identifiers for this questionnaire", formalDefinition="This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) 2427 protected List<Identifier> identifier; 2428 2429 /** 2430 * The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. 2431 */ 2432 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 2433 @Description(shortDefinition="Logical identifier for this version of Questionnaire", formalDefinition="The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated." ) 2434 protected StringType version; 2435 2436 /** 2437 * The lifecycle status of the questionnaire as a whole. 2438 */ 2439 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) 2440 @Description(shortDefinition="draft | published | retired", formalDefinition="The lifecycle status of the questionnaire as a whole." ) 2441 protected Enumeration<QuestionnaireStatus> status; 2442 2443 /** 2444 * The date that this questionnaire was last changed. 2445 */ 2446 @Child(name = "date", type = {DateTimeType.class}, order=4, min=0, max=1, modifier=false, summary=true) 2447 @Description(shortDefinition="Date this version was authored", formalDefinition="The date that this questionnaire was last changed." ) 2448 protected DateTimeType date; 2449 2450 /** 2451 * Organization or person responsible for developing and maintaining the questionnaire. 2452 */ 2453 @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 2454 @Description(shortDefinition="Organization/individual who designed the questionnaire", formalDefinition="Organization or person responsible for developing and maintaining the questionnaire." ) 2455 protected StringType publisher; 2456 2457 /** 2458 * Contact details to assist a user in finding and communicating with the publisher. 2459 */ 2460 @Child(name = "telecom", type = {ContactPoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2461 @Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) 2462 protected List<ContactPoint> telecom; 2463 2464 /** 2465 * A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. "Pediatric", "Admissions", "Research", "Demographic", "Opinion Survey", etc. 2466 */ 2467 @Child(name = "useContext", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2468 @Description(shortDefinition="Questionnaire intends to support these contexts", formalDefinition="A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. \"Pediatric\", \"Admissions\", \"Research\", \"Demographic\", \"Opinion Survey\", etc." ) 2469 protected List<CodeableConcept> useContext; 2470 2471 /** 2472 * The name or label associated with this questionnaire. 2473 */ 2474 @Child(name = "title", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) 2475 @Description(shortDefinition="Name for the questionnaire", formalDefinition="The name or label associated with this questionnaire." ) 2476 protected StringType title; 2477 2478 /** 2479 * Identifies a how this question or group of questions is known in a particular terminology such as LOINC. 2480 */ 2481 @Child(name = "concept", type = {Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2482 @Description(shortDefinition="Concept that represents the overall questionnaire", formalDefinition="Identifies a how this question or group of questions is known in a particular terminology such as LOINC." ) 2483 protected List<Coding> concept; 2484 2485 /** 2486 * Identifies the types of subjects that can be the subject of the questionnaire. 2487 */ 2488 @Child(name = "subjectType", type = {CodeType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2489 @Description(shortDefinition="Resource that can be subject of QuestionnaireResponse", formalDefinition="Identifies the types of subjects that can be the subject of the questionnaire." ) 2490 protected List<CodeType> subjectType; 2491 2492 /** 2493 * The questions and groupings of questions that make up the questionnaire. 2494 */ 2495 @Child(name = "item", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2496 @Description(shortDefinition="Questions and sections within the Questionnaire", formalDefinition="The questions and groupings of questions that make up the questionnaire." ) 2497 protected List<QuestionnaireItemComponent> item; 2498 2499 private static final long serialVersionUID = 1271324566L; 2500 2501 /** 2502 * Constructor 2503 */ 2504 public Questionnaire() { 2505 super(); 2506 } 2507 2508 /** 2509 * Constructor 2510 */ 2511 public Questionnaire(Enumeration<QuestionnaireStatus> status) { 2512 super(); 2513 this.status = status; 2514 } 2515 2516 /** 2517 * @return {@link #url} (An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2518 */ 2519 public UriType getUrlElement() { 2520 if (this.url == null) 2521 if (Configuration.errorOnAutoCreate()) 2522 throw new Error("Attempt to auto-create Questionnaire.url"); 2523 else if (Configuration.doAutoCreate()) 2524 this.url = new UriType(); // bb 2525 return this.url; 2526 } 2527 2528 public boolean hasUrlElement() { 2529 return this.url != null && !this.url.isEmpty(); 2530 } 2531 2532 public boolean hasUrl() { 2533 return this.url != null && !this.url.isEmpty(); 2534 } 2535 2536 /** 2537 * @param value {@link #url} (An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2538 */ 2539 public Questionnaire setUrlElement(UriType value) { 2540 this.url = value; 2541 return this; 2542 } 2543 2544 /** 2545 * @return An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. 2546 */ 2547 public String getUrl() { 2548 return this.url == null ? null : this.url.getValue(); 2549 } 2550 2551 /** 2552 * @param value An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. 2553 */ 2554 public Questionnaire setUrl(String value) { 2555 if (Utilities.noString(value)) 2556 this.url = null; 2557 else { 2558 if (this.url == null) 2559 this.url = new UriType(); 2560 this.url.setValue(value); 2561 } 2562 return this; 2563 } 2564 2565 /** 2566 * @return {@link #identifier} (This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) 2567 */ 2568 public List<Identifier> getIdentifier() { 2569 if (this.identifier == null) 2570 this.identifier = new ArrayList<Identifier>(); 2571 return this.identifier; 2572 } 2573 2574 public boolean hasIdentifier() { 2575 if (this.identifier == null) 2576 return false; 2577 for (Identifier item : this.identifier) 2578 if (!item.isEmpty()) 2579 return true; 2580 return false; 2581 } 2582 2583 /** 2584 * @return {@link #identifier} (This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).) 2585 */ 2586 // syntactic sugar 2587 public Identifier addIdentifier() { //3 2588 Identifier t = new Identifier(); 2589 if (this.identifier == null) 2590 this.identifier = new ArrayList<Identifier>(); 2591 this.identifier.add(t); 2592 return t; 2593 } 2594 2595 // syntactic sugar 2596 public Questionnaire addIdentifier(Identifier t) { //3 2597 if (t == null) 2598 return this; 2599 if (this.identifier == null) 2600 this.identifier = new ArrayList<Identifier>(); 2601 this.identifier.add(t); 2602 return this; 2603 } 2604 2605 /** 2606 * @return {@link #version} (The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2607 */ 2608 public StringType getVersionElement() { 2609 if (this.version == null) 2610 if (Configuration.errorOnAutoCreate()) 2611 throw new Error("Attempt to auto-create Questionnaire.version"); 2612 else if (Configuration.doAutoCreate()) 2613 this.version = new StringType(); // bb 2614 return this.version; 2615 } 2616 2617 public boolean hasVersionElement() { 2618 return this.version != null && !this.version.isEmpty(); 2619 } 2620 2621 public boolean hasVersion() { 2622 return this.version != null && !this.version.isEmpty(); 2623 } 2624 2625 /** 2626 * @param value {@link #version} (The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2627 */ 2628 public Questionnaire setVersionElement(StringType value) { 2629 this.version = value; 2630 return this; 2631 } 2632 2633 /** 2634 * @return The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. 2635 */ 2636 public String getVersion() { 2637 return this.version == null ? null : this.version.getValue(); 2638 } 2639 2640 /** 2641 * @param value The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated. 2642 */ 2643 public Questionnaire setVersion(String value) { 2644 if (Utilities.noString(value)) 2645 this.version = null; 2646 else { 2647 if (this.version == null) 2648 this.version = new StringType(); 2649 this.version.setValue(value); 2650 } 2651 return this; 2652 } 2653 2654 /** 2655 * @return {@link #status} (The lifecycle status of the questionnaire as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2656 */ 2657 public Enumeration<QuestionnaireStatus> getStatusElement() { 2658 if (this.status == null) 2659 if (Configuration.errorOnAutoCreate()) 2660 throw new Error("Attempt to auto-create Questionnaire.status"); 2661 else if (Configuration.doAutoCreate()) 2662 this.status = new Enumeration<QuestionnaireStatus>(new QuestionnaireStatusEnumFactory()); // bb 2663 return this.status; 2664 } 2665 2666 public boolean hasStatusElement() { 2667 return this.status != null && !this.status.isEmpty(); 2668 } 2669 2670 public boolean hasStatus() { 2671 return this.status != null && !this.status.isEmpty(); 2672 } 2673 2674 /** 2675 * @param value {@link #status} (The lifecycle status of the questionnaire as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2676 */ 2677 public Questionnaire setStatusElement(Enumeration<QuestionnaireStatus> value) { 2678 this.status = value; 2679 return this; 2680 } 2681 2682 /** 2683 * @return The lifecycle status of the questionnaire as a whole. 2684 */ 2685 public QuestionnaireStatus getStatus() { 2686 return this.status == null ? null : this.status.getValue(); 2687 } 2688 2689 /** 2690 * @param value The lifecycle status of the questionnaire as a whole. 2691 */ 2692 public Questionnaire setStatus(QuestionnaireStatus value) { 2693 if (this.status == null) 2694 this.status = new Enumeration<QuestionnaireStatus>(new QuestionnaireStatusEnumFactory()); 2695 this.status.setValue(value); 2696 return this; 2697 } 2698 2699 /** 2700 * @return {@link #date} (The date that this questionnaire was last changed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2701 */ 2702 public DateTimeType getDateElement() { 2703 if (this.date == null) 2704 if (Configuration.errorOnAutoCreate()) 2705 throw new Error("Attempt to auto-create Questionnaire.date"); 2706 else if (Configuration.doAutoCreate()) 2707 this.date = new DateTimeType(); // bb 2708 return this.date; 2709 } 2710 2711 public boolean hasDateElement() { 2712 return this.date != null && !this.date.isEmpty(); 2713 } 2714 2715 public boolean hasDate() { 2716 return this.date != null && !this.date.isEmpty(); 2717 } 2718 2719 /** 2720 * @param value {@link #date} (The date that this questionnaire was last changed.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2721 */ 2722 public Questionnaire setDateElement(DateTimeType value) { 2723 this.date = value; 2724 return this; 2725 } 2726 2727 /** 2728 * @return The date that this questionnaire was last changed. 2729 */ 2730 public Date getDate() { 2731 return this.date == null ? null : this.date.getValue(); 2732 } 2733 2734 /** 2735 * @param value The date that this questionnaire was last changed. 2736 */ 2737 public Questionnaire setDate(Date value) { 2738 if (value == null) 2739 this.date = null; 2740 else { 2741 if (this.date == null) 2742 this.date = new DateTimeType(); 2743 this.date.setValue(value); 2744 } 2745 return this; 2746 } 2747 2748 /** 2749 * @return {@link #publisher} (Organization or person responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 2750 */ 2751 public StringType getPublisherElement() { 2752 if (this.publisher == null) 2753 if (Configuration.errorOnAutoCreate()) 2754 throw new Error("Attempt to auto-create Questionnaire.publisher"); 2755 else if (Configuration.doAutoCreate()) 2756 this.publisher = new StringType(); // bb 2757 return this.publisher; 2758 } 2759 2760 public boolean hasPublisherElement() { 2761 return this.publisher != null && !this.publisher.isEmpty(); 2762 } 2763 2764 public boolean hasPublisher() { 2765 return this.publisher != null && !this.publisher.isEmpty(); 2766 } 2767 2768 /** 2769 * @param value {@link #publisher} (Organization or person responsible for developing and maintaining the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 2770 */ 2771 public Questionnaire setPublisherElement(StringType value) { 2772 this.publisher = value; 2773 return this; 2774 } 2775 2776 /** 2777 * @return Organization or person responsible for developing and maintaining the questionnaire. 2778 */ 2779 public String getPublisher() { 2780 return this.publisher == null ? null : this.publisher.getValue(); 2781 } 2782 2783 /** 2784 * @param value Organization or person responsible for developing and maintaining the questionnaire. 2785 */ 2786 public Questionnaire setPublisher(String value) { 2787 if (Utilities.noString(value)) 2788 this.publisher = null; 2789 else { 2790 if (this.publisher == null) 2791 this.publisher = new StringType(); 2792 this.publisher.setValue(value); 2793 } 2794 return this; 2795 } 2796 2797 /** 2798 * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) 2799 */ 2800 public List<ContactPoint> getTelecom() { 2801 if (this.telecom == null) 2802 this.telecom = new ArrayList<ContactPoint>(); 2803 return this.telecom; 2804 } 2805 2806 public boolean hasTelecom() { 2807 if (this.telecom == null) 2808 return false; 2809 for (ContactPoint item : this.telecom) 2810 if (!item.isEmpty()) 2811 return true; 2812 return false; 2813 } 2814 2815 /** 2816 * @return {@link #telecom} (Contact details to assist a user in finding and communicating with the publisher.) 2817 */ 2818 // syntactic sugar 2819 public ContactPoint addTelecom() { //3 2820 ContactPoint t = new ContactPoint(); 2821 if (this.telecom == null) 2822 this.telecom = new ArrayList<ContactPoint>(); 2823 this.telecom.add(t); 2824 return t; 2825 } 2826 2827 // syntactic sugar 2828 public Questionnaire addTelecom(ContactPoint t) { //3 2829 if (t == null) 2830 return this; 2831 if (this.telecom == null) 2832 this.telecom = new ArrayList<ContactPoint>(); 2833 this.telecom.add(t); 2834 return this; 2835 } 2836 2837 /** 2838 * @return {@link #useContext} (A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. "Pediatric", "Admissions", "Research", "Demographic", "Opinion Survey", etc.) 2839 */ 2840 public List<CodeableConcept> getUseContext() { 2841 if (this.useContext == null) 2842 this.useContext = new ArrayList<CodeableConcept>(); 2843 return this.useContext; 2844 } 2845 2846 public boolean hasUseContext() { 2847 if (this.useContext == null) 2848 return false; 2849 for (CodeableConcept item : this.useContext) 2850 if (!item.isEmpty()) 2851 return true; 2852 return false; 2853 } 2854 2855 /** 2856 * @return {@link #useContext} (A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. "Pediatric", "Admissions", "Research", "Demographic", "Opinion Survey", etc.) 2857 */ 2858 // syntactic sugar 2859 public CodeableConcept addUseContext() { //3 2860 CodeableConcept t = new CodeableConcept(); 2861 if (this.useContext == null) 2862 this.useContext = new ArrayList<CodeableConcept>(); 2863 this.useContext.add(t); 2864 return t; 2865 } 2866 2867 // syntactic sugar 2868 public Questionnaire addUseContext(CodeableConcept t) { //3 2869 if (t == null) 2870 return this; 2871 if (this.useContext == null) 2872 this.useContext = new ArrayList<CodeableConcept>(); 2873 this.useContext.add(t); 2874 return this; 2875 } 2876 2877 /** 2878 * @return {@link #title} (The name or label associated with this questionnaire.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2879 */ 2880 public StringType getTitleElement() { 2881 if (this.title == null) 2882 if (Configuration.errorOnAutoCreate()) 2883 throw new Error("Attempt to auto-create Questionnaire.title"); 2884 else if (Configuration.doAutoCreate()) 2885 this.title = new StringType(); // bb 2886 return this.title; 2887 } 2888 2889 public boolean hasTitleElement() { 2890 return this.title != null && !this.title.isEmpty(); 2891 } 2892 2893 public boolean hasTitle() { 2894 return this.title != null && !this.title.isEmpty(); 2895 } 2896 2897 /** 2898 * @param value {@link #title} (The name or label associated with this questionnaire.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2899 */ 2900 public Questionnaire setTitleElement(StringType value) { 2901 this.title = value; 2902 return this; 2903 } 2904 2905 /** 2906 * @return The name or label associated with this questionnaire. 2907 */ 2908 public String getTitle() { 2909 return this.title == null ? null : this.title.getValue(); 2910 } 2911 2912 /** 2913 * @param value The name or label associated with this questionnaire. 2914 */ 2915 public Questionnaire setTitle(String value) { 2916 if (Utilities.noString(value)) 2917 this.title = null; 2918 else { 2919 if (this.title == null) 2920 this.title = new StringType(); 2921 this.title.setValue(value); 2922 } 2923 return this; 2924 } 2925 2926 /** 2927 * @return {@link #concept} (Identifies a how this question or group of questions is known in a particular terminology such as LOINC.) 2928 */ 2929 public List<Coding> getConcept() { 2930 if (this.concept == null) 2931 this.concept = new ArrayList<Coding>(); 2932 return this.concept; 2933 } 2934 2935 public boolean hasConcept() { 2936 if (this.concept == null) 2937 return false; 2938 for (Coding item : this.concept) 2939 if (!item.isEmpty()) 2940 return true; 2941 return false; 2942 } 2943 2944 /** 2945 * @return {@link #concept} (Identifies a how this question or group of questions is known in a particular terminology such as LOINC.) 2946 */ 2947 // syntactic sugar 2948 public Coding addConcept() { //3 2949 Coding t = new Coding(); 2950 if (this.concept == null) 2951 this.concept = new ArrayList<Coding>(); 2952 this.concept.add(t); 2953 return t; 2954 } 2955 2956 // syntactic sugar 2957 public Questionnaire addConcept(Coding t) { //3 2958 if (t == null) 2959 return this; 2960 if (this.concept == null) 2961 this.concept = new ArrayList<Coding>(); 2962 this.concept.add(t); 2963 return this; 2964 } 2965 2966 /** 2967 * @return {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) 2968 */ 2969 public List<CodeType> getSubjectType() { 2970 if (this.subjectType == null) 2971 this.subjectType = new ArrayList<CodeType>(); 2972 return this.subjectType; 2973 } 2974 2975 public boolean hasSubjectType() { 2976 if (this.subjectType == null) 2977 return false; 2978 for (CodeType item : this.subjectType) 2979 if (!item.isEmpty()) 2980 return true; 2981 return false; 2982 } 2983 2984 /** 2985 * @return {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) 2986 */ 2987 // syntactic sugar 2988 public CodeType addSubjectTypeElement() {//2 2989 CodeType t = new CodeType(); 2990 if (this.subjectType == null) 2991 this.subjectType = new ArrayList<CodeType>(); 2992 this.subjectType.add(t); 2993 return t; 2994 } 2995 2996 /** 2997 * @param value {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) 2998 */ 2999 public Questionnaire addSubjectType(String value) { //1 3000 CodeType t = new CodeType(); 3001 t.setValue(value); 3002 if (this.subjectType == null) 3003 this.subjectType = new ArrayList<CodeType>(); 3004 this.subjectType.add(t); 3005 return this; 3006 } 3007 3008 /** 3009 * @param value {@link #subjectType} (Identifies the types of subjects that can be the subject of the questionnaire.) 3010 */ 3011 public boolean hasSubjectType(String value) { 3012 if (this.subjectType == null) 3013 return false; 3014 for (CodeType v : this.subjectType) 3015 if (v.equals(value)) // code 3016 return true; 3017 return false; 3018 } 3019 3020 /** 3021 * @return {@link #item} (The questions and groupings of questions that make up the questionnaire.) 3022 */ 3023 public List<QuestionnaireItemComponent> getItem() { 3024 if (this.item == null) 3025 this.item = new ArrayList<QuestionnaireItemComponent>(); 3026 return this.item; 3027 } 3028 3029 public boolean hasItem() { 3030 if (this.item == null) 3031 return false; 3032 for (QuestionnaireItemComponent item : this.item) 3033 if (!item.isEmpty()) 3034 return true; 3035 return false; 3036 } 3037 3038 /** 3039 * @return {@link #item} (The questions and groupings of questions that make up the questionnaire.) 3040 */ 3041 // syntactic sugar 3042 public QuestionnaireItemComponent addItem() { //3 3043 QuestionnaireItemComponent t = new QuestionnaireItemComponent(); 3044 if (this.item == null) 3045 this.item = new ArrayList<QuestionnaireItemComponent>(); 3046 this.item.add(t); 3047 return t; 3048 } 3049 3050 // syntactic sugar 3051 public Questionnaire addItem(QuestionnaireItemComponent t) { //3 3052 if (t == null) 3053 return this; 3054 if (this.item == null) 3055 this.item = new ArrayList<QuestionnaireItemComponent>(); 3056 this.item.add(t); 3057 return this; 3058 } 3059 3060 protected void listChildren(List<Property> childrenList) { 3061 super.listChildren(childrenList); 3062 childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); 3063 childrenList.add(new Property("identifier", "Identifier", "This records identifiers associated with this question set that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).", 0, java.lang.Integer.MAX_VALUE, identifier)); 3064 childrenList.add(new Property("version", "string", "The version number assigned by the publisher for business reasons. It may remain the same when the resource is updated.", 0, java.lang.Integer.MAX_VALUE, version)); 3065 childrenList.add(new Property("status", "code", "The lifecycle status of the questionnaire as a whole.", 0, java.lang.Integer.MAX_VALUE, status)); 3066 childrenList.add(new Property("date", "dateTime", "The date that this questionnaire was last changed.", 0, java.lang.Integer.MAX_VALUE, date)); 3067 childrenList.add(new Property("publisher", "string", "Organization or person responsible for developing and maintaining the questionnaire.", 0, java.lang.Integer.MAX_VALUE, publisher)); 3068 childrenList.add(new Property("telecom", "ContactPoint", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); 3069 childrenList.add(new Property("useContext", "CodeableConcept", "A code that identifies the questionnaire as falling into a particular group of like questionnaires; e.g. \"Pediatric\", \"Admissions\", \"Research\", \"Demographic\", \"Opinion Survey\", etc.", 0, java.lang.Integer.MAX_VALUE, useContext)); 3070 childrenList.add(new Property("title", "string", "The name or label associated with this questionnaire.", 0, java.lang.Integer.MAX_VALUE, title)); 3071 childrenList.add(new Property("concept", "Coding", "Identifies a how this question or group of questions is known in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, concept)); 3072 childrenList.add(new Property("subjectType", "code", "Identifies the types of subjects that can be the subject of the questionnaire.", 0, java.lang.Integer.MAX_VALUE, subjectType)); 3073 childrenList.add(new Property("item", "", "The questions and groupings of questions that make up the questionnaire.", 0, java.lang.Integer.MAX_VALUE, item)); 3074 } 3075 3076 @Override 3077 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3078 switch (hash) { 3079 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3080 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3081 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 3082 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<QuestionnaireStatus> 3083 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 3084 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 3085 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 3086 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // CodeableConcept 3087 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 3088 case 951024232: /*concept*/ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // Coding 3089 case -603200890: /*subjectType*/ return this.subjectType == null ? new Base[0] : this.subjectType.toArray(new Base[this.subjectType.size()]); // CodeType 3090 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireItemComponent 3091 default: return super.getProperty(hash, name, checkValid); 3092 } 3093 3094 } 3095 3096 @Override 3097 public void setProperty(int hash, String name, Base value) throws FHIRException { 3098 switch (hash) { 3099 case 116079: // url 3100 this.url = castToUri(value); // UriType 3101 break; 3102 case -1618432855: // identifier 3103 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3104 break; 3105 case 351608024: // version 3106 this.version = castToString(value); // StringType 3107 break; 3108 case -892481550: // status 3109 this.status = new QuestionnaireStatusEnumFactory().fromType(value); // Enumeration<QuestionnaireStatus> 3110 break; 3111 case 3076014: // date 3112 this.date = castToDateTime(value); // DateTimeType 3113 break; 3114 case 1447404028: // publisher 3115 this.publisher = castToString(value); // StringType 3116 break; 3117 case -1429363305: // telecom 3118 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 3119 break; 3120 case -669707736: // useContext 3121 this.getUseContext().add(castToCodeableConcept(value)); // CodeableConcept 3122 break; 3123 case 110371416: // title 3124 this.title = castToString(value); // StringType 3125 break; 3126 case 951024232: // concept 3127 this.getConcept().add(castToCoding(value)); // Coding 3128 break; 3129 case -603200890: // subjectType 3130 this.getSubjectType().add(castToCode(value)); // CodeType 3131 break; 3132 case 3242771: // item 3133 this.getItem().add((QuestionnaireItemComponent) value); // QuestionnaireItemComponent 3134 break; 3135 default: super.setProperty(hash, name, value); 3136 } 3137 3138 } 3139 3140 @Override 3141 public void setProperty(String name, Base value) throws FHIRException { 3142 if (name.equals("url")) 3143 this.url = castToUri(value); // UriType 3144 else if (name.equals("identifier")) 3145 this.getIdentifier().add(castToIdentifier(value)); 3146 else if (name.equals("version")) 3147 this.version = castToString(value); // StringType 3148 else if (name.equals("status")) 3149 this.status = new QuestionnaireStatusEnumFactory().fromType(value); // Enumeration<QuestionnaireStatus> 3150 else if (name.equals("date")) 3151 this.date = castToDateTime(value); // DateTimeType 3152 else if (name.equals("publisher")) 3153 this.publisher = castToString(value); // StringType 3154 else if (name.equals("telecom")) 3155 this.getTelecom().add(castToContactPoint(value)); 3156 else if (name.equals("useContext")) 3157 this.getUseContext().add(castToCodeableConcept(value)); 3158 else if (name.equals("title")) 3159 this.title = castToString(value); // StringType 3160 else if (name.equals("concept")) 3161 this.getConcept().add(castToCoding(value)); 3162 else if (name.equals("subjectType")) 3163 this.getSubjectType().add(castToCode(value)); 3164 else if (name.equals("item")) 3165 this.getItem().add((QuestionnaireItemComponent) value); 3166 else 3167 super.setProperty(name, value); 3168 } 3169 3170 @Override 3171 public Base makeProperty(int hash, String name) throws FHIRException { 3172 switch (hash) { 3173 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 3174 case -1618432855: return addIdentifier(); // Identifier 3175 case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType 3176 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<QuestionnaireStatus> 3177 case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType 3178 case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType 3179 case -1429363305: return addTelecom(); // ContactPoint 3180 case -669707736: return addUseContext(); // CodeableConcept 3181 case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType 3182 case 951024232: return addConcept(); // Coding 3183 case -603200890: throw new FHIRException("Cannot make property subjectType as it is not a complex type"); // CodeType 3184 case 3242771: return addItem(); // QuestionnaireItemComponent 3185 default: return super.makeProperty(hash, name); 3186 } 3187 3188 } 3189 3190 @Override 3191 public Base addChild(String name) throws FHIRException { 3192 if (name.equals("url")) { 3193 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.url"); 3194 } 3195 else if (name.equals("identifier")) { 3196 return addIdentifier(); 3197 } 3198 else if (name.equals("version")) { 3199 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.version"); 3200 } 3201 else if (name.equals("status")) { 3202 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.status"); 3203 } 3204 else if (name.equals("date")) { 3205 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.date"); 3206 } 3207 else if (name.equals("publisher")) { 3208 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.publisher"); 3209 } 3210 else if (name.equals("telecom")) { 3211 return addTelecom(); 3212 } 3213 else if (name.equals("useContext")) { 3214 return addUseContext(); 3215 } 3216 else if (name.equals("title")) { 3217 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.title"); 3218 } 3219 else if (name.equals("concept")) { 3220 return addConcept(); 3221 } 3222 else if (name.equals("subjectType")) { 3223 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.subjectType"); 3224 } 3225 else if (name.equals("item")) { 3226 return addItem(); 3227 } 3228 else 3229 return super.addChild(name); 3230 } 3231 3232 public String fhirType() { 3233 return "Questionnaire"; 3234 3235 } 3236 3237 public Questionnaire copy() { 3238 Questionnaire dst = new Questionnaire(); 3239 copyValues(dst); 3240 dst.url = url == null ? null : url.copy(); 3241 if (identifier != null) { 3242 dst.identifier = new ArrayList<Identifier>(); 3243 for (Identifier i : identifier) 3244 dst.identifier.add(i.copy()); 3245 }; 3246 dst.version = version == null ? null : version.copy(); 3247 dst.status = status == null ? null : status.copy(); 3248 dst.date = date == null ? null : date.copy(); 3249 dst.publisher = publisher == null ? null : publisher.copy(); 3250 if (telecom != null) { 3251 dst.telecom = new ArrayList<ContactPoint>(); 3252 for (ContactPoint i : telecom) 3253 dst.telecom.add(i.copy()); 3254 }; 3255 if (useContext != null) { 3256 dst.useContext = new ArrayList<CodeableConcept>(); 3257 for (CodeableConcept i : useContext) 3258 dst.useContext.add(i.copy()); 3259 }; 3260 dst.title = title == null ? null : title.copy(); 3261 if (concept != null) { 3262 dst.concept = new ArrayList<Coding>(); 3263 for (Coding i : concept) 3264 dst.concept.add(i.copy()); 3265 }; 3266 if (subjectType != null) { 3267 dst.subjectType = new ArrayList<CodeType>(); 3268 for (CodeType i : subjectType) 3269 dst.subjectType.add(i.copy()); 3270 }; 3271 if (item != null) { 3272 dst.item = new ArrayList<QuestionnaireItemComponent>(); 3273 for (QuestionnaireItemComponent i : item) 3274 dst.item.add(i.copy()); 3275 }; 3276 return dst; 3277 } 3278 3279 protected Questionnaire typedCopy() { 3280 return copy(); 3281 } 3282 3283 @Override 3284 public boolean equalsDeep(Base other) { 3285 if (!super.equalsDeep(other)) 3286 return false; 3287 if (!(other instanceof Questionnaire)) 3288 return false; 3289 Questionnaire o = (Questionnaire) other; 3290 return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true) 3291 && compareDeep(status, o.status, true) && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) 3292 && compareDeep(telecom, o.telecom, true) && compareDeep(useContext, o.useContext, true) && compareDeep(title, o.title, true) 3293 && compareDeep(concept, o.concept, true) && compareDeep(subjectType, o.subjectType, true) && compareDeep(item, o.item, true) 3294 ; 3295 } 3296 3297 @Override 3298 public boolean equalsShallow(Base other) { 3299 if (!super.equalsShallow(other)) 3300 return false; 3301 if (!(other instanceof Questionnaire)) 3302 return false; 3303 Questionnaire o = (Questionnaire) other; 3304 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(status, o.status, true) 3305 && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true) && compareValues(title, o.title, true) 3306 && compareValues(subjectType, o.subjectType, true); 3307 } 3308 3309 public boolean isEmpty() { 3310 return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty()) 3311 && (version == null || version.isEmpty()) && (status == null || status.isEmpty()) && (date == null || date.isEmpty()) 3312 && (publisher == null || publisher.isEmpty()) && (telecom == null || telecom.isEmpty()) && (useContext == null || useContext.isEmpty()) 3313 && (title == null || title.isEmpty()) && (concept == null || concept.isEmpty()) && (subjectType == null || subjectType.isEmpty()) 3314 && (item == null || item.isEmpty()); 3315 } 3316 3317 @Override 3318 public ResourceType getResourceType() { 3319 return ResourceType.Questionnaire; 3320 } 3321 3322 /** 3323 * Search parameter: <b>title</b> 3324 * <p> 3325 * Description: <b>All or part of the name of the questionnaire</b><br> 3326 * Type: <b>string</b><br> 3327 * Path: <b>Questionnaire.title</b><br> 3328 * </p> 3329 */ 3330 @SearchParamDefinition(name="title", path="Questionnaire.title", description="All or part of the name of the questionnaire", type="string" ) 3331 public static final String SP_TITLE = "title"; 3332 /** 3333 * <b>Fluent Client</b> search parameter constant for <b>title</b> 3334 * <p> 3335 * Description: <b>All or part of the name of the questionnaire</b><br> 3336 * Type: <b>string</b><br> 3337 * Path: <b>Questionnaire.title</b><br> 3338 * </p> 3339 */ 3340 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 3341 3342 /** 3343 * Search parameter: <b>status</b> 3344 * <p> 3345 * Description: <b>The status of the questionnaire</b><br> 3346 * Type: <b>token</b><br> 3347 * Path: <b>Questionnaire.status</b><br> 3348 * </p> 3349 */ 3350 @SearchParamDefinition(name="status", path="Questionnaire.status", description="The status of the questionnaire", type="token" ) 3351 public static final String SP_STATUS = "status"; 3352 /** 3353 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3354 * <p> 3355 * Description: <b>The status of the questionnaire</b><br> 3356 * Type: <b>token</b><br> 3357 * Path: <b>Questionnaire.status</b><br> 3358 * </p> 3359 */ 3360 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3361 3362 /** 3363 * Search parameter: <b>context</b> 3364 * <p> 3365 * Description: <b>A use context assigned to the questionnaire</b><br> 3366 * Type: <b>token</b><br> 3367 * Path: <b>Questionnaire.useContext</b><br> 3368 * </p> 3369 */ 3370 @SearchParamDefinition(name="context", path="Questionnaire.useContext", description="A use context assigned to the questionnaire", type="token" ) 3371 public static final String SP_CONTEXT = "context"; 3372 /** 3373 * <b>Fluent Client</b> search parameter constant for <b>context</b> 3374 * <p> 3375 * Description: <b>A use context assigned to the questionnaire</b><br> 3376 * Type: <b>token</b><br> 3377 * Path: <b>Questionnaire.useContext</b><br> 3378 * </p> 3379 */ 3380 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 3381 3382 /** 3383 * Search parameter: <b>code</b> 3384 * <p> 3385 * Description: <b>A code that corresponds to the questionnaire or one of its groups</b><br> 3386 * Type: <b>token</b><br> 3387 * Path: <b>Questionnaire.item.concept</b><br> 3388 * </p> 3389 */ 3390 @SearchParamDefinition(name="code", path="Questionnaire.item.concept", description="A code that corresponds to the questionnaire or one of its groups", type="token" ) 3391 public static final String SP_CODE = "code"; 3392 /** 3393 * <b>Fluent Client</b> search parameter constant for <b>code</b> 3394 * <p> 3395 * Description: <b>A code that corresponds to the questionnaire or one of its groups</b><br> 3396 * Type: <b>token</b><br> 3397 * Path: <b>Questionnaire.item.concept</b><br> 3398 * </p> 3399 */ 3400 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 3401 3402 /** 3403 * Search parameter: <b>date</b> 3404 * <p> 3405 * Description: <b>When the questionnaire was last changed</b><br> 3406 * Type: <b>date</b><br> 3407 * Path: <b>Questionnaire.date</b><br> 3408 * </p> 3409 */ 3410 @SearchParamDefinition(name="date", path="Questionnaire.date", description="When the questionnaire was last changed", type="date" ) 3411 public static final String SP_DATE = "date"; 3412 /** 3413 * <b>Fluent Client</b> search parameter constant for <b>date</b> 3414 * <p> 3415 * Description: <b>When the questionnaire was last changed</b><br> 3416 * Type: <b>date</b><br> 3417 * Path: <b>Questionnaire.date</b><br> 3418 * </p> 3419 */ 3420 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 3421 3422 /** 3423 * Search parameter: <b>identifier</b> 3424 * <p> 3425 * Description: <b>An identifier for the questionnaire</b><br> 3426 * Type: <b>token</b><br> 3427 * Path: <b>Questionnaire.identifier</b><br> 3428 * </p> 3429 */ 3430 @SearchParamDefinition(name="identifier", path="Questionnaire.identifier", description="An identifier for the questionnaire", type="token" ) 3431 public static final String SP_IDENTIFIER = "identifier"; 3432 /** 3433 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3434 * <p> 3435 * Description: <b>An identifier for the questionnaire</b><br> 3436 * Type: <b>token</b><br> 3437 * Path: <b>Questionnaire.identifier</b><br> 3438 * </p> 3439 */ 3440 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3441 3442 /** 3443 * Search parameter: <b>version</b> 3444 * <p> 3445 * Description: <b>The business version of the questionnaire</b><br> 3446 * Type: <b>string</b><br> 3447 * Path: <b>Questionnaire.version</b><br> 3448 * </p> 3449 */ 3450 @SearchParamDefinition(name="version", path="Questionnaire.version", description="The business version of the questionnaire", type="string" ) 3451 public static final String SP_VERSION = "version"; 3452 /** 3453 * <b>Fluent Client</b> search parameter constant for <b>version</b> 3454 * <p> 3455 * Description: <b>The business version of the questionnaire</b><br> 3456 * Type: <b>string</b><br> 3457 * Path: <b>Questionnaire.version</b><br> 3458 * </p> 3459 */ 3460 public static final ca.uhn.fhir.rest.gclient.StringClientParam VERSION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_VERSION); 3461 3462 /** 3463 * Search parameter: <b>publisher</b> 3464 * <p> 3465 * Description: <b>The author of the questionnaire</b><br> 3466 * Type: <b>string</b><br> 3467 * Path: <b>Questionnaire.publisher</b><br> 3468 * </p> 3469 */ 3470 @SearchParamDefinition(name="publisher", path="Questionnaire.publisher", description="The author of the questionnaire", type="string" ) 3471 public static final String SP_PUBLISHER = "publisher"; 3472 /** 3473 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 3474 * <p> 3475 * Description: <b>The author of the questionnaire</b><br> 3476 * Type: <b>string</b><br> 3477 * Path: <b>Questionnaire.publisher</b><br> 3478 * </p> 3479 */ 3480 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 3481 3482 3483}