-
Notifications
You must be signed in to change notification settings - Fork 0
/
treatment.php
91 lines (84 loc) · 3.94 KB
/
treatment.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
84
85
86
87
88
89
90
91
<?php include('templates/header.php'); ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<img src="img/header.jpg" class="img-fluid" alt="...">
</div>
</div>
<div class="row mt-3 mb-2">
<div class="col">
<?php include('menu.php'); ?>
</div>
</div>
<div class="row">
<figure class="text-center">
<blockquote class="blockquote">
<p>Pasien Treatment</p>
</blockquote>
<figcaption class="blockquote-footer">
Beauty Lux
</figcaption>
</figure>
</div>
<div class="row mt-5">
<div class="col-md-12">
<table class="table table-hover table-light table-striped">
<thead>
<tr>
<th class="text-center" scope="col">#</th>
<th class="text-center" scope="col">No.Register</th>
<th class="text-center" scope="col">Registrasi</th>
<th class="text-center" scope="col">Nomor RM</th>
<th class="text-center" scope="col">Nama Pasien</th>
<th class="text-center" scope="col">Konsultasi</th>
<th class="text-center" scope="col">Kondisi Awal</th>
<th class="text-center" scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
include 'templates/koneksi.php';
$query = mysqli_query($koneksi, "
SELECT *,
CASE
WHEN treatment.status = 0 THEN 'Treatment'
WHEN treatment.status = 1 THEN 'Farmasi'
WHEN treatment.status = 2 THEN 'Kasir'
WHEN treatment.status = 3 THEN 'Terbayar'
END AS nm_status
FROM treatment
JOIN customer
ON treatment.id_customer = customer.id_customer
ORDER BY treatment.id_treatment ASC
");
while ($d = mysqli_fetch_array($query)) {
?>
<tr>
<td class="text-center" scope="row"><?= $no++; ?></td>
<td class="text-center" scope="row"><?= $d['id_treatment']; ?></td>
<td class="text-center" scope="row">
<span class="badge bg-primary"><?= $d['nm_status']; ?></span>
<!-- jika kesimpulan konsultasi belum diisi -->
<?php if(empty($d['kesimpulan'])){
echo '<span class="badge bg-danger">Kesimpulan belum diisi!</span>';
} ?>
<br><?= date('d/m/Y H:i:s', strtotime($d['tanggal'])); ?>
</td>
<td class="text-center" scope="row"><?= $d['id_customer']; ?></td>
<td class="text-right" scope="row"><?= $d['nama']; ?></td>
<td class="text-center" scope="row"><?= $d['konsultasi']; ?></td>
<td class="text-center" scope="row"><?= $d['note']; ?></td>
<td class="text-center" scope="row">
<a href="treatment_form.php?id_treatment=<?= $d['id_treatment']; ?>" type="button"
class="btn btn-success btn-sm">Buat SPK</a>
<a href="registrasi_riwayat.php?id_customer=<?= $d['id_customer']; ?>" type="button"
class="btn btn-warning btn-sm" target="_blank">Riwayat RM</a>
</td>
</ </tr>
<?php } ?>
</table>
</div>
</div>
</div>
<?php include('templates/footer.php'); ?>