view · edit · sidebar · attach · print · history

<< Niklaus.20131216-fix-oddb2-csv-error | 2013 | Niklaus.20131210-oddb2xml-use-ean-if-no-pharmacode-2 >>

20131211-integrate-epha-interaction-5

Summary

  • integrate a simple interface to display the interaction from EPHA
  • Fix error in swissmedic-diff
  • Fix missing prices in oddb2xml with oddb2xml -a nonpharma -f dat

Commits

Index

---

Fix missing prices in oddb2xml with oddb2xml -a nonpharma -f dat

Zeno remarked that after running oddb2xml -a nonpharma -f dat the "LEVETIRACETAM DESITIN" products had no price in the *.dat file. The oddb_article.xml was okay. Also the were marked as invalid ('3').

Took me a while to make a similar fix for build_dat as in build_article, as I overlooked this change when first analysing the corresponding commit. No it looks good for me.

1110000000LEVETIRACETAM DESITIN 500 mg/5ml 10 Ampullen 5 ml 0000000000003000000000076806261600242
1115819035LEVETIRACETAM DESITIN Filmtabl 500 mg 100 Stk     007119009815100B010710076806206901072
1115819064LEVETIRACETAM DESITIN Filmtabl 1000 mg 100 Stk    013758017435100B010710076806206901382
1115819087LEVETIRACETAM DESITIN Lös 100 mg/ml 300 ml        004665006995100B010710076806184800242
1115819029LEVETIRACETAM DESITIN Filmtabl 500 mg 20 Stk      001373002805100B010710076806206900912
1115819070LEVETIRACETAM DESITIN Filmtabl 1000 mg 200 Stk    026589032165100B010710076806206901452
1115819041LEVETIRACETAM DESITIN Filmtabl 500 mg 200 Stk     013876017570100B010710076806206901142
1115819058LEVETIRACETAM DESITIN Filmtabl 1000 mg 30 Stk     004489006795100B010710076806206901212
1115819012LEVETIRACETAM DESITIN Filmtabl 250 mg 30 Stk      001349002780100B010710076806206900842

Pushed Output prices in *.dat for articles without a pharmacode. But shame on me, I did not prepare first a test case to fail! But time is running out for this week.

After dinner it took me just 10 minutes to push the commit Added spec for generating *.dat file

Fix error in swissmedic-diff

Today we got the following error when running our imports.

Plugin: ODDB::SwissmedicPlugin
Error: RuntimeError
Message: Data missing in
(line 19008): , , , , , , , , , ,

Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/swissmedic-diff-0.1.4/lib/swissmedic-diff.rb:297:in `block in each_valid_row'
/usr/local/lib/ruby/gems/1.9.1/gems/spreadsheet-0.9.0/lib/spreadsheet/worksheet.rb:144:in `block in each'
/usr/local/lib/ruby/gems/1.9.1/gems/spreadsheet-0.9.0/lib/spreadsheet/worksheet.rb:143:in `upto'
/usr/local/lib/ruby/gems/1.9.1/gems/spreadsheet-0.9.0/lib/spreadsheet/worksheet.rb:143:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/spreadsheet-0.9.0/lib/spreadsheet/excel/worksheet.rb:43:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/swissmedic-diff-0.1.4/lib/swissmedic-diff.rb:294:in `each_valid_row'
/usr/local/lib/ruby/gems/1.9.1/gems/swissmedic-diff-0.1.4/lib/swissmedic-diff.rb:107:in `diff'
/var/www/oddb.org/src/plugin/swissmedic.rb:62:in `update'
/var/www/oddb.org/src/util/updater.rb:393:in `block in update_swissmedic'
/var/www/oddb.org/src/util/updater.rb:495:in `call'
/var/www/oddb.org/src/util/updater.rb:495:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:391:in `update_swissmedic'
/var/www/oddb.org/src/util/updater.rb:196:in `run'
/var/www/oddb.org/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'
/var/www/oddb.org/jobs/import_daily:12:in `<module:Util>'
/var/www/oddb.org/jobs/import_daily:11:in `<module:ODDB>'
/var/www/oddb.org/jobs/import_daily:10:in `<main>'

Line 19008 is the last line of the xls file.

Had no better idea than this commit Just display unhandled line instead of raising an exception. My import_daily now passes this error, but has not yet finished.

Fixed problems running unit-tests on Travis-CI via commits

integrate a simple interface to display the interaction from EPHA

Continue work. Example is still interaction is between Marcoumar and Aspirin. Open problems are:

  • interaction_chooser should work items having more than one ATC-code
  • import of epha_interactions should collect references, too.
  • should allow direct access to results via URL

Example at matrix.epha.org is:

  • Losarten Mepha
  • Metoprolol-Teva Reta
  • Nolvadex
  • Paroxetin-Mepha

Display ATC-Code works.

interaction_chooser does not work when trying to add a medicament which has more than one ATC-Code, e.g registration('58878') "Ceftriaxon Actavis 250 mg i.". Will fix this problem later.

Begins to display informations. See . But I removed too many interactions, when trying to avoid to display interactions not between current medicament.

view · edit · sidebar · attach · print · history
Page last modified on January 06, 2014, at 10:33 AM