view · edit · sidebar · attach · print · history

20120731-create-drug-search-bar-in-rezept-form

<< | Index | >>


Summary

  • Started to create Instant search for Prescription-Form
  • Debugged Corrupted-Data problem.

Index


Create instant search form

src/util/session.rb

   def set_persistent_user_input(key, val)
      @persistent_user_input.store(key, val)
    end

Refs

Normal Instant-Search Response

[
  {"search_query":"indamid sr, 28 tablette(n)"},
  {"search_query":"indamid sr, 30 tablette(n)"},
  {"search_query":"indamid sr, 90 tablette(n)"},
  {"search_query":"indamid sr, 91 tablette(n)"},
  {"search_query":"indapamid-mepha 1.5 retard, 30 tablette(n)"},
  {"search_query":"indapamid-mepha 1.5 retard, 90 tablette(n)"},
  ...

Attach:


Corrupted Data

Application starts but Software-Update Screen shows

current
@400000005017dd84028fc8dc ODBA::Stub was unable to replace NilClass#25763697 from Hash:#21
@400000005017dd84028fc8dc ODBA::Stub was unable to replace NilClass#25763697 from Hash:#21
@400000005017dd84028fc8dc ODBA::Stub was unable to replace NilClass#25763697 from Hash:#21
...

I found 2 corrupted record in Fachinfo Hash.
Maybe these Nil Objects comes from Random-Updater.

tried delete via bin/admin.
But I could not delete, directly.

ch.oddb> ODBA.cache.fetch('21').index(ODBA.cache.fetch('21').values.select{|obj| obj.class != Fachinfo }.first)
-> 25763697
ch.oddb> ODBA.cache.fetch('21').length
-> 4830
ch.oddb> ODBA.cache.fetch('21').delete(25763687)

ch.oddb> ODBA.cache.fetch('21').length
-> 4830

We must use variable to delete/update Data from ODBA.cache.

ch.oddb> a = ODBA.cache.fetch('21'); a.delete(25763697); a.odba_store; a.length
-> 4829
ch.oddb> ODBA.cache.fetch('21').index(nil)
-> 28353010
ch.oddb> a = ODBA.cache.fetch('21'); a.delete(28353010); a.odba_store; a.length
-> 4828
view · edit · sidebar · attach · print · history
Page last modified on August 01, 2012, at 02:35 AM