Adding a test case with all FI/PI for Tramal IKSNR 43788.
But the problem is, that I cannot find an easy way to match GTIN/name from refdata to the. Here is what I have.
refdata.values.first.collect{|x| [ x[:gtin], x[:name_fr]] } [["7680437880197", "TRAMAL gouttes 100 mg/ml 10 ml"], ["7680437880272", "TRAMAL gouttes 100 mg/ml 10 x 10 ml"], ["7680437880357", "TRAMAL gouttes 100 mg/ml 3 x 10 ml"], ["7680437880517", "TRAMAL gouttes 100 mg/ml av pompe dosage 96 ml"], ["7680437880784", "TRAMAL gouttes 100 mg/ml av pompe dosage 50 ml"], ["7680437880869", "TRAMAL gouttes 100 mg/ml av pompe dosage 30 ml"]]
pry(#<ODDB::TextInfoPlugin>)> reg.packages.collect{|x| x.name} => ["Tramal, Tropfen", "Tramal, Tropfen", "Tramal, Tropfen", "Tramal, Tropfen", "Tramal, Tropfen", "Tramal, Tropfen"] pry(#<ODDB::TextInfoPlugin>)> reg.packages.collect{|x| x.name_base} => ["Tramal", "Tramal", "Tramal", "Tramal", "Tramal", "Tramal"] pry(#<ODDB::TextInfoPlugin>)> reg.packages.collect{|x| x.basename} => ["Tramal", "Tramal", "Tramal", "Tramal", "Tramal", "Tramal"]
pry(#<ODDB::TextInfoPlugin>)> pis.values.first.name => Tramal® Gouttes avec pompe de dosage
TRAMAL gouttes 100 mg/ml av pompe dosage 30 ml
in the text of the patinfo
Improving my split_aips.rb script to add also the info from refdata. Thinking on how to add its output each time I run import_textinfo.
I must rework plugin/textinfo.rb to be able to use my split algorithm. Also should we not also provide the italian version of the Patinfo it is present?
Improving the unit tests go check the reports and filtering via options.
Using xmllint to pretty format the generated xml and html files.
Saving the intermediat patch in Attach:rework_textinfo.txt
Looking at the following error
Plugin: ODDB::RefdataPlugin Error: DRb::DRbConnError Message: too large packet 54337903 Backtrace: (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:573:in `load' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:633:in `recv_reply' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:918:in `recv_reply' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1197:in `send_message' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1088:in `block (2 levels) in method_missing' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1172:in `open' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1087:in `block in method_missing' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1105:in `with_friend' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1086:in `method_missing' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/invokemethod.rb:10:in `block_yield' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/invokemethod.rb:17:in `block in perform_with_block' (druby://localhost:50001) /var/www/oddb.org/ext/refdata/src/refdata.rb:23:in `session' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/invokemethod.rb:14:in `perform_with_block' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1506:in `perform' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1582:in `loop' (druby://localhost:50001) /usr/lib64/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop' /var/www/oddb.org/src/plugin/refdata.rb:85:in `update_package_trade_status' /var/www/oddb.org/src/util/updater.rb:573:in `block in update_notify_simple' /var/www/oddb.org/src/util/updater.rb:549:in `call' /var/www/oddb.org/src/util/updater.rb:549:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:567:in `update_notify_simple' /var/www/oddb.org/src/util/updater.rb:484:in `update_package_trade_status_by_refdata' /var/www/oddb.org/src/util/updater.rb:298:in `update_bsv_followers' jobs/import_bsv_followers:14: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_bsv_followers:12:in `<module:Util>' jobs/import_bsv_followers:11:in `<module:ODDB>' jobs/import_bsv_followers:10:in `<main>'
Okay. Moved the global loop outside calling refdata get_refdata_info. Looks that is works now. Cleaning up some debug output.
Fixed another problem that the stored pharmacode often gets needlessly updated from e.g Updating 98631 -> 0098631.
Pushed commit Finish renaming check_item -> get_refdata_info