view · edit · sidebar · attach · print · history




  • Fix reparsing patinfo
  • needs some minor redesign
  • Keep in Mind



Fix reparsing patinfo

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.

  • de/gcc/patinfo/reg/47909/seq/01/pack/015 shows the changes link and the correct content
  • de/gcc/patinfo/reg/47909/seq/01 displays an old version of the patinfo
  • de/gcc/patinfo/reg/47909/seq/02 displays an old version of the patinfo
  • fr/gcc/patinfo/reg/47909/seq/02/pack/066 shows the changes link and the correct content, but the link is not shown via
  • /de/gcc/drug/reg/47909/seq/02 show only the link to de/gcc/patinfo/reg/47909/seq/02 and not de/gcc/patinfo/reg/47909/seq/02/pack/066
  • /de/gcc/search/zone/drugs/search_query/47909/search_type/st_registration?#best_result shows no link to the patinfo for sequence 06
  • /de/gcc/drug/reg/47909/seq/06 no link to the patinfo
  • /de/gcc/drug/reg/47909/seq/06/pack/147 no link to the patinfo
  • /de/gcc/patinfo/reg/47909/seq/06/pack/147 shows correct info, but
  • /fr/gcc/patinfo/reg/47909/seq/06/pack/147 shows german info
  • /de/gcc/patinfo/reg/47909/seq/06/pack/166 shows 'Die von Ihnen gewünschte Information ist leider nicht mehr vorhanden.'
  • /fr/gcc/patinfo/reg/47909/seq/06/pack/166 shows 'L'information demandée n'est malheureusement plus accessible.'

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 \&reg

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>
/var/www/ `diff'
/var/www/ `each'
/var/www/ `to_a'
/var/www/ `text'
/var/www/ `to_s'
/var/www/ `block in add_change_log_item'
/var/www/ `each'
/var/www/ `find'
/var/www/ `add_change_log_item'
/var/www/ `method_missing'
/var/www/ `store_patinfo_change_diff'
/var/www/ `block (2 levels) in update_patinfo_lang'
/var/www/ `each'
/var/www/ `block in update_patinfo_lang'
/var/www/ `each'
/var/www/ `update_patinfo_lang'
/var/www/ `parse_textinfo'
/var/www/ `block in import_swissmedicinfo'
/var/www/ `each'
/var/www/ `import_swissmedicinfo'
/var/www/ `block in update_notify_simple'
/var/www/ `wrap_update'
/var/www/ `update_notify_simple'
/var/www/ `update_textinfo_swissmedicinfo'
jobs/update_textinfo_swissmedicinfo:39:in `block in <module:Util>'
/var/www/ `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 needs some minor redesign

Zeno posted some requirements for a minor redesign of screens.

First we want to remove the Top links to and (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

view · edit · sidebar · attach · print · history
Page last modified on October 30, 2017, at 05:02 PM