view · edit · sidebar · attach · print · history

20130507-debug-swissmedicinfo-importer

<< | Index | >>


Summary

  • Debug Swissmedicinfo importer

Commits

Index

Debug ebps emediat-creation


Debug Swissmedicinfo importer

Some FI Descriptions do not have name chapter.

# expected
ch.oddb> registration("31706").fachinfo.description('de').name
-> Inderal®

# missing
ch.oddb> registration("58561").fachinfo.description('de').name
-> 
ch.oddb> registration("58561").fachinfo.description('de').name.class
-> String
ch.oddb> registration("58561").fachinfo.description('de').name.length
-> 0
ch.oddb> registration("57038").fachinfo.description('de').name
-> 
  • 58561
  • 57038
  • 57460

etc..

ebps needs :name chapter.
Debuged fiparsed. Problem is in here.

 when :swissmedicinfo
      name          = doc.at("p[text()*='#{@title}']") #=> does not match exact name (if title contains multibyte chars)
      @name         = simple_chapter(name)
      binding.pry
      paragraph_tag = "p[@id^='section']"
      ...

Dose not match these cases as name for "®" in fiparsed.
Because title contains "®", but XML does not contain "®".
And some case (z.B. Olmetec Plus) have "®" at another position.

  • Olmetec® Plus (title)
  • Olmetec Plus® (in XML)
# title
[1] 1.9.3-p194(#<ODDB::FiParse::FachinfoHpricot>)> @title
=> "Olmetec® Plus"

# chapter
[2] 1.9.3-p194(#<ODDB::FiParse::FachinfoHpricot>)> doc.at("p[text()*='Olmetec']")
=> {elem
 <p class="s3" id="section1">
 {elem <span> {elem <span> "Olmetec Plus" </span>} </span>}
 {elem <sup class="s2"> {elem <span> "\u{ae}" </span>} </sup>}
 </p>}

At here, we must check exact match with name, because there are many similar names in data.
Added fallback.

commit
ch.oddb> registration("57038").fachinfo.description('de').name
-> Olmetec Plus®

Then reparsed 40 FIs (for missing name).


Fix iksnrs match bug

If multiple iksnrs as arguments are given, TextInfo plugin could not handle each iksnrs in Regular Expression.
Because it had //o complie option.

commit

EBook packages chapter

Ebook does not have PI Packages chapter.
Because Exporter does not export Fi Packages (currently, only PI)

commit

Debug ebps emediat-creation

view · edit · sidebar · attach · print · history
Page last modified on May 07, 2013, at 09:22 AM