Import Data - MedHackOpen/HospitalPriceSpider GitHub Wiki
Database related endpoints
To test these endpoints you must have mysql running in your local server on port
127.0.0.1, with username root, and password not set (edit later for user custom values)
also make sure you have the database by name as defined in database key in ./database/config/config.json
in our case database_development for dev env.
##And head to the api endpoints to test and import data
./api/update-script
updates the database tables with the field structure(s) defined in the models folder
./api/update/institutions-from-local-spreadsheet
This endpoint should create new or patch institutions
table with data from a locally stored spreadsheet.(in our rawXlsxs folder)
NOTE: run this request only once, updating the table on a second request removes some required data(@TODO fix)
. /api/update/load-data-from-local-csv
, this endpoint should load data from csv files into procedures database
see README.md in the rawCSVs folder on how to process the files. To avoid running into database memory error as of current implementation, move 5 files out of the processed folder and run the request, once success, move them elsewhere
and get more files(5 or more depending on your database memory) out of the processed folder.
If you prefer to load data from a google spreadsheet, head here ( Config google drive api ) first before going to the below endpoint
./api/update/institutions-from-online-spreadsheet
, this endpoint should get data from a google
spreadsheet and create or patch the institution table with the related items from the data
For developers see .nodejsModule/index.js in root dir for endpoint and maybe helpful comments