0% found this document useful (0 votes)
97 views39 pages

Computer Science Project Sample-1

Uploaded by

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

Computer Science Project Sample-1

Uploaded by

shobars83
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
CET ua COMPUTER SCIENCE PROJECT FILE TOPICS HOSPITAL MANAGEMENT SYSTEM NAME>PARTH SHARMA CLASS>12™C SESSION 2021-2022 SUBMITTED TO>SIR RAZA ACKNOWLEDGEMENT I would like to express nay tee thanks to CBSE, my school principal [Link]. Susai Manickam and my (ered olU aR Le (Tate rot eT Cr or providing me with this great opportunity to do this project. I Otte MI Con ORT eat tance Poco U Ce Taree end erl nT SLT Dis iele ncaa Muto lin uly project in the best way possible. Teno CREM none a aL) and family in helping me complete this project. Certificate ; This is to certify that master Parth Sharma of St. Paul’s Sr. Sec. School has successfully completed his project during the academic session 2021-22. The project subjected on Computer Science was completed under the guidance of Sir Raza (subject teacher). The project on evaluation fulfils all the stated criteria and the student findings are their original work. Signature of External . Signaturg/of Internal Signature of Principal INTRODUCTION In today’s world, all the things have become computerized. Generally, the hospital works on Paper work. To register patient information, there is need of a lot paper work. So, this software is useful for doing hospital work easy, It registers the patient’s information sug ar no., patient hame, age, gender, phone no., blood group. Generally, to take appointment, the patient has to call or meet the receptionist of the hospital. By using this software, you can easily take the appointment to the consultant doctor with date and time and appointment no. of that day. Hence, this software makes easy work for both patient and hospital management. INTRODUCTION In today’s world; all the things have become computerized: Generally, the hospital works on Paper work. To register patient information, theres need-of a lot paper work. So, this software is useful for doing hospital work easy, It registers the patient’s information sue ar no., patient hame, age, gender, phone no., blood group. Generally, to take appointment, the patient [Link] call or'‘meet the [Link] the hospital. Byusing this software, you can easily take the appointment [Link] consultant doctor withsdate [Link] and’appointment no. of that day. Hence, this software makes easy work for both patient and hospital management. TECHNOLOGY USED PYTHON Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding; make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. DEVICE> dell Inspiron 3501 PROCESSSOR> 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 2.42 GHz INSTALLED RAM~>8.00 GB (7.73 GB usable) SYSTEM TYPE>64-bit operating system, x64-based processor WINDOWS EDITION>Windows 11 Home Single Language VERSION>21H2 SO ODE import Read_Hospital_Excel_Sheet import Write_Hospital_Excel_Sheet def AppointmentindexInDoctorsDataBase (patient_ID) : for iin Doctors_DataBase : for j in Doctors_DataBase[i] : if str(patient_ID) == strG[0]) : Appointment_index = Doctors_DataBasefi].index(j) return Appointment_index,i pring(rssvseessewssaneenansusseonecanectanantanacosnseasceyscanscynseenees “) print("* ” print("* Welcome to Hospital Management System my print("* “) tries_flag ="" while tries_flas ‘Close the program”: Patients DataBase = Read_Hospital_Excel_Sheet.Read_Patients_DataBase() Doctors_DataBase Read_Hospital_Excel_Sheet.Read_Doctors_DataBase() print(’- print("|Enter 4 for Admin mode [nEnter 2 for User mode rn print?___________—") Admin_user_mode = input("Enter your mode : if Admin_user_mode == "4": #Admin mode print("**ttttststseseeeeeeneneessesenesesenessssin) Welcome to admin mode [\ntttteeseweeennwestansaunacansnenawenanensn) Password = input("Please enter your password : ") while True : if Password "1234" : print("——_—______» print("|To manage patients Enter 4 |\n|To manage doctors Enter 2 n[To manage appointments Enter3 _|\n|To be back Enter E r" print(”- “) AdminOptions = input (“Enter your choice :") AdminOptions = [Link]() if AdminOptions == #Admin mode ->Pateints Management print(’- a) print("To add new patient Enter 1 nm print("ITo display patient Enter 2 nr print("[To delete patient data Enter 3 r print("To edit patient data Enter4 |") print("|To Back enter E rm print(" ——) Admin_choice ("Enter your choice : ") Admin_choice = Admin_choice.upper() if Admin_choice == "1": #Admin mode - ->Pateints Management —> Enter new patient data #To avoid non integer input patient_ID = int(input("Enter patient ID :")) while patient_ID in Patients_DataBase : #if Admin entered used ID patient_ID = int(input("This ID is unavailable, please try another ID : ”» Department=input("Enter patient department 2") DoctorName: put("Enter name of doctor following the case Name =input("Enter patient name 2") Age _=input("Enter patient age Gender put("Enter patient gender 7) Address =input("Enter patient address =) RoomNumber=input("Enter patient room number 2") a Patients _DataBase[patient_1D]=[Department,DoctorName,Name,Age, Gender,Address,RoomNumber] print("—Patient added successfully") except : print("Patient ID should be an integer number") elifAdmin_choice == "2" ; #Admin mode - ->Pateints Management --> Display patient data ¥ try: #To avoid non integer input patient_ID = int(input("Enter patient ID :")) while patient_ID not in Patients DataBase : patient_ID = int(input("Incorrect ID, Please Enter patient ID : ")) print("\npatient name :",Patients_DataBase[patient_ID][2]) print("patient age :",Patients_DataBase[patient_ID][3}) print("patient gender _: ",Patients_DataBase[patient_1D][4]) print("patient address _: ",Patients_DataBase[patient_ID]I5]) print(“patient room number : ",Patients_DataBase[patient_ID][6]) print("patient is in "+Patients_DataBase[patient_ID][0]+” department”) print("patient is followed by doctor: “+Patients_DataBase[patient_ID][1}) except : print("Patient ID should be an integer number") elifAdmin_choice == "3" #Admin mode - ->Pateints Management —> Delete patient data #To avoid non integer input patient_ID input("Enter patient ID :")) while patient_ID not in Patients DataBase : patient_ID = int(input("Incorrect ID, Please Enter patient ID: i) Patients_DataBase.pop(patient_ID) print("- Patient data deleted successfully") except: print("Patient ID should be an integer number") elifAdmin_choice == #Admin mode - ->Pateints Management —> Edit patient data try: #To avoid non integer input patient_ID=int(input("Enter patient ID : ")) while patient_ID not in Patients_DataBase : patient ID = int(input("Incorrect ID, Please Enter patient ID: “)) while True = print) print("[To Edit pateint Department Enter 1: |") print("To Edit Doctor following case Enter 2: |") print("ITo Edit patient Name Enter 3: " print("ITo Edit patient Age Enter 4: rm print("|To Edit patient Gender Enter 5: print("|To Edit patient Address Enter 6: ") print("|To Edit patient RoomNumber Enter 7 : " print("|To be Back Enter E r print(*_——________») Admin_choice = input("Enter your choice : “) Admin_choice = Admin_choice.upper() if Admin_choice == Patients_DataBase[patient_ID][0]=input("\nEnter patient department : ") » print("—_-—Patient Department edited successfully—. elifAdmin_choice Patients_DataBase[patient_ID][1]=input("\nEnter Doctor follouing case print(”. Patient name edited successfully————— _) elifAdmin_choice =: Patients_DataBase[patient_ID][3]=input("\nEnter patient Age : ") print(”- Patient age edited successfully————_—— _) elifAdmin_choice == } Se follouing case edited successfully— elifAdmin_choice Patients_DataBase[patient_1D][2]=input("\nEnter patient name Patients_DataBase[patient_ID}[4]=input("\nEnter patient gender : ") ! print(” —" Patient address gender successfully- elifAdmin_choice Patients DataBase[patient_ID][5; it("\nE: address : ") input("\nEnter patient print("——____ patient address edited successfully —_—) elifAdmin_choice == | Patients_DataBase[patient_ID][6]=input("\nEnter patient Se RoomNumber : ") print(" ") ‘Patient Room Number edited successfully— fAdmin_choice break ! print("Please Enter a correct choice’ except : print("Patient ID should be an integer number") v elifAdmin_choice "E": #Admin mode - ->Pateints Management --> Back break print("Please enter a correct choice\n") elifAdminOptions == "2" : #Admin mode —> Doctors Management print(*——______ ny Print("|To add new doctor Enter Print("|To display doctor Enter 2 n Print("To delete doctor data Enter 3 print("ITo edit doctor data Enter print("|To be back enter E r" print(”————______ ny Admin_choice = input ("Enter Your choice :") Admin_choice = Admin_choice.upper() if Admin_choice ~ Poctors Management —> Enter new doctor data avoid non integer input try: #To int(input("Enter doctor ID: »)) Boctor_ID = while Doctor_ID in Doctors DataBase : #if Admin entered used ID 2 Doctor_ID int(input("This ID is unavailable, please try another ID : ”» Department=input("Enter Doctor department : Name zinput("Enter Doctor name Address Finput("Enter Doctor address Doctors_DataBase[Doctor_ID]=[[Department,Name,Address]] print(". -——-Doctor added successfully") except : print("Doctor ID should be an integer number”) elifAdmin_choice == "2": #Admin mode - -> Doctors Management —> Display doctor data try: #To avoid non integer input int(input("Enter doctor ID : ")) Doctor_ID not in Doctors_DataBase * Doctor_ID = int(input("Incorrect ID, Please Enter doctor ID: ")) print("Doctor name »Poctors_DataBase[Doctor_1D}[0][1]) print("Doctor address Doctors DataBase[Doctor_ID}[0][2]) print("Doctor is in"+Doctors_DataBase[Doctor_ID][0][0]+" department”) except : x print("Doctor 1D should be an integer number") elifAdmin_choice #Admin mode - -> Doctors Management —> Delete doctor data try: #To avoid non integer input Doctor_ID = int(input("Enter doctor ID while Doctor _ ID not in Doctors_DataBase : Doctor_ID = int(input("Incorrect ID, Please Enter doctor ID Doctors_DataBase.pop(Doctor_ID) print(" ———Doctor data deleted successfully——————") except : print("Doctor ID should be an integer number”) elifAdmin_choice == "4" ; #Admi +> Doctors Management —> Edit Doctor data nodal try: avoid non integer input ~ iro Doctor_ID=input("Enter doctor ID : ") a while Doctor_ID not in Doctors DataBase : Doctor_ID int(input("Incorrect ID, Please Enter doctor 1 print("- » print("|To Edit doctor's department Enter 1 |") print("|To Edit doctor's name Enter 2 n print("|To Edit doctor's address Enter 3 |") print("To be Back Enter E print(": a put("Enter your choice Admin_choice: Admin_choice = Admin_choice.upper() if Admin_choi Doctors_DataBase[Doctor_ID][0][0]=input("Enter Doctor's Department : ") ——---—Doctor’s department edited successfully. elifAdmin_choice Doctors_DataBase[Doctor_1D][0][1}=input("Enter Doctor's Nam ) print("— ——— Doctor's name edited successfully) elifAdmin_choice =: Doctors_DataBase[Doctor_ID][0][2]=input("Enter Doctor's Address : m print(— —————Doctor's address edited successfully- elifAdmin_choice = : break else: print("\nPlease enter a correct choice\n") except : print("Doctor ID should be an integer number") elifAdmin_choic: else: print("InPlease enter a correct choice\n") elifAdminOptions #Admin mode —> Appointment Management print(": print("|To book an appointment Enter 1 rm print("To edit an appointment Enter 2 nm print("[To cancel an appointment Enter3 |") print("|To be back enter E n print(". ") Admin_choice = input ("Enter your choice Admin_choice Admin_choice.upper() if Admin_choice == "1": #Admin mode - -> Appointment Management ~-> Book an appointment try: #To avoid non integer input Doctor_t int(input("Enter the ID of doctor : while Doctor_ID not in Doctors_DataBas: Doctor_| doctor ID: ")) = int(input("Doctor ID incorrect, Please enter a correct en) print("———__ print("|For book an appointment for an exist patient Enter 1 |\n|For book an appointment for a new patient Enter 2 \in|To be Back Enter E rn print(". Admin choice = input ("Enter your choice : ") Admin_choice = Admin_choice.upper() Admin_choice patient_ID = int(input("Enter patient ID while patient_ID not in Patients_DataBase : #if Admin entered incorrect ID patient_ID = int(input("Incorrect 1D, please Enter a correct patient ID ™ elifAdmin_choice patient_ID = int(input("Enter patient ID :")) while Patient_ID in Patients DataBa: #if Admin entered used ID patient_ID = int(input("This ID is unaval please try another ID: » Department=Doctors_DataBase[Doctor_ID][0][0] DoctorName=Doctors DataBase[Doctor_ID][0][1] i Name cinput("Enter patient name; ") Age cinput("Enter patient age Gender cinput("Enter patient gender :") Address zinput("Enter patient address : ") RoomNumber="" Patients_DataBase[patient_ID]=[Department,DoctorName,Name,Age, Gender,Address,RoomNumber] break Session Start = input("Session starts at : ") while Session_Start| 41" or Session Start[ :2] == "12' Session Start = input(“Appointments should be between 01:00PM to 10:00PM, Please enter a time between working hours : “) foriin Doctors DataBase[Doctor_ID] : type(ifOD!=str: : it while Session_Start>= i[1] and Session Start Edit an appointment try: #To mode —> Appointment Management avoid non integer input int(input("Enter patient ID ————— i whil patient 1D not in Patients DataBase : a patient_ID = int(input(“Incorrect Id, Please Enter correct patient ID ; ” try: #7 avoid no return function es Appointmentindex,PairKey = AppointmentIndex!nDoctorsDataBase(patient_ID) Session_Start = input ("Please enter the new start time : ") while Session_Start[ :2] == "11" or Session_Start[ :2] == "12": Session_Start = input("Appointments should be between 01:00PM to 10:00PM, Please enter a time between working hours : ") for iin Doctors DataBase[Doctor_ID] : if type(ifo)!=str: while Session_Start>= i[1] and Session Start Appointment Management ~> Cancel an appointment try: #To Rg__—_woid non integer input patient_ID = int(input("Enter patient ID :")) while patient_ID not in Patients_DataBase : patient_ID = int(input(“Invorrect ID, Enter patient ID : “)) try: Appointmentindex,PairKey = AppointmentIndexInDoctorsDataBase(patient_1D) Doctors_DataBase[PairKey]-pop(Appointmentindex) appointment canceled successfully————— print("/——_—_—— ry print("No Appointment for this patient") except: #To avoid no return function 1p should be an integer number") i Print("please enter a correct choice") elifAdminOptions = #Back break else: print("Please enter a correct option") elif Password != "1234" : if tries <2: : Password = input("Password incorrect, please try again tries +=1 else: print("Incorrect password, no More tries") tries flag = “Close the program” break Write Hospital Excel [Link] Patients DataBa Base) (Patients Data Write Hospital Excel. [Link] Doctors DataBase(Doctors DataB ase) elifAdmin_user_mode #User mode print("***#*++s0seesseeeen: **84\n] ste aaseseemy Welcome to user mode [\ntteeeeen ee while True : print("\n print("|To view hospital's departments Enter 4 |") print("|To view hospital's doctors Enter 2 |") print("|To view patients' residents Enter 3 [ print("|To view patient's details Enter 4 |") print("|To view doctor's appointments Enter 5 |") print("|To be Back Enter E print(*__———————" UserOptions = input("Enter your choice : ") UserOptions = [Link]() if UserOptions == "1": #User mode —> view hospital's departments print("Hospital's departments :") for i in Doctors DataBase : “sDoctors DataBase|i}[0}{0}) print(" elifUserOptions == "2" ; #User mode —> view hospital's Doctors print("Hospital’s doctors for i in Doctors DataBase : ss print(" “+Doctors_DataBasefi][0][1]+" in "+Doctors_DataBase[i][0][0]+" department, from "+Doctors_DataBasefi][0][2]) elifUserOptions == "3" : #User mode —> view patients’ residents for i in Patients_DataBase : print(" _ Patient : "sPatients_DataBase[i][2]+" in "+Patients_DataBase[i][0]+" department and followed by "+Patients_DataBasefiJ[1]*", age: “sPatients_DataBase[i][3]*", from : "+Patients_DataBase[i][5]*", RoomNumber : "+Patients_DataBase[i][6]) elifUserOptions == "4": #User mode -> view patient's details, #To avoid non integer input patient_ID = int(input("Enter patient's while patient_ID not in Patients_DataBase : patient ID = int(input(“Incorrect 'd, PI e enter patient ID: ")) print(" patient name ™,Patients_DataBase[patient_ID][2]) Print(” Patient patients DataBase[patient 1p)[3}) age print" Patient gend. « patients DataBase[patient_ 1D]14]) gender print(" Patient address; " patients_DataBase[patient_1D}[5}) print(” Patient room number ; ,patients_DataBase[patient_1D}[6}) print(” patient is in “sPatients_DataBaselpatient_1D}[0]+" department") print(" Patient is followed by doctor :"+Patients_DataBase[patient_ID][1]) except : print("Patient ID should be an integer number") elifUserOptions == "5": #User mode —> view doctor's appointments try: #To avoid non integer input Doctor_ID = int(input("Enter doctor's ID “") while Doctor_ID not in Doctors DataBase : Doctor_ID = int(input(“Incorrect 'd, Please enter doctor ID :")) a ts 2" print(Doctors_DataBase[Doctor_ID][0][1]+” has appointments :") for | in Doctors DataBase[Doctor_ID] : if type(i[0])==str: continue except : Print("Doctor ID should be an integer elifUserOptions =: #Back break else: j print("Please Enter a correct choice") else: print("Please choice just 1 or 2") Welcome to Hospital Management System o ————— lenter 1 for Admin mode i lenter 2 for User mode | | Enter your mode : 4 | Welcome to admin mode I FEHR RIOR SUID IU URINE n ae Please enter your password : 1234 [To manage patients Enter 1 | [To manage doctors Enter 2 | [To manage appointments Enter 3 | ITo be back Enter E | _——— Enter your choice : 4 ee ITo add new patient Enter 1 jo display patient Enter 2 1 |To delete patient data Enter 3 \ro edit patient data Enter 4 1 jTo Back enter E 1 patientname —: ‘Claire Temple patientage : 23 patient gender: Female patient address: Racoon City patient room number: 1 patient is in Neurology department patient is followed by doctor : John Smith [To manage pat nts Enter 1 | [To manage doctors Enter 2 ' To manage appointments Enter 3 | ITo be back Enter E ! a Enter your choice: e __ ae lEnter 4 for Admin mode | [Enter 2 for User mode ' aia Enter your mode : 2 ———— welcome to user mode I oo irovew hospital's departments Enter 4 | iro view hospital's doctors Enter 2 | jro view patients’ residents Enter 3 | iro view patient's details Enter 4 | iro view doctor's appointments Enter 5 | |To be Back Enter E 1 eS _ Enter your choice : 1 Hospital's departments : Neurology a ee ITo view hospital's departments Enter 1 | |To view hospital's doctors Enter 2 | ITo view patients’ residents Enter 3 | [To view patient's details Enter4 | ITo view doctor's appointments Enter 5 | ITo be Back Enter E I ee Enter your choice : 2 Hospital's docto John Wick in Neurology department, from Malaysia >-__l ITo vi © view hospital's departments Enter 1 | iroview hospital's doctors:Enter 2 | iro view patients’ residents Enter 3. | iro view patient's details Enter 4 | iro view doctor's appointments Enter 5 | \To be Back Enter E | _ enter your choice : 3 patient : Claire Temple in Neurology department and followed by John Smith, age : 23, from : Racoon City, RoomNumber : 1 _ |To view hospital's departments Enter 1 | [To view hospital's doctors Enter2 | [To view patients’ residents Enter3 | [To view patient's details Enter 4 1 [To view doctor's appointments Enter 5 | ITo be Back Enter E ! —____. Enter your choice : 4 Enter patient's ID : 1 Patient name patient age : 23 Patient gender: Female Patient address |: Racoon City Patient room number: 1 Patient is in Neurology department Patient is followed by doctor : John Smith — iro view hospital's departments Enter 4 | w hospital's doctors Enter 2 | jro vie iroview patients’ residents Enter 3 iroview patient's details Enter 4 | w doctor's appointments Enter 5 | \To vie iro be Back Enter E I _ Enter your choice : 5 Enter doctor's ID : 4 John Wick has appointments : \To view hospital's departments Enter 1 | [To view hospital's doctors Enter 2 | [To view patients’ residents Enter 3° | ITo view patient's details Enter4 | [To view doctor's appointments Enter 5 | To be Back Enter E | e—_-—_——— Enter your choice : | BIBLIOGRAPHY a ARORA COMPUTER SCIENCE cLASS 12 [Link] [Link] >[Link] y ART INTEGRATION 54,1.1.7>study and use of various media and techniques to extent of their availability >[Link].11>basic knowledge of computer graphics

You might also like