Hospital Order Database: Julian Romero HCIN 543

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 9

Hospital Order

Database
JULIAN ROMERO
HCIN 543
Description
Mock database of four tables that contains information on orders placed by hospitals for
hospital supplies. Hospital names and locations were pulled from a real database.

Entities in these tables consist of customers who are hospitals, supplies for hospitals,
and orders placed. This database is used by the supplier to keep track of the orders,
inventory, and customer base.
Data Dictionary
Data Element Field Description
Customer Number customernum Primary identifier for supplier to identify customers attached to orders
Customer Name customername Hospital name
Address address Address for shipment
State state State for shipment
Zip Code postalcode Zip code for shipment
Credit Limit creditlimit Amount hospital is allowed to borrow
*Category
Balance balance Balance that hospital has from limit to purchase supplies fd = Food
Item Number itemnum Item number to locate inventory ppe = Personal
Description description Description of item for purchase Protective
Equipment
On Hand Supply onhand Inventory amount for item mddvc = Medical
Category category Type of product for sale Devices
dme = durable
Price price Price of item
medical equipment
Order Number ordernum Order number associated with purchase lab = laboratory
Order Date orderdate Date item(s) were ordered supplies
Quantity Ordered numordered Quantity of supplies ordered
Quoted Price quotedprice Total amount quoted for the order
Entity-Relationship Diagram

One-to-One
Many-to-One
One-to-Many

Four Tables:
(1) Customers – Primary Key: customernum
(2) Orders – Primary Key: odernum
Foreign Key: customernum
(3) Orderline – Primary Key: ordernum
Foreign Key: itemnum
(4) Item – Primary Key: itemnum
Query 1
List the hospital name, state, and
balance from hospitals in Colorado
and Florida. Query1

SQL Command:
customername state balance
Select customername, state, balance
From customers YUMA DISTRICT HOSPITAL - CO $24,500
CAH
where state='co'
or state='fl';
FLORIDA HOSPITAL FL $2,500
ZEPHYRHILLS
Query2
itemnum description category onhand

998 Gatorade 6 ct fd 140 Query 2


937 Blood Culture Bottles Anaerobic lab 135 List the item number, name of the
20 ct supplies, and category where the
inventory amount is less than a quantity
973 Wheelchair dme 75 of 150. List in descending order.
SQL Command:
954 Disposable Blood Pressure Cuff mddvc 75
SELECT itemnum, description, category,
955 Walker dme 60 onhand

999 Stethoscope mddvc 45 from item


where onhand<150
915 Hospital Glucose Meter mddvc 30
order by onhand DESC;
902 N95 20 ct ppe 25

943 Face Shield 25 ct ppe 20


Query3
ordernum customernum customername orderdate

Query 3
2144 11 YUMA DISTRICT HOSPITAL - 1/27/2020
CAH

1223 14 LANE REGIONAL MEDICAL 1/2/2021


CENTER
List the hospital name, customer number, order
9872 15 INTEGRIS CANADIAN 3/10/2021 number, and order date on one table.
VALLEY HOSPITAL

1307 17 MIDWESTERN REGION 4/1/2021


MED CENTER
SQL Command:
1345 23 ZEELAND COMMUNITY 6/19/2020
HOSPITAL Select orders.ordernum, customers.customernum,
customers.customername, orders.orderdate
1309 24 ZUNI INDIAN HOSPITAL 4/3/2021

6542 25 YUMA REGIONAL MEDICAL 10/25/2020


From orders
CENTER
Inner Join customers ON
1534 26 GENESIS HEALTHCARE 3/31/2021 orders.customernum=customers.customernum;
SYSTEM

1303 31 FLORIDA HOSPITAL 3/19/2020


ZEPHYRHILLS
Database Improvements
Type of improvements for this database:

Build out larger with more healthcare organizations, supplies, and orders.
-Thank You-
Reference:

Hospital Data Set. data.world. (n.d.). https://data.world/datasets/hospital.

You might also like