1.
INTRODUCTION
Online Hospital Information System is to maintain the information of doctor
and patient details through online and to contact the doctor regarding their problem. And
it has evolved as an administrative system. Hospital information system includes
registration of patients, storing their details into the system. The project has the facility to
give an unique id for every patient who are registered. It includes a search facility to
know the available doctors regarding the problems and contact using the details. The
data can be retrieved easily. The interface is very user-friendly. The data is well protected
for personal use and makes the data processing very fast.
1
2.SYSTEM ANALYSIS
2.1 LITERATURE SURVEY
The scope of “Online Hospital Information System” is to display the details of
doctors regarding their problem and contact details(contacting them via email,and phone
number).It is accessible either by an administrator. Only they can add data into the
database.Here the admin is going to maintain the details of patients who are registered.
2.2 EXISTING SYSTEM
Records of patients and doctors are maintained manually.
Chance of human errors.
Searching old records and retrieval of data is difficult.
2.3 PROPOSED SYSTEM
The Proposed system is a computerized system which is maintained at
Centralized database. It is a very fast process and maintains all the records in online
systems. This makes it very easy to access and retrieve data from the database. It
provides multiple user accessibility and also has different user privileges. So the system
is accessible for all the users.
This new system provides some advance facilities which were never provided in
a single site. This uses ASP.NET technology which is world famous in Desktop
application.
2
2.3 SYSTEM REQUIREMENTS
HARDWARE REQUIREMENTS
Processor : Intel® Dual Core
Hard Disk : 80 GB or more
Mouse : Optical Mouse
Keyboard : 110 keys enhanced
RAM : 512MB or more
SOFTWARE REQUIREMENTS
Operating System : Windows 8
Language : .Net Frame Work 3.5 or later
Database : MS SQL SERVER v11 or later
Web Server : IIS 7 or more
Browser : Any Browser with GUI
3
3.DESIGN
3.1 MODULE DESCRIPTION
The system consists of 2 modules. They are:-
1.Administrator
2.User
3.1.1 ADMINISTRATOR MODULE
Administrator can access all information with some given username and
password. The admin has special rights, like he can insert, update and delete
doctor information, he can view the details of the doctor.
3.1.2 USER MODULE
User can fill registration form.
Already Registered user can login with his/her own user id and password.
Get information about required doctors.
Check doctor contact details and user can view their profile.
3.2 DATABASE DESIGN
Design creates a 3representation or model, provides details about software
data structure, architecture, interfaces and components that are necessary to
implement a system. Design is the perfect way to accurately translate a users
requirement in to a finished software product.
4
3.4 DATABASE TABLES
Admin Table:
Attribute Type Datatype Description
adm_name Varchar(20) Primary key Admin Name
adm_pwd Varchar(20) Not NULL Admin Password
Table3.1: Admin Table
Patient Registration Table:
Attribute Type Datatype Description
patient_emailid varchar(50) Primary key Patient emailid
patient_passwo varchar(20) Not NULL User Password
rd
patient_firstna varchar(50) Not NULL User Firstname
me
patient_lastna varchar(50) Not NULL User Lastname
me
patient_gender bit - Gender
patient_dob date - Date of Birth
patient_phno int - Phone Number
patient_address varchar(MAX) - Address
Table3.2: Patient Registration Table
5
Doctor Table:
Attribute Type Datatype Description
doc_id int Primary key Doctor ID
doc_name varchar(50) - Doctor Name
doc_specialization varchar(50) - Specialization
doc_qualification varchar(50) - Qualification
doc_exp varchar(2) - Experience
doc_ph int - Phone Number
doc_email varchar(50) - Email ID
Table3.3: Doctor Table
6
3.5 UML DIAGRAMS
3.5.1 USECASE DIAGRAM
UseCase Diagram shows a set of use cases, actors and their relationships.
Use case diagrams illustrate the static use case view of a system. Use case diagrams are
especially important in organizing and modeling the behavior of a system.
Figure3.1: Usecase Diagram For User
7
Figure3.2: Usecase Diagram For Admin
8
3.5.2 CLASS DIAGRAM
Class diagram shows a set of classes, interfaces, collaborations and their
relationships. Class diagrams are the most common diagram found in modeling object-
oriented systems. Class diagrams illustrate the static design view of a system. Class
diagrams that include active classes are used to address the static process view.
Figure3.3: Class Diagram
9
3.5.3 SEQUENCE DIAGRAM
Sequence diagram is an interaction diagram that emphasizes the time
ordering of messages. A sequence diagram shows a set of objects and the messages sent
and received by those objects. Sequence diagrams illustrate the dynamic view of a
system.
Figure3.4: Sequence Diagram For User
10
Figure3.5: Sequence Diagram For Admin
11
3.5.4 ACTIVITY DIAGRAM
Activity diagram shows the flow from one activity to other activity within a
system. Activity diagrams illustrate the dynamic view of a system. Activity diagrams are
especially important in modeling the function of a system.
Figure3.6: Activity Diagram For User
12
Figure3.7: Activity Diagram For Admin
13
4.IMPLEMENTATION
SAMPLE CODE:
Registration.apsx:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class registration : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnRegister_Click(object sender, EventArgs e)
{
try
{
if(myValidation()==1)
{
String stmt = "insert into patient_registration values(";
stmt += "'" + txtEmailID.Text + "',";
stmt += "'" + txtPwd.Text + "',";
stmt += "'" + txtFirstName.Text + "',";
stmt += "'" + txtLastName.Text + "',";
int Gender = 0;
if (radFemale.Checked)
Gender = 1;
stmt += "'" + Gender + "',";
stmt += "'" + txtDOB.Text + "',";
stmt += "'" + txtPhno.Text + "',";
stmt += "'" + txtAddress.Text + "')";
SQLHelper objSql = new SQLHelper();
int res = objSql.MyDML(stmt);
if (res == 1)
14
lblMsg.Text = "Registered successfully";
myclear();
}
}
catch (Exception ex)
{
lblMsg.Text = "use another mail";
}
}
private void myclear()
{
txtEmailID.Text = String.Empty;
txtPwd.Text = String.Empty;
txtFirstName.Text = String.Empty;
txtLastName.Text = String.Empty;
txtDOB.Text = String.Empty;
txtPhno.Text = String.Empty;
txtAddress.Text = String.Empty;
}
protected void btnCancel_Click(object sender, EventArgs e)
{
myclear();
}
private int myValidation()
{
if (txtEmailID.Text.Trim().Length == 0 && txtPwd.Text.Trim().Length == 0
&& txtFirstName.Text.Trim().Length == 0 &&
txtLastName.Text.Trim().Length == 0 && txtDOB.Text.Trim().Length == 0
&& txtPhno.Text.Trim().Length == 0 && txtAddress.Text.Trim().Length == 0)
{
lblMsg.Text = "Enter all fields";
return 0;
}
else if (txtPwd.Text.Trim().Length == 0)
{
lblMsg.Text = "Enter Password";
return 0;
}
else if (txtFirstName.Text.Trim().Length == 0)
{
lblMsg.Text = "Enter First Name";
return 0;
}
else if (txtLastName.Text.Trim().Length == 0)
15
{
lblMsg.Text = "Enter Last Name";
return 0;
}
else if (txtDOB.Text.Trim().Length == 0)
{
lblMsg.Text = "Enter Date Of Birth";
return 0;
}
else if (txtPhno.Text.Trim().Length == 0)
{
lblMsg.Text = "Enter Phone Number";
return 0;
}
else if (txtAddress.Text.Trim().Length == 0)
{
lblMsg.Text = "Enter Address";
return 0;
}
else if (txtPwd.Text.Trim().Length < 7)
{
lblMsg.Text = "Password length should be minimum 7";
return 0;
}
else if (txtPhno.Text.Trim().Length != 10)
{
lblMsg.Text = "Check Your Number";
return 0;
}
else
return 1;
}
}
Login.aspx:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class login : System.Web.UI.Page
16
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnLoginSubmit_Click(object sender, EventArgs e)
{
if(myValidation()==1)
{
String stmt = "select count(*) from patient_registration where
patient_emailid='"+txtLoginID.Text+"' and patient_pwd='"+txtLoginPwd.Text+"'";
SQLHelper objSql = new SQLHelper();
int cnt = objSql.MyRecordCount(stmt);
if (cnt == 1)
{
Session["patient_emailid"] = txtLoginID.Text;
Response.Redirect("loginhome.aspx");
}
else
{
lblMsg1.Text = "Invalid user name or password";
}
}
private void myclear()
{
txtLoginID.Text = String.Empty;
txtLoginPwd.Text = String.Empty;
}
protected void btnLoginCancel_Click(object sender, EventArgs e)
{
myclear();
}
private int myValidation()
{
if (txtLoginID.Text.Trim().Length == 0 && txtLoginPwd.Text.Trim().Length
== 0)
{
lblMsg1.Text = "Enter All Fields";
return 0;
17
}
else if (txtLoginID.Text.Trim().Length == 0)
{
lblMsg1.Text = "Enter User id";
return 0;
}
else if (txtLoginPwd.Text.Trim().Length == 0)
{
lblMsg1.Text = "Enter password";
return 0;
}
else
return 1;
}
}
Loginhome.aspx:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class loginhome : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSearch_Click(object sender, EventArgs e)
{
string str = @"select * from doctor_table where doc_specialization='" +
ddlSelect.SelectedItem.Value + "'";
SQLHelper objSql = new SQLHelper();
DataSet ds = objSql.MyGetData(str);
GridView1.DataSource = ds;
GridView1.DataBind();
18
ChangePassword.aspx:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class changepwd : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
protected void txtChangePwd_Click(object sender, EventArgs e)
{
lblMsg1.Text = String.Empty;
String _patient_emailid = Session["patient_emailid"].ToString();
String stmt="Select count(*) from patient_registration where patient_pwd='" +
txtCurrentPwd.Text + "'";
SQLHelper obj = new SQLHelper();
int cnt = obj.MyRecordCount(stmt);
if (cnt >= 1)
{
if(txtNewPwd.Text==txtRePwd.Text)
{
String cmd = "Update patient_registration set patient_pwd='" +
txtRePwd.Text + "' where patient_pwd='" + txtCurrentPwd.Text + "' and
patient_emailid='"+_patient_emailid+"'";
int res = obj.MyDML(cmd);
if (res == 1)
{
lblMsg1.Text = "Password successfully Updated";
}
}
else
{
lblMsg1.Text = "New Password and confirm new password must be same";
}
}
else
{
lblMsg1.Text = "Please check your old password";
19
}
myClear();
}
private void myClear()
{
txtCurrentPwd.Text = String.Empty;
txtNewPwd.Text = String.Empty;
txtRePwd.Text = String.Empty;
20
5. TESTING AND TEST CASES
5.1 INTRODUCTION
One of the purposes of the testing is to validate and verify the system.
Verification means checking the system to ensure that it is doing what the function is
supposed to do and Validation means checking to ensure that system is doing what the
user wants it to do.
No program or system design is perfect; communication between the user and
the designer is not always complete or clear, and time is usually short. The result is
errors and more errors. Theoretically, a newly designed system should have all the
pieces in working order, but in reality, each piece works independently. Now is the time
to put all the pieces into one system and test it to determine whether it meets the user's
requirements. This is the best chance to detect and correct errors before the system is
implemented. The purpose of system testing is to consider all the likely variations to
which it will be subjected and then push the system to its limits. If we implement the
system without proper testing then it might cause the problems.
1. Communication between the user and the designer.
2. The programmer's ability to generate a code that reflects exactly the system
specification.
3. The time frame for the design.
Theoretically, a new designed system should have all the pieces in working
order, but in reality, each piece works independently. Now is the time to put all the
21
pieces into one system and test it to determine whether it meets the requirements of the
user. The process of system testing and the steps taken to validate and prepare a system
for final implementation are:
5.2 TESTING STRATEGIES
In order to make sure that the system does not have errors, the different levels of
testing strategies that are applied at differing phases of software development are:
5.3 UNIT TESTING
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs.
All decision branches and internal code flow should be validated. It is the testing of
individual software units of the application .It is done after the completion of an
individual unit before integration.
5.4 INTEGRATION TESTING
In Integration Testing, the different units of the system are integrated together to
form the complete system and this type of testing checks the system as whole to ensure
that it is doing what is supposed to do. The testing of an integrated system can be
carried out top-down, bottom-up, or big-bang. In this type of testing, some parts will be
tested with white box testing and some with black box testing techniques. This type of
testing plays very important role in increasing the systems productivity. We have
checked our system by using the integration testing techniques.
22
VERIFICATION TESTING
In Verification Testing, the different units of system are verified together whether
the exact output to the system is existing or not.
VALIDATION TESTNG
In Validation Testing ,software validation is achieved through a series of black-
box tests that demonstrate conformity with the requirements .After each validation test
case has been conducted ,one or two possible conditions exists:
1.The function or performance characteristics conform to specification and are
accepted.
2.A deviation from specification is uncovered and a deficiency list is created.
5.5 SYSTEM TESTING
Apart from testing the system to validate the functionality of software against the
requirements, it is also necessary to test the non-functional aspect of the system. Some
examples of non-functional tools include tests to check performance, data security,
usability/user friendliness, volume, load/stress that we have used in our project to test
the various modules. System testing consists of the following steps:
1. Program(s) testing.
2. String testing.
3. System testing.
4. System documentation.
5. User acceptance testing.
23
5.5TEST CASES
Testcase Tabel:
Input Expected behaviour Observed behaviour Status
Invalid data for
Enter correct details Enter correct details Success
Registration
Valid data for Registered Registered
Success
Registration Successfully Successfully
Invalid data for Enter Valid username Invalid username or
Success
User Login and password password
Valid data for User
Success Page Login Success Page Success
Login
Invalid data for Enter Valid username Invalid username or
Success
admin login and password password
Valid data for admin Admin Login
Success Page Success
login Success Page
Invalid data for Registered
Enter correct details Failure
registration Successfully
Invalid data for
Enter correct details Login Success Page Failure
User login
Table5.1:Testcase Table
24
TEST CASE 1
Input : Invalid Data
Expected Behaviour : Enter correct details
Actual Behaviour : Enter correct details
Result : Success
Figure5.1: Testcase1
25
TEST CASE 2
Input : Valid Data
Expected Behaviour : Registered Successfully
Actual Behaviour : Registered Successfully
Result : Success
Figure5.2: Testcase2
26
TEST CASE 3
Input : Invalid Data
Expected Behaviour : Invalid Username/Password
Actual Behaviour : Invalid Username/Password
Result : Success
Figure5.3: Testcase3
27
TEST CASE 4
Input : Valid Data
Expected Behaviour : Success Page
Actual Behaviour : Login Success Page
Result : Success
Figure5.4: Testcase4
28
TEST CASE 5
Input : Invalid Data
Expected Behaviour : Invalid Username or Password
Actual Behaviour : Invalid Username or Password
Result : Success
Figure5.5: Testcase5
29
TEST CASE 6
Input : Valid Data
Expected Behaviour : Success Page
Actual Behaviour : Admin Success Page
Result : Success
Figure5.6: Testcase6
30
TEST CASE 7
Input : Invalid Data
Expected Behaviour : Enter correct details
Actual Behaviour : Registered Successfully
Result : Failure
Figure5.7: Testcase7
31
TEST CASE 8
Input : Invalid Data
Expected Behaviour : Invalid username/Password
Actual Behaviour : Login Success Page
Result : Failure
Figure5.8: Testcase8
32
6.OUTPUT SCREENS
HOME:
Figure6.1: Home Page
33
REGISTRATION:
Figure6.2: Registration Page
34
USER LOGIN:
Figure6.3: User Login Page
35
ADMIN LOGIN:
Figure6.4: Admin Login Page
36
LOGIN SUCCESS:
Figure6.5: Login Succes Page
37
CHANGE PASSWORD:
Figure6.6: Change Password Page
38
ADMIN LOGIN SUCCESS :
Figure6.7: Admin Login Success Page
39
7.CONCLUSION & FUTURE ENHANCEMENT
CONCLUSION:
Online Hospital Information System was successfully designed and is tested
for accuracy and quality. By using this project data can be stored in digitalized format.
Admin can easily maintain records. Less chances for data corruption. By using this user
can easily search for the doctor regarding their problems. Security is provided to the
system and it is very user friendly.
FUTURE ENHANCEMENT:
Online Hospital Information System was Limited to India Only but I Can
Extends It to World Wide. I did not provide facility to book an appointment for doctor on
website. Appointment can be booked in future. Provide some more extra facilities in
future.
40
8.BIBLIOGRAPHY
ONLINE REFERENCES:
http://www.dotnetspider.com/
http://www.google.com/
http://www.msdn.microsoft.com/
http://www.onlineshopping.com/
http://www.aspdotnet.com/
REFERENCES:
Asp.Net Books:
Beginning ASP.NET 3.5 in C# 2008
By George Shepherd
Sams Asp.Net 3.5 Unleashed
By Stephen Walther
Software Engineering by Roger S.Pressman
Database Books:
Teach Your Self SQL
By Ivan Baron
41