view · edit · sidebar · attach · print · history

Index>

20170221-price-history-links

Summary

  • Price history links don't work
  • Rework display of calculation of DDD cost
  • Fix problem in CSV-Import of virbac
  • Keep in Mind

Commits

Index

Fix problem in CSV-Import of virbac

Ran sudo -u bbmb /usr/local/bin/ruby231 bin/update_abschluss_artikel_artikel_fr_kunden config=/var/www/virbac.bbmb.ch/etc/config.yml and got the following error

Bbmb(Virbac): (<unknown>): did not find expected alphabetic or numeric character while scanning an alias at line 4 column 15
Psych::SyntaxError
(<unknown>): did not find expected alphabetic or numeric character while scanning an alias at line 4 column 15
/usr/local/lib/ruby/2.3.0/psych.rb:380:in `parse'
/usr/local/lib/ruby/2.3.0/psych.rb:380:in `parse_stream'
/usr/local/lib/ruby/2.3.0/psych.rb:463:in `load_stream'
/usr/local/lib/ruby/2.3.0/psych/deprecated.rb:30:in `load_documents'
/usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.1.3/lib/bbmb/util/polling_manager.rb:131:in `load_sources'
/usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.1.3/lib/bbmb/util/polling_manager.rb:138:in `poll_sources'
/usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.1.3/lib/bbmb/util/updater.rb:11:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/bbmb-2.1.3/lib/bbmb/util/server.rb:161:in `update'
bin/update_abschluss_artikel_artikel_fr_kunden:41:in `<module:BBMB>'
bin/update_abschluss_artikel_artikel_fr_kunden:12:in `<main>'

But running locally with the same files I did not get any error. Why? And I cannot test the result locally, because the virbac does not start correctly. After uninstalling sbsm 1.3.1 and 1.3.2 from the ruby231 it worked.

Now it is possible to add "Propentotab 100mg 100 Tabl." to an order locally. Therefore my question is: Why does the import work locally but not on fastpower. Checking versions of sbsm, etc.

On fastpower we do not use bundler for /service/virbac.bbmb.ch/run.

Testing locally whether sudo -u bbmb /usr/local/bin/bundle-240 exec bin/update_abschluss_artikel_artikel_fr_kunden config=/var/www/virbac.bbmb.ch/etc/config.yml works

in /var/www/virbac.bbmb.ch calling:

  • sudo -u bbmb gem231 install --install-dir vendor bundler
  • sudo -u bbmb git pull https://github.com/ngiger/virbac.bbmb.ch.git master
  • sudo -u bbmb vendor/bin/bundle install --path vendor/bundle
  • sudo -u bbmb chmod +x bin/update_abschluss_artikel_artikel_fr_kunden

Changed glob_pattern: *.CSV to glob_pattern: '*.CSV' in etc/polling.yml. Also added an explicit require 'syck' to bin/update_abschluss_artikel_artikel_fr_kunden with commits

Now I am able to see the Propentotab 100mg 100 Tabl.

Rework display of calculation of DDD cost

Must add the the = cost bold part in display of daily cost. Done. But must also display the prices inside the calculation in the correct currency.

To make this work must move the method convert_price from src/view/dataformat.rb to a more general price. oddb_app?

Pushed commit Fix display calculation for DDD cost Silenced the output with commit Disable SHOW_PRICE_CALCULATION

Price history links don't work

The links like http://ch.oddb.org/de/gcc/price_history/reg/57047/seq/01/pack/004/search_type//search_query/augmentin+duo+457+mg+%28400%2F57%29%2C+140+ml don't work. Why?

Other links like http://oddb-ci2.dyndns.org/de/gcc/price_history/reg/46452/seq/04/pack/038/search_type/st_sequence/search_query/Augmentin work. Same for http://oddb-ci2.dyndns.org/de/gcc/price_history/reg/53974/seq/02/pack/074/search_type/st_sequence/search_query/Augmentin http://ch.oddb.org/de/gcc/price_history/reg/53974/seq/02/pack/074/search_type/st_sequence/search_query/Augmentin+Duo+457+mg+%28400

I think the links given by Zeno is just not correct, as the IKSNR 57047 is for Co-Amoxi-Mepha 457 (ATC J01CA04) and not for augmentin (ATC J01CR02). I am wondering how Zeno arrived at this non working URL, as this should never happen with ODDB. It is also curious that no search_type is specified.

Zeno used the instant. But I think the problem stems from the fact that after selecting an item the link back e.g. "Zurück zu Home<Zurück zur Liste für "augmentin 1 g (875/125), 12 tablette(n)"<Preisvergleich für Augmentin 1 g (875/125)" does not work. Trying to click on this link gives you errors like Ihr Such-Stichwort: "augmentin duo 457 mg (400/57), 140 ml" hat ein leeres Resultat ergeben.

Comparing the instant search with the price search we see that in the price search we get a result for inderal 10 mg but not for inderal 10 mg 150 tabletten. But the instant search specifies it the 150 tablets, too.

Added a (currently failing) Watir test for going back in spec/rezept_and_instantsearch_spec.rb.

Pushed commits:

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