view · edit · sidebar · attach · print · history

Index>

20151010-cleanup-bsv-import

Summary

  • Fix BSV import (generic-type, remove pharmacode)

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.
  • Create a history of FI changes and add a nice diff (colored) to compare any two versions. Look at gems like diffy or differ
  • Ofev (IKSNR 65330) has a not yet WHO-Approved ATC-Code L01XE31. The job atc_less should add the new ATC-Code with an empty name and flag it in its report for human intervention (e.g. extracting the substance name from the FI)
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Get ATC-Code from FI and compare it to the XML and Packungen.xlsx

Fix BSV import (generic-type, remove pharmacode)

Yesterday we remarked the following two errors when running the BSV import.

  • It emits many errors, because the pharmacode tag was dropped
  • The sl_generic_type is not set correctly when new packages appear in Packungen.xlsx. E.g IKSNR 61848, sequence 01 where only the pack 002 is found in bsv_xml, but not pack 001. (Levetiracetam Desitin 100)

Dropping the pharmacode is more work than I expected, as it was needed to get the package from the database to be compared with. Replacing it by finding it via package_by_ikskey made many unit tests break.

Started jobs/import_bsv_only with my local changes. Did complete but deleted all sl_entries. This must be fixed.

Also wondering why in the report of october 02 I find 206 Missing Swissmedic-Codes in SL (out of trade) (expected 206, e.g. 59267 seq 07 pack 011). But looking at the Packungen.xlsx it is valid till 10.11.2019. And it can be found in Preparations.xml.

Fixed various errors. Now I have only one failing unit tests. Running the jobs/import_bsv_only has problems like

{:name_base=>"Anapen", :name_descr=>"Inj Lös 0.300 mg Auto", :swissmedic_no5_bag=>"57570", :deductible=>:deductible_g, :generic_type=>:unknown, :swissmedic_no5_oddb=>"57570"}
Storing 57570001
 57570001 @out_of_trade false
@completed_registrations 6
Storing   sl_entry {:limitation_points=>nil, :limitation=>nil, :bsv_dossier=>"18624", :introduction_date=>#<Date: 2007-09-01 ((2454345j,0s,0n),+0s,2299161j)>, :status=>"0"}
Could not create: :!registration,57570!sequence,01!001!part., reason: :!registration,57570!sequence,01!001!part. -> ODDB::Sequence::package(001) returned nil
Could not create: :!registration,57570!sequence,01!001!sl_entry., reason: :!registration,57570!sequence,01!001!sl_entry. -> ODDB::Sequence::package(001) returned nil

IKSNR 57570 Anapen appears in Preparations.xml but not in Packungen.xlsx.

Found the reason, why the sl_entries did not get updated. Trying to fix it. Starting import again. Will continue tomorrow.

view · edit · sidebar · attach · print · history
Page last modified on October 20, 2015, at 06:08 PM