---
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
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
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
things work okay