Skip to content

Commit

Permalink
Project done
Browse files Browse the repository at this point in the history
  • Loading branch information
immo2n committed Jun 7, 2024
1 parent 5c07570 commit 2bd453d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 34 deletions.
5 changes: 3 additions & 2 deletions data/Patients.db
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
2=Moon·23·017237489·Dinajpur, BD·Cough·Dr. Bilas·25/05/2024
totalPatients=1
1=Moon·23·01317215403·Savar, Dhaka·Headache·Dr. Bilas·07/06/2024
2=Anik·24·01637256789·Savar, Dhaka·Migrane pain·Dr. Bilas·07/06/2024
totalPatients=2
24 changes: 1 addition & 23 deletions data/manual.db
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
AppState=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/AppState.db
AppState=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/AppState.db
AppState=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/AppState.db
AppState=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/AppState.db
AppState=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/AppState.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Expand Down Expand Up @@ -64,3 +41,4 @@ Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
manual=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/manual.db
Patients=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/Patients.db
AppState=C:\Users\DELL\OneDrive\Desktop\Capstone Project/data/AppState.db
25 changes: 16 additions & 9 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ void renderMain(int selected)
system("cls");
printColoredBold(ANSI_COLOR_GREEN, "\t\t\t\tWELCOME TO HOSPITAL MANAGEMENT\n\n");
printColored(ANSI_COLOR_CYAN, "\t\t\t\t Select an option to continue\n\n\n");
printf("\t\t\t *** Patient's Options ***\n");
(selected == 1) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => View doctors\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> View doctors\n");
(selected == 2) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => Search your record\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> Search your record\n");
printf("\t\t\t *** Doctor's Options ***\n");
(selected == 3) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => View appointments\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> View appointments\n");
printf("\t\t\t *** Admin Options ***\n");
(selected == 4) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => Login as Admin\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> Login as Admin\n");
(selected == 5) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => Exit App\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> Exit App\n");
printf("\t\t\t *** Patient's Options ***\n");
(selected == 1) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => View doctors\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> View doctors\n");
(selected == 2) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => Search your record\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> Search your record\n");
printf("\t\t\t *** Doctor's Options ***\n");
(selected == 3) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => View appointments\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> View appointments\n");
printf("\t\t\t *** Admin Options ***\n");
(selected == 4) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => Login as Admin\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> Login as Admin\n");
(selected == 5) ? printColoredBold(ANSI_COLOR_YELLOW, "\t\t\t => Exit App\n") : printColored(ANSI_COLOR_MAGENTA, "\t\t\t -> Exit App\n");
}

int main()
Expand Down Expand Up @@ -59,13 +59,20 @@ int main()
{
case 1:
// View doctors

viewPatients(NULL);
break;
case 2:
// Search patient with id
printColoredBold(ANSI_COLOR_GREEN, "Enter any details to search: ");
char key[100];
scanf("%s", key);
viewPatients(key);
break;
case 3:
// Search patient with doctor
printColoredBold(ANSI_COLOR_GREEN, "Enter a doctor's name: ");
scanf("%s", key);
viewPatients(key);
break;
case 4:
if (auth(1))
Expand Down
Binary file modified run.exe
Binary file not shown.

0 comments on commit 2bd453d

Please sign in to comment.