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 >>
- Update export_oddbdat_by_company_name
- Update oddb2tdat, import Arztpreis
- Update export_oddb_csv
- Note SBSM mod_ruby on Ruby 1.9
- Update search_result mymedi
- Commits
-
- Fix old narcotic process
- Fix export_oddb_csv: casrn becomes null in oddb.csv and oddb2.csv (oddb.org)
- Deleted narcotic lines from download_export.rb (oddb.org)
- Exporter#export_oddbdat_by_company_name
- Added jobs/export_oddbdat, Exporter#export_oddbdat_by_company_name method. (oddb.org)
- Fix export_oddbdat_by_company_name regarding company name filtering (oddb.org)
- Fix small sytax error in src/plugin/oddbdat_export.rb (oddb.org)
- Fix Error: can't modify frozen String in export_oddbdat_by_company_name (oddb.org)
- Oddb2tdat
- Added import_prmo method to import Arztpreis (oddb2tdat)
- Added bin/oddb2tdat_import_prmo (oddb2tdat)
- Updated bin/oddb2tdat to use transfer.dat directly (oddb2tdat)
- Added jobs/export_oddb2tdat, Exporter#export_oddb2tdat, CsvPlugin#export_oddb2tdat methods (oddb.org)
- Added readable instance variable @updated_prmo (oddb2tdat)
- Updated export_oddb2tdat. data/downloads/transfer.dat is used as a default if transfer.dat is not specified. (oddb.org)
- SBSM
- Added untaint to __FILE__ and request.server.document_root in trans_hander.rb (sbsm)
- Others
- Force_encoded argument of dose method in src/util/validator.rb (oddb.org)
Update export_oddbdat_by_company_name
Commit
How to use
jobs/export_oddbdat 'company_name'
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
oddb2tdat oddb.csv oddb.dat transfer.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"]]