Beispiel #1
0
def pagos_list(request):
    ''' Todos los pagos realizados. '''
    pagos = Pago.objects.order_by('-fecha')
    query = 'q'

    MODEL_MAP = {
        Paciente:
        ['nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente'],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(
        request, 'pago-list.html', {
            'pagos': pagos,
            'objects': object_list,
            'page_obj': page_obj,
            'paginator': paginator,
            'is_paginated': is_paginated,
            'search_string': request.GET.get(query, ''),
            'r_active': 'active'
        })
Beispiel #2
0
def paciente_search(request):
    '''
    Aqui empieza el flujo de clinica. Busqueda de paciente por nombre o DNI.
    '''
    query = 'q'
    MODEL_MAP = {
        Paciente:
        ['nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente'],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(
        request, 'paciente-search.html', {
            'objects': object_list,
            'page_obj': page_obj,
            'paginator': paginator,
            'is_paginated': is_paginated,
            'search_string': request.GET.get(query, '')
        })
Beispiel #3
0
def paciente_search(request):
    '''
    Lista de pacientes con pagos pendientes.
    '''
    query = 'q'

    MODEL_MAP = {
        Paciente:
        ['nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente'],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(
        request, 'pago-paciente-search.html', {
            'objects': object_list,
            'page_obj': page_obj,
            'paginator': paginator,
            'is_paginated': is_paginated,
            'search_string': request.GET.get(query, ''),
            'rp_active': 'active'
        })
Beispiel #4
0
def paciente_search(request):
    '''
    Aqui empieza el flujo de clinica. Busqueda de paciente por nombre o DNI.
    '''
    query = 'q'
    MODEL_MAP = {
        Paciente: [
            'nombre',
            'apellidoPaterno',
            'apellidoMaterno',
            'credencialPaciente'
        ],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(request, 'paciente-search.html', {
        'objects': object_list,
        'page_obj': page_obj,
        'paginator': paginator,
        'is_paginated': is_paginated,
        'search_string': request.GET.get(query, '')
        })
Beispiel #5
0
def pagos_list(request):
    ''' Todos los pagos realizados. '''
    pagos = Pago.objects.order_by('-fecha')
    query = 'q'

    MODEL_MAP = {
        Paciente: [
            'nombre',
            'apellidoPaterno',
            'apellidoMaterno',
            'credencialPaciente'
        ],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(request, 'pago-list.html', {
        'pagos': pagos,
        'objects': object_list,
        'page_obj': page_obj,
        'paginator': paginator,
        'is_paginated': is_paginated,
        'search_string': request.GET.get(query, ''),
        'r_active': 'active'
        })
Beispiel #6
0
def paciente_search(request):
    '''
    Lista de pacientes con pagos pendientes.
    '''
    query = 'q'

    MODEL_MAP = {
        Paciente: [
            'nombre',
            'apellidoPaterno',
            'apellidoMaterno',
            'credencialPaciente'
        ],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(request, 'pago-paciente-search.html', {
        'objects': object_list,
        'page_obj': page_obj,
        'paginator': paginator,
        'is_paginated': is_paginated,
        'search_string': request.GET.get(query, ''),
        'rp_active': 'active'
        })
Beispiel #7
0
def busqueda(request):
    query = 'q'
    MODEL_MAP = {
        Producto: ['nombre', 'porciones'],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(request, 'producto-search.html', {
        'objects': object_list,
        'page_obj': page_obj,
        'paginator': paginator,
        'is_paginated': is_paginated,
        'search_string': request.GET.get(query, ''),
        's_active': 'active'
        })
Beispiel #8
0
def busqueda(request):
    query = 'q'
    MODEL_MAP = {
        Producto: ['nombre', 'porciones'],
    }

    objects = []

    for model, fields in MODEL_MAP.iteritems():
        objects += generic_search(request, model, fields, query)

    paginator, page_obj, object_list, is_paginated = paginate_objects(
        request, objects, 20)

    return render(
        request, 'producto-search.html', {
            'objects': object_list,
            'page_obj': page_obj,
            'paginator': paginator,
            'is_paginated': is_paginated,
            'search_string': request.GET.get(query, ''),
            's_active': 'active'
        })