view · edit · sidebar · attach · print · history

Index>

20141117-new-hc-provider-view

Summary

  • Add view hc-provider for doctors/hospital/pharamacies

Commits

(medreg branch)

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!

---

Add view hc-provider for doctors/hospital/pharamacies

I add the forgotten file src/model/hc_provider.rb and now accessing http://oddb-ci2.dyndns.org/de/gcc/home_hc_providers throws undefined method `hc_provider_count' for #<ODDB::Session:0x0000000ac21078>. Fixing it.

Now home_hc_providers show up, but search via locality, name or GLN, e.g. http://oddb-ci2.dyndns.org/de/gcc/search/zone/hc_providers/search_query/7601000254207? always returns Ihr Such-Stichwort: "7601000254207" hat ein leeres Resultat ergeben. Also the pulldown menu for the search does not contain an entry for hc_provider. Changed code to make the hc_provider list appear in the screen.

Now testging whether the old doctors interface still works. Searching for doctors in Mollis http://oddb-ci2.dyndns.org/de/gcc/search/zone/doctors/search_query/Mollis? returned NoMethodError undefined method `join' for "055-6122222":String. It looks like new addresses/phone numbers were not added properly.

Fixed various minor problems (always by adding a corresponding unit-test first). Also for searching the hc_providers I added a seedug if the key is a valid ean13. In src/util/oddbapp.rb the functions looks now like

  def search_hc_providers(key)
    result = [ hc_provider_by_gln(key)] if key.to_s.match(VALID_EAN13)
    result ||= search_hospitals(key)
    result ||= search_doctors(key)
    result ||= search_companies(key)
    result
  end

Now http://oddb-ci2.dyndns.org/de/gcc/search/zone/hc_providers/search_query/7601000254344? returns NoMethodError undefined method `narcotics' for #<ODDB::Doctor:0x007fe83846b810> with the following abbreviated stack trace

error in SBSM::Session#to_html: /de/gcc/search/zone/hc_providers/search_query/7601000254344?
NoMethodError
undefined method `narcotics' for #<ODDB::Doctor:0x007fe83846b810>
/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/hc_providers/hc_providerlist.rb:85:in `narcotics'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:68:in `create'

Okay. These kind of errors were expected as I only copied the hospital view and now I get a correct list of (one) doctors via http://oddb-ci2.dyndns.org/de/gcc/search/zone/hc_providers/search_query/7601000254344?. (See third attachment). Neither the map search nor the details work. Search for newly imported doctor gives the same result via http://oddb-ci2.dyndns.org/de/gcc/search/zone/hc_providers/search_query/7601000850614?

A search using the locality "Mollis" returns again an empty result, but with the text

Ihr Such-Stichwort hat zu keinem Suchergebnis geführt. Bitte
überprüfen Sie die Schreibweise und versuchen Sie es noch
einmal.
explain_search_hc_provider

Added explain_search_hc_provider to the custom/lookandfeelbase.rb. Corrected also the search text for explain_search_hospital and doctors to mention the GL (aka EAN13).

Now I have various distinct problems to solve:

  • Fix search by name, locality, etc
  • Fix import to correctly add address
  • Fix hc_provider_view to display the correct details.
  • When logged I don't see anymore the hc_provider when displaying the home screen.

The stack trace when displaying details is like the following

error in SBSM::Session#to_html: /de/gcc/hc_provider/ean/7601000254344
NoMethodError
undefined method `join' for "055-6122222":String
/var/www/oddb.org/src/view/address.rb:155:in `fons'
/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/address.rb:65: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/hc_providers/hc_provider.rb:59:in `new'
/var/www/oddb.org/src/view/hc_providers/hc_provider.rb:59:in `address'
/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'
<..>

Added a work around when fon/fax numbers are a String and not an Array. See commit Fix view. fon/fax as strings. Help texts Now http://oddb-ci2.dyndns.org/de/gcc/hc_provider/ean/7601000254344 and http://oddb-ci2.dyndns.org/de/gcc/doctor/ean/7601000254344 display some information, albeit not the correct one.

In http://oddb-ci2.dyndns.org/de/gcc/hc_provider/ean/7601000254344 vCard and map search dont word correctly.

In http://oddb-ci2.dyndns.org/de/gcc/doctor/ean/7601000254344 the Facharzttitel and Fertigkeitsausweise don't display the correct info. See

But the information stem from my import, this is a problem which must be fixed. Also the Fertigkeitsausweise should correspond to the info I imported.

Running now only import of two doctors by calling jobs/import_regmed_doctors 7601000254207 7601000972620. Adress was incomplete, Fertigkeitsausweise, Facharzttitel were not correctly display needed. Fixed it and running import again.

After some more tries I managed to import all data correctly for Dr. Züst. Also when searching http://oddb-ci2.dyndns.org/de/gcc/search/zone/hc_providers/search_query/Glarus? works now. See

E.g. http://oddb-ci2.dyndns.org/de/gcc/result/range/i-l displays a list with doctors and hospital. When clicking on a doctor I follow to the correct link, e.g http://oddb-ci2.dyndns.org/de/gcc/doctor/ean/7601000115072 or http://oddb-ci2.dyndns.org/de/gcc/hospital/ean/7601002017145. Coming back after clicking on such a link does not yet work.

The new fields :may_dispense_narcotics, :may_sell_drugs, :remark_sell_drugs don't show up on the view. To be fixed tomorrow. Also importing the year of the exam works only in the unit test but not the real import.

State of GUI is as follows.

See

And example of how the search screen looks:

List of one doctor

view · edit · sidebar · attach · print · history
Page last modified on November 17, 2014, at 06:33 PM