Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies when using the skipping pages and review functionality #1677

Closed
KhumboLihonga opened this issue Oct 19, 2022 · 2 comments · Fixed by #1684
Closed

Inconsistencies when using the skipping pages and review functionality #1677

KhumboLihonga opened this issue Oct 19, 2022 · 2 comments · Fixed by #1684
Assignees
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working

Comments

@KhumboLihonga
Copy link

Describe the bug
When using the skipping pages functionality together with the review functionality, there are inconsistencies occurring.

In this specific case, there is a questionnaire with multiple pages that are hidden by default. To enable the pages, a Boolean item needs to be answered. If the answer is 'no', then none of the remaining pages are enabled and the user proceeds to the review page. If the answer is 'yes', then the remaining pages are enabled and the user needs to go through those before seeing the review page.

However, when the answer is 'yes', the review button remains and the user cannot proceed to the newly enabled pages. As a workaround, the user needs to tap the review button then tap edit button to return to the previous page where the next button is now available. Videos have been attached in the screenshots section to demonstrate this.

Component
SDC Library

To Reproduce
N/A

Expected behavior
I expect that when 'yes' is selected, the 'review' button changes to a 'next' button and allows the user to proceed to the newly enabled pages.

Screenshots
As per the above example, this is what happens when no is selected:
https://user-images.githubusercontent.com/90775548/196679194-79d51e6c-bf72-4dc2-9b93-3d7ab22c2bdf.mp4

As per the above example, this is what happens when yes is selected:
https://user-images.githubusercontent.com/90775548/196679514-12fb0b08-9d8d-456c-a63d-a74d2948548e.mp4

Smartphone (please complete the following information):

  • Device: Samsung A12
  • Android version: 11
  • Build number: RP1A.200720.012.A127FXXU4AUK1
  • Version: 30

Additional context
We are implementing this using FHIR Core. The review page was implemented in this PR.

Here is the questionnaire being used in the video:

"item": [
        {
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Page 1"
                            }
                        ],
                        "text": "Page 1"
                    }
                }
            ],
            "linkId": "page-1",
            "type": "group",
            "item": [
                {
                    "linkId": "ict-consent-explanation",
                    "text": "We would like to offer HIV counselling and testing services to your loved ones or anyone in your social circle who is at risk of having HIV. Making sure your loved ones have access to HIV testing is a way for you to help keep them safe and healthy. By knowing their status, if they are HIV-positive they can access treatment and care early, and for those who are negative, they can access prevention services so they remain negative. There are different ways we can assist you to invite your loved ones (sexual partners, family members or any anyone who you consider to be at risk of having HIV) for counseling and HIV testing services. Is it possible for me to explain to you different ways we can assist you to help your loved ones access testing here or in the community? This process is completely voluntary. You can choose to decline at any point during our conversation.",
                    "type": "display"
                }
            ]
        },
        {
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Consent Given"
                            }
                        ],
                        "text": "Consent Given"
                    }
                }
            ],
            "linkId": "consent-page",
            "text": "<h1>ICT Information and Consent</h1>",
            "type": "group",
            "item": [
                {
                    "linkId": "ict-consent",
                    "text": "<b>ASK:</b> Do you give consent to conduct ICT?",
                    "type": "boolean",
                    "required": true
                }
            ]
        },
        {
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Clients Contacts"
                            }
                        ],
                        "text": "Clients Contacts"
                    }
                }
            ],
            "linkId": "client-Contacts-page",
            "text": "<h1>Referral Methods and Contact Identification</h1>",
            "type": "group",
            "enableWhen": [
                {
                    "question": "ict-consent",
                    "operator": "=",
                    "answerBoolean": true
                }
            ],
            "enableBehavior": "all",
            "item": [
                {
                    "linkId": "explain-client",
                    "text": "<b>EXPLAIN</b> to the client that we have 4 referral approches which include the following: You inform your contact to come for testing within 2 weeks. If the contact does not come, CHW will follow up with your contact directly With your consent, a CHW will directly follow up with the contact now A CHW will sit with you and your contact and together provides support to your contact Alternatively, we can give you an FRS to give each of your contacts inviting them to come for health services.",
                    "type": "display"
                },
                {
                    "linkId": "share-hiv-info-contacts",
                    "text": "<b>ASK:</b> Is it ok with you if we talk about HIV testing for each of your children, spouse and anyone in your social circle?",
                    "type": "boolean",
                    "required": true
                },
                {
                    "linkId": "contact-type",
                    "text": "Who are the client's contacts?",
                    "type": "choice",
                    "enableWhen": [
                        {
                            "question": "share-hiv-info-contacts",
                            "operator": "=",
                            "answerBoolean": true
                        }
                    ],
                    "enableBehavior": "all",
                    "required": true,
                    "repeats": true,
                    "answerOption": [
                        {
                            "valueCoding": {
                                "code": "child-contacts",
                                "display": "Child Contacts"
                            }
                        },
                        {
                            "valueCoding": {
                                "code": "sexual-contacts",
                                "display": "Sexual Contacts"
                            }
                        },
                        {
                            "extension": [
                                {
                                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive",
                                    "valueBoolean": true
                                }
                            ],
                            "valueCoding": {
                                "code": "no-contacts",
                                "display": "No Contacts"
                            }
                        }
                    ]
                }
            ]
        },
        {
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Child Contacts"
                            }
                        ],
                        "text": "Child Contacts"
                    }
                }
            ],
            "linkId": "child-contacts-page",
            "text": "<h1>Child Contacts</h1>",
            "type": "group",
            "enableWhen": [
                {
                    "question": "ict-consent",
                    "operator": "=",
                    "answerBoolean": true
                },
                {
                    "question": "contact-type",
                    "operator": "=",
                    "answerCoding": {
                        "code": "child-contacts",
                        "display": "Child Contacts"
                    }
                }
            ],
            "enableBehavior": "all",
            "item": [
                {
                    "linkId": "child-contacts-age-range-info",
                    "text": "<b>TELL</b> the client that child contacts are persons who are 0 - 19 years old",
                    "type": "display"
                },
                {
                    "linkId": "child-contacts-count",
                    "text": "<b>ENTER</b> the number of child contacts the client has",
                    "type": "integer",
                    "required": true
                },
                {
                    "extension": [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
                            "valueInteger": 10
                        }
                    ],
                    "linkId": "child-contacts-count-untested",
                    "text": "<b>ENTER</b> the number of child contacts that have NOT been tested for HIV",
                    "type": "integer",
                    "required": true
                },
                {
                    "linkId": "finish-child-contacts-registration",
                    "text": "Register the Child Contacts in the Child Contacts Registration task after saving.",
                    "type": "display"
                }
            ]
        },
        {
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Sexual Contacts"
                            }
                        ],
                        "text": "Sexual Contacts"
                    }
                }
            ],
            "linkId": "page-sexual-contacts",
            "text": "<h1>Sexual Contacts</h1>",
            "type": "group",
            "enableWhen": [
                {
                    "question": "ict-consent",
                    "operator": "=",
                    "answerBoolean": true
                },
                {
                    "question": "contact-type",
                    "operator": "=",
                    "answerCoding": {
                        "code": "sexual-contacts",
                        "display": "Sexual Contacts"
                    }
                }
            ],
            "enableBehavior": "all",
            "item": [
                {
                    "linkId": "sexual-contacts-count",
                    "text": "<b>ENTER</b> the number of sexual contacts the client has",
                    "type": "integer",
                    "required": true
                },
                {
                    "extension": [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
                            "valueInteger": 10
                        }
                    ],
                    "linkId": "sexual-contacts-count-untested",
                    "text": "<b>ENTER</b> the number of sexual contacts that have NOT been tested for HIV",
                    "type": "integer",
                    "required": true
                },
                {
                    "linkId": "finish-sexual-contact-registration",
                    "text": "Register the Sexual Contacts in the Sexual Contacts Registration task after saving [Add this task to the task list when saving]",
                    "type": "display"
                }
            ]
        }
    ]
@jingtang10 jingtang10 added the type:bug Something isn't working label Oct 19, 2022
@jingtang10 jingtang10 added P1 High priority issue effort:small Small effort - 2 days labels Oct 19, 2022
@jingtang10
Copy link
Collaborator

thanks for filing this @KhumboLihonga. i think the correct behaviour here should be that once the user clicks yes, the review button should be changed to next button.

@jingtang10
Copy link
Collaborator

@omarismail94 will take a look at this. thanks omar!

ktarasenko pushed a commit to ktarasenko/android-fhir that referenced this issue Nov 7, 2022
ktarasenko pushed a commit to ktarasenko/android-fhir that referenced this issue Nov 14, 2022
ktarasenko added a commit that referenced this issue Nov 23, 2022
* Add Implementation guide management library module

* Crashed Fixed in Quantity Input Widget (#1673)

* Crashed Fixed in Quantity Input Widget

* reverted unwanted changes

* Spotless check applied

* remove clear answer from factory

Co-authored-by: omarismail <omarismail@google.com>

* Fix review comments

* Updated code to set the radio button in a radio group using radio groups check api instead of radio button apis (#1691)

* Bump up SDC version to beta06 (#1694)

* Follow up code health fixes of PR 1442 (#1631)

* WIP PR feedback

* spotless ran

* added test cases for validation util

* used fhirpathengine instance from fhir path expression evaluator

* updated test cases name and convention

* updated test cases name and their convention to look consistent

Co-authored-by: Jing Tang <jingtang@google.com>

* Disable leniency in DateFormat lib when converting date (#1687)

* Fix Issue #1638: disable lenient check

* add espresso test

* add more tests per date field changed

* Regenerate docs after SDC version bump (#1696)

* Documentation Update : Changed the folder structure and did some other minor add-ons (#1662)

* Create CODE_OF_CONDUCT.md

* Delete CODE_OF_CONDUCT.md

* Create Contributing.md

* Delete contributing.md

* Update README.md

* Update README.md

Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com>

* Catlog app- Info grey box added in Calculated expression screen Behavior (#1679)

* Scroll down the recyclerview to show the Add answer button. (#1666)

* Scroll down the recyclerview to show the Add answer button.

* Address review comments.

* Address review comments.

* Add flaky flag to retry

* update gcloud components as well

* remove version flag

Co-authored-by: Santosh Pingle <spingle@google.com>
Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com>
Co-authored-by: omarismail <omarismail@google.com>

* Enable "Next button" on paginated view when nested answer is chosen (#1684)

Fix Issue  #1677

* Add trailing line break.

* Update buildSrc/src/main/kotlin/Releases.kt

Co-authored-by: Jing Tang <jingtang@google.com>

Co-authored-by: PallaviGanorkar <ganorkar@google.com>
Co-authored-by: omarismail <omarismail@google.com>
Co-authored-by: aditya-07 <adityakhajuria@google.com>
Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com>
Co-authored-by: aurangzaibumer <35099184+aurangzaibumer@users.noreply.github.com>
Co-authored-by: Jing Tang <jingtang@google.com>
Co-authored-by: Vanshaj Poonia <74147463+VanshajPoonia@users.noreply.github.com>
Co-authored-by: santosh-pingle <86107848+santosh-pingle@users.noreply.github.com>
Co-authored-by: Santosh Pingle <spingle@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

4 participants