view · edit · sidebar · attach · print · history

Index>

20151214-evidentia-atc-sort-order

Summary

  • Evidentia LNF: After searching for Sevikar ATC-Code C09DX03 should come after C09DB02
  • RSS-Feeds should show only last year + earlier in a separate

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search

RSS-Feeds should show only last year + earlier in a separate

Limit RSS feedback to year or so. Allow accessing RSS feeds of past years.

Changed to_html to emit only the feeds for this and last year. Added a unit-test. Running sudo -u apache /usr/local/bin/ruby jobs/update_rss_feeds to regenerate the feeds. But this only regenerate price_cut and sl_introduction.

Must call jobs/update_textinfo_swissmedicinfo --target=fi. Now I am starting to create files like fachinfo-2006.rss. The problem is, that it looks like update_textinfo_swissmedicinfo changes all active fachinfos and sets therefore the fachinfo.revision field (by odba_storage) to the actual date. Found a counter example

ch.oddb>  registration('58778').fachinfo.revision
-> 2015-10-28 07:09:27 +0100
ch.oddb>  registration('58778').fachinfo.de.date
-> Stand der Information
August 2015

Trying to make http://oddb-ci2.dyndns.org/de/gcc/rss/channel/fachinfo-2006.rss work. Okay. I think it is better to try to use http://oddb-ci2.dyndns.org/de/gcc/rss/channel/fachinfo.rss/2006. No. Made it pass with fachinfo-2006.rss. But the problem is, that the RSS feeds are still very big as shown by this list

-rw-r--r-- 1 apache apache  66K 14. Dez 13:50 data/rss/de/fachinfo-2006.rss
-rw-r--r-- 1 apache apache  44K 14. Dez 13:50 data/rss/de/fachinfo-2007.rss
-rw-r--r-- 1 apache apache  52K 14. Dez 13:50 data/rss/de/fachinfo-2008.rss
-rw-r--r-- 1 apache apache  22K 14. Dez 13:50 data/rss/de/fachinfo-2009.rss
-rw-r--r-- 1 apache apache 1.3M 14. Dez 13:50 data/rss/de/fachinfo-2010.rss
-rw-r--r-- 1 apache apache 861K 14. Dez 13:50 data/rss/de/fachinfo-2011.rss
-rw-r--r-- 1 apache apache 597K 14. Dez 13:50 data/rss/de/fachinfo-2012.rss
-rw-r--r-- 1 apache apache 8.9M 14. Dez 13:51 data/rss/de/fachinfo-2013.rss
-rw-r--r-- 1 apache apache 4.0M 14. Dez 13:52 data/rss/de/fachinfo-2014.rss
-rw-r--r-- 1 apache apache 9.3M 14. Dez 13:52 data/rss/de/fachinfo-2015.rss
-rw-r--r-- 1 apache apache  14M 14. Dez 13:49 data/rss/de/fachinfo.rss

fachinfo.rss contains the years 2014 and 2015. For comparision on thinpower we have 25M for data/rss/de/fachinfo.rss.

Activated the changes on thinpower and started update_textinfo_swissmedicinfo in screen 4390.update_fi_pi.

After searching for Sevikar ATC-Code C09DX03 should come after C09DB02

Looks like if the search_results uses the names of the atc_class to sort and not the code see bin/admin

ch.oddb> search_combined('Sevikar', 'de').atc_classes.first.code
-> C09DB02
ch.oddb> search_combined('Sevikar', 'de').atc_classes.last.code
-> C09DX03
ch.oddb> search_combined('Sevikar', 'de').atc_classes.first.name
-> Olmesartan Medoxomil und Amlodipin
ch.oddb> search_combined('Sevikar', 'de').atc_classes.last.name
-> Olmesartan Medoxomil, Amlodipine and Hydrochlorothiazide

Debugging I found that src/state/drugs/result.rb has the atc_classes correctly ordered. Therefore I probably must inject sorting by atc-code into the src/util/result_sort.rb. No. The problem lies that in src/view/drugs/resultlist.rb we did not sort the result by atc-code.

Now my watir test passes. Running all watir & unit tests before pushing commits Sort results by ATC-Code and Better logging for tests

view · edit · sidebar · attach · print · history
Page last modified on December 14, 2015, at 04:28 PM