diff --git a/Government of NCT of Delhi/app.py b/Government of NCT of Delhi/app.py index d1ae97c..8ff6de1 100644 --- a/Government of NCT of Delhi/app.py +++ b/Government of NCT of Delhi/app.py @@ -870,6 +870,7 @@ def status(): available_ventilators = total_ventilators - occupied_ventilators return render_template('bed_status.html', + hospitals = hospital_names, no_hospital=no_of_hospital, doctor=total_doctor, patient=active_patient, @@ -881,37 +882,37 @@ def status(): available_ventilators=available_ventilators) -@app.route('/select_hs', methods=['GET', 'POST']) -@login_required('user') -def select(): - if request.method == 'POST': - hospital_name = request.form['hname'] - print(hospital_name) - if not hospital_name: - return "Hospital name is missing", 400 # Bad Request - - data = hospital_data_collection.find_one( - {'hospital_name': hospital_name}) - - print(data) - if data: - total_general_beds = data.get('number_of_general_beds', 0) - occupied_general_beds = data.get('occupied_general', 0) - total_icu_beds = data.get('number_of_icu_beds', 0) - occupied_icu_beds = data.get('occupied_icu', 0) - total_ventilators = data.get('number_of_ventilators', 0) - occupied_ventilators = data.get('occupied_ventilator', 0) - - # Calculate available beds - available_beds = total_general_beds - occupied_general_beds - available_icu_beds = total_icu_beds - occupied_icu_beds - available_ventilator = total_ventilators - occupied_ventilators - return render_template('bed_status.html', available_beds=available_beds, available_icu_beds=available_icu_beds, available_ventilators=available_ventilator, total_general_beds=total_general_beds, total_icu_beds=total_icu_beds, total_ventilators=total_ventilators) - else: - return "No hospital found" - hospitals = hospital_data_collection.find() - hospital_names = [hospital['hospital_name'] for hospital in hospitals] - return render_template('select_hs_for_beds.html', hospitals=hospital_names) +# @app.route('/select_hs', methods=['GET', 'POST']) +# @login_required('user') +# def select(): +# if request.method == 'POST': +# hospital_name = request.form['hname'] +# print(hospital_name) +# if not hospital_name: +# return "Hospital name is missing", 400 # Bad Request + +# data = hospital_data_collection.find_one( +# {'hospital_name': hospital_name}) + +# print(data) +# if data: +# total_general_beds = data.get('number_of_general_beds', 0) +# occupied_general_beds = data.get('occupied_general', 0) +# total_icu_beds = data.get('number_of_icu_beds', 0) +# occupied_icu_beds = data.get('occupied_icu', 0) +# total_ventilators = data.get('number_of_ventilators', 0) +# occupied_ventilators = data.get('occupied_ventilator', 0) + +# # Calculate available beds +# available_beds = total_general_beds - occupied_general_beds +# available_icu_beds = total_icu_beds - occupied_icu_beds +# available_ventilator = total_ventilators - occupied_ventilators +# return render_template('bed_status.html', available_beds=available_beds, available_icu_beds=available_icu_beds, available_ventilators=available_ventilator, total_general_beds=total_general_beds, total_icu_beds=total_icu_beds, total_ventilators=total_ventilators) +# else: +# return "No hospital found" +# hospitals = hospital_data_collection.find() +# hospital_names = [hospital['hospital_name'] for hospital in hospitals] +# return render_template('select_hs_for_beds.html', hospitals=hospital_names) @app.route("/superadmin_login", methods=['GET', 'POST']) diff --git a/Government of NCT of Delhi/static/images/appintment (2).jpg b/Government of NCT of Delhi/static/images/appintment (2).jpg new file mode 100644 index 0000000..d989e9a Binary files /dev/null and b/Government of NCT of Delhi/static/images/appintment (2).jpg differ diff --git a/Government of NCT of Delhi/templates/appointment.html b/Government of NCT of Delhi/templates/appointment.html index af31027..ab8265c 100644 --- a/Government of NCT of Delhi/templates/appointment.html +++ b/Government of NCT of Delhi/templates/appointment.html @@ -10,7 +10,7 @@ @@ -130,7 +136,7 @@

Government of NCT of Delhi

Appointment @@ -169,8 +175,8 @@

>

My Appointments

View your upcoming and past appointments.

- - +
+ @@ -191,7 +197,7 @@

My Appointments

- + {% endfor %}
Name Email Number {{ contact.time_slot }} {{ contact.speciality }} {{ contact.disease_description }}{{ contact.queue_number}}{{ contact.queue_number}}