Show/Hide Display Controls based on data

Purpose

The patient dashboard contains display controls that show specific data in sections. When the dashboard contains a lot of information, it fails to display in a single page and requires the user to scroll through the page to get to the information they want to see.

Further, these display controls show up with just the header and a blank section if there is no data to display. In order to better optimise what is displayed in the patient dashboard, we might want to display only those sections (display controls) which contain data. The other sections would not appear on the dashboard at all.

An alternative use case is that, in some implementations, the visibility of an empty section on the patient dashboard will prompt the user to record the data to be displayed in that section. Therefore, an empty display control serves as a reminder for the user to record information.

Configuration:

Add this property "hideEmptyDisplayControl" to individual display control sections in default config/openmrs/apps/ clinical/ dashboard.json 

Configuration for show/hide display control
"sectionName": { //Should be a unique name
    "translationKey": "Internationalization key or Title", //Title of the display control
    "displayType": "Full-Page | Half-Page", //Default is Half-Page
    "displayOrder": 0, // All display controls are show in the order mentioned here
    "showOnlyInPrint": true/false, //Show this display control only when printing. Default false.
    "hideEmptyDisplayControl": true/false //Show this display control only when data is available. Default false.
}