Data Model Libraries
    Preparing search index...

    QuestionnaireItemComponent Class

    FHIR Specification

    • Short: Questions and sections within the Questionnaire
    • Definition: A particular question, question grouping or display text that is part of the questionnaire.
    • Comment: The content of the questionnaire is constructed from an ordered, hierarchical collection of items.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    parse getLinkIdElement setLinkIdElement hasLinkIdElement getLinkId setLinkId hasLinkId getDefinitionElement setDefinitionElement hasDefinitionElement getDefinition setDefinition hasDefinition getCode setCode addCode hasCode getPrefixElement setPrefixElement hasPrefixElement getPrefix setPrefix hasPrefix getTextElement setTextElement hasTextElement getText setText hasText getTypeEnumType setTypeEnumType hasTypeEnumType getTypeElement setTypeElement hasTypeElement getType setType hasType getEnableWhen setEnableWhen addEnableWhen hasEnableWhen getEnableBehaviorEnumType setEnableBehaviorEnumType hasEnableBehaviorEnumType getEnableBehaviorElement setEnableBehaviorElement hasEnableBehaviorElement getEnableBehavior setEnableBehavior hasEnableBehavior getRequiredElement setRequiredElement hasRequiredElement getRequired setRequired hasRequired getRepeatsElement setRepeatsElement hasRepeatsElement getRepeats setRepeats hasRepeats getReadOnlyElement setReadOnlyElement hasReadOnlyElement getReadOnly setReadOnly hasReadOnly getMaxLengthElement setMaxLengthElement hasMaxLengthElement getMaxLength setMaxLength hasMaxLength getAnswerValueSetElement setAnswerValueSetElement hasAnswerValueSetElement getAnswerValueSet setAnswerValueSet hasAnswerValueSet getAnswerOption setAnswerOption addAnswerOption hasAnswerOption getInitial setInitial addInitial hasInitial getItem setItem addItem hasItem fhirType isEmpty isRequiredFieldsEmpty copy toJSON getModifierExtension setModifierExtension hasModifierExtension getModifierExtensionByUrl addModifierExtension removeModifierExtension getId setId hasId getExtension setExtension hasExtension getExtensionByUrl addExtension removeExtension isResource isDataType isComplexDataType isPrimitive isBooleanPrimitive isStringPrimitive isNumberPrimitive isBigIntPrimitive isDateTimePrimitive copyValues initCode initEnableWhen initAnswerOption initInitial initItem

    Constructors

    Properties

    linkId: null | StringType

    Questionnaire.item.linkId Element

    FHIR Specification

    • Short: Unique id for item in questionnaire
    • Definition: An identifier that is unique within the Questionnaire allowing linkage to the equivalent item in a QuestionnaireResponse resource.
    • Comment: This ''can'' be a meaningful identifier (e.g. a LOINC code) but is not intended to have any meaning. GUIDs or sequential numbers are appropriate here.
    • Requirements: QuestionnaireResponse does not require omitted items to be included and may have some items that repeat, so linkage based on position alone is not sufficient.
    • FHIR Type: string
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: false
    definition?: UriType

    Questionnaire.item.definition Element

    FHIR Specification

    • Short: ElementDefinition - details for the item
    • Definition: This element is a URI that refers to an ElementDefinition that provides information about this item, including information that might otherwise be included in the instance of the Questionnaire resource. A detailed description of the construction of the URI is shown in Comments, below. If this element is present then the following element values MAY be derived from the Element Definition if the corresponding elements of this Questionnaire resource instance have no value: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * answerValueSet (ElementDefinition.binding) * options (ElementDefinition.binding).
    • Comment: The uri refers to an ElementDefinition in a StructureDefinition and always starts with the canonical URL for the target resource. When referring to a StructureDefinition, a fragment identifier is used to specify the element definition by its id Element.id. E.g. http://hl7.org/fhir/StructureDefinition/Observation#Observation.value[x]. In the absence of a fragment identifier, the first/root element definition in the target is the matching element definition.
    • Requirements: A common pattern is to define a set of data elements and then build multiple questionnaires for different circumstances to gather the data. This element provides traceability to the common definition and allows the content for the question to come from the underlying definition.
    • FHIR Type: uri
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    code?: Coding[]

    Questionnaire.item.code Element

    FHIR Specification

    • Short: Corresponding concept for this item in a terminology
    • Definition: A terminology code that corresponds to this group or question (e.g. a code from LOINC, which defines many questions and answers).
    • Comment: The value may come from the ElementDefinition referred to by .definition.
    • Requirements: Allows linking of groups of questions to formal terminologies.
    • FHIR Type: Coding
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false
    prefix?: StringType

    Questionnaire.item.prefix Element

    FHIR Specification

    • Short: E.g. "1(a)", "2.5.3"
    • Definition: 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.
    • Comment: These are generally unique within a questionnaire, though this is not guaranteed. Some questionnaires may have multiple questions with the same label with logic to control which gets exposed. Typically, these won't be used for "display" items, though such use is not prohibited. Systems SHOULD NOT generate their own prefixes if prefixes are defined for any items within a Questionnaire.
    • Requirements: Separating the label from the question text allows improved rendering. Also, instructions will often refer to specific prefixes, so there's a need for the questionnaire design to have control over what labels are used.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    text?: StringType

    Questionnaire.item.text Element

    FHIR Specification

    • Short: Primary text for the item
    • Definition: The name of a section, the text of a question or text content for a display item.
    • Comment: When using this element to represent the name of a section, use group type item and also make sure to limit the text element to a short string suitable for display as a section heading. Group item instructions should be included as a display type item within the group.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    itemTypeEnum: ItemTypeEnum

    FHIR CodeSystem: ItemType

    type_: null | EnumCodeType

    Questionnaire.item.type Element

    FHIR Specification

    • Short: group | display | boolean | decimal | integer | date | dateTime +
    • Definition: 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.).
    • Comment: Additional constraints on the type of answer can be conveyed by extensions. The value may come from the ElementDefinition referred to by .definition.
    • Requirements: Defines the format in which the user is to be prompted for the answer.
    • FHIR Type: code
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: ItemTypeEnum

    Questionnaire.item.enableWhen Element

    FHIR Specification

    • Short: Only allow data when
    • Definition: A constraint indicating that this item should only be enabled (displayed/allow answers to be captured) when the specified condition is true.
    • Comment: If multiple repetitions of this extension are present, the item should be enabled when the condition for any of the repetitions is true. I.e. treat "enableWhen"s as being joined by an "or" clause. This element is a modifier because if enableWhen is present for an item, "required" is ignored unless one of the enableWhen conditions is met. When an item is disabled, all of its descendants are disabled, regardless of what their own enableWhen logic might evaluate to.
    • Requirements: Allows questionnaires to adapt based on answers to other questions. E.g. If physical gender is specified as a male, no need to capture pregnancy history. Also allows conditional display of instructions or groups of questions.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: true
    • isModifierReason: If enableWhen is present and the condition evaluates to false, then the Questionnaire behaves as though the elements weren't actually present
    • isSummary: false
    questionnaireEnableBehaviorEnum: QuestionnaireEnableBehaviorEnum

    FHIR CodeSystem: QuestionnaireEnableBehavior

    enableBehavior?: EnumCodeType

    Questionnaire.item.enableBehavior Element

    FHIR Specification

    • Short: all | any
    • Definition: Controls how multiple enableWhen values are interpreted - whether all or any must be true.
    • Comment: This element must be specified if more than one enableWhen value is provided.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: QuestionnaireEnableBehaviorEnum

    required?: BooleanType

    Questionnaire.item.required Element

    FHIR Specification

    • Short: Whether the item must be included in data results
    • Definition: 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.
    • Comment: Questionnaire.item.required only has meaning for elements that are conditionally enabled with enableWhen if the condition evaluates to true. If an item that contains other items is marked as required, that does not automatically make the contained elements required (though required groups must contain at least one child element). The value may come from the ElementDefinition referred to by .definition.
    • FHIR Type: boolean
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    repeats?: BooleanType

    Questionnaire.item.repeats Element

    FHIR Specification

    • Short: Whether the item may repeat
    • Definition: An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.
    • Comment: If a question is marked as repeats=true, then multiple answers can be provided for the question in the corresponding QuestionnaireResponse. When rendering the questionnaire, it is up to the rendering software whether to render the question text for each answer repetition (i.e. "repeat the question") or to simply allow entry/selection of multiple answers for the question (repeat the answers). Which is most appropriate visually may depend on the type of answer as well as whether there are nested items. The resulting QuestionnaireResponse will be populated the same way regardless of rendering - one 'question' item with multiple answer values. The value may come from the ElementDefinition referred to by .definition.
    • Requirements: Items may be used to create set of (related) questions that can be repeated to give multiple answers to such a set.
    • FHIR Type: boolean
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    readOnly?: BooleanType

    Questionnaire.item.readOnly Element

    FHIR Specification

    • Short: Don't allow human editing
    • Definition: An indication, when true, that the value cannot be changed by a human respondent to the Questionnaire.
    • Comment: The value of readOnly elements can be established by asserting extensions for defaultValues, linkages that support pre-population and/or extensions that support calculation based on other answers.
    • Requirements: Allows certain information to be phrased (and rendered) as a question and an answer, while keeping users from changing it. May also be useful for preventing changes to pre-populated portions of a questionnaire, for calculated values, etc.
    • FHIR Type: boolean
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    maxLength?: IntegerType

    Questionnaire.item.maxLength Element

    FHIR Specification

    • Short: No more than this many characters
    • Definition: The maximum number of characters that are permitted in the answer to be considered a "valid" QuestionnaireResponse.
    • Comment: For base64binary, reflects the number of characters representing the encoded data, not the number of bytes of the binary data. The value may come from the ElementDefinition referred to by .definition.
    • FHIR Type: integer
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    answerValueSet?: CanonicalType

    Questionnaire.item.answerValueSet Element

    FHIR Specification

    • Short: Valueset containing permitted answers
    • Definition: A reference to a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question.
    • Comment: LOINC defines many useful value sets for questionnaire responses. See LOINC Answer Lists. The value may come from the ElementDefinition referred to by .definition.
    • FHIR Type: canonical
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    Questionnaire.item.answerOption Element

    FHIR Specification

    • Short: Permitted answer
    • Definition: One of the permitted answers for a "choice" or "open-choice" question.
    • Comment: This element can be used when the value set machinery of answerValueSet is deemed too cumbersome or when there's a need to capture possible answers that are not codes.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false

    Questionnaire.item.initial Element

    FHIR Specification

    • Short: Initial value(s) when item is first rendered
    • Definition: One or more values that should be pre-populated in the answer when initially rendering the questionnaire for user input.
    • Comment: The user is allowed to change the value and override the default (unless marked as read-only). If the user doesn't change the value, then this initial value will be persisted when the QuestionnaireResponse is initially created. Note that initial values can influence results. The data type of initial[x] must agree with the item.type, and only repeating items can have more then one initial value.
    • Requirements: In some workflows, having defaults saves time.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false

    Questionnaire.item.item Element

    FHIR Specification

    • Short: Nested questionnaire items
    • Definition: Text, questions and other groups to be nested beneath a question or group.
    • Comment: There is no specified limit to the depth of nesting. However, Questionnaire authors are encouraged to consider the impact on the user and user interface of overly deep nesting.
    • Requirements: Reports can consist of complex nested groups.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false

    Methods

    • Parse the provided QuestionnaireItemComponent JSON to instantiate the QuestionnaireItemComponent data model.

      Parameters

      • sourceJson: Value

        JSON representing FHIR QuestionnaireItemComponent

      • OptionaloptSourceField: string

        Optional data source field (e.g. <complexTypeName>.<complexTypeFieldName>); defaults to QuestionnaireItemComponent

      Returns undefined | QuestionnaireItemComponent

      QuestionnaireItemComponent data model or undefined for QuestionnaireItemComponent

      JsonError if the provided JSON is not a valid JSON object

    • Determines if the modifierExtension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the modifierExtension property exists and has any values.

      AssertionError for invalid url

    • Returns undefined | string

      the id property value

    • Assigns the provided value to the id property.

      Parameters

      • value: undefined | string

        the id value

      Returns this

      this

      PrimitiveTypeError for invalid value

    • Returns boolean

      true if id exists and has a value; false otherwise

    • Determines if the extension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Determines if the extension property exists.

      Parameters

      • url: string

        the url that identifies a specific Extension

      Returns undefined | IExtension

      an Extension having the provided url

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Adds the provided Extension to the extension property array.

      Parameters

      • extension: undefined | IExtension

        the Extension value to add to the extension property array

      Returns this

      this

    • Removes the Extension having the provided url from the extension property array.

      Parameters

      • url: string

        the url that identifies a specific Extension to remove

      Returns void

      AssertionError for invalid url

    • Returns boolean

      true if the instance is a FHIR complex or primitive datatype; false otherwise