Upload
longnguyen
View
1.554
Download
221
Embed Size (px)
DESCRIPTION
The Well Meadows Hospital Case Study Full Solution with all 8 steps.
Citation preview
11th.April.2008
The WellMeadows Hospital Case Study Design by Michael, Chan and Xenophon
Assumptions for Case StudyFollow the information from the hospital to build up a draft conceptual model without attributes. It has these entities and relationships: Staff, Qualification, Experience, Contact, Ward, Surgical and non-surgical supplies, Pharmaceutical supplies, Patient, Next-of-kin, In-Patient, Out-Patient, Local doctor, Supplier, Staff allocation, Requisition, Ward required, Staff has, Appointment, Medication, Supplies offer, Patient has, etc. In relation to In and Out patient, they seem to be separated by examination result. Because there are only 240 beds in the ward, so there is a need to set up a waiting list for patients. We add Entity and Relationship: Examination Result and Waiting List between Appointment and In-Patient, Out-Patient. Every patient can have many local doctors, for that local doctor and patient’s relation could be many to many. But because of this system is for hospital, “local doctors” just being a patient’s case history, user just needs to know about the patient have which “local doctor “. So we put one “local doctor” to many “patients”.The draft conceptual model has one relationship “Staff has” between Staff and Qualification, Contact, Experience. Because not every staff member needs to have experience before. So that we add more 2 relationship in there, make entity and relationships can be an independent relation. Due to In-patients and Out-patients having Next-of-kin, and similar attributes we try to put them into a BIG patient area. Add attribute “Waiting List Time” to In-Patient. That would be easier to understand the relation.We assumed that one staff can have many appointments. For the purpose of this case, In-patient’s medication should have pharmaceutical and surgical or non-surgical supplies. Same as medication, requisition also should have those entities. In draft Conceptual Model, 2 entities are separate; we feel this is too messy, and confusing. So we decided to put them into a BIG “Supplies” area. They have some attributes that are the same, but Pharmaceutical supplies also have “dosage” and “method”.
Conceptual Data ModelWe design this conceptual model base on CHEN Entity-Relationship Model (ER Model), developed by Dr Peter Pin-Shan Chen. The diagram in below that is an appropriate conceptual model after discussion and modify.
Logical Data ModelA Logical Data Model (LDM) is platform independent, not specific to any products. In the diagram below, we transform from conceptual model to LDM with some rules.Diagram (See Attachment 1)
Data Dictionary
Table column name keys Description/Aliases
Data type
Appointment Staff_ID FK Code relating to the Staff table int
Appointment_Time
The appointment time datetime
Appointment_NO PKThe ID for the Appointment
recordint
Patient_NO FK Code relating to the Patient table int
Contract TypeType of contract,
permanent or temporary
varchar(10)
work_hrs how many time did they work int
Salary_payment
Money that employees
receive for doing their job
int
Staff_ID PK,FK Code relating to the Staff identifier int
Experience Position
Code relating to the Position
identifier for the position held by
the staff member for this work
experience entry
varchar(20)
Organization The name of work place
varchar(50)
Start_Date The date the staff member
commenced
datetime
employment for this work
experience entry
Finish_Date
The date the staff member finished employment for
this work experience entry
datetime
Staff_ID PK,FK
Code relating to the Staff identifier
to whom this work experience
record relates
int
Qualification DateWhen the
qualification is got
datetime
type Type of qualification
varchar(20)
Institute The name of work place
varchar(50)
Staff_ID PK,FK Code relating to the Staff table int
Requisition Date_Order Order date datetime
Staff_ID FK Code relating to the Staff table int
Req_NO PK
The ID for the Requisition record that this item is requisitioned on
int
Drug_NO FK
Code relating to the
Pharmaceutical table
Surgical_ID FK
Code relating to the
Surgical_NonSurgical_supplies table
Staff Staff_ID FK Staff identifier int
Sex Gender, Male/Female real
Last_name Surname varchar(1
5)
First_nameForename, given name, christian
name
varchar(15)
NINNational
Insurance Number
int
Position Staff member's position
varchar(10)
DoBBirth date,
birthday, date of birth
datetime
Address Address of Staff varchar(50)
Salary_Scale
Salary Scale Code relating to the
employees Employment
Contract
int
Current_Salary Current salary for this employee int
Phone Telephone number int
Staff_Allocation Shift
Description of this shift. Ie. Early,
Late, Nightvarchar(5)
Staff_ID FK Code relating to the Staff table int
Ward_NO PK,FK Code relating to the Ward table int
Ward Ward_NO PK Ward identifier int
Bed_No Bed identification number int
Phone_ExtnTelephone
extension for this ward
int
Location location of this ward
varchar(10)
Ward_Required Patient_NO PK,FK Patient identifier int
ActualLeft_Date Actually the in-patient leave time datetime
Date_PlacedThe date when
the patient check in
datetime
Expect_dayHow long does
the patient prefer to stay
datetime
Date_leave Estimate the in-patient leave time datetime
Ward_No Code relating to the Ward table int
Surgical_NonSurgical_supplie
sSurgical_ID PK The ID for the
item record int
Name The name of the item
varchar(20)
Cost_per_unit How much for per unit Int
DescriptionA fuller
description of item
varchar(50)
Reorder_level
To ask somebody to supply you with more of a
product
int
StockHow many
pharmaceutical do they have
int
Supplier_ID FK Code relating to the Supplier table int
Next-of-kin Relationship
The relationship with patient i.e. mother, father,
brother etc.
varchar(10)
Phone Telephone of next-of-kin int
Address Address of next-of-kin
varchar(50)
Name First name and family name
varchar(30)
Patient_No PK,FK Code relating to the Patient table int
Patient Patient_No PK Patient identifier int
Marital-statusThe fact of
whether you are single, married
varchar(5)
Dob DOB of patient datetime
Address Patient's address varchar(50)
Last_name Surname, Christian name
varchar(15)
First_name Forename, Given name
varchar(15)
PhonePatient's contact
telephone number
int
Sex Gender, Male/Female real
Registered_Date
The date the Patient was
registered on the database
datetime
Clinic_No FK Code relating to the Local_doctors. int
Local_doctors Clinic__No PK Local_Doctor identifier int
Name First name and family name
varchar(30)
Address Address of the clinic
varchar(50)
Phone The telephone in doctor's home int
In-P Patient_No PK,FK Code relating to the Patient table int
waiting_list_time The time of waiting list datetime
Out-P Patient_No PK,FK Code relating to the Patient table int
Medication Patient_No PK,FK
The Patient identifier for the patient receiving
the drug
int
Drug_No PK,FK int
Finish_dateThe end date
(inclusive) to use medication
datetime
Start_dateThe beginning
date to use medication
datetime
Pharmaceutical_supplies Drug_No PK The number for
the Drug record int
name The name of the Pharmaceutical
varchar(20)
Cost_per_Unit How much for per unit int
Descripition A description of item
varchar(40)
DosageHow many
medicine takes once
int
Method How to use varchar(10)
Reorder
To ask somebody to supply you with more of a
product
int
StockHow many
pharmaceutical do they have
int
Supplier_ID FK Code relating to the Supplier table int
Suppliers Supplier_ID PK The ID for the Supplier record int
Name The name of supplier
varchar(30)
Fax The fax number of supplier
varchar(20)
Address address of supplier
varchar(50)
PhoneThe telephone
number of supplier
int
Physical ModelThe decision was made to build the database in SQL. This Physical Model is in the 3NF normalization and it’s according to LDM rules.
Diagram:
SQL statements for creation:
USE [WellMeadow]GO/****** Object: Table [dbo].[Appointment] Script Date: 04/11/2008 12:04:11 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Appointment](
[Staff_ID] [int] NOT NULL,[Appointment_Time] [datetime] NOT NULL,[Appointment_NO] [int] NOT NULL,[Patient_NO] [int] NOT NULL,
CONSTRAINT [PK_Appointment] PRIMARY KEY CLUSTERED (
[Appointment_NO] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
GOUSE [WellMeadow]GOALTER TABLE [dbo].[Appointment] WITH CHECK ADD CONSTRAINT [FK_Appointment_Staff] FOREIGN KEY([Staff_ID])REFERENCES [dbo].[Staff] ([Staff_ID])
USE [WellMeadow]GO/****** Object: Table [dbo].[Contract] Script Date: 04/11/2008 12:04:35 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Contract](
[Type] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,[Work_Hrs] [int] NULL,[Salary_Payment] [int] NULL,[Staff_ID] [int] NOT NULL,
CONSTRAINT [PK_Contract] PRIMARY KEY CLUSTERED (
[Staff_ID] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
GOSET ANSI_PADDING OFFGOUSE [WellMeadow]GOALTER TABLE [dbo].[Contract] WITH CHECK ADD CONSTRAINT [FK_Contract_Staff] FOREIGN KEY([Staff_ID])
REFERENCES [dbo].[Staff] ([Staff_ID])
USE [WellMeadow]GO/****** Object: Table [dbo].[Experience] Script Date: 04/11/2008 12:04:50 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Experience](
[Position] [varchar](20) COLLATE Chinese_PRC_CI_AS NULL,[Organization] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,[Start_Date] [datetime] NULL,[Finish_Date] [datetime] NULL,[Staff_ID] [int] NOT NULL,
CONSTRAINT [PK_Experience] PRIMARY KEY CLUSTERED (
[Staff_ID] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
GOSET ANSI_PADDING OFFGOUSE [WellMeadow]GOALTER TABLE [dbo].[Experience] WITH CHECK ADD CONSTRAINT [FK_Experience_Staff] FOREIGN KEY([Staff_ID])REFERENCES [dbo].[Staff] ([Staff_ID])
USE [WellMeadow]GO/****** Object: Table [dbo].[Qualification] Script Date: 04/11/2008 12:05:25 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Qualification](
[Date] [datetime] NULL,[Type] [varchar](20) COLLATE Chinese_PRC_CI_AS NULL,
[Institute] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,[Staff_ID] [int] NOT NULL,
CONSTRAINT [PK_Qualification] PRIMARY KEY CLUSTERED (
[Staff_ID] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
GOSET ANSI_PADDING OFFGOUSE [WellMeadow]GOALTER TABLE [dbo].[Qualification] WITH CHECK ADD CONSTRAINT [FK_Qualification_Staff] FOREIGN KEY([Staff_ID])REFERENCES [dbo].[Staff] ([Staff_ID])
USE [WellMeadow]GO/****** Object: Table [dbo].[Requisition] Script Date: 04/11/2008 12:05:36 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[Requisition](
[Date_Order] [datetime] NULL,[Staff_ID] [int] NULL,[Req_NO] [int] NOT NULL,
CONSTRAINT [PK_Requisition] PRIMARY KEY CLUSTERED (
[Req_NO] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
GOUSE [WellMeadow]GOALTER TABLE [dbo].[Requisition] WITH CHECK ADD CONSTRAINT [FK_Requisition_Staff] FOREIGN KEY([Staff_ID])REFERENCES [dbo].[Staff] ([Staff_ID])
USE [WellMeadow]GO/****** Object: Table [dbo].[Staff] Script Date: 04/11/2008 12:05:48 ******/
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Staff](
[Staff_ID] [int] NOT NULL,[Sex] [real] NULL,[Last_name] [varchar](15) COLLATE Chinese_PRC_CI_AS NULL,[First_name] [varchar](15) COLLATE Chinese_PRC_CI_AS NULL,[NIN] [int] NULL,[Position] [varchar](10) COLLATE Chinese_PRC_CI_AS NULL,[DOB] [datetime] NULL,[Address] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,[Salary_Scale] [int] NULL,[Current_Salary] [int] NULL,[Phone] [int] NULL,
CONSTRAINT [PK_Staff] PRIMARY KEY CLUSTERED (
[Staff_ID] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
GOSET ANSI_PADDING OFF
USE [WellMeadow]GO/****** Object: Table [dbo].[Staff_Allocation] Script Date: 04/11/2008 12:06:03 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Staff_Allocation](
[Shift] [varchar](5) COLLATE Chinese_PRC_CI_AS NULL,[Staff_ID] [int] NULL,[Ward_NO] [int] NOT NULL,
CONSTRAINT [PK_Staff_Allocation] PRIMARY KEY CLUSTERED (
[Ward_NO] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GOSET ANSI_PADDING OFFGOUSE [WellMeadow]GOALTER TABLE [dbo].[Staff_Allocation] WITH CHECK ADD CONSTRAINT [FK_Staff_Allocation_Staff] FOREIGN KEY([Staff_ID])REFERENCES [dbo].[Staff] ([Staff_ID])
Possible Enterprise Constraints
For this case, we should consider about the total numbers of bed in ward. There are 240 beds in ward. No more than 240 patients can be “In-patient” at any of time. When there are over 240 patients, the system should put them into waiting list.
Transaction Analysis
Transaction/Relation ( a ) (b) (c)
Staff Insert Read Read
Requisition
Staff_Allocation Read
Qualification Insert Read
Appointment
Contract Insert
Experience Insert Read
(a) Create and maintain records recording the details of members of staff ( Personnel Officer )
(b) Search for staff who have particular qualifications or previous work experience ( Personnel Officer )
(c) Produce a report listing the details of staff allocated to each ward ( Personnel Officer )
Security For consideration of security in this RDBMS will set these Users to manage it:
SUPERVISORThis user have global authority can operate whole RDBMS.e.g. (sa at mssql, root at mysql)
BACKUP OPERATORThis user has responsibility to backup the whole system, so this user can read-only all tables in this RDBMS.
PERSONAL OFFICERThis user has responsible for ensuring that the appropriate staffs are allocated to each ward. For that this user can operate this table: staff_allocation.
MEDICAL DIRECTORThis user has overall responsibility for the management of the hospital, including staff, beds and supplies. Therefore this user can operate these tables: staff, ward, requisition, surgical Non-Surgical supplies and Pharmaceutical supplies.
CHARGE NURSEThis user is responsible to manage all resources (staff, beds, and supplies) are used effectively in the care of patients. So this user can operate these tables: staff_allocation, surgical Non-surgical supplies, pharmaceutical supplies, requisition, ward_required.
Comment on the design decision that we made
Area Appropriate Decisions Justification Provided
Security
There are 5 different secretly level in the database
Different stuff can operate different tables. For the security reason. If just
have one security level will cause security problem.
Staff Experience, Contract, Qualification have their own
relationship
At the beginning, we connect Staff with the Experience, Contract,
Qualification, and during the design,
connect to Staff.
we found that there are three relationships between them, so we
modify there to have 3 relationships. That would be more comprehensible.
Patient
On conceptual Model, we put In-patient and out-patient into a big “Patient” area. Most of attributes are link to this big “Patient” area. Relationship
“Ward_Required” and medication” are link
to In-patient. And there is some relationship link to the
big “Patient” area.
As Conceptual Model, it should easy to understand and can express clearly
the meaning of the diagram. Follow the information, in this system should
have at least 3 patients: In-patient, Out-patient and normal patient. If put this 3 parts in different places, that
would make reader confuse, and the relation of the system will getting
messy. Because of they have some same attributes, so we put them in one “Patient” area to share some
public attributes and some relationships. But some special
attributes and relationships still link to the right Entity. That solution would
be easier to understand this diagram.