view · edit · sidebar · attach · print · history

20120120-export_oddbdat-oddb2tdat-export_oddb_csv-mail_order_price-oddb_org

<< Masa.20120123-mail_order_price-check-sequence-dose-oddb_org | Index | Masa.20120119-delete-old-narcotic-code-fix-errors-oddb_org-make-export_oddbdat_by_company_name >>


  1. Update export_oddbdat_by_company_name
  2. Update oddb2tdat, import Arztpreis
  3. Update export_oddb_csv
  4. Note SBSM mod_ruby on Ruby 1.9
  5. Update search_result mymedi

Commits
  1. Fix old narcotic process
    1. Fix export_oddb_csv: casrn becomes null in oddb.csv and oddb2.csv (oddb.org)
    2. Deleted narcotic lines from download_export.rb (oddb.org)
  2. Exporter#export_oddbdat_by_company_name
    1. Added jobs/export_oddbdat, Exporter#export_oddbdat_by_company_name method. (oddb.org)
    2. Fix export_oddbdat_by_company_name regarding company name filtering (oddb.org)
    3. Fix small sytax error in src/plugin/oddbdat_export.rb (oddb.org)
    4. Fix Error: can't modify frozen String in export_oddbdat_by_company_name (oddb.org)
  3. Oddb2tdat
    1. Added import_prmo method to import Arztpreis (oddb2tdat)
    2. Added bin/oddb2tdat_import_prmo (oddb2tdat)
    3. Updated bin/oddb2tdat to use transfer.dat directly (oddb2tdat)
    4. Added jobs/export_oddb2tdat, Exporter#export_oddb2tdat, CsvPlugin#export_oddb2tdat methods (oddb.org)
    5. Added readable instance variable @updated_prmo (oddb2tdat)
    6. Updated export_oddb2tdat. data/downloads/transfer.dat is used as a default if transfer.dat is not specified. (oddb.org)
  4. SBSM
    1. Added untaint to __FILE__ and request.server.document_root in trans_hander.rb (sbsm)
  5. Others
    1. Force_encoded argument of dose method in src/util/validator.rb (oddb.org)

Update export_oddbdat_by_company_name

Commit

How to use

  • jobs
 jobs/export_oddbdat 'company_name'
  • bin/admin
 ch.oddb> Exporter.new(self).export_oddbdat_by_company_name('company_name')

Note

  • jobs/export_oddbdat without company_name then the normal Exporter#export_oddbdat is called (no report mail as usual)
  • jobs/export_oddbdat with company_name then Exporter#export_oddbdat_by_company_name method is called (with report mail)
  • The data is exported /var/www/oddb.org/data/downloads/company_name directory
  • fachinfo data (s31x) is also included in the archive file (Normal export_oddbdat does not include s31x. It is separately exported when the normal export_oddbdat running)
  • The company_name is compared with downcase ('YWESEE' and 'ywesee' are same, but space is considered to filter the output data.)

Update oddb2tdat, import Arztpreis

Commit

How to use

  • from oddb.csv
oddb2tdat oddb.csv oddb.dat transfer.dat
  • from oddb.dat
oddb2tdat_import_prmo oddb.dat oddb_new.dat transfer.dat

Note

  • oddb2tdat without transfer.dat runs as normal
  • oddb2tdat with transfer.dat export oddb.dat using transfer.dat (only for Arztpreis column)
  • The data is searched by ean code first and pharma code second

Update export_oddb_csv

Commit

How to use

jobs/export_oddb2tdat 'transfer.dat'

Note SBSM mod_ruby on Ruby 1.9

Note

  • If mod_ruby is compiled on Ruby 1.9, the following error somes:
[Fri Jan 20 14:48:22 2012] [error] mod_ruby: error in ruby
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require':
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib/sbsm/flavored_uri_parser.rb:9:
invalid multibyte char (US-ASCII) (SyntaxError)
[Fri Jan 20 14:48:22 2012] [error] mod_ruby: /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib/sbsm/flavored_uri_parser.rb:9:
syntax error, unexpected '~', expecting ')'
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:     t1 = EofToken.new("EOF",/^(\xa4~~\xa4\xa4~^^~2220240369)/),
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:                                  ^
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib/sbsm/flavored_uri_parser.rb:9: invalid multibyte char (US-ASCII)
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:   from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:   from /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib/sbsm/trans_handler.rb:125:in `uri_parser'
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:   from
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib/sbsm/trans_handler.rb:74:in `parse_uri'
[Fri Jan 20 14:48:22 2012] [error] mod_ruby:   from /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.0.5/lib/sbsm/trans_handler.rb:105:in `translate_uri'
  • flavored_uri_parser.rb is generaged by rockit
  • This file includes non utf-8 characters
  • This error is not rescued in trans_handler.rb, so then simple_uri_parser is not used
  • mod_ruby.so should be configured with --enable-shared otherwise nothing is shown.

Update search_result mymedi

Memo

ch.oddb> registration('31706').package('017').mail_order_price = [[123.4, 'http://aaa', 'logo path']]
-> [[123.4, "http://aaa", "logo path"]]
view · edit · sidebar · attach · print · history
Page last modified on January 23, 2012, at 07:17 AM