view · edit · sidebar · attach · print · history

Index>

20141119-new-hc-provider-view

Summary

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

Commits

(in 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

Continue work of yesterday. The companies do not appear correctly.

An open question is whether we should use the swissref xml files or the xlsx file. I think it might be worthwhile to refactor the swissindex plugins to achieve the following goals

  • use savon 2.x (cleaner, smaller)
  • one method to download the xml for Pharma, NonPharma, Companies and Persons
  • search phone/fax numbers via tel.search.ch

For tel.search consider:

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:tel="http://tel.search.ch/api/spec/result/1.0/" xml:lang="en">
<id>
http://tel.search.ch/api/bfec22cb70658fd3cfd95b83956f48c2
</id>
<title type="text">tel.search.ch API Search Results</title>
<generator version="1.0" uri="http://tel.search.ch">tel.search.ch</generator>
<updated>2014-11-19T03:00:00Z</updated>
<link href="http://tel.search.ch/result.html?was=niklaus+giger&wo=8753" rel="alternate" type="text/html"/>
<link href="http://tel.search.ch/api/?was=niklaus+giger&wo=8753" type="application/atom+xml" rel="self"/>
<openSearch:totalResults>1</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>10</openSearch:itemsPerPage>
<openSearch:Query role="request" searchTerms="niklaus giger 8753" startPage="1"/>
<openSearch:Image height="1" width="1" type="image/gif">http://www.search.ch/audit/CP/tel/en/api</openSearch:Image>
<entry>
<id>urn:uuid:71105569adacdd6a</id>
<updated>2014-11-19T03:00:00Z</updated>
<published>2014-11-19T03:00:00Z</published>
<title type="text">Giger, Niklaus (-Gim)</title>
<content type="text">
Giger, Niklaus (-Gim) Wieshoschet 6 8753 Mollis/GL *055 612 20 54
</content>
<author>
<name>tel.search.ch</name>
</author>
<link href="http://tel.search.ch/mollis/wieshoschet-6/niklaus-giger" title="Details" rel="alternate" type="text/html"/>
<link href="http://tel.search.ch/vcard/Giger.vcf?key=71105569adacdd6a" type="text/x-vcard" title="VCard Download" rel="alternate"/>
<link href="http://tel.search.ch/edit/?id=71105569adacdd6a" rel="edit" type="text/html"/>
</entry>
</feed>

Okay. Got an API-Key to test from tel.search and created an unit-test. See Attach:test_tel_search.rb

Checking what consequences installing savon 2.8.0 has on oddb-ci2. Installs the following 8 gems

  • gyoku-1.2.2 (was 1.1.1)
  • httpi-2.3.0 (0.9.7)
  • macaddr-1.7.1
  • nori-2.4.0 (1.1.5)
  • savon-2.8.0 (0.9.7)
  • systemu-2.6.4
  • uuid-2.3.7
  • wasabi-3.3.0 (2.3.0)

Okay. More than trivial changes. Will run import and watir tests to see whether this is acceptable. Alternatively we might delegate downloading the 4 swissindes-XML files to a seperate job. Running bin/oddbd chokes with

/usr/local/lib/ruby/gems/1.9.1/gems/httpi-2.3.0/lib/httpi/adapter/net_http.rb:12:in `<top (required)>': Invalid version of rubyntlm. Please use v0.3.2+. (ArgumentError)
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:73:in `require'

Tried uninstalling some gems, etc, but did not arrive to a good solution. Therefore I will continue to use the XLSX files for the moment.

Import of companies does not yet work correctly. Pushed a few commit and will continue next week.

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