This is a basic guide for exporting data from the neo tree postgres database to the DHIS2 System.
This guide is a basic guide tailor made for specific neo tree scripts and a specific DHIS2 dataset. Efforts to create a generic component are underway.
- git clone https://github.com/neotree/dhis-integration.git
- Add a .env file and add all configurations that are referenced in /config/dev
- cd neotree-dhis2-integration
- npm install
- npm run start
You can change the scheduled intervals in the file /helper/cronJob.js by adding a function that syncs at the expected interval or adjust the time of an existing function: The Cron Format is Minutes Hour Day Month Year , where ALL is represented by * FOR EXAMPLE: 30 06 * * * means that the syncing will happen at 6:30am every day, every month, every year.
- Running DHIS2 System
- Running Neotree Mobile App through which you can Export to JsonAPI
- Have the relevant Scripts with referenced ScriptIds on the Neotree Mobile App
- Connection to the postgres Dbase to which your Data is being exported