view · edit · sidebar · attach · print · history

Index>

20151207-evidentia-out-of-trade-must-be-shown

Summary

  • Evidentia wants out of trade products like Rivoleve to show up, too
  • Fix generics xls export
  • Run headless watir test using xvfb

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
  • Limit RSS feedback to year or so. Allow accessing RSS feeds of past years.

Evidentia wants out of trade products like Rivoleve to show up, too

Yesterday I implemented the search for trademark using the exact search, which find any product which contains the search-query, e.g. it would return Rivoleve 200, Rivoleve 500, Rivoleve 1000 when search for Rivolve (using search_by_sequence). This is how our search by trademark works.

It seems however that Evidentia wants it to match the complete trademark. Therefore a search for Levetiracetam should return nothing, as no product matches this name completely. A search for Levetiracetam Desitin should return some results. But we only have products like Levetiracetam Desitin 500 mg/mL, Levetiracetam Desitin 1000 mg.

Conclusion: We need a new search type, which return all drugs where the name begins with the trademark, but where one or more entities describing the dosage should be excluded.

Must also reactivate the debugging, to look why Rivoleve 250 (registration('62036')) does not come at the top of the search results, as expected. Okay, the search_by_sequence did not work as I expected. Prove is this bin/admin snippet.

ch.oddb> search_by_sequence('Rivoleve')
-> [Levetiracetam]

We could probably just look how large is the part of the base_name of the registration which can be initiliazed to a Dose. E.g (500 mg/5 mL). Testing whether a search like registrations.values.find_all{ |x| /Rivoleve/i.match(x.name_base) } takes a long time (ignoring the first execution time). No, it completes fast.

Creating watir test cases for "Levetiracetam Desitin" and "Rivoleve" to catch the errors and describe the desired results. Done. Three new tests in spec/evidentia_spec.rb

Found that we have one registration (54935) where the basename is nil.

Some special names that I think I cannnot handle well are

2-Fluorglukose (18-F)
3TC
Agoprim 800 /160
Alutard SQ 6-Gräsermischung + Roggen Kombipackung
Alutard SQ 6-Gräsermischung Kombipackung

Adding unit tests to handle comparing package names to the desired trademark name. Added unit tests and made them pass. Thinking whether I catched all possible cases, while running all unit and watir tests.

Running the watir test showed, that the unit test for result_sort did not yet take in account the out_of_trade. Must fix that, too.

Pushed commit Fix recognition of trademark for Evidentia. Priorize out of trade, too.

After pushing the commit I checked on evidentia for Levetiracetam Desitin, Inderal Ponstan and Duodopa.

What is weird, is that sometimes it works fine and sometimes not. Finally I discovered that in src/util/resultsort I accessed @session instead of using the session passed to the method sort_result. Rename the variables to a_session. Took some time to fix the unit tests, too. Added small corrections to ignore the case when looking for drug names. Pushed commit Evidentia. Fix trademark and ignore case and Fix unit-tests. Thanks to Travis-CI!

Export generika to excell must work

Culprit is registration('56828').sequence('01').comparables "InductOs 1.5 mg/ml, poudre, solvant et matrice pour matrice pour implantation". Pushed work-around with commit Rescue errors when calculation package.comparable

Ist the ATC-Code for M05BC01 the cause?

Run headless watir test using xvfb

As described in yesterdays blog I installed xvfb on oddb-ci2. Today I created a small script to run a given watir test headless. See commit Added script to run watir tests via xvfb

Fix watir tests where we visit URL sent by e-mail

I hardcoded some URL in my watir tests to visit URL after entering eg. a corrected address for a pharmacy. They are broken as soon as a new database from thinpower is loaded.

Therefore I want to make them pass (which will work only when they are running on the same machine as the obbb-daemon) by picking up the generated URL from the log file. Eg. spec/address_correction_spec.rb.

Pushed commit Fix address_suggestion for pharmacies

view · edit · sidebar · attach · print · history
Page last modified on December 08, 2015, at 06:22 PM