---
Trying to use mechanize for parsing the medregom pages. As http://www.medregom.admin.ch/ seems to work fine now, it was easy to get the correct response via mechanize for my example useage. Adapting parsing the output and making the unit test pass.
Unit-tests pass now. We don't handle multiple permissions for different cantons. Running jobs/import_regmed_doctors on oddb-ci2 and fixing the errors when trying to add a new doctor.
As the URL https://www.medregbm.admin.ch/Publikation/CreateExcelListMedizinalPersons suddenly ceased to work I changed the implementation of get_latest_file to return true, path when the daily xls is present, but the latest file is missing. Now the import starts working and tries to import 32953 doctors.
Had to restart the import after 200 entries, as I did not handle correctly some situation. Added log output for them. Okay: Problem is Nationaltät: Österreich, where the Ö does not match rubies \w
. Now already imported 294 doctors. Will look closer at the import tomorrow morning.
Now trying to implement a timeout/recovery strategy when importing the doctors or the companies.
When running jobs/import_regmed_companies it did not complete. It just stopped after 220 to 260 companies. Once with a Ruby error.
Will rework the importer adding a timeout for each import and saving the position of the last imported GLN in a file to be able to restart the import job.
As importing two GLNs worked, starting import with all doctors now.