Form Configuration in OpenSRP Web: User Guide
Table of Contents
Purpose of this document3document
Acronyms3Acronyms
Definitions3Definitions
Background4Background
Login to the OpenSRP server4server
Upload forms & any related files5files
Go to the drafts page to makes a release8release
Sync & use the form on the mobile client.9
(Infrequent) Upload JSON validator files10files
Form Authoring Links12Links
Purpose of this document
This document provides end-user instructions on using the form configuration work on OpenSRP web. These instructions will generally apply to all the OpenSRP web instances, however, the user will need to swap out the OpenSRP web URL with the one for their specific implementation.
Acronyms
Acronym | Description |
YAML | YAML (a recursive acronym for "YAML Ain't Markup Language") is a human-readable data-serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. |
JSON | JavaScript Object Notation |
Definitions
Term | Description |
Manifest Release | This is a bundle of all the files uploaded together. It is used by the client application to know when new file/form bundles are available. |
JSON Validator | This is a json file with the following spec. This file is used during validation when a form is being uploaded. It mainly stores the keys of all the widgets or keys that cannot be removed for a specific file/form. |
Draft Files | These are all the files that have been uploaded to the server but have not been bundled into a release yet. |
Rules Files | These are YAML files that hold relevance, calculation, or constraint rules for specific widgets in native forms. |
Subforms | These are extra JSON files/forms apart from the primary native form JSON forms that are used to display more questions in popups. |
Property Files | These are .properties files used to enable multi-language support in native forms. |
Background
OpenSRP uses JSON forms to dynamically create native Android forms during the OpenSRP client apps runtime. These forms are used to collect data in OpenSRP. Due to the increase in OpenSRP client apps adoption, there was a need to make these JSON forms dynamic. This means that after an app release, clients could easily update the forms to add or remove widgets/questions on the JSON forms.
...
Go to the server URL for your project, e.g: https://web.reveal-stage.smartregister.org, and click on the button labelled OpenSRP, then enter your username and password. Contact your project administrator for login details, if necessary.
...
Upload New File: - On clicking this button you will be taken to the new file upload page discussed above on point 2
Download: - Click this to download and view the draft file.
Make release: - Click this to make a bundled up release of all the files currently listed as draft files.
...
This user guide does not cover the topic of form authoring. OpenSRP uses a JSON form standard, which is documented in the form library on GitHub. We also have the ability to test forms before you upload them through an APK.
Reveal Form JSON Folder - Each form is represented as a file. Note that country specific forms are prefixed with the country name.
Reveal Calculation and Relevance Logic - This folder contains all of the relevance rules and calculations for all forms in Reveal. These filenames are associated with the form names found in the JSON folder.