diff --git a/data/Patients.db b/data/Patients.db index 5ab0c48..17f45e6 100644 --- a/data/Patients.db +++ b/data/Patients.db @@ -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 diff --git a/data/manual.db b/data/manual.db index f10c4f2..6348f55 100644 --- a/data/manual.db +++ b/data/manual.db @@ -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 @@ -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 diff --git a/main.c b/main.c index 887bd7a..a93dbcf 100644 --- a/main.c +++ b/main.c @@ -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() @@ -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)) diff --git a/run.exe b/run.exe index e445541..a474e50 100644 Binary files a/run.exe and b/run.exe differ