Sie sind auf Seite 1von 9

Ahsanullah University of Science & Technology

Department of Computer Science & Engineering


FALL 2019

Project Name
DocMate
Database Lab(CSE 3104)

Submitted By:
K.M. Azizullah Tanim 17.02.04.001
Rukaiya Fahmida 17.02.04.004
G. M. Rezwan Kabir Robin 17.02.04.027
Reason of Selection Project

We realized the necessity of organized work that is required by a doctor. So


we came up with an idea where a software can assist a bunch of doctors by providing them
required software facilities to get their work done easily and in an organized way. This
software will store the patient’s prescriptions and their data accordingly. If in future they
forget to bring any necessary documents, it could be found here easily.

Customers
Doctors

Project Requirement Analysis – High Level Story

There is an institution which has several doctors. When a patient visits to a


chamber for the first time they are registered by creating their profile with basic information
such as blood group, age, phone number and address and a unique ID. The doctor can access
the patient profile with the unique id. He writes a prescription for a patient which contains
observation and instruction. In the observation section there will be the diagnosis and the
condition of the patients. In the instruction section there will be the prescribed medicines
and their dosages, test recommended etc. This prescription will be added to the patient
profile which can be accessed with their ID later. There will be a data collection of medicines
distinguished by their medicine group which can be used by the doctors while prescribing
medicine for the patient.

Risk Analysis of Project

There are few risks and limitations of this project. There should be
uninterrupted power supply present. And there should also be a proper data backup system
otherwise there might be a risk of losing data. The doctors and their assistants should be
provided with working computers and they should have general computer skills.

Conclusion

We are trying to design an application that will be of benefit to both the


doctors and the patients by keeping their data organized and secure. Here we will also
include options such as printing prescriptions, collection of the previous prescriptions etc.
for betterment of the patient. There will be a data collection of medicine which will be of help
of the doctor while prescribing medicines. The design of the application will be kept simple
so that it will be easy to use. In short, this application will be beneficial both parties.

Page 1
Entity:
Doctor
Patients
Prescription
Medicine

Relationship:
Visits
Receives
Uses

Attributes:

Doctor – DoctorId, DoctorName, DoctorSex, DoctorEmail, DoctorPassword,


DoctorAbout

Patient – PatientId, DoctorId, PatientName, PatientDOB, PatientSex, PatientPhone,


PatientAddress, PatientEmail, PatientRegistrationDate, PatientComments

Prescription – PrescriptionId, PatientId, DoctorId, Symptoms, Diagnosis,


PrescriptionAdvice, VisitAfter, PrescriptionDate

Medicine – MedicineId, GenericId, ManufacturerId, BrandName,


Strength, DosageForm

Primary key:
Doctor – DoctorId
Patient – PatientId
Prescription – PrescriptionId
Medicine – MedicineId

Foreign key:
Patient – DoctorId
Prescription – PatientId

Page 2
Here after normalization we have 10 tables in our Database.

1. DOCTOR Table:
This table keeps information of the doctor. Here the primary key is the
DoctorId.

DoctorId DoctorName DoctorSex DoctorEmail DoctorEmail DoctorPassword DoctorAbout

(
DoctorId int IDENTITY(1,1) PRIMARY KEY,
DoctorName varchar(50) NOT NULL,
DoctorSex varchar(6) CHECK(DoctorSex IN('Male','Female',
'Other')),
DoctorEmail varchar(50) NOT NULL UNIQUE,
DoctorPhone varchar(20) NULL,
DoctorPassword varchar(50) NOT NULL,
DoctorAbout varchar(500) NULL
)

2. SPECIALIZATION Table:
This table keeps information of the Specialization of the doctor. Here the
primary key is the SpecializationId. Here DoctorId is a foreign key from DOCTOR.

SpecializationId DoctorId SpecializationField SpecializationInfo

(
SpecializationId int IDENTITY(1,1) PRIMARY KEY,
DoctorId int NOT NULL FOREIGN KEY REFERENCES
DOCTOR(DoctorId),
SpecializationField varchar(200) NOT NULL,
SpecializationInfo varchar(200) NOT NULL
)

Page 3
3. GENERIC MEDICINE Table:
This table contains the generic names of the drugs. Here GenericId is the primary
key.

GenericId GenericName TheraeuticClass Indication SideEffect

(
GenericId int IDENTITY(1,1) PRIMARY KEY,
GenericName varchar(50) NOT NULL,
TherapeuticClass varchar(50) NOT NULL,
Indication varchar(500),
SideEffect varchar(300)
)

4. MANUFACTURER Table:
This table contains the names of the Pharmaceutical Companies. Here
ManufacturerId is the primary key.

ManufacturerId ManufacturerName ManufacturerCountry

(
ManufacturerId int IDENTITY(1,1) PRIMARY KEY,
ManufacturerName varchar(50) NOT NULL,
ManufacturerCountry varchar (50) NULL

5. MEDICINE Table:
This table contains the names of the drugs by which they are marketed. Here
MedicineId is the primary key and GenericId and ManufacturerId are foreign keys
from the tables GENERIC and MANUFACTURER respectively.

Page 4
MedicineId GenericId ManufacturerId BrandName Strength DosageForm

(
MedicineId int IDENTITY(1,1) NOT NULL,
GenericId int NOT NULL FOREIGN KEY REFERENCES
GENERIC_MEDICINE (GenericId),
ManufacturerId int NOT NULL FOREIGN KEY REFERENCES
MANUFACTURER (ManufacturerId),
CONSTRAINT PK_MEDICINE PRIMARY KEY (MedicineId),
BrandName varchar(50) NOT NULL,
Strength varchar(50) NOT NULL,
DosageForm varchar(100),
)

6. PATIENT Table:
This table keeps the records of the patients. Here PatientId is the primary key.
And DoctorId is the foreign key

PatientId DoctorId PatientName PatientDOB PatientSex PatientPhone PatientAddress PatientEmail PatientRegistrationDate PatientComments

(
PatientId int IDENTITY(202009,1) PRIMARY KEY,
DoctorId int NOT NULL FOREIGN KEY REFERENCES
DOCTOR(DoctorId),
PatientName varchar(50) NOT NULL,
PatientDOB date NOT NULL,
PatientSex varchar(6) NOT NULL CHECK(PatientSex IN('Male',
'Female', 'Other')),
PatientPhone varchar(20) NULL,
PatientAddress varchar(200) NULL,
PatientEmail varchar(50) NULL,
PatientRegistrationDate date NULL,
PatientComments varchar(5000) NULL,
)

Page 5
7. PRESCRIPTION Table:
This table contains the Prescriptions issued to the patients. Here
PrescriptionId is the primary key and PatientId and DoctorID are the foreign keys
from the table PATIENT.

PrescriptionId PatientId DoctorId Symptoms Diagnosis PrescriptionAdvice VisitAfter PrescriptionDate

(
PrescriptionId int IDENTITY(1,1) NOT NULL,
PatientId int NOT NULL FOREIGN KEY REFERENCES PATIENT
(PatientId),
DoctorId int NOT NULL FOREIGN KEY REFERENCES
DOCTOR(DoctorId),
Symptoms varchar(500) NULL,
PrescribedTest varchar(500),
Diagnosis varchar(500) NULL,
PrescriptionAdvice varchar(500),
VisitAfter varchar (300),
Observation varchar (300),
PrescriptionDate date NULL
CONSTRAINT PK_PRESCRIPTION PRIMARY KEY (PrescriptionId)
)

8. PATIENTMEDICINE Table:
This table contains the records of Drugs Prescribed to the patients and their
dosage. Here the primary key is a composite key of MedicineId and PrescriptionId.

PrescriptionId MedicineId DrugDosages DrugDuration DrugAdvice

Page 6
(
PrescriptionId int NOT NULL,
MedicineId int NOT NULL,
CONSTRAINT PK_PAITENT_MEDICINE PRIMARY KEY (
PrescriptionId, MedicineId),
DrugDosages varchar(50) NOT NULL,
DrugDuration varchar(50),
DrugAdvice varchar(100),
)

9. VISIT Table:
Visit Table records the data of each visit of the patient with the doctor.
Here the primary key is VisitId and foreign keys are PatientId and DoctorId.

VisitId DoctorId PatientId VisitDate

(
VisitId int IDENTITY(1,1) PRIMARY KEY,
DoctorId int NOT NULL FOREIGN KEY REFERENCES
DOCTOR(DoctorId),
PatientId int NOT NULL FOREIGN KEY REFERENCES
PATIENT(PatientId),
VisitDate date NOT NULL
)

10. RECEIVES Table:


This table keeps track of the patient receiving their prescription.

ReceivesId PrescriptionId PatientId

Page 7
(
ReceivesId int IDENTITY(1,1) PRIMARY KEY,
PrescriptionId int NOT NULL,
CONSTRAINT FK_RECEIVES_PRESCRIPTION FOREIGN KEY
(PrescriptionId) REFERENCES PRESCRIPTION(PrescriptionId),
PatientId int NOT NULL FOREIGN KEY REFERENCES
PATIENT(PatientId)
)

Entity Relationship Diagram:

Page 8

Das könnte Ihnen auch gefallen