Must add:
How do we store best the information. Into separate @evidentia_search_links in oddb_app?
Implementing a solution where the file is read each time the application is starting. Delay is negligable.
Creating a unit test.
Zeno specified, that this file will be under data/csv and that the import is started only manually.
Import works, but storing into oddb gives the error uninitialized constant OddbPrevalence::EvidentiaSearchLink
when calling evidentia_search_link('7680651540068')
in bin/admin. Fixed by using fully qualified name ODDB::EvidentiaSearchLink. Now bin/admin works fine
ch.oddb> evidentia_search_link('7680651540068') -> 7680651540068 http://evidentia.ch/neurologie/medical-fact-sheets/Levetiracetam-Desitin Levetiracetam Desitin® ch.oddb> evidentia_search_link('7680651540068').gtin -> 7680651540068 ch.oddb> evidentia_search_link('7680651540068').link -> http://evidentia.ch/neurologie/medical-fact-sheets/Levetiracetam-Desitin ch.oddb> evidentia_search_link('7680651540068').trademark -> Levetiracetam Desitin®
Creates email on import with either number of imported itemslike
2016-08-02 17:56:26 +0200 Added 19 search_links from /var/www/oddb.org/data/csv/evidentia_fi_link.csv
or complains about missing csv like
File /var/www/oddb.org/data/csv/evidentia_fi_link.csv does not exist
Pushed commit Add import_evidentia_fi_search_links