0% found this document useful (0 votes)
6 views90 pages

HospitalCloud - Final Am

The document outlines a project focused on hospital branch and patient management utilizing cloud computing for data storage and security. It highlights the existing system's drawbacks and proposes a new system that enhances data security through encryption and reduces hardware maintenance. The project is developed using Microsoft Visual Studio .Net and MS-SQL Server, emphasizing the importance of secure communication and efficient data management.

Uploaded by

imranimran94493
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views90 pages

HospitalCloud - Final Am

The document outlines a project focused on hospital branch and patient management utilizing cloud computing for data storage and security. It highlights the existing system's drawbacks and proposes a new system that enhances data security through encryption and reduces hardware maintenance. The project is developed using Microsoft Visual Studio .Net and MS-SQL Server, emphasizing the importance of secure communication and efficient data management.

Uploaded by

imranimran94493
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 90

CONTENTS

CHAPTER NO. TITLE PAGE


NO.

LIST OF TABLES

LIST OF FIGURES

LIST OF ABBREVIATIONS

1 Introduction

1.1 Company Profile

1.2 Objectives

2 System Analysis

2.1 Existing System

2.2 Drawbacks of Existing System

2.3 Proposed System

2.4 Advantages of Proposed System

2.5 Feasibility Study

2.5.1 Economical Feasibility

2.5.2 Operational Feasibility

2.5.1 Technical Feasibility

3 System Specification

3.1 Hardware Requirements

3.2 Software Requirements

4 Software Description

4.1 Front End

4.2 Back End

5 Project Description
5.1 Problem Definition

5.2 Overview of the project

5.3 Module Description

5.4 System Flow Diagram

5.4 Data Flow Diagram

5.6 Database Design

5.7 Input Design

5.8 Output Design

6 System Testing

6.1 Unit Testing

6.2 User Acceptance Testing

7 System Implementation

8 Conclusion and Future Enhancements

9 Appendix

9.1 Screen Shots

9.2 Source Code

10 References
ABSTRACT

The project deals with the hospital branch and patients management. Since cloud
computing delivers convenient, on-demand access to shared pools of data, applications
and hardware over the internet, it provides unlimited infrastructure to store and execute
patient data and program.

Due to this redundancy the data can be easily modified by unauthorized users
which can be stored in the database. This leads to loss of data privacy and security to
database. The proposed scheme ensures that cyclic redundancy check and time-tested
practices and technologies for managing trust relationships in traditional enterprise
environments can be extended to work effectively in both private and public clouds.
Those practices include data encryption, strong authentication and fraud detection, etc.

The testing application to enable Data Storage Security in Cloud Computing for
Hospital Enterprises designed using Microsoft Visual Studio .Net 2005 as front end. The
coding language used is Visual C# .Net. The web technology used is ASP .Net 2005.
MS-SQL Server 2000 is used as back end database.
LIST OF TABLES
5.9.1 ADMIN

5.9.2 BRANCH

5.9.3 DOCTORS

5.9.4 PATIENTS

5.9.5 TABLETS

5.9.6 VISIT TRANS

5.9.7 RECEIPT

5.9.8 PRESCRIPTION

5.9.9 USER CREDENTIALS

5.9.10 HOSPITAL ADMIN USERS

LIST OF FIGURES
5.4.1 SYSTEM FLOW DIAGRAM

5.5.1 DATA FLOW DIAGRAM (MASTERS)

5.5.2 DATA FLOW DIAGRAM (TRANSACTIONS)

LIST OF ABBREVIATIONS
CLR : COMMON LANGUAGE RUNTIME

CLS : COMMON LANGUAGE SPECIFICATION

CLI : CROSS LANGUAGE INHERITANCE

CTS : COMMON TYPE SYSTEM

SQL : STRUCTURED QUERY LANGUAGE

IL : INTERMEDIATE LANGUAGE

ADO : ACTIVEX DATA OBJECT

COM : COMPONENT OBJECT MODEL

HTML : HYPER TEXT MARKUP LANGUAGE

DHTML : DYNAMIC HYPER TEXT MARKUP LANGUAGE

XML : EXTENDED MARKUP LANGUAGE


1. INTRODUCTION
1.1 OBJECTIVES

The following are the objectives of the project

 To encipher the message that cannot be deciphered by malicious attackers.

 To apply the Triple DES (Data Encryption Standard) algorithms in encrypting

and decrypting the content.

 To increase the security in communicating the messages.

 To maintain the patients information in cloud storage space.

 To maintain the visits, prescription and receipt details in cloud storage space.
2. SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

The existing system is maintaining all branch patients information in hospitals


storage space. More number of IT professionals are required to keep availability of data
at all time. More number of hardware assets and their management cost is also more. The
following are the drawbacks of existing system.

2.2 DRAWBACKS OF EXISTING SYSTEM


The existing system has following disadvantages,

1. Requires more personnel to maintain the hardware and software.

2. No more operations are carried out in any encrypted message and so security is

somewhat is less.

3. Consolidation of data for inter-branch patient visit information is tedious.

2.3 PROPOSED SYSTEM

The proposed system is required to eliminate the risk in unavailability of one


branch information in other branch. The proposed system is using an approach such that
with the cloud storage space, the hardware and software maintenance risk is reduced.
2.4 ADVANTAGES OF THE PROPOSED SYSTEM

The proposed system has following advantages,

1. Since the data is kept in cloud space, hospital employees are not required to

maintain the hardware and software.

2. Operations are carried out in encrypted message format and so security is more

even kept in third party cloud storage space.

3. Consolidation of data for inter-branch patient visit information is easier than

the existing system.

2.5 FEASIBILITY STUDY

The feasibility study deals with all the analysis that takes up in developing the
project. Each structure has to be thought of in the developing of the project, as it has to
serve the end user in a user-friendly manner. One must know the type of information to
be gathered and the system analysis consist of collecting, Organizing and evaluating facts
about a system and its environment.

The main objective of the system analysis is to study the existing operation and to
learn and accomplish the processing activities. The secure communication processing
through web application is needed to be analyzed well. The details are processed through
coding themselves. It will be controlled by the programs alone.
2.5.1 ECONOMIC FEASIBILITY

The organization has to buy a personal computer with a keyboard and a mouse,
this is a direct cost. There are many direct benefits of covering the manual system to
computerized system. The user can be given responses on asking questions, justification
of any capital outlay is that it will reduce expenditure or improve the quality of service or
goods, which in turn may be expected to provide the increased profits.

2.5.2 OPERATIONAL FEASIBILITY

The Proposed system accessing process to solves problems what occurred in


existing system. The current day-to-day operations of the organization can be fit into this
system. Mainly operational feasibility should include on analysis of how the proposed
system will affects the organizational structures and procedures.

2.5.3 TECHNICAL FEASIBILITY

The cost and benefit analysis may be concluded that computerized system is
favorable in today’s fast moving world. The assessment of technical feasibility must be
based on an outline design of the system requirements in terms of input, output, files,
programs and procedure. The project aims to communicate securely even the records
contain multiple branches patients visit information using web application. The current
system aims to overcome the problems of the existing system. The current system is to
reduce the technical skill requirements so that more number of users can access the
application.
3. SYSTEM SPECIFICATION

3.1 HARDWARE REQUIREMENTS

This section gives the details and specification of the hardware on which the
system is expected to work.

Processor : Pentium IV 866 MHz

RAM : 256 MB SD RAM

Monitor : 17” Color

Hard disk : 80 GB

Keyboard : Standard102 keys

Mouse : LOGI TECH (3 Buttons)

3.2 SOFTWARE REQUIREMENTS

This section gives the details of the software that are used for the development.

Operating System : Windows XP Professional

Environment : Visual Studio .NET 2005

.NET Framework : Version 2.0

Language : Visual C# .NET

Backend : MS SQL Server 2000


4. SOFTWARE DESCRIPTION

4.1 FRONT END

THE .NET FRAMEWORK

The .NET Framework is a new computing platform that simplifies application


development in the highly distributed environment of the Internet.

OBJECTIVES OF .NET FRAMEWORK

1. To provide a consistent object-oriented programming environment whether object


codes is stored and executed locally on Internet-distributed, or executed remotely.

2. To provide a code-execution environment to minimizes software deployment and


guarantees safe execution of code.

3. Eliminates the performance problems.

There are different types of application, such as Windows-based applications and


Web-based applications. To make communication on distributed environment to ensure
that code be accessed by the .NET Framework can integrate with any other code.

COMPONENTS OF .NET FRAMEWORK

1. THE COMMON LANGUAGE RUNTIME (CLR)

The common language runtime is the foundation of the .NET Framework. It


manages code at execution time, providing important services such as memory
management, thread management, remoting and also ensures more security and
robustness. The concept of code management is a fundamental principle of the runtime.
Code that targets the runtime is known as managed code, while code that does not target
the runtime is known as unmanaged code.
THE .NET FRAME WORK CLASS LIBRARY

It is a comprehensive, object-oriented collection of reusable types used to develop


applications ranging from traditional command-line or graphical user interface (GUI)
applications to applications based on the latest innovations provided by ASP.NET, such
as Web Forms and XML Web services.

The .NET Framework can be hosted by unmanaged components that load the
common language runtime into their processes and initiate the execution of managed
code, thereby creating a software environment that can exploit both managed and
unmanaged features. The .NET Framework not only provides several runtime hosts, but
also supports the development of third-party runtime hosts.

Internet Explorer is an example of an unmanaged application that hosts the runtime


(in the form of a MIME type extension). Using Internet Explorer to host the runtime to
enables embeds managed components or Windows Forms controls in HTML documents.

FEATURES OF THE COMMON LANGUAGE RUNTIME

The common language runtime manages memory; thread execution, code


execution, code safety verification, compilation, and other system services these are all
run on CLR.

1 Security
2 Robustness
3 Productivity
4 Performance

DATA ACCESS WITH ADO.NET

As you develop applications using ADO.NET, you will have different


requirements for working with data. You might never need to directly edit an XML file
containing data - but it is very useful to understand the data architecture in ADO.NET.

ADO.NET offers several advantages over previous versions of ADO:


1 Interoperability
2 Maintainability
3 Programmability
4 Performance Scalability

VISUAL STUDIO .NET


Visual Studio .NET is a complete set of development tools for building ASP Web
applications, XML Web services, desktop applications, and mobile applications In
addition to building high-performing desktop applications, you can use Visual Studio's
powerful component-based development tools and other technologies to simplify team-
based design, development, and deployment of Enterprise solutions.

Visual Basic .NET, Visual C++ .NET, and Visual C# .NET all use the same
integrated development environment (IDE), which allows them to share tools and
facilitates in the creation of mixed-language solutions. In addition, these languages
leverage the functionality of the .NET Framework and simplify the development of ASP
Web applications and XML Web services.

Visual Studio supports the .NET Framework, which provides a common language
runtime and unified programming classes; ASP.NET uses these components to create
ASP Web applications and XML Web services. Also it includes MSDN Library, which
contains all the documentation for these development tools.

VISUAL C#

Visual C# includes many new features. The Visual C# supports interfaces but not
implementation inheritance. Visual C# supports implementation inheritance, interfaces
and overloading. In addition, Visual C# .NET supports multithreading concept.

COMMON LANGUAGE SPECIFICATION (CLS)

Visual C# .NET is also compliant with CLS (Common Language Specification)


and supports structured exception handling. CLS is set of rules and constructs that are
supported by the CLR (Common Language Runtime). CLR is the runtime environment
provided by the .NET Framework; it manages the execution of the code and also makes
the development process easier by providing services.

Visual C# .NET is a CLS-compliant language. Any objects, classes, or components


that created in Visual C# .NET can be used in any other CLS-compliant language. In
addition, we can use objects, classes, and components created in other CLS-compliant
languages in Visual C# .NET .The use of CLS ensures complete interoperability among
applications, regardless of the languages used to create the application.

IMPLEMENTATION INHERITANCE

Visual C# .NET supports implementation inheritance. This means that, while


creating applications in Visual C#. NET, we can drive from another class, which is know
as the base class that derived class inherits all the methods and properties of the base
class. In the derived class, we can either use the existing code of the base class or
override the existing code. Therefore, with help of the implementation inheritance, code
can be reused.

CONSTRUCTORS AND DESTRUCTORS

Constructors are used to initialize objects, whereas destructors are used to destroy
them. In other words, destructors are used to release the resources allocated to the object.
In Visual C# .NET the sub finalize procedure is available. The sub finalize procedure is
used to complete the tasks that must be performed when an object is destroyed. The sub
finalize procedure is called automatically when an object is destroyed. In addition, the
sub finalize procedure can be called only from the class it belongs to or from derived
classes.

GARBAGE COLLECTION

Garbage Collection is another new feature in Visual C# .NET. The .NET


Framework monitors allocated resources, such as objects and variables. In addition,
the .NET Framework automatically releases memory for reuse by destroying objects that
are no longer in use. In Visual C# .NET, the garbage collector checks for the objects that
are not currently in use by applications. When the garbage collector comes across an
object that is marked for garbage collection, it releases the memory occupied by the
object.

OVERLOADING

Overloading is another feature in Visual C# .NET. Overloading enables us to


define multiple procedures with the same name, where each procedure has a different set
of arguments. Besides using overloading for procedures, we can use it for constructors
and properties in a class.

MULTITHREADING

Visual C# .NET also supports multithreading. An application that supports


multithreading can handle multiple tasks simultaneously, we can use multithreading to
decrease the time taken by an application to respond to user interaction. To decrease the
time taken by an application to respond to user interaction, we must ensure that a separate
thread in the application handles user interaction.

STRUCTURED EXCEPTION HANDLING

Visual C# .NET supports structured handling, which enables us to detect and


remove errors at runtime. In Visual C# .NET, we need to use Try…Catch…Finally
statements to create exception handlers. Using Try…Catch…Finally statements, we can
create robust and effective exception handlers to improve the performance of our
application.
4.2 BACK END

FEATURES OF SQL-SERVER

Microsoft SQL Server is a relational model database server produced by


Microsoft. Its primary query languages are T-SQL and ANSI SQL.The OLAP Services
feature available in SQL Server version 7.0 is now called SQL Server 2000 Analysis
Services. The term OLAP Services has been replaced with the term Analysis Services.
Analysis Services also includes a new data mining component. The Repository
component available in SQL Server version 7.0 is now called Microsoft SQL Server 2000
Meta Data Services. References to the component now use the term Meta Data Services.
The term repository is used only in reference to the repository engine within Meta Data
Services

Microsoft® SQL Server™ 2000 features include:

INTERNET INTEGRATION

The SQL Server 2000 database engine includes integrated XML support. It also
has the scalability, availability, and security features required to operate as the data
storage component of the largest Web sites. The SQL Server 2000 programming model is
integrated with the Windows DNA architecture for developing Web applications, and
SQL Server 2000 supports features such as English Query and the Microsoft Search
Service to incorporate user-friendly queries and powerful search capabilities in Web
applications.

SCALABILITY AND AVAILABILITY

The same database engine can be used across platforms ranging from laptop
computers running Microsoft Windows® 98 through large, multiprocessor servers
running Microsoft Windows 2000 Data Center Edition. SQL Server 2000 Enterprise
Edition supports features such as federated servers, indexed views, and large memory
support that allow it to scale to the performance levels required by the largest Web sites.
ENTERPRISE-LEVEL DATABASE FEATURES

The SQL Server 2000 relational database engine supports the features required to
support demanding data processing environments. The database engine protects data
integrity while minimizing the overhead of managing thousands of users concurrently
modifying the database. SQL Server 2000 distributed queries allow you to reference data
from multiple sources as if it were a part of a SQL Server 2000 database, while at the
same time, the distributed transaction support protects the integrity of any updates of the
distributed data. Replication allows you to also maintain multiple copies of data, while
ensuring that the separate copies remain synchronized. You can replicate a set of data to
multiple, mobile, disconnected users, have them work autonomously, and then merge
their modifications back to the publisher.

EASE OF INSTALLATION, DEPLOYMENT, AND USE

SQL Server 2000 includes a set of administrative and development tools that
improve upon the process of installing, deploying, managing, and using SQL Server
across several sites. SQL Server 2000 also supports a standards-based programming
model integrated with the Windows DNA, making the use of SQL Server databases and
data warehouses a seamless part of building powerful and scalable systems. These
features allow you to rapidly deliver SQL Server applications that customers can
implement with a minimum of installation and administrative overhead.

DATA WAREHOUSING

SQL Server 2000 includes tools for extracting and analyzing summary data for
online analytical processing. SQL Server also includes tools for visually designing
databases and analyzing data using English-based questions.
5. PROJECT DESCRIPTION

5.1 PROBLEM DEFINITION

The first step in the software development life cycle is the identification of the
problem. As the success of the system depends largely on how accurately a problem is
identified.

At present, the multiple branch hospital information is carried out in Office


packages locally and is sent through mails for reference. This increase the data
redundancy and non-availability of data in time. Hence an application is required to
eliminate the drawbacks in the existing system.

So, this project identifies that, it helps for preventing such problems. The software
used to solve the problem and develop the application is Microsoft Visual Studio .Net
2005 with coding language C# and MS-SQL Server 2000.

The problem is taken in to consideration and tries to solve the problem using
following modules.

1. Database (With visit data only) management in hospital Server.

2. Database (With all regular visits, prescription and receipt data) Management in
Cloud Space.

3. Hospital and Patient Login Provision.


5.2 OVERVIEW OF THE PROJECT

The project deals with the hospital branch and patients management. Since cloud
computing delivers convenient, on-demand access to shared pools of data, applications
and hardware over the internet, it provides unlimited infrastructure to store and execute
patient data and program.

Due to this redundancy the data can be easily modified by unauthorized users
which can be stored in the database. This leads to loss of data privacy and security to
database. The proposed scheme ensures that cyclic redundancy check and time-tested
practices and technologies for managing trust relationships in traditional enterprise
environments can be extended to work effectively in both private and public clouds.
Those practices include data encryption, strong authentication and fraud detection, etc.

The testing application to enable Data Storage Security in Cloud Computing for
Hospital Enterprises designed using Microsoft Visual Studio .Net 2005 as front end. The
coding language used is Visual C# .Net. The web technology used is ASP .Net 2005.
MS-SQL Server 2000 is used as back end database.
5.3 MODULE DESCRIPTION

The following modules are present in the project.

5.3.1 Database (With visit data only) management in hospital Server.

5.3.2 Database (With all regular visits, prescription and receipt data)
Management in Cloud Space.

5.3.3 Hospital and Patient Login Provision.

5.3.1 Database (With visit data only) management in hospital Server

In this module, the hospital server is updated with the day to day visit results of
the transactions made by them. Since the server requirement is to minimum (since the
cloud manage every data (here the hardware resources are kept to be minimum)), only
un-encrypted information is to be stored in data owner’s (hospital) space. This is to verify
the data integrity between the data replicated redundantly in more cloud spaces. The data
to be stored in strongly encrypted in both the places.

5.3.2 Database (With all regular visits, prescription and receipt data) Management
in Cloud Space

In this module, the cloud server is updated with the day to day visit details,
prescription and receipt made by them. The cloud provider manages all data (here the
hardware resources are kept to be maximum). The kind of users accessing the data is
more and so different privileges are to be assigned to them so that unauthorized data
modification or theft is prevented. The data is encrypted and stored so that the all users
(except content owner) are unable to view the actual data.

5.3.3 Hospital and Patient Login Provision

In this module, different kind of privileges is assigned to different users so that


they can view and access the data according to their requirements. The key arrangements
are made such that content owner can modify all the data, the users only view the data.
5.4 SYSTEM FLOW DIAGRAM

HOSPITAL CLOUD (PATIENTS MANAGEMENT)

TABLETS BRANCH PATIENT USER REPORTS


MANAGEMENT

TABLET BRANCH PATIENT CREATE


ENTRY ENTRY ENTRY USER

EDIT EDIT VISIT ENTRY VIEW


TABLET BRANCH

RECEIPT ENTRY
BRANCH VIEW
DELETE DELETE
TABLET BRANCH
PRESCRIPTION
PATIENTS
ENTRY
DOCTOR VIEW
ENTRY
VISITS VIEW

EDIT
DOCTOR
RECEIPT VIEW

DELETE
DOCTOR PRESCRIPTION
VIEW

DOCTORS
VIEW
REPORTS

BRANCHES

PATIENTS

TABLETS

RECEIPT VIEW

RECEIPT VIEW PRESCRIPTION


VIEW

ALL PATIENT ID
WISE
5.5 DATA FLOW DIAGRAM

FIG 5.5.1 DATA FLOW DIAGRAM (MASTERS)

Hospital Users Tablet Entry Tablets


Login in
hospital server

Branch Entry

Patient Doctor
Entry Entry

Branch

Patients Doctors

Hospital
HospitalDatabase
Database
Updation Branch

Hospital User
Login in Cloud HospitalUsers
Space

Database
Updation in CloudDB
Cloud Server

Users Login
Provision Users
FIG 5.5.2 DATA FLOW DIAGRAM (TRANSACTIONS)

Admin Login
Admin

Visit

Entry

Prescription
Entry Prescription

Visits

Tablets

Receipt Entry
Receipt
5.6 DATABASE DESIGN
The most important consideration in designing the database is, how information
will be used. The main objectives of designing a database are:
Data Integration:

In a database, information from several files are coordinated, accessed and


operated upon as through it is in a single file. Logically, the information are centralized,
physically, the data may be located on different devices, connected through data
communication facilities.
Data Integrity:

Data integrity means storing all data in one place only and how each application
to access it. This approach results in more consistent information, one update being
sufficient to achieve a new record status for all applications. This leads to less data
redundancy; data items need not be duplicated; a reduction in the direct access storage
requirement.
Data Independence:

Data independence is the insulation of application programs from changing


aspects of physical data organization. This objective seeks to allow changes in the content
and organization of physical data without reprogramming of applications and to allow
modifications of application programs without reorganizing the physical data.

The tables needed for each module were designed and the specification of each
and every column based on the records is provided and details collected during record
specification of the system study.

The major objectives for maintaining such a database are:


 The database must reduce redundancy
 Enforce standards
 Share data and maintain integrity
 The data must be independent and consistent
 We must be able to apply security restrictions
5.6.1 TABLE: ADMIN

Purpose: To store the username and passwords of the hospital.

FIELDNAME TYPE SIZE DESCRIPTION

HospitalAdminUsername Varchar 15 Unique

HospitalAdminPassword Varchar 15

CreatedBy Varchar 15

LastLogoutTime Datetime 8

BranchId Varchar 20 Foreign Key

5.6.2 TABLE: BRANCH

Purpose: To store the branch details of the hospital.

FIELDNAME TYPE SIZE DESCRIPTION

BranchName Varchar 50

BranchId Varchar 20 PRIMARY KEY

EntryDate Datetime 8

Street Varchar 50

Address Varchar 200

City Varchar 50

State Varchar 30
5.6.3 TABLE: DOCTORS

Purpose: To store the doctor details of the hospital.

FIELDNAME TYPE SIZE DESCRIPTION

BranchId Varchar 20 Foreign Key

DoctorID Varchar 20 Primary Key

DoctorType Varchar 20 InHospital/


Visiting

Name Varchar 50 Name of the


doctor

Sex Varchar 10 Male/ Female

DOB Datetime 8 Date of Birth

EntryDate Datetime 8 Date of Join

Nationality Varchar 50 Country

Occupation Varchar 100

AnnualIncome Numeric 9

FatherName Varchar 30

VisitingFrom Varchar 30

VisitingTo Varchar 30

Street Varchar 50

Address Varchar 200

City Varchar 50

State Varchar 30

PinCode Varchar 6

Telephone Varchar 20
Fax Varchar 20

Mobile Varchar 12

EMailID Varchar 50

5.6.4 TABLE: PATIENTS

Purpose: To store the patient details such as name and address.

FIELDNAME TYPE SIZE DESCRIPTION

BranchId Varchar 20 FOREIGN KEY

PatientId Varchar 20 PRIMARY KEY

PatientType Varchar 20 Normal/Prolonged


Disease

CustomerId Varchar 20

Name Varchar 50

Sex Varchar 10 Male/Female

Dob Datetime 8

HealthCardIdIfAny Varchar 50

EntryDate Datetime 8

Nationality Varchar 50

Occupation Varchar 100

AnnualIncome Numeric 9

FatherName Varchar 30
GuardianName Varchar 30

Relationship Varchar 30

OperatingInstruction Varchar 300

Street Varchar 50

Address Varchar 200

City Varchar 50

State Varchar 30

Pincode Varchar 6

Telephone Varchar 20

Fax Varchar 20

Mobile Varchar 12

EmailId Varchar 50

5.6.5 TABLE: TABLETS

Purpose: To store the tablet details.

FIELDNAME TYPE SIZE DESCRIPTION

TabletCode Int 10 PRIMARY KEY

TabletName Varchar 50

Category Varchar 20
5.6.6 TABLE: VISITTRANS [HOSPITAL CLOUD WEB DATABASE]

Purpose: To store the patient visit details such as disease and treatment along with charge.

FIELDNAME TYPE SIZE DESCRIPTION

SNo Int 4 Unique

EncBranchId Varchar 1024

EncPatientId Varchar 1024

EncDateOFVisit Varchar 1024

EncDisease Varchar 1024

EncTreatment Varchar 1024

EncCharge Varchar 1024

EncDoctor Varchar 1024

EncPlace Varchar 1024

5.6.7 TABLE: RECEIPT [HOSPITAL CLOUD WEB DATABASE]

Purpose: To store the patient receipt details.

FIELDNAME TYPE SIZE DESCRIPTION

SNo Int 4 Unique

EncBranchId Varchar 1024

EncPatientId Varchar 1024

EncDateOFReceipt Varchar 1024


EncRemarks Varchar 1024

EncChequeNo Varchar 1024

EncCharge Varchar 1024

EncDoctor Varchar 1024

EncPlace Varchar 1024

5.6.8 TABLE: PRESCRIPTION [HOSPITAL CLOUD WEB DATABASE]

Purpose: To store the patient prescription details.

FIELDNAME TYPE SIZE DESCRIPTION

SNo INT 4 PRIMARY KEY

EncBranchId VARCHAR 1024

EncPatientId VARCHAR 1024

EncDateOfPrescription VARCHAR 1024

EncAllTablets VARCHAR 1024

EncRemarks VARCHAR 1024

EncCharge VARCHAR 1024

EncDoctor VARCHAR 1024

EncPlace VARCHAR 1024


5.6.9 TABLE: USER CREDENTIALS [HOSPITAL CLOUD WEB DATABASE]

Purpose: To store the user credential such as user name and password to access the web
application.

FIELDNAME TYPE SIZE DESCRIPTION

SNo Int 4 Unique

UserType Varchar 1024

UserName Varchar 1024

Password Varchar 1024

5.6.10 TABLE: HOSPITAL ADMIN USERS

Purpose: To store the username and passwords of the administrator for web application.

FIELDNAME TYPE SIZE DESCRIPTION

Username Varchar 15 Unique

Password Varchar 15
5.7 INPUT DESIGN

Input design is the process of converting user-originated inputs to a computer


understandable format. Input design is one of the most expensive phases of the operation
of computerized system and is often the major problem of a system. A large number of
problems with a system can usually be tracked backs to fault input design and method.
Every moment of input design should be analyzed and designed with utmost care.

The design of the input should be made the input as the over to the numerous
networks in the reliable area that should be passed as the installation in the remote
network. It has the following constraints in the input database.

 All the files from the disk should be acquired by data.


 It is suitable to more available data clearance and made available.
 The menu of design should be understandable and it is in the right format.

The system takes input from the users, processes it and produces an output. Input
design is link that ties the information system into the world of its users. The system
should be user-friendly to gain appropriate information to the user. The decisions made
during the input design are,

The project gives the low time consumption to make the sensitive application
made simple. When applying the project it provides the low man-power attrition with the
reasonable output.

The amount of fund that the company can spend into the research and
development of the system is limited. The expenditures must be justified. Thus the
developed system as well within the budget and this was achieved because most of the
technologies used are freely available. Only the customized products had to be purchased.
In this system mainly used to protect the system and files giving file path input
option. Mail sending utility input as sends the Email to recipient with attachment. System
analysis decide the following input design details like, what data to input, what medium
to use, how the data should be arranged or coded, data items and transactions needing
validations to detect errors and at last the dialogue to guide user in providing input.

Input data of a system may not be necessarily is raw data captured in the system
from scratch. These can also be the output of another system or subsystem. The design of
input covers all the phases of input from the creation of initial data to actual entering of
the data to the system for processing. The design of inputs involves identifying the data
needed, specifying the characteristics of each data item, capturing and preparing data fro
computer processing and ensuring correctness of data.

Input design is the process of converting user-originated inputs to a computer-


based format. Input design is one of the most expensive phases of the operation of
computerized system and is often the major problem of a system.

Any Ambiguity in input leads to a total fault in output. The goal of designing the
input data is to make data entry as easy and error free as possible. In the project, the
patient details, visits, prescriptions and receipts are the input given and saved in database
with all transactions encrypted and saved.

The various forms used to implement the windows application project concept
are:

5.7.1 Database (With visit data only) management in hospital Server.

5.7.2 Database (With all regular visits, prescription and receipt data)
Management in Cloud Space.

5.7.3 Hospital and Patient Login Provision.


5.7.1 Database (With visit data only) management in hospital Server

In this form, the hospital server is updated with the day to day visit results of the
transactions made by them. Since the server requirement is to minimum (since the cloud
manage every data (here the hardware resources are kept to be minimum)), only un-
encrypted information is to be stored in data owner’s (hospital) space.

5.7.2 Database (With all regular visits, prescription and receipt data) Management
in Cloud Space

In this form, the cloud server is updated with the day to day visit details,
prescription and receipt made by them. The cloud provider manages all data (here the
hardware resources are kept to be maximum). The kind of users accessing the data is
more and so different privileges are to be assigned to them so that unauthorized data
modification or theft is prevented.

5.7.3 Hospital and Patient Login Provision

In this form (hospital and patient login), different kind of privileges is assigned to
different users so that they can view and access the data according to their requirements.
The key arrangements are made such that content owner can modify all the data, the users
only view the data.
5.8 OUTPUT DESIGN

Output design generally refers to the results and information that are generated by
the system for many end-users; it should be understandable with the enhanced format.
The Output of the software is used to make the remote installation of the new software in
the system and, it is awake the immediate alert to the system that should be enhanced it as
the input to the system. Output is the main reason for developing the system and the basis
on which they evaluate the usefulness of the application.

Computer output is the most important direct source of information to the user
output design deals with form design efficient output design should improve the
interfacing with user. The term output applies to any information produced by an
information system in terms of displayed. When analyst design system output, they
Identify the specific output that is needed to meet the requirements of end user.
Previewing the output reports by the user is extremely important because the user is the
ultimate judge of the quality of the output and, in turn, the success of the system

When designing output, system analysis accomplishes more things like, to


determine what applications, websites or documents whether blocked or allowed.
Allowing should be in various options. The output is designed in such a way that it is
attractive, convenient and informative. Forms are designed in VB.NET with various
features, which make the console output more pleasing. As the outputs are the most
important sources of information to the users, better design should improve the system’s
relationships with user and also will help in decision-making. Form design elaborates the
way output is presented and the layout available for capturing information.

In the project, the patients list, visits list, prescription list and receipt list are displayed in
data grid view controls. The following output forms are available.

5.8.1 Database (Visits, Prescription and Receipt) Management in Cloud Space

In this form, the day to day visit details records are displayed (from cloud server),
prescription and receipt are also displayed. The encrypted data is fetched, decrypted and
displayed.
6. SYSTEM TESTING

After the source code has been completed, documented as related data structures.

Completed the project has to undergo testing and validation where there is subtitle and

definite attempt to get errors.

The project developer treads lightly, designing and execution test that will

demonstrates that the program works rather than uncovering errors, unfortunately errors

will be present and if the project developer doesn’t find them, the user will find out.

The project developer is always responsible for testing the individual units i.e.

modules of the program. In many cases developer also conducts integration testing i.e.

the testing step that leads to the construction of the complete program structure.

This project has undergone the following testing procedures to ensure its

correctness.

1. Unit testing

2. User Acceptance Testing

6.1 UNIT TESTING

In unit testing, we have to test the programs making up the system. For this
reason, Unit testing sometimes called as Program testing. The software units in a system
are the modules and routines that are assembled and integrated to perform a specific
function, Unit testing first on the modules independently of one another, to locate errors.
This enables, to detect errors in coding and logic that are contained with the module
alone. The testing was carried out during programming stage itself.
6.2 USER ACCEPTANCE TESTING

In these testing procedures the project is given to the customer to test whether all
requirements have been fulfilled and after the user is fully satisfied. The project is
perfectly ready. If the user makes request for any change and if they found any errors
those all errors has to be taken into consideration and to be correct it to make a project a
perfect project.
7. SYSTEM IMPLEMENTATION

When the initial design was done for the system, the client was consulted for the
acceptance of the design so that further proceedings of the system development can be
carried on. After the development of the system a demonstration was given to them about
the working of the system. The aim of the system illustration was to identify any
malfunction of the system.

After the management of the system was approved the system implemented in the
concern, initially the system was run parallel with existing manual system. The system
has been tested with live data and has proved to be error free and user friendly.

Implementation is the process of converting a new or revised system design into


an operational one when the initial design was done by the system; a demonstration was
given to the end user about the working system.

This process is uses to verify and identify any logical mess working of the system
by feeding various combinations of test data. After the approval of the system by both
end user and management the system was implemented.

System implementation is made up of many activities. The six major activities are
as follows.

Coding

Coding is the process of whereby the physical design specifications created by


the analysis team turned into working computer code by the programming team.

Testing

Once the coding process is begin and proceed in parallel, as each program module
can be tested.

Installation

Installation is the process during which the current system is replaced by the new
system. This includes conversion of existing data, software, and documentation and work
procedures to those consistent with the new system.
Documentation

It is result from the installation process, user guides provides the information of
how the use the system and its flow.

Training and support

Training plan is a strategy for training user so they quickly learn to the new
system. The development of the training plan probably began earlier in the project.

The best-suited application package to develop the system is Visual C# .NET


under windows XP’ environment.
8. CONCLUSION AND SCOPE FOR FURTHER ENHANCEMENTS

It is believed that almost all the system objectives that have been planned at the
commencement of the software development have been net with and the implementation
process of the project is completed. A trial run of the system has been made and is giving
good results the procedures for processing is simple and regular order. The process of
preparing plans been missed out which might be considered for further modification of
the application. The project effectively stores and retrieves the records from the cloud
space database server. The records are encrypted and decrypted whenever necessary so
that they are secure.

SCOPE FOR FUTURE DEVELOPMENT

The following enhancements are should be in future.

 The application if developed as web services, then many applications can


make use of the records.
 The next visit details can be sent as SMS to patients.
 The web site and database can be hosted in real cloud place during the
implementation.
9. APPENDIX

9.1 SCREEN SHOTS

LOGIN FORM
TABLET MENU

BRANCH MENU
PATIENT MENU

USER MANAGEMENT MENU


VIEW MENU

REPORTS MENU
TABLET FORM

BRANCH FORM
DOCTOR FORM
PATIENT FORM
USER FORM
UPDATE VISIT DETAILS FORM

UPDATE PRESCRIPTION DETAILS FORM


UPDATE PRESCRIPTION DETAIL FORM
VIEW BRANCHES

PATIENTS LIST
TABLETS VIEW

PATIENTS VISIT LIST


PATIENTS VISIT DETAILS (ENCRYPTED)

PATIENTS PRESCRIPTIONS LIST


PATIENTS RECEIPT LIST
BRANCHES LIST

PATIENTS LIST
TABLETS LIST

ALL PATIENTS VISIT


ALL PRESCRIPTIONS

ALL PATIENTS RECEIPT


HOME PAGE
LOGIN PAGE
ADMINISTRATOR OPTIONS
USER CREDENTIALS
VIEW PATIENTS
VIEW VISITS
VIEW RECEIPTS
VIEW PRESCRIPTIONS
CHANGE PASSWORD
PATIENT LOGIN PAGE
PATIENT OPTIONS
VIEW VISIT DETAILS (PATIENT WISE)
VIEW PRESCRIPTIONS (PATIENT WISE)
CLOUD PROVIDER LOGIN
VIEW RECORDS COUNT
9.2 SOURCE CODE

MAIN FORM

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace SecureCloud

public partial class frmMainHospital : Form

public frmMainHospital()

InitializeComponent();

private void updateAccountingDataToCloudDatabaseToolStripMenuItem_Click(object


sender, EventArgs e)

frmUpdateVisitDetails f = new frmUpdateVisitDetails();

f.Show();

private void createUSerToolStripMenuItem_Click(object sender, EventArgs e)

frmUserCreation f = new frmUserCreation();


f.Show();

private void frmMainHospital_Load(object sender, EventArgs e)

this.Visible = false;

frmLogin f = new frmLogin();

f.ShowDialog();

if (f.ok)

this.Visible = true;

else

Application.Exit();

private void frmMainHospital_FormClosing(object sender, FormClosingEventArgs e)

if (cls.con.State != ConnectionState.Open)

cls.con.Open();

cls.cmd.CommandText = "Update HospitalAdminUsers Set lastLogouttime='" +


string.Format("{0:MM-dd-yyyy hh:mm tt}", DateTime.Now) + "' Where
HospitalAdminUserName='" + cls.loggedusername + "'";

cls.cmd.ExecuteNonQuery();

cls.con.Close();

private void accountCreationToolStripMenuItem_Click(object sender, EventArgs e)

frmPatientCreation f = new frmPatientCreation();

f.Show();

}
private void viewAccountsToolStripMenuItem_Click(object sender, EventArgs e)

frmView f = new frmView();

f.viewtype = 1;

f.Show();

private void viewAccountDataToolStripMenuItem_Click(object sender, EventArgs e)

frmView f = new frmView();

f.viewtype = 2;

f.Show();

private void viewEncryptedAccountDataToolStripMenuItem_Click(object sender,


EventArgs e)

frmView f = new frmView();

f.viewtype = 3;

f.Show();

private void updateAggregateDataToolStripMenuItem_Click(object sender, EventArgs


e)

frmUpdateAggregateData f = new frmUpdateAggregateData();

f.Show();

private void viewAggregateDataToolStripMenuItem_Click(object sender, EventArgs e)

frmView f = new frmView();

f.viewtype = 3;
f.Show();

private void changeCloudWebDataToolStripMenuItem_Click(object sender, EventArgs


e)

string accno = "";

string encaccno = "";

string encdateoftransaction = "";

string encamount = "";

string enctype = "";

accno = Microsoft.VisualBasic.Interaction.InputBox("Enter Account No", "Account


No.", "00002", 100, 100);

if (cls.cloudcon.State != ConnectionState.Open)

cls.cloudcon.Open();

try

EncryptMessage(ref encaccno, accno);

cls.cloudcmd.CommandText = "Select EncDateOfTransaction From AccountTrans


Where EncAccountNo Like '" + encaccno + "'";

string accdatestr = "";

if (cls.cloudcmd.ExecuteScalar() == null)

else if (cls.cloudcmd.ExecuteScalar() == DBNull.Value)

}
else

accdatestr = cls.cloudcmd.ExecuteScalar().ToString();

string decryptedaccdatestr = "";

DecryptText(accdatestr, ref decryptedaccdatestr);

//EncryptMessage(ref encdateoftransaction, d1.Text);

string amount = "0";

string encryptedamount = "";

string encryptedtype = "";

EncryptMessage(ref encryptedamount, amount);

EncryptMessage(ref encryptedtype, "Debit");

cls.cloudcmd.CommandText = "Update AccountTrans Set EncAmount='" +


encryptedamount + "' Where EncAccountNo Like '" + encaccno + "' and
EncDateOfTransaction Like '" + accdatestr + "' and EncType Like '" + encryptedtype + "'";

if (cls.cloudcmd.ExecuteNonQuery() > 0)

MessageBox.Show("Data Modified.", "Note", MessageBoxButtons.OK,


MessageBoxIcon.Information);

else

MessageBox.Show("Data Not Modified.", "Note", MessageBoxButtons.OK,


MessageBoxIcon.Information);

catch (Exception ex1)

MessageBox.Show(ex1.Message, "Error", MessageBoxButtons.OK,


MessageBoxIcon.Error);

finally

cls.cloudcon.Close();

}}
public void EncryptMessage(ref string encaccno, string accno)//ref byte[] key)

System.Text.UTF8Encoding utf8 = new System.Text.UTF8Encoding();

byte[] key = utf8.GetBytes(txtKey.Text);

//Dim key() As Byte = _ {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, _ 15, 16, 17, 18, 19,
20, 21, 22, 23, 24}

byte[] iv = { 8, 7, 6, 5, 4, 3, 2, 1 };

// instantiate the class with the arrays

clsTripleDES des = new clsTripleDES(key, iv);

encaccno = des.Encrypt(accno);

public void DecryptText(string message, ref string decryptedMessage)//ref byte[] key)

System.Text.UTF8Encoding utf8 = new System.Text.UTF8Encoding();

byte[] key = utf8.GetBytes(txtKey.Text);

byte[] iv = { 8, 7, 6, 5, 4, 3, 2, 1 };

// instantiate the class with the arrays

clsTripleDES des = new clsTripleDES(key, iv);

decryptedMessage = des.Decrypt(message);

private void exitToolStripMenuItem_Click(object sender, EventArgs e)

Application.Exit();

private void changePasswordToolStripMenuItem_Click(object sender, EventArgs e)

frmChangePassword f = new frmChangePassword();

f.Show();

}
private void exitToolStripMenuItem1_Click(object sender, EventArgs e)

Application.Exit();

private void branchEntryToolStripMenuItem_Click(object sender, EventArgs e)

frmBranch f = new frmBranch();

f.Show();

private void viewBranchesToolStripMenuItem_Click(object sender, EventArgs e)

frmView f = new frmView();

f.viewtype = 4;

f.Show();

private void updateReceiptDetailsToolStripMenuItem_Click(object sender, EventArgs e)

frmUpdateReceiptDetails f = new frmUpdateReceiptDetails();

f.Show();

private void editBranchToolStripMenuItem_Click(object sender, EventArgs e)

frmBranch f = new frmBranch();

f.mode = 2;

f.Show();

private void editTabletToolStripMenuItem_Click(object sender, EventArgs e)

frmTablet f = new frmTablet();


f.mode = 2;

f.Show();

private void deleteTabetToolStripMenuItem_Click(object sender, EventArgs e)

frmTablet f = new frmTablet();

f.mode = 3;

f.Show();

private void deleteBranchToolStripMenuItem_Click(object sender, EventArgs e)

frmBranch f = new frmBranch();

f.mode = 3;

f.Show();

private void addTabletToolStripMenuItem_Click(object sender, EventArgs e)

frmTablet f = new frmTablet();

f.Show();

private void updatePrescriptionDetailsToolStripMenuItem_Click(object sender,


EventArgs e)

frmUpdatePrescriptionDetails f = new frmUpdatePrescriptionDetails();

f.Show();

private void viewPatientReceiptsToolStripMenuItem_Click(object sender, EventArgs e)

frmView f = new frmView();


f.viewtype = 5;

f.Show();

private void viewPatientPrescriptionsToolStripMenuItem_Click(object sender,


EventArgs e)

frmView f = new frmView();

f.viewtype =6;

f.Show();

private void viewTablersToolStripMenuItem_Click(object sender, EventArgs e)

frmView f = new frmView();

f.viewtype = 21;

f.Show();

private void branchesToolStripMenuItem_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 1;

f.Show();

private void patientsToolStripMenuItem_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 2;

f.Show();

}
private void tabletsToolStripMenuItem1_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 3;

f.Show();

private void allToolStripMenuItem_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 41;

f.Show();

private void patientWiseToolStripMenuItem_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 42;

f.Show();

private void toolStripMenuItem5_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 51;

f.Show();

private void toolStripMenuItem6_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 52;

f.Show();
}

private void toolStripMenuItem7_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype =61;

f.Show();

private void toolStripMenuItem8_Click(object sender, EventArgs e)

frmReport f = new frmReport();

f.reporttype = 62;

f.Show();

}
PATIENT CREATION FORM

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.VisualBasic;
using System.Diagnostics;
using System.Data.SqlClient;
namespace SecureCloud
{
public partial class frmPatientCreation
{

private void Button2_Click(System.Object sender, System.EventArgs e)


{
try
{
int Status = 0;
string Gender = "";

if (cls.con.State != ConnectionState.Open)

cls.con.Open();

if (cls.cloudcon.State != ConnectionState.Open)

cls.cloudcon.Open();

cls.cmd.CommandText = "Delete from Patients where PatientID='" + T2.Text + "'";

cls.cmd.ExecuteNonQuery();

cls.cloudcmd.CommandText = "Delete from Patients where PatientID='" + T2.Text +


"'";

cls.cloudcmd.ExecuteNonQuery();

if (R1.Checked == true)
{
Gender = "Male";
}
else if (R2.Checked == true)
{
Gender = "Female";
}

String sql = "";


sql ="insert into Patients(BranchId, PatientID, PatientType, Name, Sex, DOB,
HealthCardIdIfAny, EntryDate, Nationality, Occupation, AnnualIncome, FatherName,
GuardianName, Relationship, OperatingInstruction, Street, Address, City, State, PinCode,
Telephone, Fax, Mobile, EMailID) values('" + comboBox1.Text + "','" + T2.Text + "','" +
C1.Text + "','" + T3.Text + "','" + Gender + "','" + Strings.Format(D1.Value, "MM-dd-yyyy") +
"','" + T4.Text + "','" + Strings.Format(D2.Value, "MM-dd-yyyy") + "','" + T5.Text + "','" +
T6.Text + "'," + T7.Text + ",'" + T8.Text + "','" + T9.Text + "','" + T10.Text + "','" + T11.Text
+ "','" + TxtStreet.Text + "','" + TxtAdd1.Text + "','" + TxtCity.Text + "','" + TxtState.Text +
"','" + TxtPIN.Text + "','" + TxtPhone1.Text + "','" + TxtFax1.Text + "','" + TxtMobile1.Text
+ "','" + TxtEmailId.Text + "')";
cls.cmd.CommandText = sql;
cls.cmd.ExecuteNonQuery();

cls.cloudcmd.CommandText = sql;

if (cls.cloudcmd.ExecuteNonQuery() == 1)
{

Interaction.MsgBox("Patient Details Saved", MsgBoxStyle.Information,"Note");


}
else
{
Interaction.MsgBox("Patient Details Not Saved", MsgBoxStyle.Information,"Note");
}

ClearForm();

}
catch (Exception ex)
{
Interaction.MsgBox(ex.Message, MsgBoxStyle.Critical,"Error");
}
finally
{
cls.con.Close();
cls.cloudcon.Close();
}
}

private void ClearForm()


{
foreach (Control x in GroupBox1.Controls)
{
if (x is TextBox)
{
x.Text = "";
}

}
foreach (Control x in GroupBox3.Controls)
{
if (x is TextBox)
{
x.Text = "";
}
}
}

private void Button1_Click(System.Object sender, System.EventArgs e)


{
foreach (Control x in GroupBox1.Controls)
{
if (x is TextBox)
{
x.Text = "";
}
}

if (cls.cloudcon.State != ConnectionState.Open)
cls.cloudcon.Open();
cls.cloudcmd.CommandText = "Select Count(*)From Patients";
int cnt = 0;
cnt =int.Parse(cls.cloudcmd.ExecuteScalar().ToString()) + 1;

T2.Text = "0000" + cnt;

comboBox1.Focus();
}

private void Button3_Click(System.Object sender, System.EventArgs e)


{
try
{
if (cls.cloudcon.State != ConnectionState.Open) cls.cloudcon.Open();
string accNo = Interaction.InputBox("Enter Patient ID","Patient ID","",100,100);

cls.cloudcmd.CommandText = "Select * From Patients Where PatientID='" + accNo +


"'";
SqlDataReader r = null;
r = cls.cloudcmd.ExecuteReader();
if (r.Read())
{
comboBox1.Text = r[0].ToString();
T2.Text = r[1].ToString();
C1.Text = r[2].ToString();
T3.Text = r[4].ToString();
if (r[5].ToString() == "Male")
{
R1.Checked = true;
R1.Text = "Male";
R2.Text = "Female";
}
else if (r[5].ToString() == "Female")
{
R2.Checked = true;
R1.Text = "Male";
R2.Text = "Female";
}

D1.Text = r[6].ToString();
T4.Text = r[7].ToString();
D2.Text = r[8].ToString();
T5.Text = r[9].ToString();
T6.Text = r[10].ToString();
T7.Text = r[11].ToString();
T8.Text = r[12].ToString();
T9.Text = r[13].ToString();
T10.Text = r[14].ToString();
T11.Text = r[15].ToString();
TxtStreet.Text = r[16].ToString();
TxtAdd1.Text = r[17].ToString();
TxtCity.Text = r[18].ToString();
TxtState.Text = r[19].ToString();
TxtPIN.Text = r[20].ToString();
TxtPhone1.Text = r[21].ToString();
TxtFax1.Text = r[22].ToString();
TxtMobile1.Text = r[23].ToString();
TxtEmailId.Text = r[24].ToString();

else
{
Interaction.MsgBox("Record Not Found", MsgBoxStyle.Information,"Note");
}
r.Close();
}
catch (Exception ex)
{
Interaction.MsgBox(ex.Message, MsgBoxStyle.Critical, "Note");
}
finally
{
cls.cloudcon.Close();
}
}
private void Button4_Click(System.Object sender, System.EventArgs e)
{
try
{
if (cls.cloudcon.State != ConnectionState.Open)
cls.cloudcon.Open();

string accno = Interaction.InputBox("Enter Patient ID","Patient ID","",100,100);

cls.cloudcmd.CommandText = "Delete from Patients where PatientID='" + accno + "'";


if (cls.cloudcmd.ExecuteNonQuery() > 0)
{
if (cls.con.State != ConnectionState.Open)
cls.con.Open();

cls.cmd.CommandText = "Delete from Patients where PatientID='" + accno + "'";


cls.cmd.ExecuteNonQuery();

cls.con.Close();
Interaction.MsgBox("Patient ID. Deleted", MsgBoxStyle.Information, "Note");
}
else
{
//MsgBox("Patient ID. Not Deleted", MsgBoxStyle.Information)
Interaction.MsgBox("Mismatched Patient ID.", MsgBoxStyle.Information, "Note");
}

}
catch (Exception ex)
{
Interaction.MsgBox(ex.Message, MsgBoxStyle.Critical, "Error");
}
finally
{
if (cls.cloudcon.State != ConnectionState.Closed)
cls.cloudcon.Close();

}
}

private void Button5_Click(System.Object sender, System.EventArgs e)


{
this.Close();
}

private void frmPatientCreation_Load(object sender, EventArgs e)


{
if (cls.con.State != ConnectionState.Open)
{
cls.con.Open();
}
cls.cmd.CommandText = "select BranchId from Branch";
SqlDataReader r = cls.cmd.ExecuteReader();
while (r.Read())
{
comboBox1.Items.Add(r[0].ToString());
}
r.Close();

}
}
10. REFERENCES

BOOK REFERENCES

1. Alistair Mc Monnies, “Object-Oriented Programming in Visual C#. NET”,


Pearson Education, and ISBN: 81-297-0649-0, First Indian Reprint 2004.

2. Robert D.Schneider, Jetty R.Garbus, “Optimizing SQL Server”, Second Edition,


Pearson Education Asia, ISBN: 981-4035-20-3

3. Herbert Schildt, “C# 2.0, The Complete Reference”, Osborne Complete Reference
Series.

WEB REFERENCES

1. http://msdn.microsoft.com
2. http://www.c-sharpcorner.com
3. http://www.codeproject.com
4. http://www.programmersheaven.com

You might also like