view · edit · sidebar · attach · print · history

Index>

20151207-trademark-first

Summary

  • Search by trademark should list drugs containing the trademark first
  • Snapback-History does not work correctly
  • Missing drop-down menu for search-type in changelogs and diffs

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.

Evidentia: Search by trademark should list drugs containing the trademark first

As mentioned in https://mail.google.com/mail/u/0/#inbox/15149ab97f6289aa in the Evidentia LNF a search for Duodopa® should result in all drugs containing the trademark on top (using the <normal> sort algorithms), then the rest.

Creating a watir test. Testing only whether the first product listed contains Duodopa in its name. Testing all, would be take more time to program.

Now the Watir test pass. Must show whether we broke other unit and watir tests. Evidentia has a problem with NON-SL before SL entries. I must rethink the test to consider the fact, that we search by galenic groups first. Fixed this problem. Must fix unit test test/test_model/search_result.rb, too.

Looking into who I can install xvfb under gentoo/funtoo, to be able to run watir tests withouy being distracted by chromium windows. As stated in https://wiki.gentoo.org/wiki/X_server xvfb is by default not installed. Will look whether I will need the changes from https://gist.github.com/joshdevins/1588066 to make xvfb work. Called USE="xvfb" emerge xorg-server

Pushed commit Trademarks first for evidentia

Snapback-History does not work correctly

When going from the Fachinfo-Link at home 3 step to details of changes, then clicking in the snapback, the last click to home does not go back to home, but the last search. This must be fixed. Eg.

  1. After clicking on e.g Lubex, we come to http://oddb-ci2.dyndns.org/de/gcc/fachinfo/reg/40501 and home links to http://oddb-ci2.dyndns.org/de/gcc/home_drugs/ which is okay. Click in Änderungen anzigen
  2. Same at http://oddb-ci2.dyndns.org/de/gcc/show/fachinfo/40501/diff. Click in "Lubex"
  3. Same at http://oddb-ci2.dyndns.org/de/gcc/show/fachinfo/40501/diff/03.12.2015. Click in snapback Änderungen
  4. Same in http://oddb-ci2.dyndns.org/de/gcc/show/fachinfo/40501/diff. Click in "Fachinformation to Lubex"
  5. In http://oddb-ci2.dyndns.org/de/gcc/fachinfo/reg/40501. Now the link of the snapback home changed to http://oddb-ci2.dyndns.org/de/gcc/show/fachinfo/40501/diff

The difference is that following the backlink removes the part show from the URL. Why?

Added a watir test to catch errors with linking to home. Fixed the problem. Running now all unit and watir tests to ensure that I broke nothing.

Pushed commit Fix links to home for changelog, which contains also some fixes for watir-tests.

Missing drop-down menu for search-type in changelogs and diffs

In order to fix it I had to add in the class FachinfoDocumentChangelogs < View::PrivateTemplate the following line SEARCH_HEAD = View::SelectSearchForm. This made the search_query and search_type item display.

Added a watir test in the spec/smoketest_spec.rb, too. Pushed commit Display search_type for change_logs, too

Export generika to excell must work

We got the following e-mail

Plugin: ODDB::XlsExportPlugin
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:711: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:710: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:307:in `update_bsv_followers'
/var/www/oddb.org/src/util/updater.rb:208:in `run'
jobs/import_daily:13: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_daily:12:in `<module:Util>'
jobs/import_daily:11:in `<module:ODDB>'
jobs/import_daily:10:in `<main>'

By adding some debugging output I was able to localize the culprit, as shown with this bin/admin snippet

registration('56828').sequence('01').comparables
-> comparison of ODBA::Stub with ODBA::Stub failed
ch.oddb> registration('56828').name_base
-> InductOs 1.5 mg/ml
ch.oddb> registration('56828').active?
-> true
ch.oddb> registration('56828').public?
-> true

Must show, whether we have several of them or not. Must rerun export, as I forgot to log the exportd, too. But the exporter generated a correct data/downloads/generics.xls.zip. Willl continue tomorrow.

view · edit · sidebar · attach · print · history
Page last modified on December 07, 2015, at 05:14 PM