EyeSeeTea / dhis2-android-capture-app-psi-fork

PSI fork of official UiO Android app (blessed repository)
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

[2.7.1] Critical tab in Feedback module does not show mandatory questions (configured by rule actions) #26

Open nancyespinoza opened 2 years ago

nancyespinoza commented 2 years ago

Current Behavior If a question is marked as compulsory using a program rule action, the feedback module does not locate the question in the Critical tab (locates it in the Non Critical one)

Short term fix Locate mandatory questions in the critical tab if they have the mandatory status configured in the server or by a program rule action.

Long term fix Use the attribute "HNQIS2 Metadata" to identify if the question should be located in the Critical or Non-Critical tab. {"isCompulsory":"Yes","isCritical":"Yes","elemType":"question"}

@rodmelia

Test

  1. Use any play.dhis2.org/xxxxx server and import the json files in here.
  2. Follow the steps in the video.
rodmelia commented 2 years ago

Long term fix = 2.5.1

nancyespinoza commented 1 year ago

2.7.1.1 Test

Questions aren't located on the correct tab.

To Replicate https://staging.psi-mis.org/ User: MWdemo1 Password: Malawidemo1!

  1. Open an assessment from [HNQIS2] MW HNQIS Family Planning Short-Acting and Permanent Methods
  2. Open the feedback tab
  3. Check the critical tab (it will be empty)
  4. Check the non-critical tab (All the questions are there)

Data element example: https://staging.psi-mis.org/dhis-web-maintenance/index.html#/edit/dataElementSection/dataElement/bAc6BDcsRSK

In Android

image image image
ifoche commented 1 year ago

@nancyespinoza it looks like the issue is with the attribute that we recognize to make a question critial. The attribute is recognized by its code.

Formerly, the critical questions were associated to mandatory questions, but that changed into an attribute. The attribute seems to be this one: https://staging.psi-mis.org/api/attributes/haUflNqP85K

But the problem is that we are looking for "HNQIS2 Metadata" and not for "PCA Metadata" as you can read in that attribute code. It seems like it is not the only attribute that has changed its code, so before changing the attributes codes we search for... could you please confirm that we have to change the code we look for? If so, could you please provide a list of the attributes and codes we need to change?

Thank you!

nancyespinoza commented 1 year ago

@ifoche I'll ask the team and provide the list shortly. Thanks.

nancyespinoza commented 1 year ago

Hi! This is the list used by the team:

Attributes • OptionFactor: DVzuBdj9kli - code: OF • FeedbackOrder: LP171jpctBm - code: FeedbackOrder • FeedbackText: yhKEe6BLEer - code: FeedbackText • Program Type: yB5tFAAN7bI - code: PROGRAM_TYPE • PCA Metadata: haUflNqP85K - code: PCA Metadata

TEI Attributes (without code) • HNQIS - Health Area: Xe5hUu6KkUT • HNQIS - Global Score: NQdpdST0Gcx • HNQIS - Organisation Unit: nHg1hGgtJwm • HNQIS - Assessment Date: UlUYUyZJ6o9 • HNQIS - Competency Class: ulU9KKgSLYe