0% found this document useful (0 votes)
50 views18 pages

Kavya CS Project

Uploaded by

chkeeruii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views18 pages

Kavya CS Project

Uploaded by

chkeeruii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

NAME: KAVYA MOTA

STD: XII DIV: D


SUBJECT: COMPUTER SCIENCE
TAUGHT BY: Ms. SHAGUFA KHAN
SCHOOL: ST.XAVIER'S HIGH SCHOOL, VAPI

1
2
ST. XAVIER’S HIGH SCHOOL
Charwada, Koparli Road, Vapi
Tel.: +91- 9033041764
E-mail: [email protected]

Certificate
This is to certify that Mst./Ms. _____________________________ of
Class XII – ___ of St. Xavier’s High School, Vapi, has completed
his / her Term 1 project file under my supervision. He / She
has taken proper care & shown utmost sincerity in completion
of his / her project.

I certify that this Term 1 project is up to my expectation &


as per the guidelines issued by C.B.S.E.

Ms. Shagufa khan Mrs. Salma Pathan


[BE, B. ed] [Principal]
[Subject: Computer Science]

3
INDEX

Sr.no Contents Page.no

1. Declaration 3

2. Acknowledgement 4

3. Introduction 5

4. Working Description 6

5. Coding 7-11

6. Output 12-17

7. Bibliography 18

4
DECLARATION

I KAVYA MOTA declare that the Project


report "DENTAL MANAGEMENT SYSTEM" is
based on my own work carried out during
the course of our study under the guidance
of Ms.SHAGUFA KHAN . I assert the
statements made and conclusions drawn
are an outcome of my research work. I
further certify that all the coding are the
result of my personal efforts.

5
ACKNOWLEDGEMENT

I would like to express my special thanks of


gratitude to my teacher Ms SHAGUFA KHAN as well
as our principal Ms SALMA PATHAN who gave me
the golden opportunity to do this wonderful project
on the topic DENTAL MANAGEMENT SYSTEM,
which also helped me doing a lot of research and I
came to know about so many new things. I am
really thankful to them.

Secondly I would also like to thank my parents who


helped me a lot in finalizing this project within the
limited time frame.

6
INTRODUCTION

The project Dental Management System is


developed with a view of assist dental hospital in
their functioning. This project is aimed at providing
easy access to the administration about their patient
records and their employee records.

7
WORKING DESCRIPTION

First, a database is created namely "Dental management system" and tables


namely "Accounts" , “Patient Name ” and "Salary Record". Then the user is asked
to create a user name and password and the user ACCOUNT WILL BE CREATED
SUCCESSFULLY. After creation of account the user will be asked whether he/she
wants to login or exit. If the user choose to login then he/she have to enter
username and password which was created and the user will be provided with 4
choice : 1. Add Patients records
2. Add Salary records
3. View Patient Detail
4. Delete patient detail

Then the user has to enter a choice then according to the choice the input is
asked to enter by the user.

If the choice is equal to 1 then the user has to enter details such as
Patient_Name,Age,Doctor_Consulted, Address,Phone_Number and it is then inserted to
the table "Patient_record" and displays the message "RECORD ADDED"

If the choice is equal to 2, then the user has to enter details such as
Employee_Name,Proffession,Salary_Amount Address,Phone_Number which is inserted
into the "SALARY_RECORD" table and message is displayed " RECORD
ADDED ".

If the choice is equal to 3, then the user has to enter Patient_Name and it will
display all the details of the Patient.

If the choice is equal to 4, then the user has to enter Patient_Name and it will
delete the record of the patient and will display “RECORD DELETED
SUCCESSFULLY”

If the user chose to exit, it will stop at that time.

8
CODING
Database:

create database dental_management_system;


use dental_management_system;

 TABLE PATIENT_RECORD
create table patient_record( Patient_Name varchar(50),Age
int(3),Doctor_Consulted varchar(50),Address
varchar(150),Phone_Number bigint(15))

 TABLE ACCOUNT
create table accounts( User_Name varchar(20) primary key,
password varchar(30) unique)

 TABLE SALARY_RECORD
create table salary_record( Employee_Name
varchar(50),Proffession varchar(20),Salary_Amount
varchar(9),Address varchar(150),Phone_Number bigint(15))

9
Main code

import sys
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='kavya',database='dental_
management_system')
cur=conn.cursor()

user=input("Enter New User Name : ")


user=user.upper()
passwrd=input("Enter New Password : ")
passwrd=passwrd.upper()
cur.execute("insert into accounts values('" + user + "','" + passwrd + "')")
print("ACCOUNT ADDED SUCCEFULLY")
conn.commit()
if conn.is_connected:
print(" Dental Management System ")
print("1. Login")
print("2. Exit")
print()
option=int(input("Enter your choice : "))
if option==1:
print()
user=input('User Name : ')
user=user.upper()
cur.execute("select * from accounts where User_Name like '" + user + "'")
datas=cur.fetchall()
for i in datas:
value_1=i[0]
value_2=i[1]
if user==value_1:
password=input('Password : ')
password=password.upper()

10
if password==value_2:
print()
print('Login succefull')
print()
print("1. Add Patients records")
print("2. Add Salary records")
print("3. Veiw Patient Detail")
print("4. Delete patient detail")
print()
choice=int(input('Enter a option : '))
if choice==1:
print()
name=input('Name : ')
name=name.upper()
age=int(input('Age : '))
doc=input('Doctor Consulted : ')
doc=doc.upper()
add=input('Address : ')
add=add.upper()
phone_no=int(input('Phone Number : '))
cur.execute("insert into patient_record values('" + name + "'," +
str(age) + ",'" + doc + "','" + add + "'," + str(phone_no) + ")")
conn.commit()
print('Record added')
if choice==2:
print()
emp_name=input( 'Employee_Name : ')
emp_name=emp_name.upper()
proffesion=input('Proffession : ')
proffesion=proffesion.upper()
salary=int(input('Salary Amount : '))
add=input('Address : ')
add=add.upper()
phone_no=input( 'Phone_Number : ')

11
cur.execute("insert into salary_record values('" + emp_name + "','" +
proffesion + "'," + str(salary) + ",'" + add + "'," + str(phone_no) + ")")
conn.commit()
print('Record added')
if choice==3:
print()
name=input('Name of the patient : ')
name=name.upper()
cur.execute("select * from patient_record where patient_name like '"
+ str(name) + "'")
data=cur.fetchall()
if data!=0:
for row in data:
print()
print("Patient Details : ")
print()
print('Name : ',row[0])
print(' : ',row[1])
print('Doctor consulted : ',row[2])
print('Address : ',row[3])
print('Phone Number : ',row[4])
input()
else:
print()
print("Patient Record Doesnot Exist")
if choice==4:
print()
name=input('Name of the patient : ')
name=name.upper()
cur.execute("delete from patient_record where Patient_Name like '" +
name + "'")
print('Record Deleted Successfully')
else:
print('Invalid Password')

12
print('Tryagain')
elif option==2:
sys.exit()
conn.commit()
input()

13
OUTPUT

»MYSQL OUTPUT:

 When the user creates a database :

 When the user use the database :

 When the user creates a table patient_record :

 When the user creates a table Account :

 When the user creates a table Salary_Record :

14
» PYTHON OUTPUT:
 When the user to create a user name and
password:

 When the user is asked whether he/she wants to


login or exit :

 When the user choose option (1) and is asked to


enter username and password which was created:

15
 When the user is asked to choose one of them
after successfully login :

 When the user enters the choice "1" and asked to


enter some details :

 When the user enters the choice "2" and asked to


enter some details :

16
 When the user enters the choice "3" and asked to
enter some details :

 When the user enters the choice "4" and asked to


enter some details :

 When the user choose option (2) :


––

17
BIBLOGRAPHY

 Computer science With Python - Class XI & XII


By: SumitaArora
 Website: https://pythonworld.in/practical-proiect/proiect-
list/
 Website: https://drive.google.com/drive/folders/1mWAUg-
8kIyNWFZcBRgbPb0ZgWa3FuPPo

18

You might also like