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
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
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:
Die Wirkung des homöopathischen Komplexmittels beruht auf den Arzneimittelbildern der jeweiligen Einzelsubstanzen und deren Synergien.
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.