My local version has problems when calling jobs/update_textinfo_swissmedicinfo --target=pi 13358 4790913358 47909
for 47909 Solmucol where some sequences contain several packages. Looks to be a problem is the name does not correspond with the meta_info from the XML file.
In /data/details/47909_pi_de_Solmucol__100__200__600_Granulat_problem.xml we find <title>Solmucol® 100, 200, 600 Granulat</title>
In data/html/pi/de/Solmucol_\ 100,\ 200,\ 600\ Granulat.html we find <p class="s3" id="section1"><span class="s2"><span>Solmucol® 100, 200, 600 Granulat</span></span></p>
, where the ® is created using \®
The following changes must replace Solmucol® 400, 600
by Solmucol® 100, 200, 600
in etc/barcode_to_text_info.yml
. Also clarifying the error message emitted in plugin/text_info.rb when we skip non matching entries in etc/barcode_to_text.
Running import again, to see whether it fixes the problem with sequence 06 of 47909 Solmucol.
But we must also check why displaying the patinfo of the sequence leads to different result than the patinfo of the package.
No I get another time the following error
Plugin: ODDB::TextInfoPlugin Error: NoMethodError Message: undefined method `gsub' for #<ODDB::PatinfoDocument:0x00558bfa2a6350> Backtrace: /var/www/oddb.org/vendor/ruby/2.4.0/gems/ydiffy-0.0.2/lib/diffy/diff.rb:64:in `diff' /var/www/oddb.org/vendor/ruby/2.4.0/gems/ydiffy-0.0.2/lib/diffy/diff.rb:88:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/ydiffy-0.0.2/lib/diffy/format.rb:23:in `to_a' /var/www/oddb.org/vendor/ruby/2.4.0/gems/ydiffy-0.0.2/lib/diffy/format.rb:23:in `text' /var/www/oddb.org/vendor/ruby/2.4.0/gems/ydiffy-0.0.2/lib/diffy/diff.rb:136:in `to_s' /var/www/oddb.org/src/model/patinfo.rb:92:in `block in add_change_log_item' /var/www/oddb.org/src/model/patinfo.rb:92:in `each' /var/www/oddb.org/src/model/patinfo.rb:92:in `find' /var/www/oddb.org/src/model/patinfo.rb:92:in `add_change_log_item' /var/www/oddb.org/vendor/ruby/2.4.0/gems/odba-1.1.2/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/plugin/text_info.rb:282:in `store_patinfo_change_diff' /var/www/oddb.org/src/plugin/text_info.rb:378:in `block (2 levels) in update_patinfo_lang' /var/www/oddb.org/src/plugin/text_info.rb:366:in `each' /var/www/oddb.org/src/plugin/text_info.rb:366:in `block in update_patinfo_lang' /var/www/oddb.org/src/plugin/text_info.rb:363:in `each' /var/www/oddb.org/src/plugin/text_info.rb:363:in `update_patinfo_lang' /var/www/oddb.org/src/plugin/text_info.rb:1288:in `parse_textinfo' /var/www/oddb.org/src/plugin/text_info.rb:1482:in `block in import_swissmedicinfo' /var/www/oddb.org/src/plugin/text_info.rb:1481:in `each' /var/www/oddb.org/src/plugin/text_info.rb:1481:in `import_swissmedicinfo' /var/www/oddb.org/src/util/updater.rb:586:in `block in update_notify_simple' /var/www/oddb.org/src/util/updater.rb:542:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:580:in `update_notify_simple' /var/www/oddb.org/src/util/updater.rb:350:in `update_textinfo_swissmedicinfo' jobs/update_textinfo_swissmedicinfo:39:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `run' jobs/update_textinfo_swissmedicinfo:12:in `<module:Util>' jobs/update_textinfo_swissmedicinfo:11:in `<module:ODDB>' jobs/update_textinfo_swissmedicinfo:10:in `<main>'
Checking the sequence patinfo versus the package patinfo via bin/admin
ch.oddb> registration('47909').sequences.values.collect{|x| x.patinfo.object_id} -> [70357250040000, 70357250071900, 70357250070980, 8] ch.oddb> registration('47909').packages.collect{|x| x.patinfo.object_id} -> [47437881085780, 47437902178340, 47437902289340, 47437902366660, 47437902450020, 70357250100860, 47437902532160] ch.oddb> registration('47909').sequences.values.first.patinfo.object_id -> 70357250040000 ch.oddb> registration('47909').sequences.values.first.packages.values.first.patinfo.object_id -> 47437881085780 ch.oddb> registration('47909').sequences.values.first.packages.size -> 1 ch.oddb> registration('47909').sequence('06').packages.size -> 2 ch.oddb> registration('47909').sequence('06').packages.values.first.patinfo.object_id -> 70357250100860 ch.oddb> registration('47909').sequence('06').patinfo.object_id -> 8 ch.oddb> registration('47909').sequence('06').patinfo -> ch.oddb> registration('47909').sequence('06').patinfo.class -> NilClass
SequenceCommon has a patinfo attr_accessor. Sequence has a patinfo_shadow and assigns @patinfo using @patinfo = replace_observer(@patinfo, patinfo)
Reworked updating all patinfo when all packages share the same patinfo.
Pushed the following commits
Zeno posted some requirements for a minor redesign of oddb.org screens.
First we want to remove the Top links to ch.oddb.org and de.oddb.org (CountryLinks). Done with commit Remove country navigation
Must remove links to amiko and friends. Done with commit Remove amiko links
Then committed Reformat size info of database elements