Data Model Libraries
    Preparing search index...

    Class QuestionnaireItemEnableWhenComponent

    QuestionnaireItemEnableWhenComponent Class

    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.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    question: null | StringType

    Questionnaire.item.enableWhen.question Element

    FHIR Specification

    • Short: Question that determines whether item is enabled
    • Definition: The linkId for the question whose answer (or lack of answer) governs whether this item is enabled.
    • Comment: If multiple question occurrences are present for the same question (same linkId), then this refers to the nearest question occurrence reachable by tracing first the "ancestor" axis and then the "preceding" axis and then the "following" axis.
    • FHIR Type: string
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: false
    questionnaireEnableOperatorEnum: QuestionnaireEnableOperatorEnum

    FHIR CodeSystem: QuestionnaireEnableOperator

    operator: null | EnumCodeType

    Questionnaire.item.enableWhen.operator Element

    FHIR Specification

    • Short: exists | = | != | > | < | >= | <=
    • Definition: Specifies the criteria by which the question is enabled.
    • FHIR Type: code
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: QuestionnaireEnableOperatorEnum

    answer: null | IDataType

    Questionnaire.item.enableWhen.answer[x] Element

    @ChoiceDataTypesMeta('Questionnaire.item.enableWhen.answer[x]', ['boolean','decimal','integer','date','dateTime','time','string','Coding','Quantity','Reference',]

    FHIR Specification

    • Short: Value for question comparison based on operator
    • Definition: A value that the referenced question is tested using the specified operator in order for the item to be enabled.
    • FHIR Types: 'boolean', 'decimal', 'integer', 'date', 'dateTime', 'time', 'string', 'Coding', 'Quantity', 'Reference',
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: false

    Methods

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

      Parameters

      • sourceJson: Value

        JSON representing FHIR QuestionnaireItemEnableWhenComponent

      • OptionaloptSourceField: string

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

      Returns undefined | QuestionnaireItemEnableWhenComponent

      QuestionnaireItemEnableWhenComponent data model or undefined for QuestionnaireItemEnableWhenComponent

      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