Sie sind auf Seite 1von 23

JAWAHAR NAVODAYA VIDYALAYA

UMATHEL,THOUBAL ,
MANIPUR

COMPUTER SCIENCE
PROJECT ON

Diabetes Detection
SUBMITTED BY:

: kunlay choden
: manisha kumari das
: dechen ongmu
:passangkit sherpa

SUBMITTED TO : MUKESH SHARMA SIR.

CONTENTS
1.
2.
3.
4.
5.
6.
7.
8.

Certificate
Acknowledgement
Introduction
Data design
Problem description
h/w and s/w requirement
tables
coding

9. screen shot

2
3
4
5
6
7
9
11
17

PROJECT REPORT:

Particulars of students:
Name

Roll No

MANISHA KUMARI DAS


KUNLAY CHODEN
LACHUNGPA
PASSANGKIT SHERPA
DECHEN ONGMU

Particulars of Supervisor:

Name:
Designation:

CERTIFICATE

This is to certify that the project entitled


DIABETES DETECTION is deals with the
employees salary management is being
submitted by Manisha Kumari das, Kunlay
Choden

Lachungpa,

Passangkit

Sherpa,

Dechen Ongmu Lachungpa. This project is


a bonafide piece of work carried out by us
with the consultation of supervisor.

ACKNOWLEDGMENT
It is with great pleasure that we find
ourself penning down this lines to
express our sincere thanks to various
people who helped us a long way in
completing this project.
The harmonious climate in our school
provided proper guide for preparing the
same project of ours. It was a privilege
to have been guided by Mr.
Thanks to all ours classmates who
helped us during the development of
this project with their constructive
criticism and advise.

The project is basically for the users to want to


develop a real life application.
System description at glance:
The bloods are broadly divided into three categories:
1. Low sugar level
2. High sugar level
3. Normal sugar level
Our aim is to make a computer program such that it measures the sugar
level in the blood and give the result respectively.

Files:

There are separate file for keeping the records of hospital.


One file for recording the number of person who comes here for
detection.
We maintain another file for recording the total number of diabetic
patients.
A file for expenses incurred during the year that is salary to the nurses
and workers.

Inputs are:
Purchase different kinds of enzymes and insulin.
Total use during the month of the enzymes and insulin.
Total expenses that is salary to workers, electricity bill.
Output of the program:
Profit during the month of all kinds of enzymes and insulin.
System specification:
System design the kernel of the system engineering

Data design:

Data is the first of three design activities that are conducted during
system development the impact of data structure on program structure
and procedural complexities causes data design to have profound
influence in system quality.
All the data object required by this system are listed below:
1.
Functional
Model

Informational
Model

Data
Design

Behavioural Model

Other
Requirements

Procedural Design

CODE

Modul
e

Programm
e

Integrated and validated software


TEST

Problem description

Requirement analysis:
We have studied the existing system in detail.The finding of our study
yield various pieces of information which are described in the following
manner. For the medicine, detection ,insulins and with other related
module of hospital we enter all the following details of the person:
Personal details:

Name
Age
Sex
Height
Weight

Detail required for diagnosis:

Blood group
Appetite (high,low,normal)
Frequency of urination
Frequency of thirst
Frequency of heart beat
Family history of diabetes
Vision
Urine sugar level

Required output of the system:

The computerize system generates the following reports:


The system should be able to generate entry wise register.
Daily/monthly diagnosis report.
Other expenditure report.
Monthly profit in hospital

Hardware and software requirements


Assuming that typical system offer about 1000s of patients in all three categories.
The volume of information to be handled is therefore about a million characters.
Further the whole information has to be segmented according to

Number of person coming for diagnosis.


Category to which the person belongs.
Result report of the person.
All this suggest that the choice of computer 486 or equivalent about
265 MB hard discs and about 8 to 16 MB RAM online printer or a dot
matrix printer and preferable a laser printer is optimum.
The availability of sophisticated tool is imperative and thus a c++ is
chosen to program a system having done this the next step is to
carefully analyse the data and design appropriate data base file.
System specification
System design the kernel of system engineering
The importance of software design can be stated with word quality,
design is the place where quality is fostered in software development,
design provides us with representation of software that can be
accessed for quality. System deign serve as the foundation for all
software engineering and maintains steps that follows.
System design sits at technical kernel of software engineering process
and is applied regardless of the development paradigm that is used.
Once software requirement has been analyses and specified, the
software design is first of the three , technical activists- design ,code
and test, that are required to program the software.
The flow of information during this technical phase of software
engineering is illustrated in the figure given below.

Data design
Data design is the first of the three design activities that are conducted
during system development.

The impact of data structure on program structure and procedural


complexities causes the data design to have a profound influence in
system quality.
All the data objects required by this system are listed below.
1. Diabetes.dat
The diabetes .dat data base is to be created on the basis on
information collected from
Person.
Name of the person
Age
Sex
Weight
Height
2. get value _symtoms.dat

Appetite
Frequency of thirst
Frequency of urine
Urine sugar level
Family history
Vision

3.

Displayresult.dat

The person is diabetic or normal on the basis of diagnosis.


The above data can be designed in the form of relational data base
with course, name as key field.

10

TABLES:

SL.NO

FIELD
NAME

TYPE

WIDTH

FIELD DESCRIPTION

Patient no

int

2 bytes

Patient code

Patient
name

char

30 characters

Name of the patient

Total
medicine

int

2 bytes

Total medicine purchase

price

float

4 bytes

Price per medicine

MASTER RECORD LAYOUT PATIENT.DAT FILE


PATIENT RECORD LAYOUT PERSON.DAT FILE
SL.NO

FIELD NAME

TYPE

WIDTH

FIELD DESCRIPTION

Patient
name

int

2 bytes

Name of patient

p-address

char

30 characters

Patient address

No of
medicine

int

2 bytes

No of medicine

SL.N FIELD NAME TYPE


O

WIDTH

FIELD DESCRIPTION

2 bytes

Other expense code


1.salary of workers
2.electricity bill
3.miscellaneous expenses

O-code

int

11

Nat-expen

char

30 character

Nature of expenses

Amount

float

4 bytes

Expense amount

S.NO

FUNCTION NAME

DESCRIPTION

Void new _patient

Function to add new patient

Display_list(void)

Displaying the list of patient

Delet _discharge
patient

Delete the remove patient

* return _name(int)

Function for validation entry of name

*return_address(int)

Function for validation entry of address

Void display(int)

To display the patient information

FUNCTION DESCRIPTION
CLASS
S.N
O

MODULES

BALANCE

FUNCTION NAME

DESCRIPTION

12

Void new-account(void)

Function to sale medicine

Void close-account(void)

Function to close the medicine


purchase

Void clear(int,int)

Function to perform a clear screen


function

Void display-sales(void)

Displaying the report of medicine

Void add-amount to file()

Function to delete the unwanted


record

CODING

Diabetes Detection #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);
13

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()
{
14

clrscr();
gotoxy(23,7);
textcolor(YELLOW);
cputs("********* W E L C O M E ********* " );
gotoxy(25,9);
cputs(" C A M P I O N
S C H O O L " );
gotoxy(18,12);
cputs(" M E D I C A L
D I A G N O S I S
S O F T W A
R E

");
textcolor(GREEN+BLINK);
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("Navi Arora ");
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);
15

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];
16

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);
17

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&lt;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')||

18

(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 diabetes::display_message(int n,int m)
{
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;
}
break;

19

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;
case -1: gotoxy(30,12);
cputs("IT IS SECONDARY DIABETES");
gotoxy(50,25);
cputs("PRESS ANY KEY TO QUIT");
getch();
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;
case -1: gotoxy(30,12);
cputs("IT IS NON INSULIN DEPENDENT
DIABETES");
gotoxy(50,25);
cputs("PRESS ANY
getch();
break;
//

default: break;

}
// break ;
//
default : break;
}
20

KEY TO QUIT .");

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);
21

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;
}

22

SCREEN SHOT

23

Das könnte Ihnen auch gefallen