view · edit · sidebar · attach · print · history

20130322-update-swissmedicinfo-updater

<< | Index | >>


Summary

  • Update swissmedicinfo Updater

Commits

Index


Improve iksnr match

Same Zulassungsnummer has unexpected <span> and <p> tags in number text.
Update to match this strage iksnr.

<p class=\"s4\" id=\"section17\"><span class=\"s6\"><span>Zulassungs</span></span><span class=\"s6\"><span>nummer</span></span></p><p class=\"s4\"><span class=\"s8\"><span>5</span></span><span class=\"s8\"><span>4&rsquo;605</span></span><span class=\"s8\"><span> (Swissmedic)</span></span></p>
# updated

(#<ODDB::TextInfoPlugin>)> iksnr = '54605'
(#<ODDB::TextInfoPlugin>)> extract_matched_content('AlphaganŽ', 'fachinfo', 'de').text =~ /#{iksnr[0]}[psanclb;<>\/\s\=\"0-9\&]*#{iksnr[1]}(.|\&[A-z;]*|\s)?#{iksnr[2..4]}\s?/o
=> 31634
commit

Fix error at report mail

Error at report mail creation.

Plugin: ODDB::TextInfoPlugin
Error: NoMethodError
Message: undefined method `name' for nil:NilClass
Backtrace:
/var/www/oddb.org/src/plugin/text_info.rb:996:in `block in parse_and_update'
/var/www/oddb.org/src/plugin/text_info.rb:995:in `each'
/var/www/oddb.org/src/plugin/text_info.rb:995:in `parse_and_update'
/var/www/oddb.org/src/plugin/text_info.rb:1027:in `block (2 levels) in
import_info'
/var/www/oddb.org/src/plugin/text_info.rb:1022:in `each'
/var/www/oddb.org/src/plugin/text_info.rb:1022:in `each_with_index'
/var/www/oddb.org/src/plugin/text_info.rb:1022:in `block in import_info'
/var/www/oddb.org/src/plugin/text_info.rb:1019:in `each_pair'
/var/www/oddb.org/src/plugin/text_info.rb:1019:in `import_info'
/var/www/oddb.org/src/plugin/text_info.rb:1056:in `block in
import_swissmedicinfo_by_index'
/var/www/oddb.org/src/plugin/text_info.rb:1055:in `each_pair'
/var/www/oddb.org/src/plugin/text_info.rb:1055:in
`import_swissmedicinfo_by_index'
...
commit

Debug PI Updater

enable swissmedicinfo PI Updater.

current PI chapter detection.
This needs yet Improvement.

when /^(Was|Wann)\s*[\w\s]*angewendet[\?]?|^Qu.est-ce\s*que/                                           ; '7620'
when /^Was\s*sollte\s*dazu\s*beachtet\s*werden|^De\s*quai\s*faut\-il/                                  ; '7680'
when /^Wann\s*(darf|d.rfen)\s*[\w\s,\-]*nicht\s*[\w\s]*werden\??|^Quand\s*[\w\s]*ne\sdoit\-(il|elle)/  ; '7680'
when /^Wann\s*ist\s*bei\s*der\s*[\w\s\/]*Vorsicht\s*geboten\??|^Quelles\s*sont\s*les\s*pr.cautions/    ; '7700'
when /Schwangerschaft|pendant\s*la\s*grossesse\s*ou\s*l.allaitement\??/                                ; '7720'
when /^Wie\s*verwenden\s*Sie|^Comment\s*utiliser/                                                      ; '7740'
when /^Welche\s*Nebenwirkungen\s*(kann|k.nnen)|^Quels\s*effets\s*secondaires/                          ; '7760'
when /^Was\s*ist\s*ferner\s*zu\s*beachten\??|^.\s*quoi\s*faut\-il\s*encore\s*faire\s*attention\??/     ; '7780'
when /^Was\s*ist[\w\s,\-]*enthalten\??|^Que\s*contient/                                                ; '7840'
when /^Zulassungsnummer|^Num.ro\s*d.autorisation/                                                      ; '7860'
when /^Wo\s*erhalten\s*Sie|^Q.\s*obtenez\-vous/                                                        ; '7880'
when /^Herstellerin|^Fabricant/                                                                        ; '7920'
when /^Diese\s*Packungsbeilage\s*wurde|^Cette\s*notice\s*/                                             ; '7940'
when /^Zulassungsinhaberin(en)?|^Titulaire\s*de\s*l.autorisation/                                      ; '9000'
when /^Name\s*des\s*Pr.parate[s]?|^Nom\s*de\s*la\s*pr.paration/                                        ; '9010'
when /^Kurzcharakteristikum|^Caract.ristique\s*.\s*court/                                              ; nil
view · edit · sidebar · attach · print · history
Page last modified on March 22, 2013, at 10:53 AM