Notes of Pierre's Location Uploading Scripts: Aug 29
Combo of python and sql
Step 0: prepping geojson file
Major step 1: SQL compilation of geojsons into hierarchy and assigning ids for OpenSRP
PGAdmin - web-based tool that can connect to a postgres server
- could also go into Reveal warehouse
- this process could also be a superset tool
Pull all files in to tables (rawfiles)
Organization unit table - need to get geojson table into this
- two views
- hierarchy view from self join
- table view where each row is a location
OpenSRP id is created in here
Major step 2: Python adds locations to OpenMRS and links to OpenSRP
Python script looks at hierarchy and then creates the heirarchy in openMRS, generates openMRS ID
mspray_location_id = Reveal ID = OpenSRP ID → linked to OpenMRS
Evaluation
Can pull the table back out of OpenSRP into SQL so you can compare geojson
This will also be helpful when changing/editing locations, you just need to send the query with the OpenSRP
Working on doing the same out of OpenMRS
*Long term goal to compare 3 tables - OpenSRP, OpenMRS, and original geojson to establish what errors there might be in location creation
Q: How do we handle updating of hierarchies with this process?
Send geojsons
This site is no longer maintained. Please visit docs.opensrp.io for current documentation.