0% found this document useful (0 votes)
23 views

Fixed Dbms Project On Hospital Management

Uploaded by

catsbeingsillly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Fixed Dbms Project On Hospital Management

Uploaded by

catsbeingsillly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

dbms project on hospital management

Database Management Systems (DBMS) AAFT University of Media and Arts

23 pag.
Table of Contents

Abstract

In this project, we have to develop a database for Global hospital, Guntur. The main aim to
develop a database is to a store the details of the patient, doctors, staff working In the
hospital. It also stores the data of the people who are coming to the people and who is
consulting to which doctor based on their respective diseases and the patients who are
being admitted in the hospital. The patient details with their name, disease and no of days
admitted

, hospital bills, test bills(if any), medicines and their room rent. So we have to store the
details of the workers. A group of two or more doctors are assigned to each shift & one
specialized doctor is assigned to a shift so doctors should be available at anytime. The
equipment should be replaced with the advanced equipment that is available. First module
deals with Developing a DDL for creating the schema in the database, applicant registration
details, transaction scheduling and summary, applicant visit history, report on missing data,
transaction scheduling details etc. Second module deals with allotment details, scheduling,
summary, reprocessing facility, initiate daily process etc. Third module deals with
transaction scheduling details, report missing data reprocessing facility etc. we will create
schema for all that modules and INTegrate them to work properly…
Introduction

Database is an organized collection of data. The data is typically organized to model aspects
of reality in a way that supports processes requiring information. A DBMS makes it possible
for end users to create, read, update and DELETE data in a database. The DBMS essentially
serves as an INTerface between the database and end users or application programs,
ensuring that data is consistently organized and remains easily accessible. The DBMS
manages three important things: the data, the database engine that allows data to be
accessed, locked and modified and the database schema, which defines the database’s
logical structure. These three foundational elements help provide concurrency, security,
data INTegrity and uniform administration procedures. The DBMS can offer both logical and
physical data independence. That means it can protect users and applications from needing
to know where data is stored or having to be concerned about changes to the physical
structure of data.
The main purpose of maINTaining database for Global Hospitals is to reduce the manual
errors involved in knowing various details involved and make it convenient for the patients
and staff to maINTain the data about the doctors and about the details. Due to automation,
many loopholes that exist in the manual maINTenance of the records can be removed. The
speed of obtaining and processing the details will be fast. For future expansion, the
proposed system can be web enabled so that patients can make various enquiries. It takes a
lot of time and causes many errors while data entering. Due to this, sometimes a lot of
problems occur and they are

facing many disputes . To solve the above problem, we design a data base which includes
hospital details, availability of doctors.

PROJECT DESCRIPITION
This project deals with the storing of database of hospital of namely “GLOBAL HOSPITALS”.
This hospitals comprises of information regarding the details of doctors, staff and other
details.

It also handles with the data related to department such as department name, type. The
hospital consists of different types of rooms like general ward with multiple beds, economy
rooms with two beds and premium rooms with single occupancy. Each of these room types
have varied amenities like AC, TV etc.

The hospital maINTains a separate blood bank. The blood bank calls for blood donation
camps and maINTains the database of available stock of blood based on the blood group.
Various tests are performed on the donated blood and charges incurred for these tests are
recorded. The blood bank also maINTains the details of blood donors and various camps
organized for donation. The hospital wants the IT consultant to suggest them various data
requirements in relation to maINTaining the blood bank with futuristic requirements.

It also handles 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. Call on doctors are those doctors who are called by the hospital if
the concerned doctor is not available.

Thus, all these database of the hospital helps in retrieving the data regarding any issue in
the hospital with ease and less effort thus reducing the redundancy in maINTaining the data
and increasing the efficiency in accessing the database.

List of Entities & Attributes


ER Diagram (Conceptual Model)

SCHEMA DIAGRAM

DOCTOR :

IT CONSULTANT :

PATIENT :

BLOOD BANK :
ROOMS :

STAFF :

DEPARTMENT:

BLOOD STOCK :
ADMITTED :

BLOOD PACKET:

CREATE & INSERT SQL Queries

CREATE table blood_group( Bid INT PRIMARY KEY, Bcamp VARCHAR(30), Bdonors
VARCHAR(20), Location VARCHAR(30), Charges INT(11)

);

CREATE table blood_packet( Packet_id INT PRIMARY KEY, Blood_group VARCHAR(30),


Donor_name VARCHAR(30), Hosp_id INT(11)

);

CREATE table department ( dept_id INT(11) PRIMARY KEY , dept_name VARCHAR(50) ,

type VARCHAR(60)
);

CREATE table admitted( pid INT(11),

rid INT(11)

);

CREATE table doctor(

did INT(11) PRIMARY KEY, dname VARCHAR(30) , d_addr VARCHAR(50) , specialisation


VARCHAR(30) , phno bigINT(20),

dept_id INT(11)

);

CREATE table hospital( hosp_id INT(11) PRIMARY KEY, hosp_name VARCHAR(30), location
VARCHAR(30)

);
CREATE table it_cons( it_id INT(11),

itname VARCHAR(30), it_addr VARCHAR(30), itphno bigINT(12), bb_idINT(11)

);

CREATE table patient( pid INT(11) PRIMARY KEY, pname VARCHAR(40), paddress
VARCHAR(30), gender VARCHAR(30),

did INT, page INT

);

CREATE table rooms( rid INT (11),

pid INT(11),

type VARCHAR(50), floor VARCHAR(30)

);

CREATE table staff(


staff_id INT(11) PRIMARY KEY, stfadd VARCHAR(50),

sname VARCHAR(50), position VARCHAR(50), dept_id INT(11)

);

INSERT

INSERT INTo admitted values

(601 ,201),

(602,202 ),

( 603, 204);

INSERT INTo blood_group values

(1,’red_cross’, ‘Raghava’ ,’vijayawada’,500 ),


(2 ,‘youth_cross’,‘Naveen’,‘Guntur’,1000),

(3,’red_cross’,’ Manoj’,’ Vaddeswaram’,900),

(4,’Youth_cross’, ‘Mani’,‘tenali’,560);

INSERT INTo blood_packet values (1001,’A+’,’Nagesh’,1),

(1002,’O+’,’Naveen’,2),

(1003,’O-‘, ‘Manoj’,3),

(1004, ’AB+’, ‘Manish’,2),

(1005,‘AB-‘,‘Nagraj’,3);

INSERT INTo department values (101, ‘neurology’, ‘MICU’),

(102,’Nephrology ‘, ‘MICU’),

(103,’Nutrition and dietetics’, ‘ICU’);


INSERT INTo doctor values

(350,’Rani’, ‘vijayawada’, ‘Nuerologist’, 9384949303,101), (351, ‘ Naveen’, ‘vijayawada’,


‘Physician’, 9384949303,101), (352,‘Manoj’ , ‘Vizag’ ,‘Cardiologist’ , 9344223112,102), (353,
‘Himaja’, ‘Guntur’, ‘dermatologist’, 9897678562,103), (354,‘Satish’ ,‘Guntur’ ,
‘Cardiologist’ ,9123567462,102);

INSERT INTo hospital values (1, ‘global’, ‘guntur’),

(2, ‘global guntur’, ‘tenali’),

(3, ‘guntur_govt’, ‘guntur’),

(4, ‘Manipal’, ‘Vijayawada’),

(5, ‘multi_speciality’, ‘vijayawada’);


INSERT INTo it_cons values

(5641, ‘Naveen kumar’, ‘Vaddeswaram’, 976766, 2),

(6842, ‘Manoj’, ‘Guntur’, 234262, 1),

(6252,‘Himaja’ ,‘Vijayawada’ ,675171, 3),

(8764, ‘Rakesh’, ‘Vijayawada’, 234282, 4);

INSERT INTo patient values

(201, ‘Naveen’, ‘Guntur’, ‘M’, 352, 20),

(202, ‘Gaurav’, ‘Vijayawada’, ‘M’ ,351, 25 ),

(203, ‘Meghana’, ‘Tenali’, ‘F’, 353, 34),

(204, ‘Sonali’ , ‘Noida’, ‘F’, 350 ,65),

(205, ‘Sonu’, ‘Hyderabad’, ‘M’, 354, 45),

(206, ‘Sreenu’, ‘Hooghly’, ‘M’, 352, 65);

INSERT INTo rooms values

(601,201, ‘premium_room’ , ‘Ground’),

(602, 202, ‘economy room’, ‘first’),

(603,204,‘general ward’ , ‘second’);


INSERT INTo staff values

(10, ‘vijayawada’, ‘Rajesh’, ‘Senior_physician’, 101), (20,‘vijayawada’ ,‘Raghu’ ,


‘physician’ ,102),

(15, ‘vizag’, ‘Naveen’, ‘Nuerologist’, 103),

(25,‘vizag’ ,‘Manoj’ , ‘Nuerologist’ ,1);


SQL Queries related to Report Generation

Display all doctors name in the database?

Mysql>> SELECT distinct dname from doctor,patient where patient.did=doctor.did;

+ +

| dname |

+ +
| Manoj |

| Naveen |

| Himaja |

| Rani |

| Satish |

+ +

display doctor name whose id is 352 and who checked the patients?

SELECT dname from doctor,patient where patient.did=doctor.did and patient.did=352;

+ +

| dname |

+ +

| Manoj |

| Manoj |

+ +
Display hospital name who have donated their blood with hosp_id=2 or 3?

Mysql>>SELECT distinct hosp_name from hospital h,blood_packet b where h.hosp_id=2 or


h.hosp_id=1;

+ +

| hosp_name |

+ +

| global |

| global_guntur |

+ +

Display doctor name, specialisation and dept_name from the database?

SELECT dept_name,dname,specialisation from department,doctor where


doctor.dept_id=department.dept_id;

+ + + +
| dept_name | dname | specialisation |

+ + + +

| neurology | Rani | Nuerologist |

| neurology | Naveen | Physician |

| Nephrology | Manoj | Cardiologist |

| Nutrition and dietetics | Himaja | dermatologist |

| Nephrology | Satish | Cardiologist |

+ + + +

Display a command to show donor_name and the bloodgroup and group by blood group.

SELECT donor_name,blood_group from blood_packet order by blood_group;

+ + +

| donor_name | blood_group |
+ + +

| Nagesh | A+ |

| Manish | AB+ |

| Nagraj | AB- |

| Naveen | O+ |

| Manoj| O- |

+ + +

Display the patient name who is treated by doctor Naveen and admitted in economy room?

SELECT rid,pname,dname from patient,doctor,rooms where patient.did=doctor.did and


rooms.pid=patient.pid and type="economy room";

+ + + +

| rid | pname | dname |

+ + + +

| 602 | Gaurav | Naveen |

+ + + +
Display the names of doctor who belong to dept =102 and specialisation

=”cardiologist”?

SELECT did,dname,phno from doctor where dept_id=102 and specialisation="cardiologist";

+ + + +

| did | dname | phno |

+ + + +

| 352 | Manoj | 9344223112 |

| 354 | Satish | 9123567462 |

+ + + +

Display names of donors and it name whose checked the blood samples collected from
red_cross?

SELECT it_id,itname,bdonors from it_cons,blood_group where blood_group.bid=it_cons.bid


and bcamp="red_cross";

+ + + +

| it_id | itname | bdonors |


+ + + +

| 6842 | Manoj | Raghava |

| 6252 | Himaja | Manoj |

+ + + +

Display doctor name who belong to dept_id=102? SELECT dname from doctor where
dept_id=102;

+ +

| dname |

+ +

| Manoj |

| Satish |

+ +

display patient details who arrived for checkeup and age should be greater than 40?

SELECT pid,pname,paddress,gender from patient where page>40;


+ + + + +

| pid | pname | paddress | gender |

+ + + + +

| 204 | Sonali | Noida | F |

| 205 | Sonu | Hyderabad | M |

| 206 | Sreenu | Hooghly |M |

+ + + + +

Conclusion

Global hospital data base helps in maINTaining the records of the doctors, list of
departments that it is containing, staff associated with it and the patients coming to the
hospital, room details etc.

This helps in reducing the effort in retrieving or searching for a particular information .This
helps in increasing the efficiency in accessing the data in the hospital and helps in faster
access to the information.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy