Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-23788

Dynamic control of options like enableWhen to filter answerOptions in the Questionnaire

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • STU3
    • FHIR Infrastructure
    • Questionnaire
    • Hide

      Will add two new extensions:

      One on answerValueSet that defines an expression that resolves to the value set URL to use based on other answers

      The second will be a complex extension with two parts. The first will list the options to be enabled or disabled. The second will be the expression that determines whether the options should be enabled or disabled. (If the expression evaluates to true, the options will be available for selection, if false, the options won't be available.) Will include a usage note indicating that the options listed within the extensions should not overlap. I.e. a given option should be controlled by at most one expression. Any options not controlled by an expression are enabled all the time.

      <extension url="foo">
      <extension url="option">
      <valueCoding>
      <code=..../>
      </valueCoding>
      </extension>
      <extension url="expression">
      <valueString value="some expression..."/>
      </extension>
      </extension>

      Show
      Will add two new extensions: One on answerValueSet that defines an expression that resolves to the value set URL to use based on other answers The second will be a complex extension with two parts. The first will list the options to be enabled or disabled. The second will be the expression that determines whether the options should be enabled or disabled. (If the expression evaluates to true, the options will be available for selection, if false, the options won't be available.) Will include a usage note indicating that the options listed within the extensions should not overlap. I.e. a given option should be controlled by at most one expression. Any options not controlled by an expression are enabled all the time. <extension url="foo"> <extension url="option"> <valueCoding> <code=..../> </valueCoding> </extension> <extension url="expression"> <valueString value="some expression..."/> </extension> </extension>
    • Brian Postlethwaite/Don Langlois: 7-0-0
    • Enhancement
    • Compatible, substantive
    • R5

    Description

      Hi,

      We are developing a questionnaire using the HL7 FHIR standard. However, we have not found a way to include response options that depends on a condition.

      For example, in the question below the option "pregnancy" should only show if the patient is female:

      1) Do you have any of the conditions below?
      [ ] Pregnancy (condition: only show if patient is female)
      [x] Diabetes
      [x] Hypertension
      [ ] Asthma

      Another example:

      2) Have you been treated for the diseases below?
      [x] Diabetes (condition: only show if answer to question 1 contains diabetes)
      [x] Hypertension (condition: only show if answer to question 1 contains hypertension)
      [ ] Asthma

      We discussed in the FHIR community about it. And we talked about creating a change request.
      The topic url in the community is http://community.fhir.org/t/how-to-use-something-like-enablewhen-to-filter-answeroptions-in-the-questionnaire/1489/3.


      Thank you!

      Attachments

        Activity

          People

            Unassigned Unassigned
            tiago.santos Tiago Silva
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: