Assalamualaikum wr.wb.
Selamat siang semuanya semoga sehat selalu.Sebelumnya saya sudah memposting Program Penambahan Matrik di Dev Pascal dan Program Perkalian Matrik di Dev Pascal.Udah lama nih udah gak share tentang Dev Pascal sebenarnya bukan karena bingung mau ngepost apa lagi tapi internet lagi error di kost.n hehe.
Untuk sekarang saya akan berbagi Program Rekam Medis di Dev Pascal mungkin banyak teman-teman yang kuliah semester satu jurusan Teknik Informatika udah gak asing lagi dengan aplikasi dan program-program yang ada di dalamnya yang kita bikin sendiri.
Saya berbagi Program Rekam Medis di Dev Pascal ini karena dulu saya dapet Tugas Besar Algoritma dan Pemrograman.Kelebihan dari program yang saya dan teman-teman buat adalah ada Login dan Menu,Dan didalam Menu ada :
1. Isi Data Pasien
2. Cari Data Berdasarkan Kode,Nama,Harga.
3. Tampil Data Yang Sudah Terurut.
Scriptnya di Bawah ini :
program Data_Rekam_Medis;
{I.S. : }
{F.S. : }
uses crt;
// Kamus Global
const
Maks_Psn = 50;
type
Dt_Psn = record
Kode,Nama,JK,Penanganan,Penyakit,Alamat : string;
Agama,Umur,Pekerjaan,Titer,Dokter,TglBerobat : string;
Biaya : integer;
end;//End Record
Pasien = array[1..Maks_Psn] of Dt_Psn;
var
Psn : Pasien;
FilePasien : File of Dt_Psn;
N,Menu : integer;
procedure Login;
{I.S. : }
{F.S. : }
var
user,pass,us,ps:string;
x,i:integer;
begin
textbackground(15); clrscr;
textcolor(blue);
user := 'rahman';
pass := 'rahman';
x:=0;
for i:=1 to 3 do
begin
gotoxy(32,2);writeln ('-= KLINIK SARI ASIH =-');
gotoxy(25,5);writeln ('===================================');
gotoxy(25,6);writeln ('| Silahkan Masukan Nama dan Sandi |');
gotoxy(25,7);writeln ('===================================');
gotoxy(25,8);writeln ('| |');
gotoxy(25,9);write ('| NAMA : |');
gotoxy(25,10);write ('| SANDI : |');
gotoxy(25,11);writeln('| |');
gotoxy(25,12);writeln('===================================');
gotoxy(39,9);readln(us);
gotoxy(39,10);readln(ps);
if user = us then
begin
if ps = pass then
begin
x:= 1;
break;
end; // End If
end; // End If
clrscr;
writeln('Nama dan Sandi tidak cocok');
writeln;
end; // End For
clrscr;
if x = 0 then
writeln('Maaf akun anda di blokir')
else
if x = 1 then
writeln('Selamat Datang di Klinik Sari Asih ! ',user,'!');
readln;
end;// EndProcedure
procedure Isi_Data(var Psn:Pasien; var N:integer);
{I.S. : }
{F.S. : }
var
i : integer;
begin
write('Banyaknya Data : '); readln(N);
clrscr;
writeln('|-----------------------------------------------------------------------------|');
writeln('| -= DATA PASIEN =- |');
writeln('|-----------------------------------------------------------------------------|');
writeln('| NO | KODE | NAMA PASIEN | JK | ALAMAT | UMUR | AGAMA | PEKERJAAN |');
writeln('|=============================================================================|');
for i := 1 to N do
begin
gotoxy(1,i+5);
writeln('| | | | | | | | |');
gotoxy(3,i+5);write(i);
gotoxy(8,i+5); readln(Psn[i].KODE);
gotoxy(15,i+5); readln(Psn[i].Nama);
gotoxy(29,i+5); readln(Psn[i].JK);
gotoxy(34,i+5); readln(Psn[i].Alamat);
gotoxy(47,i+5); readln(Psn[i].Umur);
gotoxy(54,i+5); readln(Psn[i].Agama);
gotoxy(65,i+5); readln(Psn[i].Pekerjaan);
end;// End for
write;
writeln('------------------------------------------------------------------------------|');
end;// End Procedure
procedure Isi_Rekam(var Psn:Pasien; Var N:integer);
{I.S. : }
{F.S. : }
var
i : integer;
KodeCari : string;
Ketemu : boolean;
Ulangi : char;
begin
repeat;
clrscr;
writeln('|-----------------------------------------------------------------------------|');
writeln('| -= DAFTAR PASIEN =- |');
writeln('|-----------------------------------------------------------------------------|');
writeln('| NO | KODE | NAMA PASIEN | JK | ALAMAT | UMUR | AGAMA | PEKERJAAN |');
writeln('|=============================================================================|');
for i := 1 to N do
begin
gotoxy(1,i+5);
writeln('| | | | | | | | |');
gotoxy(3,i+5);write(i);
gotoxy(8,i+5); writeln(Psn[i].KODE);
gotoxy(15,i+5); writeln(Psn[i].Nama);
gotoxy(29,i+5); writeln(Psn[i].JK);
gotoxy(34,i+5); writeln(Psn[i].Alamat);
gotoxy(47,i+5); writeln(Psn[i].Umur);
gotoxy(54,i+5); writeln(Psn[i].Agama);
gotoxy(65,i+5); writeln(Psn[i].Pekerjaan);
end;// End for
write;
writeln('------------------------------------------------------------------------------|');
write('Masukan Kode Untuk Input Rekam Medis : '); readln(KodeCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Kode = KodeCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln('Kode Pasien : ',Psn[i].Kode);
writeln('Nama Pasien : ',Psn[i].Nama);
writeln('Alamat : ',Psn[i].Alamat);
writeln('Pekerjaan : ',Psn[i].Pekerjaan);
end // End If
else
writeln('Kode ',KodeCari,' tidak ditemukan !');
writeln;
writeln('-------------------------------------------------------------------------------');
writeln('| -= DATA REKAM MEDIS =- |');
writeln('-------------------------------------------------------------------------------');
writeln('| TGL_BEROBAT | PENYAKIT | TINDAKAN DOKTER | DOKTER | BIAYA |');
writeln('===============================================================================');
writeln('| | | | | Rp. |');
writeln('===============================================================================');
gotoxy(3,11); readln(Psn[i].TglBerobat);
gotoxy(17,11); readln(Psn[i].Penyakit);
gotoxy(32,11); readln(Psn[i].Titer);
gotoxy(54,11); readln(Psn[i].Dokter);
gotoxy(70,11); readln(Psn[i].Biaya);
gotoxy(1,14);write('Anda Ingin Input Mahasiswa Lagi (Y/T)');
repeat
Ulangi := readkey;
until (Ulangi = 'y') or ( Ulangi = 't');
until Ulangi = 't';
end; //endprocedure
procedure Urut_Kode(var Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i,j,min : integer;
Temp : Dt_Psn;
begin
for i := 1 to (N-1) do
begin
min := i;
for j := (i+1) to N do
begin
if(Psn[j].Kode < Psn[min].Kode)
then
min := j;
end; // End For
// Menukarkan Data
Temp := Psn[i];
Psn[i] := Psn[min];
Psn[min] := Temp;
end; // End For
end;// End Procedure
procedure Tampil_Data(Psn:Pasien; N:integer);
var
i : integer;
begin
clrscr;
writeln('|-----------------------------------------------------------------------------|');
writeln('| -= DATA PASIEN REKAM MEDIS=- |');
writeln('|-----------------------------------------------------------------------------|');
writeln('| KODE | NAMA PASIEN | PENYAKIT | TINDAKAAN DOKTER | DOKTER | BIAYA |');
writeln('|=============================================================================|');
for i := 1 to N do
begin
gotoxy(1,i+5);
writeln('| | | | | |Rp. |');
begin
gotoxy(3,i+5); writeln(Psn[i].KODE);
gotoxy(10,i+5); writeln(Psn[i].Nama);
gotoxy(24,i+5); writeln(Psn[i].Penyakit);
gotoxy(37,i+5); writeln(Psn[i].Titer);
gotoxy(56,i+5); writeln(Psn[i].Dokter);
gotoxy(70,i+5); writeln(Psn[i].Biaya);
end;
end;// End for
write;
writeln('------------------------------------------------------------------------------|');
end; //endprocedure}
procedure CariKode(Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i : integer;
KodeCari : string;
Ketemu : boolean;
begin
clrscr;
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN KODE <> ');
writeln;
write('Masukan Kode yang dicari : '); readln(KodeCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Kode = KodeCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN KODE <> ');
writeln;
writeln('Kode Pasien : ',Psn[i].Kode);
writeln('Nama Pasien : ',Psn[i].Nama);
writeln('Alamat : ',Psn[i].Alamat);
writeln('Pekerjaan : ',Psn[i].Pekerjaan);
gotoxy(46,3);writeln('Jenis Kelamin : ',Psn[i].JK);
gotoxy(46,4);writeln('Umur Pasien : ',Psn[i].Umur);
gotoxy(46,5);writeln('Agama Pasien : ',Psn[i].Agama);
writeln;
writeln('-------------------------------------------------------------------------------');
writeln('| -= DATA REKAM MEDIS =- |');
writeln('-------------------------------------------------------------------------------');
writeln('| TGL_BEROBAT | PENYAKIT | TINDAKAN DOKTER | DOKTER | BIAYA |');
writeln('===============================================================================');
writeln('| | | | |Rp. |');
writeln('===============================================================================');
gotoxy(3,12); write(Psn[i].TglBerobat);
gotoxy(17,12); write(Psn[i].Penyakit);
gotoxy(32,12); write(Psn[i].Titer);
gotoxy(54,12); write(Psn[i].Dokter);
gotoxy(70,12); write(Psn[i].Biaya);
end
else
writeln('Kode ',KodeCari,' tidak ditemukan !');
readln;
end; //endprocedure
procedure CariNama(Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i,Po : integer;
NamaCari : string;
Ketemu : boolean;
begin
clrscr;
write('Masukan Nama yang dicari : '); readln(NamaCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Nama = NamaCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN ( NAMA ) <> ');
writeln;
writeln(' Nama Yang Di Cari : ',Psn[i].Nama,' ');
writeln;
writeln('|=============================================================================|');
writeln('| KODE | NAMA PASIEN | JK | ALAMAT | UMUR | AGAMA | PEKERJAAN |');
writeln('|=============================================================================|');
Po := 0;
for i := 1 to N do
begin
if (Psn[i].Nama = NamaCari)
then
begin
Po := Po + 1;
gotoxy(1,Po+7);
writeln('| | | | | | | |');
gotoxy(3,Po+7); writeln(Psn[i].KODE);
gotoxy(10,Po+7); writeln(Psn[i].Nama);
gotoxy(28,Po+7); writeln(Psn[i].JK);
gotoxy(32,Po+7); writeln(Psn[i].Alamat);
gotoxy(47,Po+7); writeln(Psn[i].Umur);
gotoxy(54,Po+7); writeln(Psn[i].Agama);
gotoxy(65,Po+7); writeln(Psn[i].Pekerjaan);
end;
end;// End for
write;
writeln('|-----------------------------------------------------------------------------|');
end
else
writeln('Nama ',NamaCari,' tidak ditemukan !');
readln;
end; //endprocedure
procedure CariHarga(Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i,Po : integer;
HargaCari : integer;
Ketemu : boolean;
begin
clrscr;
write('Masukan Harga yang dicari : '); readln(HargaCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Biaya = HargaCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN ( HARGA ) <> ');
writeln;
writeln(' Harga Yang Di Cari : Rp.',Psn[i].Biaya,' ');
writeln;
writeln('|=============================================================================|');
writeln('| KODE | NAMA PASIEN | PENYAKIT | TINDAKAN DOKTER | DOKTER | BIAYA |');
writeln('|=============================================================================|');
Po := 0;
for i := 1 to N do
begin
if (Psn[i].Biaya = HargaCari)
then
begin
Po := Po + 1;
gotoxy(1,Po+7);
writeln('| | | | | |Rp. |');
gotoxy(3,Po+7); writeln(Psn[i].KODE);
gotoxy(10,Po+7); writeln(Psn[i].Nama);
gotoxy(24,Po+7); writeln(Psn[i].Penyakit);
gotoxy(37,Po+7); writeln(Psn[i].Titer);
gotoxy(57,Po+7); writeln(Psn[i].Dokter);
gotoxy(73,Po+7); writeln(Psn[i].Biaya);
end;
end;// End for
write;
writeln('|-----------------------------------------------------------------------------|');
end
else
writeln('Nama ',HargaCari,' tidak ditemukan !');
readln;
end; //endprocedure
procedure Tampil_Menu(var Menu:integer);
{I.S. : }
{F.S. : }
var
menu1 : integer;
begin
repeat
textbackground(15); clrscr;
textcolor(blue);
writeln('===============================================================================');
writeln(' -= KLINIK PRATAMA SARI ASIH =- ');
writeln(' Jl.Sekaloa Gang.Loa II Bandung 40132 Tlp.(022)2503868 ');
writeln('===============================================================================');
gotoxy(17,7); write('=================================================');
gotoxy(17,8); write('| <> -= MENU UTAMA =- <> |');
gotoxy(17,9); write('=================================================');
gotoxy(17,10); write('| 1. Isi Data Pasien |');
gotoxy(17,11); write('| 2. Cari Data Berdasarkan Kode |');
gotoxy(17,12); write('| 3. Cari Data Berdasarkan Nama |');
gotoxy(17,13); write('| 4. Cari Data Berdasarkan Harga |');
gotoxy(17,14); write('| 5. Tampil Data Keseluruhan Yang Sudah Terurut |');
gotoxy(17,15); write('| 0. Keluar |');
gotoxy(17,16); write('| |');
gotoxy(17,17); write('| Pilihan Anda ? |');
gotoxy(17,18); write('=================================================');
gotoxy(1,24);writeln('===============================================================================');
gotoxy(38,17); readln(Menu);
case Menu of
1 : begin
clrscr;
writeln('===============================================================================');
writeln(' -= KLINIK PRATAMA SARI ASIH =- ');
writeln(' Jl.Sekaloa Gang.Loa II Bandung 40132 Tlp.(022)2503868 ');
writeln('===============================================================================');
gotoxy(17,7); write('=================================================');
gotoxy(17,8); write('| -= Menu Isi Data =- |');
gotoxy(17,9); write('=================================================');
gotoxy(17,10); write('| 1. Isi Data Pasien |');
gotoxy(17,11); write('| 2. Isi Data Rekam Medis |');
gotoxy(17,12); write('| 0. Keluar ke Menu Utama |');
gotoxy(17,13); write('| |');
gotoxy(17,14); write('| Pilihan Anda ? |');
gotoxy(17,15); write('=================================================');
gotoxy(1,24);writeln('===============================================================================');
gotoxy(38,14); readln(Menu1);
if(Menu1 = 1)
then
begin
clrscr;
Isi_Data(Psn,N);
readln;
Urut_Kode(Psn,N);
writeln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end // End If
else
if(Menu1 = 2)
then
begin
clrscr;
Isi_Rekam(Psn,N);
readln;
writeln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end; //End If
end;
2 : begin
clrscr;
CariKode(Psn,N);
readln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
3 : begin
clrscr;
CariNama(Psn,N);
readln;
Urut_Kode(Psn,N);
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
4 : begin
clrscr;
CariHarga(Psn,N);
readln;
Urut_Kode(Psn,N);
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
5 : begin
clrscr;
Tampil_Data(Psn,N);
Urut_Kode(Psn,N);
writeln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
end;
until(Menu = 0);
end;// End Procedure
// Program Utama
begin
Login;
Tampil_Menu(Menu);
readln;
end.
{I.S. : }
{F.S. : }
uses crt;
// Kamus Global
const
Maks_Psn = 50;
type
Dt_Psn = record
Kode,Nama,JK,Penanganan,Penyakit,Alamat : string;
Agama,Umur,Pekerjaan,Titer,Dokter,TglBerobat : string;
Biaya : integer;
end;//End Record
Pasien = array[1..Maks_Psn] of Dt_Psn;
var
Psn : Pasien;
FilePasien : File of Dt_Psn;
N,Menu : integer;
procedure Login;
{I.S. : }
{F.S. : }
var
user,pass,us,ps:string;
x,i:integer;
begin
textbackground(15); clrscr;
textcolor(blue);
user := 'rahman';
pass := 'rahman';
x:=0;
for i:=1 to 3 do
begin
gotoxy(32,2);writeln ('-= KLINIK SARI ASIH =-');
gotoxy(25,5);writeln ('===================================');
gotoxy(25,6);writeln ('| Silahkan Masukan Nama dan Sandi |');
gotoxy(25,7);writeln ('===================================');
gotoxy(25,8);writeln ('| |');
gotoxy(25,9);write ('| NAMA : |');
gotoxy(25,10);write ('| SANDI : |');
gotoxy(25,11);writeln('| |');
gotoxy(25,12);writeln('===================================');
gotoxy(39,9);readln(us);
gotoxy(39,10);readln(ps);
if user = us then
begin
if ps = pass then
begin
x:= 1;
break;
end; // End If
end; // End If
clrscr;
writeln('Nama dan Sandi tidak cocok');
writeln;
end; // End For
clrscr;
if x = 0 then
writeln('Maaf akun anda di blokir')
else
if x = 1 then
writeln('Selamat Datang di Klinik Sari Asih ! ',user,'!');
readln;
end;// EndProcedure
procedure Isi_Data(var Psn:Pasien; var N:integer);
{I.S. : }
{F.S. : }
var
i : integer;
begin
write('Banyaknya Data : '); readln(N);
clrscr;
writeln('|-----------------------------------------------------------------------------|');
writeln('| -= DATA PASIEN =- |');
writeln('|-----------------------------------------------------------------------------|');
writeln('| NO | KODE | NAMA PASIEN | JK | ALAMAT | UMUR | AGAMA | PEKERJAAN |');
writeln('|=============================================================================|');
for i := 1 to N do
begin
gotoxy(1,i+5);
writeln('| | | | | | | | |');
gotoxy(3,i+5);write(i);
gotoxy(8,i+5); readln(Psn[i].KODE);
gotoxy(15,i+5); readln(Psn[i].Nama);
gotoxy(29,i+5); readln(Psn[i].JK);
gotoxy(34,i+5); readln(Psn[i].Alamat);
gotoxy(47,i+5); readln(Psn[i].Umur);
gotoxy(54,i+5); readln(Psn[i].Agama);
gotoxy(65,i+5); readln(Psn[i].Pekerjaan);
end;// End for
write;
writeln('------------------------------------------------------------------------------|');
end;// End Procedure
procedure Isi_Rekam(var Psn:Pasien; Var N:integer);
{I.S. : }
{F.S. : }
var
i : integer;
KodeCari : string;
Ketemu : boolean;
Ulangi : char;
begin
repeat;
clrscr;
writeln('|-----------------------------------------------------------------------------|');
writeln('| -= DAFTAR PASIEN =- |');
writeln('|-----------------------------------------------------------------------------|');
writeln('| NO | KODE | NAMA PASIEN | JK | ALAMAT | UMUR | AGAMA | PEKERJAAN |');
writeln('|=============================================================================|');
for i := 1 to N do
begin
gotoxy(1,i+5);
writeln('| | | | | | | | |');
gotoxy(3,i+5);write(i);
gotoxy(8,i+5); writeln(Psn[i].KODE);
gotoxy(15,i+5); writeln(Psn[i].Nama);
gotoxy(29,i+5); writeln(Psn[i].JK);
gotoxy(34,i+5); writeln(Psn[i].Alamat);
gotoxy(47,i+5); writeln(Psn[i].Umur);
gotoxy(54,i+5); writeln(Psn[i].Agama);
gotoxy(65,i+5); writeln(Psn[i].Pekerjaan);
end;// End for
write;
writeln('------------------------------------------------------------------------------|');
write('Masukan Kode Untuk Input Rekam Medis : '); readln(KodeCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Kode = KodeCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln('Kode Pasien : ',Psn[i].Kode);
writeln('Nama Pasien : ',Psn[i].Nama);
writeln('Alamat : ',Psn[i].Alamat);
writeln('Pekerjaan : ',Psn[i].Pekerjaan);
end // End If
else
writeln('Kode ',KodeCari,' tidak ditemukan !');
writeln;
writeln('-------------------------------------------------------------------------------');
writeln('| -= DATA REKAM MEDIS =- |');
writeln('-------------------------------------------------------------------------------');
writeln('| TGL_BEROBAT | PENYAKIT | TINDAKAN DOKTER | DOKTER | BIAYA |');
writeln('===============================================================================');
writeln('| | | | | Rp. |');
writeln('===============================================================================');
gotoxy(3,11); readln(Psn[i].TglBerobat);
gotoxy(17,11); readln(Psn[i].Penyakit);
gotoxy(32,11); readln(Psn[i].Titer);
gotoxy(54,11); readln(Psn[i].Dokter);
gotoxy(70,11); readln(Psn[i].Biaya);
gotoxy(1,14);write('Anda Ingin Input Mahasiswa Lagi (Y/T)');
repeat
Ulangi := readkey;
until (Ulangi = 'y') or ( Ulangi = 't');
until Ulangi = 't';
end; //endprocedure
procedure Urut_Kode(var Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i,j,min : integer;
Temp : Dt_Psn;
begin
for i := 1 to (N-1) do
begin
min := i;
for j := (i+1) to N do
begin
if(Psn[j].Kode < Psn[min].Kode)
then
min := j;
end; // End For
// Menukarkan Data
Temp := Psn[i];
Psn[i] := Psn[min];
Psn[min] := Temp;
end; // End For
end;// End Procedure
procedure Tampil_Data(Psn:Pasien; N:integer);
var
i : integer;
begin
clrscr;
writeln('|-----------------------------------------------------------------------------|');
writeln('| -= DATA PASIEN REKAM MEDIS=- |');
writeln('|-----------------------------------------------------------------------------|');
writeln('| KODE | NAMA PASIEN | PENYAKIT | TINDAKAAN DOKTER | DOKTER | BIAYA |');
writeln('|=============================================================================|');
for i := 1 to N do
begin
gotoxy(1,i+5);
writeln('| | | | | |Rp. |');
begin
gotoxy(3,i+5); writeln(Psn[i].KODE);
gotoxy(10,i+5); writeln(Psn[i].Nama);
gotoxy(24,i+5); writeln(Psn[i].Penyakit);
gotoxy(37,i+5); writeln(Psn[i].Titer);
gotoxy(56,i+5); writeln(Psn[i].Dokter);
gotoxy(70,i+5); writeln(Psn[i].Biaya);
end;
end;// End for
write;
writeln('------------------------------------------------------------------------------|');
end; //endprocedure}
procedure CariKode(Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i : integer;
KodeCari : string;
Ketemu : boolean;
begin
clrscr;
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN KODE <> ');
writeln;
write('Masukan Kode yang dicari : '); readln(KodeCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Kode = KodeCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN KODE <> ');
writeln;
writeln('Kode Pasien : ',Psn[i].Kode);
writeln('Nama Pasien : ',Psn[i].Nama);
writeln('Alamat : ',Psn[i].Alamat);
writeln('Pekerjaan : ',Psn[i].Pekerjaan);
gotoxy(46,3);writeln('Jenis Kelamin : ',Psn[i].JK);
gotoxy(46,4);writeln('Umur Pasien : ',Psn[i].Umur);
gotoxy(46,5);writeln('Agama Pasien : ',Psn[i].Agama);
writeln;
writeln('-------------------------------------------------------------------------------');
writeln('| -= DATA REKAM MEDIS =- |');
writeln('-------------------------------------------------------------------------------');
writeln('| TGL_BEROBAT | PENYAKIT | TINDAKAN DOKTER | DOKTER | BIAYA |');
writeln('===============================================================================');
writeln('| | | | |Rp. |');
writeln('===============================================================================');
gotoxy(3,12); write(Psn[i].TglBerobat);
gotoxy(17,12); write(Psn[i].Penyakit);
gotoxy(32,12); write(Psn[i].Titer);
gotoxy(54,12); write(Psn[i].Dokter);
gotoxy(70,12); write(Psn[i].Biaya);
end
else
writeln('Kode ',KodeCari,' tidak ditemukan !');
readln;
end; //endprocedure
procedure CariNama(Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i,Po : integer;
NamaCari : string;
Ketemu : boolean;
begin
clrscr;
write('Masukan Nama yang dicari : '); readln(NamaCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Nama = NamaCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN ( NAMA ) <> ');
writeln;
writeln(' Nama Yang Di Cari : ',Psn[i].Nama,' ');
writeln;
writeln('|=============================================================================|');
writeln('| KODE | NAMA PASIEN | JK | ALAMAT | UMUR | AGAMA | PEKERJAAN |');
writeln('|=============================================================================|');
Po := 0;
for i := 1 to N do
begin
if (Psn[i].Nama = NamaCari)
then
begin
Po := Po + 1;
gotoxy(1,Po+7);
writeln('| | | | | | | |');
gotoxy(3,Po+7); writeln(Psn[i].KODE);
gotoxy(10,Po+7); writeln(Psn[i].Nama);
gotoxy(28,Po+7); writeln(Psn[i].JK);
gotoxy(32,Po+7); writeln(Psn[i].Alamat);
gotoxy(47,Po+7); writeln(Psn[i].Umur);
gotoxy(54,Po+7); writeln(Psn[i].Agama);
gotoxy(65,Po+7); writeln(Psn[i].Pekerjaan);
end;
end;// End for
write;
writeln('|-----------------------------------------------------------------------------|');
end
else
writeln('Nama ',NamaCari,' tidak ditemukan !');
readln;
end; //endprocedure
procedure CariHarga(Psn:Pasien; N:integer);
{I.S. : }
{F.S. : }
var
i,Po : integer;
HargaCari : integer;
Ketemu : boolean;
begin
clrscr;
write('Masukan Harga yang dicari : '); readln(HargaCari);
clrscr;
i := 1;
Ketemu := false;
while (Not Ketemu) and (i <= N) do
begin
if (Psn[i].Biaya = HargaCari)
then
Ketemu := true
else
i := i + 1;
end; //endwhile
if (Ketemu)
then
begin
writeln(' <> DATA PASIEN YANG DICARI BERDASARKAN ( HARGA ) <> ');
writeln;
writeln(' Harga Yang Di Cari : Rp.',Psn[i].Biaya,' ');
writeln;
writeln('|=============================================================================|');
writeln('| KODE | NAMA PASIEN | PENYAKIT | TINDAKAN DOKTER | DOKTER | BIAYA |');
writeln('|=============================================================================|');
Po := 0;
for i := 1 to N do
begin
if (Psn[i].Biaya = HargaCari)
then
begin
Po := Po + 1;
gotoxy(1,Po+7);
writeln('| | | | | |Rp. |');
gotoxy(3,Po+7); writeln(Psn[i].KODE);
gotoxy(10,Po+7); writeln(Psn[i].Nama);
gotoxy(24,Po+7); writeln(Psn[i].Penyakit);
gotoxy(37,Po+7); writeln(Psn[i].Titer);
gotoxy(57,Po+7); writeln(Psn[i].Dokter);
gotoxy(73,Po+7); writeln(Psn[i].Biaya);
end;
end;// End for
write;
writeln('|-----------------------------------------------------------------------------|');
end
else
writeln('Nama ',HargaCari,' tidak ditemukan !');
readln;
end; //endprocedure
procedure Tampil_Menu(var Menu:integer);
{I.S. : }
{F.S. : }
var
menu1 : integer;
begin
repeat
textbackground(15); clrscr;
textcolor(blue);
writeln('===============================================================================');
writeln(' -= KLINIK PRATAMA SARI ASIH =- ');
writeln(' Jl.Sekaloa Gang.Loa II Bandung 40132 Tlp.(022)2503868 ');
writeln('===============================================================================');
gotoxy(17,7); write('=================================================');
gotoxy(17,8); write('| <> -= MENU UTAMA =- <> |');
gotoxy(17,9); write('=================================================');
gotoxy(17,10); write('| 1. Isi Data Pasien |');
gotoxy(17,11); write('| 2. Cari Data Berdasarkan Kode |');
gotoxy(17,12); write('| 3. Cari Data Berdasarkan Nama |');
gotoxy(17,13); write('| 4. Cari Data Berdasarkan Harga |');
gotoxy(17,14); write('| 5. Tampil Data Keseluruhan Yang Sudah Terurut |');
gotoxy(17,15); write('| 0. Keluar |');
gotoxy(17,16); write('| |');
gotoxy(17,17); write('| Pilihan Anda ? |');
gotoxy(17,18); write('=================================================');
gotoxy(1,24);writeln('===============================================================================');
gotoxy(38,17); readln(Menu);
case Menu of
1 : begin
clrscr;
writeln('===============================================================================');
writeln(' -= KLINIK PRATAMA SARI ASIH =- ');
writeln(' Jl.Sekaloa Gang.Loa II Bandung 40132 Tlp.(022)2503868 ');
writeln('===============================================================================');
gotoxy(17,7); write('=================================================');
gotoxy(17,8); write('| -= Menu Isi Data =- |');
gotoxy(17,9); write('=================================================');
gotoxy(17,10); write('| 1. Isi Data Pasien |');
gotoxy(17,11); write('| 2. Isi Data Rekam Medis |');
gotoxy(17,12); write('| 0. Keluar ke Menu Utama |');
gotoxy(17,13); write('| |');
gotoxy(17,14); write('| Pilihan Anda ? |');
gotoxy(17,15); write('=================================================');
gotoxy(1,24);writeln('===============================================================================');
gotoxy(38,14); readln(Menu1);
if(Menu1 = 1)
then
begin
clrscr;
Isi_Data(Psn,N);
readln;
Urut_Kode(Psn,N);
writeln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end // End If
else
if(Menu1 = 2)
then
begin
clrscr;
Isi_Rekam(Psn,N);
readln;
writeln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end; //End If
end;
2 : begin
clrscr;
CariKode(Psn,N);
readln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
3 : begin
clrscr;
CariNama(Psn,N);
readln;
Urut_Kode(Psn,N);
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
4 : begin
clrscr;
CariHarga(Psn,N);
readln;
Urut_Kode(Psn,N);
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
5 : begin
clrscr;
Tampil_Data(Psn,N);
Urut_Kode(Psn,N);
writeln;
writeln('Tekan Enter Untuk Ke Menu..!!');
readln;
end;
end;
until(Menu = 0);
end;// End Procedure
// Program Utama
begin
Login;
Tampil_Menu(Menu);
readln;
end.
Untuk tata cara penggunaannya ada beberapa tahap.
1. Masuk ke Form Login dengan Nama dan Sandi ( daniar ) setelah itu tekan Enter.
2. Masuk ketampilan Menu di situ ada banyak pilihan,Pilih 1 dan Pilih 1 untuk mengisi Data Pasien.
4. Kembali ke Menu lalu pilih 1 dan Pilih 2 ( Isi Data Rekam Medis ).Lalu masukan Kode pasien untuk mengisi Data Rekam Medis > Isi Data Rekam Medis.
5. Unutk Menu yang lainnya silahkan di coba sendiri. hehe
Mudahkan ? Gampangkan ? Program Rekam Medis di Dev Pascal
Terimakasih sudah berkunjung.
Salam Blogger..
1 comments:
Write commentsAnda sudah bosan dan malas karena kalah terus....
ReplyMari gabung bersama dengan kebunpoker.net
rasakan sensasi permainan yang menarik dan spektakuler
http://communitykebunpoker.blogspot.com/2017/10/dalam-angka-jupp-heynckes.html
contact us :
Telepon : +855967107957
BBM : 2BE3264A
Silahkan Jika Ada yang Ditanyakan ? EmoticonEmoticon