view · edit · sidebar · attach · print · history

Index>

20150921-evidentia-new-links

Summary

  • new links for evidentia
  • Get the ATC code from the fachinfo, compare it to the atc in Packungen.xlsx(if present) from Swissmedic and in refdata.xml(if present)

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.

new links for evidentia

Under http://dev.ywesee.com/uploads/att/Evidentia_Neuverlinkung_17.9.2015.pdf Evidentia defined how the links for its lnf must look like. This defines the changes

  • The link below "Präparat" must point to the the Fachinfo
  • Remove the column FI
  • The column "PP/Vergleich" must be link the "Preisvergleich"
  • Inside the Preisvergleich, the link to "Zusammensetzung" must be deactivated
  • (separate substask) get atc from FI if absent in data from Swissmedic or Refdata

Creating a new spec/evidentia_spec.rb. Moved some evidentia related spec from smoketest_spec. Maed the above mentioned 4 point fail in the specs. Changes were easy to implement.

Pushed commits

Get the ATC code from the fachinfo, compare it to the atc in Packungen.xlsx(if present) from Swissmedic and in refdata.xml(if present)

Using bin/admin to poke around I found

$all_atc_codes={}; fachinfos.values.each{|fi| next unless registrations.find{|reg| not fi.reg.inactive?}; begin m = /.{0,10}ATC.{10}/i.match(fi.description('de').effects.to_s); rescue; m='rescue' end; $all_atc_codes[fi.iksnrs] = (m ?  m[0] : nil) }
File.open('atc_codes.list', 'w+') { |f| $all_atc_codes.each{|k,v| f. puts "#{k} => #{v}" }}
File.open('fi_without_atc.list', 'w+') { |f| $all_atc_codes.each{|k,v| f. puts "#{k}" unless v }}

We found 101 fachinfos without an ATC-Code. See Attach:atc_codes_list.txt and Attach:fi_without_atc_list.txt

Adding a new field atc_code in the Fachinfo class. Updated ext/fiparse/src/fachinfo_hpricot.rb to extract atc_code from the fachinfo HTML. We already stored the atcCode from the Swissmedic-XML (Entity atcCode inside medicalInformation).

Looking at the following cases:

  • 63051 Zeel comp, Die Wirkung des homöopathischen Komplexmittels beruht auf den Arzneimittelbildern der jeweiligen Einzelsubstanzen und deren Synergien.
  • 65330 Ofev (no atc-code in registration)

Running jobs/update_textinfo_swissmedicinfo --target=both --reparse 63051 63242 65065 58943 65330 65512. Then reparse all.

Had to fix a few problems with swissmedic (to check the keys in the packungen.xls was broken).

Pushed the commits

Searches for ofev via price comparision still don't work, as no new ATC-code was generated. Will be fixed after my vacaction.

Generating the generica xls failes with

Plugin: ODDB::XlsExportPlugin
Error: ArgumentError
Message: comparison of ODBA::Stub with ODBA::Stub failed
Backtrace:
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:186:in `sort'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:186:in `factored_compositions'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:124:in `comparables'
(druby://localhost:10005) /var/www/oddb.org/src/model/package.rb:213:in `comparables'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/generics_xls.rb:96:in `block in export_generics'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:183:in `each'
(druby://localhost:10005) /var/www/oddb.org/src/model/sequence.rb:183:in `each_package'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:155:in `block in each_package'
(druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:154:in `each_value'
(druby://localhost:10005) /var/www/oddb.org/src/model/registration.rb:154:in `each_package'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/src/util/oddbapp.rb:709:in `block in each_package'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `each_value'
(druby://localhost:10005) /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
(druby://localhost:10005) /var/www/oddb.org/src/util/oddbapp.rb:708:in `each_package'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/generics_xls.rb:94:in `export_generics'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:112:in `block in export_generics_xls'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:253:in `call'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:253:in `block in safe_export'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/tempfile.rb:316:in `open'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:252:in `safe_export'
(druby://localhost:10005) /var/www/oddb.org/ext/export/src/odba_exporter.rb:110:in `export_generics_xls'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
(druby://localhost:10005) /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
/var/www/oddb.org/src/plugin/xls_export.rb:22:in `export_generics'
/var/www/oddb.org/src/util/updater.rb:122:in `block in export_generics_xls'
/var/www/oddb.org/src/util/updater.rb:549:in `call'
/var/www/oddb.org/src/util/updater.rb:549:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:120:in `export_generics_xls'
/var/www/oddb.org/src/util/updater.rb:307:in `update_bsv_followers'
jobs/import_bsv:15:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `call'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_bsv:12:in `<module:Util>'
jobs/import_bsv:11:in `<module:ODDB>'
jobs/import_bsv:10:in `<main>'

No idea on how to fix this fast.

view · edit · sidebar · attach · print · history
Page last modified on September 24, 2015, at 07:20 PM