Versions Compared

Key

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

This page has documentation about User Configurable Views used in the TB Reach application.

Child Pages


User configurable views will be defined by using JSON objects saved in the OpenSRP couchdb database. They will be fetched by clients(phone or tablet) after configuring the OpenSRP base URL. OpenSRP server has a REST endpoint that the clients will use to sync views to the client. 

...

By Default a view configuration file may have the below attributes

PropertyDatatypeMandatoryShould be updatedDescription
_idString*NoCouchDB Internal document ID used to differentiate different documents within CouchDB
_revString*NoCouchDB Internal document revision number used to differentiate different  revisions of the same documents within CouchDB. Dont amend this manually
typeString*NoCouchDB Internal document type used to differentiate different documents types within CouchDB. This should always be ViewConfiguration
identifierString*NoThis uniquely identifies this document. This will be used on the client to identify that this document if for a particular screen. This should not be amended
serverVersionlong*YesA long number denoting the unix timestamp when the document was updated/created. Its used for versioning by clients. Whenever a document is amended this property should be incremented to the current timestamp so that clients notice the document has changed and they can sync it.
metadataObject
YesThis will be an object that defines configuration at view level. It must have an attribute type that defines the type of configuration being defined.
viewsList of View Objects
YesThis will be populated for screens with configurable view components. It contains a list of view objects. The view object is described below.
labelsMap(Key value pairs)
YesThis will be populated for language configuration files. It will have a key value pairs of labels where the key will be identical in all language files but the value will be different for each language.