view · edit · sidebar · attach · print · history

Index>

20151026-utf-problem-password-change

Summary

  • UTF-8 problem when changing the password
  • Import Swissmedic must set all not found sequences to expired
  • Should consider new atc-codes from who

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.
  • Create a history of FI changes and add a nice diff (colored) to compare any two versions. Look at gems like

diffy or differ

  • Ofev (IKSNR 65330) has a not yet WHO-Approved ATC-Code L01XE31. The job atc_less should add the new ATC-Code with an empty name and flag it in its report for human intervention (e.g. extracting the substance name from the FI)
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Get ATC-Code from FI and compare it to the XML and Packungen.xlsx

Should consider new atc-codes from who

The WHO publishes a list of candidates of new ATC codes. These should be added to our list with a separate flag. See http://www.whocc.no/atc/lists_of_new_atc_ddds_and_altera/new_atc/?order_by=0.

Added a unit test. Looks nice, but will continue tomorrow.

Import Swissmedic must set all not found sequences to expired

When running swissmedic import, it did not set no more found sequences to expired. Example was sequence 26 of IKSNR 00485 (Influvac).

It was quite easy to add a unit test for this problem in test/test_plugin/swissmedic_xlsx.rb. Looks as I could fix the problem now. Running jobs/import_swissmedic_only on oddb-ci2. Had to correct an error, as I deleted way too many packages. Reloaded DB and restarted import.

Now the list of deleted packages looks a lot better. Now found about 970 package which are obsolete. But there was

Error: NotImplementedError
Message: method `method_missing' called on terminated object (0x00000039e08588 flags=0x0 klass=0x0)
Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/model/sequence.rb:351:in `block in violates_patent?'
/var/www/oddb.org/src/model/sequence.rb:350:in `each'
/var/www/oddb.org/src/model/sequence.rb:350:in `any?'
/var/www/oddb.org/src/model/sequence.rb:350:in `violates_patent?'
/var/www/oddb.org/src/model/sequence.rb:93:in `active?'
/var/www/oddb.org/src/model/sequence.rb:65:in `active_packages'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/model/registration.rb:74:in `block in active_packages'
/var/www/oddb.org/src/model/registration.rb:73:in `each'
/var/www/oddb.org/src/model/registration.rb:73:in `inject'
/var/www/oddb.org/src/model/registration.rb:73:in `active_packages'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/plugin/swissmedic.rb:127:in `block in deactivate_not_found_packages'
/var/www/oddb.org/src/plugin/swissmedic.rb:123:in `each'
/var/www/oddb.org/src/plugin/swissmedic.rb:123:in `deactivate_not_found_packages'
/var/www/oddb.org/src/plugin/swissmedic.rb:236:in `update'
/var/www/oddb.org/src/util/updater.rb:444:in `block in update_swissmedic'
/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:442:in `update_swissmedic'
jobs/import_swissmedic_only:29: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_swissmedic_only:12:in `<module:Util>'
jobs/import_swissmedic_only:11:in `<module:ODDB>'
jobs/import_swissmedic_only:10:in `<main>'

Add a work around for this problem. Also deleting packages no longer presents. Sequences were never deleted. Drop, reload databse and restart import again.

Looks a lot better. But report output was not clear enough. Running import again after restoring database again.

Now I am happy with it and pushed commit Delete packages not found when running import_swissmedic

UTF-8 problem when changing the password

When visiting http://ch.oddb.org/de/gcc/user/name/martin.born%40pharmasuisse.org we got the error Encoding::CompatibilityError incompatible character encodings: ASCII-8BIT and UTF-8.

Looking at service log I found:

40000000562dd595313aaf1c error in SBSM::Session#to_html: /de/gcc
@40000000562dd595313ab304 Encoding::CompatibilityError
@40000000562dd595313ab6ec incompatible character encodings: ASCII-8BIT and UTF-8
@40000000562dd595313ab6ec /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/lookandfeel.rb:105:in `_lookup'
@40000000562dd595313abad4 /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/lookandfeel.rb:94:in `lookup'
@40000000562dd595313abad4 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/errormessage.rb:43:in `error_text'
@40000000562dd595313af184 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/errormessage.rb:56:in `__message'
@40000000562dd595313af184 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/errormessage.rb:66:in `block in __messages'
@40000000562dd595313af56c /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/errormessage.rb:63:in `each'
@40000000562dd595313af954 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/errormessage.rb:63:in `__messages'
@40000000562dd595313b0124 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/errormessage.rb:36:in `error_message'
@40000000562dd595313b050c /var/www/oddb.org/src/view/admin/entity.rb:134:in `init'
@40000000562dd595313b050c /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
@40000000562dd595313b1894 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `new'
@40000000562dd595313b1894 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:61:in `create'
@40000000562dd595313b1c7c /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:286:in `compose_component'
@40000000562dd595313b1c7c /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
@40000000562dd595313c261c /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
@40000000562dd595313c2a04 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
@40000000562dd595313c2dec /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
@40000000562dd595313c2dec /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
@40000000562dd595313c39a4 /var/www/oddb.org/src/view/publictemplate.rb:62:in `new'
@40000000562dd595313c39a4 /var/www/oddb.org/src/view/publictemplate.rb:62:in `content'
@40000000562dd595313c39a4 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:68:in `create'
@40000000562dd595313c3d8c /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:286:in `compose_component'
@40000000562dd595313c5114 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:211:in `block in compose'
@40000000562dd595313c5114 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `each'
@40000000562dd595313c54fc /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:205:in `compose'
@40000000562dd595313c54fc /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/composite.rb:57:in `init'
@40000000562dd595313c5ccc /var/www/oddb.org/src/view/publictemplate.rb:59:in `init'
@40000000562dd595313c60b4 /var/www/oddb.org/src/view/privatetemplate.rb:17:in `init'
@40000000562dd595313c60b4 /usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:139:in `initialize'
@40000000562dd595313c60b4 /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:245:in `new'
@40000000562dd595313c649c /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:245:in `view'
@40000000562dd595313c6c6c /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/state.rb:181:in `to_html'
@40000000562dd595313c6c6c /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:447:in `to_html'
@40000000562dd595313c7054 /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:173:in `block in drb_process'
@40000000562dd595313c83dc <internal:prelude>:10:in `synchronize'
@40000000562dd595313c83dc /usr/local/lib/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process'
@40000000562dd595313c83dc /usr/local/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block'
@40000000562dd595313c87c4 /usr/local/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform'
@40000000562dd595313c87c4 /usr/local/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop'
@40000000562dd595313c8f94 /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop'
@40000000562dd595313c937c /usr/local/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop'
@40000000562dd595313c937c ODDB::View::Admin::EntityComposite::COMPONENTS[[0, 1]] in create(ODDB::View::Admin::EntityForm)
@40000000562dd595313c937c ODDB::View::Admin::Entity::COMPONENTS[[0, 3]] in create(content)
current [1] RO 1-1, 852 of 876, (66484) Ende 0x40 (64)                                                                                                                                                                            
view · edit · sidebar · attach · print · history
Page last modified on October 26, 2015, at 07:27 PM