Data Pasien Baru

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

DATA PASIEN BARU

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>

<div class="div3">

<h1 align="center">DATA PASIEN BARU RUMAH SAKIT PANTI NIRMALA


</h1>

</div>

<div class="div1">

<p><a href="baru.php">Kembali</a></br>

</p>

<p><a href="datapasien.php">Semua Data Pasien Baru</a></br>

</p>

<p> <a href="datapasienlama.php">Semua Data Pasien


Lama</a></br>

</p>

</div>

<div class="div2">

<p>&nbsp;</p>

<table border="1" align="center" bordercolor="#000000"


bgcolor="#CCCCCC">

<tr bordercolor="#000000" bgcolor="#FFFFFF">


<th width="83" height="51"><strong>Kode Pasien
</strong></th>

<th width="121"><strong>Nama Pasien </strong></th>

<th width="129"><strong>Tempat Tgl Lahir </strong></th>

<th width="118" nowrap><strong>Alamat</strong></th>

<th width="161"><strong>No Hp </strong></th>

<th width="65"><strong>Jenis Kelamin</strong></th>

<th width="205"><strong>Jenis Perawatan </strong></th>

<th width="47"><strong>Ubah</strong></th>

<th width="51"><strong>Hapus</strong></th>

</tr>

<?php

include ("koneksi.php");

$data = mysql_query ("SELECT * FROM baru ");

while ($dat = mysql_fetch_assoc($data)){

?>

<tr>

<td height="58"><?php echo $dat['kodepasien']; ?></td>

<td><?php echo $dat['namapasien']; ?></td>

<td><?php echo $dat['tempattgllahir']; ?></td>

<td><?php echo $dat['alamat']; ?></td>

<td><?php echo $dat['nohp']; ?></td>

<td><?php echo $dat['jeniskelamin']; ?></td>

<td><?php echo $dat['jenisperawatan']; ?></td>

<form action="baru.php" method="post">

<td><input type="submit" class="tran"


value="Ubah" name="ubah" /></td>

<input type="hidden" name="kodepasien"


value="<?php echo $dat['kodepasien']; ?>"/>
</form>

<form action="hapusbaru.php" method="post">

<td><input type="submit" class="tran"


value="Hapus" name="hapus"/></td>

<input type="hidden" name="kodepasien"


value="<?php echo $dat['kodepasien']; ?>"/>

</form>

</tr>

<?php

?>

</table>

</div>

</body>

</html>

DATA PASIEN LAMA

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>
<div class="div3">

<h1 align="center">DATA PASIEN LAMA RUMAH SAKIT PANTI NIRMALA


</h1>

</div>

<div class="div1">

<p><a href="baru.php">Kembali</a></br>

</p>

<p> <a href="datapasien.php">Semua Data Pasien


Baru</a></br>

</p>

<p> <a href="datapasienlama.php">Semua Data Pasien


Lama</a></br>

</p>

</div>

<div class="div2">

<p>&nbsp;</p>

<table border="1" align="center" bordercolor="#000000" bgcolor="#CCCCCC">

<tr bordercolor="#000000" bgcolor="#FFFFFF">

<th width="83" height="51"><strong>Kode Pasien


</strong></th>

<th width="121"><strong>Nama Pasien </strong></th>

<th width="129"><strong>Jenis Perawatan </strong></th>

<th width="118" nowrap><strong>Asuransi</strong></th>

<th width="161"><strong>Keperluan Ke Dokter


</strong></th>

<th width="65"><strong>Tanggal Daftar</strong></th>

<th width="205"><strong>Tanggal Kembali </strong></th>

<th width="47"><strong>Ubah</strong></th>

<th width="51"><strong>Hapus</strong></th>
</tr>

<?php

include ("koneksi.php");

$data = mysql_query ("SELECT * FROM lama ");

while ($dat = mysql_fetch_assoc($data)){

?>

<tr>

<td height="58"><?php echo $dat['kodepasien']; ?></td>

<td><?php echo $dat['namapasien']; ?></td>

<td><?php echo $dat['jenisperawatan']; ?></td>

<td><?php echo $dat['asuransi']; ?></td>

<td><?php echo $dat['keperluandktr']; ?></td>

<td><?php echo $dat['tanggaldaftar']; ?></td>

<td><?php echo $dat['tanggalkembali']; ?></td>

<form action="lamaa.php" method="post">

<td><input type="submit" class="tran"


value="Ubah" name="ubah" /></td>

<input type="hidden" name="kodepasien"


value="<?php echo $dat['kodepasien']; ?>"/>

</form>

<form action="hapuslama.php" method="post">

<td><input type="submit" class="tran"


value="Hapus" name="hapus"/></td>

<input type="hidden" name="kodepasien"


value="<?php echo $dat['kodepasien']; ?>"/>

</form>

</tr>

<?php

}
?>

</table>

</div>

</body>

</html>

PROSES BARU

<?php

include"koneksi.php";

$kodepasien=$_POST['kodepasien'];

$namapasien=$_POST['namapasien'];

$tempattgllahir=$_POST['tempattgllahir'];

$alamat=$_POST['alamat'];

$nohp=$_POST['nohp'];

$jeniskelamin=$_POST['jeniskelamin'];

$jenisperawatan=$_POST['jenisperawatan'];

$query=mysql_query("insert into
baru(kodepasien,namapasien,tempattgllahir,alamat,nohp,jeniskelamin)

values('kodepasien','namapasien','tempattgllahir','alamat','nohp','jeniskelamin')");

if($query)

echo"<H1>Data berhasil disimpan</H1>";

else

{
echo"<H1>Data gagal disimpan</H1>";

?>

PROSES LAMA
<?php

include"koneksi.php";

$kodepasien=$_POST['kodepasien'];

$namapasien=$_POST['namapasien'];

$jenisperawatan=$_POST['jenisperawatan'];

$asuransi=$_POST['asuransi'];

$keperluandktr=$_POST['keperluandktr'];

$tanggaldaftar=$_POST['tanggaldaftar'];

$tanggalkembali=$_POST['tanggalkembali'];

$query=mysql_query("insert into
lama(kodepasien,namapasien,jenisperawatan,asuransi,keperluandktr,tanggaldaftar,tanggalkembali)

values('kodepasien
','namapasien','jenisperawatan','asuransi','keperluandktr','tanggaldaftar','tanggalkembali')");

if($query)

echo"<H1>Data berhasil disimpan</H1>";

else

echo"<H1>Data gagal disimpan</H1>";

?>
DELETE BARU

<?php

include"koneksi.php";

$kodepasien=$_GET['kodepasien'];

$dat="DELETE FROM `rumahsakit`.`baru` WHERE `baru`.`kodepasien` = '' AND `baru`.`namapasien` =


'' AND `baru`.`tempattgllahir` = '' AND `baru`.`alamat` = '' AND `baru`.`nohp` = '' AND
`baru`.`jeniskelamin` = '' AND `baru`.`jenisperawatan` = '' LIMIT 1";

$query=mysql_query($dat);

if($query)

echo"<h1>DATA BERHASIL DIHAPUS</h1>";

else

echo"<h1>DATA GAGAL DIHAPUS</h1>";

?>

DELETE LAMA BELUM SOALE ADA YANG EROR BANYAK

You might also like