opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
50 stars 41 forks source link

Add a free text box to a questionnaire if a check box has been selected #3091

Closed AngelaKabari closed 5 months ago

AngelaKabari commented 5 months ago

Describe the feature request. We have a questionnaire that has a question with several check box options. If an answer choice is checked, then we would like a free response text box to appear below the checkbox option so that the provider can capture further information about the choice that has been selected.

Additional context

SPI Checkbox

In the screenshot above, if an answer choice is checked, a free response text box titled "Take detailed history" should show up under that choice (e.g., if “Taking pills” is checked, then a free text box emerges right under the choice) to allow the provider to capture details on the nature and quantity of the pills, how frequently, etc

Acceptance criteria

Area path A list of ordered steps in the app on usage of the feature to support anyone testing it e.g. Code reviewer, QA e.g.

  1. Login to the Columbia Engage App
  2. Open a patient profile
  3. For the IPC Module
  4. For the SPI Module
    • Click on the SPI: Safety Planning Intervention module
    • Click on sub-form 4 SPI: Psychoeducation and Safety Planning Intervention
    • When you get to (Step 6A: Making the environment safe), when an answer choice is checked, a text box should appear below that specific checkbox option.

Implementation plan (For Engineers) The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed. i.e. Describe how you intend to solve the problem

pld commented 5 months ago

Let's look into options without a product change before we work on this.

FikriMilano commented 5 months ago

@pld the other option is: To have textboxes shown or hidden using skip logic, depending on which answer options the user picks.

E.g. if "Taking pills" was selected, then show a textbox below the whole checkboxes, as a separate Questionnaire Item (not directly below that selected checkbox, which is what the ticket trying to do).

pld commented 5 months ago

Ah right I see, what we split these up into a different question for each option? Then we could have a different hidden text box show per question directly below it

FikriMilano commented 5 months ago

@pld yeah I'm fine w that.

~@AngelaKabari could you try to convince the client about this?~ EDIT: NVM this shouldn't look that different compared to what the client want initially, the margins between options might be different a bit

AngelaKabari commented 5 months ago

I agree @FikriMilano - as long as the UI doesn't look very different then I don't think we would need to convince the client.