Commit da8aceac authored by Indra Raja's avatar Indra Raja

integrasi

parent 9f79eea5
...@@ -56,13 +56,6 @@ class AdminController extends \Application\Master\GlobalActionController ...@@ -56,13 +56,6 @@ class AdminController extends \Application\Master\GlobalActionController
$id = $getpath[3]; $id = $getpath[3];
// echo "<pre>";
// print_r($uri);die;
// $storage = \Application\Model\Param\Storage::factory($this->getDb(), $this->getConfig());
// $param = new \Application\Model\Param($storage);
// $curl = curl_init(); // $curl = curl_init();
// curl_setopt_array($curl, array( // curl_setopt_array($curl, array(
...@@ -74,7 +67,7 @@ class AdminController extends \Application\Master\GlobalActionController ...@@ -74,7 +67,7 @@ class AdminController extends \Application\Master\GlobalActionController
// CURLOPT_FOLLOWLOCATION => true, // CURLOPT_FOLLOWLOCATION => true,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, // CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "POST", // CURLOPT_CUSTOMREQUEST => "POST",
// CURLOPT_POSTFIELDS => array('inoantrian' => '1','idok' => '74','istatus' => '30'), // CURLOPT_POSTFIELDS => array('inoantrian' => '7','idok' => '74','istatus' => '40'),
// )); // ));
// $response = curl_exec($curl); // $response = curl_exec($curl);
...@@ -82,37 +75,11 @@ class AdminController extends \Application\Master\GlobalActionController ...@@ -82,37 +75,11 @@ class AdminController extends \Application\Master\GlobalActionController
// curl_close($curl); // curl_close($curl);
// echo $response; // echo $response;
// $data = json_decode(file_get_contents('php://input'),true);
// function curl($url, $data){ // echo $data;
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, $url);
// curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
// curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output = curl_exec($ch);
// curl_close($ch);
// return $output;
// }
// // Data Parameter yang Dikirim oleh cURL
// $data = array("inoantrian"=>"1","idok"=>"74","istatus"=>"40");
// print_r($data); // print_r($data);
// $send = curl("http://queue.indra/api/nextantrian/",json_encode($data));
// echo json_encode(array('respon'=>$send),JSON_UNESCAPED_SLASHES);
$arr = json_decode(file_get_contents("php://input"));
if (empty($arr->inoantrian) OR empty($arr->idok) OR empty($arr->istatus)){
echo "Submit gagal!";
} else {
echo "Submit berhasil!".$arr->inoantrian."</b><b>".$arr->idok."</b>.<b>".$arr->istatus."</b>.";
}
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"'); $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var id = "' . $id . '"'); $this->headScript->appendScript(' var id = "' . $id . '"');
$this->headScript->appendFile('/action-js/antrian-js/action-admin.js'); $this->headScript->appendFile('/action-js/antrian-js/action-admin.js');
...@@ -136,6 +103,8 @@ class AdminController extends \Application\Master\GlobalActionController ...@@ -136,6 +103,8 @@ class AdminController extends \Application\Master\GlobalActionController
$this->layout("layout/layoutAdmin"); $this->layout("layout/layoutAdmin");
return $view; return $view;
} }
public function antrianterlewatAction() public function antrianterlewatAction()
{ {
$this->isLoggedIn(); $this->isLoggedIn();
......
...@@ -87,7 +87,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -87,7 +87,7 @@ class ApiController extends \Application\Master\GlobalActionController {
'alamat' => $alamat, 'alamat' => $alamat,
'no_hp' => $no_hp, 'no_hp' => $no_hp,
'ktp' => $ktp, 'ktp' => $ktp,
'no_rekam_medis' => $norm 'no_rekam_medis' => $norm,
); );
$param->saveGlobal( $dataArrayPasien, $table_pasien); $param->saveGlobal( $dataArrayPasien, $table_pasien);
...@@ -172,7 +172,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -172,7 +172,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$array = array( $array = array(
'datapasien'=> $cekpasien->data 'datapasien'=> $cekpasien->data,
); );
// print_r( $cekpasien) ;die; // print_r( $cekpasien) ;die;
...@@ -451,6 +451,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -451,6 +451,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$result->code = 1; $result->code = 1;
$result->info = 'gagal total'; $result->info = 'gagal total';
} }
// echo '<pre>'; // echo '<pre>';
//print_r($result->data['id_re']['ui']['k'] );die; //print_r($result->data['id_re']['ui']['k'] );die;
...@@ -470,7 +471,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -470,7 +471,7 @@ class ApiController extends \Application\Master\GlobalActionController {
} }
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
public function loadantrianregisterAction(){ public function loadantrianregisterAction(){
$result = new Result(); $result = new Result();
...@@ -746,7 +747,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -746,7 +747,7 @@ class ApiController extends \Application\Master\GlobalActionController {
if (move_uploaded_file($_FILES['fileupload']['tmp_name'],$alamatfile)){ if (move_uploaded_file($_FILES['fileupload']['tmp_name'],$alamatfile)){
/* jika upload berhasil ke folder sever */ /* jika upload berhasil ke folder sever */
$dataArrayPoli = array( $dataArrayPoli = array (
'nama_poli' => $nama_poli, 'nama_poli' => $nama_poli,
'image_poli' => $ImageName, 'image_poli' => $ImageName,
...@@ -924,13 +925,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -924,13 +925,6 @@ class ApiController extends \Application\Master\GlobalActionController {
//print_r($poli);die; //print_r($poli);die;
}catch (\Exception $exc) { }catch (\Exception $exc) {
$result = new Result(0,1,$exc->getMessage() .'-'.$exc->getTraceAsString()); $result = new Result(0,1,$exc->getMessage() .'-'.$exc->getTraceAsString());
} }
...@@ -1383,8 +1377,6 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1383,8 +1377,6 @@ class ApiController extends \Application\Master\GlobalActionController {
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
public function loadpasienAction(){ public function loadpasienAction(){
$result = new Result(); $result = new Result();
$request = $this->getRequest(); $request = $this->getRequest();
...@@ -1425,7 +1417,7 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -1425,7 +1417,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$listdata= array(); $listdata= array();
$listdata = array( $listdata = array (
'poli' =>$load->data, 'poli' =>$load->data,
'condition' =>$loadc->data 'condition' =>$loadc->data
); );
...@@ -2052,4 +2044,4 @@ class ApiController extends \Application\Master\GlobalActionController { ...@@ -2052,4 +2044,4 @@ class ApiController extends \Application\Master\GlobalActionController {
return $this->getOutput($result->toJson()); return $this->getOutput($result->toJson());
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -55,26 +55,6 @@ class UmumController extends \Application\Master\GlobalActionController ...@@ -55,26 +55,6 @@ class UmumController extends \Application\Master\GlobalActionController
$decodeid = base64_decode($getpath[3]); $decodeid = base64_decode($getpath[3]);
// $curl = curl_init();
// curl_setopt_array($curl, array(
// CURLOPT_URL => "http://queue.indra/api/loadantrian?id_poli=$decodeid",
// CURLOPT_RETURNTRANSFER => true,
// CURLOPT_ENCODING => "",
// CURLOPT_MAXREDIRS => 10,
// CURLOPT_TIMEOUT => 0,
// CURLOPT_FOLLOWLOCATION => true,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "POST",
// CURLOPT_POSTFIELDS => array('id_poli' => $decodeid),
// ));
// $response = curl_exec($curl);
// curl_close($curl);
// // echo $response;
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"'); $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var id_poli = "' . $decodeid . '"'); $this->headScript->appendScript(' var id_poli = "' . $decodeid . '"');
...@@ -85,4 +65,5 @@ class UmumController extends \Application\Master\GlobalActionController ...@@ -85,4 +65,5 @@ class UmumController extends \Application\Master\GlobalActionController
} }
} }
\ No newline at end of file
...@@ -440,9 +440,6 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -440,9 +440,6 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return $result; return $result;
} }
public function loaddatapasien($id){
$result = new Result();
try {
public function loadsisaantrian($id,$no){ public function loadsisaantrian($id,$no){
...@@ -486,6 +483,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton { ...@@ -486,6 +483,9 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
} }
return $result; return $result;
} }
public function loaddatapasien($id){
$result = new Result();
try {
$sql = " SELECT * FROM pasien WHERE id_pasien = $id "; $sql = " SELECT * FROM pasien WHERE id_pasien = $id ";
......
...@@ -42,7 +42,7 @@ input::-webkit-inner-spin-button { ...@@ -42,7 +42,7 @@ input::-webkit-inner-spin-button {
<div class="form-group"> <div class="form-group">
<label> <h5>No Rekam Medis</h5></label><br> <label> <h5>No Rekam Medis</h5></label><br>
<input type="number" id="no_rekam_medis" placeholder="No Rekam Medis" class="form-control" max="999999999999999" maxlength="8" ></input> <input type="text" id="no_rekam_medis" placeholder="No Rekam Medis" class="form-control" ></input>
</div> </div>
<!-- <div class="form-group"> <!-- <div class="form-group">
......
const STATUS_QUEUE = 10;
const STATUS_NEXT = 20;
const STATUS_CALL = 30;
const STATUS_SERVED = 40;
const STATUS_DONE = 50;
const STATUS_MISSED = 60;
/* JS comes here */ /* JS comes here */
/* JS comes here */ /* JS comes here */
...@@ -35,7 +26,7 @@ function textToAudioRuang() { ...@@ -35,7 +26,7 @@ function textToAudioRuang() {
var res = ruang.replace(".", " "); var res = ruang.replace(".", " ");
document.getElementById("nama_ruang").innerHTML = res; document.getElementById("nama_ruang").innerHTML = res;
let voice = "silahkan masuk ke ruang " + res; let voice = "silahkan menuju ke ruang " + res;
console.log(voice) console.log(voice)
let speech = new SpeechSynthesisUtterance(); let speech = new SpeechSynthesisUtterance();
......
...@@ -27,6 +27,7 @@ function Loadpoli() { ...@@ -27,6 +27,7 @@ function Loadpoli() {
let data = result.data; let data = result.data;
let counter = 1; let counter = 1;
for (x in data) { for (x in data) {
// console.log(data); // console.log(data);
// var newRow = $("<tr>"); // var newRow = $("<tr>");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment