view · edit · sidebar · attach · print · history

20120802-update-rezept-instant-search-csv-export

<< | Index | >>


Summary

  • Improved Instant-Search for Prescription.
  • Created CSV-Export for Prescription.

Commits

Index


Update rezept instant search

Updated API Response

ajax_matches (with oddb_package_name_with_size_and_ean index)
[
  {"search_query":"7680463450531","drug":"panadol 1000 mg, 10 suppositorien"}, 
  {"search_query":"7680463450456","drug":"panadol 500 mg, 10 suppositorien"},
  {"search_query":"7680581200018","drug":"panadol antigrippine, 10 sachet(s)"},
  ...

create ajax delete action

Created ajax event as ajax_delete_drug.

in src/state/drugs/prescription.rb

  def ajax_delete_drug
    check_model
    if ean13 = @session.persistent_user_input(:ean13)
      drugs = @session.persistent_user_input(:drugs) || {}
      drugs.delete(ean13)
      @session.set_persistent_user_input(:drugs, drugs)
    end 
    AjaxDrugs.new(@session, @model)
  end

NOTE

ean13 contains ::iksnr: and ::ikscd:

 @@ean13_form = /^(7680)(\d{5})(\d{3})(\d)$/u
commit

Improved session handling in Rezept

Improved init of session.

in src/state/drugs/prescription.rb

 def init
    if @session.event.to_sym == self.class::DIRECT_EVENT and 
       drugs = @session.persistent_user_input(:drugs) # init
      @session.set_persistent_user_input(:drugs, {}) 
    end 
    super
  end
commit

Update prescription form text

updated note text.

commit

Create prescription CSV export

Attach:Rezept_Yasuhiro_Asaka_08.1982.csv.txt

commit
view · edit · sidebar · attach · print · history
Page last modified on August 02, 2012, at 11:22 AM