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

Continously switching between pages validation refresh bug #673

Closed
joiskash opened this issue Jul 24, 2021 · 2 comments · Fixed by #730
Closed

Continously switching between pages validation refresh bug #673

joiskash opened this issue Jul 24, 2021 · 2 comments · Fixed by #730
Assignees
Labels
P1 High priority issue type:bug Something isn't working

Comments

@joiskash
Copy link
Collaborator

joiskash commented Jul 24, 2021

Describe the bug
Continuously switching pages with an answer that is out of the validation limit i.e. a red ! is displayed on the text view and does not refresh.

Component
SDC library

To Reproduce
Steps to reproduce the behavior:

  1. Use the questionnaire attached in this issue
  2. Answer the questions backward.
  3. On page 5 type in a number greater than 5
  4. Then press previous until you reach page 2
  5. You will still see the validation message

Expected behavior
The validation message should be relevant to the question

Smartphone (please complete the following information):

  • Oneplus 7T Pro

Originally reported by Keith Hanna

@joiskash joiskash added the type:bug Something isn't working label Jul 24, 2021
@joiskash joiskash added this to To do in Data capture library via automation Jul 24, 2021
@joiskash
Copy link
Collaborator Author

joiskash commented Aug 12, 2021

{
    "meta": {
        "profile": [
            "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7"
        ],
        "tag": [
            {
                "code": "lformsVersion: 29.0.3"
            }
        ]
    },
    "version": "1",
    "status": "draft",
    "experimental": true,
    "publisher": "IPRD",
    "name": "Malaria net distribution",
    "title": "Malaria Net Survey",
    "resourceType": "Questionnaire",
    "item": [
        {
            "linkId": "1",
            "text": "Data Entry Part 1/4",
            "type": "group",
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Page"
                            }
                        ],
                        "text": "Page"
                    }
                }
            ],
            "item": [
                {
                    "type": "choice",
                    "code": [
                        {
                            "code": "lga-codes",
                            "display": "LGA",
                            "system": "https://www.oyo.com/codes"
                        }
                    ],
                    "extension": [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                            "valueCodeableConcept": {
                                "coding": [
                                    {
                                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                                        "code": "drop-down",
                                        "display": "Drop down"
                                    }
                                ],
                                "text": "Drop down"
                            }
                        }
                    ],
                    "required": true,
                    "linkId": "1",
                    "text": "What LGA are you performing the survey in?",
                    "answerOption": [
                        {
                            "valueCoding": {
                                "code": "oluyole",
                                "display": "OLUYOLE",
                                "system": "https://www.oyo.com/codes/lga"
                            }
                        },
                        {
                            "valueCoding": {
                                "code": "akinyele",
                                "display": "AKINYELE",
                                "system": "https://www.oyo.com/codes/lga"
                            }
                        }
                    ],
                    "item": [
                        {
                            "type": "choice",
                            "code": [],
                            "extension": [
                                {
                                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                                    "valueCodeableConcept": {
                                        "coding": [
                                            {
                                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                                "code": "drop-down",
                                                "display": "Drop down"
                                            }
                                        ],
                                        "text": "Drop down"
                                    }
                                }
                            ],
                            "required": false,
                            "linkId": "ward-akinyele",
                            "text": "What ward are you in?",
                            "enableBehavior": "all",
                            "enableWhen": [
                                {
                                    "answerCoding": {
                                        "code": "akinyele",
                                        "system": "https://www.oyo.com/codes/lga"
                                    },
                                    "question": "1",
                                    "operator": "="
                                }
                            ],
                            "answerOption": [
                                {
                                    "valueCoding": {
                                        "code": "ikereku",
                                        "display": "Ikereku",
                                        "system": "https://www.oyo.com/codes/wards"
                                    }
                                },
                                {
                                    "valueCoding": {
                                        "code": "iroko",
                                        "display": "Iroko",
                                        "system": "https://www.oyo.com/codes/wards"
                                    }
                                }
                            ],
                            "item": [
                                {
                                    "type": "choice",
                                    "code": [
                                        {
                                            "code": "ward-iroko",
                                            "display": "Net distribution Centre",
                                            "system": "https://www.oyo.com/codes"
                                        }
                                    ],
                                    "extension": [
                                        {
                                            "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                                            "valueCodeableConcept": {
                                                "coding": [
                                                    {
                                                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                                                        "code": "drop-down",
                                                        "display": "Drop down"
                                                    }
                                                ],
                                                "text": "Drop down"
                                            }
                                        }
                                    ],
                                    "required": false,
                                    "linkId": "ward-iroko",
                                    "text": "What is the Designated Net Distribution Center?",
                                    "enableWhen": [
                                        {
                                            "answerCoding": {
                                                "code": "iroko",
                                                "system": "https://www.oyo.com/codes/wards"
                                            },
                                            "question": "ward-akinyele",
                                            "operator": "="
                                        },
                                        {
                                            "answerCoding": {
                                                "code": "akinyele",
                                                "system": "https://www.oyo.com/codes/lga"
                                            },
                                            "question": "1",
                                            "operator": "="
                                        }
                                    ],
                                    "enableBehavior": "all",
                                    "answerOption": [
                                        {
                                            "valueCoding": {
                                                "code": "hla-primary-school",
                                                "display": "HLA Primary School",
                                                "system": "https://www.oyo.com/codes/distributionCenter"
                                            }
                                        },
                                        {
                                            "valueCoding": {
                                                "code": "christ-apostolic-church",
                                                "display": "Christ Apostolic Church",
                                                "system": "https://www.oyo.com/codes/distributionCenter"
                                            }
                                        }
                                    ]
                                },
                                {
                                    "type": "choice",
                                    "code": [
                                        {
                                            "code": "ward-ikereku",
                                            "display": "Net distribution Centre",
                                            "system": "https://www.oyo.com/codes"
                                        }
                                    ],
                                    "extension": [
                                        {
                                            "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                                            "valueCodeableConcept": {
                                                "coding": [
                                                    {
                                                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                                                        "code": "drop-down",
                                                        "display": "Drop down"
                                                    }
                                                ],
                                                "text": "Drop down"
                                            }
                                        }
                                    ],
                                    "required": false,
                                    "linkId": "ward-ikereku",
                                    "text": "What is the Designated Net Distribution Center?",
                                    "enableBehavior": "all",
                                    "enableWhen": [
                                        {
                                            "answerCoding": {
                                                "code": "ikereku",
                                                "system": "https://www.oyo.com/codes/wards"
                                            },
                                            "question": "ward-akinyele",
                                            "operator": "="
                                        }
                                    ],
                                    "answerOption": [
                                        {
                                            "valueCoding": {
                                                "code": "ogun-state-water-corporation",
                                                "display": "Ogun state water corporation Arakanga",
                                                "system": "https://www.oyo.com/codes/distributionCenter"
                                            }
                                        },
                                        {
                                            "valueCoding": {
                                                "code": "iberekodo-central-mosque",
                                                "display": "Iberekodo Central Mosque",
                                                "system": "https://www.oyo.com/codes/distributionCenter"
                                            }
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "type": "choice",
                            "code": [
                                {
                                    "code": "ward-oluyole",
                                    "display": "Ward oluyole",
                                    "system": "https://www.oyo.com/codes"
                                },
                                {
                                    "code": "ward-codes",
                                    "display": "Ward",
                                    "system": "https://www.oyo.com/codes"
                                }
                            ],
                            "extension": [
                                {
                                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                                    "valueCodeableConcept": {
                                        "coding": [
                                            {
                                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                                "code": "drop-down",
                                                "display": "Drop down"
                                            }
                                        ],
                                        "text": "Drop down"
                                    }
                                }
                            ],
                            "required": false,
                            "linkId": "ward-oluyole",
                            "text": "What ward are you in?",
                            "enableBehavior": "all",
                            "enableWhen": [
                                {
                                    "answerCoding": {
                                        "code": "oluyole",
                                        "system": "https://www.oyo.com/codes/lga"
                                    },
                                    "question": "1",
                                    "operator": "="
                                }
                            ],
                            "answerOption": [
                                {
                                    "valueCoding": {
                                        "code": "okanhinde",
                                        "display": "Okanhinde",
                                        "system": "https://www.oyo.com/codes/wards"
                                    }
                                },
                                {
                                    "valueCoding": {
                                        "code": "ayegun",
                                        "display": "Ayegun",
                                        "system": "https://www.oyo.com/codes/wards"
                                    }
                                }
                            ],
                            "item": [
                                {
                                    "type": "choice",
                                    "code": [
                                        {
                                            "code": "ward-okanhinde",
                                            "display": "Net distribution Centre",
                                            "system": "https://www.oyo.com/codes"
                                        }
                                    ],
                                    "extension": [
                                        {
                                            "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                                            "valueCodeableConcept": {
                                                "coding": [
                                                    {
                                                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                                                        "code": "drop-down",
                                                        "display": "Drop down"
                                                    }
                                                ],
                                                "text": "Drop down"
                                            }
                                        }
                                    ],
                                    "required": false,
                                    "linkId": "ward-okanhinde",
                                    "text": "What is the Designated Net Distribution Center?",
                                    "enableWhen": [
                                        {
                                            "answerCoding": {
                                                "code": "okanhinde",
                                                "system": "https://www.oyo.com/codes/wards"
                                            },
                                            "question": "ward-oluyole",
                                            "operator": "="
                                        },
                                        {
                                            "answerCoding": {
                                                "code": "oluyole",
                                                "system": "https://www.oyo.com/codes/lga"
                                            },
                                            "question": "1",
                                            "operator": "="
                                        }
                                    ],
                                    "enableBehavior": "all",
                                    "answerOption": [
                                        {
                                            "valueCoding": {
                                                "code": "olojuoro-school",
                                                "display": "Olojuoro Pry. Sch.",
                                                "system": "https://www.oyo.com/codes/distributionCenter"
                                            }
                                        },
                                        {
                                            "valueCoding": {
                                                "code": "agbeja-school",
                                                "display": "Agbeja N. P. Sch",
                                                "system": "https://www.oyo.com/codes/distributionCenter"
                                            }
                                        }
                                    ]
                                },
                                {
                                    "type": "choice",
                                    "code": [
                                        {
                                            "code": "ward-ayegun",
                                            "display": "Net distribution Centre",
                                            "system": "https://www.oyo.com/codes"
                                        }
                                    ],
                                    "extension": [
                                        {
                                            "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                                            "valueCodeableConcept": {
                                                "coding": [
                                                    {
                                                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                                                        "code": "drop-down",
                                                        "display": "Drop down"
                                                    }
                                                ],
                                                "text": "Drop down"
                                            }
                                        },
                                        {
                                            "url": "http://lhcforms.nlm.nih.gov/fhirExt/dataControl",
                                            "valueString": "[]"
                                        }
                                    ],
                                    "required": false,
                                    "linkId": "ward-ayegun",
                                    "text": "What is the Designated Net Distribution Center?",
                                    "enableBehavior": "all",
                                    "enableWhen": [
                                        {
                                            "answerCoding": {
                                                "code": "ayegun",
                                                "system": "https://www.oyo.com/codes/wards"
                                            },
                                            "question": "ward-oluyole",
                                            "operator": "="
                                        }
                                    ],
                                    "answerOption": [
                                        {
                                            "valueCoding": {
                                                "code": "aspen-arena",
                                                "display": "ASPEN ARENA",
                                                "system": "https://www.oyo.com/codes/distributionCenter"
                                            }
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                },
                {
                    "type": "date",
                    "code": [
                        {
                            "code": "date-codes",
                            "display": "Date",
                            "system": "https://www.oyo.com/codes"
                        }
                    ],
                    "required": true,
                    "linkId": "date-dist",
                    "text": "Planned Start Date of Net Distribution"
                }
            ]
        },
        {
            "linkId": "2",
            "text": "Data Entry Part 2/4",
            "type": "group",
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Page"
                            }
                        ],
                        "text": "Page"
                    }
                }
            ],
            "item": [
                {
                    "type": "integer",
                    "code": [],
                    "required": true,
                    "linkId": "number-of-family-members",
                    "text": "Number of family members"
                },
                {
                    "type": "string",
                    "code": [],
                    "required": true,
                    "linkId": "head-of-household",
                    "text": "Initials of the Head of the Household"
                }
            ]
        },
        {
            "linkId": "3",
            "text": "Data Entry Part 3/4",
            "type": "group",
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Page"
                            }
                        ],
                        "text": "Page"
                    }
                }
            ],
            "item": [
                {
                    "type": "boolean",
                    "code": [
                        {
                            "code": "phone-number-permission",
                            "display": "Does Head of household agree to provide phone number for healthcare use?"
                        }
                    ],
                    "required": true,
                    "linkId": "phone-number-permission",
                    "text": "Does Head of household agree to provide phone number for healthcare use?",
                    "initial": [
                        {
                            "valueBoolean": "false"
                        }
                    ]
                },
                {
                    "type": "choice",
                    "code": [
                        {
                            "code": "country-code",
                            "display": "Country code",
                            "system": "https://countrycode.com/countryCodes"
                        }
                    ],
                    "extension": [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                            "valueCodeableConcept": {
                                "coding": [
                                    {
                                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                                        "code": "drop-down",
                                        "display": "Drop down"
                                    }
                                ],
                                "text": "Drop down"
                            }
                        }
                    ],
                    "required": false,
                    "linkId": "country-code",
                    "text": "Country code",
                    "enableWhen": [
                        {
                            "answerBoolean": true,
                            "question": "phone-number-permission",
                            "operator": "="
                        }
                    ],
                    "enableBehavior": "all",
                    "answerOption": [
                        {
                            "valueCoding": {
                                "code": "+234",
                                "display": "+234 (Nigeria)",
                                "system": "https://countrycode.com/countryCodes"
                            }
                        },
                        {
                            "valueCoding": {
                                "code": "+91",
                                "display": "+91 (India)",
                                "system": "https://countrycode.com/countryCodes"
                            }
                        },
                        {
                            "valueCoding": {
                                "code": "+1",
                                "display": "+1 (USA)",
                                "system": "https://countrycode.com/countryCodes"
                            }
                        },
                        {
                            "valueCoding": {
                                "code": "+27",
                                "display": "+27 (South Africa)",
                                "system": "https://countrycode.com/countryCodes"
                            }
                        }
                    ]
                },
                {
                    "type": "string",
                    "extension": [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/regex",
                            "valueString": "[0-9]+"
                        }
                    ],
                    "code": [
                        {
                            "code": "phone-number",
                            "display": "Phone number",
                            "system": "https://countrycode.com/countryCodes"
                        }
                    ],
                    "required": false,
                    "linkId": "phone-number",
                    "text": "Phone number",
                    "enableWhen": [
                        {
                            "answerBoolean": true,
                            "question": "phone-number-permission",
                            "operator": "="
                        }
                    ],
                    "enableBehavior": "all"
                }
            ]
        },
        {
            "linkId": "4",
            "text": "Data Entry Part 4/4",
            "type": "group",
            "extension": [
                {
                    "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                    "valueCodeableConcept": {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/questionnaire-item-control",
                                "code": "page",
                                "display": "Page"
                            }
                        ],
                        "text": "Page"
                    }
                }
            ],
            "item": [
                {
                    "type": "integer",
                    "code": [
                        {
                            "code": "number-nets",
                            "display": "Number of nets",
                            "system": "https://www.oyo.com/codes"
                        }
                    ],
                    "extension": [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
                            "valueInteger": 5
                        }
                    ],
                    "required": true,
                    "linkId": "number-nets",
                    "text": "Number of nets"
                }
            ]
        }
    ]
}

@joiskash joiskash changed the title Continously switching between pages Continously switching between pages validation refresh bug Aug 12, 2021
@joiskash
Copy link
Collaborator Author

ETA 19th August 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority issue type:bug Something isn't working
Projects
Archived in project
3 participants