System Design DDCDSS in Oncology
Chapter 7
System Design
Designing is the most important phase of software development. It requires
careful planning and thinking on the part of system designer. Designing soft-
ware means to plan how the various parts of the software are going to achieve
the desired goal. It should be done with utmost care because if this phase
contains any error then that will affect the performance of the system, as a
result it may take more processing time, more response time, extra coding
workload etc.
7.1 System Design
The purpose of the design phase is to plan a solution to the problem specified
requirements document. This is the first phase, moving from problem domain
to solution domain. The design process is a set of iterative steps that enable
the designer to describe all the aspects of the software to be built. Design is
essentially the bridge between requirement specification and final solution for
satisfying the requirement. The design of a system is essentially a blueprint or
a plan for the solution of a problem by the system. Here we consider a system
to be a set of components with clearly defined behaviour that interacts with
Health Information Management 105 MCOAHS, Manipal
System Design DDCDSS in Oncology
each other in fixed defined manner to produce some behaviour or services for
its environment.
7.1.1 Modular Description
Figure 7.1: Modular Structure of OncoSys
Breast Cancer
This module is used to record information from Breast Cancer patients. It
provides for both view & capturing patient information, medication & thera-
pies given.
Recording Information:
Input: Hospital Registration Number (HRN)
Processing: Validate HRN & check if current visit details. Validate forms filled
and store in database
Output: Display filled information in read only manner
On button click()
{
If(Patient visited today or patient is In patient)
{
Health Information Management 106 MCOAHS, Manipal
System Design DDCDSS in Oncology
If(required field is empty)
{
Display error message & cancel further processing
}
Else
{
Display filled information
}
}
}
Displaying Information:
Input: Hospital Registration Number (HRN), Visit Date
Processing: Validate HRN
Output: Display all therapies and Medications done on Visit Date
On button click()
{
If(HRN & visit Date is valid)
{
Display recorded information on specific date
}
Else
{
Display error message
}
}
Health Information Management 107 MCOAHS, Manipal
System Design DDCDSS in Oncology
Cervical Cancer
This module is used to record information from Cervical Cancer patients. It
provides both view & capturing patient information, medication & therapies
given.
Recording Information:
Input: Hospital Registration Number (HRN)
Processing: Validate HRN & check if current visit details. Validate forms filled
and store in database
Output: Display filled information in read only manner
On button click()
{
If(Patient visited today or patient is In patient)
{
If(required field is empty)
{
Display error message & cancel further processing
}
Else
{
Display filled information
}
}
}
Displaying Information:
Input: Hospital Registration Number (HRN), Visit Date
Health Information Management 108 MCOAHS, Manipal
System Design DDCDSS in Oncology
Processing: Validate HRN
Output: Display all therapies and Medications done on Visit Date
On button click()
{
If(HRN & visit Date is valid)
{
Display recorded information on specific date
}
Else
{
Display error message
}
}
Knowledge Base
Figure 7.2: Modular Structure of Knowledge Base
Add Website
This modules takes url as base and starts the crawler. It requests and down-
loads a copy of the document available at this url. It extracts the text and
Health Information Management 109 MCOAHS, Manipal
System Design DDCDSS in Oncology
indexes the contents. Input: URL, Depth Level
Processing: Validate URL and send URL with Depth Level to the search en-
gine as seed and starts the crawler until indexing is competed.
Output: Indexing complete Message
On button click()
{
If(Upload)
{
If(Any field is empty)
{
Display error message and cancel crawler
}
Else
{
Display Indexing Complete Message
}
}
}
Add Files
This module is used at the time of adding knowledge in local server. Proper
validation is done on both client and server side for file types to be uploaded.
It allows only those files which can be indexed.
Input: Title, Description, File Path
Processing: Upload file to local server after validation is performed for maxi-
mum words limit on input box and all the details are stored in the database.
Health Information Management 110 MCOAHS, Manipal
System Design DDCDSS in Oncology
Output: File is sent for indexing and result is shown back
On button click()
{
If(Upload)
{
If(Any field is empty)
{
Display error message and cancel upload / indexing
}
Else
{
Upload the file and index its contents
}
}
}
Add Notes
This module provides notes or article writing facility to physicians. They can
write articles in well a formatted manner. It adds as offline content which can
be searched by the user.
Input: Title, Description, Content
Processing: Validate Title, Description, Content and store in database
Output: Notes added
On button click()
{
Health Information Management 111 MCOAHS, Manipal
System Design DDCDSS in Oncology
If(Save Notes)
{
If(Any field is empty)
{
Display error message without saving
}
Else
{
Display notes saved message
}
}
}
Text Message
It provides messaging facility to the physicians. Any physician can send and
receive textual messages from other physicians registered in the system.
Input: To Username, Content
Processing: Validate content length and store in database.
Output: Message sent
On button click()
{
If(Send)
{
If(Any field is empty)
{
Display error message and cancel message
Health Information Management 112 MCOAHS, Manipal
System Design DDCDSS in Oncology
}
Else
{
Display result as sent
}
}
}
Search Engine
It provides the facility to search the given keyword from the index stored. In
case of multiple keywords AND rule is used i.e. documents with all the words
will be provided.
Input: Keyword, Order By, Search Type
Processing: Split the keyword if more than one word and search each keyword.
Order the results by rank or as Order By input.
Output: Search results in ordered manner
On button click()
{
If(Search)
{
If(Search key is empty)
{
Display error message and cancel search
}
Else
{
Health Information Management 113 MCOAHS, Manipal
System Design DDCDSS in Oncology
Display search result
}
}
}
Case Base
This module provides statistical charts generated from the information avail-
able in HIS database of hospital. It provides an overview of patient’s informa-
tion over a period of time.
Input: From Date, To Date
Processing: Validate date and display various statistics retrieved from HIS
Output: Graphical Chart showing statistics
On button click()
{
If(OK)
{
If(FromDate IsLessThan ToDate)
{
Generate chart and display them
}
Else
{
Display error message
}
}
}
Health Information Management 114 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.2 Preliminary Design
7.2.1 Entity Relationship Diagram
Figure 7.3: ER Diagram 1
Health Information Management 115 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.4: ER Diagram 2
Figure 7.5: ER Diagram 3
Health Information Management 116 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.6: ER Diagram 4
Figure 7.7: ER Diagram 5
Figure 7.8: ER Diagram 6
Health Information Management 117 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.9: ER Diagram 7
Figure 7.10: ER Diagram 8
Health Information Management 118 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.11: ER Diagram 9
Health Information Management 119 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.2.2 System Architecture
Figure 7.12: System Architecture 1
Health Information Management 120 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.13: System Architecture 2
Health Information Management 121 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.3 Detailed Design
7.3.1 Schema Diagram
Figure 7.14: Schema Diagram 1
Health Information Management 122 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.15: Schema Diagram 2
Health Information Management 123 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.16: Schema Diagram 3
Health Information Management 124 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.17: Schema Diagram 4
Health Information Management 125 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.18: Schema Diagram 5
Figure 7.19: Schema Diagram 6
Health Information Management 126 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.3.2 Table Structure
Demographic
ID uniqueidentifier NOT NULL
HRN varchar(16) PRIMARY KEY
DORRI datetime NOT NULL
Diagnosis Date datetime NULL
Cancer Type varchar(8) NULL
Patient Name varchar(32) NOT NULL
Father Name varchar(32) NOT NULL
HWM Name varchar(32) NULL
Caretaker Name varchar(32) NOT NULL
Local Address varchar(256) NOT NULL
Local State varchar(32) NOT NULL
Permanent Address varchar(256) NOT NULL
Permanent State varchar(32) NOT NULL
Contact Number varchar(32) NOT NULL
Duration Stay smallint NULL
DOB datetime NOT NULL
Sex char(1) NOT NULL
Marital Status char(1) NOT NULL
Religion varchar(64) NULL
Email ID varchar(32) NULL
Photo varibnary(MAX) NULL
ContentType varchar(16) NULL
Table 7.1: Demographic Table
Health Information Management 127 MCOAHS, Manipal
System Design DDCDSS in Oncology
Visit
VisitID uniqueidentifier PRIMARY KEY
HRN varchar(16) NOT NULL
Date datetime NOT NULL
InPatient bit NOTNULL
Discharged bit NOT NULL
Table 7.2: Visit Table
User Profile
UserId uniqueidentifier NOT NULL
UserName varchar(256) PRIMARY KEY
FirstName varchar(16) NULL
LastName varchar(16) NULL
Gender char(1) NULL
Birthday datetime NULL
SecurityQuestion varchar(64) NULL
SecurityAnswer varchar(32) NULL
Photo varbinary(MAX) NULL
ContentType varchar(16) NULL
Table 7.3: User Profile Table
Health Information Management 128 MCOAHS, Manipal
System Design DDCDSS in Oncology
Attending Doctor
VisitID uniqueidentifier PRIMARY KEY
Name nvarchar(256) PRIMARY KEY
Table 7.4: Attending Doctor Table
FilesIn
FileID int Primary key
URL varchar(1024) NOT NULL
Title varchar(256) NOT NULL
Description varchar(512) NOT NULL
CrawledDate datetime NOT NULL
Size bigint NOT NULL
Mime varchar(150) NOT NULL
Extension varchar(64) NOT NULL
Username nvarchar(256) NOT NULL
IsLocal bit NOT NULL
Table 7.5: FilesIn Table
Index
FileID int Primary key
Word varchar(256) Primary Key
Position smallint NOT NULL
Count smallint NOT NULL
Table 7.6: Index Table
Health Information Management 129 MCOAHS, Manipal
System Design DDCDSS in Oncology
Notes
NotesID int Primary key
WrittenBy nvarchar(256) Primary Key
DateWritten datetime NOT NULL
Title varchar(256) NOT NULL
Decription varchar(512) NOT NULL
Content varchar(MAX) NOT NULL
Path varchar(1024) NOT NULL
Table 7.7: Notes Table
Message
MessageID int Primary key
From nvarchar(256) NOT NULL
To nvarchar(256) NOT NULL
DateSent datetime NOT NULL
Title varchar(256) NOT NULL
Content varchar(512) NOT NULL
SndDeleted bit NULL
RecDeleted bit NULL
Table 7.8: Message Table
Health Information Management 130 MCOAHS, Manipal
System Design DDCDSS in Oncology
DeadLinks
FileID int Primary key
ReportedBy nvarchar(256) Primary key
Table 7.9: DeadLinks Table
Rating
FileID int Primary key
RatedBy nvarchar(256) Primary key
Score tinyint NOT NULL
Table 7.10: Rating Table
Health Information Management 131 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.3.3 Data Flow Diagram
DFD Context Diagram
Figure 7.20: DFD Context Diagram
Health Information Management 132 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.21: Physician - DFD Level 1
Health Information Management 133 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.22: Administrator - DFD Level 1
Health Information Management 134 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.23: DFD Level 2(a)
Health Information Management 135 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.24: DFD Level 2(b)
7.3.3.1 Process Description
Detail description of the processes in DFD is given below.
Process ID Process Name Description
1 General Report It generates statistical report
from the data available in Patient
Information System
2 Process Patient
Info
It Adds/Deletes Patient Diagno-
sis and Medication done during
patient visit to hospital
3 Process FilesIn It Adds/Deletes Files uploaded or
files crawled by a user
4 Crawler It starts crawling the page seeded
and indexes its contents
Health Information Management 136 MCOAHS, Manipal
System Design DDCDSS in Oncology
5 Process Dead
Links / Rating
It reports dead links or broken
links to administrator. It saves
the rating given by user
6 Process Notes It adds/deletes notes written
7 Process Message It adds/deletes Messages sent and
received
8 Search Engine It searches the keyword from in-
dex and send the results back to
user
9 Check out User-
sList
It retrieves users list from
database and allows en-
abling/disabling user
10 Check out Dead
Links
It retrieves all dead links reported
by user
Table 7.11: Process Description
Process ID Process Name Description
4.1 Web Crawling It reads and writes settings for the
crawler. It downloads pages as a
temporary file in local server
4.2 Text Extracting It reads the contents of tem-
porary files downloaded and ex-
tracts texts from them
4.3 Create Index It parses the extracted text and
splits them into Words
Health Information Management 137 MCOAHS, Manipal
System Design DDCDSS in Oncology
4.4 Rank Words It calculates the rank for each
word and stores them
Table 7.12: Sub-Process Description 1
Process ID Process Name Description
8.1 Search Query
Analyzing
It takes the search queries and
splits them into Words
8.2 Searching It searches for each partition of
the query from Index and FilesIn
table
8.3 Search Result
Ordering
It rearranges the order of search
results by their rank or prefer-
ences
8.4 Results Status
Checking
It checks if the results are already
rated or reported dead by the cur-
rent user
Table 7.13: Sub-Process Description 2
Health Information Management 138 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.3.4 Search Engine Classes
Figure 7.25: Crawler Class
Health Information Management 139 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.26: Document Classes
Figure 7.27: Searcher Classes
Health Information Management 140 MCOAHS, Manipal
System Design DDCDSS in Oncology
Figure 7.28: Common Classes
Health Information Management 141 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.3.5 Search Engine Methodology
Generally speaking the search engine can be divided into two major modules:
Spider module and Query module.
• Spider module will be accessible to all physicians. It takes start page
URL as base to spider and index contents in database to search later. It
parses the documents contents based on requirement.
• Query module gets queries from physicians; it performs a search action
and finally returns the output as search results back to physicians.
7.3.5.1 Robots Exclusion
Sometimes people find their web sites have been indexed (traveled their site
and obtained the contents) by an indexing robot (web crawler) or that resource
discovery robot has visited part of the site that for some reason shouldn’t be
visited by robots.
In recognition to this many Web Robots offer facilities for Website admin-
istrators and content providers to limit what the robot does. This is achieved
through two mechanisms:
The Robots Exclusion Protocol: A Web site administrator can indicate
which parts of the site should not be visited by a robot, by providing a specially
formatted file on their site, in http://.../robots.txt.
For example: (actually, the “/robots.txt” file usually contains a record
looking like this)
User-agent: *
Disallow: /cgi-bin/
Disallow: /tmp/
Health Information Management 142 MCOAHS, Manipal
System Design DDCDSS in Oncology
Disallow: /~andy/
In this example, three directories are excluded (disallow). Note that you
need a separate “Disallow” line for every URL prefix to exclude. Also, one
may not have blank lines in a record, as they are used to delimit multiple
records. The ‘*’ in the User-agent field is a special value meaning “any robot”.
Specifically, you cannot have lines like
“Disallow:/tmp/*” or
“Disallow: *.gif”
The Robots META tag : A Web author can indicate if a page may or
may not be indexed, or analyzed for links, through the use of a special HTML
META tag. For example,
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
A robot should neither index this document, nor analyze it for links.
7.3.5.2 Web Crawler
A web crawler is a program that systematically fetches web pages. Web
crawlers are also known as ants, automatic indexers, bots, spiders, Web robots,
and worms. It can create an index of available Web pages through seeding
where a user provides base URL.
It is an application that “automatically traverses the Web’s hypertext
structure by retrieving a document, and recursively retrieving all documents
that are referenced” until the specified scan level is reached. An application
that automatically traverses the Web work as follows:
• A base URL or Web File Path is given as a starting point.
Health Information Management 143 MCOAHS, Manipal
System Design DDCDSS in Oncology
• The Web crawler retrieves the first page and adds an entry for this page
in the index. Since the web is a hyperlinked environment, these pages
might have links to various other pages on various other Web servers.
• Then, it adds each of the hyperlinks that exist on that Web page to the
FIFO queue.
It repeats this process of retrieval and recording for each page in its queue
in First Come First Serve Order until the specified depth level is reached.
Thus, for each page discovered, the list of pages that remain to be gathered
keeps growing, and so will the index. In this way Web crawler’s indexing
process builds upon itself.
Figure 7.29: Web Crawler Example
The sequence of crawler if 1, 2, 3, 4 to 13 and so on until the Depth level
is equal to the level given by the user. Consider Figure:7.29 where a crawler
is discovering 13 pages from a single base page moving left to right. Arrows
indicate the hyperlink in a page, pointing to another page. This process of
automatic page discovery takes a great burden on search engine maintenance
Health Information Management 144 MCOAHS, Manipal
System Design DDCDSS in Oncology
team. Therefore indexing is limited to a maximum of ten levels and done man-
ually by the user. Moreover to decrease the load on the server, the downloaded
documents for indexing are discarded once done. In this project the Crawler
authenticates each page on web before it scans them.
7.3.5.3 String Splitting
Divide a string of more than one word into smaller units. In C# there is
built in string class that allows splitting a string into an array of words. For
example, string ‘‘Knowledge base’’ can be broken into
Arr[0]=Knowledge
Arr[1]=base
With this splitting technique, the pages indexed by the crawler are partitioned
into tokens. This method is used before ranking.
7.3.5.4 Index
A table which contains sequence of (key, pointer) pairs where each key is a
simple word and pointer points to a record in Files table i.e. file in which it
occurs. A search is made on this index for a given word.
7.3.5.5 Ranking
Ranking is the theory that calculates importance of each word in a page. It
is theory that keyword search is based on. The following rule will affect the
rank of keyword
• Position of the keyword in a file
• Frequency of the keyword in a file
Health Information Management 145 MCOAHS, Manipal
System Design DDCDSS in Oncology
Therefore a page with keywords occurring at beginning will be ranked higher
than the page with keyword in the middle or the end of the page. However
this may not be exactly as per expectation all the time.
Rank: = Position of keyword - Frequency of keyword in a document
The output of ranking is a list of keywords and each has the following infor-
mation:
• this keyword
• url that this key is found
• rank number indicating the importance of this keyword in a document
This information is used in keyword search.
7.3.5.6 Search Method
Keyword search is used which is the most common and also the fundamental
method of search. Ranking of keyword is based on the idea of keyword search,
since the concept of keyword search determes which documents are most rele-
vant to the given query (keyword) and ranking is based at this determination.
e.g. Search for the keyword cancer, the search engine will search for this
word “cancer” and output the result (url, descriptions) ordered by the rank
number in an ascending order. In case of multi-keyword search e.g. breast
cancer, keyword search will perform simple AND search. That is the result of
search are the url contains these two keywords and order by the sum of the
ranks of these two in an ascending order.
Health Information Management 146 MCOAHS, Manipal
System Design DDCDSS in Oncology
7.3.6 Functional Dependencies
Demographic
HRN - DORRI, Diagnosis Date, Cancer Type, Patient Name, Father Name,
HWM Name, Caretaker Name, Local Address, Local State, Permanent Address,
Permanent State Contact Number, Duration Stay, DOB, Sex, Marital Status,
Religion, Email ID, Photo, ContentType
Visit
VisitID - HRN, Date, InPatient, Discharged
Attending Doctor
VisitID, Name
User Profile
UserName - UserId, FirstName, LastName, Gender, Birthday, SecurityQues-
tion, SecurityAnswer, Photo, ContentType
FilesIn
FileID - Url, Title, Description, CrawledDate, Size, Mime, Extension, User-
name, IsLocal
Index
FileID, Word - Position, Count
Notes
NotesID, WrittenBy - Title, DateWritten, Description, Content, Path
Health Information Management 147 MCOAHS, Manipal
System Design DDCDSS in Oncology
Message
MessageID, From - DateSent, Content, Title, SndDeleted, RecDeleted
DeadLinks
FileID, ReportedBy
Rating
FileID, RatedBy - Score
7.3.7 Data Dictionary
Seed base URL or start page
HIS Hospital Information System
Table 7.14: General Data Dictionary
Demographic
ID Uniqueidentifier of each row
HRN Hospital Registration Number
DORRI Date of Registration at Reporting Institution
Diagnosis Date Date of Diagnosis
Cancer Type Breast or Cervix cancer type
Patient Name Name of patient
Father Name Patient’s Father’s name
HWM Name Husband / Wife / Mother name
Caretaker Name Name of caretakers
Local Address Local address
Health Information Management 148 MCOAHS, Manipal
System Design DDCDSS in Oncology
Local State Local state
Permanent Address Permanent address
Permanent State Permanent state
Contact Number Contact number of patient
Duration Stay Number of Years of stay
DOB Date of Birth
Sex Gender
Marital Status Single / Married
Religion Religion
Email ID Email ID
Photo Store patient image
ContentType Image type
Table 7.15: Data Dictionary - Demographic
Health Information Management 149 MCOAHS, Manipal
System Design DDCDSS in Oncology
Visit
VisitID Uniqueidentifier of each visit
HRN Hospital Registration Number
Date Date and time of visit
InPatient In-patient of Out-patient
Discharged Is discharged (for In-patient)
Table 7.16: Data Dictionary - Visit
User Profile
UserId Unique user ID
UserName User’s sign in name
FirstName First name
LastName Last name
Gender Gender
Birthday Date of Birthday
SecurityQuestion Security Question for password retrieval
SecurityAnswer Security Answer for password retrieval
Photo User’s image
ContentType Image type
Table 7.17: Data Dictionary - User Profile
Health Information Management 150 MCOAHS, Manipal
System Design DDCDSS in Oncology
Attending Doctor
VisitID Uniqueidentifier from visit
Name Assigned Doctor name
Table 7.18: Data Dictionary - Attending Doctor
FilesIn
FileID Uniqueidentifier of each file
URL URL of file
Title Title of file
Description Description of file
CrawledDate Date of Spidering or crawling
Size Total size of file
Mime Multipurpose Internet Mail Extension of file
contents
Extension File extension / type
Username Uploaded user name
IsLocal Is local file or web
Table 7.19: Data Dictionary - FilesIn
Health Information Management 151 MCOAHS, Manipal
System Design DDCDSS in Oncology
Index
FileID Uniqueidentifier of file from FilesIn
Word Sigle word from file
Position Position of word in file
Count Number of same word in file
Table 7.20: Data Dictionary - Index
Notes
NotesID Uniqueidentifier of each Notes
WrittenBy Written by username
DateWritten Date written
Title Title of Note
Decription Description of Note
Content Actual content of Note
Path URL to parse
Table 7.21: Data Dictionary - Notes
Message
MessageID Uniqueidentifier of each message
From Sender’s name
To Receiver’s name
DateSent Date and Time
Title Title of message
Content Message content
Health Information Management 152 MCOAHS, Manipal
System Design DDCDSS in Oncology
SndDeleted Is sender deleted message
RecDeleted Is receiver deleted message
Table 7.22: Data Dictionary - Message
DeadLinks
FileID Uniqueidentifier from FilesIn
ReportedBy Reported Username
Table 7.23: Data Dictionary - DeadLinks
Rating
FileID Uniqueidentifier from FilesIn
RatedBy Username rated
Score Number rated
Table 7.24: Data Dictionary - Rating
Health Information Management 153 MCOAHS, Manipal