Case Study 1
Case Study 1
XYZ hospital is a multi specialty hospital that includes a number of departments, rooms,
doctors, nurses, compounders, and other staff working in the hospital. Patients having
different kinds of ailments come to the hospital and get checkup done from the concerned
doctors. If required they are admitted in the hospital and discharged after treatment.
The aim of this case study is to design and develop a database for the hospital to maintain
the records of various departments, rooms, and doctors in the hospital. It also maintains
records of the regular patients, patients admitted in the hospital, the check up of patients
done by the doctors, the patients that have been operated, and patients discharged from
the hospital.
Next we talk about the doctors of the hospital. There are two types of the doctors in the
hospital, namely, regular doctors and call on doctors. Regular doctors are those doctors
who come to the hospital daily. Calls on doctors are those doctors who are called by the
hospital if the concerned doctor is not available.
Table Description:
Following are the tables along with constraints used in Hospital Management database.
2. ALL_DOCTORS: This table stores information about all the doctors working for the
hospital and the departments they are associated with. Each doctor is given an identity
number starting with DR or DC prefixes only.
Constraint: Identity number is unique for each doctor and the corresponding department
should exist in DEPARTMENT table.
Constraint: Doctor’s number entered should contain DR only as a prefix and must exist in
ALL_DOCTORS table.
Constraint: Doctor’s number entered should contain DC only as a prefix and must exist in
ALL_DOCTORS table.
5. PAT_ENTRY: The record in this table is created when any patient arrives in the
hospital for a check up. When patient arrives, a patient number is generated which acts as a
primary key. Other details like name, age, sex, address, city, phone number, entry date,
name of the doctor referred to, diagnosis, and department name are also stored. After
storing the necessary details patient is sent to the doctor for check up.
Constraint: Patient number should begin with prefix PT. Sex should be M or F only.
Doctor’s name and department referred must exist.
6. PAT_CHKUP: This table stores the details about the patients who get treatment from
the doctor referred to. Details like patient number from patient entry table, doctor number,
date of check up, diagnosis, and treatment are stored. One more field status is used to
indicate whether patient is admitted, referred for operation or is a regular patient to the
hospital. If patient is admitted, further details are stored in PAT_ADMIT table. If patient is
referred for operation, the further details are stored in PAT_OPR table and if patient is a
regular patient to the hospital, the further details are stored in PAT_REG table.
Constraint: Patient number should exist in PAT_ENTRY table and it should be unique.
7. PAT_ADMIT: When patient is admitted, his/her related details are stored in this table.
Information stored includes patient number, advance payment, mode of payment, room
number, department, date of admission, initial condition, diagnosis, treatment, number of
the doctor under whom treatment is done, attendant name, etc.
Constraint: Patient number should exist in PAT_ENTRY table. Department, doctor number,
room number must be valid.
8. PAT_DIS: An entry is made in this table whenever a patient gets discharged from the
hospital. Each entry includes details like patient number, treatment given, treatment advice,
payment made, mode of payment, date of discharge, etc.
Constraint: Patient number should exist in PAT_ENTRY table.
Constraint: Patient number should exist in patient entry table. There can be multiple entries
of one patient as patient might be visiting hospital repeatedly for check up and there will be
entry for patient’s each visit.
10. PAT_OPR: If patient is operated in the hospital, his/her details are stored in this table.
Information stored includes patient number, date of admission, date of operation, number of
the doctor who conducted the operation, number of the operation theater in which operation
was carried out, type of operation, patient’s condition before and after operation, treatment
advice, etc.
Constraint: Patient number should exist in PAT_ENTRY table. Department, doctor number
should exist or should be valid.
11. ROOM_DETAILS: It contains details of all rooms in the hospital. The details stored in
this table include room number, room type (general or private), status (whether occupied or
not), if occupied, then patient number, patient name, charges per day, etc.
Constraint: Room number should be unique. Room type can only be G or P and status can
only be Y or N