view · edit · sidebar · attach · print · history

< Niklaus.20160302-fix-import-daily | Index | Niklaus.20160229-fi-with-wrong-language >>



  • FI and changelog of newly imported FI has wrong language



Keep in Mind for work to do
  • Fix dojo error
  • 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, too.
  • Use refdatabase for, 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)

FI and changelog of newly imported FI has wrong language

I am a little bit confused. Last night the import daily completed successfully for FI and PI and completed in less than 30 minutes.

But running jobs/update_textinfo_swissmedicinfo --reparse --target=both 65856 65460 had an error when sorting the PI at

Error: ArgumentError
Message: comparison of Array with Array failed
/var/www/ `sort'
/var/www/ `first'
/var/www/ `description'
/var/www/ `method_missing'
/var/www/ `block in diff'
/var/www/ `each'
/var/www/ `diff'
/var/www/ `issue_update'
/var/www/ `block in update'
/var/www/ `call'
/var/www/ `failsafe'
/var/www/ `update'
/var/www/ `update'
/var/www/ `store_patinfo_for_all_packages'
/var/www/ `block (2 levels) in update_patinfo_lang'
/var/www/ `each'
/var/www/ `block in update_patinfo_lang'
/var/www/ `each'
/var/www/ `update_patinfo_lang'
/var/www/ `parse_textinfo'
/var/www/ `block in import_swissmedicinfo'

Checking the result of import_daily which reported eg. New/Updates PI from Patinfo - DE - Aconitum-Homaccord, Tropfen["48561"]. Neither FI nor PI showed up on oddb-ci2.

For 63202 Ginkgo-Mepha the registration was created, but neither FI nor PI added correctly. Why?

Fixing the import. Rerunning import-daily and now I got a corectly looking Changing the loop to always compare whether HTML-file is same or not (unless option reparse is given).

Got an error while updating the PI.

Error: NoMethodError
Message: undefined method `packages' for ["47783", "fi", "de"]:Array
/var/www/ `block in packages'
/var/www/ `each'
/var/www/ `inject'
/var/www/ `packages'
/usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
/var/www/ `block (2 levels) in report_problematic_names'
/var/www/ `each'
/var/www/ `block in report_problematic_names'
/var/www/ `open'
/var/www/ `report_problematic_names'
/var/www/ `parse_aips_download'
/var/www/ `import_swissmedicinfo'
/var/www/ `block in update_notify_simple'
/var/www/ `call'
/var/www/ `wrap_update'
/var/www/ `update_notify_simple'
/var/www/ `update_textinfo_swissmedicinfo'
/var/www/ `run'
jobs/import_daily:13:in `block in <module:Util>'

Looking for changelogs in bin/admin via

$f = registrations.values.find_all{|reg| reg.fachinfo && >0}
-> Array
ch.oddb> $f.size
-> 580
ch.oddb> $f.collect{|reg|}.uniq.sort.first
-> 2015-11-06
ch.oddb> $f.collect{|reg|}.uniq.sort.last
-> 2016-01-08

On thinpower this gives me the following result

ch.oddb> $f.size
-> 918
ch.oddb> $f.collect{|reg|}.uniq.sort.last
-> 2016-02-27
ch.oddb> $f.find{|reg| ==,02,27)}.iksnr
-> 08537
$f2 = $f.find_all{|reg| ==,02,27)}
ch.oddb> $f2.collect{|reg| reg.iksnr}
-> ["08537", "33670", "34383", "34385", "37551", "49526", "55263", "55649", "56285", "56552", "57244", "57555", "57673", "59455", "59876", "61337", "61344", "62181", "65314"]

On oddb-ci2 it did not update the FI 65314. Why? Using pry to debug the situation I found the missing reg.odba_store inside store_fachinfo.

Also fixed the error when patinfo got created.

Reloading database of January 11 and running import_daily Got no Changelogfor, but the changed line containing Aliskiren-haltigen Arzneimitteln as shown as changelog in is already present. Must reload the old database again, to check, whether this is really correct. The Change in seems to be quite old as it show at the end

-September 2013.
-Interne Versionsnummer: 1.4
+April 2015.
+Interne Versionsnummer: 2.2

With the dump of January 11 I did not have an FI for 65314.

Running import_daily got another weird error

Error: NotImplementedError
Message: method `method_missing' called on unexpected T_ZOMBIE object (0x0000009ef1ffb0 flags=0x103e klass=0x0)
/var/www/ `block in import_swissmedicinfo'
/var/www/ `each'
/var/www/ `import_swissmedicinfo'
/var/www/ `block in update_notify_simple'
/var/www/ `call'
/var/www/ `wrap_update'
/var/www/ `update_notify_simple'
/var/www/ `update_textinfo_swissmedicinfo'
/var/www/ `run'
jobs/import_daily:13:in `block in <module:Util>'
/var/www/ `call'
/var/www/ `run'
jobs/import_daily:12:in `<module:Util>'
jobs/import_daily:11:in `<module:ODDB>'
jobs/import_daily:10:in `<main>'
/var/www/ is deleted
/var/www/ `block in import_swissmedicinfo': method `method_missing' called on unexpected T_ZOMBIE object (0x0000009ef1ffb0 flags=0x103e klass=0x0) (NotImplementedError)
        from /var/www/ `each'
        from /var/www/ `import_swissmedicinfo'
        from /var/www/ `block in update_notify_simple'
        from /var/www/ `call'
        from /var/www/ `wrap_update'
        from /var/www/ `update_notify_simple'
        from /var/www/ `update_textinfo_swissmedicinfo'
        from /var/www/ `run'
        from jobs/import_daily:13:in `block in <module:Util>'
        from /var/www/ `call'
        from /var/www/ `run'
        from jobs/import_daily:12:in `<module:Util>'
        from jobs/import_daily:11:in `<module:ODDB>'
        from jobs/import_daily:10:in `<main>'

I didn't now that we have zombies in I am getting another weird error. Found in dmesg an out of memory killer. May this had a destabilizing effect after trying to run the profiling last week.

Getting DB-Dump from yesterday. Then will reboot and reload the database. Okay. Looks better. I have now an FI for 65314. Running import_daily again.

Search for wrong changelogs in german/french of february 2016 via

$de = registrations.values.find_all{|reg| reg.fachinfo &&{|ch| ch.time >=,02,25)}}
$de.size'', 'w+') {|de| $de.each{|reg| de.puts "#{reg.iksnr}: #{"\n")[0..2]}" } }

$fr = registrations.values.find_all{|reg| reg.fachinfo &&{|ch| ch.time >=,02,25)}}
$fr.size'', 'w+') {|fr| $fr.each{|reg| fr.puts "#{reg.iksnr}: #{"\n")[0..2]}" } }

See and


  • 65479, 65460: FI french instead of german
  • 65383/65384 FI changed from german -> French ok

Reimporting 65479 and 65460 via jobs/update_textinfo_swissmedicinfo --reparse --target=both 65479 65460.

view · edit · sidebar · attach · print · history
Page last modified on March 01, 2016, at 03:58 PM