-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrekam_medis.php
83 lines (83 loc) · 3.3 KB
/
rekam_medis.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
include("header.php");
?>
<div class="card">
<h5 class="card-header">Data Rekam Medis Pasien</h5>
<div class="card-body">
<div class="form-group">
<a href="laporan_rekam.php" class="btn btn-secondary" target="_blank">Cetak Laporan</a>
<div class="float-right">
<form method="POST" class="form-inline">
<div class="form-group mx-sm-3 mb-2">
<input type="text" class="form-control" name="kata_kunci" placeholder="Masukkan Pencarian">
</div>
<button name="pencarian" type="submit" class="btn btn-primary mb-2">Cari</button>
</form>
</div>
</div>
<table class="table table-hover table-striped">
<thead class="thead-dark">
<tr>
<th scope="col">No.</th>
<th scope="col">ID Rekam Medis</th>
<th scope="col">NIK</th>
<th scope="col">Nama Lengkap</th>
<th scope="col">Keluhan</th>
<th scope="col">Tgl. Daftar</th>
<th scope="col">Tgl. Janji</th>
<th scope="col">No HP/WA</th>
<th scope="col" width="28%">Aksi</th>
</tr>
</thead>
<tbody>
<?php
if(isset($_POST['pencarian'])){
$kata_kunci = $_POST['kata_kunci'];
$query = mysqli_query($config,"SELECT * from rekam_medis where nama like '%$kata_kunci%'");
}else{
$query=mysqli_query($config,"select * from rekam_medis");
}
$nomer=1;
while ($ambil_data=mysqli_fetch_array($query)){
?>
<tr>
<th scope="row">
<?php echo $nomer++; ?>
</th>
<td>
<?php echo $ambil_data['id']; ?>
</td>
<td>
<?php echo $ambil_data['nik']; ?>
</td>
<td>
<?php echo $ambil_data['nama']; ?>
</td>
<td>
<?php echo $ambil_data['keluhan']; ?>
</td>
<td>
<?php echo $ambil_data['tgl_daftar']; ?>
</td>
<td>
<?php echo $ambil_data['tgl_janji']; ?>
</td>
<td>
<?php echo $ambil_data['no_hp']; ?>
</td>
<td>
<a href="cetak_rekam.php?id=<?php echo $ambil_data['id'];?>" target="_blank">
<button type="button" class="btn btn-secondary">Cetak</button>
</a>
<a href="detail_rekam.php?id=<?php echo $ambil_data['id'];?>">
<button type="button" class="btn btn-success">Detail</button>
</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>