You are on page 1of 21

Science

PROJECT FILE
(2023-24)

Study of the acidity of different samples of tea

leaves

Name : Neelesh Chopra


Roll No. : 23
ACKNOWLEDGEMENT

I have been benefited a lot from the feedback and


suggestions given to me by Mrs. Karuna Gupta for her
kind cooperation support and guidance for completing this
project successfully.
It is a moment of great pleasure for me to complete this
project as a part of CBSE curriculum..
I would like to express my deep sense of thanks and
sincere regards to my family and friends who helped me in
completing this project on time.

~ Kanav, Neelesh, Shaunak


CERTIFICATE

This is to certify that Kanav, Neelesh, Shaunak of class


XI-A, has worked under my supervision on the
Computer Science Project titled MediTrack using User
defined functions, Dictionary, etc.
The project is completed as per CBSE guidelines and
to my satisfaction.

Ms. Karuna Gupta


(PGT : Comp. Sci. & IP)
Client – Server Model

Client/ Server describes the relationship between two computer programs in


which one program the client, makes a service request from another
program, the server, which fulfills the request. Although programs within a
single computer can use the client/server idea, it is a more important idea in
a network. In a network, the client server model provides a convenient way
to interconnect programs that are distributed efficiently across different
locations. Computer transactions using client/server model are very
common.
Introduction
In the realm of healthcare management, effective organization and streamlined processes
play a crucial role in providing quality medical services. The project at hand focuses on
developing a system for managing doctors and patients in a hospital. This Python program
helps facilitating the appointment booking process of medical service.

The system starts by storing information about doctors, including their names,
specializations, and experience. Each doctor is assigned based on their specialization. On the
patient’s side, the system maintains records of individuals, their ages, and the respective
doctors they have consulted or are scheduled to meet.

Key features of the project include:


1. Doctor Management:

- Addition of new doctors with relevant details.

- Displaying information about a specific doctor.

- Editing and updating doctor details.

- Searching for doctors based on their name.

2. Patient Management:

- Booking appointments for recurring or new patients.

- Displaying patient details.

- Deleting patient records.

3. Admin Console:

- Secure login for administrative access.

- Admin functionalities include adding, displaying, editing, and deleting doctor


information.

- Searching for detailed credentials of a doctor.

- Deleting patient records.

4. Appointment Booking:
- Differentiating between recurring and new patients.

- Assigning eligible doctors based on the patient's chosen field of specialization.

- Handling payments for appointments.

Python Concepts used:

1. Lists: Lists are arrays that allow you to store and manipulate collections
of items. Whether it's a sequence of numbers, strings, or a mix of
various data types. Elements in a list are ordered and can be accessed
by their index.
2. Dictionary: Dictionaries are key-value pairs, providing a way to store
and retrieve data using unique keys. Unlike lists, dictionaries are
unordered, and each key is associated with a specific value. This makes
them ideal for organizing and accessing information in a structured
manner.
3. Loops: Loops in Python, such as "for" and "while" loops, allow you to
repeat a set of instructions multiple times. They are invaluable for
automating repetitive tasks.
4. if/else/elif: Conditional statements, including "if," "else," and "elif"
(short for "else if"), enable the execution of different code blocks based
on specific conditions. These statements enhance the decision-making
capability of programs.
5. User-defined functions: Python allows you to define your functions,
defining a set of instructions under a chosen name. This allows code
reusability, and making the code more readable and maintainable.
Source Code

import random
#Let static input for doctors
doctor_info={100:{"Name":"Robert
Zane","Specialisation":"Cardiologist","Experience":5},101:{"Name":"Claire
Browne","Specialisation":"Paediatrician","Experience":2},102:{"Name":"Neil
Melendez","Specialisation":"Orthopaedic","Experience":8},103:{"Name":"Ray
Holt","Specialisation":"Radiologist","Experience":15}}
OPD={"Cardiologist":"OPD 1","Paediatrician":"OPD 2","Orthopaedic":"OPD
3","Radiologist":"OPD 4"}
def doctor_add():
doc_id=int(input("\nEnter Doctor ID: "))
name=input("Enter Doctor name: ")
spec=input("Enter Doctor specialisation
(Cardiologist/Paediatrician/Orthopaedic/Radiologist): ").capitalize()
exp=int(input("Enter Doctor experience(in years): "))
doctor_info[doc_id]={"Name":name,"Specialisation":spec,"Experience":exp}
print("\nDoctor data added successfully\n")

def doctor_display():
doc_id=int(input("\nEnter Doctor ID: "))
if doc_id in doctor_info:
print("\nDoctor Information: ")
print("Name:",doctor_info[doc_id]["Name"])
print("Specialisation:",doctor_info[doc_id]["Specialisation"])
print("Experience:",doctor_info[doc_id]["Experience"],"years\n")
else:
print("\nNo Doctor Found with the given ID\n")
def doctor_edit():
doc_id=int(input("\nEnter Doctor ID: "))
if doc_id in doctor_info:
name=input("Enter Doctor Name: ")
spec=input("Enter Doctor Specialisation
(Cardiologist/Paediatrician/Orthopaedic/Radiologist): ").capitalize()
exp=int(input("Enter Doctor Experience: "))

doctor_info[doc_id]={"Name":name,"Specialisation":spec,"Experience":exp}
print("\nDoctor information updated successfully\n")
else:
print("\nNo Doctor found with the given ID\n")

def doctor_delete():
doc_id=int(input("\nEnter Doctor ID: "))
if doc_id in doctor_info:
del doctor_info[doc_id]
print("\nDoctor data deleted successfully\n")
else:
print("\nNo Doctor Found with the given ID\n")

def doctor_search_admin():
search=input("\nEnter the name of Doctor: ")
Eligible_doctors=[]
for doc_key,doc_value in doctor_info.items():
if search.lower() in doc_value['Name'].lower():
Eligible_doctors.append({'ID': doc_key, 'Name': doc_value['Name'],
'Specialisation': doc_value["Specialisation"]})
print("\nDoctors found:")
for found in Eligible_doctors:
print(f"Name: {found['Name']}\nSpecialisation: {found['Specialisation']}\
nID: {found['ID']}\n")

#Let static input for patients


patient_info={10000:{"Name":"Paxton
Hall","Age":24,"Cardiologist":"","Paediatrician":"","Orthopaedic":"","Radiologi
st":""},10001:{"Name":"Terry
Jeffords","Age":12,"Cardiologist":"","Paediatrician":"","Orthopaedic":"","Radiol
ogist":""},10002:{"Name":"Ross
Geller","Age":57,"Cardiologist":"","Paediatrician":"","Orthopaedic":"","Radiolo
gist":""},10003:{"Name":"Harvey
Specter","Age":35,"Cardiologist":"","Paediatrician":"","Orthopaedic":"","Radiol
ogist":""}}
def appointment():
print("\nPress 1 for recurring patient: ")
print("Press 2 for new patient: ")
ch_p_add=int(input("Enter your choice: "))
if ch_p_add==1:
patient_id=int(input("\nEnter patient ID: "))
if patient_id in patient_info:
sp_wanted=input("Field of doctor needed
(Cardiologist/Paediatrician/Orthopaedic/Radiologist): ").capitalize()
Eligible_doctors=[]
for doc_key,doc_value in doctor_info.items():
if sp_wanted in doc_value["Specialisation"]:
Eligible_doctors.append({"ID": doc_key, "Name":
doc_value["Name"]})
flag=-1
for i in range(0,len(Eligible_doctors)-1):
if patient_info[patient_id][sp_wanted]==Eligible_doctors[i]
["Name"]:
flag=i
if flag>-1:
print("\nDr."+Eligible_doctors[flag]["Name"],"will be waiting
in",OPD[sp_wanted])
print("Please pay Rs500\n")
else:
ran=random.randint(0,len(Eligible_doctors)-1)
print("\nDr."+Eligible_doctors[ran]["Name"],"will be waiting
in",OPD[sp_wanted])
print("Please pay Rs500\n")
patient_info[patient_id][sp_wanted]=Eligible_doctors[ran]["Name"]
else:
print("\nInvalid patient ID\n")

elif ch_p_add==2:
patient_name=input("\nEnter patient name: ")
patient_age=int(input("Enter patient age: "))
sp_wanted=input("Field of doctor needed
(Cardiologist/Paediatrician/Orthopaedic/Radiologist): ").capitalize()
rid=random.randint(10004,99999)

patient_info[rid]={"Name":patient_name,"Age":patient_age,"Cardiologist":"","
Paediatrician":"","Orthopaedic":"","Radiologist":""}
print("\nPatient data added successfully your patient ID is:",rid,"\n")
Eligible_doctors=[]
for doc_key,doc_value in doctor_info.items():
if sp_wanted in doc_value["Specialisation"]:
Eligible_doctors.append({"ID": doc_key, "Name":
doc_value["Name"]})
ran=random.randint(0,len(Eligible_doctors)-1)
print("\nDr."+Eligible_doctors[ran]["Name"],"will be waiting
in",OPD[sp_wanted])
print("Please pay Rs500\n")
patient_info[rid][sp_wanted]=Eligible_doctors[ran]["Name"]
else:
print("\nInvalid input, Try again\n")

def doctor_Search():
patient_id=int(input("\nEnter patient ID: "))
if patient_id in patient_info:
Name=input("Name of Doctor: ")
Eligible_doctors=[]
for doc_key,doc_value in doctor_info.items():
if Name.lower() in doc_value["Name"].lower():
Eligible_doctors.append({"Name":
doc_value["Name"],"Specialisation": doc_value["Specialisation"]})
print("\nDoctors found:")
for found in Eligible_doctors:
print(f"Name: {found['Name']}\nSpecialisation:
{found['Specialisation']}\n")
else:
print("\nInvalid patient ID\n")

def patient_delete():
patient_id=int(input("\nEnter patient ID: "))
if patient_id in patient_info:
del patient_info[patient_id]
print("\nPatient data deleted successfully\n")
else:
print("\nNo patient Found with the given ID\n")

def patient_display():
patient_id=int(input("\nEnter patient ID: "))
if patient_id in patient_info:
print("\nPatient Information: ")
print("Name:",patient_info[patient_id]["Name"])
print("Age:",patient_info[patient_id]["Age"])
print("ID:",patient_id,"\n")
print("Cardiologist:",patient_info[patient_id]["Cardiologist"])
print("Paediatrician:",patient_info[patient_id]["Paediatrician"])
print("Orthopaedic:",patient_info[patient_id]["Orthopaedic"])
print("Radiologist:",patient_info[patient_id]["Radiologist"],"\n")
else:
print("\nNo patient Found with the given ID\n")
while True:
print("Press 1 to book an appointment")
print("Press 2 to search for a Doctor")
print("Press 3 to display patient details")
print("Press 4 to login to admin console")
print("Press 5 to shut down")
ch=int(input("Enter your choice: "))
if ch==1:
appointment()
elif ch==2:
doctor_Search()
elif ch==3:
patient_display()
elif ch==4:
print("\n#Password is admin")
password=input("Enter password: ")
if password=="admin":
print("\nPress 1 to add a Doctor")
print("Press 2 to display a Doctor's data")
print("Press 3 to edit a Doctor's data")
print("Press 4 to search for a Doctor's full credentials")
print("Press 5 to delete a Doctor's data")
print("Press 6 to delete a patients's data")
print("Press 7 to log out of admin console")
cha=int(input("Enter your choice: "))
if cha==1:
doctor_add()
elif cha==2:
doctor_display()
elif cha==3:
doctor_edit()
elif cha==4:
doctor_search_admin()
elif cha==5:
doctor_delete()
elif cha==6:
patient_delete()
elif cha==7:
print("\nLogging out of admin console\n")
else:
print("\nInvalid input, Logging out\n")
else:
print("Incorrect password, Locking database")
break
elif ch==5:
print("\nShutting Down")
break
else:
print("\nInvalid input, Try again\n")

Output
BIBLIOGRAPHY

 Computer Science (NCERT)


 Computer Science with Python by Sumita Arora
 Computer Science with Python by Preeti Arora
 https://www.w3schools.com/python/
 https://www.geeksforgeeks.org/python-gq/

You might also like