Must add a unit-test to check correct alphabetical sorting (ignoring digits), as I corrected my regular expression in a wrong way. This works now. Adding more drugs to the test to test the minipacks from desitin (generic_type => :unknown) which must go after generics when not logged in as Desitin and before generics when logged in.
Pushed commit Consider out_of_trade. Prioritize differently for desitin
Integration GalenicFormParser. I have 76 form, which contain a ',' and which ) must handle afterwards to catch cases like
Injektionslösung, anthroposophisches Arzneimitel zuckerfrei, Kräuterpastillen 25 ug + 50 ug, Tabletten
I will just try, whether I found any of the known galenic_forms inside and assign it. E.g findin Injektionslösung, Pastillen and Tabletten should be good enough.
The column-C is really inconsitent in it meaning, giving sometimes only the name, or name and very specific galenicform, eg. Tabletten retard 20/10 mg
. It should really be given in severeal columns, eg. (german/french/italic/english) name of drug, simple galenic form, whereas the composition column should give all the relevant details.
Things begin to look good. Running calc_spec.rb reveals that some galenic_forms are better handled now than before. Converting some previous skipped test in calc_spec.rb to real tests, again. Running oddb2xml --calc to see the differences.
I have 32 empty galenic_forms. See Attach:empty_gal_form.txt. I can emprove on this by looking at the measure.
Now looking at all the differen galenic_form using grep GALENIC_FORM oddb_calc.xml | sort |uniq >tmp.tmp
. Found the following questionable lines (of 681)
<GALENIC_FORM>2 Fertigspritzen</GALENIC_FORM> <GALENIC_FORM>i.m.</GALENIC_FORM> <GALENIC_FORM>ayurvedisches Arzneimittel</GALENIC_FORM> <GALENIC_FORM>tisane laxative, plantes coupées</GALENIC_FORM> <GALENIC_FORM>Tonikum</GALENIC_FORM> <GALENIC_FORM>topische Lösung</GALENIC_FORM> <GALENIC_FORM>Schwamm 10 x 10 x 0,5 cm</GALENIC_FORM> <GALENIC_FORM>Schwamm 5 x 5 x 0,5 cm</GALENIC_FORM> <GALENIC_FORM>S</GALENIC_FORM> <GALENIC_FORM>zuckerfrei</GALENIC_FORM>
Most of the is GIGO (Garbage-In/Garbage-Out).
Pushed commits