You are on page 1of 16

INTRODUCTION

This is a medical management system, assisting user to administer a

huge data in clinic. In addition, another function is allowing doctor,


nurses and the administrative staff. On the client point of view, this
is a faster and easeful way to link to the healthcare service by using
the system.

Hospital Management System is specially designed for general


clinic, this system let them have a high efficiency management tools
, computerize and systematic patients record, detail of drug
information, this is the first achievements of the medical services
.
Hospital Management System provide on line appointment feature ,
which allow patients to make the appointment through Internet.
Furthermore, doctors can manage the clinic daily work by using
Hospital Management System.

SCOPE AND GOAL


The Scope of the project is to implement a complete database for video library management system..
The Software includes:
Maintaining patient details
Maintaining Doctor details
Providing Prescription, Precautions and Diet Advice.
Billing and Report Generation.

The Goal of the system are as follows:


Planned approach towards working: - The working in the organization will be well planned and
organized. The data will be stored properly in data stores, which will help in retrieval of information
as well as its storage.

Reliability: - The reliability of the proposed system will be high due to the above stated reasons. The
reason for the increased reliability of the system is that now there would be proper storage of
information.

No Redundancy: - In the proposed system at most care would be that no information is repeated
anywhere, in storage or otherwise. This would assure economic use of storage space and consistency
in the data stored.

Immediate retrieval of information: - The main objective of proposed system is to provide for a
quick and efficient retrieval of information

Requirement Specification
Modules

Sub-Modules

EMPLOYEE

DOCTOR
NURSE
ADMIN_STAFF

METTING
QUERY POLICY

PATIENT
DOCTOR
NURSE

TREATMENT:

NURSE
TEST
MEDICINE

ADMISSION

PATIENT
RECORD
WARD
ADMIN_STAFF

ENTITY-RELATIONSHIP DIAGRAM

ENTITY-RELATIONSHIP DIAGRAM

SCHEMA
Patient
P_ID, P_NAME ADDRESS, P_AGE, P_SEX
P_ID, DISEASE_NAME D_ID
D_ID D_SEX, EXP, D_CONTACT_NO.
EXP, QUALIFICATION D_SAL
D_CONTACT_NO. D_NAME
RECORD _NO. PID, P_CONTACT NO
RECORD:
PID, RECORD _NO. DATE_OF_ADM, DATE_OF_REL, D_ID
TREATMENT:
DISEASE_NAME TEST_REQUIRED, MED_REQUIRED
NURSING:
WARD_NAME BED CAPACITY
WARD_NO N_ID
N_ID N_NAME
N_NAME, CONTACT_NO. N_AGE, N_SAL

SCHEMA
MEDICINE:
MFG_DATE EXP_DATE
M_NAME M_DESCRIPTION
ADMIN STAFF:
S_ID, S_NAME S_SEX, S_SAL

SQL RELATIONAL DATABASE


1.PROCEDURE FOR ADDING A NEW PATIENT:
COMMAND:
CREATE OR REPLACE PROCEDURE PRO1(P_ID IN VARCHAR2, P_NAME
IN VARCHAR2, P_ADDRESS IN VARCHAR2, P_AGE IN NUMBER,
P_CONTACT_NO NUMBER, P_SEX VARCHAR2, DISEASE_NAME
VARCHAR2, D_ID VARCHAR2, RECORD_NO VARCHAR2)
AS
BEGIN
INSERT INTO PATIENT
VALUES(P_ID,P_NAME,P_ADDRESS,P_AGE,P_CONTACT_NO,P_SEX,DI
SEASE_NAME,D_ID,RECORD_NO);
END;

SQL RELATIONAL DATABASE


2. PROCEDURE FOR ADDING A NEW RECORD:
COMMAND:
CREATE OR REPLACE PROCEDURE PRO2( P_ID IN VARCHAR2 , RECORD_NO IN
VARCHAR2, D_ID IN VARCHAR2 , DATE_OF_ADM IN VARCHAR2, DATE_OF_REL IN
VARCHAR2)
AS
BEGIN
INSERT INTO RECORD VALUES ( P_ID,RECORD_NO , D_ID, DATE_OF_ADM,
DATE_OF_REL);
END;
3. PROCEDURE FOR ADDING A NEW MEDICINE:
COMMAND:
CREATE OR REPLACE PROCEDURE PRO3(M_NAME IN VARCHAR2 , M_DESCRIPTION IN
VARCHAR2 , MFG_DATE IN DATE , EXP_DATE IN DATE)
AS
BEGIN
INSERT INTO MEDICINE VALUES( M_NAME , M_DESCRIPTION ,
MFG_DATE,EXP_DATE);
END;

CURSOR AND BED_CAPACITY OF EACH


1.FETCH ALL WARD_NO.S,WARD_NAMES
WARD FROM WARD:
COMMAND:
DECLARE
CURSOR CUR_NEW1 IS
SELECT * FROM WARD;
NEW_REC CUR_NEW1 %ROWTYPE;
BEGIN
OPEN CUR_NEW1;
LOOP
FETCH CUR_NEW1 INTO NEW_REC;
EXIT WHEN CUR_NEW1 %NOTFOUND;
DBMS_OUTPUT.PUT_LINE('WARD NO= '|| NEW_REC.WARD_NO ||'
WARD NAME=
'||NEW_REC.WARD_NAME||' '||'
BED CAPACITY= '||
NEW_REC.BED_CAPACITY );
END LOOP;
CLOSE CUR_NEW1;
END;

CURSOR
Output

TRIGGER
1.TRIGGER ON TABLE ADMIN_STAFF FOR INSERT PURPOSE:
COMMAND:
CREATE OR REPLACE TRIGGER TRI1 BEFORE INSERT ON ADMIN_STAFF FOR
EACH ROW
BEGIN
INSERT INTO ADMIN_STAFF_BACK_UP VALUES( :NEW.S_ID , :
NEW.S_NAME , :
NEW. S_SEX , :NEW . S_SAL);
END;
2.TRIGGER ON TABLE NURSE FOR UPDATE PURPOSE:
COMMAND:
CREATE OR REPLACE TRIGGER TRI2 BEFORE UPDATE ON NURSE FOR EACH
ROW
BEGIN
INSERT INTO NURSE_BACK_UP VALUES( :OLD.N_ID , : OLD.N_NAME , :
OLD. N_CONTACT_NO , :OLD . N_AGE , :OLD . N_SAL);
END;

PACKAGE

1.CREATE A PACKAGE TO CHECK IF A PATIENT IS UNDER THE AGE


OF 15 OR NOT AND IF HE/SHE IS UNDER AGE OF 15 SEND
HIM/HER TO 2ND FLOOR OTHERWISE SEND TO 1ST FLOOR
COMMAND:
CREATE OR REPLACE PACKAGE BODY PC IS
AG NUMBER(3);
PROCEDURE PR(ID IN VARCHAR2) IS
BEGIN
SELECT P_AGE INTO AG FROM PATIENT WHERE P_ID=ID;
IF AG>15 THEN
DBMS_OUTPUT.PUT_LINE('TAKE TO GENERAL WARD IN 1ST FLOOR');
ELSE
DBMS_OUTPUT.PUT_LINE(' TAKE TO CHILDREN WARD IN 2ND
FLOOR');
END IF;
END PR;
END PC;

PACKAGE
Output

CONCLUSION
This project on hospital management system deals with the
computerization of the databases of a hospital in a hospital a
huge no. of data is being worked with like the data of a patient
doctor ,treatments etc. The project makes the storage of the
huge data in a easier way so that it becomes easier to manage
the entire administration.
The database management system that is developed can provide
details of a certain patient doctor or any other related things of
a hospital like medicine tests etc.
The system can also be used as a backend tool to develop further
softwares.

You might also like