1. i | P a g e
ProjectReport
(Project Semester Jan-June 2020)
Blood Bank ManagementSystem
Submitted by
Dikshant Bhawsar
Student ID: 16BCO
Under the Guidance of
Faculty Internship Guide: Industry Guide: Name
Designation: Assistant Professor Designation: Trainer
Department of Computer Science Engineering
UNIVERSITY NAME , Location
January To June, 2020
2. ii | P a g e
TABLE OF CONTENT
Table of Contents
Project Report ...................................................................................................................................i
Offer Letter ......................................................................................................................................ii
Joining Report.................................................................................................................................iii
Complition Certificate....................................................................Error! Bookmark not defined.
Declaration.......................................................................................................................................v
Acknowledgment ............................................................................................................................vi
Campany Profile ..........................................................................................................................1-3
1) Introduction................................................................................................................................. 4
2) Problem Statement...................................................................................................................... 5
3) Methedology............................................................................................................................... 6
ER-Diagram ........................................................................................................................ 7
Block Diagram.................................................................................................................... 8
Class Diagram..................................................................................................................... 9
Data Flow Diagram........................................................................................................9-11
4) Introduction to Cloud Computing............................................................................................. 12
4.1) Introduction to Cloud Computing.................................................................................... 12
4.2) Service Model Od Cloud Computing .............................................................................. 13
4.2.1) Software as a servive(Saas) ................................................................................... 12
4.2.2) Platform as a servive(Saas).................................................................................... 14
4.2.3) Infrastructure as a servive(Saas)........................................................................14-15
5) Saesforce Basics ....................................................................................................................... 16
5.1) Introduction to Salesforce................................................................................................ 16
5.2) Architecture of Salesforce ..........................................................................................16-18
5.3) Salesforce Multiple View of Controller .......................................................................... 19
5.4) Different editions of salesforce........................................................................................ 20
5.5) System overview.........................................................................................................21-22
5.6) Technology of salesforce................................................................................................. 22
1) Apex.............................................................................................................................. 22
2) Visualforce.................................................................................................................... 22
3. iii |P a g e
3) Lightning....................................................................................................................... 22
5.7) Benifiits of using salesforce ............................................................................................ 23
1) Invest in innovation, not in infrastructure .................................................................... 23
2) Don't Stress about data security.................................................................................... 23
3) Make Salesforce work way we want ............................................................................ 23
4)With AppExchange........................................................................................................ 23
5) Work on one plateform............................................................................................23-24
5.8) Campaigns ....................................................................................................................... 24
5.9)Leads................................................................................................................................. 25
5.10) Fields.........................................................................................................................25-26
6) Data Relationships.................................................................................................................... 26
6.1) Hierarchical Relationship ................................................................................................ 27
6.2) Lookup Relationship...................................................................................................27-28
6.3) Master Detail Relationship .........................................................................................29-31
6.4) Many-Many Rerationship...........................................................................................31-33
7) Implementation......................................................................................................................... 34
8) Developing Modules................................................................................................................. 35
8.1) Login Module .................................................................................................................. 35
8.1.1) Login.cmp..........................................................................................................35-38
8.1.2) LoginContoller.js.................................................................................................... 38
8.1.3) LoginHelper.js ...................................................................................................38-40
8.2) Register Module..........................................................................................................40-41
8.2.1) Register.cmp ......................................................................................................41-44
8.2.2) RegisterContoller.js ................................................................................................ 44
8.2.3) RegisterHelper.js ...............................................................................................44-46
8.3) Home Module .................................................................................................................. 46
8.3.1) Home.cmp..........................................................................................................46-50
8.3.2) HomeContoller.js...............................................................................................50-51
8.4) Donor Module.............................................................................................................52-53
8.4.1) Donor.cmp .........................................................................................................54-57
8.4.2) DonorContoller.js ..............................................................................................57-58
8.4.3) DonorHelper.js...................................................................................................58-60
5. v | P a g e
TABLE OF FIGURES
S.NO Topic
3.1 ER-Diagram
3.2 Block Diagram
3.3 Class Diagram
3.4 Data Flow Diagram
3.5 Data Flow Diagram for the donor
4.1 Cloud Computing
4.2 Service Model of cloud computing
4.3 Service Model
5.1 Salesforce Architecture
5.3 Salesforce MVC
5.4 Different version of salesforce
5.5 Salesforce Mobile Application
5.7.1 Data Security
5.7.2 Benefits of Salesforce
6.1 Hierarchical Relationship
6.2 Lookup Relationship
6.4 M-to-M Relationship
7.2 Schema Builder
8.1 Login Page
8.2.1 Registration Page
8.2.2 Data of Registration
8.3 Home Page
8.4.1 Donor Reg. Data
8.4.2 Donor Data
8.4.3 Donor Data Details
8.5.1 Data of Donor
8.6.1 Profile Page
8.7.1 Blood Request Page
8.7.2 Data Of Requester
6. 1 | P a g e
1) INTRODUCTION
Introduction Today the business and services environment is becoming very complex and
competitive. Besides the availability of modern technology, highly qualified and well- trained
staff, without an efficient management system, organizations cannot function efficiently.
Almost all the blood banks use the manual system because there is no centralized management
system to support their day to day activities. The objective of this project is to provide solution
based on ICT to improve efficiency of manual based systems and to eliminate the paper work.
Business Background:
Business Background Blood banks use the manual way to record data of its donors, acceptors,
details of blood etc. without knowing the fact that the data that is collected at the blood banks
can be used for many research purposes, and can be analyzed in different ways. For example
when a person comes to donate blood he has to go through many tests and the result of the tests
can be used to determine different patterns. The manual system itself is time consuming and
prone to human errors therefore it has less accuracy. It requires lots of man power, lacks data
security and retrieval of data is time
Strategy :
Many strategies can be used for successful implementation of this system. Firstly, we have to
move all the data from papers to the centralized servers so that information retrieval becomes
easier and we don’t lose our previous data and make high quality system through which we can
make our process work in more efficient way..
Objectives :
Our main object is to create a centralized system for blood banks which makes:
7. 2 | P a g e
2) PROBLEM OF STATEMENT
The percentage of people donating blood is increasing day by day due to awareness to donate
blood for those needed. The blood received have to be managed thoroughly so that there will be
no negative effect to the blood receiver once they received blood.
From the observations and interview conducted that have been made during the user
requirements phase, it was found out that there is no interaction medium between HSNZ and the
public to announce their blood donation schedule. The blood donation event schedule is normally
advertised to the public so that they are aware of the blood donation campaign period. At the
blood house unit, the staffs and nurses only are informed about the blood donation schedule for
each month on the whiteboard at the blood house. So they are using manual way in informing
the schedule. The problem arises when the space provided is not enough. The medium used to
inform the staff about the schedule of the month is using whiteboard and it is written by using
whiteboard marker. Therefore, the writing tends to become unclear. The public did not have
knowledge about blood donation. There are brochures distributed to the donor but not to the
public because they only available at blood donation house. Hence, the public are not getting any
details information about blood donation unless they go to the blood donation house.
To oversee these, the BBMS interface will be constructed to cater for the blood house staff to
post about the blood donation events. These details can be viewed by the public so that they
know and they can allocate some time to go and donate their blood. To ensure that the blood
donation event schedule is informed among the blood house staff, there will be an interface for
staff to be able to fill in details and list of location of the blood donation events for each month.
The data inserted will be displayed to the other blood donation staffs such as nurse so that
everyone can be notified about the blood donation event schedule even though the staff’s are not
available at the HSNZ. By having this function in BBMS, it is easier for the blood staff to make
any correction if there is any incorrect details and make any changes if there is any changes in
location or specified date.
.
8. 3 | P a g e
3) METHEDOLOGY
Implementation of this project will take careful analysis of all the attributes and entities in our
system and how they can be linked to each other. How the process will flow through different
entities will be a crucial task too. Also we have to perform the SWOT analysis for our system
to know the strengths, weaknesses, opportunities and threats and how external and internal
forces can influence our system. After the SWOTanalysis we will make the E-R diagram then
the class diagram which will visually represent our proposed system in a better way.
Figure shows the incremental models that are chosen in developing this
project. This model has been selected because project can be developed
through cycle of phase. The development of the project is that it must follow
the phase that is a phase at a time. If there is any correction, it can be done in
the middle of the process. Incremental model included five phases which are
requirement analysis, design, implementation and unit testing, integration and
system testing and operation.
9. 4 | P a g e
Figure 3.1: ER-Diagramm
Objects required are:
login {email_c, password_c}
Donor {s_id, d_name, d_email, d_address, d_contact, bloodgroup}
register{r _id, name, contact, email, address, password}
Blood request{r_id, r_name, hospital, bloodgroup, r_contact,r_age }
11. 6 | P a g e
Figure 3.3: Class Diagram
Data Flow Diagram
A data flow diagram is a short road map for that graphically represents how the data moves
through the existing system .we have used data flow diagram in design process. The data flow
diagram provides facilitating communication between us and user. DFD shows what kinds of
information will be input to and output from the system, where the data will come from and go
to, and where the data will be stored. It does not show information about the timing of processes,
or information about whether processes will operate in sequence or in parallel.
Circle
The processes are represented by circle shows what the action take on the data-checking. A
process accepts input data needed for the process to be carried out and produces data that it passes
on to another part of the DFD.
12. 7 | P a g e
Arrow
Arrow defines direction of the data flow. It shows the direction between a data store to another
data store, source to processes.
Square
Square indicate the source and destination of the system.
Open Rectangle
A database is a repository of data here it represented by open-ended box. This information may
be stored either temporarily or permanently by admin .Data may be changed or updated.
Figure 3.4: A data flow diagram for the Requester
User
Or
requester Database
Proces
s
Result
13. 8 | P a g e
Data flow diagram for the Donor
Figure 3.5: A data flow diagram for the Donor.
Donor Input Data Proces
s
Data
Stored in
Database
Result
14. 9 | P a g e
4) CLOUD COMPUTING
4.1 : Introduction to Cloud Computing
Cloud computing is usually defined as storing and managing the data over the cloud, rather thana
local server. Cloud computing is easy to understand. All applications are developed and run in
the web browser. Using the internet connection, users and developers will have access to whole
applications thus eliminating the complexity and overhead of the maintain environment.
Unlike traditional business applications which are complicated, expensive and need experts to
install, run, update and secure, cloud computing can be accessed anywhere with an online
connection. In traditional systems, the entire infrastructure must work together. For such type of
seamless interaction, and for the smooth run of the system, a constant maintenance is always
required. With cloud computing, there is no necessity to invest money in acquiring and
supporting hardware and software infrastructure, thus decreasing the potential cost for users and
developers.
The main impact of cloud computing is on the responsiveness of IT systems. With the cloud
computing environment, we can add users and developers instantly, and the applications can be
deployed rapidly into the cloud which reduces the user request response time. As the complexity
of the of the internal systems is removed, the organization can speed up the entire IT process.
15. 10 | P a g e
Figure 4.1: Cloud Computing [6]
4.2 Service Models of Cloud Computing
4.2.1 Software as a Service (SaaS)
The end user can access the application which is developed by the provider on a cloud
framework. The developed applications are available from different customer devices through
interfaces like a web program or a program interface. Cloud infrastructure, servers, networks,
storage and operating systems cannot be managed or controlled by the customer.
Cloud application services represent the increasing cloud market. Software as a service utilizes
the internet to deploy the applications overseen by the vendor and whose interface will be able
to access on the customer side. Many of the applications developed using SaaS will run in a web
browser by using some plugins. There will not be need of any download or establishment
The major applications which are developed using SaaS are healthcare related applications, client
relationship administrations, incorporate email, and collaboration. Some of the costly ventures
which are not able to considered as software vendors started using SaaS to get the upper hand and
gain income.
16. 11 | P a g e
4.2.2 Platformas a Service(PaaS)
The Client can deploy onto the cloud infrastructure developed by the customers with the help of
libraries, tools, services and the programming languages which are supported by the client. The
underlying infrastructure of cloud and storage, servers, network or operating systems cannot be
managed or controlled by the Customer.
Cloud platform services can be utilized for applications and their advancements when cloud
segments are given to programming. Developers can be able to pick the structure using PaaS
where the applications can be expanded to create or modify. The testing and deployment of
applications become easy and fast if the PaaS is used.
Enterprise PaaS gives a self-service portal to programming engineers for overseeing computing
infrastructure from information technology operations. Scalability, Software as a service
enablement and multi-occupancy can be acquired by the applications using PaaS. The coding
fundamental measure will be decreased for the enterprises using PaaS and the application will be
converted to a hybrid model.
4.2.3 Infrastructure as a Service (IaaS)
The customer can arrange systems, storage, processing and other essential computing resources in
which the client can run and send arbitrary software like applications and operating systems. The
hidden cloud infrastructure is not controlled or overseen by the
customer but rather he can control over operating systems, storage, servers and network. Cloud
infrastructure services, referred to as IaaS, are models beneficial for overseeing and observing
remote data center frameworks such as organizing, processing, stockpiling and networking
services. With the help of IaaS, clients will get utility billing and power benefits.
17. 12 | P a g e
Figure4.2: Service Models of Cloud Computig
Figure4. 3: Service Models
18. 13 | P a g e
5) SALESFORCE BASICS
5.1 Introduction to Salesforce
Salesforce is one of the world's prime cloud computing companies and number one on-demand
customer relationship management (CRM). Salesforce does not need any software installation or
hardware or any infrastructure like servers. All we need to access Salesforce is the internet. This
empowers even the most non-techie individuals to be able to use the system and configure it as per
their needs.
Established as Salesforce.com (SFDC) and its customer relationship management (CRM) service and
then divided into different sectors like sales cloud, service cloud, community cloud, analytics cloud,
data cloud, marketing cloud, app cloud, and so on.
Since Salesforce coordinates well with all the platforms and supports all major OS and mobile
devices, it is anything but difficult to utilize Salesforce outside of the workplace, thus helps to
improve productivity.
5.2 The Architecture of Salesforce
Salesforce has a multi-tenant Architecture. Multi-tenancy is the fundamental technology utilized as
a part of the cloud to share its resources safely and cost effectively. It's much the same as bank
services where various tenants cost-efficiently share a common infrastructure yet safely and with
most protection from other tenants. A cloud utilizes multi-tenant infrastructure to share its assets
safely among different applications and occupants (organizations, associations, and so on) that use
the cloud. Some clouds utilize virtualization-based architecture to confine occupants; others utilize
custom software architecture to take care of business. The multi-tenant outline of a cloud service can
dramatically affect the application delivery and the profitability of IT organization.
19. 14 | P a g e
Figure 5.1: Salesforce Architecture
Architecture Salesforce
Salesforce delivers a highly customized experience to the customers, employees, and partners of an
organization. Such a platform is used to customize standard functionality and create custom pages,
components, apps, etc. Also it is done faster, mainly because of the superb architecture on which it is
built. Below is a brief introduction to the Salesforce Architecture.
The architecture of Salesforce can be put into layers for better understanding. The purpose and function
of each layer is described below −
Trusted Multitenant Cloud :
Here multiple instances of one or multiple applications operate independently in a shared environment.
The instances are referred as tenants and they logically separate from each other while physically
remaining in the same hardware. It is called trusted because of both its robust nature and high security.
Scalable Metadata Platform :
The metadata driven platform makes it easy for customization and scaling up as the amount of data or
concurrent user instances increase.
20. 15 | P a g e
Enterprise Ecosystem :
The Enterprise Ecosystem of Sales is very large as a large number of partners contribute by creating
and maintaining applications in this platform.
CRM and Related Functionality :
Salesforce includes all aspects of CRM in its list of features and also extends it by providing features
for creation of apps and integrating analytics, etc.
APIs :
Salesforce provides powerful suite of APIs. This helps to develop and customize the Salesforce1 Mobile
App
Figure 5.2: Multi-Tenanc
21. 16 | P a g e
5.3 SalesforceMultiple View Controller (MVC)
MVC is a design pattern which separates business logic from interface logic i.e. it separates the
graphical interface displayed to the user with the code that manages the user actions.
In Salesforce, using SFDC visual force, we can write VIEW pages which are very similar to java
servlets page (JSP) pages. Each visual force (VF) page is corelated with a controller. The controller
and model classes can be written using Apex language. In SFDC, controller part comprises of
workflows, triggers, Apex classes and model layer comprises of fields, relationships, objects and
View layer comprises of Tabs, page layouts, VF pages.
SFDC MVC mainly consists of three modules namely Model, View and Controller.
1) Model: Here we represent what schema and data the Salesforce used for the system representation
and objects are a model, as every entity is mapped to some subject in Salesforce.
2) View: Here we represent how data and schema and visual force are used to present data to
users.
3) Controller: Here we use controllers and interface actions to perform actions when the user
interacts with visual force
Figure 5.3: Salesforce MVC
22. 17 | P a g e
5.4 Different editions of Salesforce
Salesforce offers different editions of its products and services depending on business needs.
1) Professional Edition: This edition offers full CRM functionality.
2) Enterprise Edition: This edition offers advanced CRM customization and administration tools
along with functionalities of Professional edition.
3) Unlimited Edition: Along with functionalities offered by Enterprise Edition, Unlimited Edition
even offers full mobile access, premier support, unlimited custom apps and more. 4)Developer
Edition: This edition allows developers to extend the Salesforce system, integration with other
applications and develop new applications and tools.
Figure 5.4: Different Versions of Salesforce
23. 18 | P a g e
5.5 System Overview
Salesforce.com allows administrators to configure and design systems for complex implementations.
Salesforce combines the power of configuration and custom development in its platform i.e.
Force.com Platform. This platform user can make use of custom code, workflows rules, approval
processes to implement their business logic and they can integrate the data with other applications,
generate reports and do the analytics within no time. The Salesforce CRM model is used in
organizations for interactions like emails, meetings, events with customers and also for prospects like
sales, marketing, and support.
With Force.com, we can run business in the mobile using the Salesforce1 app. We can
build and optimize the apps for mobile using HTML 5 and UI framework and it supports all devices
with just one code base . Salesforce1 downloadable app can be installed from the App store or Google
play on a mobile device.
Figure 5.5: Salesforce Mobile App 1
24. 19 | P a g e
Salesforce even has an app marketplace called AppExchange where we can find pre-built business
applications. AppExchange offers thousands of verified and secured apps built by others or we can
develop our own app and sell it here. It’s quite similar to the App store and the play store.
Due to its ease of access, ease of use, minimum licensing/proprietary issues, and per user cost,
Salesforce becomes a power system from small to large scale industries.
5.6 TechnologiesofSalesforce
1) Apex
Salesforce has a programming language called Apex. It is a case-insensitive, mostly typed object-
oriented programming language with syntax identical Java with curly brackets and dot-notation
syntax. Apex is used to run programs and procedure in Force.com such as links, buttons, record
insertion and so on with visual force custom controllers .
2) Visualforce
Visualforce (VF) is a framework for the Force.com platform with tag-based markup language
identical to HTML. With the help of Visualforce, custom pages can be created for mobile apps and
desktops with the help of with other front-end technologies like HTML, CSS, jQuery, and JavaScript.
With the Visualforce standard and custom controller features, we can build our own business logic
in Apex.
3) Lighting
Lightning is a component-based framework for the Salesforce1 mobile app which is built on an open
source Aura framework. With the lighting framework, responsive applications can be built easily.
The apps build on the Lighting framework is sold or brought on AppExchange.
Lightning App builder for Salesforce is a tool for quick application advancement of responsive web
interfaces. This interface takes into account distinctive screens to be assembled given lightning
segments. This can be layouts as formats for records or particular applications.
25. 20 | P a g e
5.7 Benefits of Using Salesforce
1) Invest in innovation, not infrastructure
With Salesforce, we can focus on business rather than the back end as Salesforce add new features
and automatic upgrades three times a year. These boundary-pushing work made Salesforce one of
Forbes’ Most Innovative Companies.
2) Don’t stress about the data security
Figure 5.7.1: Data Security
3) Make Salesforcework the way we want
Salesforce can be customized to the core to be more agile and productive and the apps can be
developed with interfaces with point and click to high-end platforms.
4) With AppExchange, find Prebuilt applications in minutes
With industry-specific third-party apps, Salesforce can be spread to every division and corporation.
These apps are installed by millions of people and are reviewed by thousands. So with trust on the
apps, we can focus on extending the business.
5) Work on one platform where everything works together
With Salesforce APIs, core technologies and third-party tools, we can connect and manage data
from any system and from anywhere. Salesforce works in Desktop, Mobile Devices, and iPad to
26. 24 | P a g e
Salesforceevenhave:
Figure 5.7.2: Benefits of Salesforce
5.8) Campaigns
Salesforce describes campaigns as “a marketing tactic (or series of tactics) that are
designed to achieve specific goals such as increased revenue, leads, adoption, etc.”
Manage outbound marketing campaigns with direct mail programs, seminars, print ads,
email, and other kinds of marketing collateral. Organize campaigns into hierarchies for
easy analysis to see what works best for increasing your company’s sales. Salesforce
makes it easy for you to quickly locate, manage, and report on campaigns.
Types of Campaigns :
Conference
Webinar
Advertisement
Banner Ads
Direct mail
Email
Others
27. 25 | P a g e
5.9) Leads :-
In Salesforce, a lead is a prospective client or a potential opportunity, also called an
“unqualified sales opportunity.” Leads can come from real-life interactions, such as
meeting someone at a conference; or they can come from online interactions, such as when
someone fills out a form on your website requesting more information.
Industries of Leads :
Banking
Chemicals
Education
Electronics
Entertainment
Food and Beverage
Others
5.10) Fields :
A field is like a custom Database column. Object field Store the data for our
records. Salesforce by default provide few fields with salesforce standard objects those
are called standard fields.
Some Fields Type
Auto-Number
Formula
Checkbox
Currency, Number and Percent
28. 26 | P a g e
Picklist and Multi-Select
TextArea and TextArea Long
Phone and Email
Geolocation
6) DATA RELATIONSHIP :
The relationships are maintained by using the Relationship Fields. It is a custom field
which links one object record to another.
Type Of Relations :
1. Lookup
2. Master Detail
3. Many to Many Relationship
4. Hierarchical
29. 27 | P a g e
6.1) Hierarchical Relationship:
This type of relationship is a special lookup relationship available only for the user object.
It allows users to use a lookup field to associate one user with another that does not directly
or indirectly refer to itself. For example, you can create a custom hierarchical relationship
field to store each user’s direct manager.
It is a one-to-one relationship, it can be created only with one user object in the approval
process so as to assign who is reporting to whom.
Figure 6.1: Hierarchical Relationship
6.2) LookUp Relationship:
One to Many relationship links one record to another record.
Can link standard to custom objects and vice versa, or link to the same object type (parent
account, for instance).
The field of objects gets its values from record of objects, if the record in object1 gets
deleted the field becomes empty in objects2.
30. 28 | P a g e
Figure 6.2: Lookup Relationship
In a 1-to-many relationship, if we delete the parent record, the child record will not get
deleted.
Creating look-up relationship:
31. 29 | P a g e
6.3) Master Detail Relationship:
It is similar to look-up relationship, but if a parent record is deleted, the child record also
will be deleted automatically.
Every child record should be associated to a parent, child record can’t exist individually.
Manual sharing and sharing rules are not allowed for the child record.
We can’t have standard objects on the child side, only custom objects are allowed.
Creating master-details relationship:
This is a parent child relationship where master-objects control certain behaviors of the
detail-object.
Software candidates and jobs applied objects
Click on username → setup → app setup → create → objects → click on jobs applied
object → go to custom fields and relationship click on new → master details relationship
(select) → next → related to the candidate → next → field label candidate → field name
candidate → child relationship name jobs-applied1 → next → next → save.
Now, that the master-detail relationship for candidate object is created, the candidate
object acts as master object now. We can create a roll-up summary for any field in
candidate master objects.
Rollup summary:
A roll-up summary field calculates values from related records, such as those in a related
list. You can create a roll-up summary field to display a value in a master record based on
the values of fields in a detail record. The detail record must be related to the master
through a master-detail relationship.
The read only field is used to display the count of the child records as sum, count, min,
max of a field in the particular child object.
This will only enable master-detail relationship for the master.
32. 30 | P a g e
How to activate roll-up summary?
There are no steps to activate.
The rollup summary field gets activated automatically when an object becomes a master
object.
A look-up relationship does not activate rollup summary
A rollup summary field providers aggregate in the form of child object field in the master
objects.
Creating rollup summary:
Begin creating your roll-up summary just as you create any other custom field:
Master object candidate
Summarized object jobs applied
Select roll up type
1. Count
2. Sum
33. 31 | P a g e
3. Min field to aggregate none
4. Max
6.4) Many – Many Relationship:
This relationship cannot be created directly, it comes as a result of two master objects
having a common child object.
The child objects are known as function objects and the relationship between the two
master objects is known as many-many relationship.
Ex: A single position can be found on multiple website and on one website we have
multiple positions.
Figure 6.4: M-To-M Relationship
34. 32 | P a g e
Creating Many-to-Many Relationship:
First, create junction object
Setup → create → object → new custom object → student tech → data type auto number
→ display format ju-{000} → starting no1 → save
Create MDR between student techs to student (master)
Related list label student
↓
Save and new
Create MDR between student techs to technology (master)
Related list label technology
↓
Save
Data Loader :
Data Loader is a client application for the bulk import or export of data. Use it to insert,
update, delete, or export Salesforce records. When importing data, Data Loader reads,
extracts, and loads data from comma-separated values (CSV) files or from a database
connection. When exporting data, it outputs CSV files.
Operation of Data Loader :
Import mass data
Update mass data
Delete mass data
Export mass data from salesforce to local system
Upsert Operation
Import mass data with Data Import Wizard
35. 33 | P a g e
Update mass data with Data Import Wizard
Delete mass data with Data Import Wizard
Infrastructure
To implement the system I would use developer’s account of sales force. Through that I
will be able to manage all the communications with the donors, the hospitals and people
in emergency. If this system runs well next step would be analysis of the data collected.
36. 34 | P a g e
7) IMPLEMENTATION
This have discussed about the requirements of the Blood Bank Management System and
also the design of the system. In this part I will discuss the implementation of that system.
The aim was to make the centralized system of the Blood Bank for the easy maintenance
utilization and analysis of information.
Figure 7.2:Schema Builder
Salesforce Schema Builder provides a dynamic surrounding to feature new custom
objects, custom fields, and relationships to your schema. This eliminates the requirement
to click from page to page to seek out the details of a master-detail relationship or to
feature a brand new custom field to an object in your schema.
37. 35 | P a g e
8) DEVELOPING MODULES
8.1) Login Module :
Figure 8.1: Login Pag
8.1.1) Login.cmp
<aura:component controller="project">
<aura:attribute name ="email" type ="string"/>
<aura:attribute name ="password" type ="string"/>
<aura:attribute name ="showlog" type ="boolean"/>
<aura:attribute name ="showreg" type ="boolean"/>
<aura:attribute name ="showdon" type ="boolean"/>
<aura:attribute name ="showreq" type ="boolean"/>
<aura:attribute name ="showdata" type ="boolean"/>
<aura:attribute name="showhome" type="boolean" />
38. 36 | P a g e
<div class = "slds-grid slds-wrap" style = "height:100%;">
<div class = "slds-col slds-size_3-of-12">
</div>
<div class ="slds-col slds-size_6-of-12">
<article class = "slds-card" style = "margin-top:25%;">
<div class = "slds-card_header slds-grid">
<header class = "slds-media slds-media_center slds-has-flexi-
truncate">
<div class = "slds-media__body">
<h2 class = "slds-card__header-title">
<div class="slds-align_absolute-center">
<div class="slds-align_absolute-center"><span style =
"position:center;">BLOOD BANK</span> </div>
</div>
</h2> <h2 class = "slds-card__header-title">
<span style = "position:center;">Login</span>
</h2>
</div>
39. 37 | P a g e
</header>
</div>
<div class = "slds-card_body slds-card_body_inner">
<lightning:input type = "text" label ="Email" value =
"{!v.email}"/>
<lightning:input type = "password" label ="Password" value =
"{!v.password}"/>
</div>
<footer class = "slds-card_footer">
<div class="slds-align_absolute-center">
<button onclick = "{!c.loginCMP}" class ="slds-button slds-
button_neutral">Login</button>
<button onclick = "{!c.RegisterCMP}" class ="slds-button slds-
button_neutral">Register</button>
</div>
</footer></article>
</div>
<div class = "slds-col slds-size_3-of-12">
40. 38 | P a g e
</div></div>
</aura:component>
8.1.2) LoginController.js
({
RegisterCMP : function(component, event, helper)
{
component.set("v.showreg",true);
component.set("v.showlog",false);
component.set("v.showdata",false);
},
loginCMP : function(component, event, helper)
{
helper.helper1(component,event);
}})
8.1.3)LoginHelper.js
({
helper1: function(component, event) {
var action = component.get("c.loginUser");
var Email = component.get("v.email");
var Password = component.get("v.password");
41. 39 | P a g e
var data = { Email__c: Email, Password__c: Password };
action.setParams({
data: JSON.stringify(data)
});
action.setCallback(this, function(response) {
var state = response.getState();
if (component.isValid() && state === "SUCCESS") {
var data = JSON.parse(response.getReturnValue());
console.log(data);
window.localStorage.setItem("ID", data.key);
var i = window.localStorage.getItem("ID");
if (data.msg == 100) {
component.set("v.showreg", false);
component.set("v.showlog", false);
component.set("v.showhome", true);
alert("Login Success");
}
if (data.msg == 200) {
alert("Password Mismatch");}
if (data.msg == 300) {
alert("Register your Email");
}} else {
alert("Not Login");
42. 40 | P a g e
});
$A.enqueueAction(action);
}});
8.2) Register Module :
Figure 8.2.1: RegisterPage
43. 41 | P a g e
DataBase:-
Figure 8.2.2: Register Page Data
8.2.1) Register.cmp
<aura:component controller="project">
<aura:attribute name ="arrdata" type ="Object[]"/>
<aura:attribute name ="FirstName" type ="string"/>
<aura:attribute name ="LastName" type ="string"/>
<aura:attribute name ="Email" type ="string"/>
<aura:attribute name ="PhoneNumber" type ="string"/>
<aura:attribute name ="DOB" type ="string"/>
<aura:attribute name ="Address" type ="string"/>
<aura:attribute name ="Password" type ="string"/>
<aura:attribute name ="showlog" type ="boolean"/>
<aura:attribute name ="showdon" type ="boolean"/>
<aura:attribute name ="showreq" type ="boolean"/>
44. 42 | P a g e
<aura:attribute name ="showreg" type ="boolean"/>
<aura:attribute name ="showdata" type ="boolean"/>
<aura:attribute name="showhome" type="boolean" />
<div class = "slds-grid slds-wrap" style = "height:100%;">
<div class = "slds-col slds-size_3-of-12">
</div>
<div class ="slds-col slds-size_6-of-12">
<article class = "slds-card" style = "margin-top:25%;">
<div class = "slds-card_header slds-grid">
<header class = "slds-media slds-media_center slds-has-flexi-
truncate">
<div class = "slds-media__body">
<h2 class = "slds-card__header-title">
<div class="slds-align_absolute-center">
<span style = "position:center;">Register</span>
</div>
</h2>
</div>
</header>
</div>
<div class = "slds-card_body slds-card_body_inner">
<lightning:input type = "text" label ="FirstName" value =
"{!v.FirstName}"/>
45. 43 | P a g e
<lightning:input type = "text" label ="LastName" value =
"{!v.LastName}"/>
<lightning:input type = "text" label ="Email" value =
"{!v.Email}"/>
<lightning:input type = "text" label ="PhoneNumber" value =
"{!v.PhoneNumber}"/>
<lightning:input type = "date" label ="DOB" value =
"{!v.DOB}"/>
<lightning:input type = "text" label ="Address" value =
"{!v.Address}"/>
<lightning:input type = "password" label ="Password" value =
"{!v.Password}"/>
</div>
<footer class = "slds-card_footer">
<div class="slds-align_absolute-center">
<button onclick = "{!c.RegisterCMP}" class ="slds-button slds-
button_neutral">Register</button>
<button onclick = "{!c.loginCMP}" class ="slds-button slds-
button_neutral">Back to login</button>
</div>
</footer>
</article>
</div>
46. 44 | P a g e
<div class = "slds-col slds-size_3-of-12">
</div>
</div>
</aura:component>
8.2.2) RegisterController.js
({
loginCMP : function(component, event, helper){
component.set("v.showlog",true);
component.set("v.showreg",false);
component.set("v.showdata",false);
},
RegisterCMP : function(component, event, helper){
helper.Register123(component,event);
}
})
8.2.3) RegisterHelper.js
({
Register123 : function(component,event) {
var action=component.get("c.registerUser");
var fname=component.get("v.FirstName");
var lname=component.get("v.LastName");
var email=component.get("v.Email");
var password=component.get("v.Password");
47. 45 | P a g e
var pnumber=component.get("v.PhoneNumber");
var address=component.get("v.Address");
var dob=component.get("v.DOB");
var data={ "FirstName__c":fname,"LastName__c":lname,
"Email__c":email, "Password__c":password,
"PhoneNumber__c":pnumber,
"DOB__c":dob,"Address__c":address};
action.setParams({'data' : JSON.stringify(data)});
action.setCallback(this,function(response){
var state=response.getState();
if(component.isValid() && state==="SUCCESS"){
var data=JSON.parse(response.getReturnValue());
console.log(data);
component.set("v.showreg",false);
component.set("v.showlog",true);
component.set("v.showdata",false);
window.localStorage.setItem('ID',data.key);
alert(state);
}else{
alert(state);
}
})
$A.enqueueAction(action);
48. 46 | P a g e
}
}
)
8.3) Home Page Module :
Figure 8.3: Home Page
8.3.1) Home.cmp
<aura:component >
<aura:handler name="init" action="{!c.doInit}"
value="{!this}"/>
<aura:attribute name ="showlog" type ="boolean"/>
<aura:attribute name ="showreg" type ="boolean"/>
<aura:attribute name ="showdata" type ="boolean"/>
49. 47 | P a g e
<aura:attribute name ="showdon" type ="boolean"/>
<aura:attribute name ="showreq" type ="boolean"/>
<aura:attribute name="showhome" type="boolean" />
<aura:attribute name="checkprofile" type="boolean" />
<aura:attribute name="checkreq" type="boolean" />
<aura:attribute name="checkdon" type="boolean" />
<aura:attribute name="showprofile" type="boolean" />
<aura:if isTrue="{!v.showdata}">
<c.showCMP showdata="{!v.showdata}"/>
</aura:if>
<aura:if isTrue="{!v.checkprofile}">
<c.ProfileCMP showprofile="{!v.checkprofile}"
showhome="{!v.checkhome}"/>
</aura:if>
<aura:if isTrue="{!v.checkdon}">
<c:DonorRegCMP
showdon="{!v.checkdon}"
showreq="{!v.checkreq}"
showhome="{!v.checkhome}"
/>
</aura:if>
<aura:if isTrue="{!v.checkreq}">
<c:BloodRequestCMP
50. 48 | P a g e
showdon="{!v.checkdon}"
showreq="{!v.checkreq}"
showhome="{!v.checkhome}"
/>
</aura:if>
<div class="slds-brand-band slds-brand-band_medium"></div>
<div class = "slds-grid slds-wrap" style = "height:100%;">
<div class = "slds-col slds-size_3-of-12">
</div>
<div class ="slds-col slds-size_6-of-12">
<article class = "slds-card" style = "margin-top:15%;">
<div class = "slds-card_header slds-grid">
<header class = "slds-media slds-media_center slds-has-flexi-
truncate">
<div class = "slds-media__body">
</div>
<lightning:carouseldisableAutoRefresh="false"
disableAutoScroll="false">
<lightning:carouselImage
src =
"https://miro.medium.com/max/1400/1*KJACFKJ0GKtnhgR7
OmlPFA.gif"
header = "DONATE BLOOD"
51. 49 | P a g e
>
</lightning:carouselImage>
<lightning:carouselImage
src = "https://www.brmsonline.com/wp-
content/uploads/2018/02/Donate-Blood.jpg"
header = "SAVE LIFE"
>
</lightning:carouselImage>
<lightning:carouselImage
src = "https://cdn.arstechnica.net/wp-
content/uploads/2013/05/donate_blood_rotator.jpg"
>
</lightning:carouselImage>
</lightning:carousel>
</header>
</div>
<footer class = "slds-card_footer">
<div class="slds-align_absolute-center">
<button onclick="{!c.donate}" class="slds-button slds-
button_neutral">Donate</button>
<button onclick="{!c.request}" class="slds-button slds-
button_neutral">Request</button>
52. 50 | P a g e
<button onclick = "{!c.profile}" class ="slds-button slds-
button_neutral">User Profile</button>
<button onclick = "{!c.logout}" class ="slds-button slds-
button_neutral">Logout</button>
</div>
</footer>
</article>
</div>
<div class = "slds-col slds-size_3-of-12">
</div>
</div>
</aura:component>
8.3.2)HomeController.js
({
doInit : function(component, event, helper){
console.log("2")
component.set("v.showdata",false)
},
showCMP : function(component, event, helper) {
console.log("1")
component.set("v.showdata",true);
component.set("v.showhome", false);
},
54. 52 | P a g e
8.4) Donor Module :
This object contains the details of the donors that are registered in the Blood Bank.
Validation Rules In this the age of the donor cannot be less than 18 to donate blood. This
validation will not allow the user, with age less than 18 years, to register further.
Figure 8.4.1:Donor Registration Page
55. 53 | P a g e
Database:
Figure8.4.2) Donor Data
Data Entry:
Figure8.4.3) Donor Data Details
56. 54 | P a g e
8.4.1) Donor.cmp
<aura:component controller="project">
<aura:attribute name ="arrdata" type ="Object[]"/>
<aura:attribute name ="FirstName" type ="string"/>
<aura:attribute name ="LastName" type ="string"/>
<aura:attribute name ="Email" type ="string"/>
<aura:attribute name ="ContactNumber" type ="string"/>
<aura:attribute name ="DOB" type ="string"/>
<aura:attribute name ="Age" type ="string"/>
<aura:attribute name ="BloodGroup" type ="string"/>
<aura:attribute name ="Gender" type ="string"/>
<aura:attribute name ="Address" type ="string"/>
<aura:attribute name="showdon" type="boolean" />
<aura:attribute name="showlog" type="boolean" />
<aura:attribute name="showreq" type="boolean" />
<aura:attribute name="showreg" type="boolean" />
<aura:attribute name="showdata" type="boolean" />
<aura:attribute name="showhome" type="boolean" />
<div class = "slds-grid slds-wrap" style = "height:100%;">
<div class = "slds-col slds-size_3-of-12">
</div>
<div class ="slds-col slds-size_6-of-12">
<article class = "slds-card" style = "margin-top:25%;">
<div class = "slds-card_header slds-grid">
57. 55 | P a g e
<header class = "slds-media slds-media_center slds-has-flexi-
truncate">
<div class = "slds-media__body">
<h2 class = "slds-card__header-title">
<div class="slds-align_absolute-center">
<span style = "position:center;">Donor Registration</span>
</div>
</h2>
</div>
</header>
</div>
<div class = "slds-card_body slds-card_body_inner">
<lightning:input type = "text" label ="FirstName" value =
"{!v.FirstName}"/>
<lightning:input type = "text" label ="LastName" value =
"{!v.LastName}"/>
<lightning:input type = "text" label ="Email" value =
"{!v.Email}"/>
<lightning:input type = "text" label ="ContactNumber" value =
"{!v.ContactNumber}"/>
<lightning:select aura:id="field" label="BloodGroup"
required="true" name="BloodGroup"
value="{!v.BloodGroup}">
58. 56 | P a g e
<option value="A+">A+</option>
<option value="A-">A-</option>
<option value="B+">B+</option>
<option value="B-">B-</option>
<option value="O+">O+</option>
<option value="O-">O-</option>
<option value="AB+">AB+</option>
<option value="AB-">AB-</option>
</lightning:select>
<lightning:input type = "date" label ="DOB" value =
"{!v.DOB}"/>
<lightning:input type = "text" label ="Age" value =
"{!v.Age}"/>
<lightning:input type = "text" label ="Gender" value =
"{!v.Gender}"/>
<lightning:input type = "text" label ="Address" value =
"{!v.Address}"/>
</div>
<footer class = "slds-card_footer">
<div class="slds-align_absolute-center">
<button onclick = "{!c.DonorRegCMP}" class ="slds-button
slds-button_neutral">Register</button>
60. 58 | P a g e
})
8.4.3) Donorhelper.js
({
DonorReghelper: function(component, event) {
var action = component.get("c.donorUser");
var fname = component.get("v.FirstName");
var lname = component.get("v.LastName");
var email = component.get("v.Email");
var bgroup = component.get("v.BloodGroup");
var contactnumber = component.get("v.ContactNumber");
var gender = component.get("v.Gender");
var add = component.get("v.Address");
var dob = component.get("v.DOB");
var age = component.get("v.Age");
var data = {
Name: fname,
Last_Name__c: lname,
Email__c: email,
61. 59 | P a g e
Blood_Group__c: bgroup,
Contact_Number__c: contactnumber,
Gender__c: gender,
Address__c: add,
DOB__c: dob,
Age__c: age
};
action.setParams({ data: JSON.stringify(data) });
action.setCallback(this, function(response) {
var state = response.getState();
if (component.isValid() && state === "SUCCESS") {
var data = JSON.parse(response.getReturnValue());
console.log(data);
component.set("v.showdon", true);
component.set("v.showreq", false);
component.set("v.showdata", false);
window.localStorage.setItem("ID", data.key);
62. 60 | P a g e
alert(state);
} else {
alert(state);
}});
$A.enqueueAction(action);
}});
8.5) Data Show Module :
Figure8.5.1) Data of Donor
8.5.1) showdata.cmp
<aura:component controller="project">
<aura:handler name="init" action="{!c.doInit}"
value="{!this}"/>
<aura:attribute name ="arrdata" type ="Object[]"/>
<aura:attribute name="showhome" type="string" />
63. 61 | P a g e
<aura:attribute name="showdata" type="string" />
<aura:attribute name ="showlog" type ="boolean"/>
<aura:attribute name ="showdon" type ="boolean"/>
<aura:attribute name ="showreq" type ="boolean"/>
<aura:attribute name ="showreg" type ="boolean"/>
<aura:attribute name="dataarray" type="Object[]" />
<meta name="viewport" content="width=device-
width,height=100%"/>
<div class="slds">
<table class="slds-table slds-table--borderd slds-table--
striped">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Phone Number</th>
<th>Date of Birth</th>
<th>Address</th>
<th>Blood Group</th>
<th>Gender</th>
</tr>
71. 69 | P a g e
profile: function(component, event) {
var action = component.get("c.profile");
var data = window.localStorage.getItem("ID");
console.log(data);
var data1={'ID':data};
action.setParams({'data':JSON.stringify(data1)});
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
console.log(JSON.parse(response.getReturnValue()));
component.set("v.arrdata",
JSON.parse(response.getReturnValue()));
} else {
alert(state);}});
$A.enqueueAction(action);}});
72. 70 | P a g e
8.7) Blood Request Module :
Figure8.7.1) Blood Request Reg.
77. 75 | P a g e
HomeCMP: function(component, event, helper) {
component.set("v.showhome", true);
component.set("v.showreq", false);
},
BloodRequestCMP: function(component, event, helper) {
helper.BloodRequesthelper(component, event);
}
});
8.7.3) BloodRequesthelper.js
({
BloodRequesthelper: function(component, event) {
var action = component.get("c.bloodrequestuser");
var patientname = component.get("v.PatientName");
var age = component.get("v.Age");
var sex = component.get("v.Sex");
var hospitalname = component.get("v.HospitalName");
var contactnumber = component.get("v.ContactNumber");
var bgr = component.get("v.BloodGroupRequired");
var dob = component.get("v.DOB");
var data = {
Patient_Name__c: patientname,
Age__c: age,
Sex__c: sex,
Hospital_Name__c: hospitalname,
78. 76 | P a g e
Contact_Number__c: contactnumber,
Blood_Group_Required__c: bgr,
DOB__c: dob
};
action.setParams({ data: JSON.stringify(data) });
action.setCallback(this, function(response) {
var state = response.getState();
if (component.isValid() && state === "SUCCESS") {
var data = JSON.parse(response.getReturnValue());
component.set("v.showdon", false);
component.set("v.showdata", true);
component.set("v.showreq", false);
window.localStorage.setItem("ID", data.key);
alert(state);
} else {
alert(state);
}
});
$A.enqueueAction(action);
}});
79. 77 | P a g e
LEARNINGS
Using the various components provided by Salesforce, it is easy for developers to write
programs that employ popular application design patterns and universally agreed upon
best practices.
Salesforce is a leading CRM (Customer Relationship Management) software which is
served form cloud. It has more than 800 applications to support various features like
generating new leads, acquiring new leads, increasing sales and closing the deals. It is
designed to manage the organization's data focused on customer and sales details. It also
offers features to customize its inbuilt data structures and GUI to suit the specific needs
of a business. More recently, it has started offering the IOT (internet of things)
connectivity to the CRM platform.
Anyone who manages sales and customer relationship will find this software highly useful
as an end user. Salesforce will also benefit the software developers and cloud computing
enthusiasts who wish to learn customizing software for specific business needs.
Following are the different features of the Salesforce platform through one can learn –
Contact Management
To view customer contact details, activity history, customer communications, and internal
account discussions, etc. In short, it manages all the data pertaining to the contact with a
customer.
Opportunity Management
It provides the details of the stage a deal is in, the products involved in the deal, the
quotation for the deal etc. In short it manages all the data that helps in identifying,
progressing and closing a deal.
Sales Collaboration
80. 78 | P a g e
This feature helps in quickly finding experts who can help in closing a deal based on
customer queries and feedback. In short, it helps in bringing in a collaborative effort to
engage an entire team in the deal and make the deal happen.
Sales Performance Management
It provides a metric-based goal setting, and also continuous feedback and rewards and
recognition for the sales team. This helps in enhancing the performance of the sales team.
Lead Management
This feature initiates and tracks the leads that are in progress. It also helps in continually
optimizing campaigns across every channel.
Partner Management
This feature helps in building a community with partners. It also helps in connecting
directly with channel partners to share goals, objectives, and activities.
Salesforce Mobile App
This is the mobile platform to carry out all the above activities on a mobile platform.
Workflow and Approvals
It is a visual design to automate the business processes. The interface provides simple drag
and drop options to make this design. It helps in creating a flexible approval process with
deal discounts and expense management etc.
Email Integration
Salesforce can integrate to an existing email platform. This helps in providing flexibility
to the existing team with no additional learning curve.
Files Sync and Share
This feature provides the sales team the power to easily share various files, discuss them
and update them as needed. Also receive alerts when something in the file changes.
81. 79 | P a g e
Reports and Dashboards
Dashboards offer a real-time picture of the business at a glance. With this, anyone can
create detailed reports which can be accessed from anywhere.
Sales Forecasting
This feature helps in getting a real time view of the forecast of a sales team. It provides
multi-currency support and an in-line editing mode to manage the sales forecast well.
82. 80 | P a g e
FUTURE ENHANCEMENT
User requirements keep changing as the project is being used. Some of the future
enhancements that can be done to this project are:
As the technology emerges, it is possible to get the best model and dataset should
be increased. The more data will give more accurate prediction.
This system will be linked by internet, so the other hospitals can use this data.
Blood transfusion and timely notification.
CONCLUSION
In this project I tried to implement the Centralized Blood Bank Management System. This
project is built on salesforce and can serve many advantages to the organization. As
everything is centralized we can combine many objects in order to perform effective
analysis. Effective analysis of data can help a lot in medical field as many other objects
and fields can be added to this system for the different blood groups.
83. 81 | P a g e
1. salesforce components library . Module 1: tabs library.
https://developer.salesforce.com/docs/component-library/overview/components
2. documentation of salesforce . Module 2 : salesforce basics.
https://help.salesforce.com/articleView?id=basics_welcome_salesforce_users.htm&type
=5
3. feasible study . Module 3 case study
.http://greenskill.net/suhailan/fyp/report/038077.pdf
4. architecture .Module 4 architecture.
https://www.tutorialspoint.com/salesforce/salesforce_architecture.htm
5. future work .Module 5 future enhancement.
https://www.slideshare.net/RamachendranLogarajah/blood-bank-software-presentation
6. entity relationship diagrams . Module 6 ER-Diagram.
https://lbsitbytes2010.wordpress.com/2013/09/24/er-diagram-of-blood-bank-
management-systems5-cs2-rno12/
7. Apex programming . Module 7.
https://www.tutorialspoint.com/apex/index.htm#:~:text=Apex%20is%20a%20proprietar
y%20language,to%20the%20Force.com%20API.
8. JavaScript . Module 8.https://www.w3schools.com/js/default.asp
9. html and css . Module 9.https://www.w3schools.com/html/html_css.asp
10. admin case study. Module 10.https://blooddonation-dev-
ed.my.salesforce.com/setup/forcecomHomepage.apexp?setupid=ForceCom