Class: ODDB::State::Admin::Registration

Inherits:
Global show all
Includes:
RegistrationMethods
Defined in:
src/state/admin/root.rb,
src/state/admin/admin.rb,
src/state/admin/companyuser.rb,
src/state/admin/registration.rb,
src/state/admin/selectindication.rb

Direct Known Subclasses

CompanyRegistration, SuggestReg

Constant Summary

VIEW =
View::Admin::RootRegistration
SELECT_STATE =
State::Admin::SelectIndication

Constants included from FachinfoMethods

FI_FILE_DIR

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 included from RegistrationMethods

#do_update, #new_patent, #new_sequence, #resolve_company

Methods included from FachinfoMethods

#assign_fachinfo

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) update



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'src/state/admin/registration.rb', line 167

def update
  keys = [
    :inactive_date, :generic_type, :registration_date,
    :revision_date, :market_date, :expiration_date,
    :complementary_type, :export_flag, :renewal_flag,
    :parallel_import, :index_therapeuticus, :ignore_patent,
    :ith_swissmedic, :activate_fachinfo, :deactivate_fachinfo, :manual_inactive_date
  ]
  if(@model.is_a? Persistence::CreateItem)
    iksnr = @session.user_input(:iksnr)
    if(error_check_and_store(:iksnr, iksnr, [:iksnr]))
      return self
    elsif(@session.app.registration(iksnr))
      error = create_error('e_duplicate_iksnr', :iksnr, iksnr)
      @errors.store(:iksnr, error)
      return self
    else
      @model.append(iksnr)
    end
  end
  do_update(keys)
end