0% found this document useful (0 votes)
19 views42 pages

HSP

Ip project class 2th on hospital management

Uploaded by

lostritik37
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)
19 views42 pages

HSP

Ip project class 2th on hospital management

Uploaded by

lostritik37
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
You are on page 1/ 42
a a ~ (ey ‘Project Based on: ( HOSPITAL 2 SMANAGEMENTS 7 SYSTEM _S ae He cnoutscoemenn’’ ( ACKNOWLEDGEMENT 5 In the accomptishment of this project successfully, many peopte have best oumned upon me their blessings and the heart pledge support, this time I am utifiging to thank aff the people uehe hauwe been. concerned uoith, this project. Primarily I would, like thank ged fer being able to complete this project with success. Jhen I would like to thank my principal Mrs. J lahima Bhatt and. Qs Computer Science teacher JY irs. Lalita Joshi, & whose watuable quidance has been the ones that helped, me patch. this project and make it full proof success, his suggestions and instruction has served as the major contribution towards the completion of this project. Then I would like to thank my parents uahe have helped me with their wafuable suggestions and, guidance has been very helpful in warious phases of the ) conystetion of the project Jes —— i rahe The project Hospital Management system includes registration of patients, storing their details into the sys and also computerized billing in the pharmacy, and labs. The software has the facility to give a unique id for every patient and stores the details of every patient and the stall & | automatically. St includes a search facility to know the current status of each room. User can search availability o ctor and the details of a patient USiIG the id. the database. The data can be retrieved easily. The interface is very user-triendly. The data are well, protected for personal use and makes the data processing very fast. The purpose of the proect entitled as "Hospital Management System!" is to computerize the Front OWiice Meanagement of; Hospital to develop sottware which is user, Coding : import muysql.connector aS MSC conn = msc.connect host=" localhost’, user="ro0t' passwd = " prateck? 4", database =" hespital__management__syste nt) cur=conn.cursod ) del “dnin end )- print” | 1:Greate table doctor_details print’ m | 2 Describe dector__details. print” | 3: Register Doctor Details. print" | 4 Display all Doctor details. print” | 5Greate table patient_details. print’ "| 6 Describe petient_details. print "| 7:Register Patient details. print” | 8-Display all patient details. print "| 9:Greate table worker_details. print(" | 10:Describe worker_details printl "| M. Register Worker details. print "| 12 Display all Worker detail. print” | 23:Search Decter details. print" | 14: Search Patient detail 5 print” print” pri A " print " print print " print" print" print" print(" print" print print” print” print" print(” print’ 16 Update Doctor details 17 Update Patient details 13 Update Warker details 19:Create table Bill 20:Enter charges of Patent tor Bill_details 21:Show records of Bill 22 Delete records BRemoe dl Doctor 24: Remove Patient 25: Removed Worker 26-Display details of a particular Doctor 27 Display details of a particular Patient 23:-Dispaly details ofa particular Worker 29:Reun Cuery of your choice on dector_details table 30: Rain Query of your choice on patient__details table 51:Reun Query of your choice on worker details table 52-Gaxit det User Menu(): print(" | 1-Display details of a particular Doctor print” | 2-Display details of a particular Patient print" | 3 Dispaly details of a particular Worker prude” | 4 Display UU Doctor details print” | 5-Display XU Patient details we print” 6 Display SU Warker details. print" 7:Search Doctors details. print(" S:Search Patients details. print("' 9: Search COarkers details. print” 10-Raun Query cf your cheice on dector_details table’ ) pri! 11:-Run Query cf your choice on patient details table" ) print” 12:Raun Query of yeur choice on worker details table!" ) print” 13: def Doctor_detal§X): = #Fo Create Dactor's table curexecutd” create table dector__detaisd__id int primary keyd_name varcharGO ).d__age intl __gender varchar0),d_ department varchar(20).d_post varchar GO )d_ phone Bignt 1)" ) print secesscsere\\ ||| | | Feeble Created Successhially +222-020:" ) delPatient_detal€): = #Fo Create Patients table curexecutd” create table patient__detail_p_id int primary key p__name varcharGO )p_age intp_gender varchar10 ).p_preblems earchar 20), p—plone Bigut 2) print” AVILL LI Created Secccshlly : HLL | ") def Worker__detail): #To Create Worker's table curexecutd” create table worker_detailsw__id int primary key.w__name warcharGO ww age intee gender varchar 10), w_workname varchar(20), w__phone ee MI) print” : I ble Created Successfully » sssszesesss| | | Hl de(dd__ doctor: # Fi xtdd Mew Doctor print" Enter Mew Dector Jutormation:" ) f= intinpat” J 1 = S input" Enter Doctor Name:") aint mput' Enter ge:")) g = 1 put" Enter Gender For NO" ) d = 1 input" Enter the Department:" ) p= input" Enter the Pest:") ple=intnputl" Enter Phone Mumber:")) cur.erecutd" insert into doctor__details values “6s, Gs. 4 ts)" O.nagdpph)) conn.commit( ) conn.clesd ) print” : LUT TL de : Registered Mew Dector el LLL ) de dd Patient: #T odd New patient print” Enter Jew Patient Jutermation" ) i= ntinpat"' Enter FD of Patient:" )) inpat”’ Gunter Patient Mame:") 1-7 a = 1 intl input" Cater ge." )) gC input" Enter Gender (For NO :") pinpatC' Enter the Preblems:") ph-intinput”' Enter Phone Mamber:")) cur.executd” insert into patient__details values %s, %s. %s, 4 %8, %s"Cnagpph) ) conn.commit) conn.closd ) print coceccesee:| || || | | Registered New Patient +: LLLL LLL ) #To dd New Worker print " Enter ew Worker Gutormatin:" ) i= intl, input " Enter FD of Werker:")) " input’ " Enter Worker Name:") aint input’ " ater, ge: ")) grin” Enter Gender ( Fr NO-") co=inped "Enter type of Work:") ph = intl, input " Enter Phone Mumber:" )) curexecutd" insert into worker__details valued “Cs, “Gs, %s, Yr JOP Ci, nagueyph)) 6 84 ‘C8, conn.commit) conn.closd) print( " s Registered New Warker : det dese doctor): #TCO Describe Doctor__details print" Stracture of dector_details table" ) cur.execute' dese doctor__details' ) fori in cur: print. D conn.closd) de desc. _paticnt( ): #TO Describe Patient__details print’ " Structure of ‘petient__details table" ) cur.ececute(' dese patient_details' ) fort in cur: print Dv conn.clos) det desc__worker): #TCO Describe Worker__details R print " Structure of worker__details table" ) cur.executd” dese worker__details' ) fori in cur: printi) conn.clesd ) deb DisplayltDoctor D: #To Display SU Dectors print" Tn which order you want to display the dector_details." ) x=intl mputC " 1Sscending order \n 2: Descending order \n 3s present in table \n"D ihe =: col= input" Enter column name with respect to which you want to order the records." ) curexecutd" select * trom doctor__details order by %s asc’ (eal) ) elif: col= input" Enter column name with respect to which you want to order the records:" ) curerecutd" select * trom dector__details order by %s desc" % Ceol) else. cur.executd" select * trom dector__details' ) for x in cur: Y for jinx: printjend = wo ND conn.clesd) 5 det DisplayUP atient): #To Display AU Patients print " In which order you want to display the patient__details: ") x=int input " 1Rscending order \a2: Descending order \n 33s present in table \a"D if==1: col =ineputl " Enter column name with respect to which you want to order the records." ) curexecutd" select * trom patientdetails order by %s ase" “col, ) elif x= =2: col: =inpul " Cnter column name with respect to which you want to order the records." ) cur executd" select * trom patient__details order by %s desc" “(col )) ese: curececutd" select * trom patient_details' ) for x in cur: for jinx: print’ pend = \w printl ) conn.cles) det DisplayU0orker 2: #To Display SU Workers print’ "in which order you want to display the worker_details:" ) x=intl input "7 Pscending order \n2. : Descending order \n 32s present in table \a"D) ife==1: ” col input "Suter column name with respect to which you want to order the records:" ) cur ececutd" select * from worker__details order by %s asc" Ceol) ) 5 cc/- input" "Gunter column name with respect to which you want to : order the records:" ) curcexecutd” select * from worker__details order by %s desc’ G (co )) else. ” curcerecutd" select * trom worker__details' ) for x in cur: tor jinx: print. eand=\«) print ) conn.closd ) det SearchBoctor): #To Search Dacor d=int input ' Enter the FD of Doctor to be searched:")) cur.ececutd select * trom doctor__details where d_id=%s'(d) x = curfetchond ) Kone: print’ "Ko such Records of Doctor is found //") else. for iin x: print(iend= "\t) print ) del SearchPatientO: #To Search Patient d=int inpat(’ " Enter the FD of Patient to be searched:")) cur.ereeutd select * from petient__details where p_id GSC) = cur.etchond ) or = = Mone: print " Mo such Patient found //") else: for iin x: print iad="\t') print ) de Search_@Oorker): # To Search Worker d = intl input " Enter the FD of worker to be searched:")) cur.erecutd select * trom worker __details where w_id=%s""(d)) x = curhetchond ) ihe ==9 print" J (%o such Worker found //") dsc: fori inx: print jend="\t' ) print) def update_doctor_ 2: #To Update Doctor Details d=int input " Enter the Doctor's FD to be modified-" )) a = input "1: To change the ge \n 2: To change the Department \n3: To change the post \n4:To change the phone number \n 5: Fo Change Xd the details nu" ) ifa=='1: a = intinpad’ " Guter the neu Gge:")) cur.ececutd "update dector__details set d_age-{ ‘os where d_id = & wos, %s"G.d)) leit « a= input" Eater the new Department") cur.execut" update dector_detial set d_name = “6s where d_id = f6s"% Gd) difa==3': r= input" Suter the new Past:" ) cur.exeeutd" update dector_detuils set d_post=“%6s' where d_id = %6s"6(xd)) elta==4: = iatinpat(" Garter the new phone Namber:" )) cur.executd(" update dector details set d_phone ~%s where did = %¢s!“oCxd)) dita cag = intCinpnat(" Enter the Age" )) p= input” Enter the new Departments") po = input” Guter the new post:" ) n= inpual(" Enter the new phone nuncber:" ) cur.exceutd” urdate dector_deatils set p_age=Sosp_name = %s, p_post- “6s. p_phone =%s where d_id=Ss'%oCagppend)) che: print” Suvaled Cptiea!/") return conn.commit( ) connclosd 4 def update_worker(). # To Update Worker Details = ietinpuat(” Enter the Worker's D to be medihied:" )) a= npat” 1: To change thee \. 2: To change work name a3: To change the phone nunber 14: Change all the détallsn:") ha =="; x = indmput” Enter the ueusges")) cur.exccutel” update worker_details set wage = Yes where w_td = f68'%6C,d)) da == 2: v= input” Enter the new Werk name") curcexccutd update worker_detials set w_werkname = “es where wid = fos'% Gd) dita == 3. x = IntCinpul” Enter the new phone numbers" )) cur-exceutel update worker details set w phone - ‘os where wid - 8rd) ) dita == "4. ag = tlCinpad” Enter he Rge:")) wo = mpat" Erter the new Work names") n= mut Enter the new phone nunber:" ) currexecutel" update worker _deatils set w_age-Ssw_workname-%s'p_phone-S6s where w_td -%s"agsend)) else: print” Suoalid Option! /") return conn.commit) connclos( ) § def update_patient): — # Fo Update Patient Details d= intinputl" Enter the Patients SD to be meditied:")) a = inputl" 1: Fo change the ge \n 2: To change patient's preblan \.n 3: Je change the phone number \.n 4: Change XU details 1" ) ita == 1: = ind inpa” Eater the ges") curcexeeutd" update patient _details set p_age="es where p_id = Ses" % Gd) dita x= mput" Enter the patient's problem" ) cur-ececute update patient__details set p__problems = %os' where p_id = %s" % Ce, d)) dita ae = indinpat" Enter the new phone number" )) curcexeeutd" update patient details set p_phone = %s where p_id = %s" y % Gd) difa == "4: cag = wt inpat" Enter the Xge:" 1) p= input" Euter the Patient's Problem:" ) n= input" Enter the new phone nunber:" ) curereeutd" update patient _details set page=“, p__problems= p__phene={os where p_id="s" % (ag, p.m d)) else: print" Srcalid Option!" ) conn.commit() conn.clese) 5 def Bill_detail{)- — #To Create Bill curececutd create table bill p__id int p_name varchar 25 )p age intB ), drvisit varchar 40), medicines 15), room int 15)" ) print ", Greated - defldd_BUO): — # Tistdd Bill print "Euler Charges of patient in the bill ") i= intCinpade " Outer Fb of: ‘Patient: i“ ) ) n= input” Cuter Patient Jane:") a = intl) input” Guter Patient age: . ) d = int input’ "Guter fee of Dr's wisits:" )) m = intCinput" Enter the cost of medicines" ») r= intl input’ " Enter Room charges:"" )) cur.ececutd" insert into bill valued “Gs, “bs. %s, 5, %s, Gs" Cnadmr)) coun.commit) conn.cles() det Show Bil) # To Show Bill print "Records of Bil" ) cureceeutd Select * trom bill’) fori in cur: fer} ini: printij.end=" \t) printl ) conn.closd ) def delete_records): # ToDelete Records a = intCmput" 1: Delete Decter's Record \.n 2: Delete Patients's Record 3: Delete Worker's Record \.n 4: Delete Bi Recerd" )) ha == t: v= input" Enter a column name on the basts of which you want te Remeve the Deetors:") = input" Gater its value") tem (Cd_ul',"d_age'."d_ phone’) curserecutd" delete trem decter_details where %s-%s" Cera) )) else: cur-erecutd” delete trom decter_detalls where “os = %s" Cum) ) conn.clese ) print” sccccessse:| ||| || | successilly: HLL elita == 2 x = Input” Enter a column name on the basis cfwhich you want to Remove the Patient") o = input” Guter its values" ) them Cp_sd',"p_age’."p_phone"): cur.executd” delete from patient details where %s = %s" “Cx.evaKe)) ) else: curexecutd" delete trom patient__detalls where %s = %s" Came) ) conn.commit ) conn.clesd ) prt ssccsse::| ||| | | fox Yatients remeved successtully: IHL elifa == 3: Be = input" Sater its value:") the in Cw _id'."w_age"."w_phone' ) cur.ececutd" delete trom worker _details where %s = 5" Cx, evaK))) else: curexecutd” delete trom worker_details where %s = “Gs” “Cum, o)) conn.commit) conn.clesd ) x= input" Enter a column name on the basis of which you want to Remove, the Bill details") w= input" Enter its value" ) itein 'p_id'."p_age","drvisit', "medicines". "reom!' ): cur.eceeutd" delete trom bill where “s = %s" Cx, waKo))) else. cureceeutd" delete Irom bill where %s = %s" %Cnm, o)) conn.commit() conn.cles ) def RemougllDoctor\): — # Fo Remoe Doctors cur.ececutd" delete trom doctor__details" ) cont.commit() conn.clos ) j print " Dector removed successtully LO def; ‘RemougellPc atient’): # To Remove ell Patients curexecutd "delete from patient_details" ) conn.commit) conn.clesd ) print ao | PU Patient removed successtlly | ") det Remoogloorker§): — # To Remove MU Worker curcerecutd” delete from worker__details' ) conn.commnit ) conn.clesd ) print” ' | SU Worker removed. successtully | ) defeldminChoice_Query doctor): print " Which type of query you want to execute 2) ch = intl input " Press 1: For Select query \a Press 2: For Non-Select query 1!" )) itch == 1: $= input " Guter your Select command ‘CQuery \A) cur.executd s) d = cur-hetchal) itd ==C): print "Wo records tound." ) Prrrit” SORRY!!! Nene of he records setised your query” else. tor min d: for ninm: print(n, end="\1') print) dil ch == 2: s = input” Guter your uon-select query: ) cur.ececutd s) conn.commit( ) pri” GONGRATS/// Cuery executed successtully |" ) print” Checkout the records) cur.ececutd" select * trom dector_details' ) p= curhetchalK ) for min p: for nin m: print(n, end ="\t") print) else. print " Swalid Choice//" ) print" COhich type of query you want to execute?’ ) ch = intinputl”" Press 1: For Select query. Press 2: For MDM on -Select query! )) . Tininnninmntensiemananalt 4 ifch == /: 8 = input” enter your select command query." ) cur.ececutds) d = cur-fetchal ) itd =-C): print" Csorry!// none of the records satistied your query") else: for mind: forninm: print(n, end="\t') print) dit ch == 2: " MWD 3 = input" enter your non-select query: \1t cur.ececutds) conn.commit() print | congrats/// query executed successtully |") print(” check out the records" ) cur.executd" select * trom patient _details’ ) p = cur-tetchal ) form inp: for nin m: prints, end=" \ f ) print) else: » def eUdminGhotceuery worker oF print" COhich type of query you want to execute?" ) ch = weCinpul”" Press 1: For Select query Press 2: For Mon-Selec query!’ )) teh == 1: 5 = mat” Enter your Select command Query" ) cur.erecutds) d = curfetcha) itd --C): print” (SORRY! Hone ck the records satished your query") else: for m in d: for nin m: printn, end="\t') print elif ch == 2: 5 = mpat” Enter your nonselect query: ) cur-executds) conn.commit) pri” CONGRATS!!! Query executed successtully \" ) print” Check cut the records' ) curcerecutd" select * trom worker_details" ) p = cur-fetchalk ) for m inp: for nin m: print(n, exd-"t') print o print ) else: print " Gtwalid Choice //") deb User Phere uery: print "| REMEMBERS! You can only execute Select Chery |") 5 = input” Enter your Select command Query 1" ) S= i, ) " — if" select" not in s: print’ " Gwalid query // Try, iPCqain, Give Select query only ") else: curexecutd s) d= cur.fetchalK) itd ==C): print "(SOR RRY/. S/ None ot the records satistied ‘your query") else: tor min d: lor nin m: print n, end=" \t) pri aC ) prindl\t\ aN | | |* Weleome To Hospital Database Management Syston **** | | |\n\x') ch = intCinputl' Press 1+ To login asBMIN\ «Press 2: Fo login as USER \0\0') ch == 1; tha ==" Hespitall23' : print \n\n\t| CWeleomeXdmin : Klere is the Menu nt’) while True print” 1") dni Med) print”\ x") n= ntnput” Eater Your Cheotee:")) itu ==: Doctor_detail) élifn == 2 desc_dectoh) elif == 3: ddd _doctoh) elifn == 4: DisplagUDoctor) elif == 5: Patient__detail() SMdd_Patient dif == 8: DisplagUP: “atient( ) elif == 9: Vorker__details) edit == 10. desc__worker( dif == 11: dd __werker() editu == 12: Displayel MR Oorker ) ditu == 13 orn == 26: SearchDector) ifn == 14 orn == 27: SearhPatient() edit == 15 orn == 28: Searcht0orker( ) elif == 16: update__doctor€ ) eitu == 17: update. __patientl ) edilu == 78+ update__workerC ) edifn == 79: Bill_details) 4 elifn == 20: MdABM) elifn == 21: Show Bill) elifn == 22: delete__record) elitn == 23: RemogUDectord ) elifn == 24: RemoguPr ‘atients ) elifn == 25: Remogdlevorkerd) elifn == 29: SMdnin ChoiceQuery doctor ) elifn == 30: PMdminChoicQuery _ patient ) elifn == 31: Simin ChoicQuery _ worker ) elifn == 32: break else: print" Trwalid password // Login Unsuccesstul." ) dit ch == 2: su = input" Eater Usernames") print’ \a\a\t\t| @eleome" + nm +": Here Js The Meru, while True: pride’ rn" ) User Venu) print’ ND n= intl input " Guter your choice: "DD itn == orn ==7: SearchDector() elif == 2orn == SearcthPationt() elifn == 3 orn == 9: Searchlvorker() elif == 4: DisplagdDoctor ) elifn == 5: DisplagUP atientl ) elifn == 6: DisplagUle Vorker() elifn == 170 orn == 71 orn == 12: UserC hoicéQueryC ) elif n == 713: break else. print " Invalid Choice //") OUTPUT Bien 385: ‘ie_Eat_ Shel Debug Optons Window Hep python 3.8.5 (tags/v3. type “help >>> -§:580fbb0, Jul 20 2020, 15:43:08) [Msc v.1926 32 bit (zntel)] on win32 "copyright", "credits" or "license()" for more information. RESTART: C:\python instal1\hospital_mangement .py IL |##** WELCOME TO HOSPITAL DATABASE MANAGEMENT SYSTEM ****| || To login as ADMIN To login as USER TES — Tee tot Se ting Op Waton Tp Python 3.6.5 (tags/v3.6.5: {B0AHbO, Tul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on wins2| ‘Type help’ “copyright", "credits" or "license()" for more information. RESTART: C:\python install\hospital_mangement.py I||##8% WELCOME TO HOSPITAL DATABASE MANAGEMENT SYSTEM ***#/ || Press 1: To login as ADMIN Press 2: To login as USER a Enter Adin Password : Hospital124 File Edit Shell Debug Options Window Help Se ee eee ee 1 Enter Admin Pasaword : Hospital123 1:Create table doctor details 2:Deacribe doctor_detaile 3:Register Doctor Details 4:Display all Doctor details 5:Create table patient_detaile Describe patient_details 7:Register Patient details 8:Display all patient details 9:Create table worker _details 10:Describe worker_detaile 11:Register Worker details 12:Display all Worker details 13:Search Doctor details 14:Search Patient details 15:Search Worker details 16:Update Doctor details 17:Update Patient details 18:Update Worker details reate table Bill 20:Enter charges of Pateint for Bill_details 21:Show records of Bill 22:Delete records 23:Remove All Doctor 24:Remove All Patient 25:Remove All Worker 26:Display detaile of a particular Doctor 27:Display details of a particular Patient 28:Dispaly details of a particular Worker 29:Run Query of your choice on doctor_details table 30:Run Query of your choice on patient_details table 31:Run Query of your choice on worker_details table 32:Exit Enter Your Choice: Python 385 Fie Edt Shell Debug Options Window Help Type "help", "copyright", "credits" or "license()" for more information. >> RESTART: C:\python install\hospital_mangement.py || |**** WELCOME TO HOSPITAL DATABASE MANAGEMENT SYSTEM *#**| || Press 1: To login as ADMIN Press 2: To login as USER 2 Enter Username: PRATEEK SINGH | WELCOME PRATEEK SINGH : HERE IS THE MENU | :Display details of a particular Doctor splay details of a particular Patient ispaly details of a particular Worker splay All Doctor details splay All Patient details :Display All Worker details 7:Search Doctors details 8:Search Patients details 9:Search Workers details 10:Run Query of your choice on doctor details table 11:Run Query of your choice on patient details table 12:Run Query of your choice on worker details table TO CREATE DOCTOR’S TABLE (2 "pions ste 1 30:Run Query of ¥% o details table | 31:Run Query of your | 32:mit rr Enter Your Choice: 1 unit Sable Created Sotosssfully non {BS MySQL 5.7 Command Line Client Serer errr ql> show tables; erator nme ee Cet oen Ce eee PE ME aero TO DECRIBE DOCTOR TABLE Le "Python 3.85 She fi Shell ' Enter Your Choice: 2 Structure of doctor details table ('d_id', ‘int(11)', "No', 'PRI', None, '') ('d_name', 'varchar(30)', 'YES', '', None, '') (d_age', ‘int(11)', 'YES', '', None, '") (‘digender', 'varchar(10)', 'YES', '', None, '') (‘d_department', 'varchar(20)', 'YES', '', None, 'd_post', 'varchar(30)', 'YES', '', None, '') ('dphone', 'int(11)', 'YES', '', None, '') TO ADD NEW DOCTOR (ee Enter Your Choice: 3 Enter New Doctor Information Enter ID of Doctor : 104 Enter Doctor Name : Sanna Iqbal Enter Age : 20 Enter Gender (F or M) :F Enter the Department : Anesthetics Enter the Post : Anesthesiologists Enter Phone Nunber : 7007255185 seceseres:T1TTTLLE rit: Registered New Doctor :rissss::::IHIIIII= | (m1 myS0U 5.7 Command Line Client Seen ere — Perret a t Cardiology Perens Pera r Sra Neurology coat raeeterie pr a 5 ears i ete eee re eee ee sy TO DISPLAY ALL DOCTOR DETAILS #IN ASCENDING ORDER ce a File_Eat Shel Debug Optins Window Help Enter Your Choice: 4 In which ordar you want to display the doctor details 1: Ascending order 2: Descending order 3: As present in table 3 101 Prateek singh Cardiology cardilogist 9120074694 102 Vana Patina Neurology Neurologist 9612354865 103. riya singh evr ENT Specialist 9120069548 104 Sama Iqbal Anesthetics _Anesthesiologists 7007255185 TO CREATE PATIENT’S TABLE a i SELUUT itt: Table Created Successfully srrirssssestIIIU[Ls5 1 MySQL 5.7 Command Line Client Cate es 1 patient_details 2 rows in set (8.82 sec? TO DESCRIBE PATIENT TABLE Python 3.85 Shell File Edit Shell Debug Options Window Help Enter Your Choice: 6 Structure of patient_details table (p_id', 'int(11)', 'No", 'PRI', None, '') ("p_mame', 'varchar(30)', 'YES', '', None, '') ("p_age', ‘int(11)', 'YES', '', None, '') (‘p_gender', 'varchar(10)', 'YES', '', None, '') (‘p_problems', ‘varchar(20)', 'YES', '', None, * (p_phone', 'bigint(11)', 'YES', '', None, '') TO ADD NEW PATIENT Sn a Te Edt_Shel_Detug Options Window Hep Enter Your choice: 7 Enter 1D of Patient : 203 Enter Patient Nano; Rahul sharma Enter Gender (F or M) : M enter the Problens: Tuberculosis Enter Phone Nunber : 9125478625 THT Registered New Patient Hn {8 MjSQL 5.7 Command Line Client eS SCE p_nane Pee ec eee rr eRe mT Paes) merry a ehieered rset tes ios CEeemem ees pera ee TO DIPLAY ALL PATIENT DETAILS Lot | Fie tat Shell Debug Options Window Help Enter Your Choice: 8 In which order you want to display the patient details 1: Ascending order 2: Descending order 3: As present in table 3 201 202 203 Vikas singh Vishal Verma Rahul sharma Swelling Diabetes Tuberculosis 6306302265 6951235452 9125478625 TO CREATE WORKER’S DETAIL ie Fle Edt Shel Debug Options Window Help Enter Your Choice: 9 HTL [[[::zszizit: Gable Created Successfully s:::i:zzt:tIMMII Let: EEE _MySQL 5.7 Command Line Client Pel Dees me ause re Cece reees patient_details Pryor ees TO CREATE WORKER'S DETAIL Enter Your Choice: 10 Structure of worker details table ("wid', 'int(11)', "No', 'PRI', None, '') ("womame', ‘varchar(30)', 'YES', '', None, '') ('w_age', ‘int(11)', 'YES', '', None, '') (‘w_gender', ‘varchar(10)', 'YES', '', None, d (‘wworkname', ‘varchar(20)', 'YES', '', None, '') ('wphone', 'bigint(11)', 'YES', '', None, '') TO ADD NEW WORKER ee Fle Edt Shell Debug Options Window Help Enter Your Choice: 11 Enter New Worker Information : Enter ID of Worker : 303 Enter Worker Name : Abhishek Verma Enter Age : 23 Enter Gender (F or M) : M Enter type of Work : Ward Clerk Enter Phone Number : 94524645386 z SSTEPLEDL: Registered New Worker ities TOE oo ere fern Seen) rae oe Coenen aay E ores ora) Preece ac eee TO DISPLAY ALL WORKER DETAILS #IN DESCENDING ORDER File Eat Shel Debug Options Window Help Enter Your Choice: 12 In which order you ant to display the worker details 1: Ascending order . 2: Descending order 3: As present in table 2 Enter column nane with respect to which you want to order the records : Wage si mt Assistants 6306012268 ~ 302 Mayank Yadu 230M Porters 9156325695 303° abhishek Verma 230M Ward Clerk 9452464586 SEARCH DOCTOR’S DETAIL (A Python 385! fFile| Edit Shell Debug Options Window Help Enter Your Choice: 13 Enter the ID of Doctor to be searched : 101 101 Prateek Singh 27 M Cardiology Cardiologist 9120074694 SEARCH PATIENT’S DETAIL L@ “Python 3.85 File Edit Shell Debug Options Window Help Enter Your Choice: 14 Enter the ID of Patient to be searched : 202 202 Vishal Verma 18 M Diabetes 6951235452 SEARCH WORKER’S DETAIL £g "Python 385 Shel File Edit Shell Debug Options Window Help Enter Your Choice: 15 Enter the ID of worker to be searched : 302 302 Mayank Yaduv 23 M Porters 9456325695 UPDATE DOCTOR’S DETAIL ae Fie Edt Shell Debug Options Window Help Enter Your Choice: 16 Enter the Doctor's ID to be modified : 102 Enter column name whose value you want to change : D_name Enter the new value : Uzma Fatima Enter Y to update values more : y Enter the Doctor's ID to be modified : 102 Enter column name whose value you want to change : d gender Enter the new value : P Enter ¥ to update values more : y Enter the Doctor's ID to be modified : 102 Enter column name whose value you want to change : dage Enter the new value : 21 Enter ¥ to update values more : n PUML | [:ecerecc:: Details updated sssrresrres HLL BEFORE {MySQL 57 Command Line Client bs re for oe ee str) Stasi er eC rey UPDATE PATIENT’S DETAIL [3 Python 38.5 Shei File Edit Shell Debug Options Window Help 1 p_name Akhand Singh BEFORE EH MySQL 5:7 Command Line Client ce Seen Peernt Perverted heieres Pcieeeiet es Tubereul 9128478625 AFTER [BB MySQL 5.7 Command Line Client reread eros ee Stent PERS Mera reread Penn eeene ia Tuberculosis TO ADD NEW BILL oe TT Fle Edt Shell Debug Options Window Help Enter Your Choice: 20 Enter Charges of patient in the bill Enter ID of Patient : 102 Enter Patient Nane : Saurabh Singh Enter Patient age : 26 Enter fee of Dr's visites : 450 Enter the cost of medicines : 692 Enter Room charges : 1600 ut + BILL Created Successfully Hu TO DISPLAY ALL BILL RECORDS ee aT File Edit Shell Debug Options Window Help Enter Your Choice: 21 ALL Records of Bill 201 Amit Yaduv 25 600 800 2000 201 Amit Yaduv 20 600 900 2000 102 Saurabh Singh 26 450 692 1600 CHOICE QUERY (2 “Python 3.85 She Edit Shell Debug Options Window Help Enter Your Choice: 29 Which type of query you want to execute ? Press 1 : For Select query Press 2 : For Non-Select query 1 Enter your Select command Query Select d_name,d_ post’ from doctor_details; Prateek Singh | Gardiologist Uzma Fatima Neurologist Priya Singh ENT Specialist Samna Iqbal Anesthesiologists [2 "Python 385 Shai! File Edit Shell Debug Options Window Help Enter Your Choice: 30 Which type of query you want to execute ? Press 1 : For Select query Press 2 : For Non-Select query 1 Enter your Select command Query Select p id,p name,p age from patient details where p_age>20; 201 vikas Singh 22 203 Akhand Singh 26 Pe ee EE Enter Your Choice: 31 Which type of query you want to execute ? Press 1 : For Select query Press 2 : For Non-Select query 1 Enter your Select command Query select w_name,w_age,w_gender from worker_details; Amit Singh 33 M Mayank Yaduy = 23 M Abhishek Verma 23 M BIBLOIGRAPHY > SUMITA ARORA CLASS 12™ > WEBSITE: http://www.google.co.in http://www.wikipedia.com

You might also like