phase1

46
Blood Bank Management System Blood Bank Management System A PROJECT REPORT Submitted in partial fulfilment for the award of the degree of MS in Information Technology By Manjunath Kosigi, 11MIN0139 Under the Guidance of Prof. M. PRABHU KUMAR SCHOOL OF INFORMATION TECHNOLOGY AND ENGINEERING VIT UNIVERSITY Page 1

Upload: raghavendra-gowda

Post on 07-Sep-2015

230 views

Category:

Documents


3 download

DESCRIPTION

Phase1

TRANSCRIPT

Blood Bank Management System

Blood Bank Management System

Blood Bank Management System

A PROJECT REPORT

Submitted in partial fulfilment for the award of the degree of

MS

in

Information TechnologyByManjunath Kosigi, 11MIN0139Under the Guidance of

Prof. M. PRABHU KUMAR SCHOOL OF INFORMATION TECHNOLOGY AND ENGINEERING

VIT UNIVERSITY

Contents

4CHAPTER 1

4INTRODUCTION

41.PROBLEM STATEMENT

42.OBJECTIVES

53.EXISTING SYSTEM

5DISADVANTAGES

6CHAPTER 2

6SYSTEM REQUIREMENTS SPECIFICATION

62.1Hardware Requirement:

62.2Software Requirement:

62.3FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTS

62.3.1Functional Requirements:

72.3.2Non Function Requirements:

8CHAPTER 3

83.1LITERATURE SURVEY

83.1.1PUSH NOTIFICATION:

11CHAPTER 4

114.1PROPOSDED SYSTEM

114.1.1ADVANTAGES

114.2Android Operating System

114.2.1Android Features

124.2.2Android Architecture

124.2.3Android Activity Lifecycle

15CHAPTER 5

15SYSTEM DESIGN

155.1System Architecture

15Fig 5.1 System Architecture

165.2USE CASE DIAGRAMS:

165.2.1Search Donors Use Case diagram

175.2.2Request Use Case diagram

185.2.3Search Hospitals Use Case diagram

185.2.4Search Blood Banks Use Case diagram

195.2.5Edit Profile Use Case diagram

205.3ER-DIAGRAM

215.4SEQUENCE DIAGRAM

225.4.1Search donors:

235.4.2Send notification:

245.4.3SEARCH HOSPITALS

255.5ACTIVITY DIAGRAM

265.5.1Activity Diagram for DVG Blood Bank

275.6APPLICATION FLOWCHART

285.7DATAFLOW DIAGRAM

29CHAPTER 6

29IMPLEMENTATION

34CHAPTER 7

34REFERENCES

CHAPTER 1

INTRODUCTION

Every year our nation requires about 4 Cr. units of blood, out of which only 5 Lakh units of blood are available. It is not that, people do not want to donateblood. Often they are unaware of the need and also they do not have a proper facility to enquire about it. As a result, needy people end up going through a lot of pain. India has many blood banks, all-functioning in a decentralized fashion. In the current system, individual hospitals have their own blood banks and there is no interaction between bloodbanks.

The management is ad-hoc with no semblance of organization or standard operating procedures. Donors cannot access blood from blood banks other than the bankwhere they have donated blood. In present system all the blood banks are attached to hospitals and there is no stand-alone blood bank. Some hospital has its own systems and limitations. The co-ordination between the bloodbanks is practically impossible. Because of low number of donors and more number ofblood banks, the efficiency and quality of blood banks are low, resulting in wastage ofblood and blood components.1. PROBLEM STATEMENT

The main aim of the project is to effectively manage the blood banking system. This project enables the users to access nearest blood bank with GPS, it also checks the availability of the required blood group, provides necessary information about the volunteer blood donors who have registered by installing the app.2. OBJECTIVES

Developing an android application which allows the users to locate the nearest blood bank within the city through this application. Helps to track to volunteer blood donors with their contact information. It also helps to check the availability of the various blood units.3. EXISTING SYSTEM

In the present day scenario people who are in need of blood have to enquire the doctors or the blood banks which is time consuming process and it is not an effective method. It consumes lot of man power to maintain the records manually.

The donors might not be aware of the blood requirements during the emergency situations henceforth there is a no adequate supply of blood which may result in increase in the death rate during emergency situation.

The donors are not aware of the blood donation camps that are frequently conducted due to lack of communication.DISADVANTAGES The whole application depends on the availability of internet. The application will not work if the server is down and the user might have to wait for the fixation of the server or may have to depend on the backup server. All the blood banks should use the same software to update the blood availability. Erroneous updates by the hospital management may misguide the recipients.CHAPTER 2 SYSTEM REQUIREMENTS SPECIFICATION2.1 Hardware Requirement:

Client: Android Phone

512Mb RAM

100mb User memory(free)

3G Enabled(for better reliability)

Server: PHP Server

SQL Server

Push Notification Server (Using Google's Cloud messaging server)

2.2 Software Requirement:

Client: Android ICS (API 14) or above

SqLite (included in factory OS) Server: PHP 5.0+ enabled server

MySql 5.0 or above

Server OS (Windows server edition / Linux)2.3 FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTS

2.3.1 Functional Requirements: User should be able to register to application using name and email id

User should be able search blood donors

User should be able to send Request to server

Server should send the push message to GCM Server on receiving request from user

User should update his profile to become donor

User should be able search nearest hospitals and blood banks

User should receive the notification regarding blood request if application in not opened

User should be able to see the request he received at any given time within application

2.3.2 Non Function Requirements:

Application should run on all the android devices.

Application is required to handle 500 Users and should be flexible with load

Time delay in sending notification should be less than 10 minutes on successful request

For all interaction with server response time should not cross more than 5 minutesCHAPTER 3BACKGROUND THEORY3.1 LITERATURE SURVEY 3.1.1 PUSH NOTIFICATION:

There are a number of studies in the literature on Push Notifications. Push Notification can be defined as a short message that is pushed to a certain application or individuals smart phone. This message informs the end user that there is an update or an event available that is related to the application. For example, an individual can be notified about certain events like placement details about a certain job availability.

The cloud platform can be used to make sure that notifications are pushed to the mobile device. While selecting a cloud service it is selected from the available services which are provided by cloud viz. Software as a service, Infrastructure as a service and Platform as a service. The googles cloud messaging app uses Platform as a service to implement C2DM (Cloud to device messaging) and is very-well integrated with Googles services. The Platform as a Service is a preconfigured service provided by Google and provides higher level of abstraction than other cloud services.

The push messaging will also include libraries like XMPP and C2DM with some particular ones like Urban Airship, Xtify and MQTT but the focus will mainly be on C2DM and XMPP. The XMPP protocol is used for real-time messaging and used for instant messaging by Google. The implementation of XMPP in cloud messaging is done by modifying it to suit the needs of cloud messaging by integrating it with the cloud services. A Push Notification is mainly designed to work on a Smartphone or tablets. It is a way that allows an application that is not running on the device to let the user know that it has updates or information. Push notification can display alert message or play an alert sound to notify users with new updates. With the advance in the mobile technology it is not difficult to provide this service to each and every individual and thus proving to be a more reliable way to send information in form of a notifications at will to the user at that particular instance. Many different types of technologies associated with the Googles cloud based messaging service have been used for multiple applications for applications like push-pull server applications and chatting apps also use similar features like the GCM service to get notifications in real time. The technologies like, 3G and wireless have also proven to be of assistance to improve the scope of this technology and is proving to be more useful by the day. Googles cloud technology is used to provide different types of services. Google Cloud Messenger is a service that enables developers to send data from servers to both Android applications or Chrome apps and extensions. Google Cloud Messenger is a free service that allows developers to send data from third party server to their application running on android devices. It handles queuing of message and delivery to the target application running on target device. It is a completely free service whatever maybe the messaging need. Other studies show that the cloud technology has helped in implementing peer-to-peer messaging and many other researches have been in favor of the PUSH NOTIFICATIONS via GCM. The Push notifications service is completely reliable service and will be advanced further to make it more.

A Three step General Map Matching Method in the GIS Environment: Travel/Transportation Study Perspective:

Despite its application in many fields, map matching in travel/transport geography study is unique in two aspects: The correct road links traversed by the traveler need to be unambiguously identified and all the identified links should form a meaningful travel route.

This paper discusses the application of map matching methodologies in the context of deriving peoples travel behavior from GPS-traced multi-modal trip data within the GIS environment. In recognition of the disadvantages associated with the existing map matching algorithms, this research proposed and implemented in ARCGIS a heterogeneous map matching approach suitable for travel/activity research needs which is uniquely characterized by:

1) data preprocessing with point cluster reduction and density leverage; 2) offering the candidate solution within a pool of the best; 3) the balancing of matching results from multiple matching factors with rank aggregation; 4) Intelligently utilizing the basic network constraint attributes with expert rules to increase the matching accuracy; and 5) Dempster belief test to discern the noise and off-road travel. this analysis has shown that the performance of the new algorithm is comparable with the others when the candidate pool size is small and network/GPS trace size is large. Further research needs to quantify the performance of this algorithm and others with respect to a complete set of survey travel routes recorded.

Real Time Tracking of Complete Transport System Using GPS:Due to the high cost of time several methods are proposed to reduce the wastage of time on the bus station or waiting for the bus for more time is not preferred. So, we require one tracking system to track the Complete Transport System. Every GPS tracking system is a common approach to get vehicle location information in real-time. We proposed a GPS tracking system called tRackIt that is composed of commodity hardware i.e. GPS enabled Android Mobile as GPS Device , open source software(GCM Architecture) and an easy-to-manage user interface via a web server with Google Map software. The system includes a GPS/GPRS module for location acquisition and message transmission, GCM to transfer of location information, and third party App Server to temporary store location. Our proposed system is not tested yet. But it will show the correct position of the vehicle to the user on the basis of the location information sent by the GPS Device through GCM.A REALTIME ANDROID MOBILE BASED APPLICATION FOR SMART VEHICULAR TRAFFIC SYSTEM:Mobile devices used as traffic sensors present major advantages compared to other solutions. So far, all the existing solutions require the design, implementation and maintenance of special infrastructure, which can be both expensive and difficult to deploy. On the other hand, cellular networks are already widely deployed and provide large population coverage. Modern mobile devices come equipped with Global Position System (GPS) receivers which can calculate the device's location and speed with sufficient accuracy. On the communication side, many wireless standards (3G/4G/WLAN) are already included and most of the upcoming standards are expected to be integrated in the near future. Finally, modern mobile devices feature high resolution screens or touch screens that can be used for interacting with the driver and display detailed information. The most critical ones are related to security and privacy of the users and to efficient positioning and real-time route guidance. A key component of such a system must be the mobile application which will collect the traffic data, integrate security algorithms and finally present guidance information to the driver.CHAPTER 44.1 PROPOSDED SYSTEM An easy way to search the nearest blood banks to the accident site with the help of GPS. An effective way to find out the availability of the required blood groups in the blood banks. A proficient way to search the volunteer blood donors. Providing tips regarding the necessary measures that are to be taken before the blood donation. Creates awareness to the blood donors via notifications.4.1.1 ADVANTAGESThe application educates about the know how about the blood banking system. Enables Enables the users to easily locate the nearest blood banks. the users to request for the necessary blood units to a large number of donors if they fail to find blood in blood banks. Hospitals can also effectively find the volunteer blood donors. Nowadays most of the people are equipped with the smart phones which creates a greater exposure for the blood banking system which saves considerably greater number of lives.

4.2 Android Operating System

Android is a complete software stack for mobile devices that includes operating system (Linux based), middleware and application frameworks.

4.2.1 Android Features Application framework enabling reuse and replacement of components Dalvik virtual machine optimized for mobile devices

Integrated browser based on the open source Web kit engine

Optimized graphics powered by a custom 2D graphics library; 3D graphics based on

the OpenGL ES 1.0 specification (hardware acceleration optional)

SQLite for structured data storage

Media support for common audio, video, and still image formats (MPEG4, H.264,

MP3, AAC, AMR, JPG, PNG, GIF)

GSM Telephony (hardware dependent)

Bluetooth, EDGE, 3G, and Wi-Fi (hardware dependent)

Camera, GPS, compass, and accelerometer (hardware dependent)

Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE.4.2.2 Android Architecture

The following diagram shows the major components of the Android operating system.Each section is described in more detail below.

Fig 4.2.2: Android Architecture

4.2.3 Android Activity Lifecycle

Android activity lifecycle is shown in following fig 2.2.

onCreate() Called when the activity is first created. This is where one should do all of the normal static set up: create views; bind data to lists, etc. This method also provides user with a Bundle containing the activity's previously frozen state, if there was one. onRestart() Called after activity has been stopped, prior to it being started again. onStart() Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden. onResume() Called when the activity will start interacting with the user. At this point Activity is at the top of the activity stack, with user input going to it.

onPause() Called when the system is about to start resuming a previous activity. This is typically used to commit unsaved changes to persistent data, stop animations and other Things that may be consuming CPU, etc. Implementations of this method must be very quick because the next activity will not be resumed until this method returns. onStop() Called when the activity is no longer visible to the user, because another activity has been resumed and is covering this one. This may happen either because a new activity is being started, an existing one is being brought in front of this one, or this one is being destroyed.

onDestroy() The final call receive before activity is destroyed. This can happen either because the activity is finishing.

Fig 3.4: Android activity lifecycle

CHAPTER 5

SYSTEM DESIGN5.1 System Architecture

Fig 5.1 System Architecture

The above diagram shows system architecture of the android application. The system consists of 3 modules namely client, server and GCM module. The client module consists of the android device users who register with the device ID. They can perform operations such as send request, search hospitals and blood banks for the required blood group. The server module is made up of two separate servers PHP and MySql server. PHP server is used to convert the request sent by user which is in HTTP format into a form which is understood by the database. MySql server receives the operations by PHP and performs required DB operations. Google Cloud Messaging is a service provided by the Google for developers to send data, notifications to the registered user of the application. To send notifications the server will make use of this GCM server.5.2 USE CASE DIAGRAMS:5.2.1 Search Donors Use Case diagram

Fig 5.2.1 Search Donors Use Case diagram

There are two actors here User and Server. The user will send the request for the donors to the server. The server will check the required blood group in the database through suitable queries and will send the donors list. The user can call or text the donors near him.5.2.2 Request Use Case diagram

Fig 5.2.2 Request Use Case diagram

There are three actors here User, Server and GCM Server. The user will send the notification to the application server which will be received in the form of a message. The application server will send the request to the GCM server with the device IDs so that the push notification will be sent to the registered users.5.2.3 Search Hospitals Use Case diagram

Fig 5.2.3 Search Hospitals Use Case diagram

There are two actors here User and Server. The user will send the request for the hospitals near his location to the server. The server will check the nearest hospitals to the user location and will send the list of hospitals sorted in the nearest order to him. The user can call the hospital or can view the hospitals on maps.5.2.4 Search Blood Banks Use Case diagram

Fig 5.2.4 Search Blood Banks Use Case diagram

There are two actors here User and Server. The user will send the request for the blood banks near his location to the server. The server will check the nearest blood banks to the user location and will send the list of blood banks sorted in the nearest order to him. The user can call the blood bank or can view the blood banks on maps.5.2.5 Edit Profile Use Case diagram

Fig 5.2.5 Edit Profile Use Case diagram

There are two actors here User and Server. The user will have options to view and edit his profile. In the edit profile option he can enter or modify his contact information along with his last donated date. The changes made will be stored in the database.5.3 ER-DIAGRAM

Fig 5.3 ER-diagram5.4 SEQUENCE DIAGRAM

A sequence diagram is a model that describes how group of objects collaborate in some behavior overtime. The sequence diagram captures the behavior of a single use case and shows the object and messages that are passed between these objects in the time frame of the specific use case. The sequence diagram doesnt show the relationship between the objects. The sequence diagram might also be used to: Describe the overall sequence of the flow of control when there are many short methods in different classes.

Show current processes and activation.

Show time sequence that are not easily depicted in a collaboration diagram.

Show general forms that do not deal with objects but with the class interaction.5.4.1 Search donors:

Fig 5.4.1 Sequence diagram for search donors

5.4.2 Send notification:

Fig 5.4.2 sequence diagram for send notification5.4.3 SEARCH HOSPITALS

Fig 5.4.3 sequence diagram for search hospitals5.5 ACTIVITY DIAGRAM

In Unified Modeling Language, an activity diagram represents the business and operational step by step workflows of components in a system. An activity diagram shows flow of control.

UML activity diagrams are typically used for business process modeling, for modeling the logic captured by a single use case or usage scenario, or for modeling the detailed logic of a business rule. Although UML activity diagrams could potentially model the internal logic of the complex operation it would be far better to simply rewrite the operation so that it is simple enough that you dont require an activity diagram .In many ways UML activity diagrams are the object oriented equivalent of flowcharts and from structured development.

5.5.1 Activity Diagram for DVG Blood Bank

Fig 5.5 Activity Diagram5.6 APPLICATION FLOWCHART

Fig 5.6 Application Flow Chart

The above diagram shows the flow chart of the application. When the user enters the application for the first time with proper internet connection he will be registered automatically by fetching the device ID for the future reference. After the successful registration the user will be directed to the main activity where he will be provided with options like send blood request, search donors, search hospitals and blood banks near him. A series of activities will be done when the user clicks on any of the displayed options. The database is used to search blood groups, donors, hospitals etc.,. When the user double taps on back button the application will be stopped.5.7 DATAFLOW DIAGRAM

Fig 5.7 Data Flow diagram

The above diagram shows the flow chart of the application. When the user enters the application for the first time with proper internet connection he will be registered automatically by fetching the device ID for the future reference. After the successful registration the user will be directed to the main activity where he will be provided with options like send blood request, search donors, search hospitals and blood banks near him. A series of activities will be done when the user clicks on any of the displayed options. The database is used to search blood groups, donors, hospitals etc. When the user double taps on back button the application will be stopped.CHAPTER 6IMPLEMENTATION

Implementation literally means to put into effect or carry out. The system implementation face of the software deals with the translation of the design specifications into the source code. The ultimate goal of the implementation is to write the source code and the internal documentation so that it can be verified easily. The code and the documentation should be written in a manner that uses testing, debugging and modification.

A post-implementation review is an evaluation of the extent to which the system accomplishes stated objectives and actual project costs exceed initial estimates. It is usually a review of major problems that need converting and those that surface during the implementation stage.Check Internet Connection

@Override

protected void onCreate(Bundle savedInstanceState) {

if ( device registered) {

goto Main Screen // Allowed to use offline data

} else if ( device not connected to network) {

DisplayErrorMessage( Please Connect to active network )

Exit // Exit the application

}

}

SendRequest Async Task

private class sendRequestTask extends AsyncTask {

@Override

protected Void doInBackground(Void... params) {

//get Register ID from SystermPrefrrences

String registrationId =SystermPrefrrences

.getString(PROPERTY_REG_ID, ");

//send request to server

ServerUtilities.sendRequest(SendNotification.this, notification ,registrationId);

}

}

Registering device

New AsyncTask(void, void, void) { //To make code run on separate thread

@Override

protected Void doInBackground(Void... params) {

//Check the registration id stored on device or not

if ( registrationId is Empty){

GoogleCloudMessaging.register();

//Store regId in preferrrences for later Use

}

if ( not registered on server ) {

registerRegidOnServer ( regId )

//store registration status in server

}

if ( OfflineData doesnt exists ){

dbDup = getServerDataDump ();

//Store dbDump to local Device DB

}

}

@Override

protected void onPostExecute(Void result) {

if ( successful ) {

goto main activity

}

}

}

SendNotification.javaOn Load of Ativity :

@Override

protected void onCreate(Bundle savedInstanceState) {

//SetDatePicker for future 1 month dates only

DatePickerDialogdpd = new DatePickerDialog(getActivity(), ondateSet, year, month, day);

dpd.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);

Calendar.add(Calendar.DAY_OF_MONTH, 30);

dpd.getDatePicker().setMaxDate(Calendar.getTimeInMillis());

//Load the bloddGroup from String.xml using ArrayAdapter

ArrayAdapter adapter = ArrayAdapter.createFromResource(this,

R.array.blood_grp_array, android.R.layout.simple_spinner_item);

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

spinnerBloodGrp.setAdapter(adapter);

}

RESULTS

Fig 5.1 HomepageFig 5.1 shows the Home page of this application. It is the gateway to access the application.Buttons in this page:

Blood Group: User should enter the required blood group here. Location: User should specify the location where he needs the blood.

Search Donors: User should enter this button to search the donors.

View Notifications: User should press this to view the notifications in the device.

Send Notifications: User should press this button to send the notifications to other users.

Search Blood Bank: User should press this to search blood banks.

Search Hospital: User should enter this button to search the hospitals near him.

Help Line Numbers: This button will show list of emergency numbers.

Tips for Donations: When the user press this button he will receive healthy tips for blood donations.

Update Profile: User should press this button to update his profile information.

Fig 5.2 Send notification

Fig 5.2 shows the send notification activity. Whenever user wants to send a notification with required blood group he enters this activity.Buttons in this page:

Name: User should enter his name.

Blood group: User should enter the required blood group.

Location: User should enter the location where the blood his required.

Phone Number: User should enter his phone number here.

Required on/before: User should specify the date on which he requires blood.

Fig 5.3 View notification Fig 5.3 shows the view notification activity. The users can view the notification in this page, which are sent by other users through send notification.CHAPTER 7REFERENCES Seth Y. Fiawoo and Robert Sowah of S.Y. Dept. of Computer. Engineering, University of Ghana Design and development of an Android application to process and display summarized corporate data in IEEE 4th international conference of Adaptive Science & Technology.Year:2012.

International Journal of Infinite Innovations in Technology|ISSN:2278 -9057,IJIIT|Volume-I|Issue-I|2012-2013,July|Paper-06,Reg. No.:20120618|DOI:V1I1P06 http://www.androidhive.info/

http://www.php.net/manual/

http://tutorialspoint.com/android/android_architecture.m http://www.mysql.com

International Journal of Research in Computer and Communication Technology, Vol 3, Issue 2, February- 2014 Towards Cloud to Device Push Messaging on Android: Technologies, Possibilities and Challenges. Int J. Communications, Networks and system Sciences 2012,5, 839-849 . https://support.google.com/googleplay/android-developer/

Unlocking Smartphone Data for Educational use in Teaching and learning environment. http://appinventor.mit.edu/explore/sites/explore.appinventor.mit.edu/files/resources/smartUniv.pdf Google, Inc., Google Earth software, http://earth.google.com/ [last accessed on

Feb 1, 2008]. D. Bernstein and A. Kornhauser, "An introduction to map matching for personal

navigation assistants", New Jersey TIDE Center, 1996.

Press back to

Exit

Stop

Start

No

Yes

Connect

Main menu

Error in connection

Update profile

Search hospitals

Search blood bank

Send notification

View notification

List of Hospitals

List of Bloodbanks

Enter details

List of notification

Send request

Caller dialog

View on map

Caller dialog

Page 9