view · edit · sidebar · attach · print · history

Index>

20150603-refdatabase

Summary

  • use refdatabase

Commits

Index

Keep in Mind for work to do
  • 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!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Display new fields (LABEL, MORE_INFO, CORRESP) for compositions in oddb.org.
  • Use refdatabase for oddb.org, too.

use refdatabase

refdata has a new download URL. The new URL via SOAP is http://refdatabase.refdata.ch/Service/Article.asmx. Explanations are found under http://www.refdata.ch/content/page_1.aspx?Nid=6&Aid=628&ID=291. Zeno downloaded it via wget as explained under http://dev.ywesee.com/Refdata/Wget

This will affect the import of swissindex, medreg_pharmacies and medreg_doctors.

Looking at our existing code. Trying to use a newer savon to simplify the code. Updated src/util/zsr.rb (gets 18 lines smaller). Now getting the zsr from pharmed works without any problem.

Pushed commit Updated to savon 2.10.1. Fix zsr

Installed new version of savon and rubyntlm on thinpower with

sudo /usr/local/bin/gem install savon --version 2.10.1
sudo /usr/local/bin/gem install rubyntlm

But http://ch.oddb.org/de/gcc/zsr/J039019 still displays only {}. Postponing answer to this question for later.

Simple test-scripts to download all 44930 articles (PHARMA and NONPHARMA) and all 125'095 partners (JUR/NAT) works. See Attach:refdatabase_test.rb.txt Output looks like

{:atype=>"PHARMA", :gtin=>"7680656250016", :phar=>"6211896", :swmc_authnr=>"65625001", :name_de=>"ESCITALOPRAM Sandoz Tropfen 20 mg/ml 15 ml", :name_fr=>"ESCITALOPRAM Sandoz gouttes 20 mg/ml 15 ml", :atc=>"N06AB10", :auth_holder_name=>"Sandoz Pharmaceuticals AG", :auth_holder_gln=>"7601001029439", :@dt=>"2015-06-02T00:00:00"}

or {:ptype=>"NAT", :gln=>"7601000159199", :status=>"A", :stdate=>#<DateTime: 2013-05-06T17:28:19+00:00 ((2456419j,62899s,823000000n),+0s,2299161j)>, :lang=>"DE", :descr1=>"Davatz-Stoll", :descr2=>"Ursula", :role=>{:type=>"DoctMed", :zip=>"5400", :city=>"Baden", :ctn=>"AG", :cntry=>"CH"}, :@xmlns=>"http://refdatabase.refdata.ch/Partner_out", :@dt=>"2015-02-26T00:00:00"}

Working on updating the download of oddb2xml. Changes are: names for DE and FR are now in the same file. Therfore we will download only one file. Why does refdata not have a name_it for italian field?

We must reorganize the whole structure of oddb2xml as now both languages are contained in one XML file and no more in separate files for german and french. Unable to finish the cleanup today. Patch is Attach:patch_redatabase.txt. Remaining unit errors are

rspec ./spec/downloader_spec.rb:68 # Oddb2xml::SwissIndexDownloader Pharma with DE when download_by is called with DE should parse response hash to xml
rspec ./spec/downloader_spec.rb:73 # Oddb2xml::SwissIndexDownloader Pharma with DE when download_by is called with DE should return valid xml
rspec ./spec/downloader_spec.rb:87 # Oddb2xml::SwissIndexDownloader NonPharma with FR when download_by is called with FR should parse response hash to xml
rspec ./spec/downloader_spec.rb:92 # Oddb2xml::SwissIndexDownloader NonPharma with FR when download_by is called with FR should return valid xml
rspec ./spec/builder_spec.rb:69 # Oddb2xml::Builder XSD-generation:  should return true when validating xml against oddb2xml.xsd
rspec ./spec/builder_spec.rb:563 # Oddb2xml::Builder when -f dat -p is given should contain the correct values fo CMUT from zurrose_transfer.dat
rspec ./spec/builder_spec.rb:178 # Oddb2xml::Builder when --append -f dat is given should generate a valid oddb_with_migel.dat
rspec ./spec/builder_spec.rb:188 # Oddb2xml::Builder when --append -f dat is given should match EAN of Desitin. returns 0 at the moment
rspec ./spec/builder_spec.rb:99 # Oddb2xml::Builder when no option is given should generate a valid oddb_product.xml
rspec ./spec/builder_spec.rb:154 # Oddb2xml::Builder when -f dat is given should contain the correct values fo CMUT from zurrose_transfer.dat
rspec ./spec/builder_spec.rb:265 # Oddb2xml::Builder when option -e is given should generate the flag non-refdata
rspec ./spec/builder_spec.rb:321 # Oddb2xml::Builder when option -e is given should load correct number of nonpharma
rspec ./spec/builder_spec.rb:306 # Oddb2xml::Builder when option -e is given should handle not duplicate pharmacode 5366964
rspec ./spec/builder_spec.rb:352 # Oddb2xml::Builder when option -e is given should emit a correct oddb_article.xml
view · edit · sidebar · attach · print · history
Page last modified on June 03, 2015, at 09:04 PM