view · edit · sidebar · attach · print · history

Index>

201503123-oddb-org-wirkstoffe

Summary

  • oddb.org should import and display all components after a swissmedic-import as in oddb2xml

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

oddb.org should import and display all components after a swissmedic-import as in oddb2xml

Ran the jobs/ and got

ODDB::SwissmedicPlugin - Report 20.03.2015
Total time to update: 225.00 [m]
Updated compositions: 23769
Updated agents: 12905
New agents: 7504

Running it a second time with

@ODDB::SwissmedicPlugin - Report 20.03.2015
Total time to update: 86.00 [m]
Updated compositions: 20039
Updated agents: 15183
New agents: 5226

This is not exactly what I expected. In the second run the number of updated/new agents should be 0.

Must fix all remeining errors when running the unit tests for plugin/swissmedic. Unit tests fail because of parameters to @app.update. The following trick allows to see nicely the calls to flexmock objects. Eg.

 $calls = []
 @app.should_receive(:update).and_return {|pointer, args, what| $calls << "#{__LINE__} #{pointer} args #{args} what #{what}" }
 <.. more actions and tests>
 puts "#{__LINE__} update got called with \n #{$calls.join("\n")}"

Took me several hours to fix the unit-tests. Some problems were more precises definition of like "Dose.new(50.0, 'mg/g)

Now I must resolve the problems shown via

  • test_update_composition__chemical_form
  • test_update_composition__focus_on_doses_percent (e.g. we should parse correctly fluticasoni-17 propionas 100 µg, lactosum monohydricum q.s. ad pulverem pro 25 mg.
  • test_update_composition__focus_on_doses_qty_in_scale

I think it was okay to fix some problems like

-        :dose      => %w'50 mg/g',
+        :dose      => Dose.new(50.0, 'mg/g'),

It proves to be quite tricky to match this stuff with regular expressions. Adding unit tests in oddb2xml spec/calc_spec.rb

Looks like IKSNR 613

I) DTPa-IPV-Komponente (Suspension): toxoidum diphtheriae 30 U.I., toxoidum tetani 40 U.I., toxoidum pertussis 25 µg et haemagglutininum filamentosum 25 µg, virus poliomyelitis typus 1 inactivatum (D-Antigen) 40 U., virus poliomyelitis typus 2 inactivatum (D-Antigen) 8 U., virus poliomyelitis typus 3 inactivatum (D-Antigen) 32 U., aluminium ut aluminii hydroxidum hydricum ad adsorptionem, formaldehydum 10 µg, conserv.: phenoxyethanolum 2.5 µl, residui: neomycinum, streptomycinum, polymyxini B sulfas, medium199, aqua q.s. ad suspensionem pro 0.5 ml.
II) Hib-Komponente (Lyophilisat): haemophilus influenzae Typ B polysaccharida T-conjugatum 10 µg, trometamolum, saccharum, pro praeparatione.

does not get parsed correctly.

view · edit · sidebar · attach · print · history
Page last modified on March 24, 2015, at 05:38 PM