app/controllers/patients_controller.rb
# Manage a single patient using +id+ as parameter
#
Manage a single patient using +id+ as parameter
Manage a single patient using + id + as parameter
def manage
    @patient_id = params[:id]
    patient = Patient.find_by_id( @patient_id )
    redirect_to( patients_path() ) and return unless patient
    @patient_name = patient.get_full_name
    ap = AppParameter.get_parameter_row_for( :patients_manage )
    @max_view_height = ap.get_view_height()
    start_date = DateTime.now.strftime( ap.get_filtering_resolution )
    @filtering_date_start  = ( Date.parse( start_date ) - ap.get_filtering_radius ).strftime( AGEX_FILTER_DATE_FORMAT_SQL )
    @filtering_date_end    = ( Date.parse( start_date ) + ap.get_filtering_radius ).strftime( AGEX_FILTER_DATE_FORMAT_SQL )
    @context_title = "#{I18n.t(:manage_patient, {:scope=>[:patient]})} '#{@patient_name}'"
  end
def manage @patient_id = params [ :id ] patient = Patient . find_by_id ( @patient_id ) redirect_to ( patients_path ( ) ) and return unless patient @patient_name = patient . get_full_name ap = AppParameter . get_parameter_row_for ( :patients_manage ) @max_view_height = ap . get_view_height ( ) start_date = DateTime . now . strftime ( ap . get_filtering_resolution ) @filtering_date_start = ( Date . parse ( start_date ) - ap . get_filtering_radius ) . strftime ( AGEX_FILTER_DATE_FORMAT_SQL ) @filtering_date_end = ( Date . parse ( start_date ) + ap . get_filtering_radius ) . strftime ( AGEX_FILTER_DATE_FORMAT_SQL ) @context_title = "#{I18n.t(:manage_patient, {:scope=>[:patient]})} '#{@patient_name}'" end
Manage a single patient using +id+ as parameter
Manage a single patient using + id + as parameter
#    logger.debug( "* Manage Patient ID: #{params[:id]}" ) # Compute the filtering parameters: # Having the parameters, apply the resolution and the radius backwards: # Set the (default) parameters for the scope configuration: (actual used value will be stored inside component_session[])