<< | Index | >>
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.
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.
ignore these unknown chapters.
Plugin: ODDB::TextInfoPlugin Error: RuntimeError Message: Unknown chapter-code 8500, while parsing BeneFIX®
Check memory usage with ObjectSpace.