view · edit · sidebar · attach · print · history

Index>

20150721-add-corresp

Summary

  • Add corresp in oddb.org to compositions

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 CORRESP for compositions in oddb.org.
  • Use refdatabase for oddb.org, too.
  • Fix running rspec for new packungen.xlsx in oddb2xml

Add corresp in oddb.org to compositions

Fixed problem with corresp not added.

Having problems running the unit-tests. Suddenly did see at the end Footprint exceeds 7168MB. Exiting. Exiting status.

Fixed my problem Could not create: :!00278,sequence,01!composition., reason: :!00278,sequence,01!composition. -> OddbPrevalence::registration(00278,sequence,01) returned nil by calling first a sequence.fix_pointers. Dropping database and rerunning import again, to see whether this work on oddb-ci2 correctly, too. This is needed as we don't know in advance the oid when creating a new composition. The number/oid of a composition is of no importance to the normal use, which differs from registration and sequences. To make this work I had to (re?)add a method fix_pointers in src/model/composition.rb. This method was removed in 21.06.2010 by Hannes with commit 7c681c2db82be396761c5826e9ed3d3b4f6f5250

Now I am getting a DBI::ProgrammingError output is

2015-07-21 15:34:53 +0200: /var/www/oddb.org/src/plugin/swissmedic.rb:718 update_compositions iksnr 00596 seqnr 01 comp_idx 0 parsed_comp #<ParseComposition:0x00000082b5f3d8>
15-07-21 15:34:59 CESTUtil.send_mail list_and_recipients ["log"]
2015-07-21 15:34:59 CEST /var/www/oddb.org/src/util/mail.rb: Configured email using /var/www/oddb.org/etc/oddb.yml @cfg is now "smtp.gmail.com" 587 "ngiger@ywesee.com"
2015-07-21 15:34:59 CEST Util.log_and_deliver_mail to=["ngiger@ywesee.com"] subject ch.ODDB.org Report - Error: swissmedic - 07/2015 size 2722 with 0 attachments. Plugin: ODDB::SwissmedicPlugin
Error: DBI::ProgrammingError
Message: 
Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:62:in `rescue in execute'
/usr/local/lib/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:37:in `execute'
/usr/local/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/statement.rb:116:in `execute'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:263:in `block in ensure_object_connections'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:262:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:262:in `ensure_object_connections'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:553:in `store_object_connections'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:512:in `store'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:274:in `odba_isolated_store'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:395:in `block in odba_store_unsaved'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:392:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:392:in `odba_store_unsaved'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/persistable.rb:380:in `odba_store'
/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/plugin/swissmedic.rb:980:in `block in update_excipiens_in_composition'
/var/www/oddb.org/src/plugin/swissmedic.rb:966:in `each'
/var/www/oddb.org/src/plugin/swissmedic.rb:966:in `each_with_index'
/var/www/oddb.org/src/plugin/swissmedic.rb:966:in `update_excipiens_in_composition'
/var/www/oddb.org/src/plugin/swissmedic.rb:994:in `update_all_sequence_info'
/var/www/oddb.org/src/plugin/swissmedic.rb:141:in `block in update'
/usr/local/lib/ruby/gems/1.9.1/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `block in each'
/usr/local/lib/ruby/gems/1.9.1/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `each'
/var/www/oddb.org/src/plugin/swissmedic.rb:124:in `update'
/var/www/oddb.org/src/util/updater.rb:444:in `block in update_swissmedic'

Changed code for import of excipiens to use update and adding more debug output. Restarting import. This proved to be a bad idea. Keeping the debug messages, but reverting to the old code. Now the import is running again. Found the error. New import passed IKSNR 00596.

But for unknown reasons, the import comes to a standstill. Last seen in oddb/debug is

2015-07-21 16:29:28 +0200: /var/www/oddb.org/src/plugin/swissmedic.rb: 726 00599/01 component_in_db #<ODBA::Stub:750853980#9481908 @odba_class=ODDB::Composition @odba_container=750858240#9481910> label nil corrsp 

Process consumes only about 1% of CPU. Restarting it again. Found the culprit. Somehow I managed to introduce in the database at oddb-ci a Composition instead of an active agent. Seen by bin/admin

registration('00599').sequence('01').active_agents[3].is_a?(ODDB::Composition)
-> true

Did check, that this is not the case on thinpower. Dropping and reloading the database.

Working in parallel to add corresp to HTML output of oddb.org.

view · edit · sidebar · attach · print · history
Page last modified on July 21, 2015, at 08:17 PM