< Niklaus.20141216-fix-address-correction | 2014 | Niklaus.20141210-fix-recall >>
---
Found the problem in src/util/oddbd where pharmacy_by_gln returned also if it matched a doctor.
Correcting a doctor works as clicking on the correct button gets redirected to http://oddb-ci2.dyndns.org/de/gcc/suggest_address/doctor/7601000201034/address/0/zone/doctors
Does not work for pharmacies as it get redirected to http://oddb-ci2.dyndns.org/de/gcc/suggest_address/pointer//zone/pharmacies which cannot be resolved correctly.
http://ch.oddb.org/de/gcc/suggest_address/hospital/7601002002592/address/0/zone/hospitals http://oddb-ci2.dyndns.org/de/gcc/suggest_address/doctor/7601000170545/address/0/zone/doctors
Problem is that the different views for (companies|doctors|pharmacies|hospitals)_list are quite similar, but have diverged over the years. Also we have some more problems to fix (when logged in a admin).
We have no watir tests for these admin pages.
Corrected select list for business_area (but it does not filter business_areas not applicable for pharmacies or registration_holders.
Corrected lists of doctors,pharmacies, hospitals. Suggest-address does not yet work for pharmacy. Tested with:
Now display but sending an e-mail failed with
RuntimeError At least one recipient must be a list "suggest_address"
Adding it in etc/oddb.yaml and restarting oddbd. Received the email. When opening the link contained in it got the error
undefined local variable or method `oid_or_ean' for #<ODDB::State::AddressConfirm:0x00000007094618> /var/www/oddb.org/src/state/global.rb:988:in `address_suggestion' /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.5/lib/sbsm/state.rb:203:in `_trigger' /var/www/oddb.org/src/state/global.rb:1003:in `_trigger' /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.5/lib/sbsm/state.rb:192:in `trigger' /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.5/lib/sbsm/session.rb:362:in `process'
But this error is a local $stdout.puts. Correcting it. Fixing all unit-tests.
Adding suggest_address thin_power in etc/oddb.yml (only for zeno).
Now the address suggestion sends an email and opening the URL contained in it looks okay (need login as admin).
Sending an address correction for a pharmacy failed with
rror in SBSM::Session#http_headers: /de/gcc NoMethodError undefined method `parent' for nil:NilClass /var/www/oddb.org/src/view/suggest_address_confirm.rb:27:in `go_back' /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'
For a hospital one can send an email, but it got attributed to the last visited doctor.
Pushed commits
The commit Return empty if no zsr found
makes less watir tests fail. Still waiting for Phillips update on his web site.
After running the import hospital Zeno reported the following two problems on ch.oddb.org.
NoMethodError:undefined method `city' for []:Array
NoMethodError: undefined method `city' for #<ODDB::Doctor:0x0000001419a820>
Cannot reproduce the error on oddb-ci2
Tried the links again on ch.oddb.org and they work now. Probably we had an inconsitent state in the db cache which went away after the restarting oddbd.