view · edit · sidebar · attach · print · history

Index>

20170130-fix-ddd-calculation

Summary

  • Fix DDD for drugs like Arlevert
  • Random error "NoMethodErr undefined method 'upto' for (19/2):Rational
  • Keep in Mind

Commits

Index

Fix DDD for drugs like Arlevert, pro compresso with two active agents

Next drug to look at is Arlevert.

Arlevert tabl 20 stk should have a PP_DD of 3.70 and not 1.23. Created a test case. Must handle "Excipiens Pro Compresso". This is very common in oddb_calc.xml (7396 occurrences). But I must be aware of the variants "pro Compressi Obducti Pro Charta", "compresso Obducto", "compresso, Alia", "compresso, Aspartamum", "Ana Partes 0.5 Mg, Excipiens pro compresso".

But the problem is that we have two active substances as shown by the FI and that https://www.whocc.no/atc_ddd_index/?code=N07CA52 says N07CA52 cinnarizine, combinations 90 mg O Refers to cinnarizine

Galenische Form und Wirkstoffmenge pro Einheit
1 Tablette enthält: 20 mg Cinnarizinum und 40 mg Dimenhydrinatum.

This information presented via bin/admin:
[@
$package = registration('59285').package('001')
ch.oddb> $package.active_agents.size
-> 2
ch.oddb> $package.active_agents.first
-> Cinnarizinum 20 mg
ch.oddb> $package.active_agents.first.dose
-> 20 mg
ch.oddb> $package.active_agents.last
-> Dimenhydrinatum 40 mg
ch.oddb> $package.active_agents.last.dose
-> 40 mg

This fixes 3 more prices reported by Mr. Wallimann. But looking at http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/Anginova/search_type/st_oddb#best_result I think we should also fix the same problem when we have 2 substances in a solution (not tablet as here).

Also changes the daily cost for Anginova, Depakine, Zemplar, Valproat, Champiz (only pack 009 of IKSNR 57736).

Fix DDD for drugs like DEPAKINE Chrono

Creating a test for DEPAKINE Chrono. After committing the changes for Arlevert the DDD for Depakine Chrono 300 changed from 1.43 to 2.05, but Mr. Wallimann calculated a DDD of 1.37. Looking at the FI we find

Galenische Form und Wirkstoffmenge pro Einheit
Depakine Chrono 300 mg, Filmtabletten mit Bruchrille: Acidum valproicum 87 mg, Natrii valproas 200 mg, entspricht 300 mg Natriumvalproat.

The excipiens is defined as Excipiens pro Compresso Obducto. IKSNR is 47693, pack 047. Creating a unit test.

I do not see yet why Mr Wallimann arrived at price of 1.37 which is just 4% lower than the 1.43 we calculated.

Fix DDD for drugs like MUCILAR

Creating a unit test. Here we have a composition of psyllii testa 4.5 g, glucosum monohydricum 4.4 g, aromatica, excipiens ad pulverem pro 9 g., but bin/admin reports

ch.oddb> $package.compositions.first.excipiens
-> Excipiens ad Pulverem
ch.oddb> $package.sequence.composition_text
-> psyllii testa 4.5 g, glucosum monohydricum 4.4 g, aromatica, excipiens ad pulverem pro 9 g.

In oddb_calc.xml we find the following definition

        <EXCIPIENS>
          <SUBSTANCE_NAME>Excipiens ad pulverem</SUBSTANCE_NAME>
          <QTY>9</QTY>
          <UNIT>g</UNIT>
        </EXCIPIENS>

Unfortunately I do not add the dose of an excipiens in the swissmedic plugin. Therefore it is not present in the model.

Status is the following:

  • For Estradot Transdermales Plaster, it is impossible to deduce that we need 2 per 7 days from the information present in Packungen.xlsx.
  • For Colosan I get different results than those reported by Mr. Wallimann. (eg. 0.56 instead of 0.58).
  • The scripts resumes the status with "Fixed 42 of 98 problems reported by Mr. Wallimann"
  • For Pradaxa the WHO changed the DDD in decembre 2016 from 0.22 to 0.3

See Attach:wallimann_2017_01_30.txt

There are 38 remaining problems with price difference > 10 %: Attach:remaining_problems.txt

Fix DDD for drugs like Laxipeg

Creating a unit test. Here we have again an excipiens as poudre. The sequence.composition_text is macrogolum 4000 9.736 g, acesulfamum kalicum, aromatica, excipiens ad pulverem pro 10 g.. Maybe we should just calculate the quantity of the excipiens via the composition_text. The FI shows

Galenische Form und Wirkstoffmenge pro Einheit
Pulver zum Einnehmen als Lösung.
·1 Beutel (10 g) enthält 9,736 g Macrogolum 4000

Random error "NoMethodErr undefined method 'upto' for (19/2):Rational"

Zeno remarked that last Friday he got the Error NoMethodErr undefined method 'upto' for (19/2):Rational when searching for Nutriflex. Looking at the error logs. In the errorlog I see many errors like this one

Fri Jan 27 02:04:39 2017] [error] mod_ruby: error in ruby
[Fri Jan 27 02:04:39 2017] [error] mod_ruby: (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `_id2ref': 0x3ff82ead43bc is not id value (RangeError)
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:375:in `to_obj'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/site_ruby/1.8/odba/drbwrapper.rb:70:in `to_obj'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:1403:in `to_obj'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:1705:in `to_obj'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:613:in `recv_request'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:911:in `recv_request'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:1531:in `init_with_client'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from (druby://localhost:11000) /usr/lib64/ruby/1.8/drb/drb.rb:1543:in `setup_message'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:    ... 18 levels...
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from /usr/lib64/ruby/site_ruby/1.8/sbsm/request.rb:61:in `process'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from /var/www/oddb.org/doc/index.rbx:21:in `<top (required)>'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from /usr/local/lib/ruby/1.9.1/apache/ruby-run.rb:53:in `load'
[Fri Jan 27 02:04:39 2017] [error] mod_ruby:   from /usr/local/lib/ruby/1.9.1/apache/ruby-run.rb:53:in `handler'

But the port 11000 belongs /var/www/ipn.ywesee.com/etc/yipn.yml: de.oddb.org: druby://localhost:11000. Why are calls to ypn/de redirected to ch.oddb.org. This does not seem to be related to this error.

In /var/service/log/main/current I found

@40000000588f32e4027860ac NoMethodError
@40000000588f32e402789b44 undefined method `upto' for (15/2):Rational
@40000000588f32e40278e964 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:125:in `each_field'
@40000000588f32e402790c8c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:243:in `block in each_field'
@40000000588f32e402791c2c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:242:in `upto'
@40000000588f32e402792014 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:242:in `each_field'
@40000000588f32e40279339c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:231:in `add_style'
@40000000588f32e402795e94 /var/www/oddb.org/src/view/drugs/resultlist.rb:295:in `compose_list'
@40000000588f32e40279627c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:54:in `compose'
@40000000588f32e4027a1244 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:72:in `init'
@40000000588f32e4027a1244 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:129:in `init'
@40000000588f32e4027a162c /var/www/oddb.org/src/view/drugs/resultlist.rb:254:in `init'
@40000000588f32e4027a162c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/component.rb:139:in `initialize'
@40000000588f32e4027a1a14 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:76:in `new'
@40000000588f32e4027a25cc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:76:in `create'
@40000000588f32e4027a29b4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:284:in `compose_component'
@40000000588f32e4027a2d9c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:213:in `block in compose'
@40000000588f32e4027a356c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `each'
@40000000588f32e4027a3954 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `compose'
@40000000588f32e4027a3954 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:72:in `init'
@40000000588f32e4027a73ec /var/www/oddb.org/src/view/drugs/result.rb:126:in `init'
@40000000588f32e4027a73ec /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/component.rb:139:in `initialize'
@40000000588f32e4027a73ec /var/www/oddb.org/src/view/publictemplate.rb:62:in `new'
@40000000588f32e4027a8b5c /var/www/oddb.org/src/view/publictemplate.rb:62:in `content'
@40000000588f32e4027a8b5c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:83:in `create'
@40000000588f32e4027a9ee4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:284:in `compose_component'
@40000000588f32e4027ac20c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:213:in `block in compose'
@40000000588f32e4027ad594 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `each'
@40000000588f32e4027ae534 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `compose'
@40000000588f32e4027b23b4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:72:in `init'
@40000000588f32e4027b23b4 /var/www/oddb.org/src/view/publictemplate.rb:59:in `init'
@40000000588f32e4027b3b24 /var/www/oddb.org/src/view/resulttemplate.rb:29:in `init'
@40000000588f32e4027b3b24 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/component.rb:139:in `initialize'
@40000000588f32e4027b4eac /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/state.rb:245:in `new'
@40000000588f32e4027b6234 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/state.rb:245:in `view'
@40000000588f32e4027b661c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/state.rb:181:in `to_html'
@40000000588f32e4027b855c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:442:in `to_html'
@40000000588f32e4027ba884 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:167:in `block in drb_process'
@40000000588f32e4027bac6c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:165:in `synchronize'
@40000000588f32e4027bd764 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:165:in `drb_process'
@40000000588f32e4027bdb4c /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1624:in `perform_without_block'
@40000000588f32e4027beed4 /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1584:in `perform'
@40000000588f32e4027c025c /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1668:in `block (2 levels) in main_loop'
@40000000588f32e4027c025c /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `loop'
@40000000588f32e4027c390c /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `block in main_loop'
@40000000588f32e4027c3cf4 ODDB::View::Drugs::ResultComposite::COMPONENTS[[0, 2]] in create(ODDB::View::Drugs::ResultList)
@40000000588f32e4027c3cf4 ODDB::View::Drugs::Result::COMPONENTS[[0, 2]] in create(content)
@40000000588f32e402ffd474 error in SBSM::Session#http_headers: /fr/just-medical
@40000000588f32e403139324 NoMethodError

The code in resultlist looks like this

      half = full_colspan / 2
<..>
      @grid.set_colspan(x, y, half)

Does Ruby in some cases convert integer to Rational? Found other error:

@40000000588f34e10e45b984 error in SBSM::Session#process: /de/generika/sequences/range/v
@40000000588f34e10e5d3924 NoMethodError
@40000000588f34e10e5d96e4 undefined method `next' for (89/25):Rational
@40000000588f34e10e5e65ec /var/www/oddb.org/src/state/page_facade.rb:49:in `init'
@40000000588f34e10e5ebbdc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:362:in `process'
@40000000588f34e10e5f0de4 /var/www/oddb.org/src/util/session.rb:125:in `process'
@40000000588f34e10e5f63d4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:166:in `block in drb_process'
@40000000588f34e10e5fb5dc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:165:in `synchronize'
@40000000588f34f20f4fd29c error in SBSM::Session#process: /de/generika/sequences/range/e
@40000000588f34f20f659104 NoMethodError

When visiting ch.oddb.org/de/generika/sequences/range/v I got

ArgumentError
wrong number of arguments (given 1, expected 3..4)

And in /service/ch.oddb/log/main/current

@40000000588f383b32c35e74 error in SBSM::Session#process: /de/generika/sequences/range/v
@40000000588f383b32dab704 NoMethodError
@40000000588f383b32daf19c undefined method `next' for (89/25):Rational
@40000000588f383b32db8ddc /var/www/oddb.org/src/state/page_facade.rb:49:in `init'
@40000000588f383b32dbc874 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:362:in `process'
@40000000588f383b32dbc874 /var/www/oddb.org/src/util/session.rb:125:in `process'
@40000000588f383b32dbdbfc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:166:in `block in drb_process'
@40000000588f383b32dbef84 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:165:in `synchronize'
@40000000588f383b332a78fc error in SBSM::Session#to_html: /de/generika/sequences/range/v
@40000000588f383b332ab394 ArgumentError
@40000000588f383b332ab394 ArgumentError
@40000000588f383b332ac71c wrong number of arguments (given 1, expected 3..4)
@40000000588f383b332af5fc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:180:in `add'
@40000000588f383b332b0d6c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:116:in `fill_row'
@40000000588f383b332b0d6c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:61:in `compose_empty_list'
@40000000588f383b332b4bec /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:52:in `compose'
@40000000588f383b332b6f14 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:72:in `init'
@40000000588f383b332b8e54 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:129:in `init'
@40000000588f383b332ba1dc /var/www/oddb.org/src/view/drugs/sequences.rb:64:in `init'
@40000000588f383b332bc11c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/component.rb:139:in `initialize'
@40000000588f383b332be05c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:76:in `new'
@40000000588f383b332c22c4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:76:in `create'
@40000000588f383b332c364c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:284:in `compose_component'
@40000000588f383b332cede4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:213:in `block in compose'
@40000000588f383b332cede4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `each'
@40000000588f383b332cf1cc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `compose'
@40000000588f383b332cf1cc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:72:in `init'
@40000000588f383b332cfd84 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/component.rb:139:in `initialize'
@40000000588f383b332d016c /var/www/oddb.org/src/view/publictemplate.rb:62:in `new'
@40000000588f383b332d016c /var/www/oddb.org/src/view/publictemplate.rb:62:in `content'
@40000000588f383b332d0554 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:83:in `create'
@40000000588f383b332d0d24 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:284:in `compose_component'
@40000000588f383b332d20ac /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:213:in `block in compose'
@40000000588f383b332d2494 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `each'
@40000000588f383b332d2494 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:209:in `compose'
@40000000588f383b332d287c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/composite.rb:72:in `init'
@40000000588f383b332d3fec /var/www/oddb.org/src/view/publictemplate.rb:59:in `init'
@40000000588f383b332d43d4 /var/www/oddb.org/src/view/resulttemplate.rb:29:in `init'
@40000000588f383b332d5374 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/component.rb:139:in `initialize'
@40000000588f383b332d575c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/state.rb:245:in `new'
@40000000588f383b332d6ae4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/state.rb:245:in `view'
@40000000588f383b332d7e6c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/state.rb:181:in `to_html'
@40000000588f383b332d91f4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:442:in `to_html'
@40000000588f383b332d95dc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:167:in `block in drb_process'
@40000000588f383b332dc4bc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:165:in `synchronize'
@40000000588f383b332dc8a4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/sbsm-1.3.0/lib/sbsm/session.rb:165:in `drb_process'
@40000000588f383b332ddc2c /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1624:in `perform_without_block'
@40000000588f383b332defb4 /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1584:in `perform'
@40000000588f383b332defb4 /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1668:in `block (2 levels) in main_loop'
@40000000588f383b332e033c /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `loop'
@40000000588f383b332e16c4 /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `block in main_loop'
@40000000588f383b332e2a4c ODDB::View::Drugs::SequencesComposite::COMPONENTS[[0, 1]] in create(ODDB::View::Drugs::SequenceList)
@40000000588f383b332e2a4c ODDB::View::Drugs::Sequences::COMPONENTS[[0, 2]] in create(content)
@40000000588f383b33621744 error in SBSM::Session#http_headers: /de/generika/sequences/range/v
@40000000588f383b33626564 ArgumentError
@40000000588f383b33626564 wrong number of arguments (given 1, expected 3..4)
@40000000588f383b33629444 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:180:in `add'
@40000000588f383b3362abb4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:116:in `fill_row'
@40000000588f383b3362af9c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:61:in `compose_empty_list'
@40000000588f383b3362c324 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/list.rb:52:in `compose'

Compared the Gemfile.lock with Ruby 1.9.3 and found that we upgraded htmlgrid from 1.0.6 to 1.1.3.

Checked in IRB of Ruby 1.9.3 and Ruby 2.4.0 whether 19/2 return 9 or 9.5. In both cases an Integer is returned.

Found the cluprit. In src/state/page_facade.rb I get the following result via pry

[4] pry(#<ODDB::State::Drugs::Sequences>)> msize.class
=> Integer
[5] pry(#<ODDB::State::Drugs::Sequences>)> msize
=> 376
[6] pry(#<ODDB::State::Drugs::Sequences>)> ((msize - ITEM_SLACK) / ITEM_LIMIT)
=> (89/25)

I think somehow we got 'mathn' included, which (as described in http://ruby-doc.org/stdlib-2.0.0/libdoc/mathn/rdoc/Numeric.html) changes the way numeric values are calculated. Therefore I must add a .to_i in a few places. Fixed with commit Fix problems with Rational instead of Integer in page sizes

Now I am getting errors like this

@40000000588f401b22f3b354 /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `block in main_loop'
@40000000588f43640404118c error in SBSM::Session#to_html: /
@40000000588f436404117354 NoMethodError
@40000000588f4364041186dc undefined method `[]' for nil:NilClass
@40000000588f43640415670c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/dojotoolkit.rb:50:in `dynamic_html'
@40000000588f436404159204 /var/www/oddb.org/src/view/htmlgrid/component.rb:14:in `dynamic_html'
@40000000588f43640415b144 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/link.rb:51:in `to_html'
@40000000588f436404160734 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:89:in `block in component_html'
@40000000588f4364041639fc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:87:in `each'
@40000000588f436404165554 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:87:in `component_html'
@40000000588f436404166cc4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:106:in `block in to_html'
@40000000588f4364041670ac /usr/local/ruby-2.4.0/lib/ruby/2.4.0/cgi/html.rb:55:in `nO_element'
@40000000588f4364041693d4 /usr/local/ruby-2.4.0/lib/ruby/2.4.0/cgi/html.rb:62:in `nO_element_def'
@40000000588f43640416b6fc /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:105:in `to_html'
@40000000588f43640416ca84 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:142:in `block in field_html'
@40000000588f43640416ce6c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:140:in `each'
@40000000588f43640416e1f4 /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:140:in `field_html'
@40000000588f43640416f57c /var/www/oddb.org/vendor/bundle/ruby/2.4.0/gems/htmlgrid-1.1.3/lib/htmlgrid/grid.rb:131:in `block in to_html'

Fixed an error when patinfo is nil in state/globalr.rb with commit Fix problem when nil patinfo.

But I cannot explain to myself why we are having a problem in dojotoolkit.rb:50:in `dynamic_html'. Or do have here separated threads accessing the same variable?

At least it is possible again to visit http://ch.oddb.org/fr/gcc/fachinfo/reg/58158/currency/USD without a problem.

Also visiting the FI or PI of a non existing registration is okay http://ch.oddb.org/fr/gcc/fachinfo/reg/99999

Ajax-Mouseover for category

When visiting http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Inderal/search_type/st_oddb#best_result moving the mouse reacts like this:

  • When a drug has 10% in the column "SB" it displays "Für dieses Produkt bezahlen Sie 10ç Selbstbehalt. Achten Sie auf Ihre Krankenkassen-Abrechnung!'@@
  • When a drug has "B / SL / SO" in the column "Kat." nothing happens.

Why?

When comparing the the definition I see that both define a dijit.Tooltip element. Names are of course different and and the category has and additional definition of href="http://ch.oddb.org/de/gcc/ajax_swissmedic_cat/reg/31706/seq/01/pack/017".

What looks a little bit funny is the definition of the names: data-dojo-props="connectId:'ikscat_1'", where I would rather exepect a data-dojo-props="connectId:ikscat_1". But for the selbsthalt the definition data-dojo-props="connectId:'deductible_1'" works.

Okay. After reverting to htmlgrid 1.0.6 this problem went away. And looking at the generated HTML I see connectid="ikscat_1".

view · edit · sidebar · attach · print · history
Page last modified on January 30, 2017, at 05:36 PM