• No results found

A database consists of collection of tables with data and other objects such as views, indexes, stored procedures and triggers. Creation of a database involves determining the name of the database, and the tables used to store data in that database. In Tables 4.1-4.6, data types, and data sizes were used in the design of the databases using MySQL database. The structure of the tables in the database includes:

a tbldiagnosis b tblhospital c tblmembers d tblsign e tbltreatment f tblusers

86 Table 4.1: Diagnosis Database Structure

Field Data Type(Size) Description

Cardno Varchar(15) This is card number of patient

Name varchar(50) This is name of patient

Diagnosis varchar(2000) This is patient’s diagnosis

Prescription varchar(2000) This is prescription given to the patient

Dateconsulted Date This is date of consultation of the patient

Doctor varchar(50) This is the doctor in charge Hospital varchar(150) This is name of the hospital

Snum int(5) This is the serial number

Table 4.2: Registered Hospitals Database Structure Field Data Type(size) Description

Snum int(5) This is the Serial Number

Hospital varchar(200) This is the name of hospital Address varchar(200) This is the hospital Address State varchar(200) This is state where the hospital

is located

Username varchar(50) This is theUser Name

Password varchar(20) This is the Password

Datereg Date This is the date Registered

Timereg varchar(20) Time registered

87 Table 4.3: Patient’s Vital Database Structure

Field DataType (size) Description

Cardno varchar(15) This is the Card Number of patient

Name varchar(50) This is the name of Patient

Dateconsulted Date This is date of Consultation Timeconsulted varchar(20) This is time of Consultation Temperature varchar(40) This is the temperature of Patient Pulse varchar(40) This is the pulse of Patient

Bloodpressure varchar(40) This is the blood pressure of patient Respiration varchar(40) This is the respiration of patient Weight varchar(40) This is the weight of patient

Takenby varchar(50) This is the name of the nurse or doctor that took the vital sign

Hospital varchar(150) This is the hospital name

Snum int(5) This is the serial number

88 Table 4.4: Patient’s Registration Database Structure

Field DataType(size) Description

FirstName varchar(15) This is the first name of patient MiddleName varchar(15) This is the middle name of patient

Surname varchar(15) This is surname of patient

Designation varchar(30) This is the designation of patient Occupation varchar(30) This is the occupation of patient State varchar(10) This is the patient’s state of origin

DOB Date This is the patient’s date of birth

Sex varchar(8) This is the patient’s sex

Mstatus varchar(10) This is the marital status of patient

Age int(3) This is patient’s Age

BloodGroup varchar(4) This is the patient’s blood group NationalID varchar(15) This is the patient’s national ID

number

Phone varchar(15) This is the phone number of patient

Address varchar(150) This is the address of patient

Gl varchar(10) This is the grade level of patient

StP varchar(10) This is the step level of patient

Ename varchar(60) This is the name of employer

Location varchar(70) This is the location of the employer

Pname varchar(50) This is the health Provider Name

Genotype varchar(50) This is the genotype of Patient Medical varchar(100) This is the medical history of

patient

Sname varchar(30) This is the name of Spouse

Ssex varchar(8) This is the sex of Spouse

SBG varchar(4) Spouse Blood group

SDOB Date Spouse date of birth

89

C1Name varchar(30) Name of first Child

C1Sex varchar(8) This is the sex of the first child

C1BG varchar(4) This is the blood group of first child

C1DOB Date This is date of birth of first child

C2Name varchar(30) This is name of second child

C2Sex varchar(8) This is sex of second child

C2BG varchar(4) This is blood group of second child

C2DOB Date This is date of birth of second child

C3Name varchar(30) This is name of third child

C3Sex varchar(8) This is sex of third child

C3BG varchar(4) This is blood group of third child

C3DOB Date This is date of birth of third child

C4Name varchar(30) This is the name of fourth child

C4Sex varchar(8) This is sex of fourth child

C4BG varchar(4) This is blood group of fourth child

C4DOB Date This is date of birth of fourth child

Epic varchar(100) This is picture of patient

EID varchar(20) This is patient’s ID number

90 Table 4.5: Patient’s Medical Treatment Database Structure

Field DataType (size) Description

Cardno varchar(15) This is card number of patient

Name varchar(50) This is name of patient

Treatment varchar(1000) This is treatment given to the patient

Timeconsulted varchar(40) This is time of consultation Dateconsulted Date This is date of consultation

Nurse varchar(50) This is nurse in charge

Hospital varchar(150) This is name of the hospital

Snum int(5) This is the serial number

Table 4.6: Admin User Database Structure Field Data Type (size) Description

Name varchar(30) This is the name of the

Administrator

Address varchar(250) This is the Administrator’s Address

Phone varchar(30) This is Phone number of

Administrator

Email varchar(100) This is the Email of Administrator Username varchar(30) This is the User Name

Password varchar(15) This is the Password

Userrole varchar(30) This is the role of the Administrator

Datereg Date This is the date of Registration

Timereg varchar(20) This is time of Registration

Snum int(5) This is the serial Number

91