Example is Gentamycin, which is found only in interaction sections of Fachinfo. Added watir tests for these two examples. Fixing the issue was easy. Tests pass. Now running the whole watir test suite before pushing commit https://github.com/ngiger/oddb.org/commit/a39698732794652b2947fe6dbadad0b90b9142c2 Don't consider interaction in price search
When entering Cordarone we find first "Cordarone Amiodaroni Hydrochloridum Injektionslösung" before "Cordarone Amiodaroni Hydrochloridum Tabletten". Evidentia would like to have it differently. Adding debugging info for evidentia. Another example is Avalox. Problem occurs when we have several medicaments with the same trademark time and one is original and the other one a generics (even if they come both from the same company!). This case is not covered by any unit test at the moment. Fix was easy.
Pushed commmit Fix sort order of orginal for evidentia
Found many entries in the error log. looks like it startet like this
log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: Mon Jan 18 04:27:02 +0100 2016 - 70092467200720 - DRb::DRbConnError - druby://localhost:10001 - #<Errno::ECONNREFUSED: Connection refused - connect(2)> log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:736:in `open' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:729:in `each' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:729:in `open' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1189:in `initialize' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1169:in `new' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1169:in `open' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1085:in `method_missing' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1103:in `with_friend' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/drb/drb.rb:1084:in `method_missing' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/cgi/drbsession.rb:20:in `initialize' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/cgi/session.rb:273:in `new' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/cgi/session.rb:273:in `initialize' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:88:in `new' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:88:in `drb_process' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:61:in `process' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /var/www/oddb.org/doc/index.rbx:21 log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `load' log/oddb/error_log:[Mon Jan 18 04:27:02 2016] [error] access to /de/gcc/rezept/ean/7680528970172 failed for (null), reason: /usr/lib64/ruby/1.8/apache/ruby-run.rb:53:in `handler' log/oddb/error_log:[Mon Jan 18 04:27:05 2016] [error] access to /de/gcc/feedbacks/reg/65980/seq/01/pack/001 failed for (null), reason: Mon Jan 18 04:27:05 +0100 2016 - 70092467184460 - DRb::DRbConnError
Looks like DRB service on port 10001 SERVER_URI_FOR_CRAWLER in the log /service/ch.oddb-crawler/log/main/current we find
@40000000569c88410e9f7a14 Attention: monkey-patching CSV::Cell @40000000569c88410e9f7dfc could not find htmlgrid.so, falling back to pure-ruby class @40000000569c88410e9f81e4 process: Oddb (OddbApp:Crawler) @40000000569c88410e9f81e4 init system @40000000569c88410e9f85cc init system: 10.118303521 @40000000569c88410e9f85cc setup drb-delegation @40000000569c88410e9f85cc reset @40000000569c88410e9f85cc reset: 10.118456945 @40000000569c88410e9f85cc system initialized @40000000569c88410e9f89b4 initialized: 10.118519694 @40000000569c88410e9fb0c4 explain_colors {[0, 0]=>:explain_original, [0, 1]=>:explain_generic, [0, 2]=>"explain_unknown"} @40000000569c9f9a1b46b82c explain_colors {[0, 0]=>:explain_original, [0, 1]=>:explain_generic, [0, 2]=>"explain_unknown"} @40000000569c9f9a1b46c3e4 explain_colors {[0, 0]=>:explain_original, [0, 1]=>:explain_generic, [0, 2]=>"explain_unknown"} @40000000569c9f9a1b46c3e4 explain_colors {[0, 0]=>:explain_original, [0, 1]=>:explain_generic, [0, 2]=>"explain_unknown"} @40000000569c9f9a1b46c7cc error in SBSM::Session#process: /en/oekk/print/fachinfo/25144 @40000000569c9f9a1b46c7cc NoMethodError @40000000569c9f9a1b46cbb4 undefined method `package' for #<OddbPrevalence:0x00000005c0bbd8> @40000000569c9f9a1b4719d4 /var/www/oddb.org/src/util/oddbapp.rb:952:in `search_oddb' @40000000569c9f9a1b4719d4 /var/www/oddb.org/src/util/session.rb:198:in `search_oddb' @40000000569c9f9a1b4719d4 /var/www/oddb.org/src/state/global.rb:890:in `_search_drugs' @40000000569c9f9a1b471dbc /var/www/oddb.org/src/state/global.rb:909:in `_search_drugs_state' @40000000569c9f9a1b471dbc /var/www/oddb.org/src/state/global.rb:862:in `search' @40000000569ca02a265dd894 error in SBSM::Session#process: /de/gcc/search/zone/drugs/search_query/2588492/search_type/st_oddb @40000000569ca02a265de064 NoMethodError @40000000569ca02a265de44c undefined method `package' for #<OddbPrevalence:0x00000005c0bbd8> @40000000569ca02a265de44c /var/www/oddb.org/src/util/oddbapp.rb:952:in `search_oddb' @40000000569ca02a265de834 /var/www/oddb.org/src/util/session.rb:198:in `search_oddb' @40000000569ca02a265de834 /var/www/oddb.org/src/state/global.rb:890:in `_search_drugs' @40000000569ca02a265e326c /var/www/oddb.org/src/state/global.rb:909:in `_search_drugs_state' @40000000569ca02a265e326c /var/www/oddb.org/src/state/global.rb:862:in `search' @40000000569ca0471f09f9ec error in SBSM::Session#process: /de/gcc/search/zone/drugs/search_query/2588492 @40000000569ca0471f0a05a4 NoMethodError @40000000569ca0471f0a05a4 undefined method `package' for #<OddbPrevalence:0x00000005c0bbd8> @40000000569ca0471f0a098c /var/www/oddb.org/src/util/oddbapp.rb:952:in `search_oddb' @40000000569ca0471f0a098c /var/www/oddb.org/src/util/session.rb:198:in `search_oddb' @40000000569ca0471f0a0d74 /var/www/oddb.org/src/state/global.rb:890:in `_search_drugs' @40000000569ca0471f0a0d74 /var/www/oddb.org/src/state/global.rb:909:in `_search_drugs_state' @40000000569ca0471f0a57ac /var/www/oddb.org/src/state/global.rb:862:in `search'
We should probably have a look at all the errors in the log and fix these problems. In this case we try to search by pharmacode, which in any case is no longer supported.
Looks like in my commit Remove pharmacode from bsv-import form 21 Oct 2015 I removed the method package in src/util/oddbapp.rb without removing its use search_oddb. Should we still offer the search pharmacode?
Yes. We should. Adapting the test
Just stumbled over the case that IKSNR 00675 Pro-Symbioflor® has a fachinfo in swissmedicinfo.ch but not on ch.oddb.org.
ch.oddb> registration('00675').fachinfo.class -> NilClass ch.oddb> registration('00675').name_base -> Pro-Symbioflor
Also found that the definition of the method active_sequences in src/util/oddbapp.rb is not returning the expected result. There are cases like IKSNR 60811 Keragraf, which have an active registration, but no package attached. Modifying the method and calling jobs/rebuild_indices unwanted_effects_index_de
to see whether this fixes the problem with Fortex, which should not return any drugs.
The index about unwanted_effects seems to be wrong, as I could not find any occurrence of Fortex in the sequences given back. I think this might be related to an error in the used dictionary.
Pushed commit Reactivate search by pharmacode
Looking for minimal invasive way to make it work after rename Migel -> SwissIndex in oddb.org. This should be fixed withRenamed SwissindexNonPharma -> SwissindexMigel. Looking whether it works on thinpower. Had to restart the swissindex servicies.
Fixed with commit Fix Präklinische Daten for evidentia
Why is this FI not present? Looking in my logs I find
ywesee@thinpower /var/www/oddb.org $ grep 00675 log/oddb/debug/2016/01.log 7680006750012: http://ch.oddb.org/de/gcc/drug/reg/00675/seq/01/pack/001 2016-01-12 11:19:09 +0100: deactivate_not_found_package check "00675". 0 @deletes_packages 7680006750012: http://ch.oddb.org/de/gcc/drug/reg/00675/seq/01/pack/001