view · edit · sidebar · attach · print · history

Index>

20140805-remove-hayes-interactions

Summary

  • Remove Hayes interactions

Stumbled over http://dev.ywesee.com/Masa/20100916-understand-limitation-process where I see that Masa also needed about three days to understand how the limitationtext got modified. Keep this in mind for my next job adding zsr info to prescriptions!

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.

---

added comment for SALECD in oddb2xml.xsd

Answered question with commit Bumped version to 1.8.7 and added comment for SALECD in oddb2xml.xsd

Fixed travis errors with

We still have a problem that the SALECD for migel products have 'I' instead of 'A'. Committed locally a fix, but banging my head now why some builder spec must have read 'Pharma' before 'NonPharma' and vice versa. Something is not working as expected!

Okay. I found the culprit. The soap response was not taking in account the language/type parameters correctly. After fixing this problem rake spec works. Waiting for rake test to complete for pushing my local commit.

Remove Hayes interactions

As we use now the interactions from epha there is no need to keep the hayes interactions. It is however not that simple, as it touches quite a few files.

Here a summary of my analysis of what has to be removed:

Files to be removed.

  • ./src/plugin/hayes.rb
  • ./src/plugin/interaction.rb
  • ./test/test_plugin/hayes.rb
  • ./test/data/html/interaction/hayes
  • ./test/test_plugin/interaction.rb

I think I must also remove the cpy450. This would mean:

  • remove src/model/cyp450.rb
  • remove src/model/cyp450connection.rb
  • change
    • src/util/oddbapp.rb
    • src/view/interactions/basket.rb
    • src/state/interactions/basket.rb
    • src/model/substance.rb
    • src/util/persistance.rb

Questions I am asking myself is how the application will react when we remove these entities and will load database elements which contain or reference them. Must we first remove them?

Running the watir tests brought up the following errors

error in SBSM::Session#to_html: /de/gcc/rezept/ean/7680576730049,7680317061142,7680193950301,7680353520153,7680516821226,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:100:in `drug'
/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'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/var/www/oddb.org/src/view/drugs/prescription.rb:82:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/var/www/oddb.org/src/view/drugs/prescription.rb:183:in `new'
/var/www/oddb.org/src/view/drugs/prescription.rb:183:in `drug'
/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'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/var/www/oddb.org/src/view/drugs/prescription.rb:167:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/var/www/oddb.org/src/view/drugs/prescription.rb:200:in `new'
/var/www/oddb.org/src/view/drugs/prescription.rb:200:in `block in init'
/var/www/oddb.org/src/view/drugs/prescription.rb:199:in `each'
/var/www/oddb.org/src/view/drugs/prescription.rb:199:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:286:in `compose_component'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/form.rb:82:in `init'
/var/www/oddb.org/src/view/drugs/prescription.rb:348:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:286:in `compose_component'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/var/www/oddb.org/src/view/publictemplate.rb:63:in `new'
/var/www/oddb.org/src/view/publictemplate.rb:63:in `content'
/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'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/var/www/oddb.org/src/view/publictemplate.rb:60:in `init'
/var/www/oddb.org/src/view/privatetemplate.rb:17:in `init'
/var/www/oddb.org/src/view/drugs/prescription.rb:563:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/state.rb:252:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/state.rb:252:in `view'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/state.rb:186:in `to_html'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/session.rb:450:in `to_html'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/session.rb:173:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/session.rb:171:in `drb_process'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
ODDB::View::Drugs::PrescriptionDrugHeader::COMPONENTS[[1, 0]] in create(drug)
ODDB::View::Drugs::PrescriptionDrug::COMPONENTS[[0, 0]] in create(drug)
ODDB::View::Drugs::PrescriptionForm::COMPONENTS[[0, 1]] in create(ODDB::View::Drugs::PrescriptionDrugDiv)
ODDB::View::Drugs::PrescriptionComposite::COMPONENTS[[0, 0]] in create(ODDB::View::Drugs::PrescriptionForm)
ODDB::View::Drugs::Prescription::COMPONENTS[[0, 3]] in create(content)
error in SBSM::Session#http_headers: /de/gcc/rezept/ean/7680576730049,7680317061142,7680193950301,7680353520153,7680516821226,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:100:in `drug'
/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'

Fixed this problem. Trying to solve 4 problems when running rake test. Done. Still failures in test.log.

Running jobs/export_daily to ensure that everything is okay. This works, but running rspec spec still gives me the following output for bin/oddbd

error in SBSM::Session#to_html: /de/gcc/search/zone/drugs/search_query/Aspirin/search_type/st_oddb?
NoMethodError
undefined method `galenic_form' for 1000000000:Bignum
/var/www/oddb.org/src/view/additional_information.rb:133:in `block in compositions'
/var/www/oddb.org/src/view/additional_information.rb:131:in `collect'
/var/www/oddb.org/src/view/additional_information.rb:131:in `compositions'
/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'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:67:in `block in compose_list'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:65:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:65:in `each_with_index'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:65:in `compose_list'
/var/www/oddb.org/src/view/drugs/resultlist.rb:337:in `block in compose_list'
/var/www/oddb.org/src/view/drugs/resultlist.rb:332:in `each'
/var/www/oddb.org/src/view/drugs/resultlist.rb:332:in `compose_list'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:54:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:129:in `init'
/var/www/oddb.org/src/view/drugs/resultlist.rb:271:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:286:in `compose_component'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/var/www/oddb.org/src/view/drugs/result.rb:126:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/var/www/oddb.org/src/view/publictemplate.rb:63:in `new'
/var/www/oddb.org/src/view/publictemplate.rb:63:in `content'
/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'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/var/www/oddb.org/src/view/publictemplate.rb:60:in `init'
/var/www/oddb.org/src/view/resulttemplate.rb:29:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/state.rb:252:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/state.rb:252:in `view'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/state.rb:186:in `to_html'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/session.rb:450:in `to_html'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/session.rb:173:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.6/lib/sbsm/session.rb:171:in `drb_process'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
ODDB::View::Drugs::ResultList::COMPONENTS[[12, 0]] in create(compositions)
ODDB::View::Drugs::ResultComposite::COMPONENTS[[0, 2]] in create(ODDB::View::Drugs::ResultList)
ODDB::View::Drugs::Result::COMPONENTS[[0, 2]] in create(content)

Will continue tomorrow to look for a fix for this problem.

view · edit · sidebar · attach · print · history
Page last modified on August 05, 2014, at 08:23 PM