1. Amey Choudhary, 2021113017
2. Arjun Dosajh, 2021113016
3. Mihika Sanghi, 2021113014
Our project mimics the database of a hospital where we keep a record of each patient, doctor, room, department, etc. of the hospital to ensure its smooth running. It has been made as part of project in DNA 2022.
A video (Video) showcasing the functionalities of the application and its usage on dummy data has also been added into the repository. You can view the video at the link given in the file or you may download the video (44.mp4) to view the application.
A pdf(phase3.pdf) contains ER model of the database.
It has been implemented using Python and MySQL. We are using the Python library, "pymysql", to execute SQL queries. The database follows and uses various principles of databases like ER relationships and Normalizations.
To insert the details of a patient who is being admitted to the hospital.
To delete the details of a doctor who is leaving the hospital.
To modify the room's department allottment.
To know the names of Patients suffering from a Particular Disease.
To know which Doctors work in a particular department.
To know names of patients older than a certain age.
To know the room number of rooms having atleast the desired capacity.
This gives the user the average work experience of doctors belonging to a particular department.
This allows the user to search for which Patient is in which Room either by Room Number or By Using PatientID.
This displays all the rooms which are not occupied by patients.
This allows the user to know the success rate of a particular operation from statistics of past records.
This gives the user an analysis of the most frequent disease in age groups.
This logs the user out of the database.
You must have MySQL and python3 in your local system for this to work.
-
Clone the repository into a folder and open that folder into in Terminal.
-
Login in to your MySQL using
sudo mysql -u <yourusername>
and then enter your password.
- In MySQL, create a database, "Proj_4".
CREATE DATABASE Proj_4;
- (Optional) It is advised to create a new user and grant them all privileges on Proj_4. This step is optional.
CREATE USER '<newusername>'@'<hostname>' IDENTIFIED BY '<password>';
Grant the new user all privileges on Proj_4.
GRANT ALL PRIVILEGES ON *Proj_4* TO '<newusername>'@'<hostname>' WITH GRANT OPTION;
If facing problem while making a new user, follow this tutorial: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
- Exit MySQL and enter the following in your terminal (Note that terminal must be open in the Project folder)
mysql -u <yourusername> -p Proj_4 < SQLdump.sql
and then enter your password. This command creates tables and dumps dummy data in your database. Your username and password can be either your native root user or the new user created in Step 4.
- Now start the application by
python3 Functionality.py
and now enter your credentials (either your native user or new user created).
- You may select options to see various functionalities.