2online Organ and Blood Donation Management System
2online Organ and Blood Donation Management System
2online Organ and Blood Donation Management System
INTRODUCTION
1
CHAPTER 2
LANGUAGE CHOICE
The common language runtime (CLR) is responsible for runt-time services such
as language integration; security enforcement; and memory, process and thread
management. In addition, it has a roll at development time when features such as life
cycle management strong type naming, cross-language exception handling, dynamic
binding and so on, reduce the amount of code that a developer must write to turn the
business logic the reusable component. The runtime can be hosted by high performance,
server-side applications, such a s Microsoft Internet Information Services (IIS) for
building web applications with ASP.NE and the next release of Microsoft SQL Server.
This infrastructure enables you to use code “managed “ by the .NET framework to write
your business logic, while still enjoying the superior performance of the industry’s best
enterprises servers that support runtime hosting.
2.1 ASP.NET
Creating ASP.NET applications is much simpler. ASP.NET uses the Common
Language Runtime (CLR) provided by .NET framework. It is a programming framework
that is used to create enterprise-class web applications. The enterprise-class web
applications are accessible on a global basis, leading to efficient information
management. ASP.NET is integrated with Visual Studio.Net, which provides a GUI
designer, a rich e CLR allows objects, which are created in different languages, to
interact with each other and hence removes the language barrier.
o ASP.NET drastically reduces the amount of code required to build large applications.
o ASP.NET makes development simpler and easier to maintain with an event-driven,
server-side programming model
2
o ASP.NET pages are easy to write and maintain because the source code and HTML
are together
o The source code is executed on the server. The pages have lots of power and
flexibility by this approach
o The source code is compiled the first time the page is requested. Execution is fast as
the Web Server compiles the page the first time it is requested. The server saves the
compiled version of the page for use next time the page is requested.
o The HTML produced by the ASP.NET page is sent back to the browser. The
application source code you write is not sent and is not easily stolen
o ASP.NET makes for easy deployment. There is no need to register components
because the configuration information is built-in
o The Web server continuously monitors the pages, components and applications
running on it. If it notices memory leaks, infinite loops, other illegal software or
activities, it seamlessly kills those activities and restarts itself
o ASP.NET validates information (validation controls) entered by the user without
writing a single line of code
o ASP.NET easily works with ADO .NET using data-binding and page formatting
features.
3
The .NET framework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet. The .NET framework
is designed to fulfill the following objectives:
1. To provide a consistent object-oriented programming environment whether object
code is stored and executed locally, but Internet-distributed or executed remotely.
2. To provide a code-execution environment that minimizes software deployment and
versioning conflicts.
3. To provide a code-execution environment that guarantees safe execution of code
including code created by an unknown or semi-trusted third party.
4. To provide a code-execution environment that eliminates the performance problems of
scripted or interpreted environments.
5. To make the developer experience consistent across widely varying types of
applications, such as Windows-based application and web-based applications.
6. To build all communication on industry standards to ensure that code based on the .net
framework can integrate with any other.
4
Class Libraries
Class Libraries, the other main component of the .NET framework, is a
comprehensive, object-oriented collection of reusable type that you can use 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. We can use the .net framework to develop
the following types of applications and services.
1. Console applications.
2. Scripted or hosted applications
3. Windows GUI applications (Windows form)
4. ASP.NET applications
5. XML Web Services
6. Windows Services
2.3 About C#
5
that those developers call for .Developers familiar with these languages can quickly
become productive in C#.
Features of C#
1 Emerging web programming standards
2 Eliminates Productivity and safety
3 Embraces costly programming errors
4 Reduces development costs with built in support versioning
5 Power , Expressiveness and flexibilility
6 Better mapping between business process and implementation
7 Extensive Interoperability
6
relational model ideal for traction processing systems, and thus for multi-user and
client/server database.
Microsoft SQL Server 2008 features include:
Internet Integration.
The SQL Server 2008 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 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 2008 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.
The SQL Server 2008 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 2008 includes a set of administrative and development tools that
improve upon the process of installing, deploying, managing, and using SQL Server
7
across several sites. SQL Server 2008 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.
Data warehousing
SQL Server 2008 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.
8
CHAPTER 3
SYSTEM ANALYSIS
System analysis is the process of gathering and interpreting facts, diagnosing the
problem and using the information to recommend improvements on the system. System
analysis is problem solving activity that requires intensive communication between the
system users and the system developers. This is an important phase of any system
development process. The system is studied in the minutest detail and analyzed.
The system analyst plays the role of an interrogator and dwells into the working
of the present system. The system is viewed as a whole and inputs to the system are
identified. Outputs from system are traced through various phases of the processing of the
inputs. The process of the system analysis is largely concerned with determining,
developing and agreeing users requirements perceived in business term. The system
analysis phase is the prime opportunity to communicate the users has conceived the join
understanding to determine the system features.
A detailed study of these processes must be made by the various techniques like
interviews, questionnaires etc. The data collected by these sources must be scrutinized to
arrive to a conclusion. The conclusion is an understanding of how the system functions.
Now this existing system is subjected to close study and the problem areas are
identified. The designer now functions as a problem solver and tries to sort out the
difficulties that the enterprise faces. The solutions are given as a proposal. The proposal
is the weighted with the existing system analytically and the best one is selected. The
proposal is presented to the user for an endorsement by the user. This is a repeating
process that ends as soon as the user is satisfied with this proposal.
9
FEASIBILITY STUDY
All projects are feasible when given unlimited resources and indefinite time. It is both
necessary and prudent to evaluate the feasibility of a project at the earliest possible time.
A feasible study is not warranted for system in which economic justification is observed,
technical risk is low, few legal problems are expected and no reasonable alternatives
exist. An alternative is made of whether the identified user needs may be satisfied using
our recent software and hardware technologies. The study will decide if the proposed
system will be cost effective, from the business point of view and it can be developed in
the existing budgetary constraints. The feasibility study should be relatively sharp and
quick. The gesture should inform the decision of whether to go ahead with a more
detailed analysis. Feasibility study may be documented as a separated report to higher
officials of the top-level management and can be included as appendices to the system
specification. Feasibility and risk analysis is detailed in many worries. If there is more
project risk then the feasibility of producing the quality software is reduced. The study is
done in three phases.
Feasibility
Operational Technical Feasibility
Economical Feasibility
A. Operational Feasibility
Proposed projects are beneficial only if they can be turned into information
systems that will meet the organizations operating requirements. Simply stated, the test of
feasibility asks if the system will work when it is developed and installed. Are there any
major barriers to implementations? Is there sufficient support for the project from the
management? Are current business methods acceptable to the users? Have the users been
involved in the planning and development of the project? Will the proposed system cause
any harm?
10
The purpose of the operational feasibility study is to determine whether the new
system will be used if it is developed and installed and whether there will be resistance
from users that will be resistance from users that will undermine the possible application
benefit.
B. Technical feasibility
Development risk
Resource availability
Technology
Technical feasibility study deals with the hardware as well as the software
requirements. The scope was whether the work for the project is done with the current
requirements and the existing software technology has to be examined in the feasibility
study. The outcome was found to be positive.
C. Economic feasibility
The cost evaluation is weighted against ultimate income or benefit derived from
the developed system or project. Economic justification is generally the "Button line"
11
consideration that includes cost benefit analysis, long term corporate income strategies,
impact on other profit centers or products, cost of resources needed for development and
potential market growth. When compared to the advantage obtained from implementing
the system its cost is affordable. Also the system is designed to meet the modification
required in the future. Therefore most of the modifications can be done without much re-
work.
REQUIREMENT ANALYSIS
The following steps that give the detailed information of the need of proposed
system are:
Performance: During past several decades, the records are supposed to be manually
handled for all activities. The manual handling of the record is time consuming and
highly prone to error. To improve the performance of the Organ and Blood donation
registration, the computerized system is to be undertaken. This project is fully
computerized and user friendly even that any of the members can see the report and
status of the registration and transplantation.
Efficiency: The basic need of this website is efficiency. The website should be efficient
so that whenever a new user submits his/her details the website is updated automatically.
This record will be useful for other users instantly.
Control: The complete control of the project is under the hands of authorized person who
has the password to access this project and illegal access is not supposed to deal with. All
the control is under the administrator and the other members have the rights to just seethe
records not to change any transaction or entry.
12
Security: Security is the main criteria for the proposed system since illegal access may
corrupt the database. So security has to be given in this project.
The existing system is purely manual and all are kept in different books. The
certificate issue is not in time mainly due to two reasons. People are unaware of the
documents presented during the certificate request. The second one is that the flaws made
by the hospital staff. On time issue is not possible. The difficulty is obvious as its time
consuming and tedious. The storage is and data maintenance is tough here.
It is also very difficult and time consuming to answer a specific query and
generation of reports. In manual system there are limits for security and redundancy made
by keeping same information in different registers are higher.
Also in the existing system the user has to approach several times the native
hospital office for the approval of certificates. This is very difficult to carry out. The
government has introduced some web application for easy organ and blood donation
registration. But the main problem with the website is that it fails to integrate all aspect of
organ donation registration and it is not complete.
1. Poor reliability.
2. Time consuming.
3. Minimum Accuracy.
13
4. Chance for wrong entry.
5. Some data is repeated in more than one register. (Data redundancy)
6. Registers will be damaged.
7. It is very time consuming and difficult to search the details from different registers.
8. Report generation consumes lot of time.
9. No data security.
The main aim of this project is to make organ donation registration procedures
convert to distributed environment. This is a user friendly system which reduces
workloads. It is propose to design a system which contains centralized database
containing all details of donors and acceptors. The Online Organ and Blood Donation
Management System is user-friendly software intended for issuing various certificate
sanctions from hospitals and doctors and is stored in a database. The system consumes
less time for submission of application forms for registering as organ donor or acceptor.
Instant reply and registration system makes OOBDMS different.
The main advantage of using this system is that the sanctions are issued at the
right place to right person at right time. Also this will help users to get their prerequisites
for registration done with ease. Also this helps a donor or acceptor to interact with the
doctors, administrators or hospitals from anywhere and ask the suggestions or queries.
14
This web based system is an ideal tool for computerizing the entire registration
process and it can be used in various sub-registrar offices. The time consuming
certificate issue can be made faster and simpler using this system and users can interact
with hospitals. The highlight of the system is that the user does not need a third person
for registration except the approval from the administrator.
15
3.3 SOFTWARE REQUIREMENT SPECIFICATION
3.3.1 INTRODUCTION
3.3.1.1 Purpose
The purpose of the document is to collect and analyze all assorted ideas that have
come up to define the system, its requirements with respect to users. Also, we shall
predict and sort out how we hope this product will be used in order to gain a better
understanding of the project, outline concepts that may be developed later, and document
ideas that are being considered, but may be discarded as the product develops.
16
In short, the purpose of this SRS document is to provide a detailed overview of
our software product, its parameters and goals. This document describes the project's
target audience and its user interface, hardware and software requirements. It defines how
our client, team and audience see the product and its functionality.
3.3.1.2 Scope
This SRS is also aimed at specifying requirements of software to be developed to
assist general hospitals, clinics and other health centers to manage the donor registration
and user maintenance. The SRS can be used as a model for defining a project specific
standard.
3.3.1.3 Reference
DORSO
NHS blood and transplant
www.livingdonorsonline.org
www.matchingdonors.com
3.3.1.4 Overview
The remaining sections of this document provide a general description, including
characteristics of the users of this project, the product's hardware, and the functional and
data requirements of the product.
17
application status. Furthermore, the authorized user's account will be maintained by the
administrator.
This subsection contains the requirements for the online organ and blood donation
documents. These requirements are organized by the features discussed in the vision
document. Features from vision are then refined into use case diagrams and to sequence
diagram to best capture the functional requirements of the system. All these functional
requirements can be traced using tractability matrix.
18
The system shall allow user to cancel the registration.
3.3.2.2.4Email confirmation
The system shall maintain acceptor and donor email information as a required part of user
profile.
The system shall send a request to the donor through email.
The system shall allow user to confirm the completion of registration through email.
3.3.2.2.5Statistics
The system shall display statistical table about recent transplantations, registrations etc.
The system shall enable the public to enter their reviews and ratings.
19
3.3.2.3 User characteristics
The specific users for this system are:
Public
They can either be donors or acceptors. Each member is given a user id
and password, which identifies him uniquely. The options given to each member are
registration, maintenance, find the organ to donate, registering in hospitals for blood
donation, opt for receiving notifications via email or sms, login and password function to
access the system, logout etc.
Administrators
Each member in a donor & acceptor is given a user id and password,
which identifies him uniquely. The options given to administrator are to change
password, maintain donor and acceptor details, update donor and acceptor details, login
and password function to access the system, logout, alerts and feedback for the donors via
sms and email, generate statistic graph, generate report of donor's information etc.
Hospital Management
Each of the hospital is provided with a user id and password. Transplanting
and non transplanting centers can register in the system. Each of them are given with
options to register their hospital names in the system, access the donor and acceptor
details using the unique id numbers of the donor cards, register the transplantation details
along with the donor and acceptor details in case of each transplantation, inform
20
administrator regarding need for blood in case of emergency for alerting the registered
members.
3.3.3.1.1Introduction
This screen provides an interface to input information specific to each user i.e.
donor, acceptor, medical staff, administrator or hospitals and the values are stored in the
central database server.
3.3.3.1.2Input
Each user can enter their personal details in the corresponding registration forms.
There are options with checkboxes, radio button list, textboxes etc for the user to enter
inputs. Selection and entries are done using simple keypad and mouse.
3.3.3.1.3Processing
When the user enter the inputs and click on the submit button provided in these
pages,the system responds by displaying a page containing predefined text along with the
allotted user id.It also respond through emails to the corresponding users.
21
3.3.3.1.4Output
A page containing a predefined text regarding the information given by the user is
displayed. Also email alerts will be sent to the user’s mailbox.
3.3.3.2.1Introduction
This screen provides an interface to the donors and acceptors for getting helps
related to the system. It also provides FAQ facilities to these users. It also helps in
providing a communication between the medical staff and the donors/acceptors.
3.3.3.2.2Input
The donors/acceptors can post their queries and doubts for which the answers can
be provided by the administrators or medical staff. The response can be provided as
comments or emails.
3.3.3.2.3Processing
The queries and doubts posted by the users are stored in the database and they are
displayed in the FAQ pages so that other users can post their answers.
3.3.3.2.4Output
A page containing a predefined text regarding the queries and doubts given by the
user is displayed. Also the replies or responses from other users can be displayed in the
corresponding FAQ pages.
22
3.3.3.3.1Introduction
This screen provides an interface to the users for searching for the donors or
acceptors based on certain search keys. The searches can be filtered according to the
search keys provided by the users
3.3.3.3.2Input
The users can provide fields to filter the search results.
3.3.3.3.3Processing
The search is processed according to the search key by checking the matching
parameters.
3.3.3.3.4Output
The search result is displayed in a window according to the parameters specified
by the users.
3.3.3.4.1Introduction
This module provides with a provision to the administrators for sending email
alerts to the users.
3.3.3.4.2Input
The alerts can be sent online using this module.
3.3.3.4.3Processing
The emails are sent when the admin approves the requests from the users.
3.3.3.4.4Output
23
Emails are sent to the users mail id provided during completing the registration
forms.
3.3.3.5.1Introduction
This module provides with a provision to the administrators for posting the
system activities in the social networking sites to create public awareness and for the
promotions.
3.3.3.5.2Input
The organ donation promotion page on facebook is accessed by clicking on the
facebook logo provided at the bottom of the site.
3.3.3.5.3Processing
The page is redirected to the facebook promotion page for the online organ and
blood donation system.
3.3.3.5.4Output
Facebook page for promoting organ and blood donation and for creating public
awareness is loaded.
24
The user interface for the software shall be compatible to any browser such as Internet
Explorer, Mozilla or Netscape Navigator by which user can access to the system. The
user interface shall be implemented using any tool or software package like asp.net, c#,
css, JavaScript, html etc.
Since the application must run over the internet, all the hardware required to connect
internet will be hardware interface for the system. As for e.g. Modem, WAN – LAN,
Ethernet Cross-Cable etc.
25
3.3.5 Performance Requirement
Reliability
This deals with how reliable the application being built is. The application gives
accurate results and hence is highly reliable.
Efficiency
Every application consumes some resources if it is to perform and complete its
task. The application being built must consume as less memory as possible. However, in
cases when the Production Server is down, the application could take a little more time
than the usual.
Usability
This requirement ensures that the application is user friendly and any person with
or without operational knowledge must be able to use the application with ease. The
terminology used in this application is simple and easy to understand.
Maintainability
The use of applications generally spans over a large period of time and hence their
performance deteriorates as time progresses. Maintainability ensures that the application
must be maintainable delivering the same performance level whenever used.
Flexibility
As time progresses, the expectations from the application may change since user
requirements change with time. Hence, the application must be built in a way to adapt
new changes.
The product shall be based on web and has to be run from a web server. The product shall
take initial load time depending on internet connection strength which also depends on
the media from which the product is run. The performance shall depend upon hardware
components of the client/customer. The software will support simultaneous user access
only if there are multiple terminals. Only textual information will be handled by the
software. Amount of information to be handled can vary from user to user. For normal
26
conditions, 95% of the transactions should be processed in less than 5 seconds. All web
pages generated by the system shall be fully downloadable in no more than 10 seconds
over a 40KBps modem connection. The system shall display confirmation message to
user within 4 seconds after the user submits information to the system.
The system shall be built using a standard web page development tool that conforms to
Microsoft’s GUI standards. There are no memory requirements. The computers must be
equipped with web browsers such as Internet explorer. The product must be stored in
such a way that allows the client easy access to it. Response time for loading the product
should take no longer than five minutes. A general knowledge of basic computer skills is
required to use the product. There shall be consistency in variable names within the
system. The graphical user interface shall have a consistent look and feel.
27
CHAPTER 4
SYSTEM SPECIFICATION
To understand the nature of the software to be built, the software engineer must
understand the information domain of the software, as well as the required function,
performance, and interface. Requirement definition is the activity of translating
information gathered during analysis activity into a document that defines a set of
requirements. Requirement definition is the high abstract description of requirements.
Requirements may be functional or non-functional.
The selection process should be viewed as a project and a project team should be
formed with the help of management.
28
RAM : 512 MB
Hard Disk : 20GB
Server machine
Processor : Core2duo/dual core/AMDAthelon
RAM : 1GB
Hard Disk : 120GB
Implementation Configuration
Client Machine
Processor :Pentium4/AMDSemprone
RAM : 512MB
Hard Disk :20GB
Device for Fingerprintcheck
Server machine
Processor :Core2duo/dual core/AMDAthelon
RAM : 1GB
Hard Disk :120GB
Project is done in ASP. NET with C# 2.0 as front end and SQL Server 2008 as
back end. Microsoft .NET is software that connects information, people, systems and
devices. It spans clients, servers and developer tools and consists of:
The .NET Framework programming model that enables developers to build Web-
based applications which expose their functionality programmatically over a network
using standard protocols such as SOAP and HTTP.
Developer tools such as Microsoft Visual Studio .NET, which provide a rapid
application integrated development environment for programming with the .NET
Framework.
A set of servers including Microsoft Windows 2000, Microsoft SQL, Server and
Microsoft BizTalk Server that integrates, runs, operates and manages XML Web
services and applications.
Client software such as Windows XP, Windows CE and Microsoft Office XP that
helps developers deliver a deep and compelling user experience across a family of
devices and existing products.
The .NET Framework is the programming model of the .NET environment for
building, deploying and running Web- based applications, smart client applications and
XML Web services. It manages much of the plumbing, enabling developers to focus on
writing the business logic code for their applications. The .NET Framework includes the
common language runtime and class libraries.
30
include Microsoft windows, servers and workstations, Pocket PC, Smart Phones and
World Wide Web browsers not the Java Virtual Machine that all other java tools target.
VISUAL STUDIO 2010
The most important language added in this version was the introduction of
generics, which are similar in many aspects to C++ templates. This potentially increases
the number of bugs caught at compile- time instead of run- time by encouraging the use
of strict type checking in areas where it was not possible before, C++ also got a similar
upgrade with the addition of C++/CLI which is slated to replace the use of Managed
C++. Other new features of Visual Studio 2008 include the “Development Designer”
which allows application designs to be validated before deployments, an improved
environment for web publishing when combined with ASP.NET 2.0 and load testing to
see application performance under various sorts of user loads. Visual Studio 2010 also
added extensive 64- bit support.
31
Rich client user interface using windows forms
RAD for the internet using web forms
Code that targets the runtime is known as managed code, while code that does
not target the runtime is known as unmanaged code. The class library, the other main
32
component of the .NET frameworks is a comprehensive, object-oriented collection
reusable types that you can use to develop applications ranging from traditional command
line or graphical user interface (FGUI) applications to application base d on the latest
innovations provided by ASP.NET, such as web forms and XML web services.
The .NET framework can be hosted by unmanaged component that load the
common language runtime into their processes and initiate the execution of managed
code.
ASP.NET works directly with the runtime to enable ASP.NET application and
XML web services, both of which are discussed later in this topic, Mozilla is an example
of unmanaged application that hosts the runtime (in the form of a MIME type extension).
Using mozilla to the host runtime enables you to embed managed components or
windows forms controls in HTML documents. Hosting the runtime in this way makes
mobile code similar to Microsoft Active Xr controls) possible, but with significant
improvement that only managed code can offer, such as semi-trusted execution and
secure isolated file storage.
33
COMMON LANGUAGE RUNTIME (CLR)
The common language runtime (CLR) is responsible for runt-time services such
as language integration; security enforcement; and memory, process and thread
management. In addition, it has a roll at development time when features such as life
cycle management strong type naming, cross-language exception handling, dynamic
binding and so on, reduce the amount of code that a developer must write to turn the
business logic the reusable component. The runtime can be hosted by high performance,
server-side applications, such a s Microsoft Internet Information Services (IIS) for
building web applications with ASP.NET and the next release of Microsoft SQL Server.
This infrastructure enables you to use code “managed “ by the .NET framework to write
your business logic, while still enjoying the superior performance of the industry’s best
enterprises servers that support runtime hosting.
34
CHAPTER 5
SYSTEM DESIGN
This is the phase in which the details of the system selected in the study phase is
designed .Software design is the preliminary step and is also building block of software
engineering. The efficiency software is promoted through design phase. The design phase
begins when the requirement specification document for the software to be developed is
available. Design is the first step to moving from the problem domain to the solution
domain. Design is essentially the bridge between requirement specification and the final
solution for satisfying the requirements.
The quality of the system input determines the quality of the system output. Input
specification describes the manner in which data enter the system for processing. Input
design features can ensure the reliability of the system and produce results from the
accurate data, or they can result in production the input design also determines whether
the user can interact efficiently with the system.
35
Input design is the process of converting a user oriented description to a
computer based system. Input design is designed on estimating what the inputs are and
how often they are to be arranged on the input screen, how frequently the data are to be
collected etc.
36
Manage account
Patients list updation
It is the part of overall system design. The goal of the output design is to capture
the output and get the data into format suitable for the computer. Data flow diagram
identifies the data tone captured and the output to the system. One of the important
features of an information system for users is the output it produces. Output is the
information delivered to the users through the information system. Without quality output
the entire system appears to be unnecessary that users will avoid using it. Users generally
merit the system solely by its output in order to create the most useful output possible.
One works closely with the user through an interactive process, until the result is
considered to be satisfactory.
37
CHAPTER 6
DETAILED DESIGN
Detailed design of a project deals with the entire functionality it handles.A well-
defined detailed description includes major functional components in that application
along with sub modules included and table handled. It shows actual data flow within the
system and how each function handles the data.
6.1Module
OOBDMS provides 5 major functionalities.
6.1.1 - Provide personalized profiles
The system shall allow the user to register their profile.Each user gets a user id
and password during registration.Donors/acceptors can select organs or blood for
donation or acceptance.Hospitals can register as a transplanting or non transplanting
centre, donor or acceptor.Each user can update the profile information.The system shall
allow user to cancel the registration.
Sub-modules
Create profile:- The user can register from the public home page and when the admin
approves the request each of the users gets a profile created.
Update profileThe user can update the details in the profile as and when required.
Registration cancellation:-The user can cancel their registration when needed.
Tables used
tlb_acceptor
tbl_doctor
tbl_donor
38
tbl_hospital
tbl_admin
tbl_cancel
tbl_acceptor_organ
tbl_donor_organ
tbl_bddnr_place
tbl_transplant
Sub-modules
Donor assignment:-Each of the acceptors are assigned with a doctor and a donor
depending upon the condition of the patient.
Enquiry and help:-The users can post their queries and doubts and help facilities are
also provided.
FAQ:-The users can read the frequently asked questions that are updated by the
administrator.
Tables used
tbl_enquiry
tbl_faq
tbl_faqans
tbl_earlydonate
tbl_assign
tbl_bld_donation
tbl_reply
39
tbl_acc_do
Sub-modules
Organ/place/blood group based search:-The admin can search for a user based on
organ,place,blood group etc
Place/blood group/organ selection:-The users are provided with a drop down list
option while specifying their requirements and details.
Tables used
tbl_place
tbl_organ
tbl_bloodgroup
tbl_donor
tbl_bddnr_place
tbl_dept
tbl_organ_dept
40
Sub-modules
Approval notification:-The user id and password is sent to the users mail id.
Alert for blood donors:-The blood donors are notified through emails during
emergency.
Tables used
tbl_donor
tbl_acceptor
tbl_doctor
tbl_hospital
Sub-modules
Tables used
tbl_donor
tbl_acceptor
tbl_hospital
tbl_doctor
41
6.2 DATA FLOW DIAGRAMS
6.2.1 Level 0
42
6.2.2 Level 1 DFD of Public
43
6.2.3 Level 1 DFD of Administrator
44
6.2.4 Level 1 DFD for Donor
45
6.2.5 Level 1 DFD of Acceptor
46
6.2.6 Level 1 DFD of Medical Staff
47
6.2.7 Level 1 DFD of Hospital
48
6.2.8 Level 2 DFD of Administrator
49
6.2.9 Level 2 DFD of Administrator
50
6.2.10 Level 2 DFD of Registration
51
6.3 DATABASE DESIGN
6.3.1tbl_acc_do
6.3.2 tbl_assign
6.3.3tbl_bld_donation
6.3.4 tbl_bloodgroup
6.3.5 tbl_cancel
52
6.3.6 tbl_dept
6.3.7 tbl_doctor
6.3.8 tbl_organ
6.3.9 tbl_organ_dept
6.3.10 tbl_place
53
6.3.11 tbl_reply
6.3.12 tbl_transplant
6.3.13 tlb_acceptor
54
6.3.14 tlb_acceptor_organ
6.3.15 tlb_admin
6.3.16 tlb_bddnr_place
6.3.17 tlb_donor
55
6.3.18tlb_donor_organ
6.3.19 tlb_early_donate
6.3.20 tlb_enquiry
6.3.21tlb_faq
6.3.22tlb_faqans
56
6.2.23tlb_hospital
57
CHAPTER 7
TESTING
The strategy for system testing integrates system test cases and design techniques
into a well – planned series of steps that result in the successful construction of software.
The testing must co-operate with test planning, test case design, test execution and
resultant data collection and re – evaluation. A strategy for software testing must
accommodate a low level test and that are necessary to verify that a small code segment
has correctly implemented as well as high level text that validate major system functions
against user requirements. Software testing is a critical element of software quality
58
assurance and represents the ultimate review specification, design and coding. A series of
testing is performed for the proposed system before the system is ready for acceptance
testing.
In unit testing, different modules are tested against the specification produced
during the design of modules. Unit testing is essential for verification during the coding
phase. The aim is to test the internal logic of modules. The tests are carried out during the
programming stage itself.
59
System testing is testing conducted on a complete, integrated system to evaluate
the system’s compliance with its specified requirements. System testing falls within
category of a Back Box testing and such as, should require no knowledge of the inner
design of the code or logic. Alpha testing and Beta Testing are sub- categories of system
testing. As a rule, system testing takes, as its input, all of the “integrated” software
components that have successfully passed the integration testing.
7. 7 WHITEBOX TESTING
White box testing, glass box testing or structural testing is used in computer
programming, software engineering and software testing to check that the outputs of a
program, given inputs, conform to the structural specification of the program. The term
White Box (glass box) indicates that the testing is done with the knowledge of the code
used to execute certain functionality. For this reason, a programmer is usually requires to
perform white box tests. Often multiple programmers will write based on certain code, so
as to gain perspectives in possible outcomes.
User acceptance testing of the system is the key factor for the success of any
system. The system under consideration is tested for user acceptance by constantly in
60
touch with the perspective system at the time of development and making range
whenever required. This is done with regard to the input screen, design and the output
screen design.
SYSTEM IMPLEMENTATION
System implementation is the final phase that is putting the utility into action.
Implementation is the state in the project where theoretical design turned into working
system. The most crucial stages involve achieving a new successful system and giving
confidence in new system that it will work efficiently and effectively. The system is
implemented only after thorough checking is done and if it is working in accordance with
the specifications.
IMPLEMENTATION PROCEDURES
Test plans
Training
Equipment installation
Conversation
61
TEST PLANS
TRAINING
The purpose of the training is to ensure that all the personnel who are to be
associated with the computer – based administration system possess the necessary
knowledge skills. Operating, programming, and user personnel are trained using
reference manuals as training aids.
EQUIPMENT INSTALLATION
As the name suggests, it deals with installing the equipment. This part deals with
actually the hardware installation.
CONVERSATION
Conversation is the process of performing all of the operations that result directly
in the turn over of the new system to the user. Conversation has 2 parts ;
a. The creation of a conversation plan at the start of the development phase and the
implementation of this plan throughout the development phase.
b.The creation of a system change over plan the end of the development phase and the
62
implementation of the plan at the beginning of the operation phase.
Most popular methods of exchanging data in the IT world can be viewed from 2
perspectives; how companies format data they want to exchange and how they transmit
that. To accomplish these needs of today’s business, developers require a technology that
can be integrated across much different types of systems and that is exactly what web
services do.
63
CHAPTER 8
CONCLUSION
64
CHAPTER 9
ANNEXURE
9.1 CODING
65
}
public DataTable GetDataTable(String querystr)
{
SqlDataAdapter ada = new SqlDataAdapter(querystr, con);
DataTable dt = new DataTable();
ada.Fill(dt);
return dt;
}
public void FillGridView(string querystr, GridView grid)
{
DataTable dt = GetDataTable(querystr);
grid.DataSource = dt;
grid.DataBind();
}
public void FillDetailsView(string querystr, DetailsView dts)
{
DataTable dt = GetDataTable(querystr);
dts.DataSource = dt;
dts.DataBind();
}
public void FillDataList(string querystr, DataList list)
{
DataTable dt = GetDataTable(querystr);
list.DataSource = dt;
list.DataBind();
}
public void FillDrop(DropDownList drop, string display, string valfield, string tbl)
{
string str = "select " + display + "," + valfield + " from " + tbl + "";
66
DataTable dt1 = GetDataTable(str);
drop.DataSource = dt1;
drop.DataTextField = display;
drop.DataValueField = valfield;
drop.DataBind();
drop.Items.Insert(0, "..Select..");
}
public void FillDrop(DropDownList dd1, string display, string valfield, string tbl,
string condition1)
{
string str = "select " + display + "," + valfield + " from " + tbl + " where " +
condition1 + "";
DataTable dt1 = new DataTable();
dt1 = GetDataTable(str);
dd1.DataSource = dt1;
dd1.DataTextField = display;
dd1.DataValueField = valfield;
dd1.DataBind();
dd1.Items.Insert(0, "..Select..");
}
public void FillCheck(CheckBoxList chk, string display, string valfield, string tbl)
{
string str = "select " + display + "," + valfield + " from " + tbl + "";
DataTable dt1 = GetDataTable(str);
chk.DataSource = dt1;
chk.DataTextField = display;
chk.DataValueField = valfield;
chk.DataBind();
}
67
public void FillCheck(CheckBoxList chk, string display, string valfield, string tbl,
string condition1)
{
string str = "select " + display + "," + valfield + " from " + tbl + " where " +
condition1 + "";
DataTable dt1 = new DataTable(str);
chk.DataSource = dt1;
chk.DataTextField = display;
chk.DataValueField = valfield;
chk.DataBind();
}}
68
string sel = "select *from tlb_admin where admin_userid='" + txtusername.Text +
"' and admin_password='" + txtpassword.Text + "'";
DataTable dt = login.GetDataTable(sel);
if (dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = dt.Rows[0]["admin_id"].ToString();
Response.Redirect("../admin/adminHome.aspx");
}
else
{
lblmsg.Text = "Invalid Username or Password";
} }
else if (txtusername.Text.Substring(0, 2) == "DN")
{
string d_sel = "select *from tlb_donor where d_userid='" + txtusername.Text + "'
and d_password='" + txtpassword.Text + "'";
DataTable d_dt = login.GetDataTable(d_sel);
if (d_dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = d_dt.Rows[0]["d_id"].ToString();
Response.Redirect("../donor/Donorhome.aspx");
}
else
{ lblmsg.Text = "Invalid Username or Password"; } }
else if (txtusername.Text.Substring(0, 2) == "AC")
{
69
string a_sel = "select *from tlb_acceptor where a_userid='" + txtusername.Text +
"' and a_password='" + txtpassword.Text + "'";
DataTable a_dt = login.GetDataTable(a_sel);
if (a_dt.Rows.Count > 0)
{
Session ["username"] = txtusername.Text;
Session["userid"] = a_dt.Rows[0]["a_id"].ToString();
Response.Redirect("../acceptor/AcceptorHome.aspx");
}
else
{
lblmsg.Text = "Invalid Username or Password";
} }
else if (txtusername.Text.Substring(0, 2) == "HP")
{
string h_sel = "select *from tlb_hospital where h_userid='" + txtusername.Text +
"' and h_password='" + txtpassword.Text + "'";
DataTable h_dt = login.GetDataTable(h_sel);
if (h_dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = h_dt.Rows[0]["h_id"].ToString();
Response.Redirect("../hospital/HospitalHome.aspx");
}
else
{
lblmsg.Text = "Invalid Username or Password";
} }
else if (txtusername.Text.Substring(0, 2) == "MS")
70
{
string dr_sel = "select *from tbl_doctor where dr_userid='" + txtusername.Text +
"' and dr_password='" + txtpassword.Text + "'";
DataTable dr_dt = login.GetDataTable(dr_sel);
if (dr_dt.Rows.Count > 0)
{
Session["username"] = txtusername.Text;
Session["userid"] = dr_dt.Rows[0]["dr_id"].ToString();
Response.Redirect("../medical_staff/MedicalStaffHome.aspx");
}
else
{ lblmsg.Text = "Invalid Username or Password"; } } }}
Code for Chart
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;
using System.Web.UI.DataVisualization.Charting;
using System.Drawing;
public partial class public_Chart : System.Web.UI.Page
{
OOBDMS stat = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ string str = "select * from tlb_donor where status=1";
DataTable dt = stat.GetDataTable(str);
71
int c = Convert.ToInt32(dt.Rows.Count);
string str1 = "select * from tlb_acceptor where status=1";
DataTable dt1 = stat.GetDataTable(str1);
int a = Convert.ToInt32(dt1.Rows.Count);
string str2 = "select * from tlb_hospital where status=1";
DataTable dt2 = stat.GetDataTable(str2);
int b = Convert.ToInt32(dt2.Rows.Count);
string str3 = "select * from tbl_doctor where status=1";
DataTable dt3 = stat.GetDataTable(str3);
int d = Convert.ToInt32(dt3.Rows.Count);
string[] xValues = { "Acceptor", "Hospital", "Donor", "Medical staff" };
int[] yValues = { a, b, c, d };
Chart1.Series["Testing"].Points.DataBindXY(xValues, yValues);
Chart1.Series["Testing"].Points[0].Color = Color.PaleGreen ;
Chart1.Series["Testing"].ChartType = SeriesChartType.Pie;
Chart1.ChartAreas["ChartArea1"].Area3DStyle.Enable3D = true;
Chart1.DataSource = dt;
Chart1.DataBind();
}}
Code for Registration Cancellation
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 donor_Reg_cancellation : System.Web.UI.Page
72
{
OOBDMS reg = new OOBDMS();
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (txtuid.Text.Substring(0, 2) == "AC")
{
string a_sel = "select *from tlb_acceptor where a_userid='" + txtuid.Text + "' and
a_password='" + TextBox3.Text + "'";
DataTable dt = reg.GetDataTable(a_sel);
if (dt.Rows.Count > 0)
{
string ins = "insert into tbl_cancel(user_id,email,reason)values('" + txtuid.Text
+ "','" + TextBox4.Text + "','" + txtreason.Text + "')";
reg.ExecuteCommand(ins);
}
else
{
Label1.Text = "Invalid Username or Password";
} }
else if (txtuid.Text.Substring(0, 2) == "DN")
{
string d_sel = "select *from tlb_donor where d_userid='" + txtuid.Text + "' and
d_password='" + TextBox3.Text + "'";
DataTable d_dt = reg.GetDataTable(d_sel);
if (d_dt.Rows.Count > 0)
{
string ins = "insert into tbl_cancel(user_id,email,reason)values('" + txtuid.Text
+ "','" + TextBox4.Text + "','" + txtreason.Text + "')";
reg.ExecuteCommand(ins);
73
}
else
{
Label1.Text = "Invalid Username or Password";
} }}
Code for Donor Registration
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;
using System.IO;
public partial class public_Default2 : System.Web.UI.Page
{
OOBDMS donor = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{ donor.FillDrop(ddlbgroup, "bgroup_name", "bgroup_id", "tbl_bloodgroup");
} }
protected void btnsubmit_Click(object sender, EventArgs e)
{
string image = Path.GetFileName(fud.PostedFile.FileName.ToString());
if (fud.HasFile)
{
fud.SaveAs(MapPath("~/Uploads/donor/" + image));
74
string str = "";
str = "insert into
tlb_donor(assign_bit,d_name,d_address,d_age,d_gender,d_dob,d_contact,d_relative,d_rel
ationship,d_rel_contact,d_email,status,date_of_request,blood_dn_status,bgroup_id,d_cert
ificate)values(0,'" + txtname.Text + "','" + txtaddress.Text + "','" + txtage.Text + "','" +
rdbgender.SelectedValue + "','" + txtdob.Text + "'," + txtcno.Text + ",'" + txtrlname.Text
+ "','" + txtrelation.Text + "'," + txtrlcno.Text + ",'" + txtemail.Text + "',0,'" +
DateTime.Now.ToShortDateString() + "',0," + ddlbgroup.SelectedValue + ",'" + image +
"')";
donor.ExecuteCommand(str);
lblmsg.Text = "Data Saved";
75
string str = "";
str = "select*from tlb_acceptor where status=0";
hpap.FillGridView(str, grdacceptor);
str = "select*from tlb_donor where status=0 order by d_id DESC";
hpap.FillGridView(str,grddonor);
str = "select*from tlb_hospital where status=0";
hpap.FillGridView(str,grdhospital);
str = "select * from tbl_doctor where status=0";
hpap.FillGridView(str, grdms);
}
private void Gethosp_apprlist()
{
string sel = "select*from tlb_hospital where status=0";
hpap.FillGridView(sel,grdhospital);
}
private void Getdonor_apprlist()
{
string sel = "select*from tlb_donor where status=0";
hpap.FillGridView(sel,grddonor); }
private void Getaccept_apprlist()
{
string sel = "select*from tlb_acceptor where status=0";
hpap.FillGridView(sel,grdacceptor);
}
private void getms_apprlist()
{
string str = "select * from tbl_doctor where status=0";
hpap.FillGridView(str, grdms);
}
76
protected void grddonor_RowCommand(object sender, GridViewCommandEventArgs
e)
{
if (e.CommandName == "Ap")
{
string Password = PrepareRandomPassword();
string uid = "DN" + e.CommandArgument.ToString();
string strupd = "update tlb_donor set status=1 ,d_userid ='" + uid
+"',d_password='" + Password +"' where d_id=" + e.CommandArgument;
hpap.ExecuteCommand(strupd);
77
smtp.Credentials=new
System.Net.NetworkCredential("manjumathew90@gmail.com", "va9809851860da");
smtp.EnableSsl = true;
smtp.Send(mail);
Getdonor_apprlist();
lblmsg.Text = "1 Donor Request Approved";
}
else if (e.CommandName == "Del")
{
string strupd = "delete from tlb_donor where d_id=" + e.CommandArgument;
hpap.ExecuteCommand(strupd);
Getdonor_apprlist();
lblmsg.Text = "1 Donor Request Rejected";
}
else if (e.CommandName == "Vp")
{
Response.Redirect("../admin/Admin_donor_approval.aspx?donorID="+e.CommandArgu
ment.ToString()+"");
} }
protected void grdacceptor_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "Ap")
{
string Password = PrepareRandomPassword();
string uid = "AC" + e.CommandArgument.ToString();
string strupd = "update tlb_acceptor set status=1
,a_userid='"+uid+"',a_password='"+Password+"'where a_id=" + e.CommandArgument;
hpap.ExecuteCommand(strupd);
78
string selEmail = "select a_email from tlb_acceptor where a_id=" +
e.CommandArgument.ToString() + "";
DataTable dtEmail = hpap.GetDataTable(selEmail);
string EmailID = "";
if (dtEmail.Rows.Count > 0)
EmailID = dtEmail.Rows[0]["a_email"].ToString();
//Email Sendind Code
MailMessage mail = new MailMessage();
mail.To.Add(EmailID);
mail.From = new MailAddress("manjumathew90@gmail.com");
mail.Subject = "Registration Confirmation!!";
string Body = "Your registration OOBDMS is confirmed and your UserID and
Password is<br>User ID : " + uid.ToString() + "<br>Password : " +
Password.ToString();
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Credentials = new
System.Net.NetworkCredential("manjumathew90@gmail.com", "va9809851860da");
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.Send(mail);
Getaccept_apprlist();
lblmsg.Text = "1 Acceptor Request Approved";
}
else if (e.CommandName == "Del")
{
string strupd = "delete from tlb_acceptor where a_id=" + e.CommandArgument;
79
hpap.ExecuteCommand(strupd);
Getaccept_apprlist();
lblmsg.Text = "1 Acceptor Request Rejected";
}
else if (e.CommandName == "Vp")
{
Response.Redirect("../admin/Acceptorapproval.aspx?accID=" +
e.CommandArgument.ToString() + "")
} }
private string PrepareRandomPassword()
{
string allowedChars = "";
allowedChars = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,";
allowedChars += "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,";
allowedChars += "1,2,3,4,5,6,7,8,9,0,!,@,#,$,%,&,?";
char[] sep = { ',' };
string[] arr = allowedChars.Split(sep);
string passwordString = "";
string temp = "";
Random rand = new Random();
for (int i = 0; i < Convert.ToInt32(7); i++)
{
temp = arr[rand.Next(0, arr.Length)];
passwordString += temp;
}
return passwordString;
}}
Code for Admin Donor Approval
80
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 admin_Default2 : System.Web.UI.Page
{
static int Did;
OOBDMS donorap = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ if (!IsPostBack) {
try { Did = Convert.ToInt32(Request.QueryString["donorID"]); }
string str = "select* from tlb_donor where d_id=" + Did + "";
DataTable dt = donorap.GetDataTable(str);
lblname.Text = dt.Rows[0]["d_name"].ToString();
lbladdress.Text = dt.Rows[0]["d_address"].ToString();
lblage.Text = dt.Rows[0]["d_age"].ToString();
lblgender.Text = dt.Rows[0]["d_gender"].ToString();
lbldob.Text = dt.Rows[0]["d_dob"].ToString();
lblcno.Text = dt.Rows[0]["d_contact"].ToString();
lblemail.Text = dt.Rows[0]["d_email"].ToString();
lblrname.Text = dt.Rows[0]["d_relative"].ToString();
lblrelation.Text = dt.Rows[0]["d_relationship"].ToString();
lblrcno.Text = dt.Rows[0]["d_rel_contact"].ToString();
Image1.ImageUrl = "../Uploads/donor/" + dt.Rows[0]["d_certificate"].ToString();
}
81
}
protected void LinkButton1_Click(object sender, EventArgs e)
{Response.Redirect("viewimage.aspx?donorID=" + Request.QueryString["donorID"]
+ ""); }}
Code for Admin Allote
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 admin_Default : System.Web.UI.Page
{
int a;
static int aid,did;
OOBDMS al = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{ al.FillDrop(DropDownList1, "dept_name", "dept_code", "tbl_dept"); }
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string str = "select * from tbl_dept where dept_code=" +
DropDownList1.SelectedValue;
DataTable dt = al.GetDataTable(str);
a = Convert.ToInt32(dt.Rows[0]["dept_id"]);
82
string sel = "select organ_name,o.organ_id from tbl_organ o,tbl_organ_dept od
where o.organ_id=od.organ_id and od.dept_id=" + a;
DataTable dt1 = al.GetDataTable(sel);
DropDownList2.DataSource = dt1;
DropDownList2.DataTextField = "organ_name";
DropDownList2.DataValueField = "organ_id";
DropDownList2.DataBind();
}
protected void btnlist_Click(object sender, EventArgs e)
{
string str ="select * from tbl_acc_do a,tbl_doctor b,tlb_acceptor c where
a.dr_id=b.dr_id and a.a_id=c.a_id and b.dept_code="+ DropDownList1.SelectedValue+"
and a_status!='NULL' and c.assign_bit=0" ;
al.FillGridView(str, GridView1);
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "Gd")
{
lblmsg.Text = "";
aid = Convert.ToInt32(e.CommandArgument);
string str="select * from tbl_dept where
dept_code="+DropDownList1.SelectedValue;
DataTable dt=al.GetDataTable(str);
a=Convert.ToInt32(dt.Rows[0]["dept_id"]);
string sel ="select * from tlb_donor donor,tlb_donor_organ
do,tbl_organ_dept od,tlb_acceptor_organ ao where donor.d_id=do.d_id and
do.organ_id=od.organ_id and ao.organ_id=do.organ_id and od.dept_id=" + a + " and
83
ao.a_id=" + e.CommandArgument + " and donor.assign_bit=0 and ao.organ_id=" +
DropDownList2.SelectedValue;
DataTable dt1 = al.GetDataTable(sel);
if (dt1.Rows.Count > 0)
{
GridView2.DataSource = dt1;
GridView2.DataBind();
}
else
{ lblmsg.Text = "No matching donors found"; } } }
protected void GridView2_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "As")
{
string upd1 = "update tlb_donor set assign_bit=1 where d_id=" +
e.CommandArgument;
al.ExecuteCommand(upd1);
string upd2 = "update tlb_acceptor set assign_bit=1 where a_id=" + aid;
al.ExecuteCommand(upd2);
string str = "select * from tbl_acc_do a,tbl_doctor b,tlb_acceptor c where
a.dr_id=b.dr_id and a.a_id=c.a_id and b.dept_code=" + DropDownList1.SelectedValue +
" and a_status!='NULL' and c.assign_bit!=1";
al.FillGridView(str, GridView1);
string sel = "select * from tlb_donor donor,tlb_donor_organ do,tbl_organ_dept
od,tlb_acceptor_organ ao where donor.d_id=do.d_id and do.organ_id=od.organ_id and
ao.organ_id=do.organ_id and od.dept_id=" + a + " and ao.a_id=" + aid + " and
donor.assign_bit!=1 and ao.organ_id=" + DropDownList2.SelectedValue;
al.FillGridView(sel, GridView2);
84
string ins = "insert into tbl_assign(a_id,d_id) values(" + aid + "," +
e.CommandArgument + ")";
al.ExecuteCommand(ins);
lblmsg.Text = "Donor assigned";
} }}
Code for Admin Assign Doctor
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 admin_Assign_doctor : System.Web.UI.Page
{
int Aid;
OOBDMS ad = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
Aid = Convert.ToInt32(Request.QueryString["accid"]);
string str = "";
str = "select * from tlb_acceptor_organ ao,tlb_acceptor a,tbl_organ o where
ao.a_id=a.a_id and ao.organ_id=o.organ_id and a.a_id=" + Aid + "";
ad.FillGridView(str, GridView1);
}
protected void Button1_Click(object sender, EventArgs e)
{
85
string ins = "insert into tbl_acc_do(a_id,dr_id) values(" + Aid + "," +
ddldoctors.SelectedValue + ")";
ad.ExecuteCommand(ins);
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs
e)
{
if (e.CommandName == "As")
{
string str = "select * from tbl_organ_dept od,tlb_acceptor_organ ao ,tbl_dept d
where od.dept_id=d.dept_id and od.organ_id=ao.organ_id and ao.ao_id=" +
Convert.ToInt32(e.CommandArgument) + "";
DataTable dt = ad.GetDataTable(str);
lbldept.Text = dt.Rows[0]["dept_name"].ToString();
string code=dt.Rows[0]["dept_code"].ToString();
string sel = "select * from tbl_doctor where dept_code='" + code + "'";
DataTable dt1= ad.GetDataTable(sel);
ddldoctors.DataSource = dt1;
ddldoctors.DataTextField = "dr_name";
ddldoctors.DataValueField = "dr_id";
ddldoctors.DataBind();
lblname.Text = "Doctor assigned";
}}}
86
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class admin_Organ_dept : System.Web.UI.Page
{
OOBDMS od = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ if (!Page.IsPostBack)
{
od.FillDrop(ddlorgan, "organ_name", "organ_id", "tbl_organ");
od.FillDrop(ddldept, "dept_name", "dept_id", "tbl_dept");
showgrd();
} }
protected void btnsave_Click(object sender, EventArgs e)
{
string str = "insert into tbl_organ_dept(dept_id,organ_id)values(" +
ddldept.SelectedValue + "," + ddlorgan.SelectedValue + ")";
od.ExecuteCommand(str);
showgrd();
}
protected void showgrd()
{
string str = "select * from tbl_organ_dept od,tbl_organ organ,tbl_dept dept where
od.dept_id=dept.dept_id and od.organ_id=organ.organ_id";
od.FillGridView(str, GridView1);
}}
87
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 admin_Default2 : System.Web.UI.Page
{
OOBDMS place = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ Getplacelist(); }
protected void btnsubmit_Click(object sender, EventArgs e)
{
string str = "";
if (txtplace.ToolTip != "")
{
str = "update tbl_place set p_name='" + txtplace.Text + "' where p_id=" +
txtplace.ToolTip;
txtplace.ToolTip = "";
}
else
{
str = "insert into tbl_place(p_name)values('" + txtplace.Text + "')";
txtplace.ToolTip = "";
}
place.ExecuteCommand(str);
lblmsg.Text = "Data Saved";
txtplace.Text = "";
Getplacelist();
}
private void Getplacelist()
{
string sel = "select*from tbl_place";
place.FillGridView(sel, grdplace);
}
protected void grdplace_RowCommand(object sender, GridViewCommandEventArgs
e)
{
if (e.CommandName == "Del")
{
string strdel = "delete from tbl_place where p_id=" + e.CommandArgument;
place.ExecuteCommand(strdel);
88
Getplacelist();
lblmsg.Text = "Data deleted";
}
else if (e.CommandName == "Ed")
{
string strupd = "select * from tbl_place where p_id=" + e.CommandArgument;
DataTable dt = place.GetDataTable(strupd);
if (dt.Rows.Count > 0)
{
txtplace.Text = dt.Rows[0][1].ToString();
txtplace.ToolTip = e.CommandArgument.ToString();
} } }
if (!IsPostBack)
{ try { useridp =
Convert.ToInt32(Request.QueryString["userid"]); }
catch (Exception) { }
}
89
string sel = "select * from tlb_enquiry where en_id=" + useridp;
DataTable dt = rep.GetDataTable(sel);
lblname.Text = dt.Rows[0]["en_name"].ToString();
lblcno.Text = dt.Rows[0]["en_phone"].ToString();
lblemail.Text = dt.Rows[0]["en_email"].ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
string str = "insert into tbl_reply(en_id,re_ans)values(" + useridp + ",'" +
TextBox4.Text + "')";
rep.ExecuteCommand(str);
string str1 = "update tlb_enquiry set status=1 where en_id=" + useridp;
rep.ExecuteCommand(str1);
OOBDMS.reply = 1;
Response.Redirect("Enquiry.aspx");
}}
Code for Admin_View Certificate
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class admin_Default : System.Web.UI.Page
{
OOBDMS donorap = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
try
{
int Did;
Did = Convert.ToInt32(Request.QueryString["donorID"]);
string str = "select* from tlb_donor where d_id=" + Did + "";
DataTable dt = donorap.GetDataTable(str);
90
Image1.ImageUrl = "../Uploads/donor/" + dt.Rows[0]["d_certificate"].ToString();
}
catch (Exception) { }
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("Admin_donor_approval.aspx?donorID=" +
Request.QueryString["donorID"] + "");
}}
91
Code for Acceptor Registration 2
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;
using System.IO;
public partial class public_Acceptor_reg2 : System.Web.UI.Page
{
OOBDMS acceptor = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ if (!Page.IsPostBack)
{ acceptor.FillCheck(chkorgan, "organ_name", "organ_id", "tbl_organ");
acceptor.FillCheck(chkearlydonate, "organ_name", "organ_id", "tbl_organ");
txterlydn.Enabled = false;
chkearlydonate.Enabled = false;
} }
protected void btnsubmit_Click(object sender, EventArgs e)
{ if (rdb1.SelectedValue == "Yes")
{ string sel = "select*from tbl_transplant where d_userid='" + txterlydn.Text +
"'";
DataTable dt = acceptor.GetDataTable(sel);
if (dt.Rows.Count > 0)
{
string ins2 = "update tlb_acceptor set bit2=1 where a_id=" + Session["userid"];
acceptor.ExecuteCommand(ins2);
92
foreach (ListItem ch in chkorgan.Items)
{ if (ch.Selected == true)
{string ins = "insert into tlb_acceptor_organ(a_id,organ_id)values(" +
Session["userid"] + "," + ch.Value + ")";
acceptor.ExecuteCommand(ins);
} }
foreach (ListItem ch in chkearlydonate.Items)
{ if (ch.Selected == true) {
string ins1 = "insert into tlb_early_donate(a_id,organ_id,d_userid)values("
+ Session["userid"] + "," + chkearlydonate.SelectedValue + ",'" + txterlydn.Text + "')";
acceptor.ExecuteCommand(ins1);
} } }
else
{ lbldonormsg.Text = "Donor ID does not exist"; } }
else
{ string ins2 = "update tlb_acceptor set bit2=1 where a_id=" +
Session["userid"];
acceptor.ExecuteCommand(ins2);
foreach (ListItem ch in chkorgan.Items)
{ if (ch.Selected == true)
{ string ins = "insert into tlb_acceptor_organ(a_id,organ_id)values(" +
Session["userid"] + "," + ch.Value + ")";
acceptor.ExecuteCommand(ins);
} } }
OOBDMS.flag = 1;
Response.Redirect("AcceptorHome.aspx");
93
protected void rdb1_SelectedIndexChanged(object sender, EventArgs e)
{ if (rdb1.SelectedValue == "Yes") {
txterlydn.Enabled = true;
chkearlydonate.Enabled = true; }
else {
txterlydn.Enabled = false;
chkearlydonate.Enabled = false; } }
}
94
if (OOBDMS.flag == 1)
{
OOBDMS.flag = 0;
Label3.Text = "Registration completed successfully";
} }}
95
txtage.Enabled = false;
txtdob.Text = dt.Rows[0]["a_dob"].ToString();
txtdob.Enabled = false;
txtcno.Text = dt.Rows[0]["a_contact"].ToString();
txtemail.Text = dt.Rows[0]["a_email"].ToString();
txtrname.Text= dt.Rows[0]["a_relative_name"].ToString();
txtrelation.Text= dt.Rows[0]["a_relation"].ToString();
txtraddress.Text= dt.Rows[0]["a_relative_addr"].ToString();
txtrcno.Text = dt.Rows[0]["a_relative_cn"].ToString();
}
protected void btnsave_Click(object sender, EventArgs e)
{
string upd = "update tlb_acceptor set a_name='" + txtname.Text + "', a_address='" +
txtaddress.Text + "', a_relative_name='" + txtrname.Text + "', a_relation='" +
txtrelation.Text + "', a_relative_addr='" + txtraddress.Text + "', a_contact=" + txtcno.Text
+ ", a_relative_cn=" + txtrcno.Text + " where a_id=" + Session["userid"];
acceptor.ExecuteCommand(upd);
lblmsg.Text = "PROFILE UPDATED";
}}
96
{
OOBDMS st = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{ lbluid.Text = Session["username"].ToString(); }
protected void Button1_Click(object sender, EventArgs e)
{
if (chkstatus.Checked ==true)
{
string upd = "update tlb_acceptor set d_a=1 where a_userid=" +
Session["username"];
st.ExecuteCommand(upd);
} }}
97
DataTable dt = acceptor.GetDataTable(sel);
lblname.Text = dt.Rows[0]["a_name"].ToString();
lbladdr.Text= dt.Rows[0]["a_address"].ToString();
lblage.Text= dt.Rows[0]["a_age"].ToString();
lbldob.Text = dt.Rows[0]["a_dob"].ToString();
lblcn.Text = dt.Rows[0]["a_contact"].ToString();
lblemail.Text = dt.Rows[0]["a_email"].ToString();
lblrlname.Text= dt.Rows[0]["a_relative_name"].ToString();
lblreln.Text = dt.Rows[0]["a_relation"].ToString();
lblrladdress.Text= dt.Rows[0]["a_relative_addr"].ToString();
lblrlcn.Text= dt.Rows[0]["a_relative_cn"].ToString();
lblgender.Text = dt.Rows[0]["a_gender"].ToString();
string sel1 = "select * from tbl_bloodgroup bd ,tlb_acceptor a where
a.bgroup_id=bd.bgroup_id and a.a_id=" + Session["userid"];
DataTable dt1 = acceptor.GetDataTable(sel1);
lblbgrp.Text = dt1.Rows[0]["bgroup_name"].ToString();
string sel2 = "select * from tlb_acceptor_organ a,tbl_organ o where
a.organ_id=o.organ_id and a.a_id=" + Session["userid"];
DataTable dt2 = acceptor.GetDataTable(sel2);
int cnt = dt2.Rows.Count;
if(cnt==1)
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
if (cnt == 2)
{
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorgan2.Text = dt2.Rows[1]["organ_name"].ToString();
}
if (cnt == 3)
{
98
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorgan2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorgan3.Text = dt2.Rows[2]["organ_name"].ToString();
}
if (cnt == 4)
{
lblorgan1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorgan2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorgan3.Text = dt2.Rows[2]["organ_name"].ToString();
lblorgan4.Text = dt2.Rows[3]["organ_name"].ToString();
} }}
99
}
}
100
}
protected void GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
if (e.CommandName == "del")
{
string de = "delete from tlb_donor_organ where organ_id=" +
e.CommandArgument;
status.ExecuteCommand(de);
grdshow();
} }
protected void grdshow()
{
string str = "select * from tlb_donor_organ a,tlb_donor b,tbl_organ c where
a.d_id=b.d_id and c.organ_id=a.organ_id and b.d_userid='" + TextBox1.Text + "'";
status.FillGridView(str, GridView1);
}}
101
{
OOBDMS tp = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
tp.FillDrop(DropDownList1,"organ_name","organ_id","tbl_organ");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string image = Path.GetFileName(fud.PostedFile.FileName.ToString());
if (fud.HasFile)
{
fud.SaveAs(MapPath("~/Uploads/donor/" + image));
string ins = "insert into
tbl_transplant(h_userid,dr_userid,d_userid,a_userid,organ_id,date_of_trnsplnt,fname)val
ues('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "'," + DropDownList1.SelectedValue + ",'" + TextBox5.Text + "','" +
image + "')";
tp.ExecuteCommand(ins);
Label1.Text = "Data saved";
} }}
102
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
public partial class admin_Acceptorapproval : System.Web.UI.Page
{
int Aid;
OOBDMS acceptorap = new OOBDMS();
protected void Page_Load(object sender, EventArgs e)
{
Aid = Convert.ToInt32(Request.QueryString["accID"]);
string str = "select* from tlb_acceptor a,tbl_place p,tbl_bloodgroup b where
a.p_id=p.p_id and b.bgroup_id=a.bgroup_id and a.a_id=" +Aid;
DataTable dt = acceptorap.GetDataTable(str);
Label1.Text=dt.Rows[0]["a_name"].ToString();
Label2.Text=dt.Rows[0]["a_address"].ToString();
lblplace.Text = dt.Rows[0]["p_name"].ToString();
lbl3.Text=dt.Rows[0]["a_age"].ToString();
Label4.Text=dt.Rows[0]["a_gender"].ToString();
Label5.Text=dt.Rows[0]["a_dob"].ToString();
lblbgroup.Text=dt.Rows[0]["bgroup_name"].ToString();
Image1.ImageUrl = "../uploads/acceptor/" + dt.Rows[0]["a_certificate"].ToString();
string sel2 = "select * from tlb_acceptor_organ a,tbl_organ o where
a.organ_id=o.organ_id and a.a_id=" +Aid;
DataTable dt2 = acceptorap.GetDataTable(sel2);
int cnt = dt2.Rows.Count;
if (cnt == 1)
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();
103
if (cnt == 2)
{
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorg2.Text = dt2.Rows[1]["organ_name"].ToString();
}
if (cnt == 3)
{
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorg2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorg3.Text = dt2.Rows[2]["organ_name"].ToString();
}
if (cnt == 4)
{
lblorg1.Text = dt2.Rows[0]["organ_name"].ToString();
lblorg2.Text = dt2.Rows[1]["organ_name"].ToString();
lblorg3.Text = dt2.Rows[2]["organ_name"].ToString();
lblorg4.Text = dt2.Rows[3]["organ_name"].ToString();
}
104
{
string str = "update tbl_acc_do set a_status='" + DropDownList1.SelectedValue +
"',a_date_of_req='" + TextBox1.Text + "' where a_id=" + Aid;
acceptorap.ExecuteCommand(str);
}}
105
if (e.CommandName =="Vp")
{
Response.Redirect("../medical_staff/AcceptorProfile.aspx?accID="
+e.CommandArgument.ToString()+"");
} }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
HiddenField h1 = (HiddenField)e.Row.FindControl("HiddenField1");
HiddenField h2 = (HiddenField)e.Row.FindControl("HiddenField2");
Label lbl = (Label)e.Row.FindControl("lblstatus");
if (string.IsNullOrEmpty(h1.Value))
{ lbl.Text = "Pending"; }
else
{ lbl.Text = h2.Value.ToString(); }
} }}
106
9.2 INTERFACE
9.2.1 Login Form
9.2.2 Statistics
107
9.2.3 Enquiry
108
9.2.5 Hospital Registration
109
9.2.7 Registration Cancellation
9.2.8 FAQs
110
9.2.9 Change Password
111
9.2.10 Department
9.2.12 Organ
112
9.2.13 Place
9.2.14 FAQs
113
9.2.15 Organ Search
114
9.2.18 Enquiry
9.2.19 Allotment
115
9.2.20 Approval
116
9.2.22 Complete Approval
117
9.2.25 Edit Profile
118
9.2.27 View Profile
119
9.2.29 Edit Profile
120
9.2.31 Patient List
121
REFERENCES
ASP.NET - Complete reference by Matthew Macdonald
Beginning ASP.NET 2.0 Databases From Novice To Professional by Damien Foggon
An Integrated Approach To software Engineering by Pankaj Jalote
DORSO
NHS blood and transplant
www.livingdonorsonline.org
www.matchingdonors.com
122