view · edit · sidebar · attach · print · history

20120104-fix-export_ouwerkerk-fi-word-parser-migel-import-ruby193-oddb_org

<< Masa.20120105-oddb2tdat-rpdf2txt-update_narcotics-ruby193-oddb_org | Index | Masa.20120103-fix-importer-exporter-ruby193-oddb_org >>


  1. Debug Med-Drug file size
  2. Debug Fachinfo doc parser

Milestones

Debug Fachinfo doc parser

How to update

  • /usr/local/bin/ruby gem install rwv2
  • recompile rwv2.so /usr/local/lib/ruby/gems/1.9.1/gems/rwv2-0.6.1/ext/rwv2/
$ /usr/local/bin/ruby extconf.rb
$ make
  • copy rwv2.so to /usr/local/lib64/ruby/site_ruby/1.9.1/x86_64-linux/
  • reboot oddbd
  • reboot fiparsed

Debug Med-Drug file size

Problem (export_ouwerkerk)

  • Outputted med-drugs.xls file is big (8MB, usually a few 100 KB)

Note

  • Med-Drug outputted file is based on log_group(:swissmedic).latest, log_group(:bsv_sl).latest
  • the new database for Ruby 1.9.3
ch.oddb> log_group(:swissmedic).latest.date
-> 2011-11-01
ch.oddb> log_group(:swissmedic).latest.change_flags.length
-> 7595
ch.oddb> log_group(:bsv_sl).latest.date
-> 2012-01-01
ch.oddb> log_group(:bsv_sl).latest.change_flags.length
-> 336
  • the old database for Ruby 1.8.6
ch.oddb> log_group(:swissmedic).latest.date
-> 2011-11-01
ch.oddb> log_group(:swissmedic).latest.change_flags.length
-> 235
ch.oddb> log_group(:bsv_sl).latest.date
-> 2011-12-01
ch.oddb> log_group(:bsv_sl).latest.change_flags.length
-> 142
  • 201110 change_flags
ch.oddb> log_group(:swissmedic).logs.keys.sort.length
-> 46
ch.oddb> log_group(:swissmedic).logs.keys.sort[44]
-> 2011-10-01
ch.oddb> key = log_group(:swissmedic).logs.keys.sort[44];flags=log_group(:swissmedic).logs[key].change_flags;open("/home/masa/work/reg_flag_201110.dat","w"){|out| flags.each{|pt, flgs| out.print pt,"\t",flgs.join(","), "\n"}}
  • The number of change_flags in 2011.10: 262
view · edit · sidebar · attach · print · history
Page last modified on January 04, 2012, at 05:01 PM