view · edit · sidebar · attach · print · history

Index>

20150704-new-packungen-xlsx-oddb2xml

Summary

  • Adapt coddb2xml to changed format of Packungen-xlsx
  • Fix mess when loading ruby-ntlm
  • refdata/download_all: Must not call binding.pry in exception!

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.
  • Fix running rspec for new packungen.xlsx in oddb2xml

refdata/download_all: Must not call binding.pry in exception!

Forgot to remove a call to binding.pry in ext/refdata/src/refdata.rb fixed with commit refdata/download_all: Must not call binding.pry in exception!

Adapt oddb2xml to changed format of Packungen-xlsx

Swissmedic changed format of Packungen.xlsx which broke havoc on ch.oddb.org. Zeno reverts Postgres database to state of July 1.

Changes in format are:

  • column "Heilmittelcode" from G to E
  • Added new columns O "Abgabekategorie Dosisstärke" and P "Abgabekategorie Präparat"
  • Added new columns U "Gentechnisch hergestellte Wirkstoffe", V "Kategorie bei Insulinen", W "Verz. bei betäubunsmittel-haltigen Präparaten"
  • column heading are now in german and french

Added check for headers similar to swissmedic-diff. Running oddb2xml -e revealed that some cells are now nil. Adapted this code, too.

Making the spec pass again takes much more time, as deleting rows in Packungen.xlsx via the rubyXL gem transform the column K Packungscode from an integer into DateTime. Must therefore handle the file manually again.

Extracting is okay now, but building oddb_calc.xml fails, because we don't use the correct column-ids.

Running oddb2xml -e seems to work fine. Pushed commit Adapt to new Packungen.xlsx.

Put adapting rspec on my TODO list.

Fix mess when loading ruby-ntlm

Tried to get the same stuff versions of gems on thinpower an oddb-ci2.

After calling sudo /usr/local/bin/gem update --system it intalled version 2.4.8 and I had again problems complaining about the wrong version of NTLM. After calling sudo /usr/local/bin/gem update --system 2.2.1 this problem went away, but I got the following problem when starting oddbd

sudo -u apache /usr/local/bin/ruby bin/oddbd 
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in `require': iconv will be deprecated in the future, use String#encode instead.
Attention: monkey-patching CSV::Cell
racc/parser.rb:189: warning: already initialized constant Racc_Runtime_Version
racc/parser.rb:190: warning: already initialized constant Racc_Runtime_Revision
racc/parser.rb:192: warning: already initialized constant Racc_Runtime_Core_Version_R
racc/parser.rb:193: warning: already initialized constant Racc_Runtime_Core_Revision_R
racc/parser.rb:197: warning: already initialized constant Racc_Runtime_Core_Revision_C
racc/parser.rb:205: warning: already initialized constant Racc_Main_Parsing_Routine
racc/parser.rb:206: warning: already initialized constant Racc_YY_Parse_Method
racc/parser.rb:207: warning: already initialized constant Racc_Runtime_Core_Version
racc/parser.rb:208: warning: already initialized constant Racc_Runtime_Core_Revision
racc/parser.rb:209: warning: already initialized constant Racc_Runtime_Type
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in `require': cannot load such file -- zip/zip (LoadError)
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in `require'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ydocx-1.2.3/lib/ydocx/document.rb:5:in `<top (required)>'
        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'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ydocx-1.2.3/lib/ydocx.rb:4:in `<top (required)>'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `require'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in `require'
        from /var/www/oddb.org/src/plugin/medical_products.rb:12:in `<top (required)>'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in `require'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in `require'
        from /var/www/oddb.org/src/util/updater.rb:22:in `<top (required)>'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in `require'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in `require'
        from /var/www/oddb.org/src/util/oddbapp.rb:11:in `<top (required)>'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from bin/oddbd:13:in `<main>'

A call to sudo /usr/local/bin/gem install zip-zip fixed this problem. But still leaves me asking why the gem zip-zip is not needed on thinpower.

Pushed commit Use same versions of gems as on thinpower

view · edit · sidebar · attach · print · history
Page last modified on July 04, 2015, at 10:10 PM