Top Banner
GRADUATE SCHOOL OF BUSINESS INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD PROJECT ON DATA BASE MANAGEMENT PREPARED BY: AAMIR HAYAT & CLASS MATES STUDENTS OF INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD
39

Dbms Project

Nov 14, 2014

Download

Documents

Aamir Hayat
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Dbms Project

GRADUATE SCHOOL OF BUSINESS

INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD

PROJECT ON DATA BASE MANAGEMENT

PREPARED BY:

AAMIR HAYAT& CLASS MATES

STUDENTS OF INTERNATIONAL ISLAMIC UNIVERSITY ISLAMABAD

Page 2: Dbms Project

DATABASE OF SUNNY TRUST, PAKISTAN.

Database Management System.

Department of Management Sciences,

International Islamic University, Islamabad.

1

Page 3: Dbms Project

Contents:

Chapter Page No. Chapter 1:

Introduction:1.1 Introduction to Organization: 31.2 Locations: 41.3 Departments: 41.4 Entity Classes: 51.5 Enterprise Data Model: 6

1.5.1 BASIC ERD. 61.5.2 PLANNING MATRIX: 7

Chapter 2:Existing System:

2.1 Existing System: 82.1.1 Components Of Existing System: 82.1.2 Drawbacks: 8

Chapter 3:Proposed System:

3.1 Proposed System: 9Chapter 4:

Design:4.1 System Design: 10

4.1.1 Organizational Chart Of Hospital: 104.1.2 Business Functions: 11

4.1.2.1 Hospital Management. 114.1.3 Data Flow Diagram: 11

4.2 Database Design: (Conceptual Data Model) 124.2.1 Entities: 124.2.2 Attributes: 124.2.3 Keys: 124.2.4 Relationships 134.2.5 Cardinalities 134.2.6 Business Rules 13

4.2.6.1 Entity Integrity 134.2.6.2 Domain 134.2.6.3 Triggering Operations 14

4.3 Logical Data Model: 154.3.1 Representing Entities 154.3.2 Representing Relationship 154.3.3 Data Dictionary 184.3.4 Normalization 19

Chapter 5:Implementation. 20

2

Page 4: Dbms Project

Appendix A: 22Detailed ERD.

Appendix B: 24Data Flow Diagram.

Appendix C: 26Screen Shots.

Appendix D: 32Reports Printouts.

3

Page 5: Dbms Project

CHAPTER 1

INTRODUCTION:

1.1 INTRODUCTION TO ORGANIZATION:

The prevailing drug abuse problem in Pakistan is of colossal magnitude (estimated 4.3 million addicts), very complex and varied. It was dramatized in the early 1980s with the explosive spread of heroin culture among all social classes, particularly the urban youth. The nature of problem has evolved with changing supply-demand and availability of new types of drugs. Nonetheless, drug abuse remains widespread and socially destructive since past twenty years. A single addict usually affects lives of 15-25 extended family members, besides society at large. Given ineffective enforcement measures, hence assured supply of various Norco-drugs, drug abuse will tragically persist for the third decade into the 21st century.

The prevailing drug abuse problem in Pakistan is not only colossal in magnitude (estimated over 4 million addicts) but very complex, varied and changing in nature. It was dramatized in the early 1980's with the rapid spread of primarily heroin culture among practically all the social classes including, notably, the student community and the urban youth.

The treatment and rehabilitation facilities for drug addicts in Pakistan remain inadequate and mostly unsatisfactory. Thus high relapse rates often promote the cynical view that drug addiction is incurable. Yet Sunny Trust Pakistan (Regd.)/Addiction Treatment Centre stands out as a unique experiment in the effective curing of drug addiction based on homeopathic medication and a comprehensive system of self-discipline, spiritual training and socio-psychological rehabilitation.

Founder Sunny Trust Pakistan Dr. Munawar Fiaz Sunny and his dedicated team combine a decade long experience in curing over 4000 drug addicts (including patients from foreign countries), based on the Sunny methodology. The process of their cure involves reclaiming the addicts from the stranglehold of drugs and then systematically harnessing of their inherent God-given attributes, towards a positively transformed life. As Dr. Sunny has painstakingly demonstrated, drug addiction is a convincingly curable condition with selective homeopathic medicinal interventions as part of a more comprehensive healing process of the body, mind and soul.

4

Page 6: Dbms Project

1.2 LOCATIONS:

1.2.1 ISLAMABAD OFFICE MURREE ROAD, BARA KAHU ISLAMABAD.

The 50 bed Islamabad Centre, established in 1995, remains operative to full capacity. It provides an open, clean and healthy environment for drug abuse treatment and rehabilitation.

1.2.2 FAISALABAD OFFICE MAIN BAZAR, LIAQAT TOWN.

.The 30-bed Sunny Trust Faisalabad facility, established in March 1992, is presently under reorganization.

1.3 DEPARTMENTS:

1.3.1 PATIENT MANAGEMENT:

This department manages the admissions, stay, and discharge of patients in the hospital.

1.3.2 CLINICAL SERVICES:

This department is responsible for all the extra services provided to the patients such as pharmacy, X-Rays, Ultrasounds and psychiatric tests.

ACCOUNTS AND FINANCIAL MANAGEMENT:

This department manages the finances and accounts. It deals with all the cash, receipts, payments etc.

INVENTORY MANAGEMENT:

This department contains all aspects about inventory such as medicines, equipments, furniture etc.

PAYROLL MANAGEMENT:

it deals with the payment of salary of the entire staff of the hospital.

5

Page 7: Dbms Project

1.4 ENTITY CLASSES:

1. PATIENT.2. EMPLOYEE.

2.1. DOCTOR.2.2. NURSE.2.3. ACCOUNTANT.2.4. PURCHASER.2.5. DAILY WAGES.

3. BILL.4. MEDICINE.5. VENDOR.6. PATIENT HISTORY.

6

Page 8: Dbms Project

1.5 ENTERPRISE DATA MODEL:1.5.1 BASIC ERD.

FIG. 2 BASIC ERD OF SUNNY TRUST, PAKISTAN.

7

Page 9: Dbms Project

1.5.2 PLANNING MATRIX:

HOSPITAL MANAGE-MENT.

PATIENT

DOCTOR

NURSE

CLERCK

MEDICINE

VENDOR

PURCHASER

BILL

P

HISTORY

LAB

TEST

PATIENT REGISTRATION

PATIENT STAY.

PATIENT DISCHARG.

PHARMACY.

PATIENT TREATING.

PATIENT MONITORING.

GENERAL ACCOUNTING.

BILL PATIENT.

INVENTORY MANAGEMENT.

SALARY PAYMENT.

FIG. 3 PLANNING MATRIX OF SUNNY TRUST, PAKISTAN.

8

Page 10: Dbms Project

CHAPTER 2

EXISTING SYSTEM:

2.1 EXISTING SYSTEM:

The existing system of Sunny Trust, Pakistan is maintained manually on registers. This system contains all information about patients, clinical services, accounts management, inventory management and payroll system.

2.1.1 COMPONENTS OF EXISTING SYSTEM:

Registration of Patients. Patient Fee.

Staff Record.

Payments.

Purchases.

Medicine.

Vendor Information.

2.1.2 DRAWBACKS:

Low Efficiency.

Low Security.

Redundancy.

Inconsistency.

More Chances of Errors.

Loss of Time.

Wastage of Storage.

9

Page 11: Dbms Project

Low Sharing.

CHAPTER 3

PROPOSED SYSTEM:

3.1 PROPOSED SYSTEM:

The system we are going to create will be computerized. All data will be saved in computer files. It is hoped that the proposed system will provide fast, accurate and automated data collection to all the departments. Some general features of the proposed system are as follows:

Efficiency. Controlled Redundancy.

Error Free.

Accuracy.

Flexibility.

User Friendly.

Consistency.

Full Sharing of Data.

Controlled Security.

10

Page 12: Dbms Project

CHAPTER 4

DESIGN:

4.1 SYSTEM DESIGN:

4.1.1 ORGANIZATIONAL CHART OF HOSPITAL:

11

Page 13: Dbms Project

FIG. 1 ORGANIZATIONAL CHART OF SUNNY TRUST, PAKISTAN.

4.1.2 BUSINESS FUNCTIONS:

4.1.2.1HOSPITAL MANAGEMENT.

4.1.2.1.1 PATIENT MANAGEMENT.4.1.2.1.1.1 PATIENT REGISTRATION.4.1.2.1.1.2 PATIENT STAY.4.1.2.1.1.3 PATIENT DISCHARG.

4.1.2.1.2 CLINICAL SERVICES.4.1.2.1.2.1 PHARMACY.

12

Page 14: Dbms Project

4.1.2.1.2.2 PATIENT TREATING.4.1.2.1.2.3 PATIENT MONITORING.

4.1.2.1.3 ACCOUNTS AND FINANCE.4.1.2.1.3.1 BILL PATIENT.4.1.2.1.3.2 GENERAL ACCOUNTING.

4.1.3 DATA FLOW DIAGRAM:

Please consult Appendix B Page No.

4.2 DATABSE DESIGN: (CONCEPTUAL DATA MODEL)

The conceptual data model prepared for the project has the following features.

4.2.1 ENTITIES:

We have the following entities in our project:PATIENT, P HISTORY, BILL, MEDICINE, VENDOR, EMPLOYEE, DOCTOR, NURSE, VENDOR, ACCOUNTANT, DAILY WAGES, PURCHASER

13

Page 15: Dbms Project

4.2.2 ATTRIBUTES:

Following are the attributes of the entities:

1. PATIENT (P No, P Name, P Add, P Phone, P Relative)2. P HISTORY (P No, D. O. Add, D. O. Leaving, Room No, Disease)3. BILL (B No, Amount, Description)4. TEST (T ID, T Name)5. MEDICINE (M No, M Name)6. VENDOR (V No, V Name, V Add)7. EMPLOYEE (E No, E Name, E Type)

a. DOCTOR (E No, Salary, Specialization, D. O. Joining, Timing)

b. NURSE (E No, Salary, Timing, D. O. Joining)c. PURCHASER (E No, Salary)d. DAILY WAGES (E No, Rate)e. ACCOUNTANT (E No, Salary, D. O. Joining)

4.2.3 KEYS:

ENTITIES PRIMARY KEYS

PATIENT P NoP HISTORY P No, D. O. AddBILL B NoTEST T IDMEDICINE M NoVENDOR V NoEMPLOYEE E NoDOCTOR E NoNURSE E NoPURCHASER E NoDAILY WAGES E NoACCOUNTANT E No

4.2.4 RELATIONSHIPS

PATIENT has a relationship with P HISTORY, BILL, TEST, MEDICINE, DOCTOR.

14

Page 16: Dbms Project

P HISTORY has a relationship with the PATIENT. BILL has a relationship with PATIENT. TEST has a relationship with PATIENT. MEDICINE have a relationship with VENDOR. EMPLOYEE provides services.

o DOCTORo NURSE o PURCHASERo DAILY WAGES.o ACCOUNTANT

4.2.5 CARDINALITIES

One PATIENT can has only one BILL,DOCTOR and one PATIENT can has one or more P HISTORY as well as one PATIENT can has no or more TEST, MEDICINE.

There can be one or more P HISTORY against a PATEINT. One BILL can have no or more PATIENTS and one PATIENT can have only

and only one type of BILL TEST has a zero to many relationship with the PATIENT and PATEINT has

also zero to many relationship with TEST. MEDICINE has a zero to many relationship with the VENDOR and

VENDOR has also zero to many relationship with MEDICINE.

4.2.6 BUSINESS RULES

4.2.6.1 ENTITY INTEGRITY

Each entity has a separate primary key satisfying the entity integrity.

4.2.6.2 DOMAIN

PATIENT Patient has only one type and they are Resident Patient.BILL Three types of bill. Rich bill, middle bill and poor bill.EMPLOYEE doctor, nurse, purchaser, daily wages, accountant.

4.2.6.3 TRIGGERING OPERATIONS

User Rule Time of arrival must be before departure.

15

Page 17: Dbms Project

Event Departure of PATIENT.Entity PATIENT.Event Prepare bill.Entity BILL.Conditions If Arrival is after Departure.Action Reject.

4.3 LOGICAL DATA MODEL:

4.3.1 REPRESENTING ENTITIES

1. PATIENT (P No, P Name, P Add, P Phone, P Relative)2. P HISTORY (P No, D. O. Add, D. O. Leaving, Room No, Disease)3. BILL (B No, Amount, Description)4. TEST (T ID, T Name)

16

Page 18: Dbms Project

5. MEDICINE (M No, M Name)6. VENDOR (V No, V Name, V Add)7. EMPLOYEE (E No, E Name, E Type)

f. DOCTOR (E No, Salary, Specialization, D. O. Joining, Timing)

g. NURSE (E No, Salary, Timing, D. O. Joining)h. PURCHASER (E No, Salary)i. DAILY WAGES (E No, Rate)j. ACCOUNTANT (E No, Salary, D. O. Joining)

4.3.2 REPRESENTING RELATIONSHIP

Relationship Between PATIENT and BILL:

PATIENTP No P Name P Add P Phone P Relative

BILLB No Amount Description

PAYMENTP No B No Amount

Relationship Between PATIENT and TEST:

PATIENTP No P Name P Add P Phone P Relative

17

Page 19: Dbms Project

TESTT ID T Name

RESULTP No T No Date Result

Relationship Between PATIENT, DOCTOR and MEDICINE:

PATIENTP No P Name P Add P Phone P Relative

MEDICINEM No M Name

MEDICATIONP No M No D. O. Starting D. O. Ending E No

Relationship Between VENDOR and MEDICINE:

VENDORV No V Name V Add

18

Page 20: Dbms Project

MEDICINEM No M Name

SUPPLYV No M No Date Quantity

4.3.3 DATA DICTIONARY

Entity AttributesData Type

WidthPrimary

KeyUnique Format

PATIENT P No. Number 5 Y Y NNNNNPATIENT P Name Text 20 N N

19

Page 21: Dbms Project

PATIENT P Add Text 50 N NPATIENT P Phone Text 15 N NPATIENT P Relative Text 20 N N

P HISTORY P No. Number 5 Y Y NNNNN

P HISTORY D. O. Add Date/Time 10 N Ndd-mm-

yy

P HISTORYD. O.

LeavingDate/Time 10 N N

dd-mm-yy

P HISTORY Room No. Number 2 N N NNP HISTORY Disease Text 50 N N

BILL B. No Number 5 Y Y NNNNNBILL Amount Number 10 N NBILL Description Text 50 N N

TEST T ID Number 5 Y Y NNNNNTEST T Name Text 20 N N

MEDICINE M No. Number 10 Y Y NNNNNMEDICINE M Name Text 15 N N

VENDOR V No. Number 10 Y Y NNNNNVENDOR V Name Text 20 N NVENDOR V Add Text 50 N N

EMPLOYEE E No. Text 5 Y Y NNN-XEMPLOYEE E Name Text 20 N NEMPLOYEE E Type Text 10 N N

DOCTOR E No Text 10 Y Y NNN-XDOCTOR Salary Number 5 N N NNNNDOCTOR Specialization Text 20 N N

DOCTOR D. O. Joining Date/Time 10 N Ndd-mm-

yy

DOCTOR Timing Date/Time 10 N Nhh-mm-

ss

NURSE E No. Text 10 Y Y NNN-XNURSE Salary Number 5 N N

NURSE Timing Date/Time 10 N Nhh-mm-

ss

NURSE D. O. Joining Data/Time 10 N Ndd-mm-

yy

20

Page 22: Dbms Project

PURCHASER E. No. Text 10 Y Y NNN-XPURCHASER Salary Number 5 N N

DAILY WAGES E No. Text 10 Y Y NNN-XDAILY WAGES Rate Number 5 N N

ACCOUNTATNT E No. Text 10 Y Y NNN-XACCOUNTATNT Salary Number 5 N N

ACCOUNTATNT D. O. Joining Date/Time 10 N Ndd-mm-

yy

4.3.4 NORMALIZATION

1NFAll the tables are already in 1NF as:

There were repeating groups in PATIENT table TEST and BILL. There are no Multi-valued attributes.

2NFAll the tables are already in 2NF as :

There is no Partial Functional Dependency in any table. There are composite primary keys in Patient History , Result ,

Payment , Medication , Supply. In these tables no non-key attribute depends on a part of composite

Primary key.

3NFAll the tables are already in 3NF as :

There is no Transitive Dependency in any table. No two Non-key attributes depends on each other but on primary

keys.

CHAPTER 5

IMPLIMENTATION:

21

Page 23: Dbms Project

We implemented this software using the MS Access tool. The soft copy of the software has been attached.

22

Page 24: Dbms Project

APPENDIX A

23

Page 25: Dbms Project

24

Page 26: Dbms Project

APPENDIX B

Level Zero.

25

Page 27: Dbms Project

Level One

26

Page 28: Dbms Project

APPENDIX C

Screen Shots.

27

Page 29: Dbms Project

28

Page 30: Dbms Project

29

Page 31: Dbms Project

30

Page 32: Dbms Project

31

Page 33: Dbms Project

32

Page 34: Dbms Project

33