Class: ODDB::State::Admin::OrphanedPatinfo

Inherits:
Global show all
Defined in:
src/state/admin/root.rb,
src/state/admin/orphaned_patinfo.rb

Constant Summary

VIEW =
View::Admin::OrphanedPatinfo

Constants inherited from Global

HOME_STATE, ZONE

Constants inherited from Global

DIRECT_EVENT, GLOBAL_MAP, HOME_STATE, LIMITED, PRINT_STATES, READONLY_STATES, RESOLVE_STATES, REVERSE_MAP, VIEW, ZONE_NAVIGATION

Constants included from UmlautSort

FILTER_PAIRS

Instance Method Summary (collapse)

Methods inherited from Global

#zone_navigation

Methods inherited from Global

#_search_drugs, #_search_drugs_state, #_trigger, #add_to_interaction_basket, #allowed?, #atc_chooser, #checkout, #clear_interaction_basket, #creditable?, #direct_request_path, #doctorlist, #download, #export_csv, #extend, #fachinfo, #feedbacks, #help_navigation, #home_navigation, #home_state, #hospitallist, #interaction_basket, #limit_state, #limited?, #logout, #navigation, #notify, #password_reset, #paypal_return, #powerlink, #print, #proceed_download, #proceed_poweruser, #resolve, #resolve_state, #rss, #search, #show, #snapback_event, #sort, #sponsorlink, #suggest_address, #switch, #unique_email, #user_input, #user_navigation, #ywesee_contact, #zone_navigation, #zones

Methods included from LoginMethods

#autologin, #login

Methods included from UmlautSort

#sort_model, #umlaut_filter

Instance Method Details

- (Object) choice



17
18
19
20
21
22
23
24
25
26
27
28
# File 'src/state/admin/orphaned_patinfo.rb', line 17

def choice
  keys = [:meaning_index, :state_id]
  values = user_input(keys, keys)
  if(error?)
    self
  else
    meidx = values[:meaning_index].to_i
    languages = @model.meanings.at(meidx)
    lang = PointerHash.new(languages, @model.pointer)
    State::Admin::OrphanedPatinfoAssign.new(@session, lang)
  end
end

- (Object) delete_orphaned_patinfo



29
30
31
32
# File 'src/state/admin/orphaned_patinfo.rb', line 29

def delete_orphaned_patinfo
  @session.app.delete(@model.pointer)
  orphaned_patinfos
end

- (Object) init



13
14
15
16
# File 'src/state/admin/orphaned_patinfo.rb', line 13

def init
  super
  @model.meanings.compact!
end

- (Object) preview



33
34
35
36
37
38
39
40
41
42
43
44
# File 'src/state/admin/orphaned_patinfo.rb', line 33

def preview 
  keys = [:index, :language_select]
  values = user_input(keys, keys)
  if(error?)
    self
  else
    idx = values[:index].to_i
    lang = values[:language_select]
    languages = @model.meanings.at(idx)
    State::Admin::PatinfoPreview.new(@session, languages[lang])
  end
end