Diabetes Detection System
Diabetes Detection System
A PROJECT REPORT
ON
SUBMITED TO
1. Mahadev Sakhare
2.Laxmi Gujar
3.Sanket Sutar
4. Tejas Suryavanshi
CERTIFICATE
CERTIFICATE
CERTIFICATE
CERTIFICATE
Sr. Page
Topic Name
No. Number
1 Introduction 10
2 Project objective 11
3 Exesisting system proposed system 12
4 System Analysis 13 – 14
5 Flowhart 15
6 Requirements 16
7 Source Code 17 – 27
8 Source Code Processed Output 28 – 30
9 Output 31
10 Future purpose & project plan 32
11 Initial Investigation 33
12 Advantages & Disadvantages 34
13 Conclusion 35
.
INTRODUCTION
On running the program the user will be asked to fill in some details to
get the correct output. At first details like 'Name', 'Age', 'Weight',
'Height', 'Sex' details have to filled. After filling in these details now the
user will be redirected to fill Medical Diagnosis Form like the 'Appetite,
'Frequency of Thirst', 'Frequency of Urination', 'Vision', 'Urine Sugar',
'Ketonurea', 'Fasting Blood Sugar', 'RBS', 'Family History of Diabetics',
'OGTT'. Using these details the Predicted analysis of whether a person is
diabetic or not is shown. For knowing the further stage of diabetes the
user has to proceed to fill another form and after this form, the stage of
diabetes is shown. And if the user does not want to know the stage he or
she can simply click the alphabet 'N' to exit.
PROJECT OBJECTIVE
If you are facing with any kind of disease or infection and knowing about these
disease on time will help you to get cure and take precautions on time. This
process will also help to get over from these suffering in few days or in months.
Among several diseases and sufferings, many peoples are suffering from diabetes.
With this computer based diabetes detection software, user will able to do their
self-checkup without taking help of a doctor. This system will keep records of
particular patient or of any person and by using their general data collected during
analysis process it will able to tell you, whether you are suffering from diabetes or
not. Apart from these, based on your collected data, it will also provide suggestion
and general precautions which is to be taken by you in order to improve your
health. This system having the ability to detect diabetes and categories as per the
data which has been collected during questions answer section. Its user friendly
graphical mode will make its user to use this system in interactive manner. You
will have to just answer few questions and these questions has been divided into
two section. Upon completion of these questions you will able to get your final
result and your health status regarding diabetes. To keep records, you will required
to ask your basic information and using these information, your final report will be
prepared by keeping view of answer which has been provided by you. Number of
options will be given in answer section and you have to select whatever suits you
the best.
Existing System
As per the existing system, users have to invest money before knowing their
diagnosis report. They have to visit diagnostic center, consult their doctor and wait
for a day to get their result. If someone have only doubt and want to have a
checkup, then it will have their wastage of money and time for them. Each time
you have to provide your basic information and go through the same diagnosis
process to get your diagnosis result which can be dangerous in some serious
condition. Patients should go through the checkup process immediately before the
diagnosis process, if such condition arises. So keeping customer records and
searching their records manually sometimes not possible and sometime it’s a time
taking process.
Proposed System:
All your previous and new records will be saved using the concept of file and
directory. Binary search operation will be performed while searching your record
and you will also able to get your previous diagnosis report while using this
system. This system will able to identify your sufferings related to diabetes and
store into the file with your record id. Each patient will have particular record id
and while searching, patient can differentiated between their details and others by
selecting their date of birth and address details.
SYSTEM ANALYSIS
WORKING :-
This program supports two different programming paradigms: rule based, object-
oriented. In rule-based programming, it allows knowledge to be represented as
heuristics, or “rules of thumb”, which specify a set of actions to be performed for a
given situation. Object-oriented programming allows complex systems to be
modeled as modular components. These modules could be easily in other
components & programs.
This program is designed to detect the diabetes in patients using their complete
information and by looking at the symptoms.
In this section of the diabetes detection, the system prompts the user to enter
information about the patient. Patient information includes name, age, sex &
family history of diabetes. Next, diabetes program presents the nurse with
yes/no (or y/n ) question. As each question is answered, another question is
displayed. The questions presented are similar to the question that Doctor
would ask a patient during a normal visit to a medical office.
Firstly, we have to enter the complete information about particular person i.e.,
Name, age, weight, height, sex. Then, for detecting the diabetes in that person we
have to keep a look at the symptoms of the diabetes according to the level of the
diabetes i.e., level 1, level 2 or level 3. For detecting the diabetes we should have
the complete information about the patient, which should be accurate. The working
of this program consists of the following conditions:
Enter the name, age, weight, height and sex (M/F) of the person whose
diabetes is to be detected.
Then, fill the medical diagnosis form which includes the following
information:
Appetite
Frequency of thirst
Frequency of Urination
Vision
Urine sugar
Ketonurea
Fasting blood sugar
R.B.S.
Family history of diabetes
After proceeding from level 1’s symptoms we should have a look at level 2’s
symptoms, which are:
Pancreatitis (P/A)
Carcinoma (P/A)
Cirrhosis (P/A)
HCTS (H/L/N)
Hepatitis (P/A)
Hormonal disorder (P/A)
Pancreatectomy (P/A)
Hardware requirements:
PC with 2 GB hard-disk
For Linux:
GNU gcc: 4.0 upto 4.3.2
For Windows:
Microsoft Visual Studio.NET 2005
SP1 with all security updates
Microsoft Visual Studio.NET 2008
SP1**
Microsoft Visual Studio.NET 2010
256 MB RAM
SVGA color monitor
Software requirements:
Windows 95/98/XP/7.
MS-office 2007
Turbo C++ 3.0
Intel Pentium, 100 MHz processor
or higher
Source code :-
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<dos.h>
#include<graphics.h>
#include<process.h>
class diabetes
{
private:
char name[40];
float age;
int wt;
float ht;
char sex;
char *s;
public:
void welcome_screen(void);
void getvalue(void);
void getlevel1_symptoms(void);
void getlevel2_symptoms(void);
void getlevel3_symptoms(void);
int analyse_symptoms(int);
char display_message(int,int);
};
void main()
{
char ch,choice,cho;
//int m,n=2;
float m;
int n=1;
void diagnosis(void);
diabetes dts;
dts.welcome_screen();
dts.getvalue();
diagnosis();
dts.getlevel1_symptoms();
m=dts.analyse_symptoms(n);
choice=dts.display_message(m,n);
choice=toupper(choice);
if(choice=='Y')
{
++n;
dts.getlevel2_symptoms();
m=dts.analyse_symptoms(n);
choice=dts.display_message(n,m);
choice=toupper(choice);
if(choice=='Y')
{
++n;
dts.getlevel3_symptoms();
m=dts.analyse_symptoms(n);
cho=dts.display_message(n,m);
cho=toupper(cho);
if(cho=='Y')
{
++n;
dts.getlevel3_symptoms();
m=dts.analyse_symptoms(n);
choice=dts.display_message(m,n);
}
}
}
}
void diabetes::welcome_screen()
{
clrscr();
gotoxy(23,7);
textcolor(YELLOW);
cputs("********* W E L C O M E ********* " );
gotoxy(29,9);
cputs("RITP POLYTECHNIC PUNE" );
gotoxy(26,12);
cputs(" DIABETIES DITECTION SYSTEM ");
textcolor(WHITE);
for(int x=50;x>=22;x--)
{
sound(2000);
delay(120);
nosound();
gotoxy(x,14);
cputs("D O N E B Y : ");
gotoxy(x,16);
cputs("Mahadev Sakhare,Laxmi Gujar,Sanket Sutar,Tejas Suryavanshi ");
gotoxy(43,18);
}
gotoxy(17,25);
cputs("********** PRESS ANY KEY TO CONTINUE ********* ");
getch();
return;
}
void diabetes::getvalue()
{
clrscr();
textcolor(WHITE);
gotoxy(20,8);
cputs(" P E R S O N A L I N F O R M A T I O N");
gotoxy(25,10);
cputs("N A M E : ");
gotoxy(25,12);
cputs("A G E : ");
gotoxy(25,14);
cputs("W E I G H T : ");
gotoxy(25,16);
cputs("H E I G H T : ");
gotoxy(25,18);
cputs("S E X (M/F): ");
textcolor(WHITE);
gotoxy(42,10);
gets(name);
gotoxy(42,12);
cin>>age;
gotoxy(42,14);
cin>>wt;
gotoxy(42,16);
cin>>ht;
gotoxy(42,18);
cin>>sex;
getch();
return;
}
void diagnosis(void)
{
clrscr();
textcolor(WHITE);
gotoxy(20,5);
cputs(" ** D I A G N O S I S W I N D O W ** ");
cout<<"\n\n\n";
cputs(" Let's have alook at symptoms.........");
cout<<"\n\n\n";
cputs(" Please enter the form in next page .");
cout<<"\n\n\n\n\n\n\t\t\t ";
textcolor(YELLOW);
cputs("***** PRESS ANY KEY ***** ");
getch();
}
void diabetes::getlevel1_symptoms(void)
{
clrscr();
int i=0;
gotoxy(23,3);
textcolor(WHITE);
cputs( " *** MEDICAL DIAGONOSIS FORM *** ");
gotoxy( 3,6);
cputs("APPETITE (H(HIGH),/L(LOW),/N(NORMAL):") ;
gotoxy(64,6);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,8);
cputs("FREQUENCY OF THIRST(H(HIGH),/L(LOW)/N(NORMAL):");
gotoxy(64,8);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,10);
cputs("FREQUENCY OF
URINATION(H(HIGH),/L(LOW),/N(NORMAL):");
gotoxy(64,10);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,12);
cputs("VISION (I(IMPAIRMENT),/N(NORMAL)");
gotoxy(64,12);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,14);
cputs("URINE SUGAR(P(PASSIVE)/A(ACTIVE);");
gotoxy(64,14);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,16);
cputs("KETONUREA(P(PASSIVE)/A(ACTIVE)");
gotoxy(64,16);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,18);
cputs("FASTING BLOOD SUGAR(H(HIGH)/L(LOW)/N(NOMAL)");
gotoxy(64,18);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,20);
cputs("R B S (H(HIGH)/L(LOW)/N(NORMAL)");
gotoxy(64,20);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,22);
cputs("FAMILY HISTORY OF DIABETES(P(PASSIVE)/A(ACTIVE)");
gotoxy(64,22);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
gotoxy(3,24);
cputs("OGTT(D/N)");
gotoxy(64,24);
cin>>s[i];
s[i]=toupper(s[i]);
++i;
}
int diabetes::analyse_symptoms(int n)
{
int i=0;
int count=0;
int result=0;
switch(n)
{
case 1: if(s[9]=='D' )
result=-1;
else
if(s[5]=='P'&& s[6]=='P' && s[7]=='H')
result=-1;
else
{
for(i=0;i<10;i++)
{
if(s[i]=='H'||s[i]=='P'||s[i]=='D'||s[i]=='I')
count++;
}
if(count>5)
result=-1; }
break;
case 2:
if((s[0]=='P')||(s[1]=='P')||(s[2]=='P')||(s[3]=='H')||(s[4]=='P')||(s[5]=='P')||(s[6]==
'P'))
result=-1;
else
result=0;
break;
case 3:
if((s[0]=='Y')&&(s[1]=='N')&&(s[2]=='W')&&(s[3]=='P')&&(s[4]=='P')||
(s[0]=='Y')&&(s[1]=='B')&&(s[2]=='W')&&(s[3]=='P')&&(s[4]=='P')||
(s[0]=='Y')&&(s[1]=='N')&&(s[2]=='M')&&(s[3]=='P')&&(s[4]=='P')||
(s[0]=='Y')&&(s[1]=='N')&&(s[2]=='Y')&&(s[3]=='P')&&(s[4]=='P'))
result=0;
else
result=-1;
break;
default:break;
}
return(result);
}
{
char ch;
clrscr();
switch(n)
{
case 1:
switch(m);
{
case 0: gotoxy(30,12);
cputs("THE PERSON IS NOT DIABETIC");
gotoxy(50,20);
cputs("PRESS ANY KEY TO QUIT." );
// gotoxy(70,20);
//cin>>ch;
//break;
exit(0);
case -1:
gotoxy(30,20);
cputs("THE PERSON IS DIABETIC ");
gotoxy(54,20);
cputs("PROCEED (Y/N) ?");
gotoxy(70,20);
cin>>ch;
break;
// default: break;
}
case 2:
switch(m)
{
case 0: gotoxy(30,12);
cputs("IT IS PRIMARY DIABETES.");
gotoxy(50,25);
cputs("Proceed(Y/N)?");
gotoxy(70,25);
cin>>ch;
break;
}
break;
case 3:switch(m)
{
case 0: gotoxy(30,12);
cputs(" IT IS INSULIN DEPENDENT DIABETES");
gotoxy(50,25);
cputs("press any key to quit");
getch();
break;
// default: break;
// break ;
// default : break;
}
return (ch);
}
void diabetes::getlevel2_symptoms()
{
clrscr();
int j=0;
gotoxy(20,8);
cputs("PANCREATITIS(P/A) :");
gotoxy(60,8);
cin>>s[j];
s[j]=toupper(s[j]);
j++;
gotoxy(20,10);
cputs("CARCINOMA(P/A) :");
gotoxy(60,10);
cin>>s[j];
s[j]=toupper(s[j]);
++j;
gotoxy(20,12);
cputs("CIRHHOSIS(P/A) :");
gotoxy(60,12);
cin>>s[j];
s[j]=toupper(s[j]);
++j;
gotoxy(20,14);
cputs(" HCTS (H/L/N) :");
gotoxy(60,14);
cin>>s[j];
s[j]=toupper(s[j]);
++j;
gotoxy(20,16);
cputs("HEPATITIS(P/A) :");
gotoxy(60,16);
cin>>s[j];
s[j]=toupper(s[j]);
++j;
gotoxy(20,18);
cputs(" HORMONAL DISORDER(P/A):");
gotoxy(60,18);
cin>>s[j];
s[j]=toupper(s[j]);
++j;
gotoxy(20,20);
cputs(" PANCREATECTOMY(P/A) :");
gotoxy(60,20);
cin>>s[j];
s[j]=toupper(s[j]);
++j;
return;
}
void diabetes::getlevel3_symptoms()
{
int k=0;
clrscr();
gotoxy(10,8);
cputs(" AGE(young(Y)/Middle aged(M)/Elderly(E))");
gotoxy(73,8);
cin>>s[k];
s[k]= toupper (s[k]);
++k;
gotoxy(10,12);
cputs("BODY WEIGHT(normal(N)/Above normal(A)/Below
normal(B)/obese)");
gotoxy(73,12);
cin>>s[k];
s[k]= toupper(s[k]);
++k;
gotoxy(10,16);
cputs(" DURATION (weeks(W)/Months(M)/Years(Y))");
gotoxy(73,16);
cin>>s[k];
s[k]= toupper(s[k]);
++k;
gotoxy(10,20);
cputs("KETONUREA(P/A)");
gotoxy(73,20);
cin>>s[k];
s[k]= toupper(s[k]);
++k;
gotoxy(10,24);
cputs("AUTO ANTIBODIES(P/A)");
gotoxy(73,24);
cin>>s[k];
s[k]= toupper(s[k]);
++k;
return;
}
Source Code Processed output :
Personal information
Name:
Age:
Weight:
Height:
Sex (M/F):
Diagnosis Window
APPETITE (H(HIGH),/L(LOW),/N(NORMAL):
VISION (I(IMPAIRMENT)(/N(NORMAL):
KETONUREA (P,A)
FASTING BLOOD SUGAR: (H,L,N):
R B S (H,L,N):
OGTT (D/N):
_________________________________________________________
PROCEED(Y/N)
____________________________________________________________
IF N QUIT
____________________________________________________________
IF Y
____________________________________________________________
PANCREATITIS (P/A):
CARCINOMA (P/A):
CIRRHOSIS (P/A):
HCTS (H/L/N):
HEPATITIS (P/A):
PANCREATECTOMY (P/A):
_______________________________________________________
IF IT IS A SECONDARY DIABETES QUIT
____________________________________________________________
IF Y
___________________________________________________________
KETONUREA (P/A):
____________________________________________________________
___________________________________________________________
The operator does not require any previous training because of its user
friendliness the operator is free from any technicality of the backend
processing, that is how database is maintained.
If the process of the working changes in future then the alteration in the
system will be done easily and will not cause in the mismanaging of data.
Furthermore with its implementation very large amount of data will be secure
and editing and addition or deletion of data is done very easily.
In future according to the user’s requirement it can be updated so that to reach
the user specification.
Project Plan :-
The Objective of the software project planning is to provide a framework
that enables an owner to make reasonable estimate of the resources, cost and
schedule. The project leader is responsible for designing the system precisely
according the requirement specified by the patient. He is also responsible for
maintenance of the system for certain period of time. Since cost of maintenance is
much higher than cost of developing system. Thus to reduce developing and
maintenance cost, to provide the system in predefine time proper planning of
system is necessary.
For this project, we used the Waterfall Model. The methodology has the
following phases:
Initial Investigation :-
The most crucial phase of managing system projects is planning to
launch a system investigation, we need a master plan detailing the steps to be
taken, the people to be questioned, and outcome expected. The initial
investigation has the objective of determining whether the user’s request has
potential merits the major steps are defining user requirements, studying the
present system and defining the performance expected by the candidate system
to meet user requirements. The first step in the system development life cycle is
the identification of need. There may be a user request to change, improve or
enhance an existing system. The initial investigation is one way of handling
these needs. The objective is to determine whether the request is valid and
feasible before a recommendation is reached to do nothing, improve or modify
the existing system, are to build a new one.
Thus for an effective test, paper follow-up and handling of the
data resulting from different patients, it felt necessary to develop a DIABETES
DETECTION so that monitoring and testing of diabetes could be done.
Advantages and Disadvantages
ADVANTAGES
DISADVANTAGES
A library set is usually chosen that locks you into a single platform or
operating system.
Overly complex for very large high level programs.
Expert systems are not 100% reliable. Even with the best expert contributing
to the design, expert systems are not perfect or infallible. For that reason
their output must be weighed, tested & otherwise scrutinized before it is
used. Human beings should always provide the final judgment.
CONCLUSION
This project is a design & implementation of a prototype medical expert
system to aid users. Users may use the software (Diabetes detection) as a
diagnostic & reference tool. The software can facilitate early detection &
diagnosis of diabetes. The prototype uses a knowledge- based system
with front-end text based interface that enables users to answer
diagnostic questions & enter laboratory results. The system output is the
diagnosis & treatment plan to be followed.
The goal of the project was to improve the diagnosis & evaluation
process for diabetes by utilizing intelligence technology to build &
validate a prototype expert system. Medical software has played a
significant role in helping both patients & medical practitioners to come
up with the suitable treatment for diabetes. This prototype system could
be beneficial to medical professionals (such as users & user
practitioners) because the system aids in producing accurate result.