CSC Project
CSC Project
CSC Project
SCHOOL,
PADUR
(Af f liated to the Central Board of Secondary Education, New
Delhi
GRADE - XII
COMPUTER SCIENCE PROJECT REPORT
SUBMITTED BY:
SIKHANDER REDDY
DEPARTMENT OF COMPUTER SCIENCE
CERTIFICATE
This is to certify that the project report entitled “HOSPITAL MANAGEMENT”
Signature of Principal
DEPARTMENT OF COMPUTER SCIENCE
ACKNOWLEDGEMENT
Our sincere regards go to our respected Principal, Ms. Susan George for
extending every possible support for the completion of this project.
We also extend our obligation to our Parents for their motivation and
support. We must thank our classmates for their timely help and support in
the completion of this project.
Last but not the least; we would like to thank all those who helped us
directly or indirectly towards the successful completion of this
project.
MEMBERS OF THE PROJECT
1. SIKHANDER REDDY
2. LOGESH KUMAR
Grade XII
CONTENTS
1. BONAFIDE CERTIFICATE
2. ACKNOWLEDGEMENT
3. INTRODUCTION
5. PROPOSED APPLICATION
6. APPLICATION ALGORITHM
7. FLOW CHART
9. APPLICATION CODE
10. OUTPUT
12. BIBLIOGRAPHY
INTRODUCTION
The code provided establishes the foundational structure for such a system. It is
written in Python and uses MySQL as the database management system.
The program allows medical staff to add new patients and doctors to the
system. When adding a new patient, the program prompts the user to give the
patient's name, age, gender, contact number, address, and patient ID. This
information is then stored in the MySQL database using SQL INSERT
statements.
Similarly, when adding a new doctor, the program prompts the user for the
doctor's name, specialization, contact number, and doctor ID. This information
is also stored in the MySQL database using SQL INSERT statements.
The program also allows for scheduling appointments between patients and
doctors. When scheduling an appointment, the program prompts the user for the
patient ID, Doctor ID, and appointment date. This information is stored in the
MySQL database using another SQL INSERT statement.
Step-3.1: Prompt the user to input the doctor details such as name,
specialization, contact_number, and doctor ID
Step-3.2: Connect to the 'hospzone' database using the 'connect()' method
and create a cursor using the 'cursor()' method
Step-3.3: Use an INSERT statement to add the doctor's details to the
'doctors' table in the 'hospzone' database
Step-3.4: Commit the changes to the database using the 'commit()'
method
Step-3.5: Close the cursor and database connection using the 'close()'
method
Step 4: Define a function to schedule an appointment
Step-1: define a while loop with a boolean variable to run the program
continuously
Step-2: display the menu options to the user
Step-3: prompt the user to input their choice
Step-4: validate the user's choice using if-elif
statements Step-5: if the user enters 1, call the
'add_patient()' function Step-6: if the user enters 2, call
the 'add_doctor()' function
Step-7: if the user enters 3, call the 'schedule_appointment()' function
Step-8: if the user enters 4, break out of the while loop
Step-9: display an error message and show the menu again if the user enters
an invalid choice.
FLOW CHART
DATABASE: TABLE STRUCTURE AND DATA
Database Tables
For the project, a database named “hospzone” was created in MySQL and
used. The following tables were created to be used by the application to
maintain the application.
List of Tables:
Description of Tables:
Table Name: Patients
import mysql.connector
# Functions
def new_registration_pati():
# Get patient data from the user
name = input("Enter patient name:
") address = input("Enter patient
address: ")
phone_number = input("Enter patient phone number: ")
insurance_number = input("Enter patient insurance number: ")
print("Patient registered
successfully!") def
view_doctors_records():
# Get doctor ID from the user
doctor_id = input("Enter doctors ID: ")
def view_patients_records():
# Get patient ID from the user
patient_id = input("Enter patient ID: ")
# Select the patient records from the database
cursor.execute("SELECT * FROM patients WHERE patient_id = %s",
(patient_id,)) patients_records = cursor.fetchall()
def schedule_appointment():
# Get patient ID and doctor ID from
the user patient_id = input("Enter
patient ID: ") doctor_id =
input("Enter doctor ID: ")
if choice == 1:
new_registration_pati()
elif choice == 2:
new_registration_doc()
elif choice == 3:
view_doctors_records()
elif choice == 4:
view_patients_records()
elif choice == 5:
schedule_appointment()
elif choice == 6:
break
else:
print("Invalid choice. Please choose again.")
except Exception as e:
print("An error
occurred:", e) if name == "
main ": main()
OUTPUT
For the Hospital Management System you've provided, you would need both
hardware and software requirements. Here's a basic outline of what you might
need:
Software Requirements:
Operating System: Any operating system that supports Python and MySQL.
Common choices include Windows, Linux, or macOS.
Hardware Requirements:
Storage: Adequate storage space for the MySQL database. The amount of space
required depends on the size of your patient, doctor, and appointment records.