view · edit · sidebar · attach · print · history

Index>

20140820-fix-prescription-errors

Summary

  • Creating prescription after delete all should work

Commits

Index

Keep in Mind
  • 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!
  • One unit-test for searchbar fails and might be a clue why searching does not work correctly.
  • Added two skip in test/test_plugin/rss.rb. Why does the mocking not work there anymore?
  • Make ext/swissindex/test/test_swissindex.rb and skipping tests in migel-gem pass.

---

Creating prescription after delete all should work

Tried to extract the javascript snippets in searchbar to an external js file, but failed miserably as it is too mixed up.

Running all tests make the following error show up

/usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
ODDB::View::Drugs::PrescriptionPrintInnerComposite::COMPONENTS[[0, 1]] in create(name)
ODDB::View::Drugs::PrescriptionPrintComposite::COMPONENTS[[0, 8]] in create(document)
ODDB::View::Drugs::PrescriptionPrint::COMPONENTS[[0, 1]] in create(content)
InteractionChooserDrug.url http://oddb-ci2.dyndns.org/de/gcc/home_interactions/zsr_P006309
InteractionChooserDrug.url http://oddb-ci2.dyndns.org/de/gcc/home_interactions/zsr_P006309
InteractionChooserDrug.url http://oddb-ci2.dyndns.org/de/gcc/home_interactions/zsr_P006309
error in SBSM::Session#http_headers: /de/gcc/print/prescription/zsr_P006309/ean/7680583920112/7680390530474/7680586430045/7680576730049/7680552240258/7680588680028/7680517560100/7680587340015/7680352630396/7680480880748
NoMethodError
undefined method `name' for []:Array
/var/www/oddb.org/src/model/package.rb:193:in `company_name'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/view/drugs/prescription.rb:416:in `name'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:68:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:286:in `compose_component'
        error in SBSM::Session#to_html: /de/gcc/search/zone/drugs/search_query/Aspirin/search_type/st_oddb?
NoMethodError
undefined method `listed?' for []:Array

As the package 7680576730049 throws the error NoMethodError undefined method `name' for []:Array

But I have now problems that changing the ZSR-ID does not trigger an update. Found the changes in one of my aborted changesets. Now things look better.

The watir tests are quite comprehensive and make me discover always that there are many interactions betweent the different parts of our work as the instant searchbar is used in so many different views. Therefore it was way too easy to change a little thing in the searchbar and to break stuff in the interactions or the prescription.

Export to CSV does not work. Looks like for printing we set the correct request_path, whereas I don't know yet how to specify the request-path for the the CSV. Here the relevant snippet from src/view/drugs/prescription.rb

    print.onclick = "window.open('#{new_url}');"
    buttons << print
    buttons << '&nbsp;'
    buttons << post_event_button(:export_csv)

Pushed commit Fix prescription ZSR-id and interaction. I still have the following three watir failures:

  • ./spec/fachinfo_search_spec.rb:76 # ch.oddb.org should show the chapter unwanted effects for Schwindel and show 61374 Quetiapin Sandoz:
  • ./spec/preferences_spec.rb:19 # ch.oddb.org should save zsr in preferences
  • ./spec/rezept_and_instantsearch_spec.rb:258 # ch.oddb.org should not throw a an error with a problematic combination of drugs
  • ./spec/rezept_and_instantsearch_spec.rb:393 # ch.oddb.org should show the correct url after deleting a medicament

I think all correspond to known deficiencies or may be even a false warning (ch.oddb.org should save zsr in preferences).

view · edit · sidebar · attach · print · history
Page last modified on August 20, 2014, at 07:02 PM