Esempio n. 1
0
def ajax_consultar_paciente(request, paciente_id):
    try:
        paciente_dic = paciente_logic.consultar_paciente(int(paciente_id))
    except paciente_logic.PacienteException as p_exc:
        return HttpResponse("Houve algum erro ao consultar pelo paciente (%s)" % p_exc)

    return render_to_response("ajax-consultar-paciente.html", paciente_dic)
Esempio n. 2
0
def ajax_consultar_paciente(request, paciente_id):
    try:
        paciente = paciente_logic.consultar_paciente(int(paciente_id))
    except:
        return HttpResponse ("Houve algum erro ao consultar pelo paciente")

    return render_to_response ('ajax-consultar-paciente.html', {'paciente':paciente})