Академический Документы
Профессиональный Документы
Культура Документы
Reference Manual
By:
Supervised By:
II
Acknowledgments
First of all I thank God for giving me the strength I needed to finish this project.
I would like to dedicate my humble work to those who mean the most to me;
To my mother for her love, support, and constant care. I could never express my thanks
and gratitude.
To my father for teaching me how to be strong and never give up on my dreams, you are
truly an inspiration.
To Dr. Ehsan Abed for her fruitful guidance throughout the past four months.
To my family and friends, without your support, this would not have been possible
Abeer
Having accomplished this project I would like to thank some individuals who have helped
me during the project.
First of all, I would like to thank Allah for his endless blessings.
Secondly, I would like to thank Dr. Ehsan Abed, Dr. Nadia Al Ghreimil and Dr. Lailk
Safadi for their support and gaudiness through out the semester.
Most importantly I would like to thank my parents for their prayers and love.
For all the people I have mentioned, I really appreciate your help and support, it
wouldn’t be possible to accomplish this project without you.
Sahar
III
....إلى من لهم أدين بالفضل بعد ال
...إلى والدي العزيزان
وزيناه بالدعاء والدعم المستمر، سبيلً للعلم والمعرفة- بعد ال- اللذان رعياني بحبهما وعطفهما الكبير ومهدا لي
. فجزاكما ال عني خير الجزاء، ويحفظهما بحفظه، ويرحمهما برحمته، فعسى ال أن يمد في عمرهما,والمتواصل
إلى أستاذتي الفاضلة الدكتورة \ إحسان, أتقدم بخالص الشكر وعظيم التقدير، وعرفاً بالجميل،واعترافاً بالفضل
بحكمة، وتشجيع مستمر، ورعاية صادقة, وإرشاد, وتوجيه، وما أسدته من نصح, لما بذلته من وقت وجهد, عابد
فلها مني صدق, وحسن توجيهها أبلغ الثر في إتمام هذا المشروع, وسعة صدرها، وكان لواسع علمها،وصبر
.الدعاء بأن يجزيها ال عني خير الجزاء
عفراء
Days are pass so quickly even we don’t feel of them, I am closely to be graduated from
the university where I spent period of my life with a lot of event also I kept allot of
memories.
One must thankful and full of gratitude for the privilege of being fortunate enough to
have parent like mine because they gave me the support and the means to success.
You’ve not only taught us but you loved us and cared for us like we’re your little
children. Every meeting is a new lesson; you’ve guided us and taught us what you
know
You’ve given us time when there was none, you’ve given us not only support but hope
as well…so..
Thank you for all the caring, kindness and time you’ve given us.
To my group:
I hope that I could what they wished from me to be. To my friends, Afra, Abeer, sahar,
shekah, may and may. I wish that our nice memories and friendship will stand forever.
Maha
IV
:ثلث بطاقات شكر
الولى الى والدي ووالدتي الذين دعموني بكل ما امكنهم ماديا ومعنويا وتشجيعهم المستمر لي
احسان و تعاونها المستمر لنا و تقديم المساعده و نصائحها الغاليه.الثانيه الى د
الثالثه الى صديقاتي في المشروع الذين استمتعت بالوقات معهن وروح التعاون و المشاركه فلهن جزيل الشكر
شيخه
/ الحمد ل الذي وفقنا في إتمام هذا المشروع وأبعث كل الشكر والتقدير إلى صاحبة الفضل علينا بعد ال الدكتورة
إحسان عابد فلها كل الشكر على الجهد الذي بذلته معنا وعلى توجيهها لنا وصبرها وتعاونها معنا فجزاك ال كل
الخير
وكذلك كل الشكر والعرفان إلى زميلتي في المشروع على حسن تعاونهم فكل الشكر لك يا مها وسحر وعبير ومي
وعفرا وشيخه
شكرًا لكن جميعا
مي الحمد
They say Room wasn't built in a day, and neither this project. In fact, there is many
people involved in this project and I want to say for them " thank you".
First of all, I thank God who help me and my group bringing this project to completion.
Second, special thank to our instructor , Dr.Ehsan Abed . Thank you Doctor for your
patience, your understanding and your instruction during this semester.
I want to thank my group who really work hardly with me trying to make our project as
good as we can.
I would like to thank our university and all doctors for their hard work. thank you
doctors for Your help preparing me and all students for work in the true life.
Finally and most important, I would like to thank my parents for their love, support, and,
above all, patience during this entire process.
…. Thank You
May Roidy
V
TABLE OF CONTENTS
AFRA AL-RUBAI’AN MAHA AL-LUHAIDAN...............................................................................II
INTRODUCTION.........................................................................................................................................1
-JOHANN WOLFGANG VON GOETHE..................................................................................................1
1.1 INTRODUCTION......................................................................................................................................2
1.2 PROBLEM DEFINITION..............................................................................................................................2
1.3 PROJECT OVERVIEW................................................................................................................................3
1.4 THE SYSTEM WILL BENEFIT......................................................................................................................4
1.5 GOALS ................................................................................................................................................4
INFORMATION GATHERING..................................................................................................................5
-LAO TZU......................................................................................................................................................5
2.1 MEDICAL RECORDS RESEARCH................................................................................................................6
2.2 HOSPITAL’S SYSTEM RESEARCH...............................................................................................................8
2.3 DRUG CONFLICTS RESEARCH..................................................................................................................8
3 .....................................................................................................................................................................9
SYSTEM ANALYSIS....................................................................................................................................9
-BEN STEIN...................................................................................................................................................9
3.1 SYSTEM USERS...................................................................................................................................10
3.2 USE CASE DIAGRAM............................................................................................................................11
3.3 SYSTEM FUNCTIONS ..........................................................................................................................12
3.4 USE CASES.........................................................................................................................................13
3.5 SYSTEM SEQUENCE DIAGRAM...............................................................................................................36
DRUG QUERY..........................................................................................................................................45
3.6 FLOW CHART......................................................................................................................................46
3.7 CONCEPTUAL MODEL...........................................................................................................................50
3.8 CLASS DIAGRAM.................................................................................................................................51
4 ...................................................................................................................................................................52
TOOLS..........................................................................................................................................................52
-SYMOUR CRAY........................................................................................................................................52
4.1 UNIFIED MEDICAL RECORDS.................................................................................................................53
4.2 DRUG CONSULTANT SOFTWARE..............................................................................................................59
DATABASE DESIGN..................................................................................................................................60
-BENJAMIN FRANKLIN..........................................................................................................................60
5.1 UNIFIED MEDICAL RECORDS.................................................................................................................61
5.2 DRUG CONSULTANT SOFTWARE..............................................................................................................77
6 ....................................................................................................................................................................80
IMPLEMENTATION..................................................................................................................................80
-DONALD KNUTH.....................................................................................................................................80
6.1 UNIFIED MEDICAL RECORDS.................................................................................................................81
6.2 DRUG CONSULTANT SOFTWARE............................................................................................................100
7 TESTING..............................................................................................................................103
-NATHANIEL BORENSTEIN.................................................................................................................103
7.1 TESTING RESULTS...............................................................................................................................104
VI
8 CONCLUSION...& RECOMMENDATIONS.............................................................................105
-ANONYMOUS.........................................................................................................................................105
8.1 FURTHER INVESTIGATIONS...................................................................................................................106
8.2 LIMITATIONS.....................................................................................................................................107
REFERENCES..........................................................................................................................................108
A...................................................................................................................................................................110
APPENDIX.................................................................................................................................................110
INFORMATION GATHERING...............................................................................................................111
TESTING....................................................................................................................................................114
B...................................................................................................................................................................116
APPENDIX ................................................................................................................................................116
VII
TABLE OF FIGURES
VIII
TABLE OF TABLES
IX
VISITS(VISITID, FILENUMBER, DEPID, HOSID, DOCID, DATE_TIME, CHIEFCOMPLAINT,
MEDS, LIFESTYLE, GENERALAPPEARANCE, PHYSICALEXAMINATION, DIAGNOSE,
TEST_INVESTIGATIONS, V)...................................................................................................................74
TABLE 1.20DATA DICTIONARY FOR THE VISITS TABLE...............................................................74
TABLE 1.21DATA DICTIONARY FOR THE DISEASE TABLE..........................................................75
TABLE 1.22DATA DICTIONARY FOR THE DRUG TABLE................................................................76
TABLE 1.23DATA DICTIONARY FOR THE INTERACTION TABLE...............................................76
TABLE 1.24DATA DICTIONARY FOR THE USE TABLE....................................................................77
TABLE 1.25DATA DICTIONARY FOR THE CONDRADIRACTION TABLE...................................78
TABLE 1.26DATA DICTIONARY FOR THE DRUG TABLE................................................................79
TABLE 1.27DATA DICTIONARY FOR THE INTERACTION TABLE...............................................79
TABLE 1.28DATA DICTIONARY FOR THE USE TABLE....................................................................79
X
English Abstract
This project creates a complete medical records system to be used by all
hospitals in the kingdom of Saudi Arabia. It unifies a patient’s medical records in
to one record, and makes it available on line for hospitals to share and use; the
record will contain the entire medical history, visits, diagnoses, and tests
performed by different hospitals.
Each hospital should perform the merge of their records with the site’s
records only once, and then they can use the records through the site. The
system will benefit medicine by having the entire medical histories of patients
shared among hospitals, which will give doctors a complete understanding of a
patient's condition. The system also helps doctors in the prescribing process by
checking if a certain drug is right for a certain patient.
Patients can view their records over the internet to check tests’ results,
modify their personal information, and to seek second opinions out side the
kingdom.
XI
Arabic Abstract
هذا المشروع يهتم بتصميم وتنفيذ نظام طبي عام يتم استخدامه من قبل جميع مستشفيات المملكه يحتوي هذا
النظام على ملفات المرضى بالسعودية بشكل الكتروني بحيث يكون لكل مريض ملف واحد فقط يشمل جميع
.معلوماته وتاريخه الطبي
يجب على كل مستشفى أن تقوم بدمج ملفات المرضى لديها بقاعدة البيانات الرئيسية في البداية مرة واحدة فقط
.ثم تقوم باستخدام النظام الجديد
يزيد النظام الجديد من كفاءة العمل بسبب وجود ملف واحد فقط لكل مريض واحتواءه على جميع المعلومات
الطبية ,بذلك يحصل الدكتور على فهم كامل لحالة المرض ,كما يوفر النظام للكتور امكانية التأكد من مناسبة دواء
.معين لمريض معين أثناء كتابة الوصفة الطبية له
كما يتوفر على موقع المشروع برنامج "مستشار الدوية" للتحميل ,يوفر هذا البرنامج معلومات كاملة عن أي
.دواء تود استشارته بخصوصه
يوفر النظام أيضا مركز بحث متطور يستطيع الباحثون من خلله البحث في قاعدة بينات النظام والستفادة من
.المعلومات فيه
يستطيع المرضى أيضا الطلع على ملفاتهم الطبية للحصول على نتائج التحاليل وتعديل معلوماتهم الخاصة او
.الحصول على استشارات خارج المملكة
XII
1
Introduction
“When ideas fail, words come in very handy”
1
This chapter describes the project and its goals.
1.1 Introduction
Dealing with human lives and making serious decisions that affect their
lives is the most difficult thing in this world, statistics show that the number of
deaths in the United States is 52000 people each year, 4% of which died
because of medical deficiencies, and the numbers get worse in Australia to
61%.[1] We are not saying that these people wouldn't be dead if no medical
mistakes were made; we believe that death is coming and only God knows when
and how, we are saying that medical mistakes are dangerous and happens more
frequently than one would imagine. Medical mistakes can occur for many
reasons malpractice, stress, fatigue, lack of knowledge of patients' medical
histories… etc.
2
1.3 Project overview
To take the drug consultant system to the next level, we created software
to do just that. The software can be downloaded from the project’s web site by
anyone with an interest to research drugs. The software allows clinicians to
check for interacting drug ingredients, their effect, and their clinical significance.
The clinicians or any user can enter the disease(s), drug(s) and the drug’s name;
the system will check for any interactions and display the appropriate messages.
The system also checks if the entered drug can be taken during pregnancy or
lactation. The user can find other information about the drug such as its half-life,
patient instructions, monitoring parameter, adverse effects, food interactions,
concentration level, disease conflicts, and dosages the user can type in the
disease name and the system will display the dosages.
3
1.4 The system will benefit
1.5 Goals
Our main goal is to unify each patient's medical records in to one record,
and make it available on the web for hospitals, patients, researchers, and
pharmacists to access, which is very essential for achieving medical accuracy.
4
2
Information
Gathering
“A journey of a thousand miles begins with a single step”
-Lao Tzu
5
This chapter describes the steps we took in order to collect the information
we need to build this project.
The first step we took was to investigate how hospitals store and organize
their patients’ records, which was not an easy job, not all hospitals we asked
cooperated with us, but after very much difficulty we were able to get some
records. Here is a table with the hospitals that cooperated with us and what kind
of information we got from each one:
• Al Hammadi Hospital:
When requested the files they were printed directly from the computer
which made them clear and organized. The files included:
Patient information
Diagnosis/ Therapy and medical history
Blood test results
6
They did not include x-rays or ultrasounds but it did include reports about
them.
• Consulting clinics:
The file included fields printed and had to be filled by hand, the
prescriptions are kept in the file after the diagnosis.
All the blood tests and radiology reports are kept in the back of the file in a
special section named (LAB). X-rays are not kept only a report about them.
• Dallah Hospital:
The files have forms that are mostly filled by the computer, very little
handwriting in the file, laboratory results are kept in the file.
The file was divided in to two sections diagnosis and Lab, the doctor fills in
the department and the diagnosis then signs his/her name. The next doctors start
where the last one finished. Laboratory and Radiology results are kept in the
back of the file.
7
2.2 Hospital’s System Research
We were interested in knowing how they handle their system users; and in
what form are their records presented to them. We found that each user has a
username and password that gives them access to certain privileges. For
questionnaire answers see Appendix A.
To get the information we need about drugs and their conflicts our
instructor was kind enough to arrange meetings for us with Dr.Nermin Abou
ALSoud from Clinical Pharmacy department in King Saud University. She was
interested in the software and wanted to use it, which gave us a great experience
in working with the end user. She described what she wanted the software to do,
and provided us with DRUGDEX System and DRUG-REAX System, DRUGDEX
System is designed to deliver unbiased drug information for those who prescribe,
dispense, research or administer medications, DRUG-REAX System allows
clinicians to check for interacting drug ingredients, their effect, and their clinical
significance, drug-drug, food-drug, drug disease, drug-ethanol, drug-tobacco,
drug-alternative medicine, and drug-laboratory assay interactions. With the
systems' information we filled tables of our database to help doctors in
prescribing and to implement the software. For more information about
DRUGDEX System and DRUG-REAX System see Appendix B.
8
3
System Analysis
“The indispensable first step to getting the things you want
out of life: decide what you want”
-Ben Stein
9
3.1 System Users
• Patients: can retrieve their own records to review them, or to edit their
personal information
prescriptions)
adds the head hospital administrator, and administrates the overall system
10
3.2 Use Case Diagram
Log In
All users except
Site visitors
Open patient record
uses
Research
Researcher uses
Add diagnose Prescribe
Modify history
Doctor
Drug query
Pharmacist
Mange users
Merge
Hospital Administrator
Download DC software
site visitor
11
Figure 1.1 Use case diagram
12
3.4 Use Cases
3.4.1 : Log In
Employee log in
13
username and password. displays the appropriate options
Alternative courses:
Line 2: The system displays an error message and asks for re-entries.
Patient log in
Actor Action System response
1. The patient enters his/her file 2. The system identifies the patient
Alternative courses:
Line 2: The system displays an error message and asks for re-entries.
14
1. This use case begins when a clerk 2. The system displays a new patient
3. The clerk fills the form with the 4.The system creates a new patient
assigns a number to it
Type: Primary
in
3. The nurse performs the tests (P, T, W, 4. The system records the information,
and H) and enters the results in to the creates a new visit form, and updates the
15
patient to the waiting area to wait for the
doctor.
Alternative Courses:
Line 2: the system couldn’t find the record, and asks for a valid file number.
1. This use case begins when the 2. The system retrieves the patient’s
doctor enters the patient’s file number. file, the doctor’s information, and
examination.
16
4. The doctor fills the visit form
6. The doctor submits the visit. 7. The system records the visit and
3.4.5 : Prescribe
3. The doctor enters the name of the 4. The system checks if the
medicine(s).
17
5. The doctor completes the
prescription form.
Alternative courses:
Line 4: The system generates a message telling the doctor about existing
1. This use case begins when the 2. The system displays a form for
history.
3. The doctor enters the new 4. The system updates the file.
information.
18
5. The doctor closes the file. 6. The system exits the file.
Alternative Courses:
Line 2: the system couldn’t find the record, and asks for a valid file number.
1. This use case begins when the actor 2. The system displays a form for
information.
19
3. The actor enters the new 4. The system updates the file.
information.
5. The actor closes the file. 6. The system exits the file.
Alternative Courses:
Line 2: the system couldn’t find the record, and asks for a valid file number.
3. The actor overviews the file, after 4. The system exits the file.
20
Alternative Courses:
Line 2: the system couldn’t find the record, and asks for a valid file number.
Overview: After the DPLM employee is done with the requested test(s)
result(s) he/she enters the patient file and adds the result(s).
test
3. The employee enters the result(s). 4. The system adds the result(s) to the
patient’s file.
Alternative Courses:
Line 2: the system couldn’t find the record, and asks for a valid file number.
21
3.4.10 : Add image
Overview: After the radiology employee is done with the requested medical
service(s) he/she enters the patient file and uploads the image(s)
number.
3. The employee enters the image(s) 4. The system adds the image(s) to
Alternative Courses:
Line 2: the system couldn’t find the record, and asks for a valid file number.
22
3.4.11 : Retrieve prescription
Overview: This use case begins when a patient enters a pharmacy and asks
for his/her prescribed medication, the pharmacist enters the patient’s file
number and the system will display the patient’s prescription, the pharmacist
submits drugs to the patient, updates refill dates if there is any, and closes the
file.
3. The pharmacist closes the file. 4. The system exits the file.
Alternative Courses:
Line 2: the system couldn’t find the record, and asks for a valid file number.
23
(A)
(Today’s prescriptions)
patient.
(B)
(All prescriptions)
prescriptions.
prescriptions
Update refills
date
Alternative Courses:
Line 2: the user enters an invalid date, the system displays an error message
Actors: Researchers
Overview: When researchers need information for their researches they can
access patients’ files to study their cases, but they don’t have access to the
personal information. The researchers can a bookmark to the file they need
researcher enters the research page kind of research the user wants
3. The researcher
Search results
25
2. The researcher
chooses to browses a
file and if he/she wants
to add it to his/her
bookmark (see
Bookmark2)
Alternative Courses:
Line 1: the system couldn’t find any results and waits for another entry
Bookmark 1
researcher’s bookmarks.
Alternative Courses:
Line 1: the system couldn’t find any bookmarks for the researcher
Bookmark 2
bookmark form
2. The researcher enters the file 3. The system creates the bookmark
26
3.4.13 : Manage users
choose:
(see A)
(see B)
27
(A)
(Create new account)
3.he/she chooses the account type and 4. The system validates the entries,
enters its username and password and checks if the username already
exists.
Alternative Courses:
Line 5: the user enters an invalid user name or fails to confirm the password, the
(B)
(Accounts)
(see Modify)
• Delete an account
(see Delete)
28
(Modify)
3. he/she enters the new password 4.the system validates the password
Alternative Courses:
Line 4: the user attempts to enter a blank password, or enters a password that
exceeds 10 characters, the system displays error messages and waits for re-
entries
(Delete)
the delete button of the desired account asking the user to confirm the request
Alternative Courses:
Line 4: the user does not confirm the request, the system cancels it and return to
29
3.4.14 : Add drug
Alternative Courses:
Line 2: the user does enter a drug’s name, the system asks for a drug’s name
30
3.4.15 : Download DC software
Overview: site visitors download the software to benefit from it in any way they
want
3.4.16 : Merge
Overview: When researchers need information for their researches they can
access patients’ files to study their cases, but they don’t have access to the
personal information. The researchers can a bookmark to the file they need
31
Actor Action System response
1. This use case begins when the 2. The system displays an add
merge operation
the hospital’s name and register’s the and adds the hospital to the database
form
ID in the hospital
Alternative Courses:
Line 4, 7: the user enters an invalid user name or fails to confirm the
32
(SQL)
the database’s name, username and hospital’s tables’ names, and the site’s
3. he/she matches the site’s tables with 4.The system displays a list of each of
their correspondents hospital’s tables the hospital’s table’s fields, and its
5. he/she matches the site’s fields with 6.The system merges the hospital’s
their correspondents hospital’s fields, database with the site’s, then display a
then clicks the “Transfer” button list of the records that were added or
(Access)
33
Actor Action System response
for the database, then clicks “Next” hospital’s tables’ names, and the site’s
tables’ names
3. he/she matches the site’s tables with 4.The system displays a list of each of
their correspondents hospital’s tables the hospital’s table’s fields, and its
5. he/she matches the site’s fields with 6.The system merges the hospital’s
their correspondents hospital’s fields, database with the site’s, then display a
then clicks the “Transfer” button list of the records that were added or
Actors: Doctors
Alternative Courses:
Line 2: the system couldn’t find the drug name, the system displays an error
35
3.5 System Sequence Diagram
Log In
Hospital
Patient employee
:System
access granted
enterPatPass(FileNumber,Id)
access granted
:System
createNewRecord()
enterPinfo(Fname,Mname------------------)
file created
36
Modify Personal Information
Patient Clerk
:System
retrieveFile(FileNumber)
open file
enternew(add,tel,ms,……)
update file
closeFile()
enterNew(add,tel,ms,……)
update file
closeFile()
37
Retrieve Patient Record
Hospital
Patient employee
:System
retrieveFile(FileNumber)
display file
closefile()
viewfile()
display file
closeFile()
Add Pre-test
Nurse
:System
enterFileNumber(FileNumber)
enterPretest(p,t,h,w)
update file
closeFile()
38
Add Diagnose
Doctor
:System
retriveFile(FileNumber)
display file
createNewVisit()
visit created
enterdia(diag)
update file
Prescribe
Doctor
:System
makePresc()
display form
enterTret(med)
checkConflict()
display results
submit()
record updated
39
Add test Result
DPLM employee
:System
retrieveFile(FileNumber)
open file
addResult(res)
update file
closeFile()
Add Image
Radiology employee
:System
retrieveFile(FileNumber)
open file
addImage(image)
update file
closeFile()
40
Retrieve Prescription
Pharmacist
:System
retrieveFile(FileNumber)
open file
choosePre()
display prescription
enterRefill(date)
update file
closeFile()
Research
Researcher
:System
chooseType()
display results
chooseFile()
display file
Addbookmark(FileNumber)
closeFile()
Hospital Administrator
:System
chooseUserType()
display accounts
chooseAccount()
chooseOperation()
update list
Add Account
Hospital Administrator
:System
chooseUserType()
enterUser(UserName)
enterPass(Pass)
update accounts
42
Download DC software
Site visitor
:System
download()
download software
Merge
System Administrator
:System
addadmin(username,pass,hosName)
adddoc(username,pass,FName,LName,DepID,Hodoc)
doctors added
matchtables()
matchFields()
transfer
43
Add drug
Hospital Administrator
:System
enterdrug(drug_name)
enterinfo(dinfo)
Doctor
:System
enterNewh(All,Med,Ope,…..)
44
Drug Query
Doctor
:System
enterdrug()
display information
45
3.6 Flow Chart
3.6.1 : Diagnose and Prescribe
start
Enter diagnose
Enter medication
yes
Want to Conflict Result
check
no
yes
no Want to
submit change
entries
End
46
3.6.2 : Merge
start
Merge no
visits table
yes
Add Doctors
No
Browse for Access database
Match tables
Transfer
47
End
48
3.6.3 : Research
start
Enter term
Search results
yes
Browse
Browse patient’s file
patient’s file
no
yes
perform
other tests
no
end
49
3.7 Conceptual Model
system
administrator 1 administrate1 1
UMR system 1 has 1 Drug consultant
view * * 1
Patient record
*
*
1
Personal
visit * 1 information
* diagnose 1 1 Pre-test *
Bookmark
1 add 1 1 1 1 1 1 1
doctor pharmacist DPLM radiolog nurse researcher clerk
1 y
1
download
users
50
3.8 Class Diagram
UMR system
Patient record
createNewrecord()
()enterPinfo
()retrieveFile
()closeFile
()viewFile
Visit ()chooseFile Personal Information
()createNewvisit
()enterNew
Pre-test
()enterPretest
Diagnose
()enterdia
Prescription
Test Image
()enterTret
()checkDose
()enterDose ()addResult ()addImage
()submit
()choosePre
()enterRefill
()closePresc
51
4
Tools
“If you were plowing a field which would you rather use? Two
strong oxen or 1024 chickens?”
-Symour Cray
52
This chapter gives a brief description about the tools we used to build this
project
53
4.1.3 : Microsoft Visual Studio.Net
4.1.4 : ASP.NET
ASP.NET is more than the next version of active server pages (ASP), it is
the unified web development platform that provides the services necessary for
developers to build enterprise-class web applications.ASP.NET is a compiled,
.NET -based environment; you can author applications in any.NET compatible
language, including ASP.NET, Visual Basic .NET, C#, and the jscript.NET.
Additionally, the entire .NET framework is available to any ASP.NET application.
54
Accessing database from ASP.NET application is an often-used technique
for displaying data to website visitors. ASP.NET makes it easier then ever to
access database for this purpose.
• Developer Productivity
Great Tool Support. You can harness the full power of ASP.NET using
any text editor -- even Notepad, But Visual Studio .NET adds the productivity of
Visual Basic-style development to the Web. you can visually design ASP.NET
Web Forms using familiar drag-drop-doubleclick techniques, and enjoy full-
fledged code support including statement completion and color-coding. Visual
55
Studio.NET also provides integrated support for debugging and deploying
ASP.NET Web applications.
Web-Farm Session State. ASP.NET session state lets you share session
data user-specific state values across all machines in your Web farm. a user can
hit different servers in the web farm over multiple requests and still have full
access to her session.
• Enhanced Reliability
56
Memory Leak and Crash Protection. ASP.NET automatically detects
and recovers from errors like memory leaks to ensure the application is always
available to the users.
• Easy Deployment
SQL Server 2000 is a powerful tool for turning information into opportunity.
Industry-leading support for XML, enhanced tools for system management and
tuning, and exceptional scalability and reliability are some of what SQL server
2000 can provide.
For users who need a little bit more functionality but don't want to use a
text editor (and maybe don't have a lot of experience), Microsoft FrontPage is
often the web authoring tool of choice. FrontPage is easy to find, relatively
inexpensive, it uses many of the same program commands and icons as all the
57
other Microsoft Office programs and it also provides users with page mill-like
wizards, so getting your first site built with FrontPage can be a breeze.
FrontPage isn't just for absolute beginners, however. For users who have
some skill with HTML and want more control than they get sticking with the
wizards alone, FrontPage provides direct access to the HTML page code for
editing. FrontPage supports VB Script, Javascript, Java Applets, Active X,
frames, CGI and some of the more popular plug-ins, though use of these items
requires a fair degree of user expertise as FrontPage doesn't provide tutorials,
wizards or robust help files for them. As with text editors, FrontPage is not a good
choice for development of a website that utilizes a database because FrontPage
doesn't provide the advanced set of developer tools needed to access and
manipulate complex sets of data.
58
4.2 Drug Consultant Software
4.2.1 : Microsoft Access
59
5
Database Design
“Well done is better than well said”
-Benjamin Franklin
60
This chapter describes the nature of the Unified Medical Records system
database, and the Drug Consultant software database.
61
Figure 2.19UMR database schema diagram
62
Follows is the data dictionary for the Accounts table
This table is used to store each researcher’s bookmark files. Follows is the
data dictionary for the Bookmark table:
• Department(DepID, DepName)
63
Follows is the data dictionary for the Department table:
This table is used to store the patients’ next of kin’s information, the table’s
entries are mandatory and must be entered when the record is created by the
clerk except for phone numbers; just one phone number is required. Both the
patient and the clerk can modify the information later if any changes occur.
64
• History(FileNumber, Allergy, Medication, Operation, Habit,
SocialHistory, HeartD, BloodD, JointsD, EndocrineD, LiverD,
Diebetes, Asthma, Tumors, Epilepsy, Hypertension)
This table is used to store patients’ medical histories; the information can
be updated by the patient himself, doctors or clerks.
This table is used to store radiology results; it does not contain the actual
images but their paths in the server where the actual images are stored in a
folder to avoid overloading the database.
This table is used to store Serology tests results. Follows is the data
dictionary for the Lab1_Serology table:
• Lab2_Harmones(VisitID,FileNumber,ReceivedDate,
ReportedDate, EmpName, Report, TSH, FreeT3, FreeT4,
Androsterone, Etiocholanolone, DHEA, LH, Progesterone,
Testosterone, Androstendione)
This table is used to store the Hormones tests results. Follows is the data
dictionary for the Lab2_Harmones table:
This table is used to store the Urine tests results. Follows is the data
dictionary for the Lab3_Urine table:
72
study them, or by pharmacists to submit the medications and enter refill dates if
required.
• Pretest(VisitID, T, H, P, W)
This table is used to store the pre-tests preformed by the nurse prior to the
doctor’s examination.
74
• disease (drug_name, disease_name)
This table is used to store drug name and diseases that interact with it.
New drugs can be added by a hospital administrator. Follows is the data
dictionary for the disease table:
75
This table is used to store the drugs information. Follows the data
dictionary for the drug table:
This table is used to store the drugs that interact with the drug. Follows is
the data dictionary for the interaction table:
This table is used to store the diseases that require using the drug and the
dosages for adults and children. Follows is the data dictionary for the use table:
76
Name Data type Size Description
disease_name nvarchar 250 The disease’s name
drug_name nvarchar 50 The drug’s name
Dosage_adult ntext 16 The dosage for adults
dosage_Pediatri ntext 16 The dosage for children
Table 1.24Data dictionary for the use table
77
5.2.2 : Table Description
• condradiraction (drug_name, disease_name)
This table is used to store drug name and diseases that interact with it.
New drugs can be added by a hospital administrator. Follows is the data
dictionary for the disease table:
This table is used to store the drugs information. Follows the data
dictionary for the drug table:
This table is used to store the drugs that interact with the drug. Follows is
the data dictionary for the interaction table:
This table is used to store the diseases that require using the drug and the
dosages for adults and children. Follows is the data dictionary for the use table:
79
6
Implementation
“Beware of bugs in the above code; I have only proved it
correct, not tried it”
-Donald Knuth
80
This chapter describes the main step in the project; the system
implementation.
For our home page we used a template that we bought over the Internet
from www.medicaltemplates.com , but the system users’ pages were designed by
ourselves.
81
A sample of the users’ pages:
82
6.1.2 : Sign In and Sign Out
All users have to use a username and password to sign in, when a user
enters his/her username and password the system will validate them and
recognize the type of the user therefore redirect him/her to their page. At the end
of the day the user must sign out to prevent unauthorized access to the user’s
privileges.
To ensure that no one can access the page without signing In we add the
following code to the beginning of the page in the Page_load event handler:
As a result to the above code if the session is not created or its value does
not equal “1” the browser will open the main page instead of the requested one,
this code prevents unwanted users from copying the page’s path and trying to
open it for malicious reasons.
83
To implement the Sign Out we destroyed the session that was created
with the Sign In button, the following code shows the function of the Sign Out
button; first it destroys the session then it redirect the browser to the main page:
Me.Session.Clear()
Server.Transfer("default.aspx")
The above code is effective in case some one steals the path of the page
and tries to use it, but if someone hits the back button of the browser in the user’s
computer after he/she signs out it won’t prevent him/her from viewing the page,
just from using it. Because of the sensitivity of the information a patient record
contains we had to prevent the back button from displaying the pages the user
was viewing, to do so we add the following code to the beginning of all the pages
in the Page_load event handler except the main page, the code prevents the
browser from caching the page, so when the back button is hit to view the page
the browser has to request the page again and because the session was
destroyed the access will be denied and the browser will be redirected to the
main page:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
84
<appSettings>
<add key="connection"
value="server=localhost;uid=sa;pwd=asd;database=UMR" />
</appSettings>
Dim ab As String
ab=System.Configuration.ConfigurationSettings.AppSettings("
connection")
ab_con.Close()
When administrators sign in they are redirected to there main page, they
can choose to view any type of accounts by hitting the button with the desired
type, by default the doctors accounts will be displayed in a table form, the table
contains usernames and their passwords and two choices to edit the account or
delete it. To implement this table we used ASP.NET DataSet class which is an in
memory representation of one or more tables of data, and DataGrid control to
present data in a tabular format. We used a dataset for each account type, for
example to view the doctors’ accounts we retrieved all doctors using SQL
statements then fill the data set with the results. The following code shows how it
is done:
85
Dim SQLD As String
‘hos is the administrator’s hospital ID
SQLD = "SELECT * FROM accounts where IsDoctor=1 and HosID="
+ hos
‘the next line creates an adapter, the adapter carries ‘the
result of the SQL statement
Dim adaptertD As New SqlDataAdapter(SQLD, ab)
‘the next line creates a command builder to build the
‘adapter
Dim bultD As New SqlCommandBuilder(adaptertD)
Dim dstd As New DataSet
‘the next line fills the data set
adaptertD.Fill(dstd)
After filling the data set with doctors’ accounts we had to bind it to a
datagrid. The following code shows how to bind the dataset to the datagrid
(docgrid):
To edit the account there are some constraints that must be considered; a
blank password and a password of a length that exceeds 10 characters are not
acceptable, we used a stored procedure in SQL server 2000 to allow us to call it
from any page that required updating accounts. Following is the stored
procedure’s code:
CREATE PROCEDURE updateacc(@un varchar(10), @pass
varChar(10))
AS
update Accounts
set Pass= @pass
where
UserName=@un
GO
86
The following shows the call of the procedure and the validation:
ocmd.CommandText = "updateacc"
ocmd.CommandType = CommandType.StoredProcedure
ocmd.Connection = ab_con
ocmd.Parameters.Add("@un",System.Data.SqlDbType.VarChar).Va
lue = e.Item.Cells(2).Text
Dim tx As TextBox
Dim tt As String
tx = e.Item.Cells(3).Controls(0)
‘tt gets the new password entered by the administrator
tt = CType(e.Item.Cells(3).Controls(0), TextBox).Text
87
6.1.5 : System’s Administrators’ Pages
ab_con.Open()
After that, the administrator will be directed to the second merge form
which contains a list of the site’s tables and a list of the hospital’s tables, he/she
has to match each of the site’s tables with its correspondent hospital’s table,
some of the site’s tables must have correspondent hospital’s tables to perform
the merge. We decided to use lists to display the tables’ names to eliminate
88
typing errors, to get the hospital’s tables’ names we used the”OleDbConnection”
class, which is a powerful .Net Framework class that is used for more than just
opening an closing the connection, by using its “GetOleDbSchemaTable” object
you can get the tables’ names . The following code shows how it is used:
The above code gets the hospital’s database’s tables’ names, then the
names will be sent to the third merge form where a list of the chosen tables’
fields’ names will be displayed. To get the tables’ fields’ names we implemented
the following code:
After the system’s administrator matches all the tables’ fields the system
retrieves all information in the hospital’s tables and fills datasets with it.
After filling the datasets with the hospital’s data we had to make sure that
the patient isn’t already in the site’s database to avoid having duplicated records,
we found the only way to do that is by checking the Saudi ID and Iqama number
for each patient, if it exists in the site’s database an update to his/her record will
be performed (new data updates old ones), if not the patient will be inserted. To
implement that we first retrieved all Saudi IDs and Iqama numbers and stored
89
them into two arrays, then we tested each record in the hospital’s database for a
matching Saudi ID or Iqama number, if a match is found an update will take
action, for example if the hospital’s record says that the payment type for the
patient is “Insurance” and it is personal pay in the site’s database the insurance
record will be deleted, if the opposite happens the insurance information will be
inserted in to the “Insurance” table. The following is the code we wrote to do the
previous task:
‘the following line tests whether the hospital has a
‘payment type field in its table
Else
If dstd.Tables(0).Rows(i)(t13.Text) = "Insurance" Then
If dstdi.Tables(0).Rows(iii)(fn.Text) =
dstd.Tables(0).Rows(i)(fn.Text) Then
bb = iii
End If
Next
90
91
Dim mySQL6 As String = "INSERT INTO InsuranceInfo
( FileNumber, CompanyName, InsuranceNo, Phone1,Phone2)
VALUES (@file, @f, @m,@h,@h2) "
Dim ocmd6 = New SqlClient.SqlCommand(mySQL6, abs_con)
92
.
.
.
‘The following takes action if the type in the site’s
‘table is Insurance and the hospital’s says cash, the
‘insurance record will be deleted
ocmd31.CommandText = "delabeer"
ocmd31.CommandType = CommandType.StoredProcedure
ocmd31.Connection = abs_con
ocmd31.Parameters.Add("@i",
System.Data.SqlDbType.Int).Value = file
ocmd31.ExecuteN
onQuery().
The clerks have two main tasks, open new files or modify existing ones.
The open file form contains five sections; the personal information, next of
kin’s information, sponsor’s information, Insurance’s information and medical
history.
93
• patient’s ID
• Occupation
• Telephone numbers and mobile number
• Address
• Payment type
• e-mail address
• Company name
• Insurance number
• Telephone numbers
This page requires the clerk to enter the patient’s information, and then it
performs the appropriate validations
• The required field validation: which are fields that can not contain
null values, and must be specified by the patient
94
• The format validation: we add format validations by using
Microsoft visual studio.net Regular expression validator to each
input box Microsoft visual studio.net just required us to specify the
validation expression.
In the above code the variable x ensures that the records is not added if
it’s not equal to “0” as shown below:
If x = 0 Then
If ii.Checked Then
rowI("FileNumber") = maxii
tableI.Rows.Add(rowI)
adapter3.Update(ds3)
ds3.Reset()
adapter3.Fill(ds3)
End If
End if
95
6.1.6.2: Modify Medical Record
The clerk can retrieve a patient’s file by either the file number or a patient’s
telephone number. Not all fields can be modified, the fields that can be modified
are:
• Last name in case the patient got married and her religion allows
her to take her husband’s last name
• Marital status for obvious reasons
• Religion
• Payment type we assumed that if a patient has insurance he/she is
covered in all Saudi hospitals and if for any reason he/she got
insurance or his existing expired he/she can update his/her record
• Occupation
• Address
• Phone numbers
• Next of kin’s information
• Sponsor information
• Insurance information
• History
When a doctor enters a new visit form his/her information (Department ID,
Hospital ID, Doctor ID, First name, and Last name) will be added to the visit
automatically along with the patient’s personal information. If he/she prescribes a
certain medicine he/she can check for existing conflicts before submitting the
prescription. To do that we implemented a way to check if the prescribed drug
conflicts with another one the patient is taking or a disease he/she has.
96
Follows is the code we wrote to check if the drug conflicts with another
one he/she is taking:
.
.
Dim i As Integer
Dim ii As Integer
For i = 0 To d2.Tables(0).Rows.Count - 1
For ii = 0 To d4.Tables(0).Rows.Count - 1
If d4.Tables(0).Rows(ii)(0) = d2.Tables(0).Rows(i)(0) Then
intfound = True
intmsg = intmsg + d4.Tables(0).Rows(ii)(0)
End If
Next
Next
End If
The pharmacists have two choices either to retrieve all prescriptions in the
patient’s file, or to retrieve today’s prescriptions. Today’s prescriptions mean all
prescriptions that were not yet submitted to the patient, or had been submitted
but their refill dates is today. It is the pharmacist’s responsibility to enter the refill
date if required and to specify if the prescription has been submitted or not.
97
The refill date must be entered in the format “Month-Day-Year”, and since
we used a DataGrid to display the prescription we couldn’t assign a Regular
Expression Validator to the refill date text box using Microsoft Visual Studio.Net,
we had to write the code our selves. Follows is the code we wrote:
Dim tt As String
‘the next line assigns tt to the value of the text box
tt = CType(e.Item.Cells(5).Controls(0), TextBox).Text
Dim ch As Char = "-"
Dim charr As New ArrayList
Dim a As New ArrayList
Dim inn, p, mon, day As Integer
p = 0
inn = 0
While p = 0
inn = tt.IndexOf(ch)
If inn > 0 Then
a.Add(tt.Substring(0, inn))
charr.Add(tt.Substring(inn, 1))
tt = tt.Remove(0, inn + 1)
Else
p = 1
End If
End While
Dim i As Date
If charr.Count = 2 Then
If a(0) < 13 And a(0) > 0 Then
If a(1) > 0 And a(1) < 32 Then
If tt.Length = 4 And tt >= i.Now.Year
Then
p = 3
End If
End If
End If
End If
In the above code the variable p is set to “3” if the correct format was
entered. The following code tests the value of p to add the refill date to the
database:
98
If p = 3 Then
ocmd.Parameters.Add("@re",
System.Data.SqlDbType.DateTime).Value = ttt
Else
Dim msg As String
msg = "<script> alert('Wrong date
format');</script>"
Response.Write(msg)
z = 1
End If
The radiologists’ task is to add images and their reports to patients’ files.
To avoid overloading the database we found the best way to store images is to
store them in a folder in the server and add their paths to the database.
Follows is the code that saves the image in a folder with a new name:
Dim dte As String
dte = System.DateTime.Now.ToString
Dim str As String = b.PostedFile.FileName
‘the following line specifies the path where the image will
be stored ‘and rename it to match the file number
Dim s As String = "C:\Inetpub\wwwroot\project\Rimages\ " +
t1.Text + " .jpg "
b.PostedFile.SaveAs(s)
99
To display the results we used ASP.NET DataList control by binding the
result of the SQL statement to the datalist to get an organized look.
100
6.2.2 : Drug search
If the user wants to check if a certain drug interacts with another he/she is
currently taken he/she can enter the drug(s) name(s) and the drug he wants to
101
check in the form then presses the “check Drug interaction” button, a message
with the result will appear. Follows is the code we wrote to do perform the check:
Data4.RecordSource = "select * from interaction where drug_name='" & Text9.Text & "'
" "'& and drug_interaction_name='" & Text12.Text
Data4.Refresh
Source = Data4.RecordSource
If the user wants to know the dosage for a certain disease he/she can
enter the disease name and press the search button and the dosages for adults
and children will be displayed. Follows is the code we wrote to perform the
search:
()Private Sub Dosage_Click
Data2.RecordSource = "select * from use where drug_name='" & Text1.Text & "' and
"'"& disease_name='" & Text5.Text
Data2.Refresh
If Data2.Recordset.RecordCount < 1 Then
drug_menu.Data2.RecordSource = "select * from use where drug_name='" &
"'"&main_menu.Text1.Text
"",MsgBox " Not Found", vbInformation
Data2.Refresh
End If
102
7 Testing
“The most likely way for the world to be destroyed most
experts agree, is by accident. That’s where we come in;
were computer professionals. We cause accidents.”
-Nathaniel Borenstein
103
This chapter describes the testing steps we took to make sure that the
system is error-free and gets the job done
Doctors also complimented the project, its idea and acknowledged that it
minimizes medical mistakes, but they didn’t like the idea of a patient viewing
his/her record.
Clerks didn’t find it user friendly, and very time consuming, because some
of them have little or no experience with computers.
104
8 Conclusion...&
Recommendations
“Prediction is very difficult, especially if it’s about the future”
-anonymous
105
After about four months of hard work, we finally accomplished what we
were mainly aiming for in our project, which is to present reasonable solution for
medical records’ deficiencies in the Kingdom of Saudi Arabia.
To get the most out of this project some additional work must be done in
the following fields:
All three cases must be taken into consideration, to find a way to simplify
the merging process for all of them. Although it is a time consuming process, if it
is done with high efficiency it could lead to a powerful medical records system.
• Security
106
operational transaction processing, and to provide for rapid recovery from system
malfunctions.
• DPLM interface
1. Training
A complete training program for the system users is a very essential step
to the most out of the system.
8.2 Limitations
There were a lot of obstacles that faced us during the development of this
project, the most difficult one was the time element, we feel if we had more time
we would have been able to expand this project to its fullest.
Also, the lack of cooperation form hospitals’ side made it difficult for us to
get all the information we needed.
107
References
108
Web Sites
1. Alhakim, Yahyia T. AlThwrah.
www.althawrahnews.net/showdetails.php?ie=26871
2. Microsoft. March 30, 2005. Microsoft cooperation,
http://www.microsoft.com/sql/evaluation/overview/default.asp
3. Bydig.com. Bydig.com,
http://www.buydig.com/shop/product.aspx?sku=ADPSV8
Books
6. Duthie, Andrew. Microsoft ASP.NET Programming with Microsoft VISUAL
C#.NET Step By Step. Washington: Redmond, 2003
7. Esposito, Dino Book title: Programming Microsoft ASP.NET. Washington:
Redmond, 2003
109
A
Appendix
Questionnaires
110
Information
Gathering
111
112
113
Testing
114
115
B
Appendix
REAX System and DRUGDEX System
116
DRUGDEX System
a) Drug Evaluations
b) Drug Consults
c) Product Index
a) DRUG EVALUATIONS
• Dosage
• Pharmacokinetics
• Interactions
• Cautions
• Interactions
• Adverse side effects
117
• Contraindications / Precautions
• Comparative drug efficacy
• Clinical applications
• Comparative drug efficacy
• Indications
• Therapeutic uses
• Generic names
• Indications
• Adverse side effects
b) DRUG CONSULTS
c) PRODUCT INDEX
DRUG-REAX System
118
DRUG-REAX System information is drug-specific rather than class-
specific, which helps to more accurately interpret interaction data. The system
contains a dictionary of more than 8,000 unique drug terms, and distinguishes
between trade names and equivalent generic names, eliminating possible
duplication of interaction data on the screen. Up to 128 concurrent clinical
conflicts can be reviewed.
119