view · edit · sidebar · attach · print · history

< Niklaus.20160120-fix-migel-missing-ean13 | Index | Niklaus.20160118-price-search-without-interaction >>

20160118-parse-all-fi-aipsdownloads

Summary

  • migel: jobs/update_migel_products_with_report did not attach products
  • fachinfos not present in ODDB.org (e.g. 00675 "Pro-Symbioflor")
  • Another NoMethodError while updating RSS feed in import_daily

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search
  • Remove parser for minifi (but keep the minifi)

migel: jobs/update_migel_products_with_report did not attach product

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.

fachinfos not present in ODDB.org (e.g. 00675 "Pro-Symbioflor")

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>

Another NoMethodError while updating RSS feed in import_daily

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

view · edit · sidebar · attach · print · history
Page last modified on January 19, 2016, at 04:11 PM