view · edit · sidebar · attach · print · history

Index>

20140331-add-e-option-to-oddb2xml

Summary

  • Add option -e "extended" to oddb2xml. This should include all articles (including prices) from transfer.dat of the "Apotheke zur Rose"

Commits

Index

Keep in Mind
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • Search nach Anwendung (indications), z.B. Konjunktivitis, does not report all occurrences in the section "Anwendung" of Fachinfo. Probably index is corrupted or not set up correctly.
  • Error: Patents with could not connect to www.swissreg.ch: #<Net::HTTPInternalServerError:0x007f8a7d69bb58>
  • vagrant-oddb.org: cleanup installation for yus with ruby 1.8, logrotate.conf and local vhosts for tests

---

Add a caption to explain the code for interaction

caption must explain for interactions that

  • A Keine Massnahmen
  • B Vorsichtsmassnahmen
  • C Monitorisieren
  • D Kombination meiden
  • X Kontraindiziert

In the legend each category must appear in the corresponding colour. The caption should work the link "show caption" inside the search result of oddb.org.

We will use a similar approach as in src/view/result_footer.rb

Add option -e "extended" to oddb2xml. This should include all articles (including prices) from transfer.dat of the "Apotheke zur Rose"

Had to revert to the version 597ed7d1bf05741621668dbeacb73242d15b6df2 to make bundle exec bin/oddb2xml -h work again. For the gem version 1.7.3 and 1.7.4 I got Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! when running bundle install. If we want to be able to install oddb2xml as gem on thinpower where we have rubyzip 0.9.9 installed, we must downgrad and fix the requirement for rubyzip to 0.9.9 (actually 1.0.0). Zeno is in favor to update to use the latest version of RubyXL and RubyZip. Updating to RubyZL (2.5.0) and RubyZip (1.1.2) with commit Updated to use rubyzip >= 1.0.0. Remarked that git RubyXL version was also specified in the Rakefile. Therefore pushed Brought Rakefile and Gemfile in sync again

Running bundle exec bin/oddb2xml -p zurrose to get an actual transfer.dat to investigate the data.

Will use Estradiol as example data.

Testing my changes with bundle exec bin/oddb2xml -p zurrose -f dat --extended returns

DE
        Pharma products: 15366
FR
        Pharma products: 15366
2014-03-31 11:53:57 +0200: 96 done
Found 53848 items without an ean13 code when extracting the transfer.dat from Zur Rose

Produced a 13612203 byte transfer.dat. This is the same number of products as before. Therefore the new times parsed were not considered. Why?

Took me some time to figure out how to adapt the builder to use the new articles. Now the same call reports

DE
        Pharma products: 15366
FR
        Pharma products: 15366
2014-03-31 14:37:51 +0200: 96 done
Found 53848 of 83648 items without an ean13 code when extracting the transfer.dat from "Zur Rose"

The produce oddb.dat is now 9627915 byte and contains 98219 lines. Calling without --extended creates as before an oddb.dat of 1506165 bytes with 15344 lines.

Testing with bundle exec bin/oddb2xml -p zurrose --extended, takes 10 minutes to show an error, because of an undefined method `empty?' for nil:NilClass. Correcting this error, too. Running oddb2xml via time bundle exec bin/oddb2xml -p zurrose --extended now takes very long

DE
        Pharma products: 15366
FR
        Pharma products: 15366
2014-03-31 17:48:14 +0200: 96 done
real    81m49.482s
user    81m41.980s
sys     0m2.136s
Found 53848 of 83648 items without an ean13 code when extracting the transfer.dat from "Zur Rose". 

Is this acceptable? Generated XML file oddb_article.xml is now 71MB big.

Also there are way too many duplicates, eg.

grep -c 7614700999989 *xml
oddb_article.xml:56

grep -b3 7614700999989 *.xml | tail -n 15
oddb_article.xml-10013774-    <SORTD>MAGNESIUM DIASPORAL 300 MG ZUCKERFREI</SORTD>
oddb_article.xml-10013831-    <SORTF>MAGNESIUM DIASPORAL 300 MG SANS SUCRE</SORTF>
oddb_article.xml-10013888-    <ARTCOMP>
oddb_article.xml:10013902:      <COMPNO>7614700999989</COMPNO>
oddb_article.xml-10013939-    </ARTCOMP>
oddb_article.xml-10013954-    <ARTBAR>
oddb_article.xml-10013967-      <CDTYP>E13</CDTYP>
--
oddb_article.xml-11399901-    <SORTD>NEO-ANGIN FORTE HALSPASTILLEN ORANGE</SORTD>
oddb_article.xml-11399957-    <SORTF>NEO-ANGIN FORTE PAST POUR LA GORGE ORANGE</SORTF>
oddb_article.xml-11400018-    <ARTCOMP>
oddb_article.xml:11400032:      <COMPNO>7614700999989</COMPNO>
oddb_article.xml-11400069-    </ARTCOMP>
oddb_article.xml-11400084-    <ARTBAR>
oddb_article.xml-11400097-      <CDTYP>E13</CDTYP>

grep -b3 7614700999989 *.xml | grep SORTD
oddb_article.xml-3040-    <SORTD>SELSUN SHAMPOO SUSP</SORTD>
oddb_article.xml-75770-    <SORTD>TIGER BALM ÖL</SORTD>
oddb_article.xml-76476-    <SORTD>TIGER BALM SALBE ROT-STARK</SORTD>
oddb_article.xml-77204-    <SORTD>TIGER BALM SALBE WEISS-MILD</SORTD>
oddb_article.xml-140134-    <SORTD>QUILONORM OBLONG TABL</SORTD>
oddb_article.xml-341666-    <SORTD>QUILONORM RETARD OBLONG RET FILMTABL</SORTD>
oddb_article.xml-342507-    <SORTD>QUILONORM RETARD OBLONG RET FILMTABL</SORTD>
oddb_article.xml-368976-    <SORTD>ANTIPHLOGISTINE PASTE</SORTD>
oddb_article.xml-400490-    <SORTD>BITE X LIQ</SORTD>
oddb_article.xml-534914-    <SORTD>GRETHERS BLACKCURRANT PAST</SORTD>
oddb_article.xml-535641-    <SORTD>GRETHERS BLACKCURRANT PAST</SORTD>
oddb_article.xml-725431-    <SORTD>CALMERPHAN L SIRUP</SORTD>
oddb_article.xml-849203-    <SORTD>SOLATRAN KAPS 15 MG</SORTD>
oddb_article.xml-849974-    <SORTD>SOLATRAN KAPS 30 MG</SORTD>
oddb_article.xml-851508-    <SORTD>SOLATRAN KAPS 15 MG</SORTD>
oddb_article.xml-852280-    <SORTD>SOLATRAN KAPS 30 MG</SORTD>
oddb_article.xml-853060-    <SORTD>ANTIPHLOGISTINE PASTE</SORTD>
oddb_article.xml-1828760-    <SORTD>GRETHERS BLACKCURRANT PAST O Z</SORTD>
oddb_article.xml-1829507-    <SORTD>GRETHERS BLACKCURRANT PAST O Z</SORTD>
oddb_article.xml-1874706-    <SORTD>MAGNESIUM DIASPORAL 300 MG</SORTD>
oddb_article.xml-1876285-    <SORTD>MAGNESIUM DIASPORAL 300 MG</SORTD>
oddb_article.xml-2599983-    <SORTD>GRETHERS REDCURRANT PAST O ZUCK</SORTD>
oddb_article.xml-2981474-    <SORTD>LIBEROL N ERKäLTUNGSSALBE</SORTD>
oddb_article.xml-2982300-    <SORTD>LIBEROL N BABY ERKäLTUNGSSALBE</SORTD>
oddb_article.xml-3041012-    <SORTD>GREFEN FILMTABL 400 MG</SORTD>
oddb_article.xml-3041794-    <SORTD>GREFEN FILMTABL 400 MG</SORTD>
oddb_article.xml-3042577-    <SORTD>GREFEN FILMTABL 600 MG</SORTD>
oddb_article.xml-3043360-    <SORTD>GREFEN FILMTABL 600 MG</SORTD>
oddb_article.xml-4207783-    <SORTD>SULGAN-N SALBE</SORTD>
oddb_article.xml-4208528-    <SORTD>SULGAN-N SALBE</SORTD>
oddb_article.xml-4209276-    <SORTD>SULGAN-N SUPP</SORTD>
oddb_article.xml-4210023-    <SORTD>SULGAN-N SUPP</SORTD>
oddb_article.xml-4210790-    <SORTD>SULGAN-N TüCHLEIN</SORTD>
oddb_article.xml-4211563-    <SORTD>SULGAN-N TüCHLEIN</SORTD>
oddb_article.xml-4789758-    <SORTD>TIGER BALM SALBE WEISS-MILD</SORTD>
oddb_article.xml-4790485-    <SORTD>TIGER BALM SALBE ROT-STARK</SORTD>
oddb_article.xml-4871642-    <SORTD>PIXOR AKNESTIFT N DUNKEL</SORTD>
oddb_article.xml-4872442-    <SORTD>PIXOR AKNESTIFT N HELL</SORTD>
oddb_article.xml-5233572-    <SORTD>GRETHERS BLACKCURRANT PAST REF</SORTD>
oddb_article.xml-5234327-    <SORTD>GRETHERS BLACKCURRANT PAST O Z REF</SORTD>
oddb_article.xml-5254496-    <SORTD>MAGNESIUM DIASPORAL LUTSCHTABL 100 MG</SORTD>
oddb_article.xml-5363139-    <SORTD>OSTEOCAL D3 BRAUSETABL 1200/800</SORTD>
oddb_article.xml-6128628-    <SORTD>NEO-ANGIN HALSPASTILLEN</SORTD>
oddb_article.xml-6129498-    <SORTD>NEO-ANGIN FORTE HALSPASTILLEN</SORTD>
oddb_article.xml-6130382-    <SORTD>NEO-ANGIN JUNIOR HALSPASTILLEN</SORTD>
oddb_article.xml-7482541-    <SORTD>NEO-ANGIN SPRAY MIT LIDOCAIN CHLORHEXIDIN</SORTD>
oddb_article.xml-8281935-    <SORTD>TIGER BALM SALBE ROT-STARK</SORTD>
oddb_article.xml-8670394-    <SORTD>GRETHERS BLACKCURRANT PAST O Z</SORTD>
oddb_article.xml-8670885-    <SORTD>GRETHERS BLACKCURRANT PAST</SORTD>
oddb_article.xml-9169575-    <SORTD>MAGNESIUM DIASPORAL 300 MG</SORTD>
oddb_article.xml-9917155-    <SORTD>GRETHERS BLACKCURRANT PAST O Z</SORTD>
oddb_article.xml-9919976-    <SORTD>GRETHERS BLACKCURRANT PAST</SORTD>
oddb_article.xml-10012082-    <SORTD>MAGNESIUM DIASPORAL 300 MG ZUCKERFREI</SORTD>
oddb_article.xml-10012925-    <SORTD>MAGNESIUM DIASPORAL 300 MG ZUCKERFREI</SORTD>
oddb_article.xml-10013774-    <SORTD>MAGNESIUM DIASPORAL 300 MG ZUCKERFREI</SORTD>
oddb_article.xml-11399901-    <SORTD>NEO-ANGIN FORTE HALSPASTILLEN ORANGE</SORTD>

Now runnning bundle exec bin/oddb2xml -p zurrose -f dat -a nonpharma -e

DE
        Pharma products: 15366
        NonPharma products: 28139
FR
        Pharma products: 15366
        NonPharma products: 28139
2014-03-31 19:56:21 +0200: 96 done
Found 53848 of 83648 items without an ean13 code when extracting the transfer.dat from "Zur Rose"

real    96m12.977s
user    96m4.584s
sys     0m2.444s

Created a 87 MB big oddb_article.xml. Pushed commit Added option --extended for Zur Rose

Move delete all button below searchbar

Also we must move the delete all button below the searchbar. Done with commit Move delete_all button below searchbar.

view · edit · sidebar · attach · print · history
Page last modified on April 01, 2014, at 08:11 AM