Exemplo n.º 1
0
def manage_schedule():
    d_id = request.form.get('d_id')
    schedules = db.get_doc_schedules(d_id)
    clinics = db.get_doc_clinics(d_id)
    return render_template('manageschedule.html',
                           schedules=schedules,
                           d_id=d_id,
                           clinic_list=clinics)
Exemplo n.º 2
0
def add_schedule():
    d_id, c_id, day = request.form.get('d_id_c_id_day').split(',')
    start = request.form.get('start_time')
    end = request.form.get('end_time')
    db.add_schedule(d_id, c_id, day, start, end)
    schedules = db.get_doc_schedules(d_id)
    clinics = db.get_doc_clinics(d_id)
    return render_template('manageschedule.html',
                           schedules=schedules,
                           d_id=d_id,
                           clinic_list=clinics)
Exemplo n.º 3
0
def add_schedule_select_clinic():
    c_id = request.form.get('clinic')
    d_id = request.form.get('d_id')
    c_name = db.get_c_name(c_id)
    schedules = db.get_doc_schedules(d_id)
    clinic_timings = db.get_clinic_timings(c_id)
    return render_template('manageschedule.html',
                           schedules=schedules,
                           d_id=d_id,
                           clinic=c_id,
                           clinic_list=[(c_id, c_name)],
                           clinic_timings=clinic_timings)
Exemplo n.º 4
0
def add_schedule_select_day_slot():
    d_id, c_id = request.form.get('d_id_c_id').split(',')
    c_name = db.get_c_name(c_id)
    day, start, end = request.form.get('day_time').split(',')
    schedules = db.get_doc_schedules(d_id)
    return render_template('manageschedule.html',
                           schedules=schedules,
                           d_id=d_id,
                           clinic=c_id,
                           clinic_list=[(c_id, c_name)],
                           clinic_timings=[(day, start, end)],
                           day=day,
                           start=start,
                           end=end)
Exemplo n.º 5
0
def select_doctor():
    d_id, d_name = request.form.get('doctor').split(',')
    p_id, specialization, c_id = request.form.get(
        'specialization_clinic').split(',')
    c_name = db.get_c_name(c_id)
    schedules = db.get_doc_schedules(d_id, c_id)
    timings = generate_timings(schedules)
    return render_template("bookappointment.html",
                           p_id=p_id,
                           specializations=[specialization],
                           specialization=specialization,
                           clinics=[(c_id, c_name)],
                           clinic=c_id,
                           doctors=[(d_id, d_name)],
                           doctor=d_id,
                           timings=timings)