001package org.hl7.fhir.dstu3.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.dstu3 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 054import java.util.ArrayList; 055import java.util.Date; 056import java.util.List; 057 058import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus; 059import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory; 060import org.hl7.fhir.exceptions.FHIRException; 061import org.hl7.fhir.exceptions.FHIRFormatError; 062import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 063import org.hl7.fhir.utilities.Utilities; 064 065import ca.uhn.fhir.model.api.annotation.Block; 066import ca.uhn.fhir.model.api.annotation.Child; 067import ca.uhn.fhir.model.api.annotation.ChildOrder; 068import ca.uhn.fhir.model.api.annotation.Description; 069import ca.uhn.fhir.model.api.annotation.ResourceDef; 070import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 071/** 072 * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection. 073 */ 074@ResourceDef(name="Questionnaire", profile="http://hl7.org/fhir/Profile/Questionnaire") 075@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "description", "purpose", "approvalDate", "lastReviewDate", "effectivePeriod", "useContext", "jurisdiction", "contact", "copyright", "code", "subjectType", "item"}) 076public class Questionnaire extends MetadataResource { 077 078 public enum QuestionnaireItemType { 079 /** 080 * An item with no direct answer but should have at least one child item. 081 */ 082 GROUP, 083 /** 084 * Text for display that will not capture an answer or have child items. 085 */ 086 DISPLAY, 087 /** 088 * An item that defines a specific answer to be captured, and may have child items. 089(the answer provided in the QuestionnaireResponse should be of the defined datatype) 090 */ 091 QUESTION, 092 /** 093 * Question with a yes/no answer (valueBoolean) 094 */ 095 BOOLEAN, 096 /** 097 * Question with is a real number answer (valueDecimal) 098 */ 099 DECIMAL, 100 /** 101 * Question with an integer answer (valueInteger) 102 */ 103 INTEGER, 104 /** 105 * Question with a date answer (valueDate) 106 */ 107 DATE, 108 /** 109 * Question with a date and time answer (valueDateTime) 110 */ 111 DATETIME, 112 /** 113 * Question with a time (hour:minute:second) answer independent of date. (valueTime) 114 */ 115 TIME, 116 /** 117 * Question with a short (few words to short sentence) free-text entry answer (valueString) 118 */ 119 STRING, 120 /** 121 * Question with a long (potentially multi-paragraph) free-text entry answer (valueString) 122 */ 123 TEXT, 124 /** 125 * Question with a URL (website, FTP site, etc.) answer (valueUri) 126 */ 127 URL, 128 /** 129 * Question with a Coding drawn from a list of options (specified in either the option property, or via the valueset referenced in the options property) as an answer (valueCoding) 130 */ 131 CHOICE, 132 /** 133 * Answer is a Coding drawn from a list of options (as with the choice type) or a free-text entry in a string (valueCoding or valueString) 134 */ 135 OPENCHOICE, 136 /** 137 * Question with binary content such as a image, PDF, etc. as an answer (valueAttachment) 138 */ 139 ATTACHMENT, 140 /** 141 * Question with a reference to another resource (practitioner, organization, etc.) as an answer (valueReference) 142 */ 143 REFERENCE, 144 /** 145 * Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. (valueQuantity) 146There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit whould be captured (or the a unit that has a ucum conversion from the provided unit) 147 */ 148 QUANTITY, 149 /** 150 * added to help the parsers with the generic types 151 */ 152 NULL; 153 public static QuestionnaireItemType fromCode(String codeString) throws FHIRException { 154 if (codeString == null || "".equals(codeString)) 155 return null; 156 if ("group".equals(codeString)) 157 return GROUP; 158 if ("display".equals(codeString)) 159 return DISPLAY; 160 if ("question".equals(codeString)) 161 return QUESTION; 162 if ("boolean".equals(codeString)) 163 return BOOLEAN; 164 if ("decimal".equals(codeString)) 165 return DECIMAL; 166 if ("integer".equals(codeString)) 167 return INTEGER; 168 if ("date".equals(codeString)) 169 return DATE; 170 if ("dateTime".equals(codeString)) 171 return DATETIME; 172 if ("time".equals(codeString)) 173 return TIME; 174 if ("string".equals(codeString)) 175 return STRING; 176 if ("text".equals(codeString)) 177 return TEXT; 178 if ("url".equals(codeString)) 179 return URL; 180 if ("choice".equals(codeString)) 181 return CHOICE; 182 if ("open-choice".equals(codeString)) 183 return OPENCHOICE; 184 if ("attachment".equals(codeString)) 185 return ATTACHMENT; 186 if ("reference".equals(codeString)) 187 return REFERENCE; 188 if ("quantity".equals(codeString)) 189 return QUANTITY; 190 if (Configuration.isAcceptInvalidEnums()) 191 return null; 192 else 193 throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); 194 } 195 public String toCode() { 196 switch (this) { 197 case GROUP: return "group"; 198 case DISPLAY: return "display"; 199 case QUESTION: return "question"; 200 case BOOLEAN: return "boolean"; 201 case DECIMAL: return "decimal"; 202 case INTEGER: return "integer"; 203 case DATE: return "date"; 204 case DATETIME: return "dateTime"; 205 case TIME: return "time"; 206 case STRING: return "string"; 207 case TEXT: return "text"; 208 case URL: return "url"; 209 case CHOICE: return "choice"; 210 case OPENCHOICE: return "open-choice"; 211 case ATTACHMENT: return "attachment"; 212 case REFERENCE: return "reference"; 213 case QUANTITY: return "quantity"; 214 default: return "?"; 215 } 216 } 217 public String getSystem() { 218 switch (this) { 219 case GROUP: return "http://hl7.org/fhir/item-type"; 220 case DISPLAY: return "http://hl7.org/fhir/item-type"; 221 case QUESTION: return "http://hl7.org/fhir/item-type"; 222 case BOOLEAN: return "http://hl7.org/fhir/item-type"; 223 case DECIMAL: return "http://hl7.org/fhir/item-type"; 224 case INTEGER: return "http://hl7.org/fhir/item-type"; 225 case DATE: return "http://hl7.org/fhir/item-type"; 226 case DATETIME: return "http://hl7.org/fhir/item-type"; 227 case TIME: return "http://hl7.org/fhir/item-type"; 228 case STRING: return "http://hl7.org/fhir/item-type"; 229 case TEXT: return "http://hl7.org/fhir/item-type"; 230 case URL: return "http://hl7.org/fhir/item-type"; 231 case CHOICE: return "http://hl7.org/fhir/item-type"; 232 case OPENCHOICE: return "http://hl7.org/fhir/item-type"; 233 case ATTACHMENT: return "http://hl7.org/fhir/item-type"; 234 case REFERENCE: return "http://hl7.org/fhir/item-type"; 235 case QUANTITY: return "http://hl7.org/fhir/item-type"; 236 default: return "?"; 237 } 238 } 239 public String getDefinition() { 240 switch (this) { 241 case GROUP: return "An item with no direct answer but should have at least one child item."; 242 case DISPLAY: return "Text for display that will not capture an answer or have child items."; 243 case QUESTION: return "An item that defines a specific answer to be captured, and may have child items.\n(the answer provided in the QuestionnaireResponse should be of the defined datatype)"; 244 case BOOLEAN: return "Question with a yes/no answer (valueBoolean)"; 245 case DECIMAL: return "Question with is a real number answer (valueDecimal)"; 246 case INTEGER: return "Question with an integer answer (valueInteger)"; 247 case DATE: return "Question with a date answer (valueDate)"; 248 case DATETIME: return "Question with a date and time answer (valueDateTime)"; 249 case TIME: return "Question with a time (hour:minute:second) answer independent of date. (valueTime)"; 250 case STRING: return "Question with a short (few words to short sentence) free-text entry answer (valueString)"; 251 case TEXT: return "Question with a long (potentially multi-paragraph) free-text entry answer (valueString)"; 252 case URL: return "Question with a URL (website, FTP site, etc.) answer (valueUri)"; 253 case CHOICE: return "Question with a Coding drawn from a list of options (specified in either the option property, or via the valueset referenced in the options property) as an answer (valueCoding)"; 254 case OPENCHOICE: return "Answer is a Coding drawn from a list of options (as with the choice type) or a free-text entry in a string (valueCoding or valueString)"; 255 case ATTACHMENT: return "Question with binary content such as a image, PDF, etc. as an answer (valueAttachment)"; 256 case REFERENCE: return "Question with a reference to another resource (practitioner, organization, etc.) as an answer (valueReference)"; 257 case QUANTITY: return "Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. (valueQuantity)\nThere is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to define what unit whould be captured (or the a unit that has a ucum conversion from the provided unit)"; 258 default: return "?"; 259 } 260 } 261 public String getDisplay() { 262 switch (this) { 263 case GROUP: return "Group"; 264 case DISPLAY: return "Display"; 265 case QUESTION: return "Question"; 266 case BOOLEAN: return "Boolean"; 267 case DECIMAL: return "Decimal"; 268 case INTEGER: return "Integer"; 269 case DATE: return "Date"; 270 case DATETIME: return "Date Time"; 271 case TIME: return "Time"; 272 case STRING: return "String"; 273 case TEXT: return "Text"; 274 case URL: return "Url"; 275 case CHOICE: return "Choice"; 276 case OPENCHOICE: return "Open Choice"; 277 case ATTACHMENT: return "Attachment"; 278 case REFERENCE: return "Reference"; 279 case QUANTITY: return "Quantity"; 280 default: return "?"; 281 } 282 } 283 } 284 285 public static class QuestionnaireItemTypeEnumFactory implements EnumFactory<QuestionnaireItemType> { 286 public QuestionnaireItemType fromCode(String codeString) throws IllegalArgumentException { 287 if (codeString == null || "".equals(codeString)) 288 if (codeString == null || "".equals(codeString)) 289 return null; 290 if ("group".equals(codeString)) 291 return QuestionnaireItemType.GROUP; 292 if ("display".equals(codeString)) 293 return QuestionnaireItemType.DISPLAY; 294 if ("question".equals(codeString)) 295 return QuestionnaireItemType.QUESTION; 296 if ("boolean".equals(codeString)) 297 return QuestionnaireItemType.BOOLEAN; 298 if ("decimal".equals(codeString)) 299 return QuestionnaireItemType.DECIMAL; 300 if ("integer".equals(codeString)) 301 return QuestionnaireItemType.INTEGER; 302 if ("date".equals(codeString)) 303 return QuestionnaireItemType.DATE; 304 if ("dateTime".equals(codeString)) 305 return QuestionnaireItemType.DATETIME; 306 if ("time".equals(codeString)) 307 return QuestionnaireItemType.TIME; 308 if ("string".equals(codeString)) 309 return QuestionnaireItemType.STRING; 310 if ("text".equals(codeString)) 311 return QuestionnaireItemType.TEXT; 312 if ("url".equals(codeString)) 313 return QuestionnaireItemType.URL; 314 if ("choice".equals(codeString)) 315 return QuestionnaireItemType.CHOICE; 316 if ("open-choice".equals(codeString)) 317 return QuestionnaireItemType.OPENCHOICE; 318 if ("attachment".equals(codeString)) 319 return QuestionnaireItemType.ATTACHMENT; 320 if ("reference".equals(codeString)) 321 return QuestionnaireItemType.REFERENCE; 322 if ("quantity".equals(codeString)) 323 return QuestionnaireItemType.QUANTITY; 324 throw new IllegalArgumentException("Unknown QuestionnaireItemType code '"+codeString+"'"); 325 } 326 public Enumeration<QuestionnaireItemType> fromType(Base code) throws FHIRException { 327 if (code == null) 328 return null; 329 if (code.isEmpty()) 330 return new Enumeration<QuestionnaireItemType>(this); 331 String codeString = ((PrimitiveType) code).asStringValue(); 332 if (codeString == null || "".equals(codeString)) 333 return null; 334 if ("group".equals(codeString)) 335 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.GROUP); 336 if ("display".equals(codeString)) 337 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DISPLAY); 338 if ("question".equals(codeString)) 339 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.QUESTION); 340 if ("boolean".equals(codeString)) 341 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.BOOLEAN); 342 if ("decimal".equals(codeString)) 343 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DECIMAL); 344 if ("integer".equals(codeString)) 345 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.INTEGER); 346 if ("date".equals(codeString)) 347 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DATE); 348 if ("dateTime".equals(codeString)) 349 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.DATETIME); 350 if ("time".equals(codeString)) 351 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.TIME); 352 if ("string".equals(codeString)) 353 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.STRING); 354 if ("text".equals(codeString)) 355 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.TEXT); 356 if ("url".equals(codeString)) 357 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.URL); 358 if ("choice".equals(codeString)) 359 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.CHOICE); 360 if ("open-choice".equals(codeString)) 361 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.OPENCHOICE); 362 if ("attachment".equals(codeString)) 363 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.ATTACHMENT); 364 if ("reference".equals(codeString)) 365 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.REFERENCE); 366 if ("quantity".equals(codeString)) 367 return new Enumeration<QuestionnaireItemType>(this, QuestionnaireItemType.QUANTITY); 368 throw new FHIRException("Unknown QuestionnaireItemType code '"+codeString+"'"); 369 } 370 public String toCode(QuestionnaireItemType code) { 371 if (code == QuestionnaireItemType.GROUP) 372 return "group"; 373 if (code == QuestionnaireItemType.DISPLAY) 374 return "display"; 375 if (code == QuestionnaireItemType.QUESTION) 376 return "question"; 377 if (code == QuestionnaireItemType.BOOLEAN) 378 return "boolean"; 379 if (code == QuestionnaireItemType.DECIMAL) 380 return "decimal"; 381 if (code == QuestionnaireItemType.INTEGER) 382 return "integer"; 383 if (code == QuestionnaireItemType.DATE) 384 return "date"; 385 if (code == QuestionnaireItemType.DATETIME) 386 return "dateTime"; 387 if (code == QuestionnaireItemType.TIME) 388 return "time"; 389 if (code == QuestionnaireItemType.STRING) 390 return "string"; 391 if (code == QuestionnaireItemType.TEXT) 392 return "text"; 393 if (code == QuestionnaireItemType.URL) 394 return "url"; 395 if (code == QuestionnaireItemType.CHOICE) 396 return "choice"; 397 if (code == QuestionnaireItemType.OPENCHOICE) 398 return "open-choice"; 399 if (code == QuestionnaireItemType.ATTACHMENT) 400 return "attachment"; 401 if (code == QuestionnaireItemType.REFERENCE) 402 return "reference"; 403 if (code == QuestionnaireItemType.QUANTITY) 404 return "quantity"; 405 return "?"; 406 } 407 public String toSystem(QuestionnaireItemType code) { 408 return code.getSystem(); 409 } 410 } 411 412 @Block() 413 public static class QuestionnaireItemComponent extends BackboneElement implements IBaseBackboneElement { 414 /** 415 * An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. 416 */ 417 @Child(name = "linkId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 418 @Description(shortDefinition="Unique id for item in questionnaire", formalDefinition="An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource." ) 419 protected StringType linkId; 420 421 /** 422 * A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: 423 424* code (ElementDefinition.code) 425* type (ElementDefinition.type) 426* required (ElementDefinition.min) 427* repeats (ElementDefinition.max) 428* maxLength (ElementDefinition.maxLength) 429* options (ElementDefinition.binding) 430 431Any information provided in these elements on a Questionnaire Item overrides the information from the definition. 432 */ 433 @Child(name = "definition", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false) 434 @Description(shortDefinition="ElementDefinition - details for the item", formalDefinition="A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: \n\n* code (ElementDefinition.code)\n* type (ElementDefinition.type)\n* required (ElementDefinition.min)\n* repeats (ElementDefinition.max)\n* maxLength (ElementDefinition.maxLength)\n* options (ElementDefinition.binding)\n\nAny information provided in these elements on a Questionnaire Item overrides the information from the definition." ) 435 protected UriType definition; 436 437 /** 438 * A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers). 439 */ 440 @Child(name = "code", type = {Coding.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 441 @Description(shortDefinition="Corresponding concept for this item in a terminology", formalDefinition="A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers)." ) 442 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-questions") 443 protected List<Coding> code; 444 445 /** 446 * A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire. 447 */ 448 @Child(name = "prefix", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 449 @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 used for reference by the individual completing the questionnaire." ) 450 protected StringType prefix; 451 452 /** 453 * The name of a section, the text of a question or text content for a display item. 454 */ 455 @Child(name = "text", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 456 @Description(shortDefinition="Primary text for the item", formalDefinition="The name of a section, the text of a question or text content for a display item." ) 457 protected StringType text; 458 459 /** 460 * 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.). 461 */ 462 @Child(name = "type", type = {CodeType.class}, order=6, min=1, max=1, modifier=false, summary=false) 463 @Description(shortDefinition="group | display | boolean | decimal | integer | date | dateTime +", formalDefinition="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.)." ) 464 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/item-type") 465 protected Enumeration<QuestionnaireItemType> type; 466 467 /** 468 * A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true. 469 */ 470 @Child(name = "enableWhen", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=true, summary=true) 471 @Description(shortDefinition="Only allow data when", formalDefinition="A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true." ) 472 protected List<QuestionnaireItemEnableWhenComponent> enableWhen; 473 474 /** 475 * An indication, if true, that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. 476 */ 477 @Child(name = "required", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 478 @Description(shortDefinition="Whether the item must be included in data results", formalDefinition="An indication, if true, that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire." ) 479 protected BooleanType required; 480 481 /** 482 * An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups. 483 */ 484 @Child(name = "repeats", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) 485 @Description(shortDefinition="Whether the item may repeat", formalDefinition="An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups." ) 486 protected BooleanType repeats; 487 488 /** 489 * An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire. 490 */ 491 @Child(name = "readOnly", type = {BooleanType.class}, order=10, min=0, max=1, modifier=false, summary=false) 492 @Description(shortDefinition="Don't allow human editing", formalDefinition="An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire." ) 493 protected BooleanType readOnly; 494 495 /** 496 * The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. 497 */ 498 @Child(name = "maxLength", type = {IntegerType.class}, order=11, min=0, max=1, modifier=false, summary=false) 499 @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." ) 500 protected IntegerType maxLength; 501 502 /** 503 * A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question. 504 */ 505 @Child(name = "options", type = {ValueSet.class}, order=12, min=0, max=1, modifier=false, summary=false) 506 @Description(shortDefinition="Valueset containing permitted answers", formalDefinition="A reference to a value set containing a list of codes representing permitted answers for a \"choice\" or \"open-choice\" question." ) 507 protected Reference options; 508 509 /** 510 * The actual object that is the target of the reference (A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.) 511 */ 512 protected ValueSet optionsTarget; 513 514 /** 515 * One of the permitted answers for a "choice" or "open-choice" question. 516 */ 517 @Child(name = "option", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 518 @Description(shortDefinition="Permitted answer", formalDefinition="One of the permitted answers for a \"choice\" or \"open-choice\" question." ) 519 protected List<QuestionnaireItemOptionComponent> option; 520 521 /** 522 * The value that should be defaulted when initially rendering the questionnaire for user input. 523 */ 524 @Child(name = "initial", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class, Reference.class}, order=14, min=0, max=1, modifier=false, summary=false) 525 @Description(shortDefinition="Default value when item is first rendered", formalDefinition="The value that should be defaulted when initially rendering the questionnaire for user input." ) 526 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-answers") 527 protected Type initial; 528 529 /** 530 * Text, questions and other groups to be nested beneath a question or group. 531 */ 532 @Child(name = "item", type = {QuestionnaireItemComponent.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 533 @Description(shortDefinition="Nested questionnaire items", formalDefinition="Text, questions and other groups to be nested beneath a question or group." ) 534 protected List<QuestionnaireItemComponent> item; 535 536 private static final long serialVersionUID = -1997112302L; 537 538 /** 539 * Constructor 540 */ 541 public QuestionnaireItemComponent() { 542 super(); 543 } 544 545 /** 546 * Constructor 547 */ 548 public QuestionnaireItemComponent(StringType linkId, Enumeration<QuestionnaireItemType> type) { 549 super(); 550 this.linkId = linkId; 551 this.type = type; 552 } 553 554 /** 555 * @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 556 */ 557 public StringType getLinkIdElement() { 558 if (this.linkId == null) 559 if (Configuration.errorOnAutoCreate()) 560 throw new Error("Attempt to auto-create QuestionnaireItemComponent.linkId"); 561 else if (Configuration.doAutoCreate()) 562 this.linkId = new StringType(); // bb 563 return this.linkId; 564 } 565 566 public boolean hasLinkIdElement() { 567 return this.linkId != null && !this.linkId.isEmpty(); 568 } 569 570 public boolean hasLinkId() { 571 return this.linkId != null && !this.linkId.isEmpty(); 572 } 573 574 /** 575 * @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 576 */ 577 public QuestionnaireItemComponent setLinkIdElement(StringType value) { 578 this.linkId = value; 579 return this; 580 } 581 582 /** 583 * @return An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. 584 */ 585 public String getLinkId() { 586 return this.linkId == null ? null : this.linkId.getValue(); 587 } 588 589 /** 590 * @param value An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource. 591 */ 592 public QuestionnaireItemComponent setLinkId(String value) { 593 if (this.linkId == null) 594 this.linkId = new StringType(); 595 this.linkId.setValue(value); 596 return this; 597 } 598 599 /** 600 * @return {@link #definition} (A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: 601 602* code (ElementDefinition.code) 603* type (ElementDefinition.type) 604* required (ElementDefinition.min) 605* repeats (ElementDefinition.max) 606* maxLength (ElementDefinition.maxLength) 607* options (ElementDefinition.binding) 608 609Any information provided in these elements on a Questionnaire Item overrides the information from the definition.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 610 */ 611 public UriType getDefinitionElement() { 612 if (this.definition == null) 613 if (Configuration.errorOnAutoCreate()) 614 throw new Error("Attempt to auto-create QuestionnaireItemComponent.definition"); 615 else if (Configuration.doAutoCreate()) 616 this.definition = new UriType(); // bb 617 return this.definition; 618 } 619 620 public boolean hasDefinitionElement() { 621 return this.definition != null && !this.definition.isEmpty(); 622 } 623 624 public boolean hasDefinition() { 625 return this.definition != null && !this.definition.isEmpty(); 626 } 627 628 /** 629 * @param value {@link #definition} (A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: 630 631* code (ElementDefinition.code) 632* type (ElementDefinition.type) 633* required (ElementDefinition.min) 634* repeats (ElementDefinition.max) 635* maxLength (ElementDefinition.maxLength) 636* options (ElementDefinition.binding) 637 638Any information provided in these elements on a Questionnaire Item overrides the information from the definition.). This is the underlying object with id, value and extensions. The accessor "getDefinition" gives direct access to the value 639 */ 640 public QuestionnaireItemComponent setDefinitionElement(UriType value) { 641 this.definition = value; 642 return this; 643 } 644 645 /** 646 * @return A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: 647 648* code (ElementDefinition.code) 649* type (ElementDefinition.type) 650* required (ElementDefinition.min) 651* repeats (ElementDefinition.max) 652* maxLength (ElementDefinition.maxLength) 653* options (ElementDefinition.binding) 654 655Any information provided in these elements on a Questionnaire Item overrides the information from the definition. 656 */ 657 public String getDefinition() { 658 return this.definition == null ? null : this.definition.getValue(); 659 } 660 661 /** 662 * @param value A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: 663 664* code (ElementDefinition.code) 665* type (ElementDefinition.type) 666* required (ElementDefinition.min) 667* repeats (ElementDefinition.max) 668* maxLength (ElementDefinition.maxLength) 669* options (ElementDefinition.binding) 670 671Any information provided in these elements on a Questionnaire Item overrides the information from the definition. 672 */ 673 public QuestionnaireItemComponent setDefinition(String value) { 674 if (Utilities.noString(value)) 675 this.definition = null; 676 else { 677 if (this.definition == null) 678 this.definition = new UriType(); 679 this.definition.setValue(value); 680 } 681 return this; 682 } 683 684 /** 685 * @return {@link #code} (A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).) 686 */ 687 public List<Coding> getCode() { 688 if (this.code == null) 689 this.code = new ArrayList<Coding>(); 690 return this.code; 691 } 692 693 /** 694 * @return Returns a reference to <code>this</code> for easy method chaining 695 */ 696 public QuestionnaireItemComponent setCode(List<Coding> theCode) { 697 this.code = theCode; 698 return this; 699 } 700 701 public boolean hasCode() { 702 if (this.code == null) 703 return false; 704 for (Coding item : this.code) 705 if (!item.isEmpty()) 706 return true; 707 return false; 708 } 709 710 public Coding addCode() { //3 711 Coding t = new Coding(); 712 if (this.code == null) 713 this.code = new ArrayList<Coding>(); 714 this.code.add(t); 715 return t; 716 } 717 718 public QuestionnaireItemComponent addCode(Coding t) { //3 719 if (t == null) 720 return this; 721 if (this.code == null) 722 this.code = new ArrayList<Coding>(); 723 this.code.add(t); 724 return this; 725 } 726 727 /** 728 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 729 */ 730 public Coding getCodeFirstRep() { 731 if (getCode().isEmpty()) { 732 addCode(); 733 } 734 return getCode().get(0); 735 } 736 737 /** 738 * @return {@link #prefix} (A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 739 */ 740 public StringType getPrefixElement() { 741 if (this.prefix == null) 742 if (Configuration.errorOnAutoCreate()) 743 throw new Error("Attempt to auto-create QuestionnaireItemComponent.prefix"); 744 else if (Configuration.doAutoCreate()) 745 this.prefix = new StringType(); // bb 746 return this.prefix; 747 } 748 749 public boolean hasPrefixElement() { 750 return this.prefix != null && !this.prefix.isEmpty(); 751 } 752 753 public boolean hasPrefix() { 754 return this.prefix != null && !this.prefix.isEmpty(); 755 } 756 757 /** 758 * @param value {@link #prefix} (A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPrefix" gives direct access to the value 759 */ 760 public QuestionnaireItemComponent setPrefixElement(StringType value) { 761 this.prefix = value; 762 return this; 763 } 764 765 /** 766 * @return A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire. 767 */ 768 public String getPrefix() { 769 return this.prefix == null ? null : this.prefix.getValue(); 770 } 771 772 /** 773 * @param value A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire. 774 */ 775 public QuestionnaireItemComponent setPrefix(String value) { 776 if (Utilities.noString(value)) 777 this.prefix = null; 778 else { 779 if (this.prefix == null) 780 this.prefix = new StringType(); 781 this.prefix.setValue(value); 782 } 783 return this; 784 } 785 786 /** 787 * @return {@link #text} (The name of a section, the text of a question or text content for a display item.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 788 */ 789 public StringType getTextElement() { 790 if (this.text == null) 791 if (Configuration.errorOnAutoCreate()) 792 throw new Error("Attempt to auto-create QuestionnaireItemComponent.text"); 793 else if (Configuration.doAutoCreate()) 794 this.text = new StringType(); // bb 795 return this.text; 796 } 797 798 public boolean hasTextElement() { 799 return this.text != null && !this.text.isEmpty(); 800 } 801 802 public boolean hasText() { 803 return this.text != null && !this.text.isEmpty(); 804 } 805 806 /** 807 * @param value {@link #text} (The name of a section, the text of a question or text content for a display item.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 808 */ 809 public QuestionnaireItemComponent setTextElement(StringType value) { 810 this.text = value; 811 return this; 812 } 813 814 /** 815 * @return The name of a section, the text of a question or text content for a display item. 816 */ 817 public String getText() { 818 return this.text == null ? null : this.text.getValue(); 819 } 820 821 /** 822 * @param value The name of a section, the text of a question or text content for a display item. 823 */ 824 public QuestionnaireItemComponent setText(String value) { 825 if (Utilities.noString(value)) 826 this.text = null; 827 else { 828 if (this.text == null) 829 this.text = new StringType(); 830 this.text.setValue(value); 831 } 832 return this; 833 } 834 835 /** 836 * @return {@link #type} (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 837 */ 838 public Enumeration<QuestionnaireItemType> getTypeElement() { 839 if (this.type == null) 840 if (Configuration.errorOnAutoCreate()) 841 throw new Error("Attempt to auto-create QuestionnaireItemComponent.type"); 842 else if (Configuration.doAutoCreate()) 843 this.type = new Enumeration<QuestionnaireItemType>(new QuestionnaireItemTypeEnumFactory()); // bb 844 return this.type; 845 } 846 847 public boolean hasTypeElement() { 848 return this.type != null && !this.type.isEmpty(); 849 } 850 851 public boolean hasType() { 852 return this.type != null && !this.type.isEmpty(); 853 } 854 855 /** 856 * @param value {@link #type} (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 857 */ 858 public QuestionnaireItemComponent setTypeElement(Enumeration<QuestionnaireItemType> value) { 859 this.type = value; 860 return this; 861 } 862 863 /** 864 * @return 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.). 865 */ 866 public QuestionnaireItemType getType() { 867 return this.type == null ? null : this.type.getValue(); 868 } 869 870 /** 871 * @param value 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.). 872 */ 873 public QuestionnaireItemComponent setType(QuestionnaireItemType value) { 874 if (this.type == null) 875 this.type = new Enumeration<QuestionnaireItemType>(new QuestionnaireItemTypeEnumFactory()); 876 this.type.setValue(value); 877 return this; 878 } 879 880 /** 881 * @return {@link #enableWhen} (A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.) 882 */ 883 public List<QuestionnaireItemEnableWhenComponent> getEnableWhen() { 884 if (this.enableWhen == null) 885 this.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 886 return this.enableWhen; 887 } 888 889 /** 890 * @return Returns a reference to <code>this</code> for easy method chaining 891 */ 892 public QuestionnaireItemComponent setEnableWhen(List<QuestionnaireItemEnableWhenComponent> theEnableWhen) { 893 this.enableWhen = theEnableWhen; 894 return this; 895 } 896 897 public boolean hasEnableWhen() { 898 if (this.enableWhen == null) 899 return false; 900 for (QuestionnaireItemEnableWhenComponent item : this.enableWhen) 901 if (!item.isEmpty()) 902 return true; 903 return false; 904 } 905 906 public QuestionnaireItemEnableWhenComponent addEnableWhen() { //3 907 QuestionnaireItemEnableWhenComponent t = new QuestionnaireItemEnableWhenComponent(); 908 if (this.enableWhen == null) 909 this.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 910 this.enableWhen.add(t); 911 return t; 912 } 913 914 public QuestionnaireItemComponent addEnableWhen(QuestionnaireItemEnableWhenComponent t) { //3 915 if (t == null) 916 return this; 917 if (this.enableWhen == null) 918 this.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 919 this.enableWhen.add(t); 920 return this; 921 } 922 923 /** 924 * @return The first repetition of repeating field {@link #enableWhen}, creating it if it does not already exist 925 */ 926 public QuestionnaireItemEnableWhenComponent getEnableWhenFirstRep() { 927 if (getEnableWhen().isEmpty()) { 928 addEnableWhen(); 929 } 930 return getEnableWhen().get(0); 931 } 932 933 /** 934 * @return {@link #required} (An indication, if true, 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 935 */ 936 public BooleanType getRequiredElement() { 937 if (this.required == null) 938 if (Configuration.errorOnAutoCreate()) 939 throw new Error("Attempt to auto-create QuestionnaireItemComponent.required"); 940 else if (Configuration.doAutoCreate()) 941 this.required = new BooleanType(); // bb 942 return this.required; 943 } 944 945 public boolean hasRequiredElement() { 946 return this.required != null && !this.required.isEmpty(); 947 } 948 949 public boolean hasRequired() { 950 return this.required != null && !this.required.isEmpty(); 951 } 952 953 /** 954 * @param value {@link #required} (An indication, if true, 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 955 */ 956 public QuestionnaireItemComponent setRequiredElement(BooleanType value) { 957 this.required = value; 958 return this; 959 } 960 961 /** 962 * @return An indication, if true, that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. 963 */ 964 public boolean getRequired() { 965 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 966 } 967 968 /** 969 * @param value An indication, if true, that the item must be present in a "completed" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire. 970 */ 971 public QuestionnaireItemComponent setRequired(boolean value) { 972 if (this.required == null) 973 this.required = new BooleanType(); 974 this.required.setValue(value); 975 return this; 976 } 977 978 /** 979 * @return {@link #repeats} (An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value 980 */ 981 public BooleanType getRepeatsElement() { 982 if (this.repeats == null) 983 if (Configuration.errorOnAutoCreate()) 984 throw new Error("Attempt to auto-create QuestionnaireItemComponent.repeats"); 985 else if (Configuration.doAutoCreate()) 986 this.repeats = new BooleanType(); // bb 987 return this.repeats; 988 } 989 990 public boolean hasRepeatsElement() { 991 return this.repeats != null && !this.repeats.isEmpty(); 992 } 993 994 public boolean hasRepeats() { 995 return this.repeats != null && !this.repeats.isEmpty(); 996 } 997 998 /** 999 * @param value {@link #repeats} (An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.). This is the underlying object with id, value and extensions. The accessor "getRepeats" gives direct access to the value 1000 */ 1001 public QuestionnaireItemComponent setRepeatsElement(BooleanType value) { 1002 this.repeats = value; 1003 return this; 1004 } 1005 1006 /** 1007 * @return An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups. 1008 */ 1009 public boolean getRepeats() { 1010 return this.repeats == null || this.repeats.isEmpty() ? false : this.repeats.getValue(); 1011 } 1012 1013 /** 1014 * @param value An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups. 1015 */ 1016 public QuestionnaireItemComponent setRepeats(boolean value) { 1017 if (this.repeats == null) 1018 this.repeats = new BooleanType(); 1019 this.repeats.setValue(value); 1020 return this; 1021 } 1022 1023 /** 1024 * @return {@link #readOnly} (An indication, when true, that 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 1025 */ 1026 public BooleanType getReadOnlyElement() { 1027 if (this.readOnly == null) 1028 if (Configuration.errorOnAutoCreate()) 1029 throw new Error("Attempt to auto-create QuestionnaireItemComponent.readOnly"); 1030 else if (Configuration.doAutoCreate()) 1031 this.readOnly = new BooleanType(); // bb 1032 return this.readOnly; 1033 } 1034 1035 public boolean hasReadOnlyElement() { 1036 return this.readOnly != null && !this.readOnly.isEmpty(); 1037 } 1038 1039 public boolean hasReadOnly() { 1040 return this.readOnly != null && !this.readOnly.isEmpty(); 1041 } 1042 1043 /** 1044 * @param value {@link #readOnly} (An indication, when true, that 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 1045 */ 1046 public QuestionnaireItemComponent setReadOnlyElement(BooleanType value) { 1047 this.readOnly = value; 1048 return this; 1049 } 1050 1051 /** 1052 * @return An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire. 1053 */ 1054 public boolean getReadOnly() { 1055 return this.readOnly == null || this.readOnly.isEmpty() ? false : this.readOnly.getValue(); 1056 } 1057 1058 /** 1059 * @param value An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire. 1060 */ 1061 public QuestionnaireItemComponent setReadOnly(boolean value) { 1062 if (this.readOnly == null) 1063 this.readOnly = new BooleanType(); 1064 this.readOnly.setValue(value); 1065 return this; 1066 } 1067 1068 /** 1069 * @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 1070 */ 1071 public IntegerType getMaxLengthElement() { 1072 if (this.maxLength == null) 1073 if (Configuration.errorOnAutoCreate()) 1074 throw new Error("Attempt to auto-create QuestionnaireItemComponent.maxLength"); 1075 else if (Configuration.doAutoCreate()) 1076 this.maxLength = new IntegerType(); // bb 1077 return this.maxLength; 1078 } 1079 1080 public boolean hasMaxLengthElement() { 1081 return this.maxLength != null && !this.maxLength.isEmpty(); 1082 } 1083 1084 public boolean hasMaxLength() { 1085 return this.maxLength != null && !this.maxLength.isEmpty(); 1086 } 1087 1088 /** 1089 * @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 1090 */ 1091 public QuestionnaireItemComponent setMaxLengthElement(IntegerType value) { 1092 this.maxLength = value; 1093 return this; 1094 } 1095 1096 /** 1097 * @return The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. 1098 */ 1099 public int getMaxLength() { 1100 return this.maxLength == null || this.maxLength.isEmpty() ? 0 : this.maxLength.getValue(); 1101 } 1102 1103 /** 1104 * @param value The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse. 1105 */ 1106 public QuestionnaireItemComponent setMaxLength(int value) { 1107 if (this.maxLength == null) 1108 this.maxLength = new IntegerType(); 1109 this.maxLength.setValue(value); 1110 return this; 1111 } 1112 1113 /** 1114 * @return {@link #options} (A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.) 1115 */ 1116 public Reference getOptions() { 1117 if (this.options == null) 1118 if (Configuration.errorOnAutoCreate()) 1119 throw new Error("Attempt to auto-create QuestionnaireItemComponent.options"); 1120 else if (Configuration.doAutoCreate()) 1121 this.options = new Reference(); // cc 1122 return this.options; 1123 } 1124 1125 public boolean hasOptions() { 1126 return this.options != null && !this.options.isEmpty(); 1127 } 1128 1129 /** 1130 * @param value {@link #options} (A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.) 1131 */ 1132 public QuestionnaireItemComponent setOptions(Reference value) { 1133 this.options = value; 1134 return this; 1135 } 1136 1137 /** 1138 * @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. (A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.) 1139 */ 1140 public ValueSet getOptionsTarget() { 1141 if (this.optionsTarget == null) 1142 if (Configuration.errorOnAutoCreate()) 1143 throw new Error("Attempt to auto-create QuestionnaireItemComponent.options"); 1144 else if (Configuration.doAutoCreate()) 1145 this.optionsTarget = new ValueSet(); // aa 1146 return this.optionsTarget; 1147 } 1148 1149 /** 1150 * @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. (A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.) 1151 */ 1152 public QuestionnaireItemComponent setOptionsTarget(ValueSet value) { 1153 this.optionsTarget = value; 1154 return this; 1155 } 1156 1157 /** 1158 * @return {@link #option} (One of the permitted answers for a "choice" or "open-choice" question.) 1159 */ 1160 public List<QuestionnaireItemOptionComponent> getOption() { 1161 if (this.option == null) 1162 this.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1163 return this.option; 1164 } 1165 1166 /** 1167 * @return Returns a reference to <code>this</code> for easy method chaining 1168 */ 1169 public QuestionnaireItemComponent setOption(List<QuestionnaireItemOptionComponent> theOption) { 1170 this.option = theOption; 1171 return this; 1172 } 1173 1174 public boolean hasOption() { 1175 if (this.option == null) 1176 return false; 1177 for (QuestionnaireItemOptionComponent item : this.option) 1178 if (!item.isEmpty()) 1179 return true; 1180 return false; 1181 } 1182 1183 public QuestionnaireItemOptionComponent addOption() { //3 1184 QuestionnaireItemOptionComponent t = new QuestionnaireItemOptionComponent(); 1185 if (this.option == null) 1186 this.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1187 this.option.add(t); 1188 return t; 1189 } 1190 1191 public QuestionnaireItemComponent addOption(QuestionnaireItemOptionComponent t) { //3 1192 if (t == null) 1193 return this; 1194 if (this.option == null) 1195 this.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1196 this.option.add(t); 1197 return this; 1198 } 1199 1200 /** 1201 * @return The first repetition of repeating field {@link #option}, creating it if it does not already exist 1202 */ 1203 public QuestionnaireItemOptionComponent getOptionFirstRep() { 1204 if (getOption().isEmpty()) { 1205 addOption(); 1206 } 1207 return getOption().get(0); 1208 } 1209 1210 /** 1211 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1212 */ 1213 public Type getInitial() { 1214 return this.initial; 1215 } 1216 1217 /** 1218 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1219 */ 1220 public BooleanType getInitialBooleanType() throws FHIRException { 1221 if (this.initial == null) 1222 return null; 1223 if (!(this.initial instanceof BooleanType)) 1224 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1225 return (BooleanType) this.initial; 1226 } 1227 1228 public boolean hasInitialBooleanType() { 1229 return this != null && this.initial instanceof BooleanType; 1230 } 1231 1232 /** 1233 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1234 */ 1235 public DecimalType getInitialDecimalType() throws FHIRException { 1236 if (this.initial == null) 1237 return null; 1238 if (!(this.initial instanceof DecimalType)) 1239 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1240 return (DecimalType) this.initial; 1241 } 1242 1243 public boolean hasInitialDecimalType() { 1244 return this != null && this.initial instanceof DecimalType; 1245 } 1246 1247 /** 1248 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1249 */ 1250 public IntegerType getInitialIntegerType() throws FHIRException { 1251 if (this.initial == null) 1252 return null; 1253 if (!(this.initial instanceof IntegerType)) 1254 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1255 return (IntegerType) this.initial; 1256 } 1257 1258 public boolean hasInitialIntegerType() { 1259 return this != null && this.initial instanceof IntegerType; 1260 } 1261 1262 /** 1263 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1264 */ 1265 public DateType getInitialDateType() throws FHIRException { 1266 if (this.initial == null) 1267 return null; 1268 if (!(this.initial instanceof DateType)) 1269 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1270 return (DateType) this.initial; 1271 } 1272 1273 public boolean hasInitialDateType() { 1274 return this != null && this.initial instanceof DateType; 1275 } 1276 1277 /** 1278 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1279 */ 1280 public DateTimeType getInitialDateTimeType() throws FHIRException { 1281 if (this.initial == null) 1282 return null; 1283 if (!(this.initial instanceof DateTimeType)) 1284 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1285 return (DateTimeType) this.initial; 1286 } 1287 1288 public boolean hasInitialDateTimeType() { 1289 return this != null && this.initial instanceof DateTimeType; 1290 } 1291 1292 /** 1293 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1294 */ 1295 public TimeType getInitialTimeType() throws FHIRException { 1296 if (this.initial == null) 1297 return null; 1298 if (!(this.initial instanceof TimeType)) 1299 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1300 return (TimeType) this.initial; 1301 } 1302 1303 public boolean hasInitialTimeType() { 1304 return this != null && this.initial instanceof TimeType; 1305 } 1306 1307 /** 1308 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1309 */ 1310 public StringType getInitialStringType() throws FHIRException { 1311 if (this.initial == null) 1312 return null; 1313 if (!(this.initial instanceof StringType)) 1314 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1315 return (StringType) this.initial; 1316 } 1317 1318 public boolean hasInitialStringType() { 1319 return this != null && this.initial instanceof StringType; 1320 } 1321 1322 /** 1323 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1324 */ 1325 public UriType getInitialUriType() throws FHIRException { 1326 if (this.initial == null) 1327 return null; 1328 if (!(this.initial instanceof UriType)) 1329 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.initial.getClass().getName()+" was encountered"); 1330 return (UriType) this.initial; 1331 } 1332 1333 public boolean hasInitialUriType() { 1334 return this != null && this.initial instanceof UriType; 1335 } 1336 1337 /** 1338 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1339 */ 1340 public Attachment getInitialAttachment() throws FHIRException { 1341 if (this.initial == null) 1342 return null; 1343 if (!(this.initial instanceof Attachment)) 1344 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.initial.getClass().getName()+" was encountered"); 1345 return (Attachment) this.initial; 1346 } 1347 1348 public boolean hasInitialAttachment() { 1349 return this != null && this.initial instanceof Attachment; 1350 } 1351 1352 /** 1353 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1354 */ 1355 public Coding getInitialCoding() throws FHIRException { 1356 if (this.initial == null) 1357 return null; 1358 if (!(this.initial instanceof Coding)) 1359 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.initial.getClass().getName()+" was encountered"); 1360 return (Coding) this.initial; 1361 } 1362 1363 public boolean hasInitialCoding() { 1364 return this != null && this.initial instanceof Coding; 1365 } 1366 1367 /** 1368 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1369 */ 1370 public Quantity getInitialQuantity() throws FHIRException { 1371 if (this.initial == null) 1372 return null; 1373 if (!(this.initial instanceof Quantity)) 1374 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.initial.getClass().getName()+" was encountered"); 1375 return (Quantity) this.initial; 1376 } 1377 1378 public boolean hasInitialQuantity() { 1379 return this != null && this.initial instanceof Quantity; 1380 } 1381 1382 /** 1383 * @return {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1384 */ 1385 public Reference getInitialReference() throws FHIRException { 1386 if (this.initial == null) 1387 return null; 1388 if (!(this.initial instanceof Reference)) 1389 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.initial.getClass().getName()+" was encountered"); 1390 return (Reference) this.initial; 1391 } 1392 1393 public boolean hasInitialReference() { 1394 return this != null && this.initial instanceof Reference; 1395 } 1396 1397 public boolean hasInitial() { 1398 return this.initial != null && !this.initial.isEmpty(); 1399 } 1400 1401 /** 1402 * @param value {@link #initial} (The value that should be defaulted when initially rendering the questionnaire for user input.) 1403 */ 1404 public QuestionnaireItemComponent setInitial(Type value) throws FHIRFormatError { 1405 if (value != null && !(value instanceof BooleanType || value instanceof DecimalType || value instanceof IntegerType || value instanceof DateType || value instanceof DateTimeType || value instanceof TimeType || value instanceof StringType || value instanceof UriType || value instanceof Attachment || value instanceof Coding || value instanceof Quantity || value instanceof Reference)) 1406 throw new FHIRFormatError("Not the right type for Questionnaire.item.initial[x]: "+value.fhirType()); 1407 this.initial = value; 1408 return this; 1409 } 1410 1411 /** 1412 * @return {@link #item} (Text, questions and other groups to be nested beneath a question or group.) 1413 */ 1414 public List<QuestionnaireItemComponent> getItem() { 1415 if (this.item == null) 1416 this.item = new ArrayList<QuestionnaireItemComponent>(); 1417 return this.item; 1418 } 1419 1420 /** 1421 * @return Returns a reference to <code>this</code> for easy method chaining 1422 */ 1423 public QuestionnaireItemComponent setItem(List<QuestionnaireItemComponent> theItem) { 1424 this.item = theItem; 1425 return this; 1426 } 1427 1428 public boolean hasItem() { 1429 if (this.item == null) 1430 return false; 1431 for (QuestionnaireItemComponent item : this.item) 1432 if (!item.isEmpty()) 1433 return true; 1434 return false; 1435 } 1436 1437 public QuestionnaireItemComponent addItem() { //3 1438 QuestionnaireItemComponent t = new QuestionnaireItemComponent(); 1439 if (this.item == null) 1440 this.item = new ArrayList<QuestionnaireItemComponent>(); 1441 this.item.add(t); 1442 return t; 1443 } 1444 1445 public QuestionnaireItemComponent addItem(QuestionnaireItemComponent t) { //3 1446 if (t == null) 1447 return this; 1448 if (this.item == null) 1449 this.item = new ArrayList<QuestionnaireItemComponent>(); 1450 this.item.add(t); 1451 return this; 1452 } 1453 1454 /** 1455 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist 1456 */ 1457 public QuestionnaireItemComponent getItemFirstRep() { 1458 if (getItem().isEmpty()) { 1459 addItem(); 1460 } 1461 return getItem().get(0); 1462 } 1463 1464 protected void listChildren(List<Property> children) { 1465 super.listChildren(children); 1466 children.add(new Property("linkId", "string", "An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.", 0, 1, linkId)); 1467 children.add(new Property("definition", "uri", "A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: \n\n* code (ElementDefinition.code)\n* type (ElementDefinition.type)\n* required (ElementDefinition.min)\n* repeats (ElementDefinition.max)\n* maxLength (ElementDefinition.maxLength)\n* options (ElementDefinition.binding)\n\nAny information provided in these elements on a Questionnaire Item overrides the information from the definition.", 0, 1, definition)); 1468 children.add(new Property("code", "Coding", "A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).", 0, java.lang.Integer.MAX_VALUE, code)); 1469 children.add(new Property("prefix", "string", "A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.", 0, 1, prefix)); 1470 children.add(new Property("text", "string", "The name of a section, the text of a question or text content for a display item.", 0, 1, text)); 1471 children.add(new Property("type", "code", "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, 1, type)); 1472 children.add(new Property("enableWhen", "", "A constraint indicating 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)); 1473 children.add(new Property("required", "boolean", "An indication, if true, that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", 0, 1, required)); 1474 children.add(new Property("repeats", "boolean", "An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.", 0, 1, repeats)); 1475 children.add(new Property("readOnly", "boolean", "An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.", 0, 1, readOnly)); 1476 children.add(new Property("maxLength", "integer", "The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse.", 0, 1, maxLength)); 1477 children.add(new Property("options", "Reference(ValueSet)", "A reference to a value set containing a list of codes representing permitted answers for a \"choice\" or \"open-choice\" question.", 0, 1, options)); 1478 children.add(new Property("option", "", "One of the permitted answers for a \"choice\" or \"open-choice\" question.", 0, java.lang.Integer.MAX_VALUE, option)); 1479 children.add(new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial)); 1480 children.add(new Property("item", "@Questionnaire.item", "Text, questions and other groups to be nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item)); 1481 } 1482 1483 @Override 1484 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1485 switch (_hash) { 1486 case -1102667083: /*linkId*/ return new Property("linkId", "string", "An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.", 0, 1, linkId); 1487 case -1014418093: /*definition*/ return new Property("definition", "uri", "A reference to an [[[ElementDefinition]]] that provides the details for the item. If a definition is provided, then the following element values can be inferred from the definition: \n\n* code (ElementDefinition.code)\n* type (ElementDefinition.type)\n* required (ElementDefinition.min)\n* repeats (ElementDefinition.max)\n* maxLength (ElementDefinition.maxLength)\n* options (ElementDefinition.binding)\n\nAny information provided in these elements on a Questionnaire Item overrides the information from the definition.", 0, 1, definition); 1488 case 3059181: /*code*/ return new Property("code", "Coding", "A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).", 0, java.lang.Integer.MAX_VALUE, code); 1489 case -980110702: /*prefix*/ return new Property("prefix", "string", "A short label for a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire.", 0, 1, prefix); 1490 case 3556653: /*text*/ return new Property("text", "string", "The name of a section, the text of a question or text content for a display item.", 0, 1, text); 1491 case 3575610: /*type*/ return new Property("type", "code", "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, 1, type); 1492 case 1893321565: /*enableWhen*/ return new Property("enableWhen", "", "A constraint indicating 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); 1493 case -393139297: /*required*/ return new Property("required", "boolean", "An indication, if true, that the item must be present in a \"completed\" QuestionnaireResponse. If false, the item may be skipped when answering the questionnaire.", 0, 1, required); 1494 case 1094288952: /*repeats*/ return new Property("repeats", "boolean", "An indication, if true, that the item may occur multiple times in the response, collecting multiple answers answers for questions or multiple sets of answers for groups.", 0, 1, repeats); 1495 case -867683742: /*readOnly*/ return new Property("readOnly", "boolean", "An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.", 0, 1, readOnly); 1496 case -791400086: /*maxLength*/ return new Property("maxLength", "integer", "The maximum number of characters that are permitted in the answer to be considered a \"valid\" QuestionnaireResponse.", 0, 1, maxLength); 1497 case -1249474914: /*options*/ return new Property("options", "Reference(ValueSet)", "A reference to a value set containing a list of codes representing permitted answers for a \"choice\" or \"open-choice\" question.", 0, 1, options); 1498 case -1010136971: /*option*/ return new Property("option", "", "One of the permitted answers for a \"choice\" or \"open-choice\" question.", 0, java.lang.Integer.MAX_VALUE, option); 1499 case 871077564: /*initial[x]*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1500 case 1948342084: /*initial*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1501 case 1508030532: /*initialBoolean*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1502 case -1309384851: /*initialDecimal*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1503 case -893596326: /*initialInteger*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1504 case 1232894226: /*initialDate*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1505 case -709007617: /*initialDateTime*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1506 case 1233378353: /*initialTime*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1507 case -152690571: /*initialString*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1508 case 871071624: /*initialUri*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1509 case -970373241: /*initialAttachment*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1510 case -615791666: /*initialCoding*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1511 case 508206063: /*initialQuantity*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1512 case -1170213785: /*initialReference*/ return new Property("initial[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "The value that should be defaulted when initially rendering the questionnaire for user input.", 0, 1, initial); 1513 case 3242771: /*item*/ return new Property("item", "@Questionnaire.item", "Text, questions and other groups to be nested beneath a question or group.", 0, java.lang.Integer.MAX_VALUE, item); 1514 default: return super.getNamedProperty(_hash, _name, _checkValid); 1515 } 1516 1517 } 1518 1519 @Override 1520 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1521 switch (hash) { 1522 case -1102667083: /*linkId*/ return this.linkId == null ? new Base[0] : new Base[] {this.linkId}; // StringType 1523 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // UriType 1524 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding 1525 case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : new Base[] {this.prefix}; // StringType 1526 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 1527 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<QuestionnaireItemType> 1528 case 1893321565: /*enableWhen*/ return this.enableWhen == null ? new Base[0] : this.enableWhen.toArray(new Base[this.enableWhen.size()]); // QuestionnaireItemEnableWhenComponent 1529 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 1530 case 1094288952: /*repeats*/ return this.repeats == null ? new Base[0] : new Base[] {this.repeats}; // BooleanType 1531 case -867683742: /*readOnly*/ return this.readOnly == null ? new Base[0] : new Base[] {this.readOnly}; // BooleanType 1532 case -791400086: /*maxLength*/ return this.maxLength == null ? new Base[0] : new Base[] {this.maxLength}; // IntegerType 1533 case -1249474914: /*options*/ return this.options == null ? new Base[0] : new Base[] {this.options}; // Reference 1534 case -1010136971: /*option*/ return this.option == null ? new Base[0] : this.option.toArray(new Base[this.option.size()]); // QuestionnaireItemOptionComponent 1535 case 1948342084: /*initial*/ return this.initial == null ? new Base[0] : new Base[] {this.initial}; // Type 1536 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireItemComponent 1537 default: return super.getProperty(hash, name, checkValid); 1538 } 1539 1540 } 1541 1542 @Override 1543 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1544 switch (hash) { 1545 case -1102667083: // linkId 1546 this.linkId = castToString(value); // StringType 1547 return value; 1548 case -1014418093: // definition 1549 this.definition = castToUri(value); // UriType 1550 return value; 1551 case 3059181: // code 1552 this.getCode().add(castToCoding(value)); // Coding 1553 return value; 1554 case -980110702: // prefix 1555 this.prefix = castToString(value); // StringType 1556 return value; 1557 case 3556653: // text 1558 this.text = castToString(value); // StringType 1559 return value; 1560 case 3575610: // type 1561 value = new QuestionnaireItemTypeEnumFactory().fromType(castToCode(value)); 1562 this.type = (Enumeration) value; // Enumeration<QuestionnaireItemType> 1563 return value; 1564 case 1893321565: // enableWhen 1565 this.getEnableWhen().add((QuestionnaireItemEnableWhenComponent) value); // QuestionnaireItemEnableWhenComponent 1566 return value; 1567 case -393139297: // required 1568 this.required = castToBoolean(value); // BooleanType 1569 return value; 1570 case 1094288952: // repeats 1571 this.repeats = castToBoolean(value); // BooleanType 1572 return value; 1573 case -867683742: // readOnly 1574 this.readOnly = castToBoolean(value); // BooleanType 1575 return value; 1576 case -791400086: // maxLength 1577 this.maxLength = castToInteger(value); // IntegerType 1578 return value; 1579 case -1249474914: // options 1580 this.options = castToReference(value); // Reference 1581 return value; 1582 case -1010136971: // option 1583 this.getOption().add((QuestionnaireItemOptionComponent) value); // QuestionnaireItemOptionComponent 1584 return value; 1585 case 1948342084: // initial 1586 this.initial = castToType(value); // Type 1587 return value; 1588 case 3242771: // item 1589 this.getItem().add((QuestionnaireItemComponent) value); // QuestionnaireItemComponent 1590 return value; 1591 default: return super.setProperty(hash, name, value); 1592 } 1593 1594 } 1595 1596 @Override 1597 public Base setProperty(String name, Base value) throws FHIRException { 1598 if (name.equals("linkId")) { 1599 this.linkId = castToString(value); // StringType 1600 } else if (name.equals("definition")) { 1601 this.definition = castToUri(value); // UriType 1602 } else if (name.equals("code")) { 1603 this.getCode().add(castToCoding(value)); 1604 } else if (name.equals("prefix")) { 1605 this.prefix = castToString(value); // StringType 1606 } else if (name.equals("text")) { 1607 this.text = castToString(value); // StringType 1608 } else if (name.equals("type")) { 1609 value = new QuestionnaireItemTypeEnumFactory().fromType(castToCode(value)); 1610 this.type = (Enumeration) value; // Enumeration<QuestionnaireItemType> 1611 } else if (name.equals("enableWhen")) { 1612 this.getEnableWhen().add((QuestionnaireItemEnableWhenComponent) value); 1613 } else if (name.equals("required")) { 1614 this.required = castToBoolean(value); // BooleanType 1615 } else if (name.equals("repeats")) { 1616 this.repeats = castToBoolean(value); // BooleanType 1617 } else if (name.equals("readOnly")) { 1618 this.readOnly = castToBoolean(value); // BooleanType 1619 } else if (name.equals("maxLength")) { 1620 this.maxLength = castToInteger(value); // IntegerType 1621 } else if (name.equals("options")) { 1622 this.options = castToReference(value); // Reference 1623 } else if (name.equals("option")) { 1624 this.getOption().add((QuestionnaireItemOptionComponent) value); 1625 } else if (name.equals("initial[x]")) { 1626 this.initial = castToType(value); // Type 1627 } else if (name.equals("item")) { 1628 this.getItem().add((QuestionnaireItemComponent) value); 1629 } else 1630 return super.setProperty(name, value); 1631 return value; 1632 } 1633 1634 @Override 1635 public Base makeProperty(int hash, String name) throws FHIRException { 1636 switch (hash) { 1637 case -1102667083: return getLinkIdElement(); 1638 case -1014418093: return getDefinitionElement(); 1639 case 3059181: return addCode(); 1640 case -980110702: return getPrefixElement(); 1641 case 3556653: return getTextElement(); 1642 case 3575610: return getTypeElement(); 1643 case 1893321565: return addEnableWhen(); 1644 case -393139297: return getRequiredElement(); 1645 case 1094288952: return getRepeatsElement(); 1646 case -867683742: return getReadOnlyElement(); 1647 case -791400086: return getMaxLengthElement(); 1648 case -1249474914: return getOptions(); 1649 case -1010136971: return addOption(); 1650 case 871077564: return getInitial(); 1651 case 1948342084: return getInitial(); 1652 case 3242771: return addItem(); 1653 default: return super.makeProperty(hash, name); 1654 } 1655 1656 } 1657 1658 @Override 1659 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1660 switch (hash) { 1661 case -1102667083: /*linkId*/ return new String[] {"string"}; 1662 case -1014418093: /*definition*/ return new String[] {"uri"}; 1663 case 3059181: /*code*/ return new String[] {"Coding"}; 1664 case -980110702: /*prefix*/ return new String[] {"string"}; 1665 case 3556653: /*text*/ return new String[] {"string"}; 1666 case 3575610: /*type*/ return new String[] {"code"}; 1667 case 1893321565: /*enableWhen*/ return new String[] {}; 1668 case -393139297: /*required*/ return new String[] {"boolean"}; 1669 case 1094288952: /*repeats*/ return new String[] {"boolean"}; 1670 case -867683742: /*readOnly*/ return new String[] {"boolean"}; 1671 case -791400086: /*maxLength*/ return new String[] {"integer"}; 1672 case -1249474914: /*options*/ return new String[] {"Reference"}; 1673 case -1010136971: /*option*/ return new String[] {}; 1674 case 1948342084: /*initial*/ return new String[] {"boolean", "decimal", "integer", "date", "dateTime", "time", "string", "uri", "Attachment", "Coding", "Quantity", "Reference"}; 1675 case 3242771: /*item*/ return new String[] {"@Questionnaire.item"}; 1676 default: return super.getTypesForProperty(hash, name); 1677 } 1678 1679 } 1680 1681 @Override 1682 public Base addChild(String name) throws FHIRException { 1683 if (name.equals("linkId")) { 1684 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.linkId"); 1685 } 1686 else if (name.equals("definition")) { 1687 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.definition"); 1688 } 1689 else if (name.equals("code")) { 1690 return addCode(); 1691 } 1692 else if (name.equals("prefix")) { 1693 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.prefix"); 1694 } 1695 else if (name.equals("text")) { 1696 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.text"); 1697 } 1698 else if (name.equals("type")) { 1699 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.type"); 1700 } 1701 else if (name.equals("enableWhen")) { 1702 return addEnableWhen(); 1703 } 1704 else if (name.equals("required")) { 1705 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.required"); 1706 } 1707 else if (name.equals("repeats")) { 1708 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.repeats"); 1709 } 1710 else if (name.equals("readOnly")) { 1711 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.readOnly"); 1712 } 1713 else if (name.equals("maxLength")) { 1714 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.maxLength"); 1715 } 1716 else if (name.equals("options")) { 1717 this.options = new Reference(); 1718 return this.options; 1719 } 1720 else if (name.equals("option")) { 1721 return addOption(); 1722 } 1723 else if (name.equals("initialBoolean")) { 1724 this.initial = new BooleanType(); 1725 return this.initial; 1726 } 1727 else if (name.equals("initialDecimal")) { 1728 this.initial = new DecimalType(); 1729 return this.initial; 1730 } 1731 else if (name.equals("initialInteger")) { 1732 this.initial = new IntegerType(); 1733 return this.initial; 1734 } 1735 else if (name.equals("initialDate")) { 1736 this.initial = new DateType(); 1737 return this.initial; 1738 } 1739 else if (name.equals("initialDateTime")) { 1740 this.initial = new DateTimeType(); 1741 return this.initial; 1742 } 1743 else if (name.equals("initialTime")) { 1744 this.initial = new TimeType(); 1745 return this.initial; 1746 } 1747 else if (name.equals("initialString")) { 1748 this.initial = new StringType(); 1749 return this.initial; 1750 } 1751 else if (name.equals("initialUri")) { 1752 this.initial = new UriType(); 1753 return this.initial; 1754 } 1755 else if (name.equals("initialAttachment")) { 1756 this.initial = new Attachment(); 1757 return this.initial; 1758 } 1759 else if (name.equals("initialCoding")) { 1760 this.initial = new Coding(); 1761 return this.initial; 1762 } 1763 else if (name.equals("initialQuantity")) { 1764 this.initial = new Quantity(); 1765 return this.initial; 1766 } 1767 else if (name.equals("initialReference")) { 1768 this.initial = new Reference(); 1769 return this.initial; 1770 } 1771 else if (name.equals("item")) { 1772 return addItem(); 1773 } 1774 else 1775 return super.addChild(name); 1776 } 1777 1778 public QuestionnaireItemComponent copy() { 1779 QuestionnaireItemComponent dst = new QuestionnaireItemComponent(); 1780 copyValues(dst); 1781 dst.linkId = linkId == null ? null : linkId.copy(); 1782 dst.definition = definition == null ? null : definition.copy(); 1783 if (code != null) { 1784 dst.code = new ArrayList<Coding>(); 1785 for (Coding i : code) 1786 dst.code.add(i.copy()); 1787 }; 1788 dst.prefix = prefix == null ? null : prefix.copy(); 1789 dst.text = text == null ? null : text.copy(); 1790 dst.type = type == null ? null : type.copy(); 1791 if (enableWhen != null) { 1792 dst.enableWhen = new ArrayList<QuestionnaireItemEnableWhenComponent>(); 1793 for (QuestionnaireItemEnableWhenComponent i : enableWhen) 1794 dst.enableWhen.add(i.copy()); 1795 }; 1796 dst.required = required == null ? null : required.copy(); 1797 dst.repeats = repeats == null ? null : repeats.copy(); 1798 dst.readOnly = readOnly == null ? null : readOnly.copy(); 1799 dst.maxLength = maxLength == null ? null : maxLength.copy(); 1800 dst.options = options == null ? null : options.copy(); 1801 if (option != null) { 1802 dst.option = new ArrayList<QuestionnaireItemOptionComponent>(); 1803 for (QuestionnaireItemOptionComponent i : option) 1804 dst.option.add(i.copy()); 1805 }; 1806 dst.initial = initial == null ? null : initial.copy(); 1807 if (item != null) { 1808 dst.item = new ArrayList<QuestionnaireItemComponent>(); 1809 for (QuestionnaireItemComponent i : item) 1810 dst.item.add(i.copy()); 1811 }; 1812 return dst; 1813 } 1814 1815 @Override 1816 public boolean equalsDeep(Base other_) { 1817 if (!super.equalsDeep(other_)) 1818 return false; 1819 if (!(other_ instanceof QuestionnaireItemComponent)) 1820 return false; 1821 QuestionnaireItemComponent o = (QuestionnaireItemComponent) other_; 1822 return compareDeep(linkId, o.linkId, true) && compareDeep(definition, o.definition, true) && compareDeep(code, o.code, true) 1823 && compareDeep(prefix, o.prefix, true) && compareDeep(text, o.text, true) && compareDeep(type, o.type, true) 1824 && compareDeep(enableWhen, o.enableWhen, true) && compareDeep(required, o.required, true) && compareDeep(repeats, o.repeats, true) 1825 && compareDeep(readOnly, o.readOnly, true) && compareDeep(maxLength, o.maxLength, true) && compareDeep(options, o.options, true) 1826 && compareDeep(option, o.option, true) && compareDeep(initial, o.initial, true) && compareDeep(item, o.item, true) 1827 ; 1828 } 1829 1830 @Override 1831 public boolean equalsShallow(Base other_) { 1832 if (!super.equalsShallow(other_)) 1833 return false; 1834 if (!(other_ instanceof QuestionnaireItemComponent)) 1835 return false; 1836 QuestionnaireItemComponent o = (QuestionnaireItemComponent) other_; 1837 return compareValues(linkId, o.linkId, true) && compareValues(definition, o.definition, true) && compareValues(prefix, o.prefix, true) 1838 && compareValues(text, o.text, true) && compareValues(type, o.type, true) && compareValues(required, o.required, true) 1839 && compareValues(repeats, o.repeats, true) && compareValues(readOnly, o.readOnly, true) && compareValues(maxLength, o.maxLength, true) 1840 ; 1841 } 1842 1843 public boolean isEmpty() { 1844 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(linkId, definition, code 1845 , prefix, text, type, enableWhen, required, repeats, readOnly, maxLength, options 1846 , option, initial, item); 1847 } 1848 1849 public String fhirType() { 1850 return "Questionnaire.item"; 1851 1852 } 1853 1854 } 1855 1856 @Block() 1857 public static class QuestionnaireItemEnableWhenComponent extends BackboneElement implements IBaseBackboneElement { 1858 /** 1859 * The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. 1860 */ 1861 @Child(name = "question", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1862 @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." ) 1863 protected StringType question; 1864 1865 /** 1866 * An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false). 1867 */ 1868 @Child(name = "hasAnswer", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1869 @Description(shortDefinition="Enable when answered or not", formalDefinition="An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false)." ) 1870 protected BooleanType hasAnswer; 1871 1872 /** 1873 * An answer that the referenced question must match in order for the item to be enabled. 1874 */ 1875 @Child(name = "answer", type = {BooleanType.class, DecimalType.class, IntegerType.class, DateType.class, DateTimeType.class, TimeType.class, StringType.class, UriType.class, Attachment.class, Coding.class, Quantity.class, Reference.class}, order=3, min=0, max=1, modifier=false, summary=false) 1876 @Description(shortDefinition="Value question must have", formalDefinition="An answer that the referenced question must match in order for the item to be enabled." ) 1877 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-answers") 1878 protected Type answer; 1879 1880 private static final long serialVersionUID = -300241115L; 1881 1882 /** 1883 * Constructor 1884 */ 1885 public QuestionnaireItemEnableWhenComponent() { 1886 super(); 1887 } 1888 1889 /** 1890 * Constructor 1891 */ 1892 public QuestionnaireItemEnableWhenComponent(StringType question) { 1893 super(); 1894 this.question = question; 1895 } 1896 1897 /** 1898 * @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 1899 */ 1900 public StringType getQuestionElement() { 1901 if (this.question == null) 1902 if (Configuration.errorOnAutoCreate()) 1903 throw new Error("Attempt to auto-create QuestionnaireItemEnableWhenComponent.question"); 1904 else if (Configuration.doAutoCreate()) 1905 this.question = new StringType(); // bb 1906 return this.question; 1907 } 1908 1909 public boolean hasQuestionElement() { 1910 return this.question != null && !this.question.isEmpty(); 1911 } 1912 1913 public boolean hasQuestion() { 1914 return this.question != null && !this.question.isEmpty(); 1915 } 1916 1917 /** 1918 * @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 1919 */ 1920 public QuestionnaireItemEnableWhenComponent setQuestionElement(StringType value) { 1921 this.question = value; 1922 return this; 1923 } 1924 1925 /** 1926 * @return The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. 1927 */ 1928 public String getQuestion() { 1929 return this.question == null ? null : this.question.getValue(); 1930 } 1931 1932 /** 1933 * @param value The linkId for the question whose answer (or lack of answer) governs whether this item is enabled. 1934 */ 1935 public QuestionnaireItemEnableWhenComponent setQuestion(String value) { 1936 if (this.question == null) 1937 this.question = new StringType(); 1938 this.question.setValue(value); 1939 return this; 1940 } 1941 1942 /** 1943 * @return {@link #hasAnswer} (An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).). This is the underlying object with id, value and extensions. The accessor "getHasAnswer" gives direct access to the value 1944 */ 1945 public BooleanType getHasAnswerElement() { 1946 if (this.hasAnswer == null) 1947 if (Configuration.errorOnAutoCreate()) 1948 throw new Error("Attempt to auto-create QuestionnaireItemEnableWhenComponent.hasAnswer"); 1949 else if (Configuration.doAutoCreate()) 1950 this.hasAnswer = new BooleanType(); // bb 1951 return this.hasAnswer; 1952 } 1953 1954 public boolean hasHasAnswerElement() { 1955 return this.hasAnswer != null && !this.hasAnswer.isEmpty(); 1956 } 1957 1958 public boolean hasHasAnswer() { 1959 return this.hasAnswer != null && !this.hasAnswer.isEmpty(); 1960 } 1961 1962 /** 1963 * @param value {@link #hasAnswer} (An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).). This is the underlying object with id, value and extensions. The accessor "getHasAnswer" gives direct access to the value 1964 */ 1965 public QuestionnaireItemEnableWhenComponent setHasAnswerElement(BooleanType value) { 1966 this.hasAnswer = value; 1967 return this; 1968 } 1969 1970 /** 1971 * @return An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false). 1972 */ 1973 public boolean getHasAnswer() { 1974 return this.hasAnswer == null || this.hasAnswer.isEmpty() ? false : this.hasAnswer.getValue(); 1975 } 1976 1977 /** 1978 * @param value An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false). 1979 */ 1980 public QuestionnaireItemEnableWhenComponent setHasAnswer(boolean value) { 1981 if (this.hasAnswer == null) 1982 this.hasAnswer = new BooleanType(); 1983 this.hasAnswer.setValue(value); 1984 return this; 1985 } 1986 1987 /** 1988 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 1989 */ 1990 public Type getAnswer() { 1991 return this.answer; 1992 } 1993 1994 /** 1995 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 1996 */ 1997 public BooleanType getAnswerBooleanType() throws FHIRException { 1998 if (this.answer == null) 1999 return null; 2000 if (!(this.answer instanceof BooleanType)) 2001 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2002 return (BooleanType) this.answer; 2003 } 2004 2005 public boolean hasAnswerBooleanType() { 2006 return this != null && this.answer instanceof BooleanType; 2007 } 2008 2009 /** 2010 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2011 */ 2012 public DecimalType getAnswerDecimalType() throws FHIRException { 2013 if (this.answer == null) 2014 return null; 2015 if (!(this.answer instanceof DecimalType)) 2016 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2017 return (DecimalType) this.answer; 2018 } 2019 2020 public boolean hasAnswerDecimalType() { 2021 return this != null && this.answer instanceof DecimalType; 2022 } 2023 2024 /** 2025 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2026 */ 2027 public IntegerType getAnswerIntegerType() throws FHIRException { 2028 if (this.answer == null) 2029 return null; 2030 if (!(this.answer instanceof IntegerType)) 2031 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2032 return (IntegerType) this.answer; 2033 } 2034 2035 public boolean hasAnswerIntegerType() { 2036 return this != null && this.answer instanceof IntegerType; 2037 } 2038 2039 /** 2040 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2041 */ 2042 public DateType getAnswerDateType() throws FHIRException { 2043 if (this.answer == null) 2044 return null; 2045 if (!(this.answer instanceof DateType)) 2046 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2047 return (DateType) this.answer; 2048 } 2049 2050 public boolean hasAnswerDateType() { 2051 return this != null && this.answer instanceof DateType; 2052 } 2053 2054 /** 2055 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2056 */ 2057 public DateTimeType getAnswerDateTimeType() throws FHIRException { 2058 if (this.answer == null) 2059 return null; 2060 if (!(this.answer instanceof DateTimeType)) 2061 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2062 return (DateTimeType) this.answer; 2063 } 2064 2065 public boolean hasAnswerDateTimeType() { 2066 return this != null && this.answer instanceof DateTimeType; 2067 } 2068 2069 /** 2070 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2071 */ 2072 public TimeType getAnswerTimeType() throws FHIRException { 2073 if (this.answer == null) 2074 return null; 2075 if (!(this.answer instanceof TimeType)) 2076 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2077 return (TimeType) this.answer; 2078 } 2079 2080 public boolean hasAnswerTimeType() { 2081 return this != null && this.answer instanceof TimeType; 2082 } 2083 2084 /** 2085 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2086 */ 2087 public StringType getAnswerStringType() throws FHIRException { 2088 if (this.answer == null) 2089 return null; 2090 if (!(this.answer instanceof StringType)) 2091 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2092 return (StringType) this.answer; 2093 } 2094 2095 public boolean hasAnswerStringType() { 2096 return this != null && this.answer instanceof StringType; 2097 } 2098 2099 /** 2100 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2101 */ 2102 public UriType getAnswerUriType() throws FHIRException { 2103 if (this.answer == null) 2104 return null; 2105 if (!(this.answer instanceof UriType)) 2106 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.answer.getClass().getName()+" was encountered"); 2107 return (UriType) this.answer; 2108 } 2109 2110 public boolean hasAnswerUriType() { 2111 return this != null && this.answer instanceof UriType; 2112 } 2113 2114 /** 2115 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2116 */ 2117 public Attachment getAnswerAttachment() throws FHIRException { 2118 if (this.answer == null) 2119 return null; 2120 if (!(this.answer instanceof Attachment)) 2121 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.answer.getClass().getName()+" was encountered"); 2122 return (Attachment) this.answer; 2123 } 2124 2125 public boolean hasAnswerAttachment() { 2126 return this != null && this.answer instanceof Attachment; 2127 } 2128 2129 /** 2130 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2131 */ 2132 public Coding getAnswerCoding() throws FHIRException { 2133 if (this.answer == null) 2134 return null; 2135 if (!(this.answer instanceof Coding)) 2136 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.answer.getClass().getName()+" was encountered"); 2137 return (Coding) this.answer; 2138 } 2139 2140 public boolean hasAnswerCoding() { 2141 return this != null && this.answer instanceof Coding; 2142 } 2143 2144 /** 2145 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2146 */ 2147 public Quantity getAnswerQuantity() throws FHIRException { 2148 if (this.answer == null) 2149 return null; 2150 if (!(this.answer instanceof Quantity)) 2151 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.answer.getClass().getName()+" was encountered"); 2152 return (Quantity) this.answer; 2153 } 2154 2155 public boolean hasAnswerQuantity() { 2156 return this != null && this.answer instanceof Quantity; 2157 } 2158 2159 /** 2160 * @return {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2161 */ 2162 public Reference getAnswerReference() throws FHIRException { 2163 if (this.answer == null) 2164 return null; 2165 if (!(this.answer instanceof Reference)) 2166 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.answer.getClass().getName()+" was encountered"); 2167 return (Reference) this.answer; 2168 } 2169 2170 public boolean hasAnswerReference() { 2171 return this != null && this.answer instanceof Reference; 2172 } 2173 2174 public boolean hasAnswer() { 2175 return this.answer != null && !this.answer.isEmpty(); 2176 } 2177 2178 /** 2179 * @param value {@link #answer} (An answer that the referenced question must match in order for the item to be enabled.) 2180 */ 2181 public QuestionnaireItemEnableWhenComponent setAnswer(Type value) throws FHIRFormatError { 2182 if (value != null && !(value instanceof BooleanType || value instanceof DecimalType || value instanceof IntegerType || value instanceof DateType || value instanceof DateTimeType || value instanceof TimeType || value instanceof StringType || value instanceof UriType || value instanceof Attachment || value instanceof Coding || value instanceof Quantity || value instanceof Reference)) 2183 throw new FHIRFormatError("Not the right type for Questionnaire.item.enableWhen.answer[x]: "+value.fhirType()); 2184 this.answer = value; 2185 return this; 2186 } 2187 2188 protected void listChildren(List<Property> children) { 2189 super.listChildren(children); 2190 children.add(new Property("question", "string", "The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.", 0, 1, question)); 2191 children.add(new Property("hasAnswer", "boolean", "An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).", 0, 1, hasAnswer)); 2192 children.add(new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer)); 2193 } 2194 2195 @Override 2196 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2197 switch (_hash) { 2198 case -1165870106: /*question*/ return new Property("question", "string", "The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.", 0, 1, question); 2199 case -793058568: /*hasAnswer*/ return new Property("hasAnswer", "boolean", "An indication that this item should be enabled only if the specified question is answered (hasAnswer=true) or not answered (hasAnswer=false).", 0, 1, hasAnswer); 2200 case 1693524994: /*answer[x]*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2201 case -1412808770: /*answer*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2202 case 1194603146: /*answerBoolean*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2203 case -1622812237: /*answerDecimal*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2204 case -1207023712: /*answerInteger*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2205 case 958960780: /*answerDate*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2206 case -1835321991: /*answerDateTime*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2207 case 959444907: /*answerTime*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2208 case -1409727121: /*answerString*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2209 case 1693519054: /*answerUri*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2210 case -1026728063: /*answerAttachment*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2211 case -1872828216: /*answerCoding*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2212 case -618108311: /*answerQuantity*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2213 case -1726221011: /*answerReference*/ return new Property("answer[x]", "boolean|decimal|integer|date|dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Any)", "An answer that the referenced question must match in order for the item to be enabled.", 0, 1, answer); 2214 default: return super.getNamedProperty(_hash, _name, _checkValid); 2215 } 2216 2217 } 2218 2219 @Override 2220 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2221 switch (hash) { 2222 case -1165870106: /*question*/ return this.question == null ? new Base[0] : new Base[] {this.question}; // StringType 2223 case -793058568: /*hasAnswer*/ return this.hasAnswer == null ? new Base[0] : new Base[] {this.hasAnswer}; // BooleanType 2224 case -1412808770: /*answer*/ return this.answer == null ? new Base[0] : new Base[] {this.answer}; // Type 2225 default: return super.getProperty(hash, name, checkValid); 2226 } 2227 2228 } 2229 2230 @Override 2231 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2232 switch (hash) { 2233 case -1165870106: // question 2234 this.question = castToString(value); // StringType 2235 return value; 2236 case -793058568: // hasAnswer 2237 this.hasAnswer = castToBoolean(value); // BooleanType 2238 return value; 2239 case -1412808770: // answer 2240 this.answer = castToType(value); // Type 2241 return value; 2242 default: return super.setProperty(hash, name, value); 2243 } 2244 2245 } 2246 2247 @Override 2248 public Base setProperty(String name, Base value) throws FHIRException { 2249 if (name.equals("question")) { 2250 this.question = castToString(value); // StringType 2251 } else if (name.equals("hasAnswer")) { 2252 this.hasAnswer = castToBoolean(value); // BooleanType 2253 } else if (name.equals("answer[x]")) { 2254 this.answer = castToType(value); // Type 2255 } else 2256 return super.setProperty(name, value); 2257 return value; 2258 } 2259 2260 @Override 2261 public Base makeProperty(int hash, String name) throws FHIRException { 2262 switch (hash) { 2263 case -1165870106: return getQuestionElement(); 2264 case -793058568: return getHasAnswerElement(); 2265 case 1693524994: return getAnswer(); 2266 case -1412808770: return getAnswer(); 2267 default: return super.makeProperty(hash, name); 2268 } 2269 2270 } 2271 2272 @Override 2273 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2274 switch (hash) { 2275 case -1165870106: /*question*/ return new String[] {"string"}; 2276 case -793058568: /*hasAnswer*/ return new String[] {"boolean"}; 2277 case -1412808770: /*answer*/ return new String[] {"boolean", "decimal", "integer", "date", "dateTime", "time", "string", "uri", "Attachment", "Coding", "Quantity", "Reference"}; 2278 default: return super.getTypesForProperty(hash, name); 2279 } 2280 2281 } 2282 2283 @Override 2284 public Base addChild(String name) throws FHIRException { 2285 if (name.equals("question")) { 2286 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.question"); 2287 } 2288 else if (name.equals("hasAnswer")) { 2289 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.hasAnswer"); 2290 } 2291 else if (name.equals("answerBoolean")) { 2292 this.answer = new BooleanType(); 2293 return this.answer; 2294 } 2295 else if (name.equals("answerDecimal")) { 2296 this.answer = new DecimalType(); 2297 return this.answer; 2298 } 2299 else if (name.equals("answerInteger")) { 2300 this.answer = new IntegerType(); 2301 return this.answer; 2302 } 2303 else if (name.equals("answerDate")) { 2304 this.answer = new DateType(); 2305 return this.answer; 2306 } 2307 else if (name.equals("answerDateTime")) { 2308 this.answer = new DateTimeType(); 2309 return this.answer; 2310 } 2311 else if (name.equals("answerTime")) { 2312 this.answer = new TimeType(); 2313 return this.answer; 2314 } 2315 else if (name.equals("answerString")) { 2316 this.answer = new StringType(); 2317 return this.answer; 2318 } 2319 else if (name.equals("answerUri")) { 2320 this.answer = new UriType(); 2321 return this.answer; 2322 } 2323 else if (name.equals("answerAttachment")) { 2324 this.answer = new Attachment(); 2325 return this.answer; 2326 } 2327 else if (name.equals("answerCoding")) { 2328 this.answer = new Coding(); 2329 return this.answer; 2330 } 2331 else if (name.equals("answerQuantity")) { 2332 this.answer = new Quantity(); 2333 return this.answer; 2334 } 2335 else if (name.equals("answerReference")) { 2336 this.answer = new Reference(); 2337 return this.answer; 2338 } 2339 else 2340 return super.addChild(name); 2341 } 2342 2343 public QuestionnaireItemEnableWhenComponent copy() { 2344 QuestionnaireItemEnableWhenComponent dst = new QuestionnaireItemEnableWhenComponent(); 2345 copyValues(dst); 2346 dst.question = question == null ? null : question.copy(); 2347 dst.hasAnswer = hasAnswer == null ? null : hasAnswer.copy(); 2348 dst.answer = answer == null ? null : answer.copy(); 2349 return dst; 2350 } 2351 2352 @Override 2353 public boolean equalsDeep(Base other_) { 2354 if (!super.equalsDeep(other_)) 2355 return false; 2356 if (!(other_ instanceof QuestionnaireItemEnableWhenComponent)) 2357 return false; 2358 QuestionnaireItemEnableWhenComponent o = (QuestionnaireItemEnableWhenComponent) other_; 2359 return compareDeep(question, o.question, true) && compareDeep(hasAnswer, o.hasAnswer, true) && compareDeep(answer, o.answer, true) 2360 ; 2361 } 2362 2363 @Override 2364 public boolean equalsShallow(Base other_) { 2365 if (!super.equalsShallow(other_)) 2366 return false; 2367 if (!(other_ instanceof QuestionnaireItemEnableWhenComponent)) 2368 return false; 2369 QuestionnaireItemEnableWhenComponent o = (QuestionnaireItemEnableWhenComponent) other_; 2370 return compareValues(question, o.question, true) && compareValues(hasAnswer, o.hasAnswer, true); 2371 } 2372 2373 public boolean isEmpty() { 2374 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(question, hasAnswer, answer 2375 ); 2376 } 2377 2378 public String fhirType() { 2379 return "Questionnaire.item.enableWhen"; 2380 2381 } 2382 2383 } 2384 2385 @Block() 2386 public static class QuestionnaireItemOptionComponent extends BackboneElement implements IBaseBackboneElement { 2387 /** 2388 * A potential answer that's allowed as the answer to this question. 2389 */ 2390 @Child(name = "value", type = {IntegerType.class, DateType.class, TimeType.class, StringType.class, Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 2391 @Description(shortDefinition="Answer value", formalDefinition="A potential answer that's allowed as the answer to this question." ) 2392 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-answers") 2393 protected Type value; 2394 2395 private static final long serialVersionUID = -732981989L; 2396 2397 /** 2398 * Constructor 2399 */ 2400 public QuestionnaireItemOptionComponent() { 2401 super(); 2402 } 2403 2404 /** 2405 * Constructor 2406 */ 2407 public QuestionnaireItemOptionComponent(Type value) { 2408 super(); 2409 this.value = value; 2410 } 2411 2412 /** 2413 * @return {@link #value} (A potential answer that's allowed as the answer to this question.) 2414 */ 2415 public Type getValue() { 2416 return this.value; 2417 } 2418 2419 /** 2420 * @return {@link #value} (A potential answer that's allowed as the answer to this question.) 2421 */ 2422 public IntegerType getValueIntegerType() throws FHIRException { 2423 if (this.value == null) 2424 return null; 2425 if (!(this.value instanceof IntegerType)) 2426 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 2427 return (IntegerType) this.value; 2428 } 2429 2430 public boolean hasValueIntegerType() { 2431 return this != null && this.value instanceof IntegerType; 2432 } 2433 2434 /** 2435 * @return {@link #value} (A potential answer that's allowed as the answer to this question.) 2436 */ 2437 public DateType getValueDateType() throws FHIRException { 2438 if (this.value == null) 2439 return null; 2440 if (!(this.value instanceof DateType)) 2441 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 2442 return (DateType) this.value; 2443 } 2444 2445 public boolean hasValueDateType() { 2446 return this != null && this.value instanceof DateType; 2447 } 2448 2449 /** 2450 * @return {@link #value} (A potential answer that's allowed as the answer to this question.) 2451 */ 2452 public TimeType getValueTimeType() throws FHIRException { 2453 if (this.value == null) 2454 return null; 2455 if (!(this.value instanceof TimeType)) 2456 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 2457 return (TimeType) this.value; 2458 } 2459 2460 public boolean hasValueTimeType() { 2461 return this != null && this.value instanceof TimeType; 2462 } 2463 2464 /** 2465 * @return {@link #value} (A potential answer that's allowed as the answer to this question.) 2466 */ 2467 public StringType getValueStringType() throws FHIRException { 2468 if (this.value == null) 2469 return null; 2470 if (!(this.value instanceof StringType)) 2471 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 2472 return (StringType) this.value; 2473 } 2474 2475 public boolean hasValueStringType() { 2476 return this != null && this.value instanceof StringType; 2477 } 2478 2479 /** 2480 * @return {@link #value} (A potential answer that's allowed as the answer to this question.) 2481 */ 2482 public Coding getValueCoding() throws FHIRException { 2483 if (this.value == null) 2484 return null; 2485 if (!(this.value instanceof Coding)) 2486 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 2487 return (Coding) this.value; 2488 } 2489 2490 public boolean hasValueCoding() { 2491 return this != null && this.value instanceof Coding; 2492 } 2493 2494 public boolean hasValue() { 2495 return this.value != null && !this.value.isEmpty(); 2496 } 2497 2498 /** 2499 * @param value {@link #value} (A potential answer that's allowed as the answer to this question.) 2500 */ 2501 public QuestionnaireItemOptionComponent setValue(Type value) throws FHIRFormatError { 2502 if (value != null && !(value instanceof IntegerType || value instanceof DateType || value instanceof TimeType || value instanceof StringType || value instanceof Coding)) 2503 throw new FHIRFormatError("Not the right type for Questionnaire.item.option.value[x]: "+value.fhirType()); 2504 this.value = value; 2505 return this; 2506 } 2507 2508 protected void listChildren(List<Property> children) { 2509 super.listChildren(children); 2510 children.add(new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value)); 2511 } 2512 2513 @Override 2514 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2515 switch (_hash) { 2516 case -1410166417: /*value[x]*/ return new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value); 2517 case 111972721: /*value*/ return new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value); 2518 case -1668204915: /*valueInteger*/ return new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value); 2519 case -766192449: /*valueDate*/ return new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value); 2520 case -765708322: /*valueTime*/ return new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value); 2521 case -1424603934: /*valueString*/ return new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value); 2522 case -1887705029: /*valueCoding*/ return new Property("value[x]", "integer|date|time|string|Coding", "A potential answer that's allowed as the answer to this question.", 0, 1, value); 2523 default: return super.getNamedProperty(_hash, _name, _checkValid); 2524 } 2525 2526 } 2527 2528 @Override 2529 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2530 switch (hash) { 2531 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type 2532 default: return super.getProperty(hash, name, checkValid); 2533 } 2534 2535 } 2536 2537 @Override 2538 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2539 switch (hash) { 2540 case 111972721: // value 2541 this.value = castToType(value); // Type 2542 return value; 2543 default: return super.setProperty(hash, name, value); 2544 } 2545 2546 } 2547 2548 @Override 2549 public Base setProperty(String name, Base value) throws FHIRException { 2550 if (name.equals("value[x]")) { 2551 this.value = castToType(value); // Type 2552 } else 2553 return super.setProperty(name, value); 2554 return value; 2555 } 2556 2557 @Override 2558 public Base makeProperty(int hash, String name) throws FHIRException { 2559 switch (hash) { 2560 case -1410166417: return getValue(); 2561 case 111972721: return getValue(); 2562 default: return super.makeProperty(hash, name); 2563 } 2564 2565 } 2566 2567 @Override 2568 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2569 switch (hash) { 2570 case 111972721: /*value*/ return new String[] {"integer", "date", "time", "string", "Coding"}; 2571 default: return super.getTypesForProperty(hash, name); 2572 } 2573 2574 } 2575 2576 @Override 2577 public Base addChild(String name) throws FHIRException { 2578 if (name.equals("valueInteger")) { 2579 this.value = new IntegerType(); 2580 return this.value; 2581 } 2582 else if (name.equals("valueDate")) { 2583 this.value = new DateType(); 2584 return this.value; 2585 } 2586 else if (name.equals("valueTime")) { 2587 this.value = new TimeType(); 2588 return this.value; 2589 } 2590 else if (name.equals("valueString")) { 2591 this.value = new StringType(); 2592 return this.value; 2593 } 2594 else if (name.equals("valueCoding")) { 2595 this.value = new Coding(); 2596 return this.value; 2597 } 2598 else 2599 return super.addChild(name); 2600 } 2601 2602 public QuestionnaireItemOptionComponent copy() { 2603 QuestionnaireItemOptionComponent dst = new QuestionnaireItemOptionComponent(); 2604 copyValues(dst); 2605 dst.value = value == null ? null : value.copy(); 2606 return dst; 2607 } 2608 2609 @Override 2610 public boolean equalsDeep(Base other_) { 2611 if (!super.equalsDeep(other_)) 2612 return false; 2613 if (!(other_ instanceof QuestionnaireItemOptionComponent)) 2614 return false; 2615 QuestionnaireItemOptionComponent o = (QuestionnaireItemOptionComponent) other_; 2616 return compareDeep(value, o.value, true); 2617 } 2618 2619 @Override 2620 public boolean equalsShallow(Base other_) { 2621 if (!super.equalsShallow(other_)) 2622 return false; 2623 if (!(other_ instanceof QuestionnaireItemOptionComponent)) 2624 return false; 2625 QuestionnaireItemOptionComponent o = (QuestionnaireItemOptionComponent) other_; 2626 return true; 2627 } 2628 2629 public boolean isEmpty() { 2630 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(value); 2631 } 2632 2633 public String fhirType() { 2634 return "Questionnaire.item.option"; 2635 2636 } 2637 2638 } 2639 2640 /** 2641 * A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance. 2642 */ 2643 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2644 @Description(shortDefinition="Additional identifier for the questionnaire", formalDefinition="A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 2645 protected List<Identifier> identifier; 2646 2647 /** 2648 * Explaination of why this questionnaire is needed and why it has been designed as it has. 2649 */ 2650 @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2651 @Description(shortDefinition="Why this questionnaire is defined", formalDefinition="Explaination of why this questionnaire is needed and why it has been designed as it has." ) 2652 protected MarkdownType purpose; 2653 2654 /** 2655 * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 2656 */ 2657 @Child(name = "approvalDate", type = {DateType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2658 @Description(shortDefinition="When the questionnaire was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." ) 2659 protected DateType approvalDate; 2660 2661 /** 2662 * The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date. 2663 */ 2664 @Child(name = "lastReviewDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2665 @Description(shortDefinition="When the questionnaire was last reviewed", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date." ) 2666 protected DateType lastReviewDate; 2667 2668 /** 2669 * The period during which the questionnaire content was or is planned to be in active use. 2670 */ 2671 @Child(name = "effectivePeriod", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=true) 2672 @Description(shortDefinition="When the questionnaire is expected to be used", formalDefinition="The period during which the questionnaire content was or is planned to be in active use." ) 2673 protected Period effectivePeriod; 2674 2675 /** 2676 * A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire. 2677 */ 2678 @Child(name = "copyright", type = {MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2679 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire." ) 2680 protected MarkdownType copyright; 2681 2682 /** 2683 * An identifier for this question or group of questions in a particular terminology such as LOINC. 2684 */ 2685 @Child(name = "code", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2686 @Description(shortDefinition="Concept that represents the overall questionnaire", formalDefinition="An identifier for this question or group of questions in a particular terminology such as LOINC." ) 2687 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/questionnaire-questions") 2688 protected List<Coding> code; 2689 2690 /** 2691 * The types of subjects that can be the subject of responses created for the questionnaire. 2692 */ 2693 @Child(name = "subjectType", type = {CodeType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2694 @Description(shortDefinition="Resource that can be subject of QuestionnaireResponse", formalDefinition="The types of subjects that can be the subject of responses created for the questionnaire." ) 2695 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") 2696 protected List<CodeType> subjectType; 2697 2698 /** 2699 * A particular question, question grouping or display text that is part of the questionnaire. 2700 */ 2701 @Child(name = "item", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2702 @Description(shortDefinition="Questions and sections within the Questionnaire", formalDefinition="A particular question, question grouping or display text that is part of the questionnaire." ) 2703 protected List<QuestionnaireItemComponent> item; 2704 2705 private static final long serialVersionUID = -1846925043L; 2706 2707 /** 2708 * Constructor 2709 */ 2710 public Questionnaire() { 2711 super(); 2712 } 2713 2714 /** 2715 * Constructor 2716 */ 2717 public Questionnaire(Enumeration<PublicationStatus> status) { 2718 super(); 2719 this.status = status; 2720 } 2721 2722 /** 2723 * @return {@link #url} (An absolute URI 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. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2724 */ 2725 public UriType getUrlElement() { 2726 if (this.url == null) 2727 if (Configuration.errorOnAutoCreate()) 2728 throw new Error("Attempt to auto-create Questionnaire.url"); 2729 else if (Configuration.doAutoCreate()) 2730 this.url = new UriType(); // bb 2731 return this.url; 2732 } 2733 2734 public boolean hasUrlElement() { 2735 return this.url != null && !this.url.isEmpty(); 2736 } 2737 2738 public boolean hasUrl() { 2739 return this.url != null && !this.url.isEmpty(); 2740 } 2741 2742 /** 2743 * @param value {@link #url} (An absolute URI 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. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2744 */ 2745 public Questionnaire setUrlElement(UriType value) { 2746 this.url = value; 2747 return this; 2748 } 2749 2750 /** 2751 * @return An absolute URI 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. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions). 2752 */ 2753 public String getUrl() { 2754 return this.url == null ? null : this.url.getValue(); 2755 } 2756 2757 /** 2758 * @param value An absolute URI 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. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions). 2759 */ 2760 public Questionnaire setUrl(String value) { 2761 if (Utilities.noString(value)) 2762 this.url = null; 2763 else { 2764 if (this.url == null) 2765 this.url = new UriType(); 2766 this.url.setValue(value); 2767 } 2768 return this; 2769 } 2770 2771 /** 2772 * @return {@link #identifier} (A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.) 2773 */ 2774 public List<Identifier> getIdentifier() { 2775 if (this.identifier == null) 2776 this.identifier = new ArrayList<Identifier>(); 2777 return this.identifier; 2778 } 2779 2780 /** 2781 * @return Returns a reference to <code>this</code> for easy method chaining 2782 */ 2783 public Questionnaire setIdentifier(List<Identifier> theIdentifier) { 2784 this.identifier = theIdentifier; 2785 return this; 2786 } 2787 2788 public boolean hasIdentifier() { 2789 if (this.identifier == null) 2790 return false; 2791 for (Identifier item : this.identifier) 2792 if (!item.isEmpty()) 2793 return true; 2794 return false; 2795 } 2796 2797 public Identifier addIdentifier() { //3 2798 Identifier t = new Identifier(); 2799 if (this.identifier == null) 2800 this.identifier = new ArrayList<Identifier>(); 2801 this.identifier.add(t); 2802 return t; 2803 } 2804 2805 public Questionnaire addIdentifier(Identifier t) { //3 2806 if (t == null) 2807 return this; 2808 if (this.identifier == null) 2809 this.identifier = new ArrayList<Identifier>(); 2810 this.identifier.add(t); 2811 return this; 2812 } 2813 2814 /** 2815 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 2816 */ 2817 public Identifier getIdentifierFirstRep() { 2818 if (getIdentifier().isEmpty()) { 2819 addIdentifier(); 2820 } 2821 return getIdentifier().get(0); 2822 } 2823 2824 /** 2825 * @return {@link #version} (The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2826 */ 2827 public StringType getVersionElement() { 2828 if (this.version == null) 2829 if (Configuration.errorOnAutoCreate()) 2830 throw new Error("Attempt to auto-create Questionnaire.version"); 2831 else if (Configuration.doAutoCreate()) 2832 this.version = new StringType(); // bb 2833 return this.version; 2834 } 2835 2836 public boolean hasVersionElement() { 2837 return this.version != null && !this.version.isEmpty(); 2838 } 2839 2840 public boolean hasVersion() { 2841 return this.version != null && !this.version.isEmpty(); 2842 } 2843 2844 /** 2845 * @param value {@link #version} (The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2846 */ 2847 public Questionnaire setVersionElement(StringType value) { 2848 this.version = value; 2849 return this; 2850 } 2851 2852 /** 2853 * @return The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 2854 */ 2855 public String getVersion() { 2856 return this.version == null ? null : this.version.getValue(); 2857 } 2858 2859 /** 2860 * @param value The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 2861 */ 2862 public Questionnaire setVersion(String value) { 2863 if (Utilities.noString(value)) 2864 this.version = null; 2865 else { 2866 if (this.version == null) 2867 this.version = new StringType(); 2868 this.version.setValue(value); 2869 } 2870 return this; 2871 } 2872 2873 /** 2874 * @return {@link #name} (A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2875 */ 2876 public StringType getNameElement() { 2877 if (this.name == null) 2878 if (Configuration.errorOnAutoCreate()) 2879 throw new Error("Attempt to auto-create Questionnaire.name"); 2880 else if (Configuration.doAutoCreate()) 2881 this.name = new StringType(); // bb 2882 return this.name; 2883 } 2884 2885 public boolean hasNameElement() { 2886 return this.name != null && !this.name.isEmpty(); 2887 } 2888 2889 public boolean hasName() { 2890 return this.name != null && !this.name.isEmpty(); 2891 } 2892 2893 /** 2894 * @param value {@link #name} (A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2895 */ 2896 public Questionnaire setNameElement(StringType value) { 2897 this.name = value; 2898 return this; 2899 } 2900 2901 /** 2902 * @return A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation. 2903 */ 2904 public String getName() { 2905 return this.name == null ? null : this.name.getValue(); 2906 } 2907 2908 /** 2909 * @param value A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation. 2910 */ 2911 public Questionnaire setName(String value) { 2912 if (Utilities.noString(value)) 2913 this.name = null; 2914 else { 2915 if (this.name == null) 2916 this.name = new StringType(); 2917 this.name.setValue(value); 2918 } 2919 return this; 2920 } 2921 2922 /** 2923 * @return {@link #title} (A short, descriptive, user-friendly title for the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2924 */ 2925 public StringType getTitleElement() { 2926 if (this.title == null) 2927 if (Configuration.errorOnAutoCreate()) 2928 throw new Error("Attempt to auto-create Questionnaire.title"); 2929 else if (Configuration.doAutoCreate()) 2930 this.title = new StringType(); // bb 2931 return this.title; 2932 } 2933 2934 public boolean hasTitleElement() { 2935 return this.title != null && !this.title.isEmpty(); 2936 } 2937 2938 public boolean hasTitle() { 2939 return this.title != null && !this.title.isEmpty(); 2940 } 2941 2942 /** 2943 * @param value {@link #title} (A short, descriptive, user-friendly title for the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 2944 */ 2945 public Questionnaire setTitleElement(StringType value) { 2946 this.title = value; 2947 return this; 2948 } 2949 2950 /** 2951 * @return A short, descriptive, user-friendly title for the questionnaire. 2952 */ 2953 public String getTitle() { 2954 return this.title == null ? null : this.title.getValue(); 2955 } 2956 2957 /** 2958 * @param value A short, descriptive, user-friendly title for the questionnaire. 2959 */ 2960 public Questionnaire setTitle(String value) { 2961 if (Utilities.noString(value)) 2962 this.title = null; 2963 else { 2964 if (this.title == null) 2965 this.title = new StringType(); 2966 this.title.setValue(value); 2967 } 2968 return this; 2969 } 2970 2971 /** 2972 * @return {@link #status} (The status of this questionnaire. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2973 */ 2974 public Enumeration<PublicationStatus> getStatusElement() { 2975 if (this.status == null) 2976 if (Configuration.errorOnAutoCreate()) 2977 throw new Error("Attempt to auto-create Questionnaire.status"); 2978 else if (Configuration.doAutoCreate()) 2979 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 2980 return this.status; 2981 } 2982 2983 public boolean hasStatusElement() { 2984 return this.status != null && !this.status.isEmpty(); 2985 } 2986 2987 public boolean hasStatus() { 2988 return this.status != null && !this.status.isEmpty(); 2989 } 2990 2991 /** 2992 * @param value {@link #status} (The status of this questionnaire. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2993 */ 2994 public Questionnaire setStatusElement(Enumeration<PublicationStatus> value) { 2995 this.status = value; 2996 return this; 2997 } 2998 2999 /** 3000 * @return The status of this questionnaire. Enables tracking the life-cycle of the content. 3001 */ 3002 public PublicationStatus getStatus() { 3003 return this.status == null ? null : this.status.getValue(); 3004 } 3005 3006 /** 3007 * @param value The status of this questionnaire. Enables tracking the life-cycle of the content. 3008 */ 3009 public Questionnaire setStatus(PublicationStatus value) { 3010 if (this.status == null) 3011 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 3012 this.status.setValue(value); 3013 return this; 3014 } 3015 3016 /** 3017 * @return {@link #experimental} (A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 3018 */ 3019 public BooleanType getExperimentalElement() { 3020 if (this.experimental == null) 3021 if (Configuration.errorOnAutoCreate()) 3022 throw new Error("Attempt to auto-create Questionnaire.experimental"); 3023 else if (Configuration.doAutoCreate()) 3024 this.experimental = new BooleanType(); // bb 3025 return this.experimental; 3026 } 3027 3028 public boolean hasExperimentalElement() { 3029 return this.experimental != null && !this.experimental.isEmpty(); 3030 } 3031 3032 public boolean hasExperimental() { 3033 return this.experimental != null && !this.experimental.isEmpty(); 3034 } 3035 3036 /** 3037 * @param value {@link #experimental} (A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 3038 */ 3039 public Questionnaire setExperimentalElement(BooleanType value) { 3040 this.experimental = value; 3041 return this; 3042 } 3043 3044 /** 3045 * @return A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 3046 */ 3047 public boolean getExperimental() { 3048 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 3049 } 3050 3051 /** 3052 * @param value A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 3053 */ 3054 public Questionnaire setExperimental(boolean value) { 3055 if (this.experimental == null) 3056 this.experimental = new BooleanType(); 3057 this.experimental.setValue(value); 3058 return this; 3059 } 3060 3061 /** 3062 * @return {@link #date} (The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3063 */ 3064 public DateTimeType getDateElement() { 3065 if (this.date == null) 3066 if (Configuration.errorOnAutoCreate()) 3067 throw new Error("Attempt to auto-create Questionnaire.date"); 3068 else if (Configuration.doAutoCreate()) 3069 this.date = new DateTimeType(); // bb 3070 return this.date; 3071 } 3072 3073 public boolean hasDateElement() { 3074 return this.date != null && !this.date.isEmpty(); 3075 } 3076 3077 public boolean hasDate() { 3078 return this.date != null && !this.date.isEmpty(); 3079 } 3080 3081 /** 3082 * @param value {@link #date} (The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3083 */ 3084 public Questionnaire setDateElement(DateTimeType value) { 3085 this.date = value; 3086 return this; 3087 } 3088 3089 /** 3090 * @return The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes. 3091 */ 3092 public Date getDate() { 3093 return this.date == null ? null : this.date.getValue(); 3094 } 3095 3096 /** 3097 * @param value The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes. 3098 */ 3099 public Questionnaire setDate(Date value) { 3100 if (value == null) 3101 this.date = null; 3102 else { 3103 if (this.date == null) 3104 this.date = new DateTimeType(); 3105 this.date.setValue(value); 3106 } 3107 return this; 3108 } 3109 3110 /** 3111 * @return {@link #publisher} (The name of the individual or organization that published the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 3112 */ 3113 public StringType getPublisherElement() { 3114 if (this.publisher == null) 3115 if (Configuration.errorOnAutoCreate()) 3116 throw new Error("Attempt to auto-create Questionnaire.publisher"); 3117 else if (Configuration.doAutoCreate()) 3118 this.publisher = new StringType(); // bb 3119 return this.publisher; 3120 } 3121 3122 public boolean hasPublisherElement() { 3123 return this.publisher != null && !this.publisher.isEmpty(); 3124 } 3125 3126 public boolean hasPublisher() { 3127 return this.publisher != null && !this.publisher.isEmpty(); 3128 } 3129 3130 /** 3131 * @param value {@link #publisher} (The name of the individual or organization that published the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 3132 */ 3133 public Questionnaire setPublisherElement(StringType value) { 3134 this.publisher = value; 3135 return this; 3136 } 3137 3138 /** 3139 * @return The name of the individual or organization that published the questionnaire. 3140 */ 3141 public String getPublisher() { 3142 return this.publisher == null ? null : this.publisher.getValue(); 3143 } 3144 3145 /** 3146 * @param value The name of the individual or organization that published the questionnaire. 3147 */ 3148 public Questionnaire setPublisher(String value) { 3149 if (Utilities.noString(value)) 3150 this.publisher = null; 3151 else { 3152 if (this.publisher == null) 3153 this.publisher = new StringType(); 3154 this.publisher.setValue(value); 3155 } 3156 return this; 3157 } 3158 3159 /** 3160 * @return {@link #description} (A free text natural language description of the questionnaire from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3161 */ 3162 public MarkdownType getDescriptionElement() { 3163 if (this.description == null) 3164 if (Configuration.errorOnAutoCreate()) 3165 throw new Error("Attempt to auto-create Questionnaire.description"); 3166 else if (Configuration.doAutoCreate()) 3167 this.description = new MarkdownType(); // bb 3168 return this.description; 3169 } 3170 3171 public boolean hasDescriptionElement() { 3172 return this.description != null && !this.description.isEmpty(); 3173 } 3174 3175 public boolean hasDescription() { 3176 return this.description != null && !this.description.isEmpty(); 3177 } 3178 3179 /** 3180 * @param value {@link #description} (A free text natural language description of the questionnaire from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3181 */ 3182 public Questionnaire setDescriptionElement(MarkdownType value) { 3183 this.description = value; 3184 return this; 3185 } 3186 3187 /** 3188 * @return A free text natural language description of the questionnaire from a consumer's perspective. 3189 */ 3190 public String getDescription() { 3191 return this.description == null ? null : this.description.getValue(); 3192 } 3193 3194 /** 3195 * @param value A free text natural language description of the questionnaire from a consumer's perspective. 3196 */ 3197 public Questionnaire setDescription(String value) { 3198 if (value == null) 3199 this.description = null; 3200 else { 3201 if (this.description == null) 3202 this.description = new MarkdownType(); 3203 this.description.setValue(value); 3204 } 3205 return this; 3206 } 3207 3208 /** 3209 * @return {@link #purpose} (Explaination of why this questionnaire is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 3210 */ 3211 public MarkdownType getPurposeElement() { 3212 if (this.purpose == null) 3213 if (Configuration.errorOnAutoCreate()) 3214 throw new Error("Attempt to auto-create Questionnaire.purpose"); 3215 else if (Configuration.doAutoCreate()) 3216 this.purpose = new MarkdownType(); // bb 3217 return this.purpose; 3218 } 3219 3220 public boolean hasPurposeElement() { 3221 return this.purpose != null && !this.purpose.isEmpty(); 3222 } 3223 3224 public boolean hasPurpose() { 3225 return this.purpose != null && !this.purpose.isEmpty(); 3226 } 3227 3228 /** 3229 * @param value {@link #purpose} (Explaination of why this questionnaire is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 3230 */ 3231 public Questionnaire setPurposeElement(MarkdownType value) { 3232 this.purpose = value; 3233 return this; 3234 } 3235 3236 /** 3237 * @return Explaination of why this questionnaire is needed and why it has been designed as it has. 3238 */ 3239 public String getPurpose() { 3240 return this.purpose == null ? null : this.purpose.getValue(); 3241 } 3242 3243 /** 3244 * @param value Explaination of why this questionnaire is needed and why it has been designed as it has. 3245 */ 3246 public Questionnaire setPurpose(String value) { 3247 if (value == null) 3248 this.purpose = null; 3249 else { 3250 if (this.purpose == null) 3251 this.purpose = new MarkdownType(); 3252 this.purpose.setValue(value); 3253 } 3254 return this; 3255 } 3256 3257 /** 3258 * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 3259 */ 3260 public DateType getApprovalDateElement() { 3261 if (this.approvalDate == null) 3262 if (Configuration.errorOnAutoCreate()) 3263 throw new Error("Attempt to auto-create Questionnaire.approvalDate"); 3264 else if (Configuration.doAutoCreate()) 3265 this.approvalDate = new DateType(); // bb 3266 return this.approvalDate; 3267 } 3268 3269 public boolean hasApprovalDateElement() { 3270 return this.approvalDate != null && !this.approvalDate.isEmpty(); 3271 } 3272 3273 public boolean hasApprovalDate() { 3274 return this.approvalDate != null && !this.approvalDate.isEmpty(); 3275 } 3276 3277 /** 3278 * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 3279 */ 3280 public Questionnaire setApprovalDateElement(DateType value) { 3281 this.approvalDate = value; 3282 return this; 3283 } 3284 3285 /** 3286 * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 3287 */ 3288 public Date getApprovalDate() { 3289 return this.approvalDate == null ? null : this.approvalDate.getValue(); 3290 } 3291 3292 /** 3293 * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 3294 */ 3295 public Questionnaire setApprovalDate(Date value) { 3296 if (value == null) 3297 this.approvalDate = null; 3298 else { 3299 if (this.approvalDate == null) 3300 this.approvalDate = new DateType(); 3301 this.approvalDate.setValue(value); 3302 } 3303 return this; 3304 } 3305 3306 /** 3307 * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 3308 */ 3309 public DateType getLastReviewDateElement() { 3310 if (this.lastReviewDate == null) 3311 if (Configuration.errorOnAutoCreate()) 3312 throw new Error("Attempt to auto-create Questionnaire.lastReviewDate"); 3313 else if (Configuration.doAutoCreate()) 3314 this.lastReviewDate = new DateType(); // bb 3315 return this.lastReviewDate; 3316 } 3317 3318 public boolean hasLastReviewDateElement() { 3319 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 3320 } 3321 3322 public boolean hasLastReviewDate() { 3323 return this.lastReviewDate != null && !this.lastReviewDate.isEmpty(); 3324 } 3325 3326 /** 3327 * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 3328 */ 3329 public Questionnaire setLastReviewDateElement(DateType value) { 3330 this.lastReviewDate = value; 3331 return this; 3332 } 3333 3334 /** 3335 * @return The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date. 3336 */ 3337 public Date getLastReviewDate() { 3338 return this.lastReviewDate == null ? null : this.lastReviewDate.getValue(); 3339 } 3340 3341 /** 3342 * @param value The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date. 3343 */ 3344 public Questionnaire setLastReviewDate(Date value) { 3345 if (value == null) 3346 this.lastReviewDate = null; 3347 else { 3348 if (this.lastReviewDate == null) 3349 this.lastReviewDate = new DateType(); 3350 this.lastReviewDate.setValue(value); 3351 } 3352 return this; 3353 } 3354 3355 /** 3356 * @return {@link #effectivePeriod} (The period during which the questionnaire content was or is planned to be in active use.) 3357 */ 3358 public Period getEffectivePeriod() { 3359 if (this.effectivePeriod == null) 3360 if (Configuration.errorOnAutoCreate()) 3361 throw new Error("Attempt to auto-create Questionnaire.effectivePeriod"); 3362 else if (Configuration.doAutoCreate()) 3363 this.effectivePeriod = new Period(); // cc 3364 return this.effectivePeriod; 3365 } 3366 3367 public boolean hasEffectivePeriod() { 3368 return this.effectivePeriod != null && !this.effectivePeriod.isEmpty(); 3369 } 3370 3371 /** 3372 * @param value {@link #effectivePeriod} (The period during which the questionnaire content was or is planned to be in active use.) 3373 */ 3374 public Questionnaire setEffectivePeriod(Period value) { 3375 this.effectivePeriod = value; 3376 return this; 3377 } 3378 3379 /** 3380 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances.) 3381 */ 3382 public List<UsageContext> getUseContext() { 3383 if (this.useContext == null) 3384 this.useContext = new ArrayList<UsageContext>(); 3385 return this.useContext; 3386 } 3387 3388 /** 3389 * @return Returns a reference to <code>this</code> for easy method chaining 3390 */ 3391 public Questionnaire setUseContext(List<UsageContext> theUseContext) { 3392 this.useContext = theUseContext; 3393 return this; 3394 } 3395 3396 public boolean hasUseContext() { 3397 if (this.useContext == null) 3398 return false; 3399 for (UsageContext item : this.useContext) 3400 if (!item.isEmpty()) 3401 return true; 3402 return false; 3403 } 3404 3405 public UsageContext addUseContext() { //3 3406 UsageContext t = new UsageContext(); 3407 if (this.useContext == null) 3408 this.useContext = new ArrayList<UsageContext>(); 3409 this.useContext.add(t); 3410 return t; 3411 } 3412 3413 public Questionnaire addUseContext(UsageContext t) { //3 3414 if (t == null) 3415 return this; 3416 if (this.useContext == null) 3417 this.useContext = new ArrayList<UsageContext>(); 3418 this.useContext.add(t); 3419 return this; 3420 } 3421 3422 /** 3423 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 3424 */ 3425 public UsageContext getUseContextFirstRep() { 3426 if (getUseContext().isEmpty()) { 3427 addUseContext(); 3428 } 3429 return getUseContext().get(0); 3430 } 3431 3432 /** 3433 * @return {@link #jurisdiction} (A legal or geographic region in which the questionnaire is intended to be used.) 3434 */ 3435 public List<CodeableConcept> getJurisdiction() { 3436 if (this.jurisdiction == null) 3437 this.jurisdiction = new ArrayList<CodeableConcept>(); 3438 return this.jurisdiction; 3439 } 3440 3441 /** 3442 * @return Returns a reference to <code>this</code> for easy method chaining 3443 */ 3444 public Questionnaire setJurisdiction(List<CodeableConcept> theJurisdiction) { 3445 this.jurisdiction = theJurisdiction; 3446 return this; 3447 } 3448 3449 public boolean hasJurisdiction() { 3450 if (this.jurisdiction == null) 3451 return false; 3452 for (CodeableConcept item : this.jurisdiction) 3453 if (!item.isEmpty()) 3454 return true; 3455 return false; 3456 } 3457 3458 public CodeableConcept addJurisdiction() { //3 3459 CodeableConcept t = new CodeableConcept(); 3460 if (this.jurisdiction == null) 3461 this.jurisdiction = new ArrayList<CodeableConcept>(); 3462 this.jurisdiction.add(t); 3463 return t; 3464 } 3465 3466 public Questionnaire addJurisdiction(CodeableConcept t) { //3 3467 if (t == null) 3468 return this; 3469 if (this.jurisdiction == null) 3470 this.jurisdiction = new ArrayList<CodeableConcept>(); 3471 this.jurisdiction.add(t); 3472 return this; 3473 } 3474 3475 /** 3476 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 3477 */ 3478 public CodeableConcept getJurisdictionFirstRep() { 3479 if (getJurisdiction().isEmpty()) { 3480 addJurisdiction(); 3481 } 3482 return getJurisdiction().get(0); 3483 } 3484 3485 /** 3486 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 3487 */ 3488 public List<ContactDetail> getContact() { 3489 if (this.contact == null) 3490 this.contact = new ArrayList<ContactDetail>(); 3491 return this.contact; 3492 } 3493 3494 /** 3495 * @return Returns a reference to <code>this</code> for easy method chaining 3496 */ 3497 public Questionnaire setContact(List<ContactDetail> theContact) { 3498 this.contact = theContact; 3499 return this; 3500 } 3501 3502 public boolean hasContact() { 3503 if (this.contact == null) 3504 return false; 3505 for (ContactDetail item : this.contact) 3506 if (!item.isEmpty()) 3507 return true; 3508 return false; 3509 } 3510 3511 public ContactDetail addContact() { //3 3512 ContactDetail t = new ContactDetail(); 3513 if (this.contact == null) 3514 this.contact = new ArrayList<ContactDetail>(); 3515 this.contact.add(t); 3516 return t; 3517 } 3518 3519 public Questionnaire addContact(ContactDetail t) { //3 3520 if (t == null) 3521 return this; 3522 if (this.contact == null) 3523 this.contact = new ArrayList<ContactDetail>(); 3524 this.contact.add(t); 3525 return this; 3526 } 3527 3528 /** 3529 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 3530 */ 3531 public ContactDetail getContactFirstRep() { 3532 if (getContact().isEmpty()) { 3533 addContact(); 3534 } 3535 return getContact().get(0); 3536 } 3537 3538 /** 3539 * @return {@link #copyright} (A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 3540 */ 3541 public MarkdownType getCopyrightElement() { 3542 if (this.copyright == null) 3543 if (Configuration.errorOnAutoCreate()) 3544 throw new Error("Attempt to auto-create Questionnaire.copyright"); 3545 else if (Configuration.doAutoCreate()) 3546 this.copyright = new MarkdownType(); // bb 3547 return this.copyright; 3548 } 3549 3550 public boolean hasCopyrightElement() { 3551 return this.copyright != null && !this.copyright.isEmpty(); 3552 } 3553 3554 public boolean hasCopyright() { 3555 return this.copyright != null && !this.copyright.isEmpty(); 3556 } 3557 3558 /** 3559 * @param value {@link #copyright} (A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 3560 */ 3561 public Questionnaire setCopyrightElement(MarkdownType value) { 3562 this.copyright = value; 3563 return this; 3564 } 3565 3566 /** 3567 * @return A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire. 3568 */ 3569 public String getCopyright() { 3570 return this.copyright == null ? null : this.copyright.getValue(); 3571 } 3572 3573 /** 3574 * @param value A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire. 3575 */ 3576 public Questionnaire setCopyright(String value) { 3577 if (value == null) 3578 this.copyright = null; 3579 else { 3580 if (this.copyright == null) 3581 this.copyright = new MarkdownType(); 3582 this.copyright.setValue(value); 3583 } 3584 return this; 3585 } 3586 3587 /** 3588 * @return {@link #code} (An identifier for this question or group of questions in a particular terminology such as LOINC.) 3589 */ 3590 public List<Coding> getCode() { 3591 if (this.code == null) 3592 this.code = new ArrayList<Coding>(); 3593 return this.code; 3594 } 3595 3596 /** 3597 * @return Returns a reference to <code>this</code> for easy method chaining 3598 */ 3599 public Questionnaire setCode(List<Coding> theCode) { 3600 this.code = theCode; 3601 return this; 3602 } 3603 3604 public boolean hasCode() { 3605 if (this.code == null) 3606 return false; 3607 for (Coding item : this.code) 3608 if (!item.isEmpty()) 3609 return true; 3610 return false; 3611 } 3612 3613 public Coding addCode() { //3 3614 Coding t = new Coding(); 3615 if (this.code == null) 3616 this.code = new ArrayList<Coding>(); 3617 this.code.add(t); 3618 return t; 3619 } 3620 3621 public Questionnaire addCode(Coding t) { //3 3622 if (t == null) 3623 return this; 3624 if (this.code == null) 3625 this.code = new ArrayList<Coding>(); 3626 this.code.add(t); 3627 return this; 3628 } 3629 3630 /** 3631 * @return The first repetition of repeating field {@link #code}, creating it if it does not already exist 3632 */ 3633 public Coding getCodeFirstRep() { 3634 if (getCode().isEmpty()) { 3635 addCode(); 3636 } 3637 return getCode().get(0); 3638 } 3639 3640 /** 3641 * @return {@link #subjectType} (The types of subjects that can be the subject of responses created for the questionnaire.) 3642 */ 3643 public List<CodeType> getSubjectType() { 3644 if (this.subjectType == null) 3645 this.subjectType = new ArrayList<CodeType>(); 3646 return this.subjectType; 3647 } 3648 3649 /** 3650 * @return Returns a reference to <code>this</code> for easy method chaining 3651 */ 3652 public Questionnaire setSubjectType(List<CodeType> theSubjectType) { 3653 this.subjectType = theSubjectType; 3654 return this; 3655 } 3656 3657 public boolean hasSubjectType() { 3658 if (this.subjectType == null) 3659 return false; 3660 for (CodeType item : this.subjectType) 3661 if (!item.isEmpty()) 3662 return true; 3663 return false; 3664 } 3665 3666 /** 3667 * @return {@link #subjectType} (The types of subjects that can be the subject of responses created for the questionnaire.) 3668 */ 3669 public CodeType addSubjectTypeElement() {//2 3670 CodeType t = new CodeType(); 3671 if (this.subjectType == null) 3672 this.subjectType = new ArrayList<CodeType>(); 3673 this.subjectType.add(t); 3674 return t; 3675 } 3676 3677 /** 3678 * @param value {@link #subjectType} (The types of subjects that can be the subject of responses created for the questionnaire.) 3679 */ 3680 public Questionnaire addSubjectType(String value) { //1 3681 CodeType t = new CodeType(); 3682 t.setValue(value); 3683 if (this.subjectType == null) 3684 this.subjectType = new ArrayList<CodeType>(); 3685 this.subjectType.add(t); 3686 return this; 3687 } 3688 3689 /** 3690 * @param value {@link #subjectType} (The types of subjects that can be the subject of responses created for the questionnaire.) 3691 */ 3692 public boolean hasSubjectType(String value) { 3693 if (this.subjectType == null) 3694 return false; 3695 for (CodeType v : this.subjectType) 3696 if (v.getValue().equals(value)) // code 3697 return true; 3698 return false; 3699 } 3700 3701 /** 3702 * @return {@link #item} (A particular question, question grouping or display text that is part of the questionnaire.) 3703 */ 3704 public List<QuestionnaireItemComponent> getItem() { 3705 if (this.item == null) 3706 this.item = new ArrayList<QuestionnaireItemComponent>(); 3707 return this.item; 3708 } 3709 3710 /** 3711 * @return Returns a reference to <code>this</code> for easy method chaining 3712 */ 3713 public Questionnaire setItem(List<QuestionnaireItemComponent> theItem) { 3714 this.item = theItem; 3715 return this; 3716 } 3717 3718 public boolean hasItem() { 3719 if (this.item == null) 3720 return false; 3721 for (QuestionnaireItemComponent item : this.item) 3722 if (!item.isEmpty()) 3723 return true; 3724 return false; 3725 } 3726 3727 public QuestionnaireItemComponent addItem() { //3 3728 QuestionnaireItemComponent t = new QuestionnaireItemComponent(); 3729 if (this.item == null) 3730 this.item = new ArrayList<QuestionnaireItemComponent>(); 3731 this.item.add(t); 3732 return t; 3733 } 3734 3735 public Questionnaire addItem(QuestionnaireItemComponent t) { //3 3736 if (t == null) 3737 return this; 3738 if (this.item == null) 3739 this.item = new ArrayList<QuestionnaireItemComponent>(); 3740 this.item.add(t); 3741 return this; 3742 } 3743 3744 /** 3745 * @return The first repetition of repeating field {@link #item}, creating it if it does not already exist 3746 */ 3747 public QuestionnaireItemComponent getItemFirstRep() { 3748 if (getItem().isEmpty()) { 3749 addItem(); 3750 } 3751 return getItem().get(0); 3752 } 3753 3754 protected void listChildren(List<Property> children) { 3755 super.listChildren(children); 3756 children.add(new Property("url", "uri", "An absolute URI 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. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url)); 3757 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3758 children.add(new Property("version", "string", "The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version)); 3759 children.add(new Property("name", "string", "A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name)); 3760 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the questionnaire.", 0, 1, title)); 3761 children.add(new Property("status", "code", "The status of this questionnaire. Enables tracking the life-cycle of the content.", 0, 1, status)); 3762 children.add(new Property("experimental", "boolean", "A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental)); 3763 children.add(new Property("date", "dateTime", "The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.", 0, 1, date)); 3764 children.add(new Property("publisher", "string", "The name of the individual or organization that published the questionnaire.", 0, 1, publisher)); 3765 children.add(new Property("description", "markdown", "A free text natural language description of the questionnaire from a consumer's perspective.", 0, 1, description)); 3766 children.add(new Property("purpose", "markdown", "Explaination of why this questionnaire is needed and why it has been designed as it has.", 0, 1, purpose)); 3767 children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate)); 3768 children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", 0, 1, lastReviewDate)); 3769 children.add(new Property("effectivePeriod", "Period", "The period during which the questionnaire content was or is planned to be in active use.", 0, 1, effectivePeriod)); 3770 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 3771 children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the questionnaire is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 3772 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 3773 children.add(new Property("copyright", "markdown", "A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.", 0, 1, copyright)); 3774 children.add(new Property("code", "Coding", "An identifier for this question or group of questions in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, code)); 3775 children.add(new Property("subjectType", "code", "The types of subjects that can be the subject of responses created for the questionnaire.", 0, java.lang.Integer.MAX_VALUE, subjectType)); 3776 children.add(new Property("item", "", "A particular question, question grouping or display text that is part of the questionnaire.", 0, java.lang.Integer.MAX_VALUE, item)); 3777 } 3778 3779 @Override 3780 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3781 switch (_hash) { 3782 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI 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. The URL SHOULD include the major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url); 3783 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this questionnaire when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 3784 case 351608024: /*version*/ return new Property("version", "string", "The identifier that is used to identify this version of the questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the questionnaire author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version); 3785 case 3373707: /*name*/ return new Property("name", "string", "A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name); 3786 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the questionnaire.", 0, 1, title); 3787 case -892481550: /*status*/ return new Property("status", "code", "The status of this questionnaire. Enables tracking the life-cycle of the content.", 0, 1, status); 3788 case -404562712: /*experimental*/ return new Property("experimental", "boolean", "A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental); 3789 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the questionnaire was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes.", 0, 1, date); 3790 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the individual or organization that published the questionnaire.", 0, 1, publisher); 3791 case -1724546052: /*description*/ return new Property("description", "markdown", "A free text natural language description of the questionnaire from a consumer's perspective.", 0, 1, description); 3792 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explaination of why this questionnaire is needed and why it has been designed as it has.", 0, 1, purpose); 3793 case 223539345: /*approvalDate*/ return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate); 3794 case -1687512484: /*lastReviewDate*/ return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", 0, 1, lastReviewDate); 3795 case -403934648: /*effectivePeriod*/ return new Property("effectivePeriod", "Period", "The period during which the questionnaire content was or is planned to be in active use.", 0, 1, effectivePeriod); 3796 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 3797 case -507075711: /*jurisdiction*/ return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the questionnaire is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction); 3798 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 3799 case 1522889671: /*copyright*/ return new Property("copyright", "markdown", "A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire.", 0, 1, copyright); 3800 case 3059181: /*code*/ return new Property("code", "Coding", "An identifier for this question or group of questions in a particular terminology such as LOINC.", 0, java.lang.Integer.MAX_VALUE, code); 3801 case -603200890: /*subjectType*/ return new Property("subjectType", "code", "The types of subjects that can be the subject of responses created for the questionnaire.", 0, java.lang.Integer.MAX_VALUE, subjectType); 3802 case 3242771: /*item*/ return new Property("item", "", "A particular question, question grouping or display text that is part of the questionnaire.", 0, java.lang.Integer.MAX_VALUE, item); 3803 default: return super.getNamedProperty(_hash, _name, _checkValid); 3804 } 3805 3806 } 3807 3808 @Override 3809 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3810 switch (hash) { 3811 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3812 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3813 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 3814 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3815 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 3816 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 3817 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 3818 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 3819 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 3820 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 3821 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 3822 case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType 3823 case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType 3824 case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period 3825 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 3826 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 3827 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 3828 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 3829 case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding 3830 case -603200890: /*subjectType*/ return this.subjectType == null ? new Base[0] : this.subjectType.toArray(new Base[this.subjectType.size()]); // CodeType 3831 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // QuestionnaireItemComponent 3832 default: return super.getProperty(hash, name, checkValid); 3833 } 3834 3835 } 3836 3837 @Override 3838 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3839 switch (hash) { 3840 case 116079: // url 3841 this.url = castToUri(value); // UriType 3842 return value; 3843 case -1618432855: // identifier 3844 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3845 return value; 3846 case 351608024: // version 3847 this.version = castToString(value); // StringType 3848 return value; 3849 case 3373707: // name 3850 this.name = castToString(value); // StringType 3851 return value; 3852 case 110371416: // title 3853 this.title = castToString(value); // StringType 3854 return value; 3855 case -892481550: // status 3856 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 3857 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 3858 return value; 3859 case -404562712: // experimental 3860 this.experimental = castToBoolean(value); // BooleanType 3861 return value; 3862 case 3076014: // date 3863 this.date = castToDateTime(value); // DateTimeType 3864 return value; 3865 case 1447404028: // publisher 3866 this.publisher = castToString(value); // StringType 3867 return value; 3868 case -1724546052: // description 3869 this.description = castToMarkdown(value); // MarkdownType 3870 return value; 3871 case -220463842: // purpose 3872 this.purpose = castToMarkdown(value); // MarkdownType 3873 return value; 3874 case 223539345: // approvalDate 3875 this.approvalDate = castToDate(value); // DateType 3876 return value; 3877 case -1687512484: // lastReviewDate 3878 this.lastReviewDate = castToDate(value); // DateType 3879 return value; 3880 case -403934648: // effectivePeriod 3881 this.effectivePeriod = castToPeriod(value); // Period 3882 return value; 3883 case -669707736: // useContext 3884 this.getUseContext().add(castToUsageContext(value)); // UsageContext 3885 return value; 3886 case -507075711: // jurisdiction 3887 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 3888 return value; 3889 case 951526432: // contact 3890 this.getContact().add(castToContactDetail(value)); // ContactDetail 3891 return value; 3892 case 1522889671: // copyright 3893 this.copyright = castToMarkdown(value); // MarkdownType 3894 return value; 3895 case 3059181: // code 3896 this.getCode().add(castToCoding(value)); // Coding 3897 return value; 3898 case -603200890: // subjectType 3899 this.getSubjectType().add(castToCode(value)); // CodeType 3900 return value; 3901 case 3242771: // item 3902 this.getItem().add((QuestionnaireItemComponent) value); // QuestionnaireItemComponent 3903 return value; 3904 default: return super.setProperty(hash, name, value); 3905 } 3906 3907 } 3908 3909 @Override 3910 public Base setProperty(String name, Base value) throws FHIRException { 3911 if (name.equals("url")) { 3912 this.url = castToUri(value); // UriType 3913 } else if (name.equals("identifier")) { 3914 this.getIdentifier().add(castToIdentifier(value)); 3915 } else if (name.equals("version")) { 3916 this.version = castToString(value); // StringType 3917 } else if (name.equals("name")) { 3918 this.name = castToString(value); // StringType 3919 } else if (name.equals("title")) { 3920 this.title = castToString(value); // StringType 3921 } else if (name.equals("status")) { 3922 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 3923 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 3924 } else if (name.equals("experimental")) { 3925 this.experimental = castToBoolean(value); // BooleanType 3926 } else if (name.equals("date")) { 3927 this.date = castToDateTime(value); // DateTimeType 3928 } else if (name.equals("publisher")) { 3929 this.publisher = castToString(value); // StringType 3930 } else if (name.equals("description")) { 3931 this.description = castToMarkdown(value); // MarkdownType 3932 } else if (name.equals("purpose")) { 3933 this.purpose = castToMarkdown(value); // MarkdownType 3934 } else if (name.equals("approvalDate")) { 3935 this.approvalDate = castToDate(value); // DateType 3936 } else if (name.equals("lastReviewDate")) { 3937 this.lastReviewDate = castToDate(value); // DateType 3938 } else if (name.equals("effectivePeriod")) { 3939 this.effectivePeriod = castToPeriod(value); // Period 3940 } else if (name.equals("useContext")) { 3941 this.getUseContext().add(castToUsageContext(value)); 3942 } else if (name.equals("jurisdiction")) { 3943 this.getJurisdiction().add(castToCodeableConcept(value)); 3944 } else if (name.equals("contact")) { 3945 this.getContact().add(castToContactDetail(value)); 3946 } else if (name.equals("copyright")) { 3947 this.copyright = castToMarkdown(value); // MarkdownType 3948 } else if (name.equals("code")) { 3949 this.getCode().add(castToCoding(value)); 3950 } else if (name.equals("subjectType")) { 3951 this.getSubjectType().add(castToCode(value)); 3952 } else if (name.equals("item")) { 3953 this.getItem().add((QuestionnaireItemComponent) value); 3954 } else 3955 return super.setProperty(name, value); 3956 return value; 3957 } 3958 3959 @Override 3960 public Base makeProperty(int hash, String name) throws FHIRException { 3961 switch (hash) { 3962 case 116079: return getUrlElement(); 3963 case -1618432855: return addIdentifier(); 3964 case 351608024: return getVersionElement(); 3965 case 3373707: return getNameElement(); 3966 case 110371416: return getTitleElement(); 3967 case -892481550: return getStatusElement(); 3968 case -404562712: return getExperimentalElement(); 3969 case 3076014: return getDateElement(); 3970 case 1447404028: return getPublisherElement(); 3971 case -1724546052: return getDescriptionElement(); 3972 case -220463842: return getPurposeElement(); 3973 case 223539345: return getApprovalDateElement(); 3974 case -1687512484: return getLastReviewDateElement(); 3975 case -403934648: return getEffectivePeriod(); 3976 case -669707736: return addUseContext(); 3977 case -507075711: return addJurisdiction(); 3978 case 951526432: return addContact(); 3979 case 1522889671: return getCopyrightElement(); 3980 case 3059181: return addCode(); 3981 case -603200890: return addSubjectTypeElement(); 3982 case 3242771: return addItem(); 3983 default: return super.makeProperty(hash, name); 3984 } 3985 3986 } 3987 3988 @Override 3989 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3990 switch (hash) { 3991 case 116079: /*url*/ return new String[] {"uri"}; 3992 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3993 case 351608024: /*version*/ return new String[] {"string"}; 3994 case 3373707: /*name*/ return new String[] {"string"}; 3995 case 110371416: /*title*/ return new String[] {"string"}; 3996 case -892481550: /*status*/ return new String[] {"code"}; 3997 case -404562712: /*experimental*/ return new String[] {"boolean"}; 3998 case 3076014: /*date*/ return new String[] {"dateTime"}; 3999 case 1447404028: /*publisher*/ return new String[] {"string"}; 4000 case -1724546052: /*description*/ return new String[] {"markdown"}; 4001 case -220463842: /*purpose*/ return new String[] {"markdown"}; 4002 case 223539345: /*approvalDate*/ return new String[] {"date"}; 4003 case -1687512484: /*lastReviewDate*/ return new String[] {"date"}; 4004 case -403934648: /*effectivePeriod*/ return new String[] {"Period"}; 4005 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 4006 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 4007 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 4008 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 4009 case 3059181: /*code*/ return new String[] {"Coding"}; 4010 case -603200890: /*subjectType*/ return new String[] {"code"}; 4011 case 3242771: /*item*/ return new String[] {}; 4012 default: return super.getTypesForProperty(hash, name); 4013 } 4014 4015 } 4016 4017 @Override 4018 public Base addChild(String name) throws FHIRException { 4019 if (name.equals("url")) { 4020 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.url"); 4021 } 4022 else if (name.equals("identifier")) { 4023 return addIdentifier(); 4024 } 4025 else if (name.equals("version")) { 4026 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.version"); 4027 } 4028 else if (name.equals("name")) { 4029 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.name"); 4030 } 4031 else if (name.equals("title")) { 4032 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.title"); 4033 } 4034 else if (name.equals("status")) { 4035 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.status"); 4036 } 4037 else if (name.equals("experimental")) { 4038 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.experimental"); 4039 } 4040 else if (name.equals("date")) { 4041 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.date"); 4042 } 4043 else if (name.equals("publisher")) { 4044 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.publisher"); 4045 } 4046 else if (name.equals("description")) { 4047 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.description"); 4048 } 4049 else if (name.equals("purpose")) { 4050 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.purpose"); 4051 } 4052 else if (name.equals("approvalDate")) { 4053 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.approvalDate"); 4054 } 4055 else if (name.equals("lastReviewDate")) { 4056 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.lastReviewDate"); 4057 } 4058 else if (name.equals("effectivePeriod")) { 4059 this.effectivePeriod = new Period(); 4060 return this.effectivePeriod; 4061 } 4062 else if (name.equals("useContext")) { 4063 return addUseContext(); 4064 } 4065 else if (name.equals("jurisdiction")) { 4066 return addJurisdiction(); 4067 } 4068 else if (name.equals("contact")) { 4069 return addContact(); 4070 } 4071 else if (name.equals("copyright")) { 4072 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.copyright"); 4073 } 4074 else if (name.equals("code")) { 4075 return addCode(); 4076 } 4077 else if (name.equals("subjectType")) { 4078 throw new FHIRException("Cannot call addChild on a primitive type Questionnaire.subjectType"); 4079 } 4080 else if (name.equals("item")) { 4081 return addItem(); 4082 } 4083 else 4084 return super.addChild(name); 4085 } 4086 4087 public String fhirType() { 4088 return "Questionnaire"; 4089 4090 } 4091 4092 public Questionnaire copy() { 4093 Questionnaire dst = new Questionnaire(); 4094 copyValues(dst); 4095 dst.url = url == null ? null : url.copy(); 4096 if (identifier != null) { 4097 dst.identifier = new ArrayList<Identifier>(); 4098 for (Identifier i : identifier) 4099 dst.identifier.add(i.copy()); 4100 }; 4101 dst.version = version == null ? null : version.copy(); 4102 dst.name = name == null ? null : name.copy(); 4103 dst.title = title == null ? null : title.copy(); 4104 dst.status = status == null ? null : status.copy(); 4105 dst.experimental = experimental == null ? null : experimental.copy(); 4106 dst.date = date == null ? null : date.copy(); 4107 dst.publisher = publisher == null ? null : publisher.copy(); 4108 dst.description = description == null ? null : description.copy(); 4109 dst.purpose = purpose == null ? null : purpose.copy(); 4110 dst.approvalDate = approvalDate == null ? null : approvalDate.copy(); 4111 dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy(); 4112 dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy(); 4113 if (useContext != null) { 4114 dst.useContext = new ArrayList<UsageContext>(); 4115 for (UsageContext i : useContext) 4116 dst.useContext.add(i.copy()); 4117 }; 4118 if (jurisdiction != null) { 4119 dst.jurisdiction = new ArrayList<CodeableConcept>(); 4120 for (CodeableConcept i : jurisdiction) 4121 dst.jurisdiction.add(i.copy()); 4122 }; 4123 if (contact != null) { 4124 dst.contact = new ArrayList<ContactDetail>(); 4125 for (ContactDetail i : contact) 4126 dst.contact.add(i.copy()); 4127 }; 4128 dst.copyright = copyright == null ? null : copyright.copy(); 4129 if (code != null) { 4130 dst.code = new ArrayList<Coding>(); 4131 for (Coding i : code) 4132 dst.code.add(i.copy()); 4133 }; 4134 if (subjectType != null) { 4135 dst.subjectType = new ArrayList<CodeType>(); 4136 for (CodeType i : subjectType) 4137 dst.subjectType.add(i.copy()); 4138 }; 4139 if (item != null) { 4140 dst.item = new ArrayList<QuestionnaireItemComponent>(); 4141 for (QuestionnaireItemComponent i : item) 4142 dst.item.add(i.copy()); 4143 }; 4144 return dst; 4145 } 4146 4147 protected Questionnaire typedCopy() { 4148 return copy(); 4149 } 4150 4151 @Override 4152 public boolean equalsDeep(Base other_) { 4153 if (!super.equalsDeep(other_)) 4154 return false; 4155 if (!(other_ instanceof Questionnaire)) 4156 return false; 4157 Questionnaire o = (Questionnaire) other_; 4158 return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(approvalDate, o.approvalDate, true) 4159 && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true) 4160 && compareDeep(copyright, o.copyright, true) && compareDeep(code, o.code, true) && compareDeep(subjectType, o.subjectType, true) 4161 && compareDeep(item, o.item, true); 4162 } 4163 4164 @Override 4165 public boolean equalsShallow(Base other_) { 4166 if (!super.equalsShallow(other_)) 4167 return false; 4168 if (!(other_ instanceof Questionnaire)) 4169 return false; 4170 Questionnaire o = (Questionnaire) other_; 4171 return compareValues(purpose, o.purpose, true) && compareValues(approvalDate, o.approvalDate, true) 4172 && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(copyright, o.copyright, true) 4173 && compareValues(subjectType, o.subjectType, true); 4174 } 4175 4176 public boolean isEmpty() { 4177 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, approvalDate 4178 , lastReviewDate, effectivePeriod, copyright, code, subjectType, item); 4179 } 4180 4181 @Override 4182 public ResourceType getResourceType() { 4183 return ResourceType.Questionnaire; 4184 } 4185 4186 /** 4187 * Search parameter: <b>date</b> 4188 * <p> 4189 * Description: <b>The questionnaire publication date</b><br> 4190 * Type: <b>date</b><br> 4191 * Path: <b>Questionnaire.date</b><br> 4192 * </p> 4193 */ 4194 @SearchParamDefinition(name="date", path="Questionnaire.date", description="The questionnaire publication date", type="date" ) 4195 public static final String SP_DATE = "date"; 4196 /** 4197 * <b>Fluent Client</b> search parameter constant for <b>date</b> 4198 * <p> 4199 * Description: <b>The questionnaire publication date</b><br> 4200 * Type: <b>date</b><br> 4201 * Path: <b>Questionnaire.date</b><br> 4202 * </p> 4203 */ 4204 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 4205 4206 /** 4207 * Search parameter: <b>identifier</b> 4208 * <p> 4209 * Description: <b>External identifier for the questionnaire</b><br> 4210 * Type: <b>token</b><br> 4211 * Path: <b>Questionnaire.identifier</b><br> 4212 * </p> 4213 */ 4214 @SearchParamDefinition(name="identifier", path="Questionnaire.identifier", description="External identifier for the questionnaire", type="token" ) 4215 public static final String SP_IDENTIFIER = "identifier"; 4216 /** 4217 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4218 * <p> 4219 * Description: <b>External identifier for the questionnaire</b><br> 4220 * Type: <b>token</b><br> 4221 * Path: <b>Questionnaire.identifier</b><br> 4222 * </p> 4223 */ 4224 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 4225 4226 /** 4227 * Search parameter: <b>effective</b> 4228 * <p> 4229 * Description: <b>The time during which the questionnaire is intended to be in use</b><br> 4230 * Type: <b>date</b><br> 4231 * Path: <b>Questionnaire.effectivePeriod</b><br> 4232 * </p> 4233 */ 4234 @SearchParamDefinition(name="effective", path="Questionnaire.effectivePeriod", description="The time during which the questionnaire is intended to be in use", type="date" ) 4235 public static final String SP_EFFECTIVE = "effective"; 4236 /** 4237 * <b>Fluent Client</b> search parameter constant for <b>effective</b> 4238 * <p> 4239 * Description: <b>The time during which the questionnaire is intended to be in use</b><br> 4240 * Type: <b>date</b><br> 4241 * Path: <b>Questionnaire.effectivePeriod</b><br> 4242 * </p> 4243 */ 4244 public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE); 4245 4246 /** 4247 * Search parameter: <b>code</b> 4248 * <p> 4249 * Description: <b>A code that corresponds to one of its items in the questionnaire</b><br> 4250 * Type: <b>token</b><br> 4251 * Path: <b>Questionnaire.item.code</b><br> 4252 * </p> 4253 */ 4254 @SearchParamDefinition(name="code", path="Questionnaire.item.code", description="A code that corresponds to one of its items in the questionnaire", type="token" ) 4255 public static final String SP_CODE = "code"; 4256 /** 4257 * <b>Fluent Client</b> search parameter constant for <b>code</b> 4258 * <p> 4259 * Description: <b>A code that corresponds to one of its items in the questionnaire</b><br> 4260 * Type: <b>token</b><br> 4261 * Path: <b>Questionnaire.item.code</b><br> 4262 * </p> 4263 */ 4264 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 4265 4266 /** 4267 * Search parameter: <b>jurisdiction</b> 4268 * <p> 4269 * Description: <b>Intended jurisdiction for the questionnaire</b><br> 4270 * Type: <b>token</b><br> 4271 * Path: <b>Questionnaire.jurisdiction</b><br> 4272 * </p> 4273 */ 4274 @SearchParamDefinition(name="jurisdiction", path="Questionnaire.jurisdiction", description="Intended jurisdiction for the questionnaire", type="token" ) 4275 public static final String SP_JURISDICTION = "jurisdiction"; 4276 /** 4277 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 4278 * <p> 4279 * Description: <b>Intended jurisdiction for the questionnaire</b><br> 4280 * Type: <b>token</b><br> 4281 * Path: <b>Questionnaire.jurisdiction</b><br> 4282 * </p> 4283 */ 4284 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 4285 4286 /** 4287 * Search parameter: <b>name</b> 4288 * <p> 4289 * Description: <b>Computationally friendly name of the questionnaire</b><br> 4290 * Type: <b>string</b><br> 4291 * Path: <b>Questionnaire.name</b><br> 4292 * </p> 4293 */ 4294 @SearchParamDefinition(name="name", path="Questionnaire.name", description="Computationally friendly name of the questionnaire", type="string" ) 4295 public static final String SP_NAME = "name"; 4296 /** 4297 * <b>Fluent Client</b> search parameter constant for <b>name</b> 4298 * <p> 4299 * Description: <b>Computationally friendly name of the questionnaire</b><br> 4300 * Type: <b>string</b><br> 4301 * Path: <b>Questionnaire.name</b><br> 4302 * </p> 4303 */ 4304 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 4305 4306 /** 4307 * Search parameter: <b>description</b> 4308 * <p> 4309 * Description: <b>The description of the questionnaire</b><br> 4310 * Type: <b>string</b><br> 4311 * Path: <b>Questionnaire.description</b><br> 4312 * </p> 4313 */ 4314 @SearchParamDefinition(name="description", path="Questionnaire.description", description="The description of the questionnaire", type="string" ) 4315 public static final String SP_DESCRIPTION = "description"; 4316 /** 4317 * <b>Fluent Client</b> search parameter constant for <b>description</b> 4318 * <p> 4319 * Description: <b>The description of the questionnaire</b><br> 4320 * Type: <b>string</b><br> 4321 * Path: <b>Questionnaire.description</b><br> 4322 * </p> 4323 */ 4324 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 4325 4326 /** 4327 * Search parameter: <b>publisher</b> 4328 * <p> 4329 * Description: <b>Name of the publisher of the questionnaire</b><br> 4330 * Type: <b>string</b><br> 4331 * Path: <b>Questionnaire.publisher</b><br> 4332 * </p> 4333 */ 4334 @SearchParamDefinition(name="publisher", path="Questionnaire.publisher", description="Name of the publisher of the questionnaire", type="string" ) 4335 public static final String SP_PUBLISHER = "publisher"; 4336 /** 4337 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 4338 * <p> 4339 * Description: <b>Name of the publisher of the questionnaire</b><br> 4340 * Type: <b>string</b><br> 4341 * Path: <b>Questionnaire.publisher</b><br> 4342 * </p> 4343 */ 4344 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 4345 4346 /** 4347 * Search parameter: <b>title</b> 4348 * <p> 4349 * Description: <b>The human-friendly name of the questionnaire</b><br> 4350 * Type: <b>string</b><br> 4351 * Path: <b>Questionnaire.title</b><br> 4352 * </p> 4353 */ 4354 @SearchParamDefinition(name="title", path="Questionnaire.title", description="The human-friendly name of the questionnaire", type="string" ) 4355 public static final String SP_TITLE = "title"; 4356 /** 4357 * <b>Fluent Client</b> search parameter constant for <b>title</b> 4358 * <p> 4359 * Description: <b>The human-friendly name of the questionnaire</b><br> 4360 * Type: <b>string</b><br> 4361 * Path: <b>Questionnaire.title</b><br> 4362 * </p> 4363 */ 4364 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 4365 4366 /** 4367 * Search parameter: <b>version</b> 4368 * <p> 4369 * Description: <b>The business version of the questionnaire</b><br> 4370 * Type: <b>token</b><br> 4371 * Path: <b>Questionnaire.version</b><br> 4372 * </p> 4373 */ 4374 @SearchParamDefinition(name="version", path="Questionnaire.version", description="The business version of the questionnaire", type="token" ) 4375 public static final String SP_VERSION = "version"; 4376 /** 4377 * <b>Fluent Client</b> search parameter constant for <b>version</b> 4378 * <p> 4379 * Description: <b>The business version of the questionnaire</b><br> 4380 * Type: <b>token</b><br> 4381 * Path: <b>Questionnaire.version</b><br> 4382 * </p> 4383 */ 4384 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 4385 4386 /** 4387 * Search parameter: <b>url</b> 4388 * <p> 4389 * Description: <b>The uri that identifies the questionnaire</b><br> 4390 * Type: <b>uri</b><br> 4391 * Path: <b>Questionnaire.url</b><br> 4392 * </p> 4393 */ 4394 @SearchParamDefinition(name="url", path="Questionnaire.url", description="The uri that identifies the questionnaire", type="uri" ) 4395 public static final String SP_URL = "url"; 4396 /** 4397 * <b>Fluent Client</b> search parameter constant for <b>url</b> 4398 * <p> 4399 * Description: <b>The uri that identifies the questionnaire</b><br> 4400 * Type: <b>uri</b><br> 4401 * Path: <b>Questionnaire.url</b><br> 4402 * </p> 4403 */ 4404 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 4405 4406 /** 4407 * Search parameter: <b>status</b> 4408 * <p> 4409 * Description: <b>The current status of the questionnaire</b><br> 4410 * Type: <b>token</b><br> 4411 * Path: <b>Questionnaire.status</b><br> 4412 * </p> 4413 */ 4414 @SearchParamDefinition(name="status", path="Questionnaire.status", description="The current status of the questionnaire", type="token" ) 4415 public static final String SP_STATUS = "status"; 4416 /** 4417 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4418 * <p> 4419 * Description: <b>The current status of the questionnaire</b><br> 4420 * Type: <b>token</b><br> 4421 * Path: <b>Questionnaire.status</b><br> 4422 * </p> 4423 */ 4424 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 4425 4426 4427} 4428