You are on page 1of 12

Patient

Fields Data Type Relationships


Pid Varchar(5) Primary Key
name Varchar(20) Not Null

age int Not Null


weight int Not Null
gender Varchar(10) Not null
address Varchar(50) Not Null
phoneno int Not Null
disease Varchar(20) Not Null
doctorid Varchar(5) Not Null

Room tb
Fields Data Type Relationships
room_no Varchar(50) Primary Key
room_type Varchar(10) Not Null
status Varchar(10) Not Null
bill tb
Fields Data Type Relationships
bill_no Varchar(50) Primary Key
pid Varchar(5) Foreign Key
patient_type Varchar(10) Allow Null
doctor_charge int Not Null

medicine_charge int Not Null

room_charge int Not Null

oprtn_charge int Allow Null


no_of_days int Allow Null
nursing_charge int Allow Null
advance int Allow Null
health_card Varchar(50) Allow Null
lab_charge int Allow Null
bill int Not Null
Doctor
Inpatient
Fields Data Type Relationships Table:
Fields
doctorid Varchar(5) Primary Key pid
doctorname Varchar(15) Not Null room_no

dept Varchar(15) Not Null date_of_adm


Lab date_of_dis
Fields Data Type Relationships advance
labno Varchar(5) Primary Key labno
pid Varchar(5) Not Null
weight int Not Null Fields
doctorid Varchar(5) Foreign Key pid
date Date/Time Not Null date
category Varchar(15) Not Null labno
patient_type Varchar(15) Not Null
amount int Not Null
InPTIENT

Data Type Relationships


Varchar(5) Primary Key
Varchar(50) Not Null

Date/Time Not Null


Date/Time Not Null
int Not Null
Varchar(5) Foreign Key
OUT Ptient
Data Type Relationships
Varchar(5) Primary Key
Date/Time Not Null
Varchar(5) Foreign Key
inpatient outpatient
NAME TYPE CONSTRAINTS NAME
Mrdno Bigint Primary key Hno
Hno Bigint Not null Name
Name Varchar(100) Not null Age
Age Int Not null Addr
Addr Varchar(120) Not null Dob
Dob Datetime Not null Gender
Gender Varchar(20) Not null State
State Varchar(54) Not null District
District Varchar(100) Not null Concession
Concession Varchar(100) Not null Referal
Referal Varchar(100) Not null Date
Date of
Datetime Not null
admit
ambulance
NAME TYPE CONSTRAINTS NAME
Amno Int Primary key Mrdno
Type Varchar(50) Not null Hno
Designation Varchar(100) Not null Name
Stime Datetime Not null Department
Rtime Datetime Not null Wardno
Pdexp Int Not null Rtype
Stentry Bigint Not null Bno
Rtentry Bigint Not null Adt
Drivername Nchar(100) Not null Ddt
Driverno Bigint Not null
Num Nchar(50) Not nul

Fields
labno
pid
weight
doctorid
date
category
patient_type
amount
staf
TYPE CONSTRAINTS NAME TYPE
Bigint Primary key Idno Int
Varchar(100) Not null Name Varchar(50)
Int Not null Department Varchar(100)
Varchar(120) Not null Doj Datetime
Datetime Not null Gender Varchar(30)
Varchar(20) Not null Address Varchar(150)
Varchar(54) Not null Salary Int
Varchar(100) Not null Dtc Datetime
Varchar(100) Not null Reason Varchar(200)
Varchar(100) Not null Age Int
Datetime Not null Email Varchar(100)
Phone Varchar(90)
ward Cell Varchar(90)
TYPE CONSTRAINTS
Bigint Primary key bill tb
Bigint Not null Fields Data Type
Varchar(100) Not null bill_no Varchar(50)
Varchar(100) Not null pid Varchar(5)
Int Not null patient_type Varchar(10)
Varchar(100) Not null doctor_charge int
Int Not null medicine_charge int
Datetime Not null room_charge int
Datetime Not null oprtn_charge int
no_of_days int
nursing_charge int
Lab advance int
Data Type Relationships health_card Varchar(50)
Varchar(5) Primary Key lab_charge int
Varchar(5) Not Null bill int
int Not Null
Varchar(5) Foreign Key
Date/Time Not Null Patient
Varchar(15) Not Null
Varchar(15) Not Null Fields Data Type
int Not Null Pid Varchar(5)
name Varchar(20)
age int
gender Varchar(10)
address Varchar(50)
phoneno int
disease Varchar(20)
doctorid Varchar(5)
CONSTRAINTS
Primary key
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null

Relationships
Primary Key
Foreign Key
Allow Null
Not Null
Not Null
Not Null
Allow Null
Allow Null
Allow Null
Allow Null
Allow Null
Allow Null
Not Null
Relationships
Primary Key
Not Null
Not Null
Not null
Not Null
Not Null
Not Null
Not Null
inpatient

NAME TYPE CONSTRAINTS


outpatient
Pid Varchar(100) Primary key NAME
Name Varchar(100) Not null Pid
Age Int Not null Name
gender Varchar(10) Not null Age
Addr Varchar(120) Not null Addr
Dob Datetime Not null Dob
disease Varchar(20) Not Null Gender
phoneno int Not Null Date
Date of admit Datetime Not null

ward
NAME TYPE CONSTRAINTS
Bno Int Primary key
Name Varchar(100) Not null
Department Varchar(100) Not null
Wardno Int Not null
Rtype Varchar(100) Not null
Adt Datetime Not null
Ddt Datetime Not null

Lab
Fields Data Type Relationships
labno Varchar(5) Primary Key
pid Varchar(5) Not Null
weight int Not Null
doctorid Varchar(5) Foreign Key
date Date/Time Not Null
category Varchar(15) Not Null
patient_type Varchar(15) Not Null
amount int Not Null
doctor
TYPE CONSTRAINTS NAME TYPE
Varchar(100) Primary key doctorid Int
Varchar(100) Not null Name Varchar(50)
Int Not null Password Varchar(8)
Varchar(120) Not null Department Varchar(100)
Datetime Not null Doj Datetime
Varchar(20) Not null Gender Varchar(30)
Datetime Not null Address Varchar(150)
Salary Int
Dtc Datetime
Age Int
Email Varchar(100)
Phone Varchar(90)
Cell Varchar(90)

bill tb
Relationshi
Fields Data Type
ps
bill_no Varchar(50) Primary Key
pid Varchar(5) Foreign Key
patient_type Varchar(10) Allow Null
doctor_charge int Not Null
medicine_charge int Not Null Fields
room_charge int Not Null Pid
oprtn_charge int Allow Null name
no_of_days int Allow Null age
advance int Allow Null gender
health_card Varchar(50) Allow Null address
lab_charge int Allow Null phoneno
bill int Not Null disease
doctorid
CONSTRAINTS
Primary key
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null

Patient

Data Type Relationships


Varchar(5) Primary Key
Varchar(20) Not Null
int Not Null
Varchar(10) Not null
Varchar(50) Not Null
int Not Null
Varchar(20) Not Null
Varchar(5) Not Null

You might also like