view · edit · sidebar · attach · print · history

Index>

20150128-fix-all-atcless

Summary

  • oddb2xml should produce info for packages size
  • fix registrations without atc_codes
  • Remove CAS in Evidentia LNF

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.
  • Display 10 recalls not only those from this month
  • Import via data/medreg_companies.yaml

---

Remove CAS in Evidentia LNF

Must remove the explanation "Cas Reg.Nr. = CAS Registry" when showing legend in searches like /evidentia/search/zone/drugs/search_query/nolvadex/search_type/st_oddb?#best_result

Done with commit Evidentia lnf: remove CAS Registry

fix registrations without atc_codes

Must see why we still have 27 sequences with number != '00' which have no atc_class, e.g. de/gcc/show/reg/63239/seq/04

In the log/oddb/debug/2015/01.log output I found

2015-01-27 18:29:17 +0100: /var/www/oddb.org/src/plugin/swissmedic.rb: 88: update_atc_code iksnr 63239 sequence.atc_class is nil. setting it to A10BD16

Using bin/admin I see that it has an atc_class, but its value is nil. E.g

ch.oddb> registration('63239')
-> #<ODDB::Registration:0x0000000b0b8c30>
ch.oddb> registration('63239').sequences.keys
-> ["01", "02", "03", "04"]
ch.oddb> registration('63239').sequences.values.first.atc_class.class
-> NilClass
ch.oddb> atc_class('A10BD16').class
-> NilClass

Running jobs/update_whocc (with some logging output) to see whether it will correctly import A10BD16. Found 2015-01-28 08:39:14 +0100: who: created A10BD16 name Metformin and Canagliflozin in log/oddb/debug/2015/01.log and the check in bin/admin works now

ch.oddb>  atc_class('A10BD16')
-> Metformin and Canagliflozin

Waiting for update_whocc to finish. Then starting import_swissmedic.

Now the search for atcless produces 15 packages. The following items still need investigation

de/gcc/show/reg/09232/seq/01
de/gcc/show/reg/10999/seq/01
de/gcc/show/reg/11787/seq/02
de/gcc/show/reg/12570/seq/01
de/gcc/show/reg/44978/seq/01
de/gcc/show/reg/62470/seq/01
de/gcc/show/reg/62583/seq/01
de/gcc/show/reg/62667/seq/01
de/gcc/show/reg/62854/seq/01
de/gcc/show/reg/63056/seq/01
de/gcc/show/reg/63147/seq/01
de/gcc/show/reg/63242/seq/01

I think most of them can be considered harmless, e.g. 09232 is Weleda Schnupfencrème an anthroposific product. Checked a few more products. All were homeopatic.

I think we should change the definition of atcless-index from atc_class.nil? to atc_class.nil? and complemantary_type.nil?. Zeno remarks that each medicament must have an ATC-code, which is just not managed good enough by SwissMedic, whereas SwissIndex has it.

Therefore the job update_atc_less_sequences should be moved to a separate plugin and run as a swissmedic_follower, using as input the packages.xlsx and swissindex_pharma.xml files.

Pushed commit Update all atc_code defined in swissmedic-Packungen

Pushed a small commit Corrected WHO-report for ATC-codes

Adding a new job atc_less proved to be quite some work as I had to cover the following situations

  • use pure rubyXL (don't rely on the compatiblity features from swissmedic-diff)
  • use sax-machine for parsing the swissmedic.xml (as in oddb2xml)
  • Use ATC-Code from SwissIndex (via iksnr + package-nr) if no ATC-code in swissmedic
  • If for one package you cannot find an ATC code do it for all
  • Go to new row in packages file if you had found a sequence for this package
  • Handle case (e.g. R01Z) where we have no ATC-code from the WHO for IKSNR (63018, Osanit)

Rerunning the job after updating database to thinpower.

For reasons unknown to me the index atcless does not get updated when running my job atc_less. After

  1. running job atc_less via swissmedic_followers
  2. jobs/rebuild_indices atcless
  3. resturat oddbd

things work okay

oddb2xml should produce info for packages size

view · edit · sidebar · attach · print · history
Page last modified on January 30, 2015, at 02:15 PM