$sql=" SELECT * FROM pasien WHERE id_pasien = $id ";
$sql=" SELECT * FROM pasien WHERE id_pasien = $id ";
...
@@ -1342,9 +1386,16 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
...
@@ -1342,9 +1386,16 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$sql=" SELECT poli.id_poli, poli.nama_poli
$sql=" SELECT poli.id_poli, poli.nama_poli
FROM antrian_pasien
FROM antrian_pasien
INNER JOIN poli
INNER JOIN poli
ON antrian_pasien.id_poli = poli.id_poli
ON antrian_pasien.id_poli = poli.id_poli ";
GROUP BY poli.id_poli
ORDER BY nama_poli asc";
if($id){
$sql.=" WHERE poli.id_poli=$id";
}
$sql.=" GROUP BY poli.id_poli";
...
@@ -1660,17 +1711,29 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
...
@@ -1660,17 +1711,29 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return$result;
return$result;
}
}
publicfunctionloadAntrian($id=null){
publicfunctionloadAntrian($id_poli){
$result=newResult();
$result=newResult();
try{
try{
$sql="
$sql=" SELECT DISTINCT on (idd.id_dokter) idd.id_dokter,idd.no_antrian,dok.nama_dokter,pol.nama_poli,dok.kode_dokter,rur.nama_ruang FROM antrian_pasien idd
SELECT DISTINCT on (idd.id_dokter) idd.id_dokter,idd.no_antrian,dok.nama_dokter,pol.nama_poli,dok.kode_dokter,rur.nama_ruang ,idd.status_code,idd.id_poli
LEFT JOIN dokter_to_poli dok on idd.id_dokter = dok.id_dokter
FROM antrian_pasien idd
LEFT JOIN poli pol on idd.id_poli = pol.id_poli
LEFT JOIN ruang rur on idd.id_ruang = rur.id_ruang
LEFT JOIN dokter_to_poli dok
on idd.id_dokter = dok.id_dokter
LEFT JOIN poli pol
WHERE idd.id_pasien is not null and status_code=20 or status_code=30 or status_code =40";
<div><inputtype="hidden"value="nomer antrian"id="text-to-speech"placeholder="Enter text to speak..."/></div>
<pclass="error-title"style=" font-weight: ;font-size:50px;font-family: Times New Roman, Times, serif;color: #fff"><span> Nomer</span></p>
<h1class="error-title"style=" font-weight: bold;font-size:100px;font-family: Times New Roman, Times, serif;color: #fff"><spanid="no_antrian"></span></h1>
<pclass="error-title"style=" font-weight: ;font-size:50px;font-family: Times New Roman, Times, serif;color: #fff"><span> Please Proceed To</span></p>
<pclass="error-title"style=" font-weight: ;font-size:50px;font-family: Times New Roman, Times, serif;color: #fff"><spanid="ruang"></span></p>
}elseif($antrian[i]['status_code']==10||$antrian[i]['status_code']==20||$antrian[i]['status_code']==30||$antrian[i]['status_code']==40){//jika antrian sudah terisi