view · edit · sidebar · attach · print · history

Index>

20150114-fix-home-pharmacies

Summary

  • In home_pharmacies/ pressing pharmacy_list does not display the list
  • create new gem which dumps all medis with ean13 and atc code

Commits

Index

Keep in Mind for work to do in 2015
  • 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!
  • Display 10 recalls not only those from this month
  • Import via data/medreg_companies.yaml
  • Search via analysis does not work (spec/searchbar_spec.rb:90)

---

create new gem which dumps all medis with GTIN and ATC code

The task for the new gem gtin2atc is the following. Read in a file lines which start with a valid GTIN (aka EAN13)code.

Then search for the corresponding ATC code.

Source files for the link between GTIN and ATC are:

When a GTIN is found in swissmedic and refdata, do some validity checks. Usually the longer (more specific) ATC-code will win.

Committed Skeleton exists. Running specs fails

In home_pharmacies/ pressing pharmacy_list does not display the list

Creating a watir test for this behaviour. Corrected address_correction watir test, too with commit Added watir test for home_2_link. Fixed address correction test

Now checking why the companylist does not work. Validator had missing entry for "pharmacylist". More problems, as we want to display only the registration_holders and not other companies (like pharmacies).

Now displaying pharmacies works, too. But I don't know why the companylist shows only 7 (or in ch.oddb.org) 19 items. There is a listed? argument, which purpose I don't grasp, yet. bin/admin shows

ch.oddb> $x= 0; registration_holders.each{ |k,v| $x += 1 if v.listed? }; $x
-> 7
ch.oddb> $y= 0; companies.each{ |k,v| $y += 1 if v.listed? }; $y
-> 19

If I log in as admin, then much more companies are shown. If I follow the link "Aktuelle Einträge" I get redirected to http://oddb-ci2.dyndns.org/de/gcc/listed_companies/ where I see only the 7 listed companies. Shouldn't the logic be reversed? I must get Zenos opinion. Yes. When not logged in as admin user we should see all registration holders.

In src/model/company.rb we see that the method listed? returns @cl_status.

Pushed my corrections and improved watir tests with Fixed listing companies and pharmacies

Waiting for watir tests to finish before pulling them on thinpower.

When running spec/searchbar_spec.rb I did see the following output on oddbd (and failures in the watir tests)

error in SBSM::Session#process: /de/gcc
NoMethodError
undefined method `description' for nil:NilClass
/var/www/oddb.org/src/state/drugs/fachinfo_search.rb:83:in `block in match_term'
/var/www/oddb.org/src/state/drugs/fachinfo_search.rb:82:in `each'
/var/www/oddb.org/src/state/drugs/fachinfo_search.rb:82:in `match_term'
/var/www/oddb.org/src/state/drugs/fachinfo_search.rb:59:in `search'
/usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.5/lib/sbsm/state.rb:203:in `_trigger'

Fixed with commit Fix nil access when searching for fachinfo and regenerated FI with jobs/update_textinfo_swissmedicinfo --target=fi --reparse 63166. Oddbd now display Missing fachinfo for ean13 7680631660014 in pac #<ODDB::Package:0x007f15358791b8> when the fachinfo is no longer present.

Now the search works better, but we still have a problem at spec/searchbar_spec.rb:90 where we search for analysis.

view · edit · sidebar · attach · print · history
Page last modified on January 14, 2015, at 05:42 PM