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
Show 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 {
return
$this
->
getOutput
(
$result
->
toJson
());
}
public
function
savedataAction
(){
public
function
savedata
pasien
Action
(){
$result
=
new
Result
();
$request
=
$this
->
getRequest
();
...
...
@@ -63,28 +63,22 @@ class ApiController extends \Application\Master\GlobalActionController {
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
;
$poli
=
$post
->
ipoli
;
$dokter
=
$post
->
idokter
;
$ktp
=
$post
->
iktp
;
$no_antrian
=
$post
->
ino_antrian
;
$counter
=
$param
->
getMaxCounter
();
// print_r($counter);die;
$dataArrayAntrianPasien
=
array
(
'id_pasien'
=>
$counter
->
data
,
$dataArrayPasien
=
array
(
'id_pasien'
=>
$idpasien
,
'create_date'
=>
gmdate
(
"Y-m-d H:i:s"
,
time
()
+
60
*
60
*
7
),
'nama'
=>
$nama
,
'tempat_lahir'
=>
$tempat_lahir
,
...
...
@@ -92,33 +86,131 @@ class ApiController extends \Application\Master\GlobalActionController {
'alamat'
=>
$alamat
,
'no_hp'
=>
$no_hp
,
'ktp'
=>
$ktp
,
'status_code'
=>
10
,
);
$dataArrayPasien
=
array
(
$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
());
$param
=
new
\Application\Model\Param
(
$storage
);
try
{
$id
=
$post
->
iid
;
$nama
=
$post
->
inama
;
$tempat_lahir
=
$post
->
itempat_lahir
;
$tanggal_lahir
=
$post
->
itanggal_lahir
;
$alamat
=
$post
->
ialamat
;
$no_hp
=
$post
->
ino_hp
;
$poli
=
$post
->
ipoli
;
$dokter
=
$post
->
idokter
;
$ktp
=
$post
->
iktp
;
$no_antrian
=
$post
->
ino_antrian
;
$no_rekam_medis
=
$post
->
ino_rekam_medis
;
// $counter= $param->getMaxCounter();
$dataArrayAntrianPasien
=
array
(
'id_pasien'
=>
$id
,
'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_rekam_medis'
=>
$no_rekam_medis
,
'no_hp'
=>
$no_hp
,
'ktp'
=>
$ktp
,
'status_code'
=>
10
,
);
$table_antrianpasien
=
'antrian_pasien'
;
$where
=
'id_dokter='
.
$dokter
.
' and no_antrian='
.
$no_antrian
;
// print_r ();die;
$param
->
updateGlobal
(
$table_antrianpasien
,
$dataArrayAntrianPasien
,
$where
);
$param
->
saveGlobal
(
$dataArrayPasien
,
$table_pasien
);
$register
=
$param
->
loadregisterantrian
(
$where
);
$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
->
info
=
'ok'
;
$result
->
data
=
$
dataArrayAntrianPasien
;
$result
->
data
=
$
register
->
data
;
}
catch
(
\Exception
$exc
)
{
$result
=
new
Result
(
0
,
1
,
$exc
->
getMessage
()
.
'-'
.
$exc
->
getTraceAsString
());
...
...
@@ -548,7 +640,7 @@ class ApiController extends \Application\Master\GlobalActionController {
$result
->
code
=
0
;
$result
->
info
=
'ok'
;
$result
->
data
=
$dataArrayPoli
->
data
;
$result
->
data
=
$dataArrayPoli
;
}
catch
(
\Exception
$exc
)
{
...
...
module/Application/src/Controller/QueueController.php
View file @
9ca9842f
...
...
@@ -39,7 +39,23 @@ class QueueController extends \Application\Master\GlobalActionController
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
();
...
...
@@ -52,9 +68,32 @@ class QueueController extends \Application\Master\GlobalActionController
$this
->
headScript
->
appendScript
(
' var baseURL = "'
.
$baseurl
.
'"'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-
antria
n.js'
);
$this
->
headScript
->
appendFile
(
'/action-js/antrian-js/action-
datapasie
n.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"
);
return
$view
;
...
...
@@ -91,6 +130,23 @@ class QueueController extends \Application\Master\GlobalActionController
$this
->
layout
(
"layout/layoutQueue"
);
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
()
{
...
...
@@ -103,25 +159,31 @@ class QueueController extends \Application\Master\GlobalActionController
$baseurl
=
sprintf
(
'//%s'
,
$uri
->
getHost
());
$getpath
=
explode
(
"/"
,
$uri
->
getPath
());
$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
());
$param
=
new
\Application\Model\Param
(
$storage
);
$id
=
$decodeid
;
// $iddok = $decodeiddok ;
/* generate counter number */
$codeCounter
=
$param
->
loadUser
(
$id
);
// print_r($codeCounter);die;
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;
$view
->
setVariable
(
'no_rekam_medis'
,
$result
[
'no_rekam_medis'
]);
$view
->
setVariable
(
'nama'
,
$result
[
'nama'
]);
$view
->
setVariable
(
'nama_dokter'
,
$result
[
'nama_dokter'
]);
$view
->
setVariable
(
'kode_poli'
,
$result
[
'nama_poli'
]);
...
...
@@ -132,12 +194,13 @@ class QueueController extends \Application\Master\GlobalActionController
// print_r($result);die;
$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_dokter_cetak = "'
.
$result
[
'nama_dokter'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var kode_poli_cetak = "'
.
$result
[
'nama_poli'
]
.
'"'
);
$this
->
headScript
->
appendScript
(
' var no_antrian_cetak = "'
.
$result
[
'no_antrian'
]
.
'"'
);
$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"
);
return
$view
;
...
...
module/Application/src/Model/Param.php
View file @
9ca9842f
...
...
@@ -41,6 +41,11 @@ class Param extends Mapper {
$data
=
$this
->
_storage
->
saveGlobal
(
$param
,
$table
);
return
$data
;
}
public
function
loadregisterantrian
(
$where
){
$data
=
$this
->
_storage
->
getRegister
(
$where
);
return
$data
;
}
public
function
updateGlobal
(
$tabel
,
$data
,
$where
){
$data
=
$this
->
_storage
->
updateGlobal
(
$tabel
,
$data
,
$where
);
...
...
@@ -52,10 +57,19 @@ class Param extends Mapper {
return
$data
;
}
public
function
loadUser
(
$id
=
null
){
$data
=
$this
->
_storage
->
loadUserData
(
$id
);
public
function
loadUser
(
$id
=
null
,
$iddok
=
null
){
$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
;
}
public
function
loadRegisterPoli
(
$id
=
null
){
$data
=
$this
->
_storage
->
loadRegisterPoli
(
$id
);
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 {
}
/* load data user */
public
function
loadUserData
(
$id
=
null
){
public
function
loadUserData
(
$id
){
$result
=
new
Result
();
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
-- INNER JOIN pasien
-- ON pasien.id_pasien = pasien.id_pasien
INNER JOIN dokter_to_poli
ON antrian_pasien.id_dokter = dokter_to_poli.id_dokter
INNER JOIN poli
ON antrian_pasien.id_poli = poli.id_poli"
;
ON antrian_pasien.id_poli = poli.id_poli
WHERE antrian_pasien.id_antrian =
$id
"
;
//print_r($sql);die;
$stmt
=
$this
->
_db
->
query
(
$sql
);
$resdata
=
$stmt
->
execute
();
...
...
@@ -368,7 +365,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result
=
new
Result
();
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
);
$resdata
=
$stmt
->
execute
();
...
...
@@ -397,6 +394,119 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
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
){
$result
=
new
Result
();
try
{
...
...
module/Application/view/application/queue/beranda.phtml
View file @
9ca9842f
...
...
@@ -11,7 +11,7 @@
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing
elit sed do eiusmod tempor incididunt ut labore et dolore
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>
...
...
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"
>
<div
class=
"container"
>
...
...
@@ -26,10 +25,22 @@
<div
class=
"card"
>
<div
class=
"card-header"
>
<h
1></h1
>
<h
2>
Data Pasien
</h2
>
</div>
<div
class=
"card-body"
>
<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=
"col-sm-2"
>
<h3>
Nama pasien
</h3>
...
...
@@ -82,12 +93,12 @@
</div>
</div>
<div
class=
"card-
title
"
>
<div
class=
"card-
footer
"
>
<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>
<
/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 @@
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/themify-icons.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/flaticon.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/bootstrap.min.css'
))
->
prependStylesheet
(
$this
->
basePath
(
'/tamplate/css/bootstrap.min.css'
))
...
...
@@ -65,17 +66,18 @@
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/beranda'
)
?>
"
>
Beranda
</a>
</li>
<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 class="nav-item">
<a class="nav-link" href="
<?php
echo
$this
->
basePath
(
'queue/'
)
?>
">Pilih Antrian</a>
</li> -->
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/dokter'
)
?>
"
>
Doctors
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"
<?php
echo
$this
->
basePath
(
'queue/poli'
)
?>
"
>
Poli
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"contact.html"
>
Tentang Kami
</a>
</li>
</ul>
</div>
</nav>
...
...
@@ -102,7 +104,7 @@
<div
class=
"container"
>
<div
class=
"row justify-content-between"
>
<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>
<div
class=
"social_logo"
>
<a
href=
"#"
><i
class=
"ti-facebook"
></i></a>
...
...
@@ -115,7 +117,7 @@
<h4>
Quick Links
</h4>
<ul>
<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=
"#"
>
Poli
</a></li>
<li><a
href=
"#"
>
Tentang Kami
</a></li>
...
...
@@ -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.validate.min.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/custom.js"></script> -->
...
...
public/action-js/antrian-js/action-antrian.js
deleted
100644 → 0
View file @
98b4b32f
$
(
document
).
ready
(
function
()
{
$
(
"
#tanggal_lahir
"
).
change
(
function
()
{
//console.log("berubah nih!");
var
x
=
new
Date
(
$
(
"
#tanggal_lahir
"
).
val
());
var
Cnow
=
new
Date
();
if
(
Cnow
.
getFullYear
()
<
x
.
getFullYear
())
{
bootbox
.
alert
({
title
:
"
<span min-height='100px'></span>
"
,
message
:
"
Tanggal Lahir tidak Boleh Melebihi Tanggal Hari ini!
"
,
callback
:
function
()
{
console
.
log
(
'
This was logged in the callback!
'
);
},
centerVertical
:
true
})
//$("#tanggal_lahir").val('');
}
});
});
$
(
'
#cetak
'
).
on
(
'
click
'
,
function
(
e
)
{
//alert("kepanggil");
e
.
preventDefault
();
var
w
=
window
.
open
(
''
,
''
,
'
width=300,height=400
'
);
w
.
document
.
write
(
'
<html><body><table border="" >
'
+
'
<tr><th><h1>SELAMAT DATANG</h1><h2> Di Rumah Sakit</h2></th></tr></thead>
'
+
'
<tbody><tr>
'
+
'
<th><h2>ANTRIAN</h2>
'
+
'
<h1>
'
+
kode_dokter_cetak
+
+
no_antrian_cetak
+
'
</h1>
'
+
'
<h3>Nama Pasien :
'
+
nama_pasien_cetak
+
'
</h3>
'
+
'
<h3>Poli :
'
+
kode_poli_cetak
+
'
</h3>
'
+
'
<h3>Nama Dokter :
'
+
nama_dokter_cetak
+
'
</h3>
'
+
'
</th></tr></tbody></table></body></html>
'
);
w
.
window
.
print
();
w
.
document
.
close
();
return
false
;
})
$
(
'
#tambah
'
).
on
(
'
click
'
,
function
()
{
SaveDataAja
();
})
function
SaveDataAja
(
param
)
{
let
nama
=
$
(
'
#nama
'
).
val
();
let
tempat_lahir
=
$
(
'
#tempat_lahir
'
).
val
();
let
tanggal_lahir
=
$
(
'
#tanggal_lahir
'
).
val
();
let
alamat
=
$
(
'
#alamat
'
).
val
();
let
no_hp
=
$
(
'
#no_hp
'
).
val
();
let
poli
=
$
(
"
#poli option:selected
"
).
attr
(
"
value
"
);
let
dokter
=
$
(
'
#dokter option:selected
'
).
attr
(
"
value
"
);
let
ktp
=
$
(
'
#ktp
'
).
val
();
let
no_antrian
=
$
(
"
input[name=antrian]:checked
"
).
val
();
// console.log(no_antrian);
/* save data */
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/savedata
'
,
data
:
{
iktp
:
ktp
,
//id_pasien: param,
inama
:
nama
,
itempat_lahir
:
tempat_lahir
,
itanggal_lahir
:
tanggal_lahir
,
ialamat
:
alamat
,
ino_hp
:
no_hp
,
ipoli
:
poli
,
idokter
:
dokter
,
ino_antrian
:
no_antrian
,
},
success
:
function
(
response
)
{
// alert("success");
// response[data];
if
(
response
[
'
code
'
]
==
0
)
{
let
$id
=
response
.
data
.
id_pasien
;
// alert($id);
let
$encodedId
=
btoa
(
$id
);
// console.log($encodedId);
window
.
location
.
href
=
(
"
cetakantrian/
"
+
$encodedId
);
}
else
{
bootbox
.
alert
({
message
:
'
gagal
'
,
centerVertical
:
true
});
}
},
error
:
function
(
xhr
)
{
if
(
xhr
.
status
!=
200
)
{
//bootbox.alert(xhr.status + "-" + xhr.statusText + " <br>Silahkan coba kembali :) ");
}
else
{
alert
(
'
dadas
'
);
}
}
});
}
loadpoli
();
$
(
'
#poli
'
).
on
(
'
change
'
,
function
()
{
var
idpoli
=
$
(
'
#poli
'
).
val
();
console
.
log
(
idpoli
);
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/loaddokter
'
,
data
:
{
id_poli
:
idpoli
},
success
:
function
(
result
)
{
if
(
result
[
'
code
'
]
==
0
)
{
var
res
=
result
[
'
data
'
];
optionseg
=
''
;
optionseg
+=
'
<option value="Pilih" disabled selected>Pilih</option>
'
;
for
(
var
i
=
0
;
i
<
res
.
length
;
i
++
)
{
optionseg
+=
'
<option value="
'
+
res
[
i
].
id_dokter
+
'
">
'
+
res
[
i
].
nama_dokter
+
'
</option>
'
;
}
$
(
"
select#dokter
"
).
removeAttr
(
'
disabled
'
);
$
(
"
select#dokter
"
).
html
(
optionseg
);
}
else
{
bootbox
.
dialog
({
message
:
"
<span class='bigger-110'>
"
+
result
[
'
info
'
]
+
"
</span>
"
,
buttons
:
{
"
OK
"
:
{
"
label
"
:
"
<i class='icon-ok'></i> OK
"
,
"
className
"
:
"
btn-sm btn-danger
"
,
"
callback
"
:
function
()
{
notifyCancel
(
'
ERROR:
'
+
result
[
'
info
'
]
+
'
. Bila ada kesulitan dimohon untuk menghubungi Admin terkait
'
);
}
}
}
});
}
}
});
});
function
loadpoli
()
{
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/loadpoli
'
,
success
:
function
(
result
)
{
if
(
result
[
'
code
'
]
==
0
)
{
//console.log (result);
var
res
=
result
[
'
data
'
];
optionseg
=
''
;
optionseg
+=
'
<option value="Pilih" disabled selected>Pilih</option>
'
;
for
(
var
i
=
0
;
i
<
res
.
length
;
i
++
)
{
optionseg
+=
'
<option value="
'
+
res
[
i
].
id_poli
+
'
">
'
+
res
[
i
].
nama_poli
+
'
</option>
'
;
}
$
(
"
select#poli
"
).
html
(
optionseg
);
}
else
{
bootbox
.
dialog
({
message
:
"
<span class='bigger-110'>
"
+
result
[
'
info
'
]
+
"
</span>
"
,
buttons
:
{
"
OK
"
:
{
"
label
"
:
"
<i class='icon-ok'></i> OK
"
,
"
className
"
:
"
btn-sm btn-danger
"
,
"
callback
"
:
function
()
{
notifyCancel
(
'
ERROR:
'
+
result
[
'
info
'
]
+
'
. Bila ada kesulitan dimohon untuk menghubungi Admin terkait
'
);
}
}
}
});
}
}
});
}
$
(
'
#pilihno
'
).
on
(
'
click
'
,
function
()
{
// let nama = $('#nama').val();
// let tempat_lahir = $('#tempat_lahir').val();
// let tanggal_lahir = $('#tanggal_lahir').val();
// let alamat = $('#alamat').val();
// let no_hp = $('#no_hp').val();
// let poli = $("#poli option:selected").attr("value");
// let dokter = $('#dokter option:selected').attr("value");
// let ktp = $('#ktp').val();
// // let $kode_poli = $("#poli option:selected").attr("code");
// let $no_antrian = $('#no_antrian').val();
// // console.log(nama);
// if (ktp == null || ktp == "") {
// bootbox.alert({ message: 'Ktp tidak boleh kosong', centerVertical: true });
// return false;
// }
// else if (nama == null || nama == "") {
// bootbox.alert({ message: 'Nama tidak boleh kosong', centerVertical: true });
// return false;
// } else if (tempat_lahir == null || tempat_lahir == "") {
// bootbox.alert({ message: 'Tempat lahir tidak boleh kosong', centerVertical: true });
// return false;
// } else if (tanggal_lahir == null || tanggal_lahir == "") {
// bootbox.alert({ message: 'Tanggal lahir tidak boleh kosong', centerVertical: true });
// return false;
// } else if (alamat == null || alamat == "") {
// bootbox.alert({ message: 'Alamat tidak boleh kosong', centerVertical: true });
// return false;
// } else if (no_hp == null || no_hp == "") {
// bootbox.alert({ message: 'No hp tidak boleh kosong', centerVertical: true });
// return false;
// }
// else if (poli == null || poli == "") {
// bootbox.alert({ message: 'Poli tidak boleh kosong', centerVertical: true });
// return false;
// }
// else if (dokter == null || dokter == "") {
// bootbox.alert({ message: 'Dokter tidak boleh kosong', centerVertical: true });
// return false;
// } else if (ktp.toString().length > 16) {
// bootbox.alert({ message: 'KTP tidak boleh lebih dari 16 angka', centerVertical: true });
// return false;
// } else if (ktp.toString().length < 16) {
// bootbox.alert({ message: 'KTP tidak boleh kurang dari 16 angka', centerVertical: true });
// return false;
// } else if (no_hp.toString().length > 13) {
// bootbox.alert({ message: 'No HP tidak boleh lebih dari 13 angka', centerVertical: true });
// return false;
// } else {
pilihAntrian
()
// }
});
function
pilihAntrian
()
{
var
$dokter
=
$
(
'
#dokter option:selected
'
).
attr
(
"
value
"
);
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/loadPilihAntrian
'
,
data
:
{
iddok
:
$dokter
,
},
success
:
function
(
response
)
{
console
.
log
(
response
.
data
);
var
$antrian
=
(
response
.
data
);
// console.log($antrian);
// console.log(response);
if
(
$antrian
)
{
var
hour
=
0
;;
var
splithour
=
[];
splithour
[
0
]
=
$antrian
[
0
][
'
jam_mulai
'
].
split
(
'
:
'
);
hour
+=
parseInt
(
splithour
[
0
][
0
]);
minute
=
parseInt
(
splithour
[
0
][
1
]);
for
(
var
i
=
0
;
i
<
$antrian
.
length
;
i
++
)
{
if
(
$antrian
[
i
][
'
id_pasien
'
]
===
null
)
{
let
y
=
''
;
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
}
if
(
minute
.
toString
().
length
===
1
){
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label style="text-align:center`
+
i
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
else
{
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="radio" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label style="text-align:center"`
+
i
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
minute
+=
parseInt
(
splittime
[
i
][
1
]);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
10
||
$antrian
[
i
][
'
status_code
'
]
==
20
||
$antrian
[
i
][
'
status_code
'
]
==
30
||
$antrian
[
i
][
'
status_code
'
]
==
40
){
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
let
y
=
''
;
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
}
if
(
minute
.
toString
().
length
===
1
){
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="picked" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
'
0
'
+
minute
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
else
{
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="picked" name="antrian" value="`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
<label for="antrian`
+
i
+
`">`
+
hour
+
'
:
'
+
minute
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
minute
+=
parseInt
(
splittime
[
i
][
1
]);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
60
){
let
y
=
''
;
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="done" name="antrian" value="`
+
$antrian
[
i
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
}
else
if
(
$antrian
[
i
][
'
status_code
'
]
==
50
){
var
splittime
=
[];
splittime
[
i
]
=
$antrian
[
i
][
'
waktu_antrian
'
].
split
(
'
:
'
);
if
(
minute
>=
60
)
{
hour
+=
Math
.
floor
(
minute
/
60
);
minute
=
minute
%
60
;
}
let
y
=
''
;
y
+=
`<div class="col-lg-1">
<div class="buttons" >
<input type="done" name="antrian" value="`
+
$antrian
[
i
]
+
`" id="antrian`
+
i
+
`" />
<label for="antrian`
+
i
+
`">`
+
$antrian
[
i
][
'
no_antrian
'
]
+
`</label>
</div>
</div > `
;
$
(
'
.antrian
'
).
append
(
y
);
minute
+=
parseInt
(
splittime
[
i
][
1
]);
}
}
}
else
{
}
},
error
:
function
(
xhr
)
{
if
(
xhr
.
status
!=
200
)
{
//bootbox.alert(xhr.status + "-" + xhr.statusText + " <br>Silahkan coba kembali :) ");
}
else
{
alert
(
'
Cannot load queue
'
);
}
}
});
}
$
(
document
).
ready
(
function
()
{
$
(
'
#close
'
).
on
(
'
click
'
,
function
()
{
document
.
getElementById
(
"
seat
"
).
innerHTML
=
""
;
})
});
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");
e
.
preventDefault
();
var
w
=
window
.
open
(
''
,
''
,
'
width=300,height=400
'
);
w
.
document
.
write
(
'
<html><body><table border="" >
'
+
'
<tr><th><h1>SELAMAT DATANG</h1><h2> Di Rumah Sakit</h2></th></tr></thead>
'
+
'
<tbody><tr>
'
+
'
<th><h2>ANTRIAN</h2>
'
+
'
<h1>
'
+
kode_dokter_cetak
+
+
no_antrian_cetak
+
'
</h1>
'
+
'
<h3>Nama Pasien :
'
+
nama_pasien_cetak
+
'
</h3>
'
+
'
<h3>Poli :
'
+
kode_poli_cetak
+
'
</h3>
'
+
'
<h3>Nama Dokter :
'
+
nama_dokter_cetak
+
'
</h3>
'
+
'
</th></tr></tbody></table></body></html>
'
);
w
.
window
.
print
();
w
.
document
.
close
();
return
false
;
// //theme: 'default',
// //is_hidden: false,
// //close_speed: 1000,
// //enabled: false,
// //layout: 'en_US',
// // definimos un trigger al keyboard.
// // Al hacer click sobre el selector que tenga el id (#) o la clase (.) definida
// // se ocultara o mostrara el keyboard segun corresponda.
// trigger: '#buttom1'
// });
// // Guardo en la variable 'keyboard' (puede ser cualkier otro nombre), la instancia del plugin creada,
// // para asi acceder a los metodos publicos del plugin
// 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
();
})
\ No newline at end of file
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 () {
})
$
(
'
#tambah
'
).
on
(
'
click
'
,
function
()
{
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() {
});
}
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
()
{
let
id_dokter
=
$
(
'
#id_dokter
'
).
val
();
var
nama_dokter
=
document
.
getElementById
(
"
nama_dokteredt
"
).
value
;
var
kode_dokter
=
document
.
getElementById
(
"
kode_dokteredt
"
).
value
;
// if (validasieditnama() == true) {
// alert("Nama Poli Harus Berbeda!")
// } else {
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
)
// }
}
})
function
editdatadokter
(
id_dokter
)
{
...
...
@@ -195,7 +251,7 @@ function editdatadokter(id_dokter) {
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/
edit
keloladokter
'
,
url
:
baseURL
+
'
/api/
load
keloladokter
'
,
data
:
{
id
:
id_dokter
,
inama_dokter
:
nama_dokter
,
...
...
public/action-js/antrian-js/action-kelolapoli.js
View file @
9ca9842f
...
...
@@ -70,8 +70,17 @@ function Loadpoli() {
$
(
'
#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() {
},
success
:
function
(
response
)
{
// console.log(response)
if
(
response
[
'
code
'
]
==
0
)
{
swal
({
title
:
""
,
...
...
@@ -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
()
{
let
id_poli
=
$
(
'
#id_poli
'
).
val
();
var
nama_poli
=
document
.
getElementById
(
"
nama_poliEdt
"
).
value
;
var
kode_poli
=
document
.
getElementById
(
"
kode_poliEdt
"
).
value
;
// if (validasieditnama() == true) {
// alert("Nama Poli Harus Berbeda!")
// } else {
if
(
validasipoli
(
nama_poli
,
kode_poli
)
==
1
)
{
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
)
{
...
...
@@ -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
...
...
@@ -272,7 +272,7 @@ function loadedit(id_ruang) {
if
(
result
[
'
code
'
]
==
0
)
{
console
.
log
(
result
);
console
.
log
(
result
);
var
res
=
result
[
'
data
'
];
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