0% found this document useful (0 votes)
9 views

Algorithm 1

The document outlines the steps of a health management system algorithm. It involves 6 main steps - doctors details, patients details, hospital staff details, appointment details, medical details, and exit. Each step allows the user to view, add, update or delete records from text files for doctors, patients, staff or appointments through selection of choices from the main menu. The algorithm uses conditional statements to open relevant text files and perform the chosen action before returning to the main menu.

Uploaded by

SATVIK VATS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Algorithm 1

The document outlines the steps of a health management system algorithm. It involves 6 main steps - doctors details, patients details, hospital staff details, appointment details, medical details, and exit. Each step allows the user to view, add, update or delete records from text files for doctors, patients, staff or appointments through selection of choices from the main menu. The algorithm uses conditional statements to open relevant text files and perform the chosen action before returning to the main menu.

Uploaded by

SATVIK VATS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

ALGORITHM

Step 1 :Start
Print 'Health Mangement System'
Read Username , password
if password=yes then
print 'Main menu'

Step 2:
2.1 :Doctors Details
2.2: Patients Details
2.3: Hospital Details
2.4: Appointment Details
2.5: Medical Details
2.6: Exit

Step 3: Print 'Enter user choice '


Read choice
if choice =1 then
open doctors_details.txt
while True repeat 3.1 to 3.5 u ntil condition is true
Step 3.1: Read user choice
Read did, dname, age, phone no.,dept,address,quali
Step3.2: Read user choice
Print 'doctors_details.txt'
Step3.3: Read user choice
Print 'Enter doctor ID'
Read id
if ac=y
print'Record belong in a table'
Step 3.4: Read user choice
Print 'Enter doctor Id'
Read id
if ac=y
print 'Record deleted successfully'
Step 3.5: Read user choice
Print 'Enter doctor Id'
Read id
if ac=y
Print ‘new name'
Print ‘New phone no.'
Print ‘New address'
Print 'Record updated successfully'

Step4 :Print 'Enter user choice'


Read choice
if choice =2 then
open patient_details.txt
while True repeat Step 4.1 to 4.5 until condition is true
Step 4.1: Read user choice
Read pip,pname,age,phno,disease,address,doc
Step 4.2: Read user choice
Print 'patient_details.txt'
Step 4.3: Read user choice
Print 'Enter patient ID'
Read id
if ac=y
print 'Record belong in a table'
Step 4.4: Read user choice
Print 'Enter user choice '
Read id
if ac=y
print 'Record deleted successfully'
Step 4.5: Read user choice
Print 'Enter user choice'
Read id
if ac=y
print 'new name'
print 'new phone no'
print 'new address'
print 'Record updated successfully'
Step 5 : Print 'Enter user choice'
Read choice
if choice =3 then
open staff_details.txt
while True repeat step 5.1 to 5.5 until condition is true
Step 5.1: Read user choice
Read sid, sname, age, phno, address, sal
Step 5.2: Read user choice
Print istaff_details.txt'
Step 5.3: Read user choice
Print 'Enter staff ID'
Read id
if ac=y
print 'Record belong in a table '
Step 5.4: Read user choice
Print 'Enter staff ID'
Read id
if ac=y
print 'Record deleted sucessfully'
Step 5.5 : Read user choice
Print 'Enter staff ID'
Read ID
If ac=y
print 'new name'
print 'new phone no.'
print 'new salary
print 'new salary'
print 'Record updated successfully'
Step 6: Print 'Enter user choice'
Read choice
if choice =4 then
open appointment.txt
while True repeat step 6.1 to 6.5 until condition is true
Step 6.1: Read user choice
Read ano, pname ,age ,phn no , disease,address,doc,date,time
Step 6.2: Read user choice
Print 'appointment.txt'
Step 6.3: Read user choice
Print 'Enter appointment no,'
Read ano
if ac=y
print 'Record belong in a table'
Step 6.4: Read user choice
Print 'Enter appointment no.'
Read ano
if ac=y
print 'Record deleted successfully'
Step 6.5: Read user choice
Print 'Enter appointment no
Read id
if ac=y
print ‘new name’
print ‘new phone no'
print 'new address'

You might also like