Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Custom Program Rules

The PCA currently does not support In-app creation of custom Program Rules, meaning that the standard Program Rules management in the DHIS2 Maintenance App is required for this. However, the custom Program Rules are displayed in the PCA as described in the Checking Existing Program Rules page.

Please Note: A Program Rules creation feature is being planned for a future release of the PCA.

H2 Program Rules Generated by the PCA

If the HNQIS2 Metadata Package has been installed in the server, the PCA will enable the H2 features. These features allow the creation and modification of H2 Programs, enabling access to other features like the Import/Export of Excel Templates, and the Set Up of H2 Logic and Analytics (see Image 1).

The Excel Template is the main way to define Program Logic in H2 Assessments, allowing for easy configuration of Parent Questions (Hide/Show logic), label creation, scoring calculations, and
much more (see Image 2). You can check how to use the Excel Template here.

After importing the Excel Template with the desired changes, the Program Rules can be generated by using the Set Up Program button.

Please Note:

The Set Up Program button is only enabled after changes are Validated and Saved.

Keep in mind that this button also generates Program Indicators and Analytics used in H2 Programs.

The PCA will automatically generate all the necessary Program Rules and Program Rules Variables to implement the specified logic and the scoring calculations used by the Assessment.

Executing this process again will delete all Previously generated Program Rules and Program Rule Variables to create new ones.

Your custom Program Rules and Program Rule Variables will not be deleted.


Parent Logic - Hide/Show Rules

A Parent Question displays more questions if a specific answer is given, this means that some questions can be hidden from the Assessment until the Parent Question has one specific value. This is useful for displaying questions related to another question, for example:

  • Is the test result positive? (Parent Question - Yes/No)

    • If yes, Was the necessary medication administered? (Show if answer is Yes)

    • If no, Are the test results recent? (Show if answer is No)

Hide/Show Rules are generated by the PCA when the Parent Question and Answer Value columns are configured (see Image 2). This translates into Program rules named using the following structure:

PR - Show/Hide - Show when Question is Answer

The resulting Program Rules in DHIS2 will follow the previous naming convention (see Image 3). The rules generated by the PCA are tagged as Scripted in the configurations so the App is able to differentiate custom and automated Program Rules (see Image 4).

Please avoid adding the text _Scripted to the Description field of your Custom Program Rules, otherwise, the PCA will delete these when generating new Program Rules.

The logic of these Program Rules is “Inverted” due to the fact that DHIS2 can only Hide Questions. This means that if the Rule is “Show Questions when Answer is 1”, the logic would be “Hide Questions when Answer is not 1” (see Images 5 and 6).

H2 Mandatory questions (when hidden)

When a question is hidden by a program rule, you cannot use the standard ‘mandatory’ control at the program stage. Instead, there is the need of having an extra program rule to only make it mandatory when shown. The PCA automatically generates these extra rules. The rules are named following the following convention:

Show example here

H2 Score Program Rules

Critical Score

Non Critical Score

Overall Score

Compositive Scores (dynamic)

Program Variables

In H2 programs where PCA automatically generate the necessary program rules described above, it also generates associated Program Variable. Those variables are named as xxxxx

screenshot showing a couple of program variables generated by PCA h2 case

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.