view · edit · sidebar · attach · print · history

<< PatinfoKapitel | Index | ReplaceDB >>

Pseudo Fachinformation

This feature was added in March 2012 by Niklaus. An example is Sinovial

Problem was that oddb wanted to add information about products which are outside of the legal scope for medicaments in Switzerland. They have the following characterstics:

  • Their EAN does not start with 7680 (76 for Switzerland, 80 for Swissmedic)
  • Their EAN start with 76 for Switzerland
  • The information about each product comes from a docx file which has a similar structure to the traditional fachinfo, but
    • has some chapters missing
    • has some additional chapters (e.g. distributor, fabricant)
    • has no valid ATC-code

After wasting several days, we finally decided to refactor the code using the following stepd

  • add new class PseudoFachinfoDokument in src/model/fachinfo.rb
  • add a parser TextinfoPseudoFachino (similar to TextinfoHpricot) ext/fiparse/src/textinfo_pseudo_fachinfo.rb
  • a new src/plugin/medical_products.rb (using the classes above)
  • no changes were needed in src/view/fachinfo
  • we used the binaries from gem ydocx (using the plain format). The format fachinfo work almost in german, but failed with french
  • after the calls to docx2xml we had to call xmllint --format to work around a bug in nokogiri (1.6.1) as Zeno did not want to try upgrading to a newer version (risk of introducing bugs in other areas was judged to high)
  • the parsing is done in the same thread and not via the fiparsed as in other plugins

We had to fix several small problems

  • changed validator.rb to accept the new 7 digit pseudo-fi-iksnr
  • before adding a pseudo atc-code the following features did not work
    • search by vendor name
    • search using Preisvergleich
    • creating a medication (Rezept)
  • redoing an import must ensure that all packages get updated correctly
view · edit · sidebar · attach · print · history
Page last modified on December 23, 2015, at 08:24 AM