Reworking my local commit to extract only the export_ddd job. Pushed commit Add jobs/export_ddd_csv. Sorted by iknsr,ikscd
Remarked that I had some pending changes on thinpower. Added them with commit Increased MEMORY_LIMIT for Crawler to 2600MB
Started export ddd with sudo -u apache bundle-240 exec ruby-240 jobs/export_ddd_csv
. Must improve export by skipping drugs not in SL list and adding all used elements for the calculation like ROA, Dose. Added a unit test for checking the generated lines. Done with commit /fd137097804d77026da90a1ebf926eba2dd8815c Added more info to export_ddd_csv
Activated my changes for the calculation of the DDD_price. Must fix an error as I returned 0.00 instead of nil when not being able to calculate a price. I must also ignore the 227 SL entries which have a public_price of 0.00.
Creating a small ruby script to search for all errors reported by Mr. Wallimann. See Attach:get_walliman.txt. Results in the following output
Still incorrect price 59.15 3.55 old_price 4.44 for 2117031 Ursofalk, suspension Still incorrect price 19.65 0.69 old_price 1.38 for 692771 Mucilar, Pulver Still incorrect price 12.35 0.58 old_price 0.04 for 1337003 Colosan mite citron, granulé Still incorrect price 28.30 0.53 old_price 0.04 for 1337026 Colosan mite citron, granulé Still incorrect price 12.35 0.58 old_price 0.04 for 1239424 Colosan mite mint, granulé Still incorrect price 28.30 0.53 old_price 0.04 for 1239430 Colosan mite mint, granulé Still incorrect price 12.35 0.58 old_price 0.04 for 1539250 Colosan mite mocca, granulé Still incorrect price 28.30 0.53 old_price 0.04 for 1539267 Colosan mite mocca, granulé Still incorrect price 24.50 0.63 old_price 0.02 for 3105886 Normacol, Granulat Still incorrect price 11.15 0.69 old_price 0.03 for 3105892 Normacol, Granulat Still incorrect price 1.00 0.50 old_price 1.00 for 1191143 Importal 10 g, Pulver-Sachets Still incorrect price 0.92 0.46 old_price 0.92 for 1191166 Importal 10 g, Pulver-Sachets Still incorrect price 6.70 0.50 old_price 22.34 for 1589236 Importal, Lösung Still incorrect price 18.45 0.95 old_price 8.39 for 5798675 Laxipeg, polvere per soluzione orale Still incorrect price 72.80 0.75 old_price 6.56 for 5798681 Laxipeg, polvere per soluzione orale Still incorrect price 18.45 0.95 old_price 8.39 for 5798698 Laxipeg, polvere per soluzione orale Still incorrect price 14.39 17.15 old_price 157.68 for 1851160 Colophos, Lösung Still incorrect price 3.75 5.11 old_price 5.11 for 5304489 Pradaxa 110 mg, Kapseln Still incorrect price 3.39 4.62 old_price 4.62 for 5416113 Pradaxa 110 mg, Kapseln Still incorrect price 2.75 3.75 old_price 3.75 for 5304503 Pradaxa 150 mg, Kapseln Still incorrect price 2.48 3.39 old_price 3.39 for 5416136 Pradaxa 150 mg, Kapseln Still incorrect price 1.54 0.77 old_price 1.54 for 823902 Nitroglycerin Streuli, Kaukapseln Still incorrect price 0.99 0.60 old_price 0.99 for 1997550 Fludex SR, comprimés retard Still incorrect price 0.77 0.46 old_price 0.77 for 1997596 Fludex SR, comprimés retard Still incorrect price 0.91 0.55 old_price 0.91 for 5804766 Indapamid-Mepha 1.5 retard, Depotab Still incorrect price 0.68 0.41 old_price 0.68 for 5804772 Indapamid-Mepha 1.5 retard, Depotab Still incorrect price 1.19 0.60 old_price 1.19 for 3980861 Coversum N 10mg, Comprimés pelliculés Still incorrect price 0.77 0.38 old_price 0.77 for 5644877 Coversum N 10mg, Comprimés pelliculés Still incorrect price 84.55 13.15 old_price 19.73 for 1459640 Ipocol Divistyramine, polvere Still incorrect price 14.35 4.78 old_price 63.31 for 1599157 Norprolac Starter-pack, 25 ug + 50 ug, Tabletten Still incorrect price 11.96 1.33 old_price 11.96 for 2635412 Estradot 25, Transdermales Pflaster Still incorrect price 9.26 1.03 old_price 9.26 for 2635429 Estradot 25, Transdermales Pflaster Still incorrect price 7.97 0.89 old_price 7.97 for 2519114 Estradot 37.5, Transdermales Pflaster Still incorrect price 6.18 0.69 old_price 6.18 for 2519120 Estradot 37.5, Transdermales Pflaster Still incorrect price 5.98 0.67 old_price 5.98 for 2519137 Estradot 50, Transdermales Pflaster Still incorrect price 4.63 0.52 old_price 4.63 for 2519143 Estradot 50, Transdermales Pflaster Still incorrect price 3.99 0.44 old_price 3.99 for 2519166 Estradot 75, Transdermales Pflaster Still incorrect price 3.09 0.34 old_price 3.09 for 2519172 Estradot 75, Transdermales Pflaster Still incorrect price 2.99 0.33 old_price 2.99 for 2519189 Estradot 100, Transdermales Pflaster Still incorrect price 2.32 0.26 old_price 2.32 for 2519195 Estradot 100, Transdermales Pflaster Still incorrect price 68.00 0.76 old_price 68.00 for 1611622 Estring, Vaginalring Still incorrect price 3.42 2.35 old_price 3.42 for 3585366 Kentera, transdermales Pflaster Still incorrect price 9875000.00 1.88 old_price 9875000.00 for 1592391 Hytrin BPH 1 mg, Tabletten Still incorrect price 17.20 0.98 old_price 0.01 for 726234 Diprophos, Injektionssuspension (Einwegspritze) Still incorrect price 1.44 1.95 old_price 1.44 for 3030622 Tetralysal 300 mg, Kapseln Still incorrect price 18.25 5.21 old_price 1.63 for 1480829 Zinat, Pulver zur Herstellung einer Suspension zum Einnehmen Still incorrect price 29.20 5.84 old_price 7.30 for 853406 Ceclor 250 mg, Granulat zur Herstellung einer oralen Suspension Still incorrect price 16.55 3.31 old_price 1.03 for 3037883 Clarithrocin-Mepha 125, Granulat zur Herstellung einer Suspension Still incorrect price 27.45 2.75 old_price 3.43 for 3037908 Clarithrocin-Mepha 250, Granulat zur Herstellung einer Suspension Still incorrect price 22.40 16.13 old_price 22.40 for 2583626 Myfortic 180 mg, magensaftresistente Filmtabletten Still incorrect price 19.87 14.31 old_price 19.87 for 2583632 Myfortic 360 mg, magensaftresistente Filmtabletten Still incorrect price 1.56 1.97 old_price 0.35 for 4474189 Diclofenac-Mepha 75, Injektionslösung i.m. Still incorrect price 1.34 1.25 old_price 1.34 for 1518029 Voltaren Dispersible, Tabletten Still incorrect price 9.80 2.94 old_price 0.59 for 5499458 Algifor Junior, Suspension Still incorrect price 0.36 0.37 old_price 0.36 for 959889 Apranax 550 mg, Filmtabletten Still incorrect price 0.65 1.18 old_price 0.65 for 2734976 Aspégic Forte, poudre en sachets Still incorrect price 3.82 3.83 old_price 3.06 for 2155267 Ben-u-ron, Sirup Still incorrect price 18.72 9.36 old_price 18.72 for 2208992 Imigran, Suppositorien Still incorrect price 9.20 1.84 old_price 0.37 for 1237402 Tegretol 2%, orale Suspension Still incorrect price 14.20 2.84 old_price 0.57 for 5885658 Timonil, Sirup Still incorrect price 39.00 6.50 old_price 2.34 for 3107951 Trileptal 60 mg/ml, orale Suspension Still incorrect price 66.95 4.46 old_price 1.61 for 2381420 Trileptal 60 mg/ml, orale Suspension Still incorrect price 1.90 1.91 old_price 0.48 for 1041774 Convulex, Sirup Still incorrect price 1.43 1.37 old_price 1.43 for 1909072 Depakine Chrono 300, comprimés pelliculés sécables Still incorrect price 1.49 1.43 old_price 1.49 for 1909089 Depakine Chrono 500, comprimés pelliculés sécables Still incorrect price 1.04 0.99 old_price 1.04 for 5030951 Valproate Chrono Zentiva 300 mg, comprimés pelliculés sécables Still incorrect price 1.07 1.03 old_price 1.07 for 5030968 Valproate Chrono Zentiva 500 mg, comprimés pelliculés sécables Still incorrect price 152.15 13.23 old_price 95.26 for 1906665 Taloxa, Suspension Still incorrect price 3.14 1.29 old_price 0.78 for 909549 Haldol Decanoas 50 mg/mL, Injektionslösung Still incorrect price 2.81 1.16 old_price 2.81 for 1312440 Haldol Decanoas 100 mg/mL, Injektionslösung Still incorrect price 2.57 1.29 old_price 10.29 for 984539 Clopixol Depot, Injektionslösung Still incorrect price 38.00 20.52 old_price 38.00 for 2569508 Risperdal Consta 25 mg, Suspension zur i.m. Applikation Still incorrect price 34.31 18.53 old_price 34.31 for 2569514 Risperdal Consta 37,5 mg, Suspension zur i.m. Applikation Still incorrect price 31.15 16.82 old_price 31.15 for 2569520 Risperdal Consta 50 mg, Suspension zur i.m. Applikation Still incorrect price 20.65 1.38 old_price 0.01 for 6132139 Deroxat, Suspension Still incorrect price 1.96 0.98 old_price 1.96 for 6443649 Symfona 240 mg, comprimés pelliculés Still incorrect price 1.52 0.76 old_price 1.52 for 6443655 Symfona 240 mg, comprimés pelliculés Still incorrect price 6105660.38 5.11 old_price 6105660.38 for 4665185 Champix 0.5 mg und 1 mg, Filmtabletten Still incorrect price 1.23 3.70 old_price 1.23 for 4960731 Arlevert, Tabletten Still incorrect price 1.06 3.20 old_price 1.06 for 4960748 Arlevert, Tabletten Still incorrect price 0.76 2.27 old_price 0.76 for 4960754 Arlevert, Tabletten Still incorrect price 608.00 43.43 old_price 488.57 for 1726288 Wellvone, Suspension Still incorrect price 1.74 2.25 old_price 1.74 for 4951761 Hydroxychloroquine Zentiva, comprimés pelliculés Still incorrect price 2.21 2.85 old_price 2.21 for 1962899 Plaquenil, comprimés pelliculés Still incorrect price 8.75 13.13 old_price 3.28 for 365635 Cobantril, Suspension Still incorrect price 9.65 4.20 old_price 0.01 for 816983 Calmerphan-L, Sirup Still incorrect price 9.65 4.20 old_price 0.01 for 1800406 Calmesin-Mepha, Sirup Fixed 25 of 117 problems reported by Mr. Wallimann. Did not find 5 pharmacodes 2013337,2013343,1719555,1576647,2013372
Looking at reg/39474/seq/01 Mucilar which is administrated as seen in PI with 1 gestrichener Esslöffel (= ca. 9 g) enthält Psyllium Samenhüllen 4,5 g, Traubenzucker 4,5 g. Dieses Präparat enthält zusätzlich Hilfsstoffe und Aromastoffe.
. Therefore the correct calculation for the price of 19.65 and the 400g enclosure is
( 7 g *(9/4.5)g )* (19.65 / 400)
or 19.65/(400*4.5/9)*7
( 7 g / 4.5 g ) x ( 19.65 / 400 g )
This is not correctly handled with the changed algorithm as it throws the following error
@@ddd_galforms (?i-mx:tabletten?) galenic_group Lösbar zur Einnahme match false ddd_price Cannot convert '3.88889 1/kg' to Float unless unitless. Use Unit#scalar 39474 pack 026 from /var/www/oddb.org/vendor/ruby/2.4.0/gems/ruby-units-2.1.0/lib/ruby_units/unit.rb:1120:in `to_f' /var/www/oddb.org/src/util/money.rb:44:in `*' /var/www/oddb.org/src/model/package.rb:295:in `ddd_price' /var/www/oddb.org/vendor/ruby/2.4.0/gems/odba-1.1.2/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/state/ajax/ddd_chart.rb:28:in `block in init' /var/www/oddb.org/src/state/ajax/ddd_chart.rb:28:in `select'
Creating a test case for this situation.
Getting a similar error for Ursofalk when visiting http://oddb-ci2.dyndns.org/de/gcc/ddd_price/reg/54634/seq/01/pack/021/search_query/Ursofalk/search_type/st_oddb
ddd_price Cannot convert '12000 1/m^3' to Float unless unitless. Use Unit#scalar 54634 pack 021 from /var/www/oddb.org/vendor/ruby/2.4.0/gems/ruby-units-2.1.0/lib/ruby_units/unit.rb:1120:in `to_f' /var/www/oddb.org/src/util/money.rb:44:in `*' /var/www/oddb.org/src/model/package.rb:295:in `ddd_price' /var/www/oddb.org/vendor/ruby/2.4.0/gems/odba-1.1.2/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/view/drugs/ddd_price.rb:55:in `calculation' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:83:in `create'
Debugging the Ursofalk I see
sequence.compositions.first.excipiens.description => "Excipiens ad Suspensionem pro 5 Ml"
There for the correct dose would be 250 mg / 5 ml
. But here I have several questions.
Fixed the problem with Ursofalk (and was happy about the dafalgan unit test, which suddenly failed). Running export_ddd_csv has problems exporting IKSNR 22002 pack 15 and says ddd_price Cannot convert '3000 1/kg' to Float unless unitless. Use Unit#scalar
Fixed this problem. Now 33 of 117 problems are fixed.
Looking now at Pradaxa and creating a unit test for it. Here we must consider the following composition_text dabigatranum etexilatum 110 mg ut dabigatranum etexilati mesilas, color.: E 132, E 110, excipiens pro capsula
where we find excipiens pro capsula
For the calculation with Pradaxa Mr. Wallimand used the old DDD of 0.22 from WHO. On December 19 2016 it was changed to 0.3. See https://www.whocc.no/atc_ddd_index/?code=B01AE07. Had to fix another error, because the unit 210 UI/ml
was not recognized. Run export_ddd_csv and now I have fixed 43 of the 117 problems, after having changed the expectation for the Praxada prices.