/
Database Seed & Reference files for configuration
Database Seed & Reference files for configuration
Overview:
Configuration of OpenLMIS to be SELV initially has two steps. From a blank slate (clean DB in current OpenLMIS schema):
- Load the database seed files.
- For convenience there is a director type loading file named seed.sql. This file is generated by running the python script generateSeed.py within the directory.
- Order of the loading is important and is determined by the sequence the files "appear" in. The naming convention 01_, 02_, 03_, etc... accomplishes this.
- Loading into the database can then be done by running:
psql open_lmis -f seed.sql
- Upload the reference files.
- Order of the loading is important and is determined by the sequence the files "appear" in. The naming convention 01_, 02_, 03_, etc... accomplishes this.
- The name of the file suggests which option in the select box on the upload screen (upload type) to select.
- Run database insert script postUpload.sql
Problem with Editing CSV in Excel:
I've had problems with editing CSV's in Excel:
- Excel does not handle unicode characters in CSV format and will not adequatly warn you about this. This will result in corruption of the CSVs and render them unable to be used.
- Excel on OS X handles line ending's poorly. It will place a carriage return at the end of the lines instead of the windows convention of a carriage return followed by a new line or the unix/linux/osx convention of a single newline character. This will render the CSVs unable to be used.
Do not use Excel to edit CSV files!!! Instead use Calc that comes as a part of the LibreOffice suite of office tools.
Notes:
- Nampula delivery zones (north and central) as well as geographic zones are part of the reference upload. We looked at removing Nampula delivery zones to keep an Admin from adding that a Nampula DZ to a field coordinator, however it broke the cross-reference with vrMIS migration which has ~20 health center visits for Nampula. Nampula visibility will be limited to admins.
- User roles, such as for field coordinators, are not part of the reference upload. At this time such an upload is unsupported by OpenLMIS (likely because the deciding point for reference uploads was based on number of items to configure and availability of CRUD screen(s)).