view · edit · sidebar · attach · print · history

Index>

20170214-fix-cibacen

Summary

  • Cibacen as 5 times nr of tablets
  • Cleaning up travis build
  • Fix DDD cost
  • Keep in Mind

Commits

Index

Fix Cibacen as 5 times nr of tablets

In Cibacen package size is five time 28 Tablette(n). Why? Investigation using bin/admin shows

ch.oddb> registration('50583').package('112').size
-> 28 Tablette(n) + 28 Tablette(n) + 28 Tablette(n) + 28 Tablette(n) + 28 Tablette(n)
ch.oddb> registration('50583').package('112').parts.size
-> 5
ch.oddb> registration('50583').package('112').parts.first.size
-> 28 Tablette(n)
ch.oddb> registration('50583').package('112').compositions.size
-> 1
ch.oddb> registration('50583').package('112').compositions.first
-> teilbare Filmtabletten: Benazeprili Hydrochloridum 10 mg
registration('50583').package('112').source[0..120]
-> 01   Cibacen 5 mg, teilbare Tabletten
02   Cibacen 10 mg, Tabletten
03   Cibacen 20 mg, Tabletten
05   Cibacen 10 mg, tei

The date of last import is: 16.03.2016. Running jobs/import_swissmedic_only -update_compositions -fix_galenic_form 50583

Run failed with

Plugin: ODDB::SwissmedicPlugin

Error: NoMethodError
Message: undefined method `unit' for nil:NilClass
Backtrace:
/var/www/oddb.org/src/model/dose.rb:133:in `rescue in <=>'
/var/www/oddb.org/src/model/dose.rb:122:in `<=>'
/var/www/oddb.org/vendor/ruby/2.4.0/gems/odba-1.1.2/lib/odba/stub.rb:158:in `=='
/var/www/oddb.org/vendor/ruby/2.4.0/gems/odba-1.1.2/lib/odba/stub.rb:158:in `=='
/var/www/oddb.org/vendor/ruby/2.4.0/gems/odba-1.1.2/lib/odba/stub.rb:158:in `=='
/var/www/oddb.org/src/model/activeagent.rb:72:in `block (2 levels) in =='
/var/www/oddb.org/src/model/activeagent.rb:71:in `any?'
/var/www/oddb.org/src/model/activeagent.rb:71:in `block in =='
/var/www/oddb.org/src/model/activeagent.rb:67:in `any?'
/var/www/oddb.org/src/model/activeagent.rb:67:in `=='
(eval):3:in `include?'
(eval):3:in `include?'
/var/www/oddb.org/src/plugin/swissmedic.rb:943:in `block (2 levels) in update_compositions'
/var/www/oddb.org/src/plugin/swissmedic.rb:942:in `each'
/var/www/oddb.org/src/plugin/swissmedic.rb:942:in `each_with_index'
/var/www/oddb.org/src/plugin/swissmedic.rb:942:in `block in update_compositions'
/var/www/oddb.org/src/plugin/swissmedic.rb:889:in `each'
/var/www/oddb.org/src/plugin/swissmedic.rb:889:in `each_with_index'
/var/www/oddb.org/src/plugin/swissmedic.rb:889:in `update_compositions'
/var/www/oddb.org/src/plugin/swissmedic.rb:1223:in `update_all_sequence_info'
/var/www/oddb.org/src/plugin/swissmedic.rb:238:in `block in update'
/var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `block in each'
/var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `each'
/var/www/oddb.org/vendor/ruby/2.4.0/gems/rubyXL-3.3.1/lib/rubyXL/worksheet.rb:23:in `each'
/var/www/oddb.org/src/plugin/swissmedic.rb:220:in `update'
/var/www/oddb.org/src/util/updater.rb:419:in `block in update_swissmedic'
/var/www/oddb.org/src/util/updater.rb:527:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:417:in `update_swissmedic'
jobs/import_swissmedic_only:30:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_swissmedic_only:12:in `<module:Util>'
jobs/import_swissmedic_only:11:in `<module:ODDB>'
jobs/import_swissmedic_only:10:in `<main>'

Pushed Fix comparing dose with nil. Rerunning import.

Did not fix the problem. Deleted the superfluos part manually without a problem. After restarting all ch.oddb services still absent.

Cleaning up travis build

Want to fix all remaining errors and get rid of warnings. Pushed commit Replaced assert_equal(nil by assert_nil to avoid warnings

Pushed more fixes with

Now after years of hard work the master branch of oddb.org passes the Travis-Builds. See https://travis-ci.org/ngiger/oddb.org/builds/201498419. But we have still around 120 skipped tests.

Fix DDD cost

Looking at Fludex. Here Mr. Wallimann gets a cost of 0.60 per day as we have a price public of 17.90 for 30 Retard-Tablets. We arrive a 0.99 because we the WHO DDD is 2.5 mg whereas a tablet only has 1.5 mg. Added an exception for galenic_groups containing Retard. Now it passes.

Fixed problem with longevity.

Mr. Wallimann reports a price of 0.98 for Symfona. But we arrive at the double because one tablet contains the double of the DDD as recommended by the WHO and the FI recommends one tablet each day.

Also for Importal I don't understand why our DDD of 1.00/day should be in correct. There are 10 sachet of 10 gr for 9.99, and the WHO reports a DDD of 10 g/day.

Looking at other differences, Eg. IKSNR 54499 package 19 Fraxiforte 0,6 mL, Injektionslösung where the correct DDD should be 3.10, but is way too big.

Using pry to debug the ruby-units to show

 Unit.new('1 TU').base
=> 16666.7 mol/s
 Unit.new('1 UI').base
=> 1 each
Unit.new('11400 U.I.').base
ArgumentError: '11400 U.I.' Unit not recognized
Unit.new('11400 UI').base
=> 11400 each

Is my new added definition of UI in package.rb wrong?

The FI show Graduierte Fertigspritzen 0,6 ml à ca. 100 mg Nadroparin corresp. 11’400 I.E. anti-Xa. The WHO defined TU as "Thousands Units" whereas ruby-units return 1e+12 for ((Unit.new('1 TU')/Unit.new('1 U')).base) (aka Tera). Found a fix. But other injections do not work. Looking at Champix, too. But here I did not yet find a good solution, whithout breaking other tests.

view · edit · sidebar · attach · print · history
Page last modified on February 14, 2017, at 05:33 PM