view · edit · sidebar · attach · print · history

Index>

20150706-swissmedic-oddb-org

Summary

  • Adapt oddb.org import swissmedic to changed format of Packungen-xlsx

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.
  • Display new fields (LABEL, MORE_INFO, CORRESP) for compositions in oddb.org.
  • Use refdatabase for oddb.org, too.
  • Fix running rspec for new packungen.xlsx in oddb2xml

Adapt oddb.org import swissmedic to changed format of Packungen-xlsx

Must fix the error

Plugin: ODDB::SwissmedicPlugin
Error: ArgumentError
Message: wrong number of arguments (5 for 3)
Backtrace:
/var/www/oddb.org/src/plugin/swissmedic.rb:444:in `rows_diff'
/usr/local/lib/ruby/gems/1.9.1/gems/swissmedic-diff-0.2.0/lib/swissmedic-diff.rb:179:in `block in diff'
/usr/local/lib/ruby/gems/1.9.1/gems/swissmedic-diff-0.2.0/lib/swissmedic-diff.rb:397:in `block in each_valid_row'
/usr/local/lib/ruby/gems/1.9.1/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `block in each'
/usr/local/lib/ruby/gems/1.9.1/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/swissmedic-diff-0.2.0/lib/swissmedic-diff.rb:384:in `each_valid_row'
/usr/local/lib/ruby/gems/1.9.1/gems/swissmedic-diff-0.2.0/lib/swissmedic-diff.rb:153:in `diff'
/var/www/oddb.org/src/plugin/swissmedic.rb:72:in `update'
/var/www/oddb.org/src/util/updater.rb:445:in `block in update_swissmedic'
/var/www/oddb.org/src/util/updater.rb:550:in `call'
/var/www/oddb.org/src/util/updater.rb:550:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:443:in `update_swissmedic'
/var/www/oddb.org/src/util/updater.rb:202: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>'

Could adapt the test/test_plugin/swissmedic.rb to return the same error. Creating a new Packungen.xlsx to verify that all situations work. I never had the time to update the old tests from the xlx-format to the newer one. Therefore I will invest a couple of hours now.

Now some tests run, but in about cases I must fix errors, because the expiration_date changed or something is wrong in my code or tests.

Made 39 test pass again. Skipping 6 tests, where it would take me way too much time to debug why they fail. Had to adapt the method row_diffs in swissmedic-diff.rb to revert to the old version and adding the index_keys for the column_headings member variables to the class SwissmedicDiff. Done with commit Revert nr of paramenters of diff method to previous version

Now running jobs/import_swissmedic to see, whether everything is okay.

view · edit · sidebar · attach · print · history
Page last modified on July 06, 2015, at 08:48 PM