view · edit · sidebar · attach · print · history

Index>

0170207-fix-ddd-calculation

Summary

Commits

Index

Fix DDD prices

Fixing a regressiong from an ArgumentError. Preparing to push the current state. Now using create_test_package for all 15 new test items. After running the export and a slightly improved analysis script I get the following resumen Corrected 47 of 103 prices. Still having 15 minor (< 10%) and 36 mayor (>= 10%) price differences

The following mayor problems are

Still incorrect price     103.40       34.47 old_price  275733.33  for 2764434 Emend 125 mg, Kapseln. Mayor diff 199.97%
Still incorrect price      18.30        0.78 old_price       0.02  for 2164852 Metamucil Regular, poudre. Mayor diff 2246.15%
Still incorrect price       1.00        0.50 old_price       1.00  for 1191143 Importal 10 g, Pulver-Sachets. Mayor diff 100.00%
Still incorrect price       0.92        0.46 old_price       0.92  for 1191166 Importal 10 g, Pulver-Sachets. Mayor diff 100.00%
Still incorrect price      14.39       17.15 old_price     157.68  for 1851160 Colophos, Lösung. Mayor diff 16.09%
Still incorrect price       1.54        0.77 old_price       1.54  for  823902 Nitroglycerin Streuli, Kaukapseln. Mayor diff 100.00%
Still incorrect price       0.99        0.60 old_price       0.99  for 1997550 Fludex SR, comprimés retard. Mayor diff 65.00%
Still incorrect price       0.77        0.46 old_price       0.77  for 1997596 Fludex SR, comprimés retard. Mayor diff 67.39%
Still incorrect price       0.91        0.55 old_price       0.91  for 5804766 Indapamid-Mepha 1.5 retard, Depotab. Mayor diff 65.45%
Still incorrect price       0.68        0.41 old_price       0.68  for 5804772 Indapamid-Mepha 1.5 retard, Depotab. Mayor diff 65.85%
Still incorrect price       1.19        0.60 old_price       1.19  for 3980861 Coversum N 10mg, Comprimés pelliculés. Mayor diff 98.33%
Still incorrect price       0.77        0.38 old_price       0.77  for 5644877 Coversum N 10mg, Comprimés pelliculés. Mayor diff 102.63%
Still incorrect price       8.77       13.15 old_price      19.73  for 1459640 Ipocol Divistyramine, polvere. Mayor diff 33.31%
Still incorrect price      14.35        4.78 old_price      63.31  for 1599157 Norprolac Starter-pack, 25 ug + 50 ug, Tabletten. Mayor diff 200.21%
Still incorrect price      68.00        0.76 old_price      68.00  for 1611622 Estring, Vaginalring. Mayor diff 8847.37%
Still incorrect price       8.22        2.35 old_price       3.42  for 3585366 Kentera, transdermales Pflaster. Mayor diff 249.79%
Still incorrect price 9875000.00        1.88 old_price 9875000.00  for 1592391 Hytrin BPH 1 mg, Tabletten. Mayor diff 525265857.45%
Still incorrect price      12.90        0.98 old_price       0.01  for  726234 Diprophos, Injektionssuspension (Einwegspritze). Mayor diff 1216.33%
Still incorrect price       1.44        1.95 old_price       1.44  for 3030622 Tetralysal 300 mg, Kapseln. Mayor diff 26.15%
Still incorrect price      22.40       16.13 old_price      22.40  for 2583626 Myfortic 180 mg, magensaftresistente Filmtabletten. Mayor diff 38.87%
Still incorrect price      19.87       14.31 old_price      19.87  for 2583632 Myfortic 360 mg, magensaftresistente Filmtabletten. Mayor diff 38.85%
Still incorrect price       1.56        1.97 old_price       0.35  for 4474189 Diclofenac-Mepha 75, Injektionslösung i.m.. Mayor diff 20.81%
Still incorrect price       0.65        1.18 old_price       0.65  for 2734976 Aspégic Forte, poudre en sachets. Mayor diff 44.92%
Still incorrect price      18.72        9.36 old_price      18.72  for 2208992 Imigran, Suppositorien. Mayor diff 100.00%
Still incorrect price       3.14        1.29 old_price       0.78  for  909549 Haldol Decanoas 50 mg/mL, Injektionslösung. Mayor diff 143.41%
Still incorrect price       2.81        1.16 old_price       2.81  for 1312440 Haldol Decanoas 100 mg/mL, Injektionslösung. Mayor diff 142.24%
Still incorrect price       2.57        1.29 old_price      10.29  for  984539 Clopixol Depot, Injektionslösung. Mayor diff 99.22%
Still incorrect price     190.00       20.52 old_price      38.00  for 2569508 Risperdal Consta 25 mg, Suspension zur i.m. Applikation. Mayor diff 825.93%
Still incorrect price     257.30       18.53 old_price      34.31  for 2569514 Risperdal Consta 37,5 mg, Suspension zur i.m. Applikation. Mayor diff 1288.56%
Still incorrect price     311.50       16.82 old_price      31.15  for 2569520 Risperdal Consta 50 mg, Suspension zur i.m. Applikation. Mayor diff 1751.96%
Still incorrect price       1.96        0.98 old_price       1.96  for 6443649 Symfona 240 mg, comprimés pelliculés. Mayor diff 100.00%
Still incorrect price       1.52        0.76 old_price       1.52  for 6443655 Symfona 240 mg, comprimés pelliculés. Mayor diff 100.00%
Still incorrect price 6105660.38        5.11 old_price 6105660.38  for 4665185 Champix 0.5 mg und 1 mg, Filmtabletten. Mayor diff 119484447.55%
Still incorrect price       1.74        2.25 old_price       1.74  for 4951761 Hydroxychloroquine Zentiva, comprimés pelliculés. Mayor diff 22.67%
Still incorrect price       2.21        2.85 old_price       2.21  for 1962899 Plaquenil, comprimés pelliculés. Mayor diff 22.46%
Still incorrect price      74.60        7.46 old_price       0.75  for  534635 Resonium-A, poudre. Mayor diff 900.00%

Pushed commit Fix many DDD calculations

Pulled changes on thinpower and started jobs/export_ddd_csv.

Pushed commit Export only DDDs with ROAs to avoid exporting drugs without a possible DDD calculation.

Now continue work on Risperdal. This is a complication as the FI describes it galenic form like this

Risperdal Consta enthält Risperidon in Mikrosphären (Polymer-Kügelchen), welche das darin eingebettete Risperidon verzögert freisetzen.
Suspension zur i.m. Applikation
Wirkstoff-Pulver zur Herstellung der Injektionslösung (Durchstechflasche): Praeparatio sicca zu 25 mg, 37,5 mg oder 50 mg Risperidon.
Lösung zur Suspendierung des Pulvers (Fertigspritze): 2 ml.

After fixing 56092 02 003 Risperdal Consta 37,5 mg I got errors with IKSNR 58467

:!registration,58467!sequence,01. @@ddd_galforms (?i-mx:tabletten?) galenic_group unbekannt match false excipiens Excipiens ad Solutionem
_ddd_price RuntimeError Cannot convert '200000 1/m^3' to Float unless unitless.  Use Unit#scalar 58467 pack 002 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:47:in `/'
/var/www/oddb.org/src/model/package.rb:314: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/additional_information.rb:153:in `ddd_price'
/var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:83:in `create'

Now the prices for Risperal are the same as two weeks ago, but butter than with my last checkin. I use the Oral 5 mg instead of the 2.7 mg for P depot. How can I detect this second ROA? Using bin/admin I finde

ch.oddb> registration('56092').package('001').route_of_administration
-> roa_P

Found the following differences from the entry of the who N05AX08 updated on December-19 2016

ATC code  	Name  	DDD 	 U	 Adm.R	 Note
N05AX08  	risperidone 	5 	mg 	O 	
		2.7 	mg 	P 	depot
and the entries in oddb.org found via bin/admin
ch.oddb> atc_class('N05AX08').ddds.keys
-> ["O", "P", "Pdepot"]
ch.oddb> atc_class('N05AX08').ddds.values.collect{|x| x.dose.to_s}
-> ["5 mg", "1.8 mg", "2.7 mg"]

Running jobs/import_whocc and evaluating the situation with pry. This takes a long while to go into the break.

I think it would be a lot faster to import the XML-files from WHO. Looking at the files from Zeno from last december. Starting to write a unit test for it.

But Zeno wants me to fix the error in the existing who importer. Adding a test case for deleting a roa in a DDD. Finally the unit test fails as it does not delete the old ROA.

Pushed a commit to avoid verbose output Don't show price calculation. Avoid pry

Got the following error while running the WHO import

Plugin: ODDB::WhoPlugin

Error: NoMethodError
Message: undefined method `find' for false:FalseClass
Backtrace:
/var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.7.0.1/lib/nokogiri/xml/searchable.rb:203:in `extract_params'
/var/www/oddb.org/vendor/ruby/2.4.0/gems/nokogiri-1.7.0.1/lib/nokogiri/xml/searchable.rb:49:in `search'
/var/www/oddb.org/src/plugin/who.rb:122:in `import_code'
/var/www/oddb.org/src/plugin/who.rb:75:in `import'
/var/www/oddb.org/src/util/updater.rb:567:in `block in update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:527:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:561:in `update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:456:in `update_whocc'
jobs/import_whocc:13:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_whocc:12:in `<module:Util>'
jobs/import_whocc:11:in `<module:ODDB>'
jobs/import_whocc:10:in `<main>'

Happened when search for 'L02BA'.

view · edit · sidebar · attach · print · history
Page last modified on February 07, 2017, at 06:46 PM