@@ -965,8 +965,16 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
...
@@ -965,8 +965,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";
if($id){
$sql.=" WHERE poli.id_poli=$id";
}
$sql.=" GROUP BY poli.id_poli";
...
@@ -1186,17 +1194,29 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
...
@@ -1186,17 +1194,29 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return$result;
return$result;
}
}
publicfunctionloadAntrian($id=null){
publicfunctionloadAntrian($id){
$result=newResult();
$result=newResult();
try{
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
$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
LEFT JOIN dokter_to_poli dok on idd.id_dokter = dok.id_dokter
on idd.id_dokter = dok.id_dokter
LEFT JOIN poli pol on idd.id_poli = pol.id_poli
LEFT JOIN poli pol
LEFT JOIN ruang rur on idd.id_ruang = rur.id_ruang
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
WHERE idd.id_pasien is not null
and
(cs.status_code=30 or cs.status_code =40) and
idd.id_poli=$id
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>