<< | Index | >>
Zeno found the following errors
Manual checking (in my old VM)
What I remarked is, that where the FI/PI is correct, caching works and the info is displayed almost instantly when visiting the the page a second time. For the other cases visiting the FI for the second time is slot (waiting a few seconds).
I want to verify that the iksnr of all PI and all FI match those in the registration, as I suspect that we have sometimes inconsistent entries in the database. This might be a time consuming operation. Therefore I start with simple statements, trying to find all FI which have a iksnr of 51358 of Floxal, 62211 Atorvastatin, 17353 Buscopan
ch.oddb-> registrations.values.select{|x| /60701/.match(x.iksnr)} -> [#<ODBA::Stub:23505200#24645335 @odba_class= @odba_container=73647920#22>] res=[]; registrations.each{|id, x| res << id if /51358/.match(x.iksnr)}; res ch.oddb-> registration('51358').fachinfo.iksnrs -> ["51357", "51358", "55383"] ch.oddb ch.oddb> res=[]; registrations.each{|id, x| res << id if x.fachinfo and x.fachinfo.iksnrs.index('51358')}; res; -> ["51358", "51357", "55383"] res=[]; registrations.each{|id, x| res << id if x.fachinfo and x.fachinfo.iksnrs.index('62111')}; res; -> ["62111"] res=[]; registrations.each{|id, x| res << id if x.fachinfo and x.fachinfo.iksnrs.index('17353')}; res; -> ["17353", "17354"]
This looks okay for all three. Now looking for the same ID via fachinfos.
ch.oddb> res=[]; fachinfos.each{|id, x| res += x.iksnrs if x.iksnrs.index('17353')}; res.sort.uniq; -> ["17353", "17354"] res=[]; fachinfos.each{|id, x| res += x.iksnrs if x.iksnrs.index('62111')}; res.sort.uniq; -> ["62111"] ch.oddb> res=[]; fachinfos.each{|id, x| res += x.iksnrs if x.iksnrs.index('51358')}; res.sort.uniq; -> ["51357", "51358", "55383"]
Results meed expectations. Trying the same with patinfos.
Found a patinfo where no iksnr is found.
res=[]; patinfos.each{|id, x| res << id if x.sequences and x.sequences.first and x.sequences.first.iksnr == nil}; res -> [3177] ch.oddb> res=[]; sequences.each{ |x| res << x.iksnr if/51358/.match(x.iksnr) }; res -> ["51358"] ch.oddb> res=[]; sequences.each{ |x| res << x.iksnr if/51358/.match(x.iksnr) }; res -> ["51358"] ch.oddb> res=[]; sequences.each{ |x| res << x.iksnr if/17353/.match(x.iksnr) }; res -> ["17353"] ch.oddb> res=[]; sequences.each{ |x| res << x.iksnr if/62111/.match(x.iksnr) }; res -> ["62111", "62111", "62111"] -> [[:!registration,62111!sequence,01., "62111"], [:!registration,62111!sequence,02., "62111"], [:!registration,62111!sequence,03., "62111"]] ch.oddb> res=[]; sequences.each{ |x| res << [x.pointer, x.iksnr] if/51358/.match(x.iksnr) }; res -> [[:!registration,51358!sequence,01., "51358"]] ch.oddb> res=[]; sequences.each{ |x| res << [x.pointer, x.iksnr] if/17353/.match(x.iksnr) }; res -> [[:!registration,17353!sequence,01., "17353"]]
Don't find an obvious error here.
Running bin/oddbd, fiparsed and import of böhringer and mepha in different screens to watch for errors. No errors seen in oddbd/fiparsed. But importing mepha has 100 % CPU load for > 5 minutes after sending the import. Found in the import log
boehringer.log:delete_patinfo iksnr 17352 de boehringer.log:delete_patinfo iksnr 17352 fr
As the import was still running after 20 minutes I tried to attach via gdp as suggested here: http://weblog.jamisbuck.org/2006/9/22/inspecting-a-live-ruby-process or http://rrn.dk/running-ruby-process-callstack. But I got a long backtrace. See Attach:backtrace_import.txt
I cannot find any occurrence of 51358 or 51357 (for Floxan) in the logs of the import of boehringer or Mepha.
Found the following error in oddbd.log
disabling UPDATER process: Oddb (OddbApp) init system init system: 32.324192037 setup drb-delegation reset reset: 32.324357701 system initialized initialized: 32.324549625 error in SBSM::Session#process: /de/gcc/search/zone/drugs/search_query/17352/search_type/st_registration ArgumentError wrong number of arguments (1 for 0) /var/www/oddb.org/src/state/drugs/fachinfo.rb:32:in `allowed?' /var/www/oddb.org/src/state/global.rb:867:in `_search_drugs_state' /var/www/oddb.org/src/state/global.rb:836:in `search' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:203:in `_trigger' /var/www/oddb.org/src/state/global.rb:972:in `_trigger'
Trigger by: Search for by swissmedic 17352. ( Buscopan Inject). Click on FI of Buscopan-Inject. Go back. (Info: de/gcc/search/zone/drugs/search_query/17352/search_type/st_registration#best_result display one sequence (01)). Which does not have a PI).
After running an import of Bausch the PI of Floxal is correct again.
Using res=[]; sequences.each{ |x| res << x.basename if x.company_name != x.registration.company_name }; res
returned an empty array [].
After running the import I of Boehringer and Mepha could see the error using bin/admin
registration('51358').name_base -> Floxal ch.oddb> registration('51358').sequences.first -> ["01", #<ODBA::Stub:72210460#74844 @odba_class=ODDB::Sequence @odba_container=73021620#63731>] ch.oddb> registration('51358').sequences.first[1].iksnr -> 51358 ch.oddb> registration('51358').sequences.first[1].patinfo.pointer -> :!patinfo,992. ch.oddb> patinfo('992').name_base -> Fluconazol-Mepha 50 N ch.oddb> patinfo('992').company -> undefined method `company' for :ODDB::Patinfo ch.oddb> patinfo('992').company_name -> Mepha Pharma AG
Running another import tracing all changes to patinfo.pointer.
bad table in http://ch.oddb.org/de/gcc/fachinfo/swissmedicnr/49456 (Clexane®/- multi)
The problem are (after analysing the HTML) that