Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
frontend
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Antrian
frontend
Commits
9ca9842f
Commit
9ca9842f
authored
Sep 28, 2020
by
Azy Mushofy Anwary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mengubah Controller, js dan tampilan pasien
parent
98b4b32f
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
515 additions
and
994 deletions
+515
-994
module/Application/src/Controller/ApiController.php
module/Application/src/Controller/ApiController.php
+119
-27
module/Application/src/Controller/QueueController.php
module/Application/src/Controller/QueueController.php
+77
-14
module/Application/src/Model/Param.php
module/Application/src/Model/Param.php
+16
-2
module/Application/src/Model/Param/Storage/Mysql.php
module/Application/src/Model/Param/Storage/Mysql.php
+125
-15
module/Application/view/application/queue/beranda.phtml
module/Application/view/application/queue/beranda.phtml
+1
-1
module/Application/view/application/queue/cetakantrian.phtml
module/Application/view/application/queue/cetakantrian.phtml
+20
-9
module/Application/view/application/queue/tambahantrian.phtml
...le/Application/view/application/queue/tambahantrian.phtml
+0
-304
module/Application/view/layout/layoutQueue.phtml
module/Application/view/layout/layoutQueue.phtml
+10
-6
public/action-js/antrian-js/action-antrian.js
public/action-js/antrian-js/action-antrian.js
+0
-416
public/action-js/antrian-js/action-cetak.js
public/action-js/antrian-js/action-cetak.js
+19
-139
public/action-js/antrian-js/action-keloladokter.js
public/action-js/antrian-js/action-keloladokter.js
+63
-7
public/action-js/antrian-js/action-kelolapoli.js
public/action-js/antrian-js/action-kelolapoli.js
+62
-51
public/action-js/antrian-js/action-kelolaruang.js
public/action-js/antrian-js/action-kelolaruang.js
+3
-3
No files found.
module/Application/src/Controller/ApiController.php
View file @
9ca9842f
...
@@ -53,7 +53,7 @@ class ApiController extends \Application\Master\GlobalActionController {
...
@@ -53,7 +53,7 @@ class ApiController extends \Application\Master\GlobalActionController {
return
$this
->
getOutput
(
$result
->
toJson
());
return
$this
->
getOutput
(
$result
->
toJson
());
}
}
public
function
savedataAction
(){
public
function
savedata
pasien
Action
(){
$result
=
new
Result
();
$result
=
new
Result
();
$request
=
$this
->
getRequest
();
$request
=
$this
->
getRequest
();
...
@@ -63,12 +63,113 @@ class ApiController extends \Application\Master\GlobalActionController {
...
@@ -63,12 +63,113 @@ class ApiController extends \Application\Master\GlobalActionController {
if
(
$request
->
isPost
())
{
if
(
$request
->
isPost
())
{
$storage
=
\Application\Model\Param\Storage
::
factory
(
$this
->
getDb
(),
$this
->
getConfig
());
$param
=
new
\Application\Model\Param
(
$storage
);
$counter
=
$param
->
getMaxCounter
();
try
{
$idpasien
=
$counter
->
data
;
$nama
=
$post
->
inama
;
$tempat_lahir
=
$post
->
itempat_lahir
;
$tanggal_lahir
=
$post
->
itanggal_lahir
;
$alamat
=
$post
->
ialamat
;
$no_hp
=
$post
->
ino_hp
;
$ktp
=
$post
->
iktp
;
$no_antrian
=
$post
->
ino_antrian
;
$dataArrayPasien
=
array
(
'id_pasien'
=>
$idpasien
,
'create_date'
=>
gmdate
(
"Y-m-d H:i:s"
,
time
()
+
60
*
60
*
7
),
'nama'
=>
$nama
,
'tempat_lahir'
=>
$tempat_lahir
,
'tanggal_lahir'
=>
$tanggal_lahir
,
'alamat'
=>
$alamat
,
'no_hp'
=>
$no_hp
,
'ktp'
=>
$ktp
,
);
$param
->
saveGlobal
(
$dataArrayPasien
,
$table_pasien
);
$result
->
code
=
0
;
$result
->
info
=
'ok'
;
$result
->
data
=
$dataArrayPasien
;
}
catch
(
\Exception
$exc
)
{
$result
=
new
Result
(
0
,
1
,
$exc
->
getMessage
()
.
'-'
.
$exc
->
getTraceAsString
());
}
}
return
$this
->
getOutput
(
$result
->
toJson
());
}
public
function
loaddatapasienAction
(){
$result
=
new
Result
();
$request
=
$this
->
getRequest
();
$post
=
$request
->
getPost
();
//$name = $this->isFieldMandatory(@$data['name'], 'name');
$storage
=
\Application\Model\Param\Storage
::
factory
(
$this
->
getDb
(),
$this
->
getConfig
());
$test
=
new
\Application\Model\Param
(
$storage
);
// print_r($load);die;
$load
=
$test
->
loaddatapasien
(
$post
->
id
);
if
(
$load
->
code
==
0
){
$result
->
code
=
$result
::
CODE_SUCCESS
;
$result
->
info
=
$result
::
INFO_SUCCESS
;
$result
->
data
=
$load
->
data
;
}
else
{
$result
->
code
=
1
;
$result
->
info
=
'Not Found'
;
}
return
$this
->
getOutput
(
$result
->
toJson
());
}
public
function
cekpasienAction
(){
$result
=
new
Result
();
$request
=
$this
->
getRequest
();
$post
=
$request
->
getPost
();
//$name = $this->isFieldMandatory(@$data['name'], 'name');
$storage
=
\Application\Model\Param\Storage
::
factory
(
$this
->
getDb
(),
$this
->
getConfig
());
$test
=
new
\Application\Model\Param
(
$storage
);
$no_rekam_medis
=
$post
->
ino_rekam_medis
;
$cekpasien
=
$test
->
cekpasien
(
$no_rekam_medis
);
// print_r($cekpasien) ;die;
if
(
$cekpasien
->
code
==
0
){
$result
->
code
=
$result
::
CODE_SUCCESS
;
$result
->
info
=
$result
::
INFO_SUCCESS
;
$result
->
data
=
$cekpasien
->
data
;
}
else
{
$result
->
code
=
1
;
$result
->
info
=
'Not Found'
;
}
return
$this
->
getOutput
(
$result
->
toJson
());
}
public
function
savedataAction
(){
$result
=
new
Result
();
$request
=
$this
->
getRequest
();
$post
=
$request
->
getPost
();
if
(
$request
->
isPost
())
{
$storage
=
\Application\Model\Param\Storage
::
factory
(
$this
->
getDb
(),
$this
->
getConfig
());
$storage
=
\Application\Model\Param\Storage
::
factory
(
$this
->
getDb
(),
$this
->
getConfig
());
$param
=
new
\Application\Model\Param
(
$storage
);
$param
=
new
\Application\Model\Param
(
$storage
);
try
{
try
{
$id
=
$post
->
iid
;
$nama
=
$post
->
inama
;
$nama
=
$post
->
inama
;
$tempat_lahir
=
$post
->
itempat_lahir
;
$tempat_lahir
=
$post
->
itempat_lahir
;
$tanggal_lahir
=
$post
->
itanggal_lahir
;
$tanggal_lahir
=
$post
->
itanggal_lahir
;
...
@@ -78,47 +179,38 @@ class ApiController extends \Application\Master\GlobalActionController {
...
@@ -78,47 +179,38 @@ class ApiController extends \Application\Master\GlobalActionController {
$dokter
=
$post
->
idokter
;
$dokter
=
$post
->
idokter
;
$ktp
=
$post
->
iktp
;
$ktp
=
$post
->
iktp
;
$no_antrian
=
$post
->
ino_antrian
;
$no_antrian
=
$post
->
ino_antrian
;
$no_rekam_medis
=
$post
->
ino_rekam_medis
;
// $counter= $param->getMaxCounter();
$counter
=
$param
->
getMaxCounter
();
// print_r($counter);die;
$dataArrayAntrianPasien
=
array
(
$dataArrayAntrianPasien
=
array
(
'id_pasien'
=>
$
counter
->
data
,
'id_pasien'
=>
$
id
,
'create_date'
=>
gmdate
(
"Y-m-d H:i:s"
,
time
()
+
60
*
60
*
7
),
'create_date'
=>
gmdate
(
"Y-m-d H:i:s"
,
time
()
+
60
*
60
*
7
),
'nama'
=>
$nama
,
'nama'
=>
$nama
,
'tempat_lahir'
=>
$tempat_lahir
,
'tempat_lahir'
=>
$tempat_lahir
,
'tanggal_lahir'
=>
$tanggal_lahir
,
'tanggal_lahir'
=>
$tanggal_lahir
,
'alamat'
=>
$alamat
,
'alamat'
=>
$alamat
,
'no_rekam_medis'
=>
$no_rekam_medis
,
'no_hp'
=>
$no_hp
,
'no_hp'
=>
$no_hp
,
'ktp'
=>
$ktp
,
'ktp'
=>
$ktp
,
'status_code'
=>
10
,
'status_code'
=>
10
,
);
);
$dataArrayPasien
=
array
(
'create_date'
=>
gmdate
(
"Y-m-d H:i:s"
,
time
()
+
60
*
60
*
7
),
'nama'
=>
$nama
,
'tempat_lahir'
=>
$tempat_lahir
,
'tanggal_lahir'
=>
$tanggal_lahir
,
'alamat'
=>
$alamat
,
'no_hp'
=>
$no_hp
,
'ktp'
=>
$ktp
,
);
$table_antrianpasien
=
'antrian_pasien'
;
$table_antrianpasien
=
'antrian_pasien'
;
$where
=
'id_dokter='
.
$dokter
.
' and no_antrian='
.
$no_antrian
;
$where
=
'id_dokter='
.
$dokter
.
' and no_antrian='
.
$no_antrian
;
// print_r ();die;
$param
->
updateGlobal
(
$table_antrianpasien
,
$dataArrayAntrianPasien
,
$where
);
$register
=
$param
->
loadregisterantrian
(
$where
);
$param
->
saveGlobal
(
$dataArrayPasien
,
$table_pasien
);
$id_antrian
=
$register
->
data
[
0
][
'id_antrian'
];
$whereidantrian
=
'id_antrian='
.
$id_antrian
;
// print_r($id_antrian);die;
$param
->
updateGlobal
(
$table_antrianpasien
,
$dataArrayAntrianPasien
,
$whereidantrian
);
$result
->
code
=
0
;
$result
->
code
=
0
;
$result
->
info
=
'ok'
;
$result
->
info
=
'ok'
;
$result
->
data
=
$
dataArrayAntrianPasien
;
$result
->
data
=
$
register
->
data
;
}
catch
(
\Exception
$exc
)
{
}
catch
(
\Exception
$exc
)
{
$result
=
new
Result
(
0
,
1
,
$exc
->
getMessage
()
.
'-'
.
$exc
->
getTraceAsString
());
$result
=
new
Result
(
0
,
1
,
$exc
->
getMessage
()
.
'-'
.
$exc
->
getTraceAsString
());
...
@@ -548,7 +640,7 @@ class ApiController extends \Application\Master\GlobalActionController {
...
@@ -548,7 +640,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$result
->
code
=
0
;
$result
->
code
=
0
;
$result
->
info
=
'ok'
;
$result
->
info
=
'ok'
;
$result
->
data
=
$dataArrayPoli
->
data
;
$result
->
data
=
$dataArrayPoli
;
}
catch
(
\Exception
$exc
)
{
}
catch
(
\Exception
$exc
)
{
...
...
module/Application/src/Controller/QueueController.php
View file @
9ca9842f
...
@@ -39,7 +39,23 @@ class QueueController extends \Application\Master\GlobalActionController
...
@@ -39,7 +39,23 @@ class QueueController extends \Application\Master\GlobalActionController
return
$view
;
return
$view
;
}
}
public
function
tambahantrianAction
()
public
function
daftarpasienAction
()
{
$view
=
new
ViewModel
();
$result
=
new
Result
();
/* get url */
$uri
=
$this
->
getRequest
()
->
getUri
();
$baseurl
=
sprintf
(
'//%s'
,
$uri
->
getHost
());
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-daftarpasien.js'
);
$this
->
layout
(
"layout/layoutQueue"
);
return
$view
;
}
public
function
resumecekpasienAction
()
{
{
$view
=
new
ViewModel
();
$view
=
new
ViewModel
();
...
@@ -52,9 +68,32 @@ class QueueController extends \Application\Master\GlobalActionController
...
@@ -52,9 +68,32 @@ class QueueController extends \Application\Master\GlobalActionController
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-antrian.js'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-datapasien.js'
);
$this
->
layout
(
"layout/layoutQueue"
);
return
$view
;
}
public
function
datapasienAction
()
{
$view
=
new
ViewModel
();
$result
=
new
Result
();
/* get url */
$uri
=
$this
->
getRequest
()
->
getUri
();
$baseurl
=
sprintf
(
'//%s'
,
$uri
->
getHost
());
$baseurl
=
sprintf
(
'//%s'
,
$uri
->
getHost
());
$getpath
=
explode
(
"/"
,
$uri
->
getPath
());
$decodeid
=
base64_decode
(
$getpath
[
3
]);
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendScript
(
' var id = "'
.
$decodeid
.
'"'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-datapasien.js'
);
$this
->
layout
(
"layout/layoutQueue"
);
$this
->
layout
(
"layout/layoutQueue"
);
return
$view
;
return
$view
;
...
@@ -91,6 +130,23 @@ class QueueController extends \Application\Master\GlobalActionController
...
@@ -91,6 +130,23 @@ class QueueController extends \Application\Master\GlobalActionController
$this
->
layout
(
"layout/layoutQueue"
);
$this
->
layout
(
"layout/layoutQueue"
);
return
$view
;
return
$view
;
}
}
public
function
cekdatapasienAction
()
{
$view
=
new
ViewModel
();
$result
=
new
Result
();
/* get url */
$uri
=
$this
->
getRequest
()
->
getUri
();
$baseurl
=
sprintf
(
'//%s'
,
$uri
->
getHost
());
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-cekdatapasien.js'
);
$this
->
layout
(
"layout/layoutQueue"
);
return
$view
;
}
public
function
cetakantrianAction
()
public
function
cetakantrianAction
()
{
{
...
@@ -99,29 +155,35 @@ class QueueController extends \Application\Master\GlobalActionController
...
@@ -99,29 +155,35 @@ class QueueController extends \Application\Master\GlobalActionController
/* get url */
/* get url */
$uri
=
$this
->
getRequest
()
->
getUri
();
$uri
=
$this
->
getRequest
()
->
getUri
();
//echo "<pre>";
//echo "<pre>";
//print_r($uri);die;
//print_r($uri);die;
$baseurl
=
sprintf
(
'//%s'
,
$uri
->
getHost
());
$baseurl
=
sprintf
(
'//%s'
,
$uri
->
getHost
());
$getpath
=
explode
(
"/"
,
$uri
->
getPath
());
$getpath
=
explode
(
"/"
,
$uri
->
getPath
());
$decodeid
=
base64_decode
(
$getpath
[
3
]);
$decodeid
=
base64_decode
(
$getpath
[
3
]);
// print_r ($decodeid);die;
// $a = $getpath[3];
$decodeiddok
=
base64_decode
(
$getpath
[
4
]);
// $decodeidpol = base64_decode($getpath[5]);
// $decodeidant = base64_decode($getpath[6]);
// print_r($decodeiddok );die;
$storage
=
\Application\Model\Param\Storage
::
factory
(
$this
->
getDb
(),
$this
->
getConfig
());
$storage
=
\Application\Model\Param\Storage
::
factory
(
$this
->
getDb
(),
$this
->
getConfig
());
$param
=
new
\Application\Model\Param
(
$storage
);
$param
=
new
\Application\Model\Param
(
$storage
);
$id
=
$decodeid
;
$id
=
$decodeid
;
// $iddok = $decodeiddok ;
/* generate counter number */
/* generate counter number */
$codeCounter
=
$param
->
loadUser
(
$id
);
$codeCounter
=
$param
->
loadUser
(
$id
);
// print_r($codeCounter);die;
// print_r($codeCounter);die;
foreach
(
$codeCounter
->
data
as
$result
)
{
foreach
(
$codeCounter
->
data
as
$result
)
{
// echo $result['id_pasien'], '<br>';
// echo $result['nama'], '<br>';
// echo $result['id_poli'], '<br>';
// echo $result['id_dokter'], '<br>';
}
}
//print_r($codeCounter);die;
//print_r($codeCounter);die;
$view
->
setVariable
(
'no_rekam_medis'
,
$result
[
'no_rekam_medis'
]);
$view
->
setVariable
(
'nama'
,
$result
[
'nama'
]);
$view
->
setVariable
(
'nama'
,
$result
[
'nama'
]);
$view
->
setVariable
(
'nama_dokter'
,
$result
[
'nama_dokter'
]);
$view
->
setVariable
(
'nama_dokter'
,
$result
[
'nama_dokter'
]);
$view
->
setVariable
(
'kode_poli'
,
$result
[
'nama_poli'
]);
$view
->
setVariable
(
'kode_poli'
,
$result
[
'nama_poli'
]);
...
@@ -132,12 +194,13 @@ class QueueController extends \Application\Master\GlobalActionController
...
@@ -132,12 +194,13 @@ class QueueController extends \Application\Master\GlobalActionController
// print_r($result);die;
// print_r($result);die;
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendScript
(
' var no_rekam_medis_cetak = "'
.
$result
[
'no_rekam_medis'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var nama_pasien_cetak = "'
.
$result
[
'nama'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var nama_pasien_cetak = "'
.
$result
[
'nama'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var nama_dokter_cetak = "'
.
$result
[
'nama_dokter'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var nama_dokter_cetak = "'
.
$result
[
'nama_dokter'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var kode_poli_cetak = "'
.
$result
[
'nama_poli'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var kode_poli_cetak = "'
.
$result
[
'nama_poli'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var no_antrian_cetak = "'
.
$result
[
'no_antrian'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var no_antrian_cetak = "'
.
$result
[
'no_antrian'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var kode_dokter_cetak = "'
.
$result
[
'kode_dokter'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var kode_dokter_cetak = "'
.
$result
[
'kode_dokter'
]
.
'"'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-
antrian
.js'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-
cetak
.js'
);
$this
->
layout
(
"layout/layoutQueue"
);
$this
->
layout
(
"layout/layoutQueue"
);
return
$view
;
return
$view
;
...
...
module/Application/src/Model/Param.php
View file @
9ca9842f
...
@@ -41,6 +41,11 @@ class Param extends Mapper {
...
@@ -41,6 +41,11 @@ class Param extends Mapper {
$data
=
$this
->
_storage
->
saveGlobal
(
$param
,
$table
);
$data
=
$this
->
_storage
->
saveGlobal
(
$param
,
$table
);
return
$data
;
return
$data
;
}
}
public
function
loadregisterantrian
(
$where
){
$data
=
$this
->
_storage
->
getRegister
(
$where
);
return
$data
;
}
public
function
updateGlobal
(
$tabel
,
$data
,
$where
){
public
function
updateGlobal
(
$tabel
,
$data
,
$where
){
$data
=
$this
->
_storage
->
updateGlobal
(
$tabel
,
$data
,
$where
);
$data
=
$this
->
_storage
->
updateGlobal
(
$tabel
,
$data
,
$where
);
...
@@ -52,10 +57,19 @@ class Param extends Mapper {
...
@@ -52,10 +57,19 @@ class Param extends Mapper {
return
$data
;
return
$data
;
}
}
public
function
loadUser
(
$id
=
null
){
public
function
loadUser
(
$id
=
null
,
$iddok
=
null
){
$data
=
$this
->
_storage
->
loadUserData
(
$id
);
$data
=
$this
->
_storage
->
loadUserData
(
$id
,
$iddok
);
return
$data
;
}
public
function
loaddatapasien
(
$id
){
$data
=
$this
->
_storage
->
loaddatapasien
(
$id
);
return
$data
;
}
public
function
cekpasien
(
$no_rekam_medis
=
null
){
$data
=
$this
->
_storage
->
cekpasien
(
$no_rekam_medis
);
return
$data
;
return
$data
;
}
}
public
function
loadRegisterPoli
(
$id
=
null
){
public
function
loadRegisterPoli
(
$id
=
null
){
$data
=
$this
->
_storage
->
loadRegisterPoli
(
$id
);
$data
=
$this
->
_storage
->
loadRegisterPoli
(
$id
);
return
$data
;
return
$data
;
...
...
module/Application/src/Model/Param/Storage/Mysql.php
View file @
9ca9842f
...
@@ -318,22 +318,19 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
...
@@ -318,22 +318,19 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
}
}
/* load data user */
/* load data user */
public
function
loadUserData
(
$id
=
null
){
public
function
loadUserData
(
$id
){
$result
=
new
Result
();
$result
=
new
Result
();
try
{
try
{
$sql
=
" SELECT antrian_pasien.nama, antrian_pasien.no_antrian, dokter_to_poli.nama_dokter, poli.nama_poli , dokter_to_poli.kode_dokter
$sql
=
" SELECT antrian_pasien.nama, antrian_pasien.no_antrian,antrian_pasien.no_rekam_medis, dokter_to_poli.nama_dokter, poli.nama_poli , dokter_to_poli.kode_dokter,antrian_pasien.id_pasien, dokter_to_poli.id_dokter
FROM antrian_pasien
FROM antrian_pasien
-- INNER JOIN pasien
INNER JOIN dokter_to_poli
-- ON pasien.id_pasien = pasien.id_pasien
ON antrian_pasien.id_dokter = dokter_to_poli.id_dokter
INNER JOIN dokter_to_poli
INNER JOIN poli
ON antrian_pasien.id_dokter = dokter_to_poli.id_dokter
ON antrian_pasien.id_poli = poli.id_poli
INNER JOIN poli
WHERE antrian_pasien.id_antrian =
$id
ON antrian_pasien.id_poli = poli.id_poli"
;
"
;
//print_r($sql);die;
$stmt
=
$this
->
_db
->
query
(
$sql
);
$stmt
=
$this
->
_db
->
query
(
$sql
);
$resdata
=
$stmt
->
execute
();
$resdata
=
$stmt
->
execute
();
...
@@ -368,7 +365,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
...
@@ -368,7 +365,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result
=
new
Result
();
$result
=
new
Result
();
try
{
try
{
$sql
=
" SELECT coalesce(MAX(id_pasien), 0) AS maxid FROM
antrian_pasien
"
;
$sql
=
" SELECT coalesce(MAX(id_pasien), 0) AS maxid FROM
pasien
"
;
$stmt
=
$this
->
_db
->
query
(
$sql
);
$stmt
=
$this
->
_db
->
query
(
$sql
);
$resdata
=
$stmt
->
execute
();
$resdata
=
$stmt
->
execute
();
...
@@ -396,7 +393,120 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
...
@@ -396,7 +393,120 @@ 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
"
;
// print_r($sql);die;
$stmt
=
$this
->
_db
->
query
(
$sql
);
$resdata
=
$stmt
->
execute
();
$listdata
=
array
();
foreach
(
$resdata
as
$val
){
// print_r($val);die;
array_push
(
$listdata
,
$val
);
}
if
(
$listdata
)
{
$result
->
code
=
0
;
$result
->
info
=
'OK'
;
$result
->
data
=
$listdata
;
}
else
{
$result
->
code
=
1
;
$result
->
info
=
'nok'
;
}
}
catch
(
\Zend\Db\Adapter\Exception\RuntimeException
$ex
)
{
$result
->
code
=
3
;
$result
->
info
=
'ERROR : '
.
$ex
->
getMessage
();
}
catch
(
\Exception
$ex
)
{
$result
->
code
=
4
;
$result
->
info
=
'ERROR : '
.
$ex
->
getMessage
();
}
return
$result
;
}
public
function
getRegister
(
$where
){
$result
=
new
Result
();
try
{
$sql
=
"SELECT id_antrian, id_dokter, no_antrian FROM antrian_pasien WHERE
$where
"
;
// print_r($sql);die;
$stmt
=
$this
->
_db
->
query
(
$sql
);
$resdata
=
$stmt
->
execute
();
$listdata
=
array
();
foreach
(
$resdata
as
$val
){
array_push
(
$listdata
,
$val
);
}
if
(
$listdata
)
{
$result
->
code
=
0
;
$result
->
info
=
'OK'
;
$result
->
data
=
$listdata
;
}
else
{
$result
->
code
=
1
;
$result
->
info
=
'nok'
;
}
}
catch
(
\Zend\Db\Adapter\Exception\RuntimeException
$ex
)
{
$result
->
code
=
3
;
$result
->
info
=
'ERROR : '
.
$ex
->
getMessage
();
}
catch
(
\Exception
$ex
)
{
$result
->
code
=
4
;
$result
->
info
=
'ERROR : '
.
$ex
->
getMessage
();
}
return
$result
;
}
public
function
cekpasien
(
$no_rekam_medis
){
$result
=
new
Result
();
try
{
$sql
=
" SELECT p.id_pasien, ap.no_rekam_medis, ap.status_code,ap.no_antrian ,ap.no_antrian, ap.id_antrian,ap.nama FROM pasien p
LEFT JOIN antrian_pasien ap
ON ap.id_pasien = p.id_pasien
WHERE p.no_rekam_medis='
$no_rekam_medis
' "
;
// print_r($sql);die;
$stmt
=
$this
->
_db
->
query
(
$sql
);
$resdata
=
$stmt
->
execute
();
$listdata
=
array
();
foreach
(
$resdata
as
$val
){
array_push
(
$listdata
,
$val
);
}
if
(
$listdata
!=
null
)
{
$result
->
code
=
0
;
$result
->
info
=
'OK'
;
$result
->
data
=
$listdata
;
}
else
{
$result
->
code
=
1
;
$result
->
info
=
'nok'
;
}
}
catch
(
\Zend\Db\Adapter\Exception\RuntimeException
$ex
)
{
$result
->
code
=
3
;
$result
->
info
=
'ERROR : '
.
$ex
->
getMessage
();
}
catch
(
\Exception
$ex
)
{
$result
->
code
=
4
;
$result
->
info
=
'ERROR : '
.
$ex
->
getMessage
();
}
return
$result
;
}
public
function
loadRegisterPoli
(
$id
=
null
){
public
function
loadRegisterPoli
(
$id
=
null
){
$result
=
new
Result
();
$result
=
new
Result
();
try
{
try
{
...
...
module/Application/view/application/queue/beranda.phtml
View file @
9ca9842f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing
elit sed do eiusmod tempor incididunt ut labore et dolore
elit sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Quis ipsum suspendisse ultrices gravida.Risus cmodo viverra
</p>
magna aliqua. Quis ipsum suspendisse ultrices gravida.Risus cmodo viverra
</p>
<a
href=
"
<?php
echo
$this
->
basePath
(
'queue/
tambahantrian'
);
?>
"
class=
"btn_2"
>
Daftar
Antrian
</a>
<a
href=
"
<?php
echo
$this
->
basePath
(
'queue/
cekdatapasien'
);
?>
"
class=
"btn_2"
>
Registrai
Antrian
</a>
</div>
</div>
</div>
</div>
...
...
module/Application/view/application/queue/cetakantrian.phtml
View file @
9ca9842f
<!DOCTYPE html>
<hr>
<hr>
<hr>
<hr>
<br>
<br>
<br>
<br>
<section
class=
"breadcrumb_part breadcrumb_bg"
>
<section
class=
"breadcrumb_part breadcrumb_bg"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
@@ -26,10 +25,22 @@
...
@@ -26,10 +25,22 @@
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
<div
class=
"card-header"
>
<h
1></h1
>
<h
2>
Data Pasien
</h2
>
</div>
</div>
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<div
class=
"panel panel-white"
id=
"print"
>
<div
class=
"panel panel-white"
id=
"print"
>
<div
class=
"row"
>
<div
class=
"col-sm-2"
>
<h3>
No Rekam Medis
</h3>
</div>
<div
class=
"col-sm-1"
>
<h3>
:
</h3>
</div>
<div
class=
"col-sm-6"
>
<h3>
<?php
echo
$this
->
no_rekam_medis
?>
</h3>
</div>
</div>
<br>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-2"
>
<div
class=
"col-sm-2"
>
<h3>
Nama pasien
</h3>
<h3>
Nama pasien
</h3>
...
@@ -82,12 +93,12 @@
...
@@ -82,12 +93,12 @@
</div>
</div>
</div>
</div>
<div
class=
"card-
title
"
>
<div
class=
"card-
footer
"
>
<p
class=
"card-text"
></p>
<p
class=
"card-text"
></p>
<button
id=
"cetak"
class=
"btn btn-primary"
>
Cetak
</button>
<button
id=
"cetak"
class=
"btn btn-primary"
style=
"float: right;"
>
Cetak
</button>
</div>
</div>
</div>
</div>
<
/html
>
<
br
>
...
...
module/Application/view/application/queue/tambahantrian.phtml
deleted
100644 → 0
View file @
98b4b32f
<!DOCTYPE html>
<html>
<style>
/* Chrome, Safari, Edge, Opera */
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
;
margin
:
0
;
}
/* Firefox */
input
[
type
=
number
]
{
-moz-appearance
:
textfield
;
}
.buttons
input
[
type
=
"radio"
]
{
display
:
none
;
}
.buttons
input
[
type
=
"picked"
]
{
display
:
none
;
}
.buttons
input
[
type
=
"done"
]
{
display
:
none
;
}
input
[
type
=
"radio"
]
:checked
+
label
{
padding
:
15px
;
color
:
#fff
;
font-size
:
25px
;
background
:
#7FFF00
;
width
:
55px
;
text-align
:
center
;
}
input
[
type
=
"radioo"
]
+
label
{
padding
:
15px
;
background
:
#fff
;
color
:
black
;
font-size
:
25px
;
width
:
1080px
;
text-align
:
center
;
}
input
[
type
=
"radio"
]
+
label
{
padding
:
15px
;
background
:
#007bff
;
color
:
#fff
;
font-size
:
25px
;
width
:
55px
;
text-align
:
center
;
}
input
[
type
=
"picked"
]
+
label
{
padding
:
15px
;
background
:
#FF0000
;
color
:
#fff
;
font-size
:
25px
;
width
:
55px
;
cursor
:
not-allowed
;
text-align
:
center
;
}
input
[
type
=
"done"
]
+
label
{
padding
:
15px
;
background
:
#808080
;
color
:
#fff
;
font-size
:
25px
;
width
:
55px
;
cursor
:
not-allowed
;
text-align
:
center
;
}
.table1
tr
th
{
background
:
#007bff
;
color
:
#fff
;
}
.table1
,
th
,
td
{
padding
:
10px
20px
;
text-align
:
center
;
}
.table2
tr
th
{
background
:
#7FFF00
;
color
:
#fff
;
}
.table2
,
th
,
td
{
padding
:
10px
20px
;
text-align
:
center
;
}
.table3
tr
th
{
background
:
#FF0000
;
color
:
#fff
;
}
.table3
,
th
,
td
{
padding
:
10px
20px
;
text-align
:
center
;
}
.table4
tr
th
{
background
:
#808080
;
color
:
#fff
;
}
.table4
,
th
,
td
{
padding
:
10px
20px
;
text-align
:
center
;
}
</style>
<body>
<!-- breadcrumb start-->
<hr>
<hr>
<hr>
<hr>
<section
class=
"breadcrumb_part breadcrumb_bg"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"breadcrumb_iner"
>
<div
class=
"breadcrumb_iner_item"
>
<h2>
Daftar
</h2>
<h2>
Antrian
</h2>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- breadcrumb start-->
<div
class=
"container"
>
<form
id=
"myForm"
>
<input
type=
"hidden"
id=
"iInput"
class=
"form-control"
/></input>
<div
class=
"form-group"
>
<label>
KTP
</label>
<input
type=
"number"
id=
"ktp"
class=
"form-control"
placeholder=
"KTP"
minlength=
"8"
maxlength=
"10"
/></input>
</div>
<div
class=
"form-group"
>
<label>
Nama pasien
</label>
<input
type=
"text"
id=
"nama"
class=
"form-control"
placeholder=
"Nama Lengkap"
required
/></input>
</div>
<div
class=
"form-group "
>
<label>
Tempat lahir
</label>
<textarea
type=
"text"
id=
"tempat_lahir"
class=
"form-control "
placeholder=
"Tempat Lahir"
/></textarea
>
</div>
<div
class=
"form-group"
>
<label>
Tanggal lahir
</label>
<input
type=
"date"
id=
"tanggal_lahir"
class=
"form-control"
/></input>
</div>
<div
class=
"form-group"
>
<label>
Alamat
</label>
<textarea
type=
"text"
id=
"alamat"
rows=
"3"
class=
"form-control"
placeholder=
"Alamat"
/></textarea
>
</div>
<div
class=
"form-group"
>
<label>
No Hp
</label>
<input
type=
"number"
id=
"no_hp"
class=
"form-control "
placeholder=
"No Handphone"
maxlength=
"13"
/></input>
</div>
<div
class=
"form-group"
>
<label>
Pilih poli
</label><br>
<select
name=
"nama_poli"
id=
"poli"
class=
"form-control"
>
<option
disabled
selected
>
Pilih
</option>
</select>
</div>
<div
class=
"form-group"
>
<label>
Pilih dokter
</label>
<br>
<select
id=
"dokter"
name=
"nama_dokter"
class=
"form-control"
>
<option
disabled
selected
>
Pilih
</option>
</select>
<br>
</div>
</form>
</div>
</div>
<div
class=
"container"
>
<button
type=
"button"
id=
"pilihno"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
"#pilihantrian"
>
Daftar Antrian
</button>
</div>
</div>
<!-- Trigger the modal with a button -->
<!-- Modal -->
<div
class=
"modal fade modalPalingesar"
id=
"pilihantrian"
tabindex=
"-1"
role=
"dialog"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-xl"
>
<!-- Modal content-->
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"-close"
data-dismiss=
"modal"
>
×
</button>
<h4
class=
"modal-title"
>
Daftar Antrian
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"row col-lg-12 antrian"
id=
"seat"
>
</div>
<div
class=
"modal-footer"
>
<div
class=
"container"
>
<div
class=
"row col-lg-12"
>
<div
class=
"col-sm-3"
>
<h6>
Antrian Belum Dipilih
</h6>
</div>
<div
class=
"col-sm-1"
>
<h6>
:
</h6>
</div>
<div>
<table
class=
"table1"
><tr><th></th></tr></table>
</div>
</div>
<div
class=
"row col-lg-12"
>
<div
class=
"col-sm-3"
>
<h6>
Antrian Yang Dipilih
</h6>
</div>
<div
class=
"col-sm-1"
>
<h6>
:
</h6>
</div>
<div>
<table
class=
"table2"
><tr><th></th></tr></table>
</div>
</div>
<div
class=
"row col-lg-12"
>
<div
class=
"col-sm-3"
>
<h6>
Antrian Telah Diisi
</h6>
</div>
<div
class=
"col-sm-1"
>
<h6>
:
</h6>
</div>
<div>
<table
class=
"table3"
><tr><th></th></tr></table>
</div>
</div>
<div
class=
"row col-lg-12"
>
<div
class=
"col-sm-3"
>
<h6>
Antrian Telah Selesai
</h6>
</div>
<div
class=
"col-sm-1"
>
<h6>
:
</h6>
</div>
<div>
<table
class=
"table4"
><tr><th></th></tr></table>
</div>
</div>
</div>
<button
button
type=
"button"
class=
"btn btn-primary"
id=
"tambah"
>
Selesai
</button>
<button
type=
"button"
id=
"close"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Close
</button>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
module/Application/view/layout/layoutQueue.phtml
View file @
9ca9842f
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/themify-icons.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/themify-icons.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/flaticon.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/flaticon.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/magnific-popup.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/magnific-popup.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplateadmin/css/swich-alert.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/nice-select.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/nice-select.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/bootstrap.min.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/bootstrap.min.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/bootstrap.min.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/bootstrap.min.css'
))
...
@@ -65,17 +66,18 @@
...
@@ -65,17 +66,18 @@
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/beranda'
)
?>
"
>
Beranda
</a>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/beranda'
)
?>
"
>
Beranda
</a>
</li>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/
tambahantrian'
)
?>
"
>
Daftar Antrian
</a>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/
cekdatapasien'
)
?>
"
>
Registrasi
</a>
</li>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="
<?php
echo
$this
->
basePath
(
'queue/'
)
?>
">Pilih Antrian</a>
</li> -->
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/dokter'
)
?>
"
>
Doctors
</a>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/dokter'
)
?>
"
>
Doctors
</a>
</li>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/poli'
)
?>
"
>
Poli
</a>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/poli'
)
?>
"
>
Poli
</a>
</li>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"contact.html"
>
Tentang Kami
</a>
</li>
</ul>
</ul>
</div>
</div>
</nav>
</nav>
...
@@ -102,7 +104,7 @@
...
@@ -102,7 +104,7 @@
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row justify-content-between"
>
<div
class=
"row justify-content-between"
>
<div
class=
"col-xl-2 col-md-4 col-sm-6 single-footer-widget"
>
<div
class=
"col-xl-2 col-md-4 col-sm-6 single-footer-widget"
>
<a
href=
"#"
class=
"footer_logo"
>
<img
src=
"
<?php
$this
->
basePath
(
'queue/
listdat
a'
)
?>
/tamplate/img/logo.png"
alt=
"#"
>
</a>
<a
href=
"#"
class=
"footer_logo"
>
<img
src=
"
<?php
$this
->
basePath
(
'queue/
berand
a'
)
?>
/tamplate/img/logo.png"
alt=
"#"
>
</a>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
</p>
<div
class=
"social_logo"
>
<div
class=
"social_logo"
>
<a
href=
"#"
><i
class=
"ti-facebook"
></i></a>
<a
href=
"#"
><i
class=
"ti-facebook"
></i></a>
...
@@ -115,7 +117,7 @@
...
@@ -115,7 +117,7 @@
<h4>
Quick Links
</h4>
<h4>
Quick Links
</h4>
<ul>
<ul>
<li><a
href=
"#"
>
Beranda
</a></li>
<li><a
href=
"#"
>
Beranda
</a></li>
<li><a
href=
"#"
>
Daftar
Antrian
</a></li>
<li><a
href=
"#"
>
Registrasi
Antrian
</a></li>
<li><a
href=
"#"
>
Dokter
</a></li>
<li><a
href=
"#"
>
Dokter
</a></li>
<li><a
href=
"#"
>
Poli
</a></li>
<li><a
href=
"#"
>
Poli
</a></li>
<li><a
href=
"#"
>
Tentang Kami
</a></li>
<li><a
href=
"#"
>
Tentang Kami
</a></li>
...
@@ -171,6 +173,8 @@
...
@@ -171,6 +173,8 @@
<script
src=
"
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/jquery.form.js"
></script>
<script
src=
"
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/jquery.form.js"
></script>
<script
src=
"
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/jquery.validate.min.js"
></script>
<script
src=
"
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/jquery.validate.min.js"
></script>
<script
src=
"
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/mail-script.js"
></script>
<script
src=
"
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/mail-script.js"
></script>
<script
src=
"
<?php
$this
->
basePath
();
?>
/tamplateadmin/assets/js/plugins/notifications/sweet_alert.min.js"
></script>
<!-- <script src="
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/bootbox.all.min.js"></script> -->
<!-- <script src="
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/bootbox.all.min.js"></script> -->
<!-- <script src="
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/custom.js"></script> -->
<!-- <script src="
<?php
echo
$this
->
basePath
();
?>
/tamplate/js/custom.js"></script> -->
...
...
public/action-js/antrian-js/action-antrian.js
deleted
100644 → 0
View file @
98b4b32f
This diff is collapsed.
Click to expand it.
public/action-js/antrian-js/action-cetak.js
View file @
9ca9842f
// jQuery(document).ready(function () {
// $('[data-toggle="tooltip"]').tooltip();
// $('[data-toggle="popover"]').popover();
// $('#iInput').keyboard({
$
(
'
#cetak
'
).
on
(
'
click
'
,
function
(
e
)
{
//alert("kepanggil");
// //theme: 'default',
e
.
preventDefault
();
var
w
=
window
.
open
(
''
,
''
,
'
width=300,height=400
'
);
// //is_hidden: false,
w
.
document
.
write
(
'
<html><body><table border="" >
'
+
'
<tr><th><h1>SELAMAT DATANG</h1><h2> Di Rumah Sakit</h2></th></tr></thead>
'
+
// //close_speed: 1000,
'
<tbody><tr>
'
+
'
<th><h2>ANTRIAN</h2>
'
+
// //enabled: false,
'
<h1>
'
+
kode_dokter_cetak
+
+
no_antrian_cetak
+
'
</h1>
'
+
'
<h3>Nama Pasien :
'
+
nama_pasien_cetak
+
'
</h3>
'
+
// //layout: 'en_US',
'
<h3>Poli :
'
+
kode_poli_cetak
+
'
</h3>
'
+
'
<h3>Nama Dokter :
'
+
nama_dokter_cetak
+
'
</h3>
'
+
// // definimos un trigger al keyboard.
'
</th></tr></tbody></table></body></html>
'
);
// // Al hacer click sobre el selector que tenga el id (#) o la clase (.) definida
w
.
window
.
print
();
// // se ocultara o mostrara el keyboard segun corresponda.
w
.
document
.
close
();
// trigger: '#buttom1'
return
false
;
// });
// // Guardo en la variable 'keyboard' (puede ser cualkier otro nombre), la instancia del plugin creada,
})
// // para asi acceder a los metodos publicos del plugin
\ No newline at end of file
// var keyboard = $('#iInput').data('pluginKeyboard');
// // A partir de aqui inicializo los valores del cajon de 'Configuration Options' que vemos,
// // para que los campos tengan los valores con los que se creo la instancia del plugin.
// $('#hiddenCheck').attr('checked', !keyboard.getHidden()); // CheckBox k oculta o muestra el keyboard
// $('#openSpeedInput').val(keyboard.getOpenSpeed()); // Valor en milisegundos de la velocidad con que se muestra el keyboard
// $('#closeSpeedInput').val(keyboard.getCloseSpeed()); // Valor en milisegundos de la velocidad con que se oculta el keyboard
// keyboard.SubmitKey = function () { // Definimos que accion realizar al presionar la tecla 'Submit'.
// //alert('Presionada la tecla Enter');
// };
// keyboard.EnterKey = function () { // Definimos que accion realizar al presionar la tecla 'Submit'.
// // alert('Presionada la tecla Enter');
// };
// // Cambiamos el tema del teclado de acuerdo al valor que este seleccionado en el campo 'Select' del Tema.
// // De momento solo tres temas, estoy trabajando en mejorarlos y agregar 2 temas más.
// $('#themeSelect').change(function () {
// $(this).find(':selected').each(function () {
// keyboard.setTheme($('#themeSelect').val());
// })
// });
// // Definimos que al hacer click en el checkbox de 'Habilitar Keyboard' se bloquee o desbloquee el keyboard
// $('#enabledCheck').change(function () {
// keyboard.setEnabled(!keyboard.getEnabled());
// });
// // Definimos que al hacer click en el checkbox de 'Mostrar Keyboard' se muestro u oculte el keyboard
// $('#hiddenCheck').change(function () {
// keyboard.setHidden($(this).is(':checked'));
// });
// // Cambiamos la velocidad con que se muestra el keyboard al cambiar el valor del campo 'Open Speed', el valor esta en milisegundos
// $('#openSpeedInput').change(function () {
// keyboard.setOpenSpeed($(this).val());
// });
// // Cambiamos la velocidad con que se oculta el keyboard al cambiar el valor del campo 'Close Speed', el valor esta en milisegundos
// $('#closeSpeedInput').change(function () {
// keyboard.setCloseSpeed($(this).val());
// });
// $('.enter').click(function () {
// var $valInput = $('#iInput').val();
// if ($valInput) {
// keyboard.setHidden($(this).is(':checked'));
// $('#idTemp').text($valInput);
// $('#content-insert').css('display', 'none');
// $('#content-service').css('display', 'block');
// } else {
// $('#content-service').css('display', 'none');
// $('#content-insert').css('display', 'block');
// }
// });
// $('#iInput').click(function () {
// //keyboard.setEnabled(!keyboard.getEnabled());
// })
// });
$
(
'
#cetak
'
).
on
(
'
click
'
,
function
()
{
CetakAntrian
();
})
function
CetakAntrian
()
{
let
$ktp
=
$
(
'
#ktp
'
).
val
();
let
$no_antrian
=
$
(
'
#no_antrian
'
).
val
();
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/cetakantrian
'
,
data
:
{
iktp
:
$ktp
,
ino_antrian
:
$no_antrian
,
},
success
:
function
(
result
)
{
alert
(
"
berhasil
"
);
},
error
:
function
(
xhr
)
{
alert
(
xhr
.
status
+
'
-
'
+
xhr
.
statusText
);
}
// success: function (result) { //console.log(result);
// swal({
// title: "<span style='color:#222'>Good job!</span>",
// text: "You clicked the button!",
// confirmButtonColor: "#66BB6A",
// html: true,
// type: "success"
// });
// },
// error: function (xhr) {
// //alert(xhr.status+'-'+xhr.statusText);
// if (xhr.status != 200) {
// swal({
// title: "<span style='color:#222'>Oh!</span>",
// text: "You clicked the button!",
// confirmButtonColor: "#66BB6A",
// html: true,
// type: "warning"
// });
// }
// }
});
}
\ No newline at end of file
public/action-js/antrian-js/action-keloladokter.js
View file @
9ca9842f
...
@@ -117,7 +117,18 @@ $('#tambahmodal').on('click', function () {
...
@@ -117,7 +117,18 @@ $('#tambahmodal').on('click', function () {
})
})
$
(
'
#tambah
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#tambah
'
).
on
(
'
click
'
,
function
()
{
savedokter
()
var
nama_dokter
=
document
.
getElementById
(
"
nama_dokter
"
).
value
;
var
kode_dokter
=
document
.
getElementById
(
"
kode_dokter
"
).
value
;
if
(
validasidokter
(
nama_dokter
,
kode_dokter
)
==
1
)
{
bootbox
.
alert
({
message
:
'
Nama Dokter Sudah Ada!
'
,
centerVertical
:
true
});
}
else
if
(
validasidokter
(
nama_dokter
,
kode_dokter
)
==
2
)
{
bootbox
.
alert
({
message
:
'
Kode Dokter Sudah Ada!
'
,
centerVertical
:
true
});
}
else
{
savedokter
()
}
})
})
...
@@ -175,14 +186,59 @@ function savedokter() {
...
@@ -175,14 +186,59 @@ function savedokter() {
});
});
}
}
function
validasidokter
(
nama_dokter
,
kode_dokter
)
{
var
exist
=
0
;
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/loadkeloladokter
'
,
async
:
false
,
data
:
{
id
:
null
,
},
success
:
function
(
result
)
{
console
.
log
(
result
)
var
data
=
result
.
data
;
for
(
x
in
data
)
{
if
(
nama_dokter
==
data
[
x
][
'
nama_dokter
'
])
{
exist
=
1
;
}
if
(
kode_dokter
==
data
[
x
][
'
kode_dokter
'
])
{
exist
=
2
;
}
}
},
error
:
function
(
xhr
)
{
//alert(xhr.status+'-'+xhr.statusText);
}
});
return
exist
;
}
$
(
'
#edit
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#edit
'
).
on
(
'
click
'
,
function
()
{
let
id_dokter
=
$
(
'
#id_dokter
'
).
val
();
let
id_dokter
=
$
(
'
#id_dokter
'
).
val
();
var
nama_dokter
=
document
.
getElementById
(
"
nama_dokteredt
"
).
value
;
var
kode_dokter
=
document
.
getElementById
(
"
kode_dokteredt
"
).
value
;
if
(
validasidokter
(
nama_dokter
,
kode_dokter
)
==
1
)
{
bootbox
.
alert
({
message
:
'
Nama Dokter Harus Berbeda!
'
,
centerVertical
:
true
});
}
else
if
(
validasidokter
(
nama_dokter
,
kode_dokter
)
==
2
)
{
bootbox
.
alert
({
message
:
'
Kode Dokter Harus Berbeda!
'
,
centerVertical
:
true
});
}
else
{
editdatadokter
(
id_dokter
)
}
// if (validasieditnama() == true) {
// alert("Nama Poli Harus Berbeda!")
// } else {
editdatadokter
(
id_dokter
)
// }
})
})
function
editdatadokter
(
id_dokter
)
{
function
editdatadokter
(
id_dokter
)
{
...
@@ -195,7 +251,7 @@ function editdatadokter(id_dokter) {
...
@@ -195,7 +251,7 @@ function editdatadokter(id_dokter) {
$
.
ajax
({
$
.
ajax
({
type
:
'
POST
'
,
type
:
'
POST
'
,
dataType
:
'
json
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/
edit
keloladokter
'
,
url
:
baseURL
+
'
/api/
load
keloladokter
'
,
data
:
{
data
:
{
id
:
id_dokter
,
id
:
id_dokter
,
inama_dokter
:
nama_dokter
,
inama_dokter
:
nama_dokter
,
...
...
public/action-js/antrian-js/action-kelolapoli.js
View file @
9ca9842f
...
@@ -70,8 +70,17 @@ function Loadpoli() {
...
@@ -70,8 +70,17 @@ function Loadpoli() {
$
(
'
#tambah
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#tambah
'
).
on
(
'
click
'
,
function
()
{
savedatapoli
()
var
nama_poli
=
document
.
getElementById
(
"
nama_poli
"
).
value
;
var
kode_poli
=
document
.
getElementById
(
"
kode_poli
"
).
value
;
if
(
validasipoli
(
nama_poli
,
kode_poli
)
==
1
)
{
bootbox
.
alert
({
message
:
'
Nama Poli Sudah Ada!
'
,
centerVertical
:
true
});
}
else
if
(
validasipoli
(
nama_poli
,
kode_poli
)
==
2
)
{
bootbox
.
alert
({
message
:
'
Kode Poli Sudah Ada
'
,
centerVertical
:
true
});
}
else
{
savedatapoli
();
}
})
})
...
@@ -93,7 +102,7 @@ function savedatapoli() {
...
@@ -93,7 +102,7 @@ function savedatapoli() {
},
},
success
:
function
(
response
)
{
success
:
function
(
response
)
{
// console.log(response)
if
(
response
[
'
code
'
]
==
0
)
{
if
(
response
[
'
code
'
]
==
0
)
{
swal
({
swal
({
title
:
""
,
title
:
""
,
...
@@ -126,14 +135,58 @@ function savedatapoli() {
...
@@ -126,14 +135,58 @@ function savedatapoli() {
});
});
}
}
function
validasipoli
(
nama_poli
,
kode_poli
)
{
var
exist
=
0
;
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/loadkelolapoli
'
,
async
:
false
,
data
:
{
id
:
null
,
},
success
:
function
(
result
)
{
var
data
=
result
.
data
;
for
(
x
in
data
)
{
if
(
nama_poli
==
data
[
x
][
'
nama_poli
'
])
{
exist
=
1
;
}
if
(
kode_poli
==
data
[
x
][
'
kode_poli
'
])
{
exist
=
2
;
}
}
},
error
:
function
(
xhr
)
{
//alert(xhr.status+'-'+xhr.statusText);
}
});
return
exist
;
}
$
(
'
#edit
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#edit
'
).
on
(
'
click
'
,
function
()
{
let
id_poli
=
$
(
'
#id_poli
'
).
val
();
let
id_poli
=
$
(
'
#id_poli
'
).
val
();
var
nama_poli
=
document
.
getElementById
(
"
nama_poliEdt
"
).
value
;
// if (validasieditnama() == true) {
var
kode_poli
=
document
.
getElementById
(
"
kode_poliEdt
"
).
value
;
// alert("Nama Poli Harus Berbeda!")
// } else {
if
(
validasipoli
(
nama_poli
,
kode_poli
)
==
1
)
{
editdatapoli
(
id_poli
)
bootbox
.
alert
({
message
:
'
Nama Poli Harus Berbeda!
'
,
centerVertical
:
true
});
// }
}
else
if
(
validasipoli
(
nama_poli
,
kode_poli
)
==
2
)
{
bootbox
.
alert
({
message
:
'
Kode Poli Harus Berbeda!
'
,
centerVertical
:
true
});
}
else
{
editdatapoli
(
id_poli
)
}
})
})
function
editdatapoli
(
id_poli
)
{
function
editdatapoli
(
id_poli
)
{
...
@@ -286,46 +339,4 @@ function Delete(param) {
...
@@ -286,46 +339,4 @@ function Delete(param) {
}
}
// function validasieditnama() {
// var exist = false;
// var nama_poliEdt = document.getElementById("nama_poliEdt").value;
// var nama_poli2 = document.getElementById("nama_poli2").value;
// $.ajax({
// type: 'POST',
// dataType: 'json',
// url: baseURL + '/api/loadkelolapoli',
// data: {
// id: null,
// },
// success: function (result) {
// // console.log(result.data[0].nama_poli);
// //let counterExist = 0;
// var data = result.data;
// let i = 0;
// for (i; i < data.length; i++) {
// if (nama_poliEdt === data[i].nama_poli) {
// //exist = true;
// //counterExist += 1;
// if (nama_poliEdt == nama_poli2) {
// exist = false;
// } else {
// exist = true;
// }
// }
// }
// },
// error: function (xhr) {
// //alert(xhr.status+'-'+xhr.statusText);
// }
// });
// // console.log(exist);
// return exist;
// }
public/action-js/antrian-js/action-kelolaruang.js
View file @
9ca9842f
...
@@ -254,7 +254,7 @@ function loadedit(id_ruang) {
...
@@ -254,7 +254,7 @@ function loadedit(id_ruang) {
id
:
id_ruang
,
id
:
id_ruang
,
},
},
success
:
function
(
result
)
{
success
:
function
(
result
)
{
// console.log(result);
// console.log(result);
// $('.loaddata').empty();
// $('.loaddata').empty();
// console.log(result);
// console.log(result);
...
@@ -269,10 +269,10 @@ function loadedit(id_ruang) {
...
@@ -269,10 +269,10 @@ function loadedit(id_ruang) {
async
:
false
,
async
:
false
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
[
'
code
'
]
==
0
)
{
if
(
result
[
'
code
'
]
==
0
)
{
console
.
log
(
result
);
console
.
log
(
result
);
var
res
=
result
[
'
data
'
];
var
res
=
result
[
'
data
'
];
optionseg
=
''
;
optionseg
=
''
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment