view · edit · sidebar · attach · print · history

< Niklaus.20170206-fix-ajax-mouseover | Index | Niklaus.20170131-fix-ajax-mouseover >>

20170201-fix-ajax-mouseover

Summary

  • Fix Ajax-MouseOver for category
  • Changing atc_code did not work as expected
  • Keep in Mind

Commits

Index

Changing atc_code did not work as expected

Zeno updated the ATC-Code of IKSRN 62279, sequence 01 "Ibandronat Actavis i.v." from M05BA08 to M05BA06. But it still shows up when looking it up via Zometa (which has ATC M05BA08)

In bin/admin I verified

ch.oddb> registration('62279').sequence('01').atc_class.code
-> M05BA06
ch.oddb> registration('62279').sequence('01').active_agents.first.substance.atc_classes.first.code
-> M05BA06

But why is it still found?

ch.oddb> $atcs = search_by_atc('M05BA06')
-> Array
ch.oddb> $atcs.first.sequences.collect{|x| x.iksnr}
-> ["53626", "56281", "56360", "57297", "57424", "57526", "60532", "60442", "61317", "62306", "62412", "63119", "62629", "62929", "62719", "65476", "62279"]

Okay. This sequence is still in present.

In the Packungen.xls w e finde the ATC-Code M05BA08, but via http://www.swissmedicinfo.ch/ the FI says under Eigenschaften/Wirkungen ATC-Code: M05BA06.

http://ch.oddb.org/de/gcc/drug/reg/62279 shows Datum des Datenimports : 04.12.2014, but the FI was has Stand der Information Mai 2016.. Therefore I think, that the ATC-Code from the FI overwrote the value of the swissmedic import (via the method ensure_correct_atc_code in src/plugin/text_info.rb).

Tested manually (on oddb-ci2) changing IKSNR 60532 and 62279 to the ATC-Code M05BA05. But both show up now twice, as demonstrated by bin/admin

ch.oddb> search_by_atc('M05BA05').first.sequences.collect{|x| x.iksnr}
-> ["53014", "53015"]
<..no changing via view/admin interface of oddb-ci2
ch.oddb> search_by_atc('M05BA05').first.sequences.collect{|x| x.iksnr}
-> ["53014", "53015", "60532", "62279"]
ch.oddb> search_by_atc('M05BA08').first.sequences.collect{|x| x.iksnr}
-> ["57363", "55463", "56257", "62127", "62253", "62277", "62348", "62625", "62626", "62200", "62257", "62481", "62567", "62932", "63012", "63257", "63257", "65068", "65229", "62279", "62683"]
ch.oddb> search_by_atc('M05BA06').first.sequences.collect{|x| x.iksnr}
-> ["53626", "56281", "56360", "57297", "57424", "57526", "60532", "60442", "61317", "62306", "62412", "63119", "62629", "62929", "62719", "65476"]

Therefore we really have a problem here. Trying whether updating jobs/rebuild_indices fixes this problem. No after rebuilding the indices we still found the iksnr 62279 via bin/admin

ch.oddb> search_by_atc('M05BA08').first.sequences.collect{|x| x.iksnr}
-> ["57363", "55463", "56257", "62127", "62253", "62277", "62348", "62625", "62626", "62200", "62257", "62481", "62567", "62932", "63012", "63257", "63257", "65068", "65229", "62279", "62683"]
ch.oddb> search_by_atc('M05BA08').first.sequences[19].atc_class.code
-> M05BA05

This must be fixed!

Ajax-Mouseover for category

Creating a unit test for a new tooltip implementation as this feature never had one. Getting inspiration from the test of test_view/searchbar.rb. It begins to fail as expected. Now improving my test_1.html to use parameters and offering two different items for selbstbehalt and category.

The ajax mouseover looks like this. Generated with the test_1.html from yesterday.

Now my new helper begins to work. But quoting is such a mess! Fixed displaying the Selbstbehalt. Working on the category. Took me while to understand that the initialization of content and href (in this order works), but not in the order href, then content!

Now it works. Updating my unit test. Also asking my self whether I should better use the declarative markup instead of the programmatic markup. Saving patch as Attach:Use-TooltipDialog-instead-of-tooltip.txt

view · edit · sidebar · attach · print · history
Page last modified on February 01, 2017, at 11:02 PM