view · edit · sidebar · attach · print · history

Index>

20150318-evidentia-problem-paracetamol

Summary

  • oddb.org should import and display all components after a swissmedic-import as in oddb2xml
  • evidentia.ch has problem when searching for paracetamol

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

evidentia.ch has problem when searching for paracetamol

Zeno reported that looking for paracetamol via evidentia.ch lead to NoMethodError undefined method 'active_agents' for 0:Fixnum

Trying to reproduce the problem.

No problem via

http://evidentia.ch/de/gcc?search_query=paracetamol&search_type=st_combined&flavor=gcc&language=de&event=search shows nothing

No problem today. See

Lookin in /service/ch.oddb/log/main for the problem I find the following backtrace

error in SBSM::Session#http_headers: /de/evidentia/search/zone/drugs/search_query/paracetamol/search_type/st_combined
NoMethodError
undefined method `active_agents' for 0:Fixnum
/var/www/oddb.org/src/model/package.rb:154:in `block in active_agents'
/var/www/oddb.org/src/model/package.rb:153:in `each'
/var/www/oddb.org/src/model/package.rb:153:in `inject'
/var/www/oddb.org/src/model/package.rb:153:in `active_agents'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
error in SBSM::Session#to_html: /de/gcc/search/zone/drugs/search_query/aspirin/search_type/st_sequence
NoMethodError
undefined method `valid?' for [0]:Array
/var/www/oddb.org/src/model/sequence.rb:207:in `has_patinfo?'
/var/www/oddb.org/src/model/package.rb:101:in `has_patinfo?'
/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/additional_information.rb:387:in `patinfo'
/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/list.rb:67:in `block in compose_list'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:65:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:65:in `each_with_index'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:65:in `compose_list'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:54:in `compose'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/list.rb:129:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61: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'
/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/publictemplate.rb:62:in `new'
/var/www/oddb.org/src/view/publictemplate.rb:62:in `content'
/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/publictemplate.rb:59:in `init'
/var/www/oddb.org/src/view/resulttemplate.rb:29:in `init'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:245:in `new'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:245:in `view'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:181:in `to_html'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:447:in `to_html'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:173:in `block in drb_process'
<internal:prelude>:10:in `synchronize'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
/usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
ODDB::View::Drugs::ResultLimitList::COMPONENTS[[3, 0]] in create(patinfo)
ODDB::View::Drugs::ResultLimitComposite::COMPONENTS[[0, 2]] in create(ODDB::View::Drugs::ResultLimitList)
ODDB::View::Drugs::ResultLimit::COMPONENTS[[0, 2]] in create(content)

Found the following SBSM errros via grep SBSM /service/ch.oddb/log/main/current

@4000000055087aeb25130914 error in SBSM::Session#to_html: /de/mobile
@4000000055087aeb2da8ca14 error in SBSM::Session#to_html: /de/gcc/search/zone/drugs/search_query/aspirin/search_type/st_sequence
@4000000055087b2c04124644 error in SBSM::Session#http_headers: /de/gcc/search/zone/drugs/search_query/aspirin/search_type/st_sequence
@4000000055087b2c0412cefc error in SBSM::Session#http_headers: /de/mobile
@4000000055087b2c0412f224 error in SBSM::Session#to_html: /de/gcc/search/zone/drugs/search_query/aspirin/search_type/st_sequence
@4000000055087b6507e8d56c error in SBSM::Session#http_headers: /de/gcc/search/zone/drugs/search_query/aspirin/search_type/st_sequence
@4000000055087b6507ea15bc error in SBSM::Session#to_html: /de/gcc/search/zone/drugs/search_query/aspirin/search_type/st_sequence
@4000000055087b7a37bdb4ec error in SBSM::Session#http_headers: /de/gcc/search/zone/drugs/search_query/aspirin/search_type/st_sequence
@400000005508b2081050c7dc error in SBSM::Session#to_html: /de/just-medical
@40000000550919943a384df4 error in SBSM::Session#http_headers: /de/just-medical
@40000000550927d6182b56fc error in SBSM::Session#process: /de/gcc/download/invoice/29466714/email/free_kindle_ebook@oddb.org/filename/compendium_ch.oddb.org.kindle_now.strip.mobi
@40000000550927d6198becb4 error in SBSM::Session#to_html: /de/gcc/download/invoice/29466714/email/free_kindle_ebook@oddb.org/filename/compendium_ch.oddb.org.kindle_now.strip.mobi

It would be probably a good idea to watch periodically for any occurrences of SBSM via grep SBSM /service/*/log/main/current.

oddb.org should import and display all components after a swissmedic-import as in oddb2xml

Working on saving the changed information in the database via odba.

Running jobs/import_swissmedic_only 55594 update_compositions to see how nutriflex is handled on oddb-ci2. Fixed locally a problem handling the parameters for the job.

Things to not look good. Report was

Util.log_and_deliver_mail to=["ngiger@ywesee.com"] subject ch.ODDB.org Report - Swissmedic XLS - 02/2015 size 3015 with 0 attachments. ODDB::SwissmedicPlugin - Report 18.03.2015
Created Packages: 0
Updated Packages: 13
Deleted Packages: 17271 (0 Replaced)
Deactivated Sequences: 9777
Deactivated Registrations: 6433
Updated new Export-Registrations: 0
Updated existing Export-Registrations: 0
Updated new Export-Sequences: 0
Updated existing Export-Sequences: 0
Skipped Packages: 0
Total time to update: 3.00 [m]
Total Sequences without ATC-Class: 46
Anzahl Sequenzen mit leerem Feld Zusammensetzung: 0
Update compositions: 6
http://ch.oddb.apache.org/de/gcc/show/reg/00000/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/00828/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/10754/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/1229105863/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/1229107845/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/1229107847/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/1229109223/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/1229109224/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/12498/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/17644/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/31919/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/3363895078/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/42180/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/44978/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/52265/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/58458/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/61249/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/61863/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62470/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/62581/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62583/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/62624/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62653/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62667/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/62686/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62781/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62854/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/62897/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62921/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62956/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62966/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62969/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/62976/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/63042/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/63056/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/63059/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/63097/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/63147/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/63172/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/63214/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/63242/seq/01
http://ch.oddb.apache.org/de/gcc/show/reg/65152/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/65161/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/65230/seq/00
http://ch.oddb.apache.org/de/gcc/show/reg/72736/seq/00
no pointer for nil 

Looking http://oddb-ci2.dyndns.org/de/gcc/show/reg/55594/seq/01 shows now no substances for I and II. Only for III. Also all substances are added as separate compositions. Looking for an existing did not work correctly therefore. Also the statistices of updated packages, is completely wrong!

Rework loop if update_compositions is given. This should solve the problems with the statistics. Adapting the unit test.

Import works partially. Iterates over substances, but on the second run did not create any new substance, as I had placed my test file there.

Cannot check in my changes as I must adapt many tests in test/test_plugin/swissmedic.rb as the changed algorithm needs more mocks, in other tests, too. Current diff is Attach:swissmedic_compositions.txt.

Also I should made iterating a little bit more intelligent to avoid parsing the same iksnr/seqnr twice. I seems to take between 40 and 50 seconds to check a given sequence.

view · edit · sidebar · attach · print · history
Page last modified on March 18, 2015, at 06:22 PM