Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of contents:

Table of Contents

Info

Best Practice:

Once a Program has been tested and is considered fully functioning, we recommend you make a backup copy of the Program.

Info

Editing Programs:

Equally, if you are making changes or updates to an existing Program, you are strongly recommended to make a backup copy prior to making any changes.

Please note that a Backup only includes the metadata, it does not include the Sharing settings or the actual data.

Child pages (Children Display)

To create or restore a Backup, you need to be logged in to DHIS2 and on the Program Config App Home Screen (List of programs).

To access the Backup menu,click the (1) Three Dots on the right-hand side of the relevant Program to open the dropdown menu, next click on (2) Backup/Restore and select the relevant option for the

...

pop-up menu, as shown below.

...

Export JSON Metadata

Clicking in the export JSON Metadata, the following modal should be displayed:

...

Info

By default, the JSON Customization feature will be disabled. To activate JSON customization, simply toggle the switch.

Tracker programs:

The Target Server Offers Two Options for Tracker Programs:

Current Server: This option automatically selects the required settings for exporting JSON Metadata, ensuring seamless and accurate import into the current server.

Another Server: Opting for this choice automatically configures the JSON Metadata export for accurate utilization on an external server. It's important to note that the following options remain unselected:

  • Remove Sharing Settings

  • Remove all "Created By" and "Last Updated By" Fields

  • Remove Organization Units

  • Remove all "Date," "Last Updated," and "Created" Fields

HNQIS2 programs:

The Target Server Offers Three Options for HNQIS2 Programs:

Current Server: This option automatically selects the required settings for exporting JSON Metadata, ensuring seamless and accurate import into the current server.

Another Server: Opting for this choice automatically configures the JSON Metadata export for accurate utilization on an external server. It's important to note that the following options are selected:

  • Remove Sharing Settings

  • Remove all "Created By" and "Last Updated By" Fields

  • Remove Organization Units

  • Remove all "Date," "Last Updated," and "Created" Fields

HNQIS2-Enabled Server: This option automatically configures the JSON Metadata export for the enabled server. It's important to note that the following options are selected:

  • Remove Sharing Settings

  • Remove all "Created By" and "Last Updated By" Fields

  • Remove Organization Units

  • Remove every field related to “Categories”

  • Remove all "Date," "Last Updated," and "Created" Fields

  • Remove Legend Sets

JSON Customization:

To activate JSON customization, simply toggle the switch.

...

JSON File Objects

...

The JSON File object includes the following checkboxes, selecting a file object enabling the JSON attributes for the object:

  • Date: Refers to the specific date or time associated with an event or data entry.

  • Category Option Combo: Represents a combination of category options, used to classify and organize program data.

  • Category: A grouping mechanism for data elements, often representing a dimension like age groups or genders.

  • Data Element: Represents a piece of information being collected or reported, such as a specific health indicator.

  • Category Combo: A collection of category options, allowing for more complex data categorization.

  • Program Stage: Represents a distinct phase or step within a program, often reflecting a specific activity or event.

  • Tracked Entity Type: Defines the type of entity being tracked, such as patients or individuals.

  • Program Stage Data Element: Specifies the data elements used within a particular program stage.

  • Program Tracked Entity Attribute: Represents additional attributes associated with the tracked entity in a program.

  • Program: Refers to a specific health or data management program designed to capture and manage data.

  • Category Option: Represents specific values within a category, providing further context to data elements.

  • Tracked Entity Attribute: Additional attributes associated with tracked entities, contributing to a more comprehensive profile.

  • Program Section: Organizes program-related elements and data within a structured section.

  • Legend Set: Defines how data values are visually represented in charts, graphs, or maps.

  • Option Set: Defines a predefined set of options that can be chosen for a specific data element.

  • Option: A specific value within an option set, allowing for standardized data selection

Note

Should an object remain unselected, the corresponding section within JSON attributes for that object will be displayed as disabled.

JSON Attributes Settings

...

You can use the downloaded JSON to import into any other DHIS2 server using the standard Import/Export DHIS2 app, Metadata Import option.

Info

When moving from development to staging or production, we recommend you use the Export JSON option.

Read more about DHIS2 import/export app: metadata import.

Backup (in-server)

With the PCA you can create snapshots of your configurations as you progress in your implementation. These metadata backups include all the related objects (prog Stages, Sections, DEs, Option Set, Prgr Rules, Prg Indicators, Prg Variables) in your program, but do not include the sharing or the data itself.

In the popup, the ‘Backup Name’ and ‘Version’ are automatically generated for you, you can change these are required, however we recommend using the auto-generated name/version.

...

You can also provide more details in the ‘Comments’ section for future reference.

Info

Please note, all the fields marked with ( * ) are mandatory fields.

After providing all the required information, you can save the Program backup by clicking on ‘Save Backup’ button. A notification on the top centre of the screen will appear notifying you ‘The backup for the selected Program has been created successfully.’

You can also close the popup by simply clicking on the ‘Close’ button but it won’t create or save any backup.

Info

Feel free to create as many backups as needed. The Backup name (with the timestamp) and Version will be helpful to differentiate your backups.

Restoring Backups

Once the programs are backed up, You can restore them if anything went wrong with your program. From the Program menu, you can select ‘Backup / Restore’ option to open a submenu and select ‘Restore Program’ option to open ‘Available Backup’ popup.

...

If the program has previous backups, you can see a list of those backups in this popup. But if there isn’t any previous backup, then it will show a warning message with ‘No Backups found’ message.

...

In this popup, you can notice two action buttons on the right of each backup.

Restore: This option will open another ‘Restoring’ popup window.

Download: This option will download the specific backup version of that program. You can review the file json file and import it using ‘import / export’ app in DHIS2.

Close: As the name suggest, will close the popup window without affecting anything.

Restoring Program

This popup will allow you to fine tune your requirement for the restoring purpose.

...

Restore Elements: You can choose which object you want to restore from the backup file. You can simply restore Program if your changes were specific to the Program and you can also chose the ‘Data Elements’ which in turn will also restore ‘Program Stage Data Elements’, ‘Program Stages’ and ‘Program’. The indentation shows the Parent-Child relationship between the elements. You cannot restore ‘Child’ without restoring the ‘Parent’.

Select All / Select None: You can use these buttons to check all the Elements or None of them.

Organisation Units: While restoring, you can keep your current Organisation Unit assignment by selecting ‘Keep current settings’ or you can replace all you existing configuration with backup assignment by selecting ‘Overwrite with backed up configuration’.

Sharing Settings: Similar to Organisation Units restore, you can either keep the settings or overwrite them by selecting one of the two option available.

Cancel: As the name suggest, will simply close the popup window without impacting the program.

Dry Run: It will test the import settings without impacting / importing any data.

...

After running the dry run, it will show how many elements will be created or impacted. In above example 291 elements will be impacted, but the number will vary based on the Program you want to restore and Elements you have selected.

Note

Please run ‘Dry Run’ before Restoring the program

Restore: After selecting all the required option and running dry run, you can click ‘Restore’ button to restore the backed up copy of the program. It will take sometime to restore and will show a Success notification once completed.

Previous

Home

...