SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
BYGB 7973, FALL2016, DATABASE MANAGEMENT
Project Phase 3
Instructor: Dr. W. RP Raghupathi
Sam Wilson: Qianxia Zhu, Hong Dai, Jian Jin, Duanrui Shi, Jianyu Pan
P a g e | 1
1. Revised Entity-Relationship Model for Pharmacy Database System
P a g e | 2
2. Assumptions of Entity-Relationship Model
Note: Directions, Rx Drug Quantity, Rx Date Filled, Number of Refills, Number of Refills
Remaining, Rx Total Price and Rx Drug Price are descriptive attributes that describe the
relationship between Drug and Prescription.
P a g e | 3
3. Data Dictionary of Entity Relationship Diagram for Pharmacy Database System
Entity Attributes Data type Length Primary Key
Physician Physician ID
Physician Name
Physician Street
Physician City
Physician Zipcode
Physician State
CHAR
CHAR
CHAR
CHAR
CHAR
CHAR
20
20
20
20
20
20
√
Patient Patient ID
Patient Name
Patient Street
Patient City
Patient Zipcode
Patient State
Patient Date of Birth
Patient Family Member Name
CHAR
CHAR
CHAR
CHAR
CHAR
CHAR
DATE
CHAR
20
20
20
20
20
20
Default
20
√
Prescription Rx ID
Rx Original Date
Number of Refills
Rx Drug Quantity D
Rx Date Filled D
Number of Refills Remaining D
Rx total Price D
CHAR
DATE
NUMERIC
NUMERIC
DATE
NUMERIC
NUMERIC
20
Default
5
5
Default
5
5
√
Insurance
Claim
Insurance Claim Number
Insurance Claim Date
Insurance Company Policy no.
Insurance Company Name
Amount Paid
Insured Name
CHAR
DATE
CHAR
CHAR
NUMERIC
CHAR
20
Default
20
20
5
20
√
P a g e | 4
Relationship to insured person CHAR 5
Drug Drug ID
Drug Name
Drug Form
Drug Strength
Drug Price
Quantity on Hand
Quantity on Order
Quantity on Order Date
Unit Cost
Controlled Substance Notation
Recorder Point
Directions D
CHAR
CHAR
CHAR
CHAR
NUMERIC
NUMERIC
NUMERIC
DATE
NUMERIC
CHAR
NUMERIC
CHAR
20
20
20
5
5
5
5
Default
5
20
5
20
√
Payment Payment Number
Payment Date
Payment Type
Amount Due
CHAR
DATE
CHAR
NUMERIC
20
Default
20
5
√
Supplier Supplier Name
Supplier Street
Supplier City
Supplier Zipcode
Supplier State
CHAR
CHAR
CHAR
CHAR
CHAR
20
20
20
20
20
√
P a g e | 5
4. Default Physical Data Model for Pharmacy Database System
P a g e | 6
5. Revised Physical Data Model for Pharmacy Database System
P a g e | 7
6. Normalized Physical Data Model for Pharmacy Database System
P a g e | 8
7. Assumptions for Normalized Physical Data Model
a) PatientFamilyMemberName is a repeating group that should be included in primary
key.
b) PatientName, PatientStreet, PatientCity, PatientZipcode, PatientState and
PatientDateofBirth depend only on PatientID.
c) PaymentType is a repeating group which should be included in primary key.
d) PaymentDate depends only on PaymentNumber.
e) AmountPaid depends only on PaymentType.
f) Amount Due should be deleted from table because it could be calculated.
a. Amount Due = (Rx-total-price) – (Amount Paid)
g) Insurance policy number depends on Insurance Company Name.
h) Insurance policy number is a repeating group that should be included in primary key.
i) Rx-total-price should be deleted from table because it could be calculated.
a. Rx-total-price = ∑ (𝑅𝑥𝐷𝑟𝑢𝑔𝑄𝑢𝑎𝑛𝑡𝑖𝑡𝑦 ∗ 𝑅𝑥𝐷𝑟𝑢𝑔𝑃𝑟𝑖𝑐𝑒)
j) NumberofRefillsRemaining should be deleted from table because it could be
calculated.
a. NumberofRefillsRemaining = NumberofRefills – Count(RxDatefilled)
P a g e | 9
10. Tables with Data
1. Drug
DRUG
ID
DRUGNA
ME
DRUGFO
RM
DRUGSTREN
GTH
QUANTITYON
HAND
QUANTITYONO
RDER
1 Tylenol Tablets 8 50 65
2 Alka Capsules 15 35 70
3 Pepto Elixirs 6 45 85
QUANTITYONOR
DERDATE
UNITCO
ST
CONTROLLEDSUBSTAN
CENOTATION
REODERP
OINT
SUPPLIER
NAME
10/22/2012 5 Yes 30 CVS
6/1/2013 6 No 50 DR
9/1/2015 7 Yes 45 PHA
2. Insurance Company
INSURANCECOMPANYNAME INSURANCEPOLICYNUMBER
Aetna 67851
Emblem 35627
United 56786
P a g e | 10
3. Insurance Claim
INSURANCE
CLAIMNUM
BER
INSURAN
CECLAIM
DATE
INSUR
EDNA
ME
RELATIONSHI
PTOINSUREDP
ERSON
INSURANCE
COMPANYN
AME
INSURANCE
POLICYNU
MBER
x2635 3/3/2015 John Father Emblem 35627
x5263 4/3/2015 Charlot
te
Mother United 56786
x1736 12/6/2015 Emma Daughter United 56786
4. Patient
PATIE
NTID
PATIEN
TNAME
PATIENTDAT
EOFBIRTH
PATIENT
STREET
PATIEN
TCITY
PATIENTZ
IPCODE
PATIENT
STATE
1 Tom 2/1/1985 10 St Chico 95928 CA
2 Kerry 4/22/1987 34 Ave Chico 95938 CA
3 Chen 3/1/1986 43 Lane Fremont 96928 CA
4 Harry
Potter
3/4/1988 4 way Fremont 91928 CA
5. Patient Family Member Name
PATIENTID PATIENTFAMILYMEMBERNAME
1 Tommy
2 Kerryae
4 Helen
6. Payment
PAYMENTNUMBER INSURANCECLAIMNUMBER PAYMENTTYPE
267398 x2635 CASH
837640 x5263 CREDIT
984620 x1736 DEBIT
P a g e | 11
7. Payment Number
PAYMENTNUMBER PAYMENTDATE
267398 12/24/2013
837640 11/22/2011
984620 3/12/2008
8. Payment Type
PAYMENTTYPE AMOUNTPAID
CASH 893
CREDIT 666
DEBIT 897
9. Physician
PHYSICI
ANID
PHYSICIAN
NAME
PHYSICIANS
TREET
PHYSICIA
NCITY
PHYSICIANZI
PCODE
PHYSICIAN
STATE
a2487 Thomas
Smith
62st New York
City
10011 New York
a7334 Paul Frank 55st Jersey 7094 New Jersey
a1819 Chery Mark 50st Secaucus 7095 New Jersey
10. Prescription
RX
ID
RXORIGIN
ALDATE
PHYSIC
IANID
PATIE
NTID
PAYMENTN
UMBER
PAYMEN
TTYPE
PATIENTFAMILYM
EMBERNAME
b24
87
3/27/2015 a2487 1 267398 CASH Tommy
b73
34
4/13/2015 a7334 2 837640 CREDIT Kerryae
b18
19
2/15/2015 a1819 4 984620 DEBIT Helen
P a g e | 12
11. Prescription_x_Drug
R
XI
D
DR
UGI
D
DIREC
TIONS
D
RXDRU
GPRICE
D
RXDATE
FILLED
D
RXDRUGQ
UANTITY
D
NUMBERO
FREFILLS
D
NUMBEROFREFI
LLSREMAINING
D
b2
48
7
1 Three
times a
day
5 11/11/201
2
55 10 5
b7
33
4
2 Every
eight
hours
6 10/31/201
0
65 15 8
b1
81
9
3 Two
times a
day
7 6/22/2013 45 10 8
12. Supplier
SUPPLIERNA
ME
SUPPLIERSTR
EET
SUPPLIERCI
TY
SUPPLIERZIPC
ODE
SUPPLIERSTA
TE
CVS 66st New York 10017 New York
DR 53st Jersey 7084 New Jersey
PHA 73st Atlantic 9033 New Jersey
P a g e | 13
11. The 10 Queries
i. English version: #List Drug Name, Drug Forms, Number of Refilled, Supplier City.
Select drug.drugname,drug.drugform,prescription_x_drug.NUMBEROFREFILLSD, supplier.su
ppliercity
From prescription, drug, supplier,prescription_x_drug
Where supplier.suppliername=drug.suppliername
And prescription.rxid=prescription_x_drug.rxid and
prescription_x_drug.drugid=drug.drugid
DRUGNAME DRUGFORM NUMBEROFREFILLSD SUPPLIERCITY
Tylenol Tablets 10 New York
Alka Capsules 15 Jersey
Pepto Elixirs 10 Atlantic
ii. English version: #List payment number, Insurance Claim Date, Insurance Company Name
and Relationship to Insured Person.
Select payment.paymentnumber,insuranceclaimdate,INSURANCECOMPANYNAME, RELATI
ONSHIPTOINSUREDPERSON
from prescription, insurance_claim,payment
P a g e | 14
Where payment.paymentnumber=prescription.paymentnumber
and insurance_claim.insuranceclaimnumber= payment.insuranceclaimnumber
PAYMENTN
UMBER
INSURANCECLA
IMDATE
INSURANCECOMP
ANYNAME
RELATIONSHIPTOINSU
REDPERSON
267398 3/3/2015 Emblem Father
837640 4/3/2015 United Mother
984620 12/6/2015 United Daughter
iii. English version: #List Drug Name, Drug Forms, Rx Original Date, Payment Number.
Select drug.drugname,drug.drugform,prescription.RXORIGINALDATE,payment.paymentnumb
er
From prescription, drug, payment,PRESCRIPTION_X_DRUG
Where payment.paymentnumber=prescription.paymentnumber
And prescription.rxid = PRESCRIPTION_X_DRUG.rxid
and PRESCRIPTION_X_DRUG.drugid=drug.drugid
DRUGNAME DRUGFORM RXORIGINALDATE PAYMENTNUMBER
Tylenol Tablets 3/27/2015 267398
Alka Capsules 4/13/2015 837640
Pepto Elixirs 2/15/2015 984620
P a g e | 15
iv. English version: #List Drug Name, Drug Form, Number of Refilled, Supplier city.
Select drugname,drugform,PRESCRIPTION_X_DRUG.NUMBEROFREFILLSD,suppliercity
From prescription, drug, supplier,PRESCRIPTION_X_DRUG
Where supplier.suppliername=drug.suppliername
And prescription.rxid=PRESCRIPTION_X_DRUG.rxid
and PRESCRIPTION_X_DRUG.drugid=drug.drugid
DRUGNAME DRUGFORM NUMBEROFREFILLSD SUPPLIERCITY
Tylenol Tablets 10 New York
Alka Capsules 15 Jersey
Pepto Elixirs 10 Atlantic
v. English version: #Calculate Rx Total Price of each Rx ID.
Select PRESCRIPTION_X_DRUG.rxid, (rxdrugquantityd*rxdrugpriced) as rxtotalprice
from PRESCRIPTION_X_DRUG
vi.
RXID RXTOTALPRICE
B2487 275
B7334 390
B1819 315
P a g e | 16
vi. English version: #List Patient ID, Rx Original Date, ordered by Patient ID.
selectpatient.patientid, prescription.rxoriginaldate
from patient, prescription
where patient.patientid = prescription.patientid
order by patient.patientid
PATIENTID RXORIGINALDATE
1 3/27/2015
2 4/13/2015
4 2/15/2015
vii. English version: #List Number of Refills Used for each Rx ID.
select prescription.rxid,(NUMBEROFREFILLSD - NUMBEROFREFILLSREMAININGD) as n
umberofrefillsused
from PRESCRIPTION_X_DRUG, prescription
where PRESCRIPTION_X_DRUG.rxid =PRESCRIPTION.rxid
RXID NUMBEROFREFILLSUSED
b2487 5
b7334 7
b1819 2
P a g e | 17
viii. English version: #List Patient Name, Patient City, Rx ID who was born befor 1986-01-01.
selectpatientname,patientcity,prescription.rxid
from patient,prescription
where patient.patientid=prescription.patientid and patientdateofbirth< '1986-01-01'
PATIENTNAME PATIENTCITY RXID
Tom Chico b2487
ix. English version: #List Rx ID, Payment Number where Rx Original Date is later than 2014.
selectprescription.rxid,payment.paymentnumber
from prescription,payment
where prescription.paymentnumber = payment.paymentnumber
and year(prescription.rxoriginaldate)>2014
RXID PAYMENTNUMBER
b2487 267398
b7334 837640
b1819 984620
P a g e | 18
x. English version: #List PaymentType and count the number of each Paymenttype.
selectpayment.paymenttype,count(prescription.rxid) as numbers_of_prescription
from payment,prescription
where prescription.paymentnumber = payment.paymentnumber
group by payment.paymenttype
PAYMENTTYPE NUMBERS_OF_PRESCRIPTION
CASH 1
CREDIT 1
DEBIT 1

Contenu connexe

Tendances

Analisis ERD Database Rumah Sakit
Analisis ERD Database Rumah SakitAnalisis ERD Database Rumah Sakit
Analisis ERD Database Rumah SakitFitria Nuri
 
Pharmacy management system
Pharmacy management systemPharmacy management system
Pharmacy management systemsudiahmad1
 
Pharmaceutical store management system
Pharmaceutical store management systemPharmaceutical store management system
Pharmaceutical store management systemTushar Dalvi
 
Database minimarket-Garnis Q
Database minimarket-Garnis QDatabase minimarket-Garnis Q
Database minimarket-Garnis QG Nis
 
Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...
Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...
Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...Ferdinand Jason
 
Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...
Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...
Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...Rivalri Kristianto Hondro
 
Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013
Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013
Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013Putu Shinoda
 
Ppt e commerce &e-business
Ppt e commerce &e-businessPpt e commerce &e-business
Ppt e commerce &e-businessditha pp
 
8 modul 8-dts-fitur dan cleaning data-univ-gunadarma
8 modul 8-dts-fitur dan cleaning data-univ-gunadarma8 modul 8-dts-fitur dan cleaning data-univ-gunadarma
8 modul 8-dts-fitur dan cleaning data-univ-gunadarmaArdianDwiPraba
 
Notasi prefix infix-postifx- expression tree
Notasi prefix infix-postifx- expression treeNotasi prefix infix-postifx- expression tree
Notasi prefix infix-postifx- expression treeAcomic Comic
 
DFD for E-Commerce Website
DFD for E-Commerce WebsiteDFD for E-Commerce Website
DFD for E-Commerce WebsiteRabart Kurrey
 
Erd perpustakaan
Erd perpustakaanErd perpustakaan
Erd perpustakaanNae Nay
 
Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone.
Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone. Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone.
Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone. Febry San
 
Evolusi perkembangan rekayasa perangkat lunak
Evolusi perkembangan rekayasa perangkat lunakEvolusi perkembangan rekayasa perangkat lunak
Evolusi perkembangan rekayasa perangkat lunakFebry San
 
Analisis ERD Database Rumah Sakit
Analisis ERD Database Rumah SakitAnalisis ERD Database Rumah Sakit
Analisis ERD Database Rumah SakitFitria Nuri
 

Tendances (20)

Analisis ERD Database Rumah Sakit
Analisis ERD Database Rumah SakitAnalisis ERD Database Rumah Sakit
Analisis ERD Database Rumah Sakit
 
Introduction to data structure and algorithms
Introduction to data structure and algorithmsIntroduction to data structure and algorithms
Introduction to data structure and algorithms
 
Pharmacy management system
Pharmacy management systemPharmacy management system
Pharmacy management system
 
Pharmaceutical store management system
Pharmaceutical store management systemPharmaceutical store management system
Pharmaceutical store management system
 
Database minimarket-Garnis Q
Database minimarket-Garnis QDatabase minimarket-Garnis Q
Database minimarket-Garnis Q
 
Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...
Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...
Final Project APSI : ANALISIS PERANCANGAN SISTEM INFORMASI PENJUALAN SUPERMAR...
 
Jawaban Struktur data soal-latihan
Jawaban Struktur data soal-latihanJawaban Struktur data soal-latihan
Jawaban Struktur data soal-latihan
 
Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...
Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...
Perangkat Lunak Deteksi Bit Error dengan Implementasi Longitudinal Redundancy...
 
Analisis Kebutuhan Sistem Informasi
Analisis Kebutuhan Sistem InformasiAnalisis Kebutuhan Sistem Informasi
Analisis Kebutuhan Sistem Informasi
 
Queue antrian
Queue antrian Queue antrian
Queue antrian
 
Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013
Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013
Micro Teaching Mata Kuliah Jaringan Komputer IT Telkom 2013
 
Ppt e commerce &e-business
Ppt e commerce &e-businessPpt e commerce &e-business
Ppt e commerce &e-business
 
8 modul 8-dts-fitur dan cleaning data-univ-gunadarma
8 modul 8-dts-fitur dan cleaning data-univ-gunadarma8 modul 8-dts-fitur dan cleaning data-univ-gunadarma
8 modul 8-dts-fitur dan cleaning data-univ-gunadarma
 
Notasi prefix infix-postifx- expression tree
Notasi prefix infix-postifx- expression treeNotasi prefix infix-postifx- expression tree
Notasi prefix infix-postifx- expression tree
 
DFD for E-Commerce Website
DFD for E-Commerce WebsiteDFD for E-Commerce Website
DFD for E-Commerce Website
 
Erd perpustakaan
Erd perpustakaanErd perpustakaan
Erd perpustakaan
 
Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone.
Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone. Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone.
Pengertian ICMP, ARP, DHCP, MPLS, OSPF, BGP, Backbone.
 
Evolusi perkembangan rekayasa perangkat lunak
Evolusi perkembangan rekayasa perangkat lunakEvolusi perkembangan rekayasa perangkat lunak
Evolusi perkembangan rekayasa perangkat lunak
 
Analisis ERD Database Rumah Sakit
Analisis ERD Database Rumah SakitAnalisis ERD Database Rumah Sakit
Analisis ERD Database Rumah Sakit
 
E commerce use case documentation.
E commerce use case documentation.E commerce use case documentation.
E commerce use case documentation.
 

En vedette

Pharmacy management
Pharmacy managementPharmacy management
Pharmacy managementRasel Khan
 
Poultry farm management system
Poultry farm management systemPoultry farm management system
Poultry farm management systembimoljit
 
Computer science project work
Computer science project workComputer science project work
Computer science project workrahulchamp2345
 
Medical Store Management System Software Engineering Project
Medical Store Management System Software Engineering ProjectMedical Store Management System Software Engineering Project
Medical Store Management System Software Engineering Projecthani2253
 
Oracle Forms Tutorial
Oracle Forms TutorialOracle Forms Tutorial
Oracle Forms TutorialATR Login
 

En vedette (8)

Pharmacy management
Pharmacy managementPharmacy management
Pharmacy management
 
Pharmacy management system project
Pharmacy management system  projectPharmacy management system  project
Pharmacy management system project
 
Graduation Project
Graduation ProjectGraduation Project
Graduation Project
 
Poultry farm management system
Poultry farm management systemPoultry farm management system
Poultry farm management system
 
Computer science project work
Computer science project workComputer science project work
Computer science project work
 
Medical Store Management System Software Engineering Project
Medical Store Management System Software Engineering ProjectMedical Store Management System Software Engineering Project
Medical Store Management System Software Engineering Project
 
Oracle Forms Tutorial
Oracle Forms TutorialOracle Forms Tutorial
Oracle Forms Tutorial
 
Hospital management system
Hospital management systemHospital management system
Hospital management system
 

Similaire à Database Management_ Pharmacy Tracking System

Health insurance claim form cms1500 (hosa)
Health insurance claim form cms1500 (hosa)Health insurance claim form cms1500 (hosa)
Health insurance claim form cms1500 (hosa)melodiekernahan
 
Direct to consumer advertising
Direct to consumer advertisingDirect to consumer advertising
Direct to consumer advertisingGayathri Tangirala
 
Tui Dissertation Defense Abbrv Hales (Linkedin)
Tui Dissertation Defense Abbrv   Hales (Linkedin)Tui Dissertation Defense Abbrv   Hales (Linkedin)
Tui Dissertation Defense Abbrv Hales (Linkedin)stickmanjohn
 
Data Visualization ProjectThis assignment assumes that you’ve
Data Visualization ProjectThis assignment assumes that you’ve Data Visualization ProjectThis assignment assumes that you’ve
Data Visualization ProjectThis assignment assumes that you’ve OllieShoresna
 
Fundamentals of Health Insurance Big Data Management: Master Patient Index De...
Fundamentals of Health Insurance Big Data Management: Master Patient Index De...Fundamentals of Health Insurance Big Data Management: Master Patient Index De...
Fundamentals of Health Insurance Big Data Management: Master Patient Index De...Salus One Ed
 
Mediation safety - Third Lecture
Mediation safety - Third LectureMediation safety - Third Lecture
Mediation safety - Third LectureKurt Wilson
 
1500 EXAMPLE JONES
1500 EXAMPLE JONES1500 EXAMPLE JONES
1500 EXAMPLE JONESEbony Holden
 
Us Health System Ppt
Us Health System PptUs Health System Ppt
Us Health System Pptasadhu86
 
Claim Form.pdf
Claim Form.pdfClaim Form.pdf
Claim Form.pdfmgpalsana
 
Standing Operating Procedure Referrals Specialist (1)
Standing Operating Procedure Referrals Specialist (1)Standing Operating Procedure Referrals Specialist (1)
Standing Operating Procedure Referrals Specialist (1)Rozzlyn Bashline
 
Chapter 5 prescriptions
Chapter 5 prescriptionsChapter 5 prescriptions
Chapter 5 prescriptionsrr0006
 
Study Planner Site Selector Master (Abridged) 070809
Study Planner  Site Selector Master (Abridged)   070809Study Planner  Site Selector Master (Abridged)   070809
Study Planner Site Selector Master (Abridged) 070809kesre
 
ERWIN SUAREZ20230323 CLIMBS LIFE.pdf
ERWIN SUAREZ20230323 CLIMBS LIFE.pdfERWIN SUAREZ20230323 CLIMBS LIFE.pdf
ERWIN SUAREZ20230323 CLIMBS LIFE.pdfRolandoSagnoy
 

Similaire à Database Management_ Pharmacy Tracking System (19)

Cms1500805
Cms1500805Cms1500805
Cms1500805
 
Health insurance claim form cms1500 (hosa)
Health insurance claim form cms1500 (hosa)Health insurance claim form cms1500 (hosa)
Health insurance claim form cms1500 (hosa)
 
Medical Banking Leadership Forum
Medical Banking Leadership ForumMedical Banking Leadership Forum
Medical Banking Leadership Forum
 
Direct to consumer advertising
Direct to consumer advertisingDirect to consumer advertising
Direct to consumer advertising
 
Pap form
Pap formPap form
Pap form
 
Tui Dissertation Defense Abbrv Hales (Linkedin)
Tui Dissertation Defense Abbrv   Hales (Linkedin)Tui Dissertation Defense Abbrv   Hales (Linkedin)
Tui Dissertation Defense Abbrv Hales (Linkedin)
 
Data Visualization ProjectThis assignment assumes that you’ve
Data Visualization ProjectThis assignment assumes that you’ve Data Visualization ProjectThis assignment assumes that you’ve
Data Visualization ProjectThis assignment assumes that you’ve
 
Press Ganey 2016-11 Ramos
Press Ganey 2016-11 RamosPress Ganey 2016-11 Ramos
Press Ganey 2016-11 Ramos
 
Fundamentals of Health Insurance Big Data Management: Master Patient Index De...
Fundamentals of Health Insurance Big Data Management: Master Patient Index De...Fundamentals of Health Insurance Big Data Management: Master Patient Index De...
Fundamentals of Health Insurance Big Data Management: Master Patient Index De...
 
Mediation safety - Third Lecture
Mediation safety - Third LectureMediation safety - Third Lecture
Mediation safety - Third Lecture
 
1500 EXAMPLE JONES
1500 EXAMPLE JONES1500 EXAMPLE JONES
1500 EXAMPLE JONES
 
Us Health System Ppt
Us Health System PptUs Health System Ppt
Us Health System Ppt
 
Claim Form.pdf
Claim Form.pdfClaim Form.pdf
Claim Form.pdf
 
Standing Operating Procedure Referrals Specialist (1)
Standing Operating Procedure Referrals Specialist (1)Standing Operating Procedure Referrals Specialist (1)
Standing Operating Procedure Referrals Specialist (1)
 
Chapter 5 prescriptions
Chapter 5 prescriptionsChapter 5 prescriptions
Chapter 5 prescriptions
 
Nursing Skills: Charting
Nursing Skills: ChartingNursing Skills: Charting
Nursing Skills: Charting
 
Study Planner Site Selector Master (Abridged) 070809
Study Planner  Site Selector Master (Abridged)   070809Study Planner  Site Selector Master (Abridged)   070809
Study Planner Site Selector Master (Abridged) 070809
 
Data base management system
Data base management system Data base management system
Data base management system
 
ERWIN SUAREZ20230323 CLIMBS LIFE.pdf
ERWIN SUAREZ20230323 CLIMBS LIFE.pdfERWIN SUAREZ20230323 CLIMBS LIFE.pdf
ERWIN SUAREZ20230323 CLIMBS LIFE.pdf
 

Plus de Duanrui Shi

AHAVA presentation
AHAVA presentationAHAVA presentation
AHAVA presentationDuanrui Shi
 
Computers in Business
Computers in BusinessComputers in Business
Computers in BusinessDuanrui Shi
 
[FBEC 2002] Marketing Report
[FBEC 2002] Marketing Report[FBEC 2002] Marketing Report
[FBEC 2002] Marketing ReportDuanrui Shi
 
[FBEC 2001] Chinese Investment in Africa Essay
[FBEC 2001] Chinese Investment in Africa Essay[FBEC 2001] Chinese Investment in Africa Essay
[FBEC 2001] Chinese Investment in Africa EssayDuanrui Shi
 
Gini index and income inequality
Gini index and income inequalityGini index and income inequality
Gini index and income inequalityDuanrui Shi
 

Plus de Duanrui Shi (7)

AHAVA presentation
AHAVA presentationAHAVA presentation
AHAVA presentation
 
Computers in Business
Computers in BusinessComputers in Business
Computers in Business
 
[FBEC 2002] Marketing Report
[FBEC 2002] Marketing Report[FBEC 2002] Marketing Report
[FBEC 2002] Marketing Report
 
[FBEC 2001] Chinese Investment in Africa Essay
[FBEC 2001] Chinese Investment in Africa Essay[FBEC 2001] Chinese Investment in Africa Essay
[FBEC 2001] Chinese Investment in Africa Essay
 
U capsule hotel
U capsule hotelU capsule hotel
U capsule hotel
 
Gini index and income inequality
Gini index and income inequalityGini index and income inequality
Gini index and income inequality
 
Team_Random
Team_RandomTeam_Random
Team_Random
 

Database Management_ Pharmacy Tracking System

  • 1. BYGB 7973, FALL2016, DATABASE MANAGEMENT Project Phase 3 Instructor: Dr. W. RP Raghupathi Sam Wilson: Qianxia Zhu, Hong Dai, Jian Jin, Duanrui Shi, Jianyu Pan
  • 2. P a g e | 1 1. Revised Entity-Relationship Model for Pharmacy Database System
  • 3. P a g e | 2 2. Assumptions of Entity-Relationship Model Note: Directions, Rx Drug Quantity, Rx Date Filled, Number of Refills, Number of Refills Remaining, Rx Total Price and Rx Drug Price are descriptive attributes that describe the relationship between Drug and Prescription.
  • 4. P a g e | 3 3. Data Dictionary of Entity Relationship Diagram for Pharmacy Database System Entity Attributes Data type Length Primary Key Physician Physician ID Physician Name Physician Street Physician City Physician Zipcode Physician State CHAR CHAR CHAR CHAR CHAR CHAR 20 20 20 20 20 20 √ Patient Patient ID Patient Name Patient Street Patient City Patient Zipcode Patient State Patient Date of Birth Patient Family Member Name CHAR CHAR CHAR CHAR CHAR CHAR DATE CHAR 20 20 20 20 20 20 Default 20 √ Prescription Rx ID Rx Original Date Number of Refills Rx Drug Quantity D Rx Date Filled D Number of Refills Remaining D Rx total Price D CHAR DATE NUMERIC NUMERIC DATE NUMERIC NUMERIC 20 Default 5 5 Default 5 5 √ Insurance Claim Insurance Claim Number Insurance Claim Date Insurance Company Policy no. Insurance Company Name Amount Paid Insured Name CHAR DATE CHAR CHAR NUMERIC CHAR 20 Default 20 20 5 20 √
  • 5. P a g e | 4 Relationship to insured person CHAR 5 Drug Drug ID Drug Name Drug Form Drug Strength Drug Price Quantity on Hand Quantity on Order Quantity on Order Date Unit Cost Controlled Substance Notation Recorder Point Directions D CHAR CHAR CHAR CHAR NUMERIC NUMERIC NUMERIC DATE NUMERIC CHAR NUMERIC CHAR 20 20 20 5 5 5 5 Default 5 20 5 20 √ Payment Payment Number Payment Date Payment Type Amount Due CHAR DATE CHAR NUMERIC 20 Default 20 5 √ Supplier Supplier Name Supplier Street Supplier City Supplier Zipcode Supplier State CHAR CHAR CHAR CHAR CHAR 20 20 20 20 20 √
  • 6. P a g e | 5 4. Default Physical Data Model for Pharmacy Database System
  • 7. P a g e | 6 5. Revised Physical Data Model for Pharmacy Database System
  • 8. P a g e | 7 6. Normalized Physical Data Model for Pharmacy Database System
  • 9. P a g e | 8 7. Assumptions for Normalized Physical Data Model a) PatientFamilyMemberName is a repeating group that should be included in primary key. b) PatientName, PatientStreet, PatientCity, PatientZipcode, PatientState and PatientDateofBirth depend only on PatientID. c) PaymentType is a repeating group which should be included in primary key. d) PaymentDate depends only on PaymentNumber. e) AmountPaid depends only on PaymentType. f) Amount Due should be deleted from table because it could be calculated. a. Amount Due = (Rx-total-price) – (Amount Paid) g) Insurance policy number depends on Insurance Company Name. h) Insurance policy number is a repeating group that should be included in primary key. i) Rx-total-price should be deleted from table because it could be calculated. a. Rx-total-price = ∑ (𝑅𝑥𝐷𝑟𝑢𝑔𝑄𝑢𝑎𝑛𝑡𝑖𝑡𝑦 ∗ 𝑅𝑥𝐷𝑟𝑢𝑔𝑃𝑟𝑖𝑐𝑒) j) NumberofRefillsRemaining should be deleted from table because it could be calculated. a. NumberofRefillsRemaining = NumberofRefills – Count(RxDatefilled)
  • 10. P a g e | 9 10. Tables with Data 1. Drug DRUG ID DRUGNA ME DRUGFO RM DRUGSTREN GTH QUANTITYON HAND QUANTITYONO RDER 1 Tylenol Tablets 8 50 65 2 Alka Capsules 15 35 70 3 Pepto Elixirs 6 45 85 QUANTITYONOR DERDATE UNITCO ST CONTROLLEDSUBSTAN CENOTATION REODERP OINT SUPPLIER NAME 10/22/2012 5 Yes 30 CVS 6/1/2013 6 No 50 DR 9/1/2015 7 Yes 45 PHA 2. Insurance Company INSURANCECOMPANYNAME INSURANCEPOLICYNUMBER Aetna 67851 Emblem 35627 United 56786
  • 11. P a g e | 10 3. Insurance Claim INSURANCE CLAIMNUM BER INSURAN CECLAIM DATE INSUR EDNA ME RELATIONSHI PTOINSUREDP ERSON INSURANCE COMPANYN AME INSURANCE POLICYNU MBER x2635 3/3/2015 John Father Emblem 35627 x5263 4/3/2015 Charlot te Mother United 56786 x1736 12/6/2015 Emma Daughter United 56786 4. Patient PATIE NTID PATIEN TNAME PATIENTDAT EOFBIRTH PATIENT STREET PATIEN TCITY PATIENTZ IPCODE PATIENT STATE 1 Tom 2/1/1985 10 St Chico 95928 CA 2 Kerry 4/22/1987 34 Ave Chico 95938 CA 3 Chen 3/1/1986 43 Lane Fremont 96928 CA 4 Harry Potter 3/4/1988 4 way Fremont 91928 CA 5. Patient Family Member Name PATIENTID PATIENTFAMILYMEMBERNAME 1 Tommy 2 Kerryae 4 Helen 6. Payment PAYMENTNUMBER INSURANCECLAIMNUMBER PAYMENTTYPE 267398 x2635 CASH 837640 x5263 CREDIT 984620 x1736 DEBIT
  • 12. P a g e | 11 7. Payment Number PAYMENTNUMBER PAYMENTDATE 267398 12/24/2013 837640 11/22/2011 984620 3/12/2008 8. Payment Type PAYMENTTYPE AMOUNTPAID CASH 893 CREDIT 666 DEBIT 897 9. Physician PHYSICI ANID PHYSICIAN NAME PHYSICIANS TREET PHYSICIA NCITY PHYSICIANZI PCODE PHYSICIAN STATE a2487 Thomas Smith 62st New York City 10011 New York a7334 Paul Frank 55st Jersey 7094 New Jersey a1819 Chery Mark 50st Secaucus 7095 New Jersey 10. Prescription RX ID RXORIGIN ALDATE PHYSIC IANID PATIE NTID PAYMENTN UMBER PAYMEN TTYPE PATIENTFAMILYM EMBERNAME b24 87 3/27/2015 a2487 1 267398 CASH Tommy b73 34 4/13/2015 a7334 2 837640 CREDIT Kerryae b18 19 2/15/2015 a1819 4 984620 DEBIT Helen
  • 13. P a g e | 12 11. Prescription_x_Drug R XI D DR UGI D DIREC TIONS D RXDRU GPRICE D RXDATE FILLED D RXDRUGQ UANTITY D NUMBERO FREFILLS D NUMBEROFREFI LLSREMAINING D b2 48 7 1 Three times a day 5 11/11/201 2 55 10 5 b7 33 4 2 Every eight hours 6 10/31/201 0 65 15 8 b1 81 9 3 Two times a day 7 6/22/2013 45 10 8 12. Supplier SUPPLIERNA ME SUPPLIERSTR EET SUPPLIERCI TY SUPPLIERZIPC ODE SUPPLIERSTA TE CVS 66st New York 10017 New York DR 53st Jersey 7084 New Jersey PHA 73st Atlantic 9033 New Jersey
  • 14. P a g e | 13 11. The 10 Queries i. English version: #List Drug Name, Drug Forms, Number of Refilled, Supplier City. Select drug.drugname,drug.drugform,prescription_x_drug.NUMBEROFREFILLSD, supplier.su ppliercity From prescription, drug, supplier,prescription_x_drug Where supplier.suppliername=drug.suppliername And prescription.rxid=prescription_x_drug.rxid and prescription_x_drug.drugid=drug.drugid DRUGNAME DRUGFORM NUMBEROFREFILLSD SUPPLIERCITY Tylenol Tablets 10 New York Alka Capsules 15 Jersey Pepto Elixirs 10 Atlantic ii. English version: #List payment number, Insurance Claim Date, Insurance Company Name and Relationship to Insured Person. Select payment.paymentnumber,insuranceclaimdate,INSURANCECOMPANYNAME, RELATI ONSHIPTOINSUREDPERSON from prescription, insurance_claim,payment
  • 15. P a g e | 14 Where payment.paymentnumber=prescription.paymentnumber and insurance_claim.insuranceclaimnumber= payment.insuranceclaimnumber PAYMENTN UMBER INSURANCECLA IMDATE INSURANCECOMP ANYNAME RELATIONSHIPTOINSU REDPERSON 267398 3/3/2015 Emblem Father 837640 4/3/2015 United Mother 984620 12/6/2015 United Daughter iii. English version: #List Drug Name, Drug Forms, Rx Original Date, Payment Number. Select drug.drugname,drug.drugform,prescription.RXORIGINALDATE,payment.paymentnumb er From prescription, drug, payment,PRESCRIPTION_X_DRUG Where payment.paymentnumber=prescription.paymentnumber And prescription.rxid = PRESCRIPTION_X_DRUG.rxid and PRESCRIPTION_X_DRUG.drugid=drug.drugid DRUGNAME DRUGFORM RXORIGINALDATE PAYMENTNUMBER Tylenol Tablets 3/27/2015 267398 Alka Capsules 4/13/2015 837640 Pepto Elixirs 2/15/2015 984620
  • 16. P a g e | 15 iv. English version: #List Drug Name, Drug Form, Number of Refilled, Supplier city. Select drugname,drugform,PRESCRIPTION_X_DRUG.NUMBEROFREFILLSD,suppliercity From prescription, drug, supplier,PRESCRIPTION_X_DRUG Where supplier.suppliername=drug.suppliername And prescription.rxid=PRESCRIPTION_X_DRUG.rxid and PRESCRIPTION_X_DRUG.drugid=drug.drugid DRUGNAME DRUGFORM NUMBEROFREFILLSD SUPPLIERCITY Tylenol Tablets 10 New York Alka Capsules 15 Jersey Pepto Elixirs 10 Atlantic v. English version: #Calculate Rx Total Price of each Rx ID. Select PRESCRIPTION_X_DRUG.rxid, (rxdrugquantityd*rxdrugpriced) as rxtotalprice from PRESCRIPTION_X_DRUG vi. RXID RXTOTALPRICE B2487 275 B7334 390 B1819 315
  • 17. P a g e | 16 vi. English version: #List Patient ID, Rx Original Date, ordered by Patient ID. selectpatient.patientid, prescription.rxoriginaldate from patient, prescription where patient.patientid = prescription.patientid order by patient.patientid PATIENTID RXORIGINALDATE 1 3/27/2015 2 4/13/2015 4 2/15/2015 vii. English version: #List Number of Refills Used for each Rx ID. select prescription.rxid,(NUMBEROFREFILLSD - NUMBEROFREFILLSREMAININGD) as n umberofrefillsused from PRESCRIPTION_X_DRUG, prescription where PRESCRIPTION_X_DRUG.rxid =PRESCRIPTION.rxid RXID NUMBEROFREFILLSUSED b2487 5 b7334 7 b1819 2
  • 18. P a g e | 17 viii. English version: #List Patient Name, Patient City, Rx ID who was born befor 1986-01-01. selectpatientname,patientcity,prescription.rxid from patient,prescription where patient.patientid=prescription.patientid and patientdateofbirth< '1986-01-01' PATIENTNAME PATIENTCITY RXID Tom Chico b2487 ix. English version: #List Rx ID, Payment Number where Rx Original Date is later than 2014. selectprescription.rxid,payment.paymentnumber from prescription,payment where prescription.paymentnumber = payment.paymentnumber and year(prescription.rxoriginaldate)>2014 RXID PAYMENTNUMBER b2487 267398 b7334 837640 b1819 984620
  • 19. P a g e | 18 x. English version: #List PaymentType and count the number of each Paymenttype. selectpayment.paymenttype,count(prescription.rxid) as numbers_of_prescription from payment,prescription where prescription.paymentnumber = payment.paymentnumber group by payment.paymenttype PAYMENTTYPE NUMBERS_OF_PRESCRIPTION CASH 1 CREDIT 1 DEBIT 1