class Admin::Legacy::Student::Students::MedicalsController < Admin::Legacy::Student::Controller
  def show
    render_success :ok, json: medical_props
  end

  private
    def student
      @student ||= current_school.students.find_by(id: params[:student_id])
    end

    def student_medical
      @student_medical ||= student.find_or_build_student_medical
    end

    def medical_props
      { alerts: student_medical.alerts }
    end
end
