135
4. Database Design
a Design of Class Diagram
Figure 4.36
Design of Class Diagram
136
Base on Figure 4.35 in the e-Reservation Room System class
digram start from main class, main class have some function that organize interface which is for login, manage master pasien, manage
master spesialis, manage master pengguna, manage master perawatan, and manage master rumah sakit. On the figure 4.35 shown that the
relations multiplicity in the main class for every class only have one 1 relation. This shows that every management has one relation with
every single view of each operation. To manage every function in the system, user in this system should login to the system, the data of
every user in this system is save to the database. This is has a meaning if to manage every single function in this system, user should login
first as user who manage every single function in the system. Except login activity, every single function has a relation with database, every
management has one relation or more than one for every activity that carried out during the management in the system. The last is every
management has relation with every class data in the database that is using for storage the data, and those data classes has relation with one
class to another class.
137
b Database Design
Figure 4.36 Database Design
Base on Figure 4.36
1. konfirmasi_pasien Confirmation Tabel
Tabel Name : konfirmasi_tabel
Primary Key : id
Foreign Key : -
Table 4.19 KonfirmasiPasien
Field Name Data Type
Size Explenation
Id Integer
10 Id
for
138
confirmation patient
Id_pasien_datang Integer
10 Id
for arrival
patient Tanggal
Date Date
for confirmation
patient
2. mengirim_pasien Send patient tabel
Table Name : mengirim_pasien
Primary Key : id
Foreign Key :id_pasient, id_rumah_sakit, id_master_dokter,
id_master_spesialis
Table 4.20 MengirimPasien
Field Name Data type
Size Explanation
Id Integer
10 Id for send the
referral patient Tanggal
Date -
Date for send the referral patient.
139
Id_pasient Integer
10 Id patient for
referral patient. Id_rumah_sakit
Integer 10
Id hospital for reverral patient.
Id_master_perawatan Integer 10
Id perawatan
room for referral patient.
Id_master_spesialis Integer
10 Id for what kind
of disease that patient have.
3. Pasien Patient Tabel
Table Name : pasien
Primary Key : id
Foreign key : -
Table 4.21
Pasien Field Name
Data type Size
Explanation Id
Integer 10
Id for referral patient
No_daftar Varchar
100 Registration
140
number for
referral patient Nama
Varchar 100
The reverral
patient name Alamat
Text -
The address of referral patient
Jk Varchar
10 Gender
of referral patient
Tlp Varchar
100 Phone
number referral patient
Jenis_penyakit Text
- The illness of
referral patiet Saran_dokter
Text -
Suggestion from doctor to referral
patient Tgl_daftar
Varhar 100
Date of
registration when the
patient registration
Tgl_rujuk Varchar
100 Date when the
referral patient
141
should come to Koja hospital
Tgl_lahir Varchar
100 Date
of birth
referral patient Rs_dari
Varchar 100
From where
hospital the
referral patient is come
Rs Varchar
100 The
name of
hospital Spesialis
Integer 100
The name for what
type of
treatment Ruangan
Integer 100
The room
treatment for
referral patient Datang
Integer 11
The date when the
referral patient is come
to Koja hospital Masuk_ruangan
Integer 11
The referral
142
patient is already get the room of
treatment Tgl_datang
Varchar 100
The date when the
referral patient is come
Tgl_masuk_ruangan Varchar
100 Date
referral patient that is
already come to treatment room
4. Pasien_datang
Table name : pasien_datang
Primary key : id
Foreign key : id_mengirim_pasien
Table 4.22 PasienDatang
Field Name Data type
Size Explanation
Id Integer
10 Id for patient
that already
come
143
Id_mengirim_pasien Integer
10 Id for patient
who already
come to Koja hospital
Tanggal_datang Date
- The date when
the patient is come to Koja
hospital
5. Master_spesialis Disease Tabel
Table name : master_spesialis
Primary key : id
Foreign key : -
Table 4.23 MasterSpesialis
Field Name Data type
Size Explanation
Id Integer
10 Id for what kind
of disease Nama
Varchar 100
The name for what kind of
disease
144
Rs Varchar
100 The
hospital who
has treatment
specialist in this system
6. Master_rs
Table name : master_rs
Primary key : id
Foreign key : -
Table 4.24
MasterRs Field Name
Data type Size
Explanation Id
Integer 10
Id for hospital in this system
Nama Varchar
200 The
name hospital in this
system Alamat
Text -
Address the
hospital in this
145
system Spesialis
Text -
The service
disease treatment Koja
hospital Tlp
Varchar 100
Phone number for
both hospital in this
system Fax
Varchar 100
Fax number for both hospital in
this system Email
Varchar 100
Email adress
for both
hospital in this system
Kabkota Varchar
100 Address for
both hospital in this system
146
7. Master_perawatan
Table name : master_perawatan
Primary key : id
Foreign key : -
Table 4.25
MasterPerawatan Field Name
Data type Size
Explanation Id
11 11
Id for
room treatment in the
Koja hospital Jenis
Varhar 200
What kind of room treatment
in the system Rs
Varchar 100
The hospital
that has room treatment in this
system Ruangan
Int 100
The treatment
room
147
Harga Varchar
100 The price for
treatment room
8. User
Table name : user
Primary key : -
Foreign key : -
Table 4.26 User
Field Name Data type
Size Explanation
Id Integer
11 Id for user in
this system User
Varchar 50
User in this system
Sebagai Varchar
100 What kind user
in this system Katasandi
Varchar 32
Password for
user in
this system
Namalengkap Varchar
100 Full name user
in this system
148
Rs Integer
11 Every hospital
in this system has a user in
this system
149
5. Design Interface