view · edit · sidebar · attach · print · history

Index>

20150916-atc-codes-inconsistent

Summary

  • Remove '- ' before 'L'
  • Cleanup non-existing category "Komplementärmedizin" by Swissmedic
  • Atc-code seem to be inconsistent

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.

Remove '- ' before 'L'

Yesterday commit made appear a '-' before the limitation text, in oddb.ci, e.g. sevikar.

Looks like @lookandfeel.enabled?(:prepend_limitation_text) returns true, even if I enabled it only for Evidentia. But I forgot to specify as default_value false! Some problem with show_legend_by_default.

Fixed with commit Fix problem with '- L'

Cleanup non-existing category "Komplementärmedizin" by Swissmedic

We have 254 packages where the complementary_type is set to :complementary. First one is IKSRN 26251 Isochinol. We set these values to nil

ch.oddb> $nr=1; packages.values.each{|x| $nr += 1 if x.complementary_type == :complementary}; $nr
-> 254
ch.oddb> packages.values.find{|x| $nr += 1 if x.complementary_type == :complementary}.name_base
-> Isochinol
packages.values.each{|x| if x.complementary_type == :complementary; x.complementary_type = nil; x.odba_store; end}
ch.oddb> $nr=1; packages.values.each{|x| $nr += 1 if x.complementary_type == :complementary}; $nr

When looking in packages.xlsx I find that swissmedic classified this now as "Synthetika human".

To remove all complementary registrations we must also update the companies which are flagged as :complementary. This can be done using the following bin/admin statements

companies.values.each{|x| next unless x.complementary_type == :complementary; update(x.pointer, {:complementary_type => nil}, :manual_update); x.odba_store }
packages.values.each {|x| next unless x.complementary_type == :complementary; update(x.pointer, {:complementary_type => nil}; :manual_update); x.odba_store}

After theses changes Isadoe in http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/iscador/search_type/st_oddb?#best_result is still using the wrong background color.

Removing now complementary from the legend, the validator and the lnf-values. Done. But still having the same problems.

I think it has a weird interaction with my commit about the limitation links. When searching for sevikar (where we find limitation text) no css-class containing complementary is found. However searching for iscador finds no product with a limitation and the first occurrence of the css class="list complementary">  is found at the beginning of the first display result row.

Okay looking longer at the code I found via bin/admin that the packages of iscador contain the :complentary as :complementary_type, too.

ch.oddb> registration('56832').name_base
-> Iscador U c. Hg 0,01 mg
ch.oddb> registration('56832').packages.values.collect{|x| x.sl_generic_type}
-> [:complementary, :complementary, :complementary, :complementary, :complementary, :complementary, :complementary, :complementary]
ch.oddb> registration('56832').packages.values.collect{|x| x.complementary_type}
-> [:anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy]

Therefore must cleanup these values too. No. I must fix the definition of sl_generic_type. sl_generic_type is an accessor of the package and used by various elements. Done with bin/admin

ch.oddb> registrations.values.each {|reg| reg.packages.values.each { |x| next unless x.sl_generic_type == :complementary; update(x.pointer, {:sl_generic_type => reg.complementary_type}, :manual_update); x.odba_store} }
ch.oddb> registration('56832').packages.values.collect{|x| x.sl_generic_type}
-> [:anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy, :anthroposophy]

Now I still have the problem that the color looks right, but that for Iscador I still have many css fiels <td class="list anthroposophy"> </td>

Breaking at line 329 of src/view/drugs/resultlist.rb. With "Sevikar" I return after type next in pry for the line super(packages, offset). With "Iscador" however, it displays the whole page and never returns! There are 182 packages in the list be shown.

Looking whether older version of oddb.org have the same problem. E.g. 41094fe1110f1a5928f37d22e8b97f1a74da8920 from August 17, 2015. Yes. When displaying for iscador we have also man css_class "list anthroposophy", respectively "list anthroposophy bg" when using the evidentia-lnf.

On oddb-ci2 reloading the database and reverting to the same commit as on thinpower. To be sure, running the bin/admin commands again to fix companies, registrations and packages.

companies.values.each{|x| next unless x.complementary_type == :complementary; update(x.pointer, {:complementary_type => nil}, :manual_update); x.odba_store }
registrations.values.each {|x| next unless x.complementary_type == :complementary; update(x.pointer, {:complementary_type => nil}, :manual_update); x.odba_store}
registrations.values.each {|reg| reg.packages.values.each { |x| next unless x.sl_generic_type == :complementary; update(x.pointer, {:sl_generic_type => reg.complementary_type}, :manual_update); x.odba_store}}

Restarting oddbd and looking at iscador and sevikar. Now iscador seems to display correctly, but the HTML is not. For Gencydo the color and the HTML is correct

It is easy to find inconsistencies between the

ch.oddb> $x = registrations.values.find {|reg| reg.packages.values.find { |x| x.sl_generic_type != reg.complementary_type} }
-> #<ODDB::Registration:0x00000008469ee0>
ch.oddb> [$x.iksnr, $x.name_base, $x.complementary_type]
-> ["63051", "Zeel comp.", :homeopathy]
ch.oddb> $x.packages.values.collect{|x| x.sl_generic_type}
-> [nil, nil]
ch.oddb> registrations.values.find_all {|reg| reg.packages.values.find { |x| x.sl_generic_type != reg.complementary_type} }.size
-> 2948
# verified that complementary_type in packages works.
ch.oddb> registrations.values.find_all {|reg| reg.packages.values.find { |x| x.complementary_type != reg.complementary_type} }.size
-> 0

Verifying that my code to remove :complementary, passes the following requirements:

  • After search by trademark for Iscador, the "Kat." should show 'A / SL ' and not 'A / SL '/'
  • The mouseOver should not include sl_anthroposphy_small
  • Entry "C = Arzneimittel der Komplementarmedizin" must be absent

Code does not yet work correctly. Does neither display SO nor SG in Category nor mouseover (Using price search for '3TC'). Why? Using and instead of && fixed the problem.

Added a watir test for SL/SG/SO, too. Pushed the commits:

Atc-code seem to be inconsistent

It looks as if the atc-codes are not completely consistent in our database. May be the swissmedic-follower job atc_less (class Atc_lessPlugin) does not correctly cleanup old items.

The following conditions must be met:

  • The atc-code for each sequence must be correct. Correct means here when comparing the ATC-Code from swissmedic (Packungen.xlsx) and refdata (XMLRefdataPharma.xml)
    • take the code when both match
    • take the longer code
    • when refdata and swissmedic don't agree, take the one from swissmedic

We must also check

  • that all packages belonging to a given sequence return the same atc-code
  • that when changing the atc_code we must ensure that references to the given sequence are deleted

We found this problem when looking at Kaletra where the atc_code J05AE06 (Lopinavir) was changed to J05AR10 (Lopinavir and Ritonavir). But we have also ATC-code J05AE03 Ritonavir, which is found, e.g in IKSNR 60090 Norvir. Therefore a price search via lopinavir should not return Kaletra.

view · edit · sidebar · attach · print · history
Page last modified on September 16, 2015, at 05:54 PM