view · edit · sidebar · attach · print · history

20130301-update-fiparsed

<< | Index | >>


Summary

  • Update Parser for FI/PI from swissmedicinfo.
  • Debug textinfo_news2

Commit

Index

Debug textinfo_news2


Update fiparsed for Swisswmedicinfo FI/PI

section number, order and title text of PI are not always same.
There is no way to parse this PI.

<p id="section2" class="s5"> # <= section2
<span class="s7">
<span>Andriol</span>
</span>
<span class="s7">
<span>®</span>
</span>
<span class="s7">
<span> Testocaps</span>
</span>
</p>
...
...
<p id="section14" class="s5"> # <= section14
<span class="s8">
<span>Zulassungsinhaberin</span>
</span>
</p>
<p id="section2" class="s3"> # <= section2
<span class="s6">
<span>Aconitum-Homaccord</span>
</span>
<span class="s6">
<span>, Tropfen</span>
</span>
</p>
...
...
<p id="section13" class="s3">  # <= section13
<span class="s2">
<span>Zulassungs</span>
</span>
<span class="s2">
<span>inhaberin</span>
</span>
</p>
commit

Debug textinfo_news2

Update fake request to entrance form.

commit

Plugin: ODDB::TextInfoPlugin
Error: NoMethodError
Message: undefined method `revision' for nil:NilClass
Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/util/oddbapp.rb:1205:in `block in sorted_fachinfos'
/var/www/oddb.org/src/util/oddbapp.rb:1204:in `select'
/var/www/oddb.org/src/util/oddbapp.rb:1204:in `sorted_fachinfos'
thinpower oddb.org # RUBY_OPT="" bin/admin 
ch.oddb> fachinfos.length
-> 4981
ch.oddb> sorted_fachinfos.length
-> undefined method `revision' for nil:NilClass

delete this broken object.

ch.oddb> fachinfos.length
-> 4981
ch.oddb> fachinfos.values.select{|fi| !fi.respond_to?(:revision) }.first.odba_id
-> 29467875
ch.oddb> fachinfos.values.select{|fi| fi.respond_to?(:revision) }.length
-> 4980
ch.oddb> delete_fachinfo(29467875)
-> 
ch.oddb> fachinfos.length
-> 4980
view · edit · sidebar · attach · print · history
Page last modified on March 01, 2013, at 09:08 AM