jobs/update_migel_products_with_report ran, but produced no attachement. Why?
The method check_item is no longer available. Must it be replaced or can we trust the answers from SwissIndex?
Now the CSV gets produced but does not contain the GTIN of each product. Comparing old items like
010101001,1624501,,AMEDA Einhandmilchpumpe mit Flexishield,Nufer Medical AG,,32.30,43.70,1,43.70,,,,,
with new ones like
010101001,1624501,7612479001117,AMEDA Einhandmilchpumpe mit Flexishield,Nufer Medical AG ,,32.30,43.70,1,43.70,1 Stk,A,,2010-07-09T00:00:00+00:00,DE
Where did we loose the GTIN? I must enable accessing the RefdataArticle from the SwissindexMigel. Working on downloading the XML files only once.
We should parse the whole AipsDownload_latest.xml and check whether all FI/PIs are up to date. It looks that we don't parse them correctly.
As an another problem it looks like swissmedicinfo.ch started "publishing" English only FI for some drugs as PDFs only and without any correct XML tags for authNrs. E.g.
grep -B3 "authNrs>00000" AipsDownload_latest.xml <title>BCG VACCINE SSI</title> <authHolder>Statens Serum Institut</authHolder> <substances>Mycobacterium bovis BCG</substances> <authNrs>00000</authNrs> -- <title>DIGIFAB® DIGOXIN IMMUNE FAB (OVINE)</title> <authHolder>BTG International Inc.</authHolder> <atcCode> </atcCode> <authNrs>00000</authNrs> -- <title>Erythrozytenkonzentrat (EK) leukozytendepletiert, in additiver Lösung</title> <authHolder>Blutspendedienst SRK Bern AG</authHolder> <substances>-</substances> <authNrs>00000</authNrs> -- <medicalInformation type="fi" version="1" lang="de" safetyRelevant="false" informationUpdate="07.2010"> <title>FACTOR X P BEHRING</title> <authHolder>CSL Behring AG</authHolder> <authNrs>00000</authNrs> -- <medicalInformation type="fi" version="1" lang="de" safetyRelevant="false" informationUpdate="07.2012"> <title>SUCCICAPTAL 200 mg, Hartkapseln</title> <authHolder>OrPha Swiss GmbH</authHolder> <authNrs>00000</authNrs> -- <title>BCG VACCINE SSI</title> <authHolder>Statens Serum Institut</authHolder> <substances>Mycobacterium bovis BCG</substances> <authNrs>00000</authNrs> -- <title>Concentré érythrocytaire (CE) déplété en leucocytes, en solution additive</title> <authHolder>Blutspendedienst SRK Bern AG</authHolder> <substances>-</substances> <authNrs>00000</authNrs> -- <title>DIGIFAB® DIGOXIN IMMUNE FAB (OVINE)</title> <authHolder>BTG International Inc.</authHolder> <atcCode> </atcCode> <authNrs>00000</authNrs> -- <medicalInformation type="fi" version="1" lang="fr" safetyRelevant="false" informationUpdate="07.2010"> <title>FACTOR X P BEHRING</title> <authHolder>CSL Behring AG</authHolder> <authNrs>00000</authNrs> -- <medicalInformation type="fi" version="1" lang="fr" safetyRelevant="false" informationUpdate="07.2012"> <title>SUCCICAPTAL 200 mg, Gélules</title> <authHolder>OrPha Swiss GmbH</authHolder> <authNrs>00000</authNrs>
Plugin: ODDB::TextInfoPlugin Error: NoMethodError Message: undefined method `collect' for "+":String Backtrace: /var/www/oddb.org/src/model/registration_observer.rb:36:in `iksnrs' /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/view/rss/fachinfo.rb:38:in `item_to_html' /var/www/oddb.org/src/view/rss/fachinfo.rb:89:in `block (2 levels) in to_html' /var/www/oddb.org/src/view/rss/fachinfo.rb:83:in `each' /var/www/oddb.org/src/view/rss/fachinfo.rb:83:in `block in to_html' /usr/local/lib/ruby/1.9.1/rss/maker/base.rb:438:in `make' /usr/local/lib/ruby/1.9.1/rss/maker/base.rb:402:in `make' /usr/local/lib/ruby/1.9.1/rss/maker.rb:9:in `make' /var/www/oddb.org/src/view/rss/fachinfo.rb:74:in `to_html' /var/www/oddb.org/src/plugin/plugin.rb:91:in `block (2 levels) in update_rss_feeds' /var/www/oddb.org/src/plugin/plugin.rb:90:in `open' /var/www/oddb.org/src/plugin/plugin.rb:90:in `block in update_rss_feeds' /var/www/oddb.org/src/plugin/plugin.rb:49:in `call' /var/www/oddb.org/src/plugin/plugin.rb:49:in `block in l10n_sessions' /var/www/oddb.org/src/plugin/plugin.rb:46:in `each_key' /var/www/oddb.org/src/plugin/plugin.rb:46:in `l10n_sessions' /var/www/oddb.org/src/plugin/plugin.rb:82:in `update_rss_feeds' /var/www/oddb.org/src/plugin/plugin.rb:77:in `block in update_yearly_fachinfo_feeds' /var/www/oddb.org/src/plugin/plugin.rb:76:in `each' /var/www/oddb.org/src/plugin/plugin.rb:76:in `update_yearly_fachinfo_feeds' /var/www/oddb.org/src/plugin/text_info.rb:121:in `postprocess' /var/www/oddb.org/src/plugin/text_info.rb:1490:in `import_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:573:in `block in update_notify_simple' /var/www/oddb.org/src/util/updater.rb:549:in `call' /var/www/oddb.org/src/util/updater.rb:549:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:567:in `update_notify_simple' /var/www/oddb.org/src/util/updater.rb:344:in `update_textinfo_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:198:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `call' /var/www/oddb.org/src/util/job.rb:40:in `run' jobs/import_daily:12:in `<module:Util>' jobs/import_daily:11:in `<module:ODDB>' jobs/import_daily:10:in `<main>'
Work-Around is to catch NoMethodError, too. Fixed with commit Rescue NoMethodError when updating RSS fachinfo
Fix was wrong (got wrongly inspired by Java exceptions where you use '|' whereas Ruby separtes exceptions via ','. Therefore added also a unit test. Pushed commit Rescue NoMethodError when updating RSS fachinfo. With unit test