view · edit · sidebar · attach · print · history

Index>

20151130-warfarin

Summary

  • Warfarin display under evidentia a too large result. Should be none
  • Snapback has a wrong link to home
  • Watir test for rss feed
  • Don't generate a link in the evidentia LnF, when there is no fachinfo, e.g. Cyramza

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
  • Limit RSS feedback to year or so. Allow accessing RSS feeds of past years.

Don't generate a link in the evidentia LnF, when there is no fachinfo, e.g. Cyramza

Creating a (failing) watir test took only 5 minutes. Now trying to make it pass. First try did not work, will continue tomorrow.

Watir test for rss feed

Looking at the spec directory I found a not yet checked in rss_spec.rb. Made it pass (execpt for fachinfo) with the firefox browser. RSS don't open directly under chrome.

We remarked that the RSS feed for fachinfo is very big (currently 26MB) and has entries dating back to 2006. Therefore Zeno and me decided to add a TODO item that RSS-Feeds should always be limited to something like one year (or starting with first january of last year) and each year should be reachable via link specifying its year, e.g. http://ch.oddb.org/de/gcc/rss/channel/fachinfo-2013.rss. This would be generated automatically at the end of each year. Pushed commit Added watir test for RSS-feed (firefox) and Made rss-test pass with firefox by increasing the timeout

Snapback has a wrong link to home

Instead of going to home a click on the 'home' snapback when display a fachinfo goes to the changes. Okay. I must invest some more hours to test the snapback-links thoroughly via watir tests.

I remarked that in /de/gcc/show/fachinfo/40501/diff/28.11.2015 the link "Änderungen" pointed to /de/gcc/home/fachinfo/reg/40501/diff, but as we are not consistent the correct link must be /de/gcc/show/fachinfo/40501/diff.

My watir tests don't work at the moment because in de/gcc/show/fachinfo/63184/diff the steps don't have the expected call 'th-pointersteps'. Why? Fixed the problem. Improved the watir tests and pushed commits Fix wrong link for fachinfo changes and Fix another wrong link for fachinfo changes

Warfarin display under evidentia a too large result. Should be none

When using the search types Price comparision, interaction, active agent or trademark a search for Warfarin display "No result found", which is correct as it not a registered drug in Switzerland. Using the combined search (Price comparision and components) however results in "Your search string produces a very large search result. Please specify your search.". This must be corrected.

Added a watir test. But for http://oddb-ci2.dyndns.org/ it does not show any problem. Running the test with base-URL http://ch.oddb.org. Here I found errors. The log of the watir tests are

niklaus@oddb-ci2 /m/oddb.org> bundle exec rspec spec/searchbar_spec.rb:281
Run options: include {:locations=>{"./spec/searchbar_spec.rb"=>[281]}}
Took 3 seconds for for http://oddb-ci2.dyndns.org to be ready. First answer was after 0 seconds.
URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_interaction?#best_result
.URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_sequence?#best_result
.URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_oddb?#best_result
.URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_substance?#best_result
.URL ist http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_combined?#best_result
.

Finished in 31.3 seconds (files took 2.43 seconds to load)
5 examples, 0 failures

niklaus@oddb-ci2 /m/oddb.org> set -x ODDB_URL http://ch.oddb.org
niklaus@oddb-ci2 /m/oddb.org> bundle exec rspec spec/searchbar_spec.rb:281
Run options: include {:locations=>{"./spec/searchbar_spec.rb"=>[281]}}
Took 3 seconds for for http://ch.oddb.org to be ready. First answer was after 0 seconds.
URL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_interaction?#best_result
FURL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_sequence?#best_result
.URL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_oddb?#best_result
FURL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_substance?#best_result
.URL ist http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Warfarin/search_type/st_combined?#best_result
F

Failures:

  1) ch.oddb.org Interaktion should display not found for Warfarin which is not registered in Switzerland 
     Failure/Error: expect(text).to match LeeresResult
       expected "Deutsch  |  English  |  Fran?ais  -  CHF  |  EUR  |  USD\nAnalysen  |  Apotheken  |  Arzt  |  Interaktionen  |  Medikamente  |  MiGeL  |  Services  |  Spital  |  Zulassungsi.\nEs ist ein Fehler aufgetreten:\nIhr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.\nLGPL ,  2015  ywesee.com,  Commit-ID\nEinstellungen  |  Hilfe  |  FAQ  |  Anmeldung  |  Kontakt  |  Home" to match /hat ein leeres Resultat/
       Diff:
       @@ -1,2 +1,7 @@
       -/hat ein leeres Resultat/
       +Deutsch  |  English  |  Fran?ais  -  CHF  |  EUR  |  USD
       +Analysen  |  Apotheken  |  Arzt  |  Interaktionen  |  Medikamente  |  MiGeL  |  Services  |  Spital  |  Zulassungsi.
       +Es ist ein Fehler aufgetreten:
       +Ihr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.
       +LGPL ,  2015  ywesee.com,  Commit-ID
       +Einstellungen  |  Hilfe  |  FAQ  |  Anmeldung  |  Kontakt  |  Home
     # ./spec/searchbar_spec.rb:286:in `block (3 levels) in <top (required)>'

  2) ch.oddb.org Preisvergleich should display not found for Warfarin which is not registered in Switzerland 
     Failure/Error: expect(text).to match LeeresResult
       expected "Deutsch  |  English  |  Fran?ais  -  CHF  |  EUR  |  USD\nAnalysen  |  Apotheken  |  Arzt  |  Interaktionen  |  Medikamente  |  MiGeL  |  Services  |  Spital  |  Zulassungsi.\nEs ist ein Fehler aufgetreten:\nIhr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.\nLGPL ,  2015  ywesee.com,  Commit-ID\nEinstellungen  |  Hilfe  |  FAQ  |  Anmeldung  |  Kontakt  |  Home" to match /hat ein leeres Resultat/
       Diff:
       @@ -1,2 +1,7 @@
       -/hat ein leeres Resultat/
       +Deutsch  |  English  |  Fran?ais  -  CHF  |  EUR  |  USD
       +Analysen  |  Apotheken  |  Arzt  |  Interaktionen  |  Medikamente  |  MiGeL  |  Services  |  Spital  |  Zulassungsi.
       +Es ist ein Fehler aufgetreten:
       +Ihr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.
       +LGPL ,  2015  ywesee.com,  Commit-ID
       +Einstellungen  |  Hilfe  |  FAQ  |  Anmeldung  |  Kontakt  |  Home
     # ./spec/searchbar_spec.rb:286:in `block (3 levels) in <top (required)>'

  3) ch.oddb.org Preisvergleich und Inhaltsstoff should display not found for Warfarin which is not registered in Switzerland 
     Failure/Error: expect(text).to match LeeresResult
       expected "Deutsch  |  English  |  Fran?ais  -  CHF  |  EUR  |  USD\nAnalysen  |  Apotheken  |  Arzt  |  Interaktionen  |  Medikamente  |  MiGeL  |  Services  |  Spital  |  Zulassungsi.\nEs ist ein Fehler aufgetreten:\nIhr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.\nLGPL ,  2015  ywesee.com,  Commit-ID\nEinstellungen  |  Hilfe  |  FAQ  |  Anmeldung  |  Kontakt  |  Home" to match /hat ein leeres Resultat/
       Diff:
       @@ -1,2 +1,7 @@
       -/hat ein leeres Resultat/
       +Deutsch  |  English  |  Fran?ais  -  CHF  |  EUR  |  USD
       +Analysen  |  Apotheken  |  Arzt  |  Interaktionen  |  Medikamente  |  MiGeL  |  Services  |  Spital  |  Zulassungsi.
       +Es ist ein Fehler aufgetreten:
       +Ihr Such-Stichwort ergibt ein sehr grosses Resultat. Bitte pr?zisieren Sie ihre Suche.
       +LGPL ,  2015  ywesee.com,  Commit-ID
       +Einstellungen  |  Hilfe  |  FAQ  |  Anmeldung  |  Kontakt  |  Home
     # ./spec/searchbar_spec.rb:286:in `block (3 levels) in <top (required)>'

Finished in 2 minutes 47.6 seconds (files took 2.34 seconds to load)
5 examples, 3 failures

Failed examples:

rspec ./spec/searchbar_spec.rb[1:26] # ch.oddb.org Interaktion should display not found for Warfarin which is not registered in Switzerland 
rspec ./spec/searchbar_spec.rb[1:28] # ch.oddb.org Preisvergleich should display not found for Warfarin which is not registered in Switzerland 
rspec ./spec/searchbar_spec.rb[1:30] # ch.oddb.org Preisvergleich und Inhaltsstoff should display not found for Warfarin which is not registered in Switzerland 

Also running on oddb-ci2 via bin/admin search_combined('Warfarin', 'de') returns #<ODDB::SearchResult:0x000000055d4a80> whereas on thinpower it results in ODBA::OdbaResultLimitError. I suspect that indices are no longer correct on thinpower. I will dump and load its database on oddb-ci2 to see whether I have then the same error. But this did not produce any error. Therefore I think the indices were newly generated when being imported. I propose to run jobs/rebuild_indices on thinpower and test afterwards again. Committed Added Tests for snapback and Warfarin

Zeno restarted rebuild_indices. Must add jobs/rebuild_indices to weekly running cron jobs. Add the line 1 19 * * 6 apache cd /var/www/oddb.org && /usr/local/bin/ruby jobs/rebuild_indices >/dev/null 2>&1 to let it run each Saturday at 7 PM. Must check next Sunday whether I got also line like the followin in /var/log/messages Nov 30 11:49:03 thinpower sudo: ywesee : TTY=pts/8 ; PWD=/var/www/oddb.org ; USER=apache ; COMMAND=jobs/rebuild_indices

view · edit · sidebar · attach · print · history
Page last modified on November 30, 2015, at 06:01 PM