view · edit · sidebar · attach · print · history

Index>

20170206-fix-ajax-mouseover

Summary

  • Fix Ajax-MouseOver for category
  • Changing atc_code did not work as expected
  • Fix DDD prices
  • Keep in Mind

Commits

Index

Ajax-Mouseover for category

Must review my changes, improve the unit test and the other occurrence of tooltip. It is too much of hassle to check the correctly generated Javascript

Pushed commit Use TooltipDialog instead of tooltip

Studied https://dojotoolkit.org/reference-guide/1.10/dijit/Dialog.html as Zeno would like the popup of the SL-Categories to never be larger then the current view. I think there is a bug in the dijit tooltip, as the first time it gets placed outside. Therefore activeted the preload. Now the tooltip is shown correctly if you wait long enough (about 30 seconds) after loading the first result list before you hover over the category. Also after a new search, the tooltip is always displayed correctly. Pushed commit Preload tooltip and place it to the left

Changing atc_code did not work as expected

As discussed under http://dev.ywesee.com/Niklaus/20170201-fix-ajax-mouseover#atc-code-udpate changing the ATC-code in the admin view or via the swissmedic-import does not delete the outdate link of the old act_code to its sequences. This must be fixed.

Finding all misplaced errors can be done in bin/admin with

ch.oddb> $atc_errors = atc_classes.values.collect{ |atc| atc.sequences.find_all{|x| x.atc_class.code != atc.code}}.flatten.uniq
-> [#<ODBA::Stub:69820645483100#28756588 @odba_class=ODDB::Sequence @odba_container=69820645519100#48282>]
ch.oddb> $atc_errors.size
-> 1
ch.oddb> $atc_errors.first
-> Ibandronat Actavis i.v. Osteo 3mg/3ml, Injektionslösung
ch.oddb> $atc_errors.first.atc_class.code
-> M05BA06
ch.oddb> $atc_errors.first.pointer
-> :!registration,62279!sequence,01.

Found in src/model/atcclass.rb a method repair_needed? which is used by the plugin/who.rb to delete obsolete sequences. Trying whether this work via bin/admin on oddb_ci2. Yes. Demonstrated by this snippet

ch.oddb> $atc_errors.size
-> 2
ch.oddb> atc_class('M05BA08').repair_needed?
-> repair_needed? M05BA08: 
  Deleting 62279/01 with M05BA05
  After odba_store having 20 sequences. Before we had 21 sequences.
ch.oddb> $atc_errors = atc_classes.values.collect{ |atc| atc.sequences.find_all{|x| x.atc_class.code != atc.code}}.flatten.uniq
-> [#<ODBA::Stub:69939573089960#24644535 @odba_class= @odba_container=69939573111020#46807>]
ch.oddb> atc_class('M05BA06').repair_needed?
-> repair_needed? M05BA06: 
  Deleting 60532/01 with M05BA05
  After odba_store having 15 sequences. Before we had 16 sequences.
ch.oddb> $atc_errors = atc_classes.values.collect{ |atc| atc.sequences.find_all{|x| x.atc_class.code != atc.code}}.flatten.uniq
-> []

How can we trigger this repair_needed? when updating via the view?

Fixed the problem with commit Fix updating atc_class in view/admin

Fix DDD prices

Continue work for Laxipeg, where we have again an excipiens as poudre.

Looking at Champix. This is a very difficult problems as in PI it described to be composed of two different contents

Champix Initialpackung für die ersten 4 Wochen: 11 weisse Filmtabletten zu 0.5 mg und 42 hellblaue Filmtabletten zu 1 mg.
Champix 0.5 mg: 56 weisse Filmtabletten.
Champix 1 mg: 56 oder 112 hellblaue Filmtabletten.

Working on Laxipeg. But I think here we should expect 0.90 and not 0.5 as given by Mr. Wallimann (18.45/20=0.9002).

Refactored my unit testing by adding a helper method

  def create_test_package(iksnr: , ikscd: , price_public: , ddd_dose: , atc_code: ,
                          pack_dose: ,
                          excipiens: nil,
                          composition_text: nil,
                          parts: [],
                          galenic_group: 'Tabletten')

Wanted to push my local commit, but running the export showed a regression

Error: ArgumentError
Message: Incompatible Units ('mg' not compatible with 'mmol')
Backtrace:
/var/www/oddb.org/vendor/ruby/2.4.0/gems/ruby-units-2.1.0/lib/ruby_units/unit.rb:733:in `<=>'
/var/www/oddb.org/src/model/package.rb:332:in `>'
/var/www/oddb.org/src/model/package.rb:332: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/plugin/csv_export.rb:185:in `block (2 levels) in export_ddd_csv'
/var/www/oddb.org/src/plugin/csv_export.rb:171:in `each'
/var/www/oddb.org/src/plugin/csv_export.rb:171:in `block in export_ddd_csv'
/usr/local/ruby-2.4.0/lib/ruby/2.4.0/csv.rb:1299:in `open'
/var/www/oddb.org/src/plugin/csv_export.rb:157:in `export_ddd_csv'
/var/www/oddb.org/src/util/updater.rb:98:in `block in export_ddd_csv'
/var/www/oddb.org/src/util/updater.rb:527:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:96:in `export_ddd_csv'
jobs/export_ddd_csv:13:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/export_ddd_csv:12:in `<module:Util>'
jobs/export_ddd_csv:11:in `<module:ODDB>'
jobs/export_ddd_csv:10:in `<main>'

Will fix tomorrow this regression. Comes from :!registration,33460!sequence,01. @@ddd_galforms (?i-mx:tabletten?) galenic_group Tabletten match true excipiens Excipiens Pro Compresso

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