Looking at the Packungen.xlsx (of september 07 2017) I sorted the data by column J "Gültigkeitsdauer der Zulassung" and found only 6 packages with a date before 2017.09.01 and around 30 expiring between 1 and 13 september 2017. We have 17782 valid packages (we exclude the veterinary use of the 19378 listed packages). Therefore we have only a small chance to find greyed out drugs in a search result (e.g. 48606 Gromazol, Crème)
But I just remarked that my improvements to the :check option for the swissmedic-importer corrected the expiration_date of the packages still in the Packungen.xlsx, but it did not delete packages which are no longer in the packungen.xlsx, eg. 53066, as show by this bin/admin snippet
ch.oddb> registration('53066').packages.collect{|x| x.expiration_date} -> [2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14, 2016-12-14]
This must be corrected. Added that code and running import_swissmedic_only. It had problems and tried to remove existing packages like block in check_all_packages': deactivate registration 65788 Traumeel S
.
Working on the SL-Limitation problem.
Improved the spec test and could not find any error when searching for
Searching was done like this.
Compare and check the various result found. Pushed new watir spec test with Watir spec tests for search limitations
Looking at failed unit tests showed, that the sequence_filter was not working correctly.
This error can be show when visiting https://oddb-ci2.dyndns.org/de/anthroposophy/search/zone/drugs/search_query/tropfen/search_type/st_sequence?#best_result. Which throws
NoMethodError: undefined method `ddd' for #<Array:0x0055df2f8a2c58> /var/www/oddb.org/src/model/search_result.rb:44:in `block in has_ddd?' /var/www/oddb.org/src/model/search_result.rb:44:in `each' /var/www/oddb.org/src/model/search_result.rb:44:in `find' /var/www/oddb.org/src/model/search_result.rb:44:in `has_ddd?' /var/www/oddb.org/src/view/additional_information.rb:56:in `atc_ddd_link' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:83:in `create' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:284:in `compose_component' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:213:in `block in compose' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `compose' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:72:in `init' /var/www/oddb.org/src/view/drugs/resultlist.rb:61:in `init' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:139:in `initialize' /var/www/oddb.org/src/view/drugs/resultlist.rb:330:in `new' /var/www/oddb.org/src/view/drugs/resultlist.rb:330:in `compose_subheader' /var/www/oddb.org/src/view/drugs/resultlist.rb:319:in `block in compose_list' /var/www/oddb.org/src/view/drugs/resultlist.rb:318:in `each' /var/www/oddb.org/src/view/drugs/resultlist.rb:318:in `compose_list' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/list.rb:54:in `compose' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:72:in `init' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/list.rb:129:in `init' /var/www/oddb.org/src/view/drugs/resultlist.rb:254:in `init' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:139:in `initialize' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:76:in `new' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:76:in `create' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:284:in `compose_component' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:213:in `block in compose' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `compose' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:72:in `init' /var/www/oddb.org/src/view/drugs/result.rb:126:in `init' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:139:in `initialize' /var/www/oddb.org/src/view/publictemplate.rb:71:in `new' /var/www/oddb.org/src/view/publictemplate.rb:71:in `content' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:83:in `create' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:284:in `compose_component' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:213:in `block in compose' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `each' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:209:in `compose' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/composite.rb:72:in `init' /var/www/oddb.org/src/view/publictemplate.rb:68:in `init' /var/www/oddb.org/src/view/resulttemplate.rb:29:in `init' /var/www/oddb.org/vendor/ruby/2.4.0/gems/htmlgrid-1.1.4/lib/htmlgrid/component.rb:139:in `initialize' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/state.rb:241:in `new' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/state.rb:241:in `view' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/state.rb:174:in `to_html' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/session.rb:547:in `to_html' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/session.rb:279:in `block in process_rack' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/session.rb:209:in `synchronize' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/session.rb:209:in `process_rack' /var/www/oddb.org/vendor/ruby/2.4.0/gems/sbsm-1.5.9/lib/sbsm/app.rb:127:in `call'
As no watir test checked whether homeopathy or other specialised skins worked, added one simple test for it.
Pushed commit Fix search result for homeopathy
Dropped and reloaded database. Running import_swissmedic_only with checkes for all registrations and all packages.
The following bugs were reported yesterday
Running bundle exec bin/rapflag -b --dump
to be able to analyze the errors made.
Bugs 1 and 2 were easily fixed with commit Add Dividend and distribution to income Released rapflag gem 1.0.4.
Bug 4 looks like a nice to have feature. Looking at the problems with the ending balance. e,g. bug 6 of Aug-20.