view · edit · sidebar · attach · print · history

Index>

20140326-fix-ajax-search-3

Summary

  • Fix Ajax search on Internet explorer

Commits

Index

Keep in Mind
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • Search nach Anwendung (indications), z.B. Konjunktivitis, does not report all occurrences in the section "Anwendung" of Fachinfo. Probably index is corrupted or not set up correctly.
  • Error: Patents with could not connect to www.swissreg.ch: #<Net::HTTPInternalServerError:0x007f8a7d69bb58>
  • vagrant-oddb.org: cleanup installation for yus with ruby 1.8, logrotate.conf and local vhosts for tests

---

Install windows 7 in a virtualbox environment

Installed virtualbox-bin. Adapted modules.conf. Added myself to the vboxusers group. Now VirtualBox starts find.

Installed a Windows-7 image using the license provided by Zeno yesterday. Installed the following stuff to be able to use this VM.

  • Chromium
  • Git 1.9
  • Notedpad++
  • Ruby.19 (Using the Window Installer)
  • Firefox
  • FreeCommander

Now I am able to run the watir tests (Removing setting the path).

Fix Ajax search on chrome and Internet explorer

These fixes must be made:

  1. both interactions for B01AA04: Phenprocoumon <=> M01AG01: Mefenaminsäure Erhöhtes Blutungsrisiko must be shown, regardsless in which order we added the medicaments, e.g. http://ch.oddb.org/de/gcc/home_interactions/7680317061142,7680353520153,7680193950301 (or only Ponstan and Marcoumar http://ch.oddb.org/de/gcc/rezept/ean/7680353520153,7680193950301)
  2. in the rezept there is a superfluos white space between the header an the interaction (if there an interaction)
  3. The field remark is (wrongly) pushed to the right, when we have large remarks. E.g http://ch.oddb.org/de/gcc/rezept/ean/7680353520153,7680193950301
  4. Must display and work correctly on Internet Explorer
  5. csv export of rezept does not work
  6. Printing a rezept does not work
  7. radio buttons and repetion (pull down) must work

Fixed display both directions with

Fixed width of interaction and removing space above interacion info with commit Suppress leading space in rezept before interaction

The field prescription_comment is still not correctly aligned if the browser is extremly wide.

The field about prescription useage are weird, when the browser is very small.

Using the IE developer-tools to try to find the error.

When sending the HTML of http://oddb-ci2.dyndns.org/de/gcc/rezept/ean/7680576730049 to verify it I get 23 errors in the HTML, 170 in the CSS. This is not very helpful.

Therefore I tried to debug the javascript. Added a new drug. Broke in searchbar.rb in the function selectXhrRequest and found that the variable @var searchbar = dojo.byId('#{id}');@ is undefined.

Replaced it by window.location.href + some minor corrections. Now it work unter IE, too. But my watir tests don't work, because entering via the chooser-toolbar does not work. After looking around, found that I must

Then it works quite well, but I still had 11 errors when testing under IE on Windows7. The problem is, that parsing the html text for a result like Aspirin takes forever on IE and kicks in a limitation.

Remarked that the pull down menus to repeat don't work anymore. A quick test showed, that they work only when we have exactly one drug selected.

Recorded a watir test and found one reason why the csv-export did not work. bin/oddbd displayed

rror in SBSM::Session#to_html: /de/gcc
NoMethodError
undefined method `barcode' for nil:NilClass
/var/www/oddb.org/src/view/drugs/prescription.rb:871:in `block in extract'
/var/www/oddb.org/src/view/drugs/prescription.rb:867:in `collect'
/var/www/oddb.org/src/view/drugs/prescription.rb:867:in `extract'
/var/www/oddb.org/src/view/drugs/prescription.rb:798:in `block in to_csv'
/var/www/oddb.org/src/view/drugs/prescription.rb:796:in `each'
/var/www/oddb.org/src/view/drugs/prescription.rb:796:in `each_with_index'
/var/www/oddb.org/src/view/drugs/prescription.rb:796:in `to_csv'
/var/www/oddb.org/src/view/drugs/prescription.rb:821:in `to_html'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:181:in `to_html'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:447:in `to_html'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:173:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
/usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/usr/lib64/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'

Adding some debugging, showed me the fields extracted were

867: Extracting pack nil
867: Extracting pack #<ODBA::Stub:70351663371540#981074 @odba_class=ODDB::Package @odba_container=70351663324620#96647>
873: Extracting key :barcode
873: Extracting key :name_with_size
873: Extracting key :price_public
873: Extracting key :company_name

After a small fix prescription.to_csv don't crash. But display only comment of last drug, it exports to CSV at least the correct drug names, but only the comment of the last drug. e.g.

"";"";"";w

26.03.2014

;;;




7680529041024;Cosaar 100, 28 Tablette(n);42.20;"MSD Merck Sharp &amp; Dohme AG"




7680193950301;Marcoumar, 100 Tablette(n);20.80;MEDA Pharma GmbH




7680353520153;Ponstan 125 mg, 6 Suppositorien;5.90;Pfizer AG

vor dem Essen

Einmaliges Rezept

Etwas kluges zum Ponstan

view · edit · sidebar · attach · print · history
Page last modified on March 26, 2014, at 05:58 PM