view · edit · sidebar · attach · print · history

Index>

20170926-search-limitations

Summary

  • Search limitiation for SL-Only or valid only do not work as expected
  • fix rapflag bugs
  • Keep in Mind

Commits

Index

Search limitiation for SL-Only or valid only do not work as expected

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

  • Soolantra 10 mg which returned 2/1/2 items. must_be_greater is true
  • Methotrexat which returned 36/20/36 items. must_be_greater is true
  • mephadolor which returned 3/3/3 items. must_be_greater is false
  • Omeprazol MUT Sandoz which returned 24/12/24 items. must_be_greater is true

Searching was done like this.

  1. clear all search limititations in the preferences
  2. Search via trademark for the given name and save the nr of found times
  3. Set the search limititations in the preferences to the given value
  4. Search via trademark for the given name and save the nr of found times
  5. clear all search limititations in the preferences
  6. Search via trademark for the given name and save the nr of found times

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.

fix rapflag bugs

The following bugs were reported yesterday

  • BUG 1: "distribution" should be classified as INCOME.
  • BUG 2: "Dividend" should be classified as INCOME.
  • BUG 2 ("Dividend" again): On AUG-28 on USD Exchange Wallet: you are ignoring the line containing the word Dividend, whereas you are supposed to read that ending balance off of every line (and taking the End-of-Day balance after reading every line) AND classifying the credit on that day as INCOME. REMINDER: "Deposit Wallet" = "Funding Wallet"
  • BUG 3: on AUG-02, in USD wallet (exchange or funding need to check), there is a $3'148 dollar discrepancy between YWeSlack and True. This is most likely because you picked up twice the line where BCH is sold for USD, wherein $3'148 are the cash proceeds for the sale.
  • BUG 4: There seems to be a Timing Discrepancy between the downloaded Ledger Data (YWeSee vs AviRap). I have everything set to CET (Central European Time, e.g., Rome Time) and bitfinex allows me to change that. Check if you can change this setting such that the downloaded data via the API has the same timing convention.
  • BUG 5: on AUG-17: on USD Exchange Wallet: the ending balance for YWeSlack is $4'370, whereas for TRUE the ending balance is $0.
  • BUG 6: on AUG-20: on USD Exchange Wallet: the ending balance for YWeSlack is -$4.15, whereas for TRUE the ending balance is $0. This seems to be because you are not parsing line containing the word Settlement at all, when you are supposed to read that line and classify the debit on that day as INCOME.
  • BUG 8: on BTC (total) there are dates skipped where there are no ledger entries. There supposed to be an Ending Balance (and Income) for every Calendar Day, and if there was no Ledger Entry on that day then the Income should be zero and the Ending Balance should be what it was the day before.

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.

view · edit · sidebar · attach · print · history
Page last modified on September 27, 2017, at 02:37 PM