view · edit · sidebar · attach · print · history

20130619

<< | Index | >>


Summary

  • Export export_oddb2_csv
  • Find all SwissmedicNo5 from ebipharm via bin/admin

Commits

Index

Export export_oddb2_csv

  • Runnning sudo -u apache ruby jobs/export_oddb2tdat 2>&1| tee /vagrant/export_oddb2tdat.txt failed as file /var/www/oddb.org/data/downloads/oddb.csv was missing
  • Called sudo -u apache ruby jobs/export_oddb2_csv. Creates ./data/csv/oddb2.2013-06-01.csv

Find all SwissmedicNo5 from ebipharm via bin/admin

  • The fieldname for "Swissmedic-Registration" is iksnr. Followed the Guide.txt. Searched for update_patinfo.
ch.oddb> patinfos.size
-> 5295
ch.oddb> patinfos.values.find_all{|info| /ebi.pharm/i.match(info.company_name)}.size
-> 172

Looking at http://www.swissmedicinfo.ch/ I however find 205 patient infos for Ebi-Pharm AG.

  • On suggestion by Zeno I will add an option to add company names as selection criterias, e.g.

ruby jobs/update_textinfo_swissmedicinfo --target=pi --reparse EbiPharm Novartis Pfizer

niklaus@ng-tr:/opt/src/oddb.org$ ruby test/test_util/updater.rb 
/home/niklaus/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
racc/parser.rb:33: warning: already initialized constant Racc_Runtime_Version
racc/parser.rb:34: warning: already initialized constant Racc_Runtime_Revision
racc/parser.rb:36: warning: already initialized constant Racc_Runtime_Core_Version_R
racc/parser.rb:37: warning: already initialized constant Racc_Runtime_Core_Revision_R
racc/parser.rb:41: warning: already initialized constant Racc_Runtime_Core_Revision_C
racc/parser.rb:49: warning: already initialized constant Racc_Main_Parsing_Routine
racc/parser.rb:50: warning: already initialized constant Racc_YY_Parse_Method
racc/parser.rb:51: warning: already initialized constant Racc_Runtime_Core_Version
racc/parser.rb:52: warning: already initialized constant Racc_Runtime_Core_Revision
racc/parser.rb:53: warning: already initialized constant Racc_Runtime_Type
[DEPRECATED] By requiring 'spreadsheet/excel' you are loading a Compatibility
             layer which provides a drop-in replacement for Spreadsheet::Excel
             versions <= 0.3.5.1. This code will be removed in Spreadsheet
             version 1.0.0

could not find htmlgrid.so, falling back to pure-ruby class
/opt/src/oddb.org/src/view/changelog.rb:27: warning: already initialized constant SORT_DEFAULT
Run options: 

# Running tests:

..................EFE.E...F.......E.............

Finished tests in 141.287055s, 0.3397 tests/s, 0.3114 assertions/s.

  1) Error:
test_run(ODDB::TestUpdater):
NoMethodError: undefined method `export_oddb2tdat' for <FlexMock:exp>:FlexMock
    /home/niklaus/.rvm/gems/ruby-1.9.3-p392/gems/flexmock-1.3.1/lib/flexmock/core.rb:136:in `block in method_missing'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p392/gems/flexmock-1.3.1/lib/flexmock/core.rb:266:in `flexmock_wrap'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p392/gems/flexmock-1.3.1/lib/flexmock/core.rb:128:in `method_missing'
    /opt/src/oddb.org/src/util/updater.rb:107:in `export_oddb2tdat'
    /opt/src/oddb.org/src/util/updater.rb:265:in `update_bsv_followers'
    /opt/src/oddb.org/src/util/updater.rb:202:in `run'
    test/test_util/updater.rb:541:in `block in test_run'
    test/test_util/updater.rb:247:in `setup_logfile_stats'
    test/test_util/updater.rb:534:in `test_run'

  2) Failure:
test_run_random(ODDB::TestUpdater) [test/test_util/updater.rb:395]:
<"notify"> expected but was
<nil>.

  3) Error:
test_update_analysis(ODDB::TestUpdater):
ArgumentError: wrong number of arguments (2 for 0)
    /opt/src/oddb.org/src/util/updater.rb:211:in `update_analysis'
    test/test_util/updater.rb:305:in `test_update_analysis'

  4) Error:
test_update_bsv_followers(ODDB::TestUpdater):
NoMethodError: undefined method `export_oddb2tdat' for <FlexMock:exp>:FlexMock
    /home/niklaus/.rvm/gems/ruby-1.9.3-p392/gems/flexmock-1.3.1/lib/flexmock/core.rb:136:in `block in method_missing'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p392/gems/flexmock-1.3.1/lib/flexmock/core.rb:266:in `flexmock_wrap'
    /home/niklaus/.rvm/gems/ruby-1.9.3-p392/gems/flexmock-1.3.1/lib/flexmock/core.rb:128:in `method_missing'
    /opt/src/oddb.org/src/util/updater.rb:107:in `export_oddb2tdat'
    /opt/src/oddb.org/src/util/updater.rb:265:in `update_bsv_followers'
    test/test_util/updater.rb:498:in `test_update_bsv_followers'

  5) Failure:
test_update_fachinfo(ODDB::TestUpdater) [test/test_util/updater.rb:387]:
<"notify"> expected but was
<nil>.

  6) Error:
test_update_migel(ODDB::TestUpdater):
NameError: uninitialized constant ODDB::TestUpdater::MiGeLPlugin
    test/test_util/updater.rb:430:in `test_update_migel'

48 tests, 44 assertions, 2 failures, 4 errors, 0 skips
  • Was unable to fix all the errors for test/test_util/updater.rb
  • Tried running ruby jobs/update_patinfo_only 'Ebi-Pharm AG'. But got an E-Mail back with
Plugin: ODDB::TextInfoPlugin
Error: NoMethodError
Message: undefined method `radiobutton_with' for nil:NilClass
Backtrace:
/var/www/oddb.org/src/plugin/text_info.rb:345:in `search'
/var/www/oddb.org/src/plugin/text_info.rb:460:in `search_company'
/var/www/oddb.org/src/plugin/text_info.rb:544:in `block in import_company'
/var/www/oddb.org/src/plugin/text_info.rb:541:in `each'
/var/www/oddb.org/src/plugin/text_info.rb:541:in `import_company'
/var/www/oddb.org/src/util/updater.rb:500:in `block in update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:476:in `call'
/var/www/oddb.org/src/util/updater.rb:476:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:494:in `update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:314:in `update_patinfo_only'
jobs/update_patinfo_only: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/update_patinfo_only:12:in `<module:Util>'
jobs/update_patinfo_only:11:in `<module:ODDB>'
jobs/update_patinfo_only:10:in `<main>'
  • Create a small ruby test script to be able to test the stuff locally.
#!/usr/bin/env ruby
$: << File.dirname(__FILE__)
$: << File.expand_path("../src", File.dirname(__FILE__))
require 'util/updater'
require 'util/log'
require 'plugin/text_info'
require 'pp'
opts = {
  :target   => :pi,
  :reparse  => true,
  :iksnrs   => [],
  :companies => ['Ebi', 'Novartis Consumer'],
  :download => true,
}
ti = ODDB::TextInfoPlugin.new(:import_swissmedicinfo, opts)
ODDB.config.text_info_searchform = 'http://www.swissmedicinfo.ch/'
res = ti.import_swissmedicinfo_by_companies(opts[:companies], :target => :pi)
pp res
  • Remove on my funtoo system by hand the PI for Traumeel and Calvive
  • Added a import_swissmedicinfo_by_companies method. Seems to work. Testing it on the funtoo system.
  • Took 105 minutes to parse about 300 using ruby jobs/update_textinfo_swissmedicinfo --target=pi --reparse Ebi 'Novartis Consu'.
  • E-Mail from result see Attach:update.txt
  • Checked results for Traumeel (okay) and Calvive (60551, not rebuilt). Voltaren was redone.
  • Commmitted Added import_swissmedicinfo_by_companies
  • TODO: Should we add all parameters given in the answer?
view · edit · sidebar · attach · print · history
Page last modified on June 20, 2013, at 12:08 PM