view · edit · sidebar · attach · print · history

Index>

20151201-evidentia-omit-fi-link

Summary

  • 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.

Fix export generics

The following error could be easily reproduced here.

Error: ArgumentError
Message: comparison of ODBA::Stub with ODBA::Stub failed
Backtrace:
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `sort'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:186:in `factored_compositions'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:124:in `comparables'
(druby://localhost:10005) /var/www/oddb.org/src/model/package.rb:213:in `comparables'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/generics_xls.rb:96:in `block in export_generics'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:183:in `each'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:183:in `each_package'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:155:in `block in each_package'
(druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:154:in `each_value'
(druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:154:in `each_package'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/src/util/oddbapp.rb:709:in `block in each_package'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `each_value'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/src/util/oddbapp.rb:708:in `each_package'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/generics_xls.rb:94:in `export_generics'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:112:in `block in export_generics_xls'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:253:in `call'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:253:in `block in safe_export'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/tempfile.rb:316:in `open'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:252:in `safe_export'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:110:in `export_generics_xls'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
/var/www/oddb.org/src/plugin/xls_export.rb:22:in `export_generics'
/var/www/oddb.org/src/util/updater.rb:122:in `block in export_generics_xls'
/var/www/oddb.org/src/util/updater.rb:549:in `call'
/var/www/oddb.org/src/util/updater.rb:549:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:120:in `export_generics_xls'
/var/www/oddb.org/src/util/updater.rb:297:in `update_bsv_followers'
jobs/import_bsv_followers:14:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `call'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_bsv_followers:12:in `<module:Util>'
jobs/import_bsv_followers:11:in `<module:ODDB>'
jobs/import_bsv_followers:10:in `<main>'

Home link does not work

When going forward from a fachinfo-online link to changes, diff and back the last step does not go back to home.

This is related that we use sometimes links like de/gcc/fachinfo/swissmedicnr/44493 and at other times de/gcc/fachinfo/reg/44493. I propose to replace everywhere swissmedicnr by reg. This will break some old link, but will reduce the complexity of the code. Also swissmedicnr appears only 5 time in the source code. See commit Replace in all URL swissmedicnr by reg

This was easy, but does not yet solve all problems. We still have URL like /de/gcc/show/fachinfo/44493/diff, /de/gcc/fachinfo/reg/44493

  • de/gcc/show/reg/56091
  • de/gcc/show/state_id/69867562742700/reg/56091/seq/01
  • de/gcc/show/state_id/65925360/reg/56091/seq/01/pack/002
  • de/gcc/fachinfo/reg/56091
  • de/gcc/print/fachinfo/56091
  • de/gcc/feedbacks/reg/56091/seq/01/pack/002

Changing Watir tests to be logged in as Desitin, not as admin user, as most of our clients are not admins!

Fixed some problems when running test-suites with commits Another try to make unit test finish on travis-ci and Fix running test for ext/fiparse/test_fachinfo_hpricot.rb

Fixed an old problem, that the download dir of firefox/chrome was not set via profiles and that one was sometimes prompted to save. Pushed commit Updated rspec version. Cleanup spec test

Will continue tomorrow to fix the link problem.

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

Still have the problem that thinpower and oddb-ci2 don't return the same result when searching for Warfarin, e.g. calling bin/admin search_combined('Warfarin', 'de').

I find however the following error in /service/ch.oddb/log/main/current

@40000000565d650c29e00244 explain_colors {[0, 0]=>:explain_original, [0, 1]=>:explain_generic, [0, 2]=>"explain_unknown"}
@40000000565d650c29e04c7c failsafe rescued ODBA::OdbaResultLimitError < StandardError
@40000000565d650c29e05064 ODBA::OdbaResultLimitError
@40000000565d650c29e05064 /var/www/oddb.org/src/util/oddbapp.rb:1662:in `instance_eval'
@40000000565d650c29e05064 /var/www/oddb.org/src/util/oddbapp.rb:109:in `retrieve_from_index'
@40000000565d650c29e0544c /var/www/oddb.org/src/util/oddbapp.rb:1055:in `search_by_interaction'
@40000000565d650c29e05c1c /var/www/oddb.org/src/util/oddbapp.rb:994:in `search_oddb'
@40000000565d650c29e05c1c /var/www/oddb.org/src/util/oddbapp.rb:1123:in `search_combined'
@40000000565d650c29e05c1c (eval):1:in `block (2 levels) in _admin'
@40000000565d650c29e06004 /var/www/oddb.org/src/util/oddbapp.rb:1662:in `instance_eval'
@40000000565d650c29e06004 /var/www/oddb.org/src/util/oddbapp.rb:1662:in `block (2 levels) in _admin'
@40000000565d650c29e067d4 /var/www/oddb.org/src/util/failsafe.rb:10:in `call'
@40000000565d650c29e067d4 /var/www/oddb.org/src/util/failsafe.rb:10:in `failsafe'
@40000000565d650c29e07f44 /var/www/oddb.org/src/util/oddbapp.rb:1661:in `block in _admin'

I can limit the error via bin/admin to

ch.oddb> search_by_atc('Warfarin')
-> []
ch.oddb> search_by_sequence('Warfarin')
-> []
ch.oddb> search_by_company('Warfarin')
-> []
ch.oddb> search_by_substance('Warfarin')
-> []
ch.oddb> search_by_indication('Warfarin')
-> []
ch.oddb> search_by_interaction('Warfarin', 'de')
-> ODBA::OdbaResultLimitError

Dumping on oddb-ci2 and thinpower the text of all interactions of the fachinfos via bin/admin File.open('/tmp/interaction2.txt', 'w+') { |f| registrations.sort.each{|key, reg| f.puts "#{reg.iksnr}: #{reg.fachinfo.interaction_text(:de)}" if reg.fachinfo}}. The two files are identical!

I think the problems is rooted in differnt versions of Gentoo, postgresql or gems on oddb-ci2 and thinpower. I don't have much motivation into looking even deeper into this problem when I am quite confident that upgrading to Ruby 2.2.x, a newer PosgreSQL and or running everything in a docker container would allow me to resolve this problem, as it is already solved on oddb-ci2.

Zeno wants me to compare all gems I have on oddb-ci2 (Attach:gems_oddb_ci2.txt) with those on thinpower (Attach:gems_thinpower.txt).

There are many differences. As I had (before I started using rbenv for my watir tests) installed quite a few test gems. Starting by removing them.

Downgrading/installing one gem after another

  • rubyzip --version=0.9.9
  • columnize --version=0.8.9
  • json --version=1.5.4
  • nokogiri --version=1.6.1
  • rubyzip --version=1.1.6
  • rubygems-update --version=2.2.1
  • rdoc --version=3.9.4
  • rmagick --version=2.13.2
  • ydocx --version=1.2.5
  • rake-compiler --version=0.7.9
  • gruff --version 0.3.6
  • i18n --version=0.6.0
  • rack --version=1.3.5
  • rake --version=0.9.2.2
  • multi_json --version=1.0.4
  • sax-machine --version 0.1.0
  • slop --version=3.4.4
  • unf --version=0.0.5
  • unf_ext --version=0.0.5
  • treetop --version=1.4.1
  • webrobots --version=0.0.12
  • net-http-persistent --version=2.7
  • net-http-digest_auth --version=1.2
  • bundler --version=1.5.2

Now I have less gems installed than on thinpower, but all installed have the same version as the hightest one thinpower. See Attach:gem.list.oddb-ci2.neu.txt

But there are still no problem search for Warfarin via interaction on oddb-ci2.

BAG added value C (aka CoMarketing) to GENCD in Preparations.xml

Pushed commit Added value 'C' (aka Co-Marketing) for GENCD from BAG/Preparations.xml

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

Looking at where the fachinfo link is created. If I hadn't put in a debug puts (which failed because of a typo), my changes would have been okay. Running all watir test for evidentia, point me to an error (ch.oddb.org should list all SL products before the Non-SL) I have to investigate, too.

I don't since when I have (after search for Levetiracetamum on evidentia.ch) again Non-SL drugs (Infusionskonzentrat) before SL drugs (Filmtabletten).

Pushing my commit Evidentia: No link if no fachinfo

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