view · edit · sidebar · attach · print · history

< Niklaus.20160315-swissmedic-packages | Index | Niklaus.20160302-fix-import-daily >>

20160314-wrong-pi-dokus

Summary

  • Some IKSNR show wrong PI

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
  • Remove parser for minifi (but keep the minifi)
  • BSV-Plugin does not send mail. Is it sending two mails at once?

Some IKSNR show wrong PI

Examples are:

In both cases no "Drucken" is displayed right to the titlename.

Similar results on oddb-ci2. A wrong PI is displayed. Find lines like

  • 2016-03-04 14:29:41 +0100: /var/www/oddb.org/src/plugin/text_info.rb:286:in `store_patinfo_for_all_packages': store_patinfo update for reg.iksnr 58145 lang de existing oid 34450980 []
  • 2016-03-04 14:32:26 +0100: /var/www/oddb.org/src/plugin/text_info.rb:1208:in `parse_textinfo': parse_textinfo 1208: must create textinfo for pi de 65236 of ["65235", "65236"]
  • 2016-03-04 14:32:26 +0100: /var/www/oddb.org/src/plugin/text_info.rb:317:in `update_patinfo_lang': update_patinfo_lang #<struct Struct::SwissmedicMetaInfo iksnr="65236", authNrs=["65235", "65236"], atcCode=nil, title="Trulicity®", authHolder="Eli Lilly (Suisse) SA", substances="Dulaglutid", type="pi", lang="de", informationUpdate="10.2014", refdata=nil, xml_file="/var/www/oddb.org/data/details/65235_pi_de_Trulicity__problem.xml", same_content_as_xml_file=true> ["de"]

Another problem is that Ebixa Tropflösung IKNSR 55829 was deleted again instead of creating it.

But first I reload the database to get the same data as thinpower.

After a discussion with Zeno we decided that we will first open the Packungen.xlsx and double check whether we really need to import the FI/PI or whether the package is outdated. (But we must still be able to add newly created FI/PI!). This will probably require some refactoring for the unit tests where we did not use the Packungen.xlsx at all. Reading the Packungen-latest.xlsx takes about 1 minute and a half.

While adapting the source code I remark that the jobs/check_swissmedicno_fi_pi was not run for a long time and that its code is broken, as it had no propert unit test. Fixing this.

When running import_daily I added a binding.pry whenever I did not find a package in Packungen.xlsx. It broke with a very curious error as => #<struct Struct::IKS_Package iksnr="00666", seqnr="01", ikscd="001", name_base="Octanate 250 IE, Trockensubstanz"> for IKSNR 00666 no package 004 was read, only a 0001. But 002 and 003 were present. Why? My Packungen-latests.xlsx is the same as data/xls/Packungen-2016.02.16.xlsx, but the newest is data/xls/Packungen-2016.03.05.xlsx.

Now it reports (correctly) the following missing packages:

  • Struct::IKS_Package iksnr="12175", seqnr="01", ikscd="019", name_base="Aphenylbarbit 50 mg, Tabletten">
  • Struct::IKS_Package iksnr="17664", seqnr="01", ikscd="026", name_base="Dr. Brand Salbe">
  • Struct::IKS_Package iksnr="17981", seqnr="02", ikscd="056", name_base="1001 Blattgrün Tabletten">
  • Struct::IKS_Package iksnr="25915", seqnr="03", ikscd="038", name_base="Depo-Medrol 80 mg/2 mL, Injektionssuspension"
  • Struct::IKS_Package iksnr="25915", seqnr="04", ikscd="046", name_base="Depo-Medrol 200 mg/5 mL, Injektionssuspension">
  • Struct::IKS_Package iksnr="26177", seqnr="02", ikscd="030", name_base="Kenacort-A 10 50 mg/5 mL, Injektionssuspension">
  • Struct::IKS_Package iksnr="26293", seqnr="02", ikscd="049", name_base="1001 Blattgrün Dragées">
  • Struct::IKS_Package iksnr="29789", seqnr="02", ikscd="045", name_base="Tegretol 400, Tabletten">
  • Struct::IKS_Package iksnr="30480", seqnr="02", ikscd="016", name_base="Ledermix Eugenol N, Lösung">

There are over 90 of these kind (including 6 occurrences of Ebixa 55828). Therefore I think I must first have a look at why the import_swissmedic did not fix this problem! Resetting Packungen-latest.xlsx to state of february and running jobs/import_swissmedic_only.

Looking at the code of plugin/swissmedic.rb I do not find any place, where we do a safety check, that all packages occurring in Packungen.xlsx really exist. Therefore missing somehow an addition will never be fixed. I think it should be easy (and quite fast) to add such a check.

Added a new line in the report "Re-Created missing Packages". First idea using update_package did not work. Must use update_registration. But this does not work correctly neither. Must reload database. Break after first recreate for debugging. Also Ebixa is the only one, where we have a mismatch of the sequence.iksnr. Updating unit test for this situation takes time, too.

Changing some comparision from string to integer via to_i fixed deactivating way too many packages.

view · edit · sidebar · attach · print · history
Page last modified on March 14, 2016, at 06:37 PM