view · edit · sidebar · attach · print · history

Index>

20150317-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

Working on saving the changed information in the database via odba.

Remarking that in oddb2xml I never was able to identify in the regular expression things like chemical_substance and chemical_dose.

Also I think I must change the return values of update_compositions to return an array of compositions (correpsonding to one line in the columen Wirkstoffe), which is itself an array of agents.

Looking via bin/admin on how nutriflex (IKSRN 5594) is shown:

ch.oddb> registration('55594').compositions.first
-> Infusionsemulsion: Glucosum Anhydricum 150g / 500ml, Natrii Dihydrogenophosphas Dihydricus 2.34g / 500ml, Zinci Acetas Dihydricus 6.58mg / 500ml
ch.oddb> registration('55594').sequence('01').compositions.first.source
-> I) Glucoselösung: glucosum anhydricum 150 g ut glucosum monohydricum, natrii dihydrogenophosphas dihydricus 2.34 g, zinci acetas dihydricus 6.58 mg, aqua ad iniectabilia q.s. ad solutionem pro 500 ml.
ch.oddb> registration('55594').sequence('01').compositions[1].source
-> II) Fettemulsion: sojae oleum 25 g, triglycerida saturata media 25 g, lecithinum ex ovo, glycerolum, natrii oleas, aqua ad iniectabilia q.s. ad emulsionem pro 250 ml.
ch.oddb> registration('55594').sequence('01').compositions[2].source[0..150]
-> III) Aminosäurenlösung: isoleucinum 2.82 g, leucinum 3.76 g, lysinum anhydricum 2.73 g ut lysinum monohydricum, methioninum 2.35 g, phenylalaninum 4.21
ch.oddb> registration('55594').compositions[2].active_agents[2]
-> Lysinum Anhydricum 2.73g / 500ml
ch.oddb> registration('55594').compositions[2].active_agents[2].chemical_substance
-> Lysinum Monohydricum
ch.oddb> registration('55594').compositions[2].active_agents[2].chemical_dose
-> 
ch.oddb> registration('55594').compositions[2].active_agents[2].chemical_dose.class
-> NilClass
ch.oddb> registration('55594').sequence('01').compositions[2].substances.size
-> 22
ch.oddb> registration('55594').sequence('01').compositions[2].active_agents.size
-> 22
ch.oddb> registration('55594').sequence('01').compositions[2].active_agents.first
-> Isoleucinum 2.82g / 500ml
ch.oddb> registration('55594').sequence('01').compositions[2].substances.first
-> Isoleucinum
ch.oddb> registration('55594').sequence('01').compositions[2].active_agents.first.substance
-> Isoleucinum
ch.oddb> registration('55594').sequence('01').compositions[2].substances.first.oid
-> 1943
ch.oddb> registration('55594').sequence('01').compositions[2].active_agents.first.substance.oid
-> 1943
ch.oddb> registration('55594').sequence('01').compositions.first.label
-> I

Okay. Now I now better how oddb2xml must be improved for Nutriflex registration('55594').sequence('01') Another differences is, that oddb.org uses the Quanty class.

I must also avoid adding solutions, emulusions, etc as a substance. E.g http://ch.oddb.org/de/gcc/drug/reg/44625/seq/02 which has Solvens: aqua ad iniectabilia 5 ml.. Here the galenic form of Lyophilisat und Lösungsmittel is also different from the description in column C Präparatebezeichnung, where we have Trockenampullen + Solvens

Finding in bin/admin a registration with a chemical_dose

ch.oddb> $reg = registrations.values.find{ |x| x.compositions.first and x.compositions.first.active_agents and x.compositions.first.active_agents.first.chemical_dose != nil }
-> #<ODDB::Registration:0x000000075cd558>
ch.oddb> $reg.iksnr
-> 55491
ch.oddb> $reg.compositions.first.active_agents.first.chemical_dose
-> 12.5 mg
ch.oddb> $reg.compositions.first.active_agents.first.chemical_substance
-> Sennosidum B

Oddb2xml does not handle correctly quantities like min. 10^9 CFU. Neither does oddb.org e.g. http://ch.oddb.org/de/gcc/drug/reg/00679/seq/02

Pushed commits to oddb2xml:

As Zeno liked the description for the labels I readded them via a separate field. See commit Readded description for label

Unittests für oddb.org plugin swissmedic seem to work better. But somehow the active_agents names does not appear in the log. Will test tomorrow once on oddb-ci2 with a real database.

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