view · edit · sidebar · attach · print · history

20111213-debug-patinfo-invoice-newSequence-recentRegistrations-newSlentry

<< Masa.20111214-fix-new_slentry-setup-ruby193-online-oddb_org | 2011 | Masa.20111212-fix-file-lock-odba-ydim-inject-ruby193 >>


  1. Debug patinfo invoice oddb.org
  2. Debug new sequence button
  3. Debug recent registration
  4. Fix update_swissmedic
  5. Debug new composition function

Goal/Estimate/Evaluation
  • Debug mail_patinfo_invoices oddb.org / 100% / 100%
  • Fix new sequence/package button / 100% / 100%
  • Debug recent registartion / 100% / 100%
  • Fix update_swissmedic / 80% /
  • Debug new composition ajax / 70% /
Milestones
  • debug patinfo
  • new sequence/package button
  • recent registration
  • debug new composition ajax
  • debug importer Packungen.xls
  • setup ruby193 online
  • (oddb.org file lock test online)
Commit

Debug patinfo invoice oddb.org

Email

Error: NoMethodError
Message: undefined method `active_agents' for #<ODDB::LimitationText:0x7f7a8adb34c0>
Backtrace:
/var/www/oddb.org/src/util/language.rb:44:in `method_missing'
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `send'
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/model/sequence.rb:67:in `active_agents'
/usr/lib64/ruby/1.8/delegate.rb:136:in `inject'
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `each'
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `inject'
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `send'
/usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:112:in `method_missing'
...

Check data

ch.oddb> registration('61482').sequence('01').active_agents
-> undefined method `active_agents' for #<ODDB::LimitationText:0x7fecd62b5b18>
ch.oddb> registration('61482').sequence('01').compositions.first.class
-> ODDB::Composition
ch.oddb> registration('61482').sequence('01').compositions.first.active_agents
-> undefined method `active_agents' for #<ODDB::LimitationText:0x7fecd62b5b18>
ch.oddb> registration('61482').sequence('01').compositions.first.odba_id
-> 27751086
ch.oddb> ODBA.cache.fetch('27751086').class
-> ODDB::LimitationText

Note

  • Somehow the composition instance was replaced to a limitation object
  • Probably this is related to manual update process of active agents

Delete the problem sequences

ch.oddb> delete(registration('61482').sequence('01').pointer)
-> 
ch.oddb> delete(registration('61482').sequence('02').pointer)
-> 
ch.oddb> delete(registration('61648').sequence('01').pointer)
-> 
ch.oddb> delete(registration('61649').sequence('01').pointer)
-> 

Note

  • The last patinfo(pdf) was updated on 15.11.2011
  • The uploaded patinfo pdf files are saved in /var/www/oddb.org/doc/resources/patinfo
/var/www/oddb.org/doc/resources/patinfo $ ls -l|sort -k 6
-rw-r--r-- 1 apache apache   55823 2011-10-13 13:27
47721_01_1318505247.19203.pdf
-rw-r--r-- 1 apache apache  133834 2011-11-11 10:53
15855_01_1321005217.48475.pdf
-rw-r--r-- 1 apache apache 3271765 2011-11-15 16:18
39828_02_1321370293.35523.pdf

Debug new sequence button

Problem

  • 'New Sequence' button does not work if the registration view is shown not from 'drug' event (For example, Swissmedic number search)

Note

  • The cause is @session.persistent_user_input(:reg) is nil because it is only set in src/state/global.rb#drug (resolve) event
    • (the iksnr (@session.persistent_user_input(:reg)) is not saved in 'search' event)

Commit

Debug recent registration

Problem

  • The number of new registration becomes 24 but it should be 26
  • And the top page view of new registration should show the list of November, not October
    • Looks like that it becomes one month before

Note

  • Just after running importer, the latest view does not show the latest view but it shows after rebooting oddbd
  • It looks like that the log_group(:swissmedic) is saved in the database but not saved on the cache
  • The count is not updated even after rebooting oddbd

Commit

Fix update_swissmedic

Problem

  • Active agent data is not created when the column O (Wirkstoff) is nil of Packungen.xls

suspend

Debug new composition function

Log

  • For registration 61648
    • Deleted sequence manually in the interface.
ch.oddb> registration('61648').sequence('01')
-> Renvela, Filmtabletten
ch.oddb> registration('61648').sequence('01').compositions.length
-> 0
ch.oddb> substances.values.select{|sub| sub.is_a?(ODDB::LimitationText)}.length
-> 1
ch.oddb> substances.values.select{|sub| sub.is_a?(ODDB::LimitationText)}.first.odba_id
-> 27751094
ch.oddb> substances.values.select{|sub| sub.is_a?(ODDB::LimitationText)}.first.oid
-> 27751094
ch.oddb> delete_substance('27751094')
-> 07.13.30.: Desensibilisierungslösungen

Kostenübernahme nur nach vorgängiger allergologischer Abklärung.
ch.oddb> substances.values.select{|sub| sub.is_a?(ODDB::LimitationText)}.length
-> 0
ch.oddb> rebuild_indices('substance_index')
-> 
ch.oddb> registration('61648').sequence('01').compositions.length
-> 1
  • For registration 61649
    • Only deleted the link!
ch.oddb> registration('61649').sequence('01').compositions.length
-> 1
ch.oddb> registration('61649').sequence('01').compositions.first.odba_id
-> 27762176
ch.oddb> ODBA.cache.fetch('27762176').class
-> ODDB::Composition
ch.oddb> registration('61649').sequences.length
-> 1
ch.oddb> registration('61649').sequence('01').compositions.delete_at(0)
-> Pulver: 07.13.30.: Desensibilisierungslösungen

Kostenübernahme nur nach vorgängiger allergologischer Abklärung. 2.4 g
ch.oddb> 
view · edit · sidebar · attach · print · history
Page last modified on January 10, 2012, at 04:14 PM