view · edit · sidebar · attach · print · history

20130304-update-fiparsed-textinfo-plugin

<< | Index | >>


Summary

  • Update Parser for FI/PI from swissmedicinfo.

Commit

Index


Update fiparsed for Swisswmedicinfo FI/PI

Create chapter detection with stupid Regexp match for fixed FI/PI of swissmedicinfo.
This is not maintainable.

But There is no way to more FI/PI import into ODBA.

fiparsed
class FachinfoHpricot < TextinfoHpricot
  ...
  private
  def detect_chapter
    ...
    code =
    case text
    when /^Zusammensetzung(en)?|^Composition[s]?/                                                                                               ; '7000'
    when /^Galenische\s*Form(en)?\s*Wirkstoffmenge[n]?\s*pro\s*Einheit|^Forme[n]?\s*gal.nique[s]?\s*et\s*quantiti.[s]?\s*de\s*/                 ; '7050'
    when /^Indikation(en)?\s*\/\s*Anwendungsm.glichkeit(en)?|^Indications\s*\/\s*[pP]ossibilit.s\s*d.emploi/                                    ; '7100'
    when /^Dosierung\s*\/\s*Anwendung|^Posologie\s*\/\s*[mM]ode\s*d.emploi/                                                                     ; '7150'
    ...
  end
end

There 2 FI format in swissmedicinfo.

  • Format like a compendium, but it does not have @div.absTitle@ as Chapter title. and It dose not have anchor link in title.
  • Format that have flat(no indent, no chapter block) content.

Note

ignore these unknown chapters.

Plugin: ODDB::TextInfoPlugin
Error: RuntimeError
Message: Unknown chapter-code 8500, while parsing BeneFIX®

Note

Check memory usage with ObjectSpace.

commit
view · edit · sidebar · attach · print · history
Page last modified on March 04, 2013, at 03:19 PM