$sql=" SELECT * FROM pasien WHERE id_pasien = $id ";
...
...
@@ -1342,9 +1386,16 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$sql=" SELECT poli.id_poli, poli.nama_poli
FROM antrian_pasien
INNER JOIN poli
ON antrian_pasien.id_poli = poli.id_poli
GROUP BY poli.id_poli
ORDER BY nama_poli asc";
ON antrian_pasien.id_poli = poli.id_poli ";
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 {
return$result;
}
publicfunctionloadAntrian($id=null){
publicfunctionloadAntrian($id_poli){
$result=newResult();
try{
$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 ,idd.status_code,idd.id_poli
FROM antrian_pasien idd
LEFT JOIN dokter_to_poli dok
on idd.id_dokter = dok.id_dokter
LEFT JOIN poli pol
on idd.id_poli = pol.id_poli
LEFT JOIN ruang rur
on idd.id_ruang = rur.id_ruang
LEFT JOIN counter_status cs
on cs.status_code = idd.status_code
$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
LEFT JOIN dokter_to_poli dok on idd.id_dokter = dok.id_dokter
LEFT JOIN poli pol on idd.id_poli = pol.id_poli
LEFT JOIN ruang rur on idd.id_ruang = rur.id_ruang
WHERE idd.id_pasien is not null
and
(cs.status_code=30 or cs.status_code =40) and
idd.id_poli=$id_poli
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