Академический Документы
Профессиональный Документы
Культура Документы
COMPUTER
APPLICATIONS II-
TERM REPORT
HOSPITAL DATABASE
LETTER OF ACKNOWLEDGEMENT
Http://www.iobm.edu.pk
May 3, 2011
Dear Reader,
It was an honor for us to carry out our term project which was assigned to us by our respected
teacher Mr. MUJTABA MEMON. We would like to thank Mr. MUJTABA MEMON for providing us
the guidance and the skills that helped us in preparing this project. It was a pleasure carrying out
such a term project on a topic so informative and practical.
Thanking You.
Yours sincerely,
Samia Shoaib
Hira Khalil
Aysha Ghanchi
2
Computer
Applications
II-‐Term
Report
2010
LETTER OF TRANSMITTAL
Http://www.iobm.edu.pk
May 3, 2011
Lecturer,
IOBM
We are presenting this report based on the hospital database. This report contains all the concepts
that were taught to us in the ‘COMPUTER APPLICATIONS 2’. We have tried to cover all the
aspects which were required in the report.
Sincerely yours,
Samia Shoaib
Hira Khalil
Aysha Ghanchi
3
Computer
Applications
II-‐Term
Report
2010
TABLE OF CONTENT
TABLES........................................................................................................................................... 6
4
Computer
Applications
II-‐Term
Report
2010
5
Computer
Applications
II-‐Term
Report
2010
TABLES
A database is a collection of tables. Table is a kind of matrix formation representing an entity. It
is a collection of attributes representing an entity. These attributes provides further details
regarding the entity involved.
Doctor Details
Hospital investment
Lab records
Operation details
Patient admission and discharge details
Patient personal details
Payment records
Pharmacy inventory
Pharmacy records
Room details
Staff details
Treatments details
Visiting doctors details
6
Computer
Applications
II-‐Term
Report
2010
DESCRIPTION OF TABLES
D OCTOR D ETAILS
This tables contains the personal details of the doctors, their addresses, telephone numbers, their
specialization And fee charged by them.
O PERATIONAL D ETAILS
This table contains the records of the patients and the doctors who have operated them and
whether the operation performed was successful or not and the reason why the operation was
conducted.
7
Computer
Applications
II-‐Term
Report
2010
L AB R ECORDS
This table contains the lab id, patient id, doctor id, the lab test description, patient lab results, lab
test frequency and lab test cost
O PERATION
This table contains the patient id, operation theater id, Dr id, operation reason and operation
results (successful or unsuccessful)
8
Computer
Applications
II-‐Term
Report
2010
P AYMENT RECORDS
The payment record table shows the record of all the patients who have availed the services of
the hospsital their medicine and lab costs etc and the amount paid by them.
9
Computer
Applications
II-‐Term
Report
2010
P HARMACY INVENTORY
The pharmacy inventory table shows the details of the medicine that are in stock, how much
quantity was ordered and how much is left with and the details of their date of order and delivery
etc
P HARMACY R ECORDS
The pharmacy record table shows the record of the medicines that are in the pharmacy, the
number of medicines their types and the cost and which patoent bought it which is shown by the
patients Id number. The patient id acts as the primary key in the data base
R OOMS DETAILS
The room detail table shows the number of rooms in the hospital, how many rooms are occupied
and how many rooms are vacant and which patient has used the rooms on which date.
10
Computer
Applications
II-‐Term
Report
2010
11
Computer
Applications
II-‐Term
Report
2010
S TAFF D ETAILS
The staff detail table shows the staff details, their occupation and personal details like gender,
date of birth, salary
T REATMENT DETAILS
The treatment details table shows the dr and the patient id. The diseases that was diagnosed by
the doctor and their results of the treatment that the doctor provided.
12
Computer
Applications
II-‐Term
Report
2010
QUERIES
1. A LL P OSITIVE L AB T ESTS
This query shows the test that were positive when conducted on patients.
FROM Lab_Records
FROM doctor_details
3. F EMALE D OCTORS
To show the details of all those doctors who are female
FROM doctor_details
13
Computer
Applications
II-‐Term
Report
2010
FROM Hospital_Investment
WHERE (((Hospital_Investment.Investment_Amount)>50000));
FROM Hospital_Investment
WHERE (((Hospital_Investment.Investment_Amount)<20000));
6. M ALE D OCTORS
To show the the number of doctors based on their gender I;e Male and how many are there.
FROM doctor_details
14
Computer
Applications
II-‐Term
Report
2010
FROM Payment_Records
WHERE (((([Payment_Records].[Medicine_Cost]+[Payment_Records].[Lab_test_cost]-
[Payment_Records].[Amount_Paid]))>0));
8. P ATIENTS N AMED A LI
To show the number of patients having the same name ‘ALI’
FROM patient_personal_details
FROM Treatment_details
15
Computer
Applications
II-‐Term
Report
2010
SELECT
DateDiff("d",[Patient_Admission_&_Discharge_Details].[date_of_admission],[Patient_Ad
mission_&_Discharge_Details].[Date_of_discharge]) AS Days,
[Patient_Admission_&_Discharge_Details].*
FROM [Patient_Admission_&_Discharge_Details]
WHERE
(((DateDiff("d",[Patient_Admission_&_Discharge_Details].[date_of_admission],[Patient_A
dmission_&_Discharge_Details].[Date_of_discharge]))>60));
FROM Room_details
WHERE
(((DateDiff("d",[Room_details].[Date_Of_Admission],[Room_details].[Date_Of_DIScharge
]))>=100));
FROM Staff_Details
WHERE (((([Staff_Details].[Staff_Salary(yearly)]/12))<1000));
16
Computer
Applications
II-‐Term
Report
2010
FROM Staff_Details
WHERE (((DateDiff("yyyy",[Staff_Details].[DOB],Now()))>35));
14. T OP 5 I NVESTORS
To show the details of the 5 top most investors who sponsored the hospital
FROM Hospital_Investment
ORDER BY Hospital_Investment.Investment_Date;
SELECT Pharmacy_Records.Patient_Id,
([Pharmacy_Records].[Medicine_amount]*[Pharmacy_Records].[medicine_cost]) AS
[Total Cost]
FROM Pharmacy_Records
ORDER BY
([Pharmacy_Records].[Medicine_amount]*[Pharmacy_Records].[medicine_cost]) DESC;
17
Computer
Applications
II-‐Term
Report
2010
FROM Operation
SELECT Visiting_Doctors_Details.Visiting_Doctor_id,
Visiting_Doctors_Details.Visiting_Doctor_Name, Visiting_Doctors_Details.Address,
Visiting_Doctors_Details.Timings
FROM Visiting_Doctors_Details
18
Computer
Applications
II-‐Term
Report
2010
FORMS
19
Computer
Applications
II-‐Term
Report
2010
20
Computer
Applications
II-‐Term
Report
2010
R EPORT
21
Computer
Applications
II-‐Term
Report
2010
RELATIONSHIPS
22
Computer
Applications
II-‐Term
Report
2010
23
Computer
Applications
II-‐Term
Report
2010
E-R DIAGRAM
ROOM ID ROOMS
PATIENT NAME STATUS
ID
24