view · edit · sidebar · attach · print · history

20120315-improve-interaction-basket-view

<< | Index | >>


summary

  • updated shoe project for access_test
    • added access test scripts
    • improved view
  • amended highlight fachinfo link in interaction basket.
  • updated patinfo.yaml sample file and description text.
  • added fi link(explanation text) in swissmedinfo lookandfeel.

commit

oddb.org:

shoe:

index


updated shoe

added access test

updated view layout


fixed fi link error in interaction basket

Problem

http://oddb.yasuhiro.org/de/gcc/interaction_basket/substance_ids/541%2C4406

error in SBSM::Session#to_html: /de/gcc/interaction_basket/substance_ids/541%2C4406
NoMethodError
undefined method `fachinfo_active?' for #<ODDB::FachinfoDocument2001:0xd125914>
/var/www/oddb.org/src/util/language.rb:45:in `method_missing'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/view/additional_information.rb:180:in `_fachinfo'
/var/www/oddb.org/src/view/interactions/basket.rb:112:in `block (2 levels) in to_html'
Problem

http://oddb.yasuhiro.org/de/gcc/interaction_basket/substance_ids/541,4406/atc_code/C09DA06,N05AN01

error in SBSM::Session#to_html: /de/gcc/interaction_basket/substance_ids/541,4406/atc_code/C09DA06,N05AN01
NoMethodError
undefined method `fachinfo_active?' for #<ODDB::FachinfoDocument2001:0xf1fbf80>
/var/www/oddb.org/src/util/language.rb:45:in `method_missing'
/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/view/additional_information.rb:181:in `_fachinfo'
/var/www/oddb.org/src/view/interactions/basket.rb:112:in `block (2 levels) in to_html'

in src/view/additional_information.rb

      def _fachinfo(model, css='square infos')
        if(model.fachinfo_active?)
          link = HtmlGrid::Link.new(:square_fachinfo, 
              model, @session, self)
          link.href = @lookandfeel._event_url(:fachinfo, {:reg => model.iksnr})
          link.css_class = css 
          link.set_attribute('title', @lookandfeel.lookup(:fachinfo))
          link
        end 
      end

In this, model are expected as Registration object.
But, This Objects are Fachinfo in Interaction Basket.

z.B.

  • #<ODBA::Stub:119038660#28489838 @odba_class=ODDB::Fachinfo @odba_container=118992240#27738>
  • #<ODBA::Stub:124597580#28598945 @odba_class=ODDB::Fachinfo @odba_container=124598700#28765>

And, These Fachinfos (new Fachinfo2001 object) don't have registration_owner value.

ch.oddb> ODBA.cache.fetch('28598945').registration_owner
-> undefined method `registration_owner' for #<ODDB::FachinfoDocument2001:0xdd15d64>
ch.oddb> ODBA.cache.fetch('28489838').registration_owner
-> undefined method `registration_owner' for #<ODDB::FachinfoDocument2001:0xe462ff4>
ch.oddb> ODBA.cache.fetch('28598945').iksnrs
-> ["54230"]

I got iksnr from FachinfoDocument2001#iksnrs(FachinfoDocument#iksnrs).
Then, Errors has gone, I could see highlited Fachinfo links.

To see this Fachinfo links in Interaction Basket,
Search following drugs(substance is Lithium).

  • atacand'
  • litarex
Result

updated sample Patinfo.yaml, description txt files.
I searched same objects in previouse sample yaml.

updated fachinfo link on swissmedinfo lookandfeel

Result

TODO

  • To check class article_size, and article_dose in article_codes
view · edit · sidebar · attach · print · history
Page last modified on March 16, 2012, at 07:35 AM