Doctor Appointment (Application Programming)
Doctor Appointment (Application Programming)
0
Table of Contents
Abstract………………………………….. 1
INTRODUCTION…………………………………… 2
IMPLEMENTATION…………………… 3-9
Codes……………………………………………… 11-15
INTRODUCTION
If anybody is ill and wants to visit a doctor for checkup, he or she needs to visit
the hospital and waits until the doctor is available. The patient also waits in a
queue while getting appointment. If the doctor cancels the appointment for
some emergency reasons then the patient is not able to know about the
cancelation of the appointment unless or until he or she visits the hospital. As
the mobile communication technology is developing rapidly, therefore, one can
use the mobile’s applications to overcome such problems and inconvenience for
the patients. There is much work in the literature in this regard . An intelligent
agent based appointment system has been proposed in which a scheduling
system is provided for patients. The junior medical staff schedules appointment
according to the priority level. Suggested an Android application that is used to
remind the patients of their dosage timings through Alarm Ringing system so
that they can stay fit and healthy. Searching doctors and hospitals alongwith
navigation details are also available in the app so they can get proper treatment
on time. Suggested an android based appointment management system which
uses application programming interfaces (APIs) from Google map and calendar.
This appointment based application can be used with other appointment based
systems. The mobile application accepts appointments by saving the record of
the appointment on the phone calendar which is synchronized with the Google
calendar. The user gets an alert based on preset specified time before the
appointment time and date.
Service and the system. Before reasoning user’s disease history is retrieved
from Personal Health Record (PHR) and passed as an input to reasoning
service. Mainly the input contains User’s information, disease history,
Knowledge base (symptoms) and output of reasoning service. described an
android smart phones and tablets application that is freely downloadable from
Google play store and it provides various functionalities including personnel
medical records, to trace position of actual user in real-time. Routing algorithm
is used to find minimum distance for destination building. Another study
consists of an online database for the monitoring of patient with artificial heart.
This database consists of monitoring terminal that is portable and keeps
continuous record of a patient including history. There are other studies which
involve handheld healthcare and efficient algorithms for appointment
scheduling including self-inspection.
The second module is the admin module that is designed on the website. The
admin views all details of doctors and all appointments by the admin. The
admin can add doctor, view patient’s details and doctor’s details and can view
appointments also. All the doctors of the specific clinic are registered by the
admin. Doctors cannot register themselves.
IMPLEMENTATION
The user will firstly download the application and install it in their mobile
devices. Figure 1 shows the block diagram of the application. Once installed,
this application will remain into the device permanently until the user deletes it
or uninstalls it. After the installation when the user clicks on the app icon, the
first thing that will appear on the screen is splash screen that contains the
application’s logo as shown below
And if email is not valid then the user cannot register itself and a notification
will be displayed that “email is not valid” as shown below
The patient has to use this username and password for logging into the app for
each time usage. For signing in the user has to provide the registered username
and password otherwise if the user enters such a username or password that is
not registered then the user will get a notification message that “Signin failed
check your connection or contact support” as shown below
After logging in, the menu screen is displayed containing different option like
hospitals, doctors, health schedules, about and sign out as shown below
Patient can contact to the hospital by making a call by clicking on the hospital
phone number as shown below
Patient can contact the doctor by making a call by clicking on the doctor’s phone
number or patient can also sends an email by clicking on the doctor’s email as
shown below
Figure 13: The user sending email to doc 1 Figure 14: The user calling the doctor
1
by clicking in the book appointment button, a calendar and different available
time slots are displayed on the screen. The patient has to send a request for
appointment by selecting a day or time. The central database gets updated
accordingly. The user will get notification message of “successfully added” if
the appointment is successfully registered in the database as shown below
/*
Author: https://www.cppbuzz.com
Date: 20th Jan 2018
For more projects please visit : https://www.cppbuzz.com
*/
#include <iostream>
#include <string>
#include <fstream>
#include <cstring>
int bookAppointment()
{
system("cls");
int hoursbook = 8;
if(read)
{
string line;
char key = 'A';
int i = 9;
while(getline(read, line)) {
char temp = line[0];
int index = (temp - 65);
arr[index]=1;
recordFound = 1;
}
if(recordFound == 1)
{
cout<<"\n Appointment Summary by hours:";
char key = 'A';
int hours = 9;
for(int i = 0; i<=12; i++)
{
if(i == 0){
if(arr[i] == 0)
cout<<"\n "<<key<<"-> 0"<<hours<<" - Available";
else
cout<<"\n "<<key<<"-> 0"<<hours<<" - Booked";
}
else
{
if(arr[i] == 0)
cout<<"\n "<<key<<"->"<<hours<<" - Available";
else
cout<<"\n "<<key<<"->"<<hours<<" - Booked";
}
hours++; key++;
}
read.close();
}
if(recordFound == 0){
cout<<"\n Appointment Available for following hours :";
char key = 'A';
for(int i = 9; i<=21; i++)
{
if(i==9)
cout<<"\n "<<key<<" -> 0"<<i<<" - Available";
else
cout<<"\n "<<key<<" -> "<<i<<" - Available";
key++;
}
char choice;
cout<<"\n\n Input your choice : ";
cin>>choice;
if(isBooked ==1)
{
cout<<"\n Error : Appointment is already booked for this Hour";
cout<<"\n Please select different time !!";
cout<<"\n Press any key to continue!!";
getchar();getchar();
system("cls");
bookAppointment();
}
string name;
cout<<"\n Enter your first name:";
cin>>name;
ofstream out;
out.open("appointment.dat", ios::app);
if(out){
out<<choice<<":"<<name.c_str()<<"\n";
out.close();
cout<<"\n Appointment booked for Hours : "<< (choice-65) + 9
<<" successfully !!";
}
else
{
cout<<"\n Error while saving booking";
}
int existingAppointment()
{
system("cls");
cout<<"\n ----- Appointments Summary ---- \n";
//check if record already exist..
ifstream read;
read.open("appointment.dat");
int hoursbook = 8;
if(read)
{
string line;
char key = 'A';
int i = 9;
while(getline(read, line)) {
char temp = line[0];
int index = (temp - 65);
arr[index]=1;
recordFound = 1;
}
if(recordFound == 1)
{
cout<<"\n Appointment Summary by hours:";
char key = 'A';
int hours = 9;
for(int i = 0; i<=12; i++)
{
if(arr[i] == 0)
cout<<"\n "<<key<<"->"<<hours<<" - Available";
else
cout<<"\n "<<key<<"->"<<hours<<" - Booked";
hours++; key++;
}
read.close();
}
else
{
char key = 'A';
for(int i = 9; i<=21; i++)
{
if(i==9)
cout<<"\n "<<key<<" -> 0"<<i<<" - Available";
else
cout<<"\n "<<key<<" -> "<<i<<" - Available";
key++;
}
}
switch(choice)
{
case 1: bookAppointment(); break;
case 2: existingAppointment(); break;
case 0:
while(1)
{
system("cls");
cout<<"\n Are you sure, you want to exit?
y | n \n";
char ex;
cin>>ex;
if(ex == 'y' || ex == 'Y')
exit(0);
else if(ex == 'n' || ex == 'N')
{
break;
}
else{
cout<<"\n Invalid choice !!!";
getchar();
}
} break;
}
return 0;
}