view · edit · sidebar · attach · print · history

Index>

20151221-PI-tramal

Summary

  • PDF of PI Tramal (43788) must be identical for all three packages
  • Minimize RSS-Feeds for fachinfo
  • Does a paypal checkout for PowerUser work correctly?
  • Run yus in docker container and test it

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search

PDF of PI Tramal (43788) must be identical for all three packages

Verifying the problem via bin/admin

ch.oddb> registration('43788').sequence('01').packages.keys
-> ["019", "027", "035", "051", "078", "086"]
ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.ikscd}
-> ["019", "027", "035", "051", "078", "086"]
ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.patinfo}
-> [nil, nil, nil, nil, nil, nil]
ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.pdf_patinfo}[3..-1]
-> ["43788_01_1450447469.4481595.pdf", "43788_01_1450447469.4481595.pdf", "43788_01_1450447469.4481595.pdf"]
ch.oddb> registration('43788').sequence('01').active_packages.collect{|x| x.pdf_patinfo}.sort.uniq
-> ["43788_01_019_1411463987.7279027.pdf", "43788_01_027_1411464368.464347.pdf", "43788_01_035_1411464413.2460468.pdf", "43788_01_1450447469.4481595.pdf"]
ch.oddb> packages.find_all{|x| x.iksnr if x.pdf_patinfo}.uniq.collect{|x| x.iksnr}.sort.uniq.size
-> 793
ch.oddb> packages.find_all{|x| x.iksnr if x.pdf_patinfo}.uniq.collect{|x| x.iksnr}.sort.uniq.first
-> 00274
ch.oddb> packages.find_all{|x| x.iksnr if x.pdf_patinfo}.uniq.collect{|x| x.iksnr}.sort.uniq.last
-> 62517

Okay. We have 1 sequence, and 4 different pdf_patinfos. Looking whether we found any entries about this IKSNR in the logs.

/var/www/oddb.org $ grep -w  43788 log/oddb/debug/2015/12.log 
7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019
7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027
7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019
7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027
7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019
7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027
2015-12-11 11:12:56 +0100: deactivate_not_found_package check "43788". 1 @deletes_packages
7680437880197: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/019
7680437880272: http://ch.oddb.org/de/gcc/drug/reg/43788/seq/01/pack/027

Looking at which pdf_patinfos we have for this IKSNR I found

 ls -lrt doc/resources/patinfo/43788_01_*
-rw-r--r-- 1 apache users  183894  6. Jun 2013  doc/resources/patinfo/43788_01_019_1370512259.7614565.pdf
-rw-r--r-- 1 apache users  183894  6. Jun 2013  doc/resources/patinfo/43788_01_027_1370512300.0050821.pdf
-rw-r--r-- 1 apache users  183894  6. Jun 2013  doc/resources/patinfo/43788_01_035_1370512331.042756.pdf
-rw-r--r-- 1 apache users  183894  6. Jun 2013  doc/resources/patinfo/43788_01_043_1370512363.2697334.pdf
-rw-r--r-- 1 apache users  183894  6. Jun 2013  doc/resources/patinfo/43788_01_019_1370512775.971024.pdf
-rw-r--r-- 1 apache users  905396 23. Sep 2014  doc/resources/patinfo/43788_01_019_1411463987.7279027.pdf
-rw-r--r-- 1 apache users  905396 23. Sep 2014  doc/resources/patinfo/43788_01_027_1411464368.464347.pdf
-rw-r--r-- 1 apache users  905396 23. Sep 2014  doc/resources/patinfo/43788_01_035_1411464413.2460468.pdf
-rw-r--r-- 1 apache users  905396 23. Sep 2014  doc/resources/patinfo/43788_01_043_1411464448.9976964.pdf
-rw-r--r-- 1 apache apache 112962 18. Dez 15:01 doc/resources/patinfo/43788_01_1450447279.6197457.pdf
-rw-r--r-- 1 apache apache 112962 18. Dez 15:04 doc/resources/patinfo/43788_01_1450447469.4481595.pdf
diff doc/resources/patinfo/43788_01_1450447279.6197457.pdf doc/resources/patinfo/43788_01_1450447469.4481595.pdf

The last two documents are correct. There it looks like the admin page which updates these links does not work correctly. Looking for the reason.

de/gcc/search/zone/drugs/search_query/43788/search_type/st_registration?#best_result only offers a Fachinfo-Upload and to a Patinfo-Upload. Why?

Also I look as I had this problem already once see 20140923-add-tramal-pi. Looking at the watir tests. It only checks, that we could upload a patinfo (which was also the case here), but it does not check, whether all packages got the same PDF. Improving the watir tests to make it fail. Done. The error is clearly shown.

I just fixed the problem with a bin/admin script, as uploading a PDF-Info seems to work only for some sequences. Verified that it worked after a restart too (only on oddb-ci2)

ch.oddb> registration('43788').packages.each{|x| x.pdf_patinfo = '43788_01_019_1450704759.3112497.pdf'; x.odba_isolated_store}
-> Array
ch.oddb> registration('43788').packages.collect{|x| x.pdf_patinfo}.uniq
-> druby://localhost:10000 - #<Errno::ECONNREFUSED: Connection refused - connect(2)>
ch.oddb> registration('43788').packages.collect{|x| x.pdf_patinfo}.uniq
-> ["43788_01_019_1450704759.3112497.pdf"]

Minimize RSS-Feeds for fachinfo

To minimize the displayed amount we don't emit the full FI, only point to the link. This looks like an easy task. Made a small change. Now running obs/update_textinfo_swissmedicinfo --target=fi before looking at /de/gcc/rss/channel/fachinfo.rss again.

Fixed with commit Minimize fi-rss-feed

Does a paypal checkout for PowerUser work correctly?

Zeno noticed that the checkout for a power user did not work correctly for de.oddb.org. After some bin/admin commands his problems vanished. The commands were

  503  sudo -u apache ruby -rubygems /usr/bin/yus_show demouser@gmail.com
  516  sudo -u apache ruby -rubygems /usr/bin/yus_grant
demouser@gmail.com login org.oddb.de.PowerUser
  522  sudo -u apache ruby -rubygems /usr/bin/yus_grant
demouser@gmail.com view org.oddb.de
  523  sudo -u apache ruby -rubygems /usr/bin/yus_show demouser@gmail.com
["demouser@gmail.com",
 ["login", [["org.oddb.de.PowerUser"]]],
 ["set_password", [["demouser@gmail.com"]]],
 ["view", [["org.oddb"], ["org.oddb.de"], ["org.oddb.de.PowerUser"]]],
 ["CompanyUser", "PowerUser"]]

Looking at our watir test whether the checks are correct or not.

Run yus in docker container and test it

But first I want to be able to run all unit tests of oddb.org under Ruby 2.x. There is a problem, that removing the LEGACY_INTERFACE = true from lib/htmlgrid/template.rb broke a lot of unit tests for views under oddb.org. Therefore reverting to use it agains.

Must remove references to rpdf2txt and support for parsing ydocx

view · edit · sidebar · attach · print · history
Page last modified on December 21, 2015, at 03:56 PM