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
7251ee06
Commit
7251ee06
authored
Oct 23, 2020
by
Azy Mushofy Anwary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
condisi
parent
b6beb3c7
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1145 additions
and
648 deletions
+1145
-648
module/Application/src/Controller/ApiController.php
module/Application/src/Controller/ApiController.php
+204
-89
module/Application/src/Model/Param.php
module/Application/src/Model/Param.php
+6
-2
module/Application/src/Model/Param/Storage/Mysql.php
module/Application/src/Model/Param/Storage/Mysql.php
+56
-14
module/Application/view/application/admin/dasboard.phtml
module/Application/view/application/admin/dasboard.phtml
+1
-12
module/Application/view/application/admin/keloladokter.phtml
module/Application/view/application/admin/keloladokter.phtml
+10
-9
module/Application/view/application/admin/kelolapasien.phtml
module/Application/view/application/admin/kelolapasien.phtml
+1
-1
module/Application/view/application/admin/kelolapoli.phtml
module/Application/view/application/admin/kelolapoli.phtml
+3
-2
module/Application/view/application/admin/registrasidokter.phtml
...Application/view/application/admin/registrasidokter.phtml
+2
-2
module/Application/view/application/queue/beranda.phtml
module/Application/view/application/queue/beranda.phtml
+3
-6
module/Application/view/application/queue/cekdatapasien.phtml
...le/Application/view/application/queue/cekdatapasien.phtml
+2
-2
module/Application/view/application/queue/dokter.phtml
module/Application/view/application/queue/dokter.phtml
+3
-3
module/Application/view/application/queue/poli.phtml
module/Application/view/application/queue/poli.phtml
+1
-1
module/Application/view/layout/layoutQueue.phtml
module/Application/view/layout/layoutQueue.phtml
+2
-8
public/action-js/antrian-js/action-cekdatapasien.js
public/action-js/antrian-js/action-cekdatapasien.js
+21
-7
public/action-js/antrian-js/action-daftarpasien.js
public/action-js/antrian-js/action-daftarpasien.js
+47
-6
public/action-js/antrian-js/action-keloladokter.js
public/action-js/antrian-js/action-keloladokter.js
+107
-27
public/action-js/antrian-js/action-kelolapasien.js
public/action-js/antrian-js/action-kelolapasien.js
+1
-0
public/action-js/antrian-js/action-kelolapoli.js
public/action-js/antrian-js/action-kelolapoli.js
+342
-238
public/action-js/antrian-js/action-kelolaruang.js
public/action-js/antrian-js/action-kelolaruang.js
+24
-12
public/action-js/antrian-js/action-registrasidokter.js
public/action-js/antrian-js/action-registrasidokter.js
+260
-140
public/tamplate/css/style.css
public/tamplate/css/style.css
+5
-5
public/tamplateadmin/js/demo/chart-pie-demo.js
public/tamplateadmin/js/demo/chart-pie-demo.js
+44
-62
No files found.
module/Application/src/Controller/ApiController.php
View file @
7251ee06
This diff is collapsed.
Click to expand it.
module/Application/src/Model/Param.php
View file @
7251ee06
...
...
@@ -61,8 +61,8 @@ class Param extends Mapper {
$data
=
$this
->
_storage
->
loadUserData
(
$id
,
$iddok
);
return
$data
;
}
public
function
loadpasien
(
$id
=
null
){
$data
=
$this
->
_storage
->
loadpasien
(
$id
);
public
function
loadpasien
(
$id
=
null
,
$norm
=
null
){
$data
=
$this
->
_storage
->
loadpasien
(
$id
,
$norm
);
return
$data
;
}
public
function
loaddatapasien
(
$id
){
...
...
@@ -175,6 +175,10 @@ class Param extends Mapper {
$data
=
$this
->
_storage
->
loadterlayani
();
return
$data
;
}
public
function
loadtotalantrian
(){
$data
=
$this
->
_storage
->
loadtotalantrian
();
return
$data
;
}
public
function
tampilpoli
(
$id
=
null
){
$data
=
$this
->
_storage
->
tampilpoli
(
$id
);
return
$data
;
...
...
module/Application/src/Model/Param/Storage/Mysql.php
View file @
7251ee06
...
...
@@ -361,7 +361,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
return
$result
;
}
public
function
loadpasien
(
$id
){
public
function
loadpasien
(
$id
=
null
,
$norm
=
null
){
$result
=
new
Result
();
try
{
...
...
@@ -370,8 +370,13 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
if
(
$id
){
$sql
.=
" WHERE id_pasien =
$id
"
;
}
if
(
$norm
){
$sql
.=
" WHERE no_rekam_medis = '
$norm
'"
;
}
$sql
.=
" ORDER BY no_rekam_medis ASC"
;
// print_r($sql);die;
$stmt
=
$this
->
_db
->
query
(
$sql
);
$resdata
=
$stmt
->
execute
();
...
...
@@ -509,6 +514,43 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
}
return
$result
;
}
public
function
loadtotalantrian
(){
$result
=
new
Result
();
try
{
$sql
=
" SELECT count(id_dokter) FROM antrian_pasien "
;
// 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
loadpasiendalamantrian
(){
$result
=
new
Result
();
try
{
...
...
@@ -663,11 +705,11 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$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
$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
' "
;
WHERE p.no_rekam_medis =
'
$no_rekam_medis
' "
;
// print_r($sql);die;
$stmt
=
$this
->
_db
->
query
(
$sql
);
...
...
@@ -1046,7 +1088,7 @@ class Mysql extends \Khansia\Db\Storage implements Skeleton {
$result
=
new
Result
();
try
{
$sql
=
" SELECT dokter_to_poli.id_dokter, dokter_to_poli.nama_dokter, dokter_to_poli.kode_dokter , poli.id_poli, poli.nama_poli, condition.condition,condition.id_condition
$sql
=
" SELECT dokter_to_poli.id_dokter, dokter_to_poli.nama_dokter, dokter_to_poli.kode_dokter , poli.id_poli, poli.nama_poli,
dokter_to_poli.image_dokter,
condition.condition,condition.id_condition
FROM dokter_to_poli
INNER JOIN poli
ON dokter_to_poli.id_poli = poli.id_poli
...
...
module/Application/view/application/admin/dasboard.phtml
View file @
7251ee06
...
...
@@ -88,18 +88,7 @@
<!-- Card Header - Dropdown -->
<div
class=
"card-header py-3 d-flex flex-row align-items-center justify-content-between"
>
<h6
class=
"m-0 font-weight-bold text-primary"
>
Revenue Sources
</h6>
<div
class=
"dropdown no-arrow"
>
<a
class=
"dropdown-toggle"
href=
"#"
role=
"button"
id=
"dropdownMenuLink"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
>
<i
class=
"fas fa-ellipsis-v fa-sm fa-fw text-gray-400"
></i>
</a>
<div
class=
"dropdown-menu dropdown-menu-right shadow animated--fade-in"
aria-labelledby=
"dropdownMenuLink"
>
<div
class=
"dropdown-header"
>
Dropdown Header:
</div>
<a
class=
"dropdown-item"
id=
"poli"
></a>
<select
name=
"poli"
id=
"poli"
class=
"form-control"
>
<option
disable
selected
>
Pilih
</option>
</select>
</div>
</div>
</div>
<!-- Card Body -->
<div
class=
"card-body"
>
...
...
module/Application/view/application/admin/keloladokter.phtml
View file @
7251ee06
...
...
@@ -20,6 +20,7 @@
<th
colspan=
""
class=
" thLeftText"
>
Nama Dokter
</th>
<th
colspan=
""
class=
" thLeftText"
>
Kode Dokter
</th>
<th
colspan=
""
class=
" thLeftText"
>
Kondisi Dokter
</th>
<th
colspan=
""
class=
" thLeftText"
>
Gambar Dokter
</th>
<th
colspan=
""
class=
" thLeftText"
>
Action
</th>
</tr>
</thead>
...
...
@@ -65,11 +66,10 @@
<input
type=
"input"
id=
"kode_dokter"
name=
"kode_dokter"
class=
"form-control"
placeholder=
"Kode Dokter"
/></input>
</div>
<!-- <div class="form-group">
<label>Foto Dokter</label>
<input type="image" id="image" name="image" class="form-control" required /></input>
</div> -->
<div
class=
"form-group "
>
<label>
Gambar Dokter
</label>
<input
type=
"file"
name=
"gambar_dokter"
id=
"gambar_dokter"
class=
"form-control-file"
>
</div>
<div
class=
"modal-footer"
>
<button
button
type=
"button"
class=
"btn btn-primary"
id=
"tambah"
>
Add
</button>
...
...
@@ -118,10 +118,11 @@
</select>
</div>
<!-- <div class="form-group">
<label>Foto Dokter</label>
<input type="image" id="image" name="image" class="form-control" required /></input>
</div> -->
<div
class=
"form-group "
>
<label>
Gambar Dokter
</label>
<input
type=
"file"
name=
"gambar_dokteredt"
id=
"gambar_dokteredt"
class=
"form-control-file"
>
</div>
<div
class=
"modal-footer"
>
...
...
module/Application/view/application/admin/kelolapasien.phtml
View file @
7251ee06
...
...
@@ -41,7 +41,7 @@
<div
class=
"modal-body"
>
<form
id=
"myForm"
>
<input
type=
"
text
"
id=
"id_pasien"
class=
"form-control"
/></input>
<input
type=
"
hidden
"
id=
"id_pasien"
class=
"form-control"
/></input>
<div
class=
"form-group"
>
<label>
No Rekam Medis
</label><br>
...
...
module/Application/view/application/admin/kelolapoli.phtml
View file @
7251ee06
...
...
@@ -29,6 +29,7 @@
<th>
Nama Poli
</th>
<th>
Kode Poli
</th>
<th>
Deskripsi Poli
</th>
<th>
Gambar Poli
</th>
<th>
Action
</th>
</tr>
</thead>
...
...
@@ -53,7 +54,7 @@
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
>
×
</button>
</div>
<div
class=
"modal-body"
>
<form
id=
"myForm"
method=
"POST"
action=
"
<?php
$this
->
basePath
(
'/api/savekelolapoli'
)
?>
"
enctype=
"multipart/form-data"
>
<form
id=
"myForm"
>
<div
class=
"form-group"
>
<label>
Nama Poli
</label>
...
...
@@ -117,7 +118,7 @@
<div
class=
"form-group "
>
<label>
Gambar Poli
</label>
<input
type=
"file"
name=
"
image_poli"
id=
"image
_poliedt"
class=
"form-control-file"
></input>
<input
type=
"file"
name=
"
gambar_poliedt"
id=
"gambar
_poliedt"
class=
"form-control-file"
></input>
</div>
<div
class=
"modal-footer"
>
<button
button
type=
"button"
class=
"btn btn-primary"
id=
"edit"
>
Edit
</button>
...
...
module/Application/view/application/admin/registrasidokter.phtml
View file @
7251ee06
...
...
@@ -50,7 +50,7 @@
<form
id=
"myForm"
>
<div
class=
"form-group"
>
<label>
Jenis Layanan
</label>
<label>
Nama Poli
</label>
<select
name=
"nama_poli"
id=
"poli"
class=
"form-control"
require
>
<option
disable
selected
>
Pilih
</option>
...
...
@@ -134,7 +134,7 @@
<input
type=
"input"
id=
"id_register"
class=
"form-control"
/></input>
<div
class=
"form-group"
>
<label>
Jenis Layanan
</label>
<label>
Nama Poli
</label>
<div
class=
"card"
>
<div
class=
"card-body"
style=
"padding: 0.5rem;"
id=
"poliedt"
>
</div>
...
...
module/Application/view/application/queue/beranda.phtml
View file @
7251ee06
...
...
@@ -5,12 +5,9 @@
<div
class=
"col-lg-5 col-xl-5"
>
<div
class=
"banner_text"
>
<div
class=
"banner_text_iner"
>
<h5>
We are here for your care
</h5>
<h1>
Best Care
&
Better Doctor
</h1>
<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>
<h5>
Kami di sini untuk perawatan Anda
</h5>
<h1>
Perawatan Terbaik
</h1>
<p>
Dalam kesehatan terdapat kebebasan. Kesehatan adalah hal paling pertama dalam semua kebebasan.
<a
href=
"
<?php
echo
$this
->
basePath
(
'queue/cekdatapasien'
);
?>
"
class=
"btn_2"
>
Registrai Antrian
</a>
</div>
...
...
module/Application/view/application/queue/cekdatapasien.phtml
View file @
7251ee06
...
...
@@ -45,10 +45,10 @@ input::-webkit-inner-spin-button {
<input
type=
"number"
id=
"no_rekam_medis"
placeholder=
"No Rekam Medis"
class=
"form-control"
max=
"999999999999999"
maxlength=
"8"
></input>
</div>
<div
class=
"form-group"
>
<
!-- <
div class="form-group">
<label> <h5>No Induk Kependudukan (NIK)</h5></label><br>
<input type="number" id="ktp" placeholder="No Induk Kependudukan (NIK)" class="form-control"max="9999999999999999" maxlength="16" ></input>
</div>
</div>
-->
<p
class=
"card-text"
style=
"display:inline"
>
Jika belum mempunyai no rekam medis,
</p>
<a
class=
"card-text"
href=
"
<?php
echo
$this
->
basePath
(
'queue/daftarpasien'
)
?>
"
style=
"display:inline"
>
Klik disini !
</a>
</form>
...
...
module/Application/view/application/queue/dokter.phtml
View file @
7251ee06
...
...
@@ -23,10 +23,10 @@
<section
class=
"doctor_part single_page_doctor_part"
style=
"padding:20px;"
>
<div
class=
"container"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-xl-8"
>
<div
class=
"col-xl-8"
style=
" height: 75px; "
>
<div
class=
"section_tittle text-center"
>
<h2
>
Dokter
</h2>
<p>
Beberapa dokter di rumah sakit ini
</p>
<h2
>
Beberapa dokter di rumah sakit
</h2>
</div>
</div>
</div>
...
...
module/Application/view/application/queue/poli.phtml
View file @
7251ee06
...
...
@@ -20,7 +20,7 @@
<!-- breadcrumb start-->
<!-- feature_part start-->
<section
class=
"doctor_part single_page_doctor_part"
style=
"padding:0px;"
>
<section
class=
"doctor_part single_page_doctor_part"
style=
"padding:0px;"
>
<div
class=
"container"
>
<div
class=
"row justify-content-center"
>
<div
class=
"col-xl-8"
>
...
...
module/Application/view/layout/layoutQueue.phtml
View file @
7251ee06
...
...
@@ -114,7 +114,7 @@
<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/beranda'
)
?>
/tamplate/img/logo.png"
alt=
"#"
>
</a>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
</p>
<p>
Hidup sehat adalah hidup sejahtera dan bahagia yang berawal dari diri kita sendiri
</p>
</div>
<div
class=
"col-xl-9 col-sm-6 col-md-4 single-footer-widget"
>
...
...
@@ -142,12 +142,6 @@
<div
class=
"copyright_part"
>
<div
class=
"container"
>
<div
class=
"row align-items-center"
>
<p
class=
"footer-text m-0 col-lg-8 col-md-12"
>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
Copyright
©
is made with
<i
class=
"ti-heart"
aria-hidden=
"true"
></i>
by
<a
href=
"https://colorlib.com"
target=
"_blank"
>
Colorlib
</a>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
</div>
...
...
public/action-js/antrian-js/action-cekdatapasien.js
View file @
7251ee06
$
(
'
#cekdata
'
).
on
(
'
click
'
,
function
()
{
let
no_rekam_medis
=
$
(
'
#no_rekam_medis
'
).
val
();
let
ktp
=
$
(
'
#ktp
'
).
val
();
cekpasien
(
no_rekam_medis
,
ktp
);
if
(
no_rekam_medis
==
null
||
no_rekam_medis
==
""
)
{
bootbox
.
alert
({
message
:
'
No Rekam Medis tidak boleh kosong
'
,
centerVertical
:
true
});
return
false
;
}
else
if
(
no_rekam_medis
.
toString
().
length
>
8
)
{
bootbox
.
alert
({
message
:
'
No Rekam Medis tidak boleh lebih dari 8 angka
'
,
centerVertical
:
true
});
return
false
;
}
else
if
(
no_rekam_medis
.
toString
().
length
<
8
)
{
bootbox
.
alert
({
message
:
'
No Rekam Medis tidak boleh kurang dari 8 angka
'
,
centerVertical
:
true
});
return
false
;
}
else
{
cekpasien
(
no_rekam_medis
);
}
})
function
cekpasien
(
no_rekam_medis
,
ktp
)
{
function
cekpasien
(
no_rekam_medis
)
{
$
.
ajax
({
type
:
'
POST
'
,
...
...
@@ -16,7 +30,7 @@ function cekpasien(no_rekam_medis, ktp) {
url
:
baseURL
+
'
/api/cekpasien
'
,
data
:
{
ino_rekam_medis
:
no_rekam_medis
,
iktp
:
ktp
,
},
success
:
function
(
result
)
{
// let data = result.data['datapasien'][0]['no_rekam_medis'];
...
...
@@ -26,7 +40,7 @@ function cekpasien(no_rekam_medis, ktp) {
bootbox
.
alert
({
message
:
"
No rekam medis atau NIK tidak sesuai!
"
,
centerVertical
:
true
});
}
else
if
(
result
.
data
[
'
validasiinput
'
]
==
0
)
{
else
if
(
result
.
code
==
0
)
{
console
.
log
(
result
.
data
[
'
datapasien
'
][
0
][
'
no_rekam_medis
'
]);
// alert('berhasil');
if
(
result
.
data
[
'
datapasien
'
][
0
][
'
no_rekam_medis
'
]
==
null
)
{
...
...
@@ -66,8 +80,8 @@ function cekpasien(no_rekam_medis, ktp) {
bootbox
.
alert
({
message
:
"
Pasien Sedang Telah Terlewat Silahkan Hubungi Petugas
"
,
centerVertical
:
true
});
}
}
else
if
(
result
.
data
[
'
validasiinput
'
]
==
1
)
{
bootbox
.
alert
({
message
:
"
No Induk Kependudukan tidak sesuai
"
,
centerVertical
:
true
});
//
} else if (result.data['validasiinput'] == 1) {
//
bootbox.alert({ message: "No Induk Kependudukan tidak sesuai", centerVertical: true });
}
else
{
// bootbox.alert({ message: "Pasien Tidak Terdaftar <br> Silahkan Daftar Terlebih Dahulu", centerVertical: true });
...
...
public/action-js/antrian-js/action-daftarpasien.js
View file @
7251ee06
...
...
@@ -64,11 +64,55 @@ $('#tambahdata').on('click', function () {
bootbox
.
alert
({
message
:
'
KTP Sudah Digunakan!
'
,
centerVertical
:
true
});
}
else
{
SaveDataAja
();
validasinorekammedis
();
}
})
function
SaveDataAja
()
{
function
makeid
(
length
)
{
let
result
=
''
;
let
characters
=
'
ABCDEFGHIJKLMNOPQRSTUVWXYZ
'
;
let
charactersLength
=
characters
.
length
;
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
result
+=
characters
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
charactersLength
));
}
return
result
;
}
function
makeidnumber
(
length
)
{
let
result
=
''
;
let
characters
=
'
1234567890
'
;
let
charactersLength
=
characters
.
length
;
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
result
+=
characters
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
charactersLength
));
}
return
result
;
}
function
validasinorekammedis
()
{
let
norekamedis
=
makeid
(
2
)
+
makeidnumber
(
6
);
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/loadpasien
'
,
data
:
{
no_rekam_medis
:
norekamedis
},
success
:
function
(
result
)
{
if
(
result
.
info
==
'
Not Found
'
)
{
SaveDataAja
(
norekamedis
);
}
else
{
validasinorekammedis
();
}
}
});
}
function
SaveDataAja
(
norekamedis
)
{
let
no_rekam_medis
=
norekamedis
;
let
id_pasien
=
$
(
'
#id_pasien
'
).
val
();
let
nama
=
$
(
'
#nama
'
).
val
();
let
tempat_lahir
=
$
(
'
#tempat_lahir
'
).
val
();
...
...
@@ -78,9 +122,6 @@ function SaveDataAja() {
let
ktp
=
$
(
'
#ktp
'
).
val
();
// console.log(no_antrian);
/* save data */
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
...
...
@@ -93,6 +134,7 @@ function SaveDataAja() {
itanggal_lahir
:
tanggal_lahir
,
ialamat
:
alamat
,
ino_hp
:
no_hp
,
inorm
:
no_rekam_medis
},
success
:
function
(
response
)
{
...
...
@@ -137,7 +179,6 @@ function validasipoli(KTP) {
id
:
null
,
},
success
:
function
(
result
)
{
console
.
log
(
result
)
var
data
=
result
.
data
;
...
...
public/action-js/antrian-js/action-keloladokter.js
View file @
7251ee06
This diff is collapsed.
Click to expand it.
public/action-js/antrian-js/action-kelolapasien.js
View file @
7251ee06
...
...
@@ -152,6 +152,7 @@ function editdatapasien(id_pasien) {
},
success
:
function
(
response
)
{
$
(
'
#Editdata
'
).
modal
(
'
hide
'
);
console
.
log
(
response
);
if
(
response
[
'
code
'
]
==
0
)
{
swal
({
...
...
public/action-js/antrian-js/action-kelolapoli.js
View file @
7251ee06
This diff is collapsed.
Click to expand it.
public/action-js/antrian-js/action-kelolaruang.js
View file @
7251ee06
...
...
@@ -127,7 +127,6 @@ $('#tambah').on('click', function () {
let
nama_ruang
=
$
(
'
#nama_ruang
'
).
val
();
let
lantai
=
$
(
'
#lantai
'
).
val
();
if
(
nama_ruang
==
null
||
nama_ruang
==
""
)
{
bootbox
.
alert
({
message
:
'
Nama Ruang tidak boleh kosong
'
,
centerVertical
:
true
});
return
false
;
...
...
@@ -136,7 +135,10 @@ $('#tambah').on('click', function () {
bootbox
.
alert
({
message
:
'
Lantai tidak boleh kosong
'
,
centerVertical
:
true
});
return
false
;
}
else
if
(
validasiruang
(
lantai
,
nama_ruang
)
==
1
)
{
else
if
(
validasiruang
(
lantai
,
nama_ruang
)
==
3
)
{
bootbox
.
alert
({
message
:
'
Nama ruang dan lantai sudah ada!
'
,
centerVertical
:
true
});
}
else
if
(
validasiruang
(
lantai
,
nama_ruang
)
==
2
)
{
bootbox
.
alert
({
message
:
'
Nama ruang dan lantai sudah ada!
'
,
centerVertical
:
true
});
}
else
{
...
...
@@ -170,6 +172,7 @@ function saveruang() {
if
(
result
[
'
code
'
]
==
0
)
{
$
(
'
#addData
'
).
modal
(
'
hide
'
);
swal
({
title
:
""
,
text
:
"
Data Berhasil Ditambahkan!
"
,
...
...
@@ -201,7 +204,7 @@ function saveruang() {
});
}
// validasiruang()
function
validasiruang
(
lantai
,
nama_ruang
)
{
var
exist
=
0
;
...
...
@@ -221,23 +224,30 @@ function validasiruang(lantai, nama_ruang) {
var
ruangcounter
=
0
for
(
x
in
data
)
{
if
(
lantai
==
data
[
x
][
'
lantai
'
])
{
// if (lantai == data[x]['lantai']) {
// if (nama_ruang == data[x]['nama_ruang']) {
// }
// }
if
(
lantai
==
data
[
x
][
'
lantai
'
])
{
if
(
nama_ruang
==
data
[
x
][
'
nama_ruang
'
])
{
exist
=
1
;
}
exist
=
2
;
}
}
if
(
lantai
==
data
[
x
][
'
lantai
'
])
{
if
(
nama_ruang
==
data
[
x
][
'
nama_ruang
'
])
{
ruangcounter
+=
1
;
if
(
ruangcounter
>
1
)
{
exist
=
2
;
exist
=
3
;
}
}
}
}
...
...
@@ -267,7 +277,7 @@ $('#edit').on('click', function () {
else
if
(
lantai
==
null
||
lantai
==
""
)
{
bootbox
.
alert
({
message
:
'
Lantai tidak boleh kosong
'
,
centerVertical
:
true
});
return
false
;
}
else
if
(
validasiruang
(
lantai
,
nama_ruang
)
==
2
)
{
}
else
if
(
validasiruang
(
lantai
,
nama_ruang
)
==
3
)
{
bootbox
.
alert
({
message
:
'
Nama ruang dan lantai harus berbeda!
'
,
centerVertical
:
true
});
}
else
{
editdataruang
(
id_ruang
)
...
...
@@ -297,6 +307,8 @@ function editdataruang(id_ruang) {
//console.log(respoonse);
if
(
response
[
'
code
'
]
==
0
)
{
$
(
'
#Editdata
'
).
modal
(
'
hide
'
);
swal
({
title
:
""
,
text
:
"
Data Berhasil DiUbah!
"
,
...
...
@@ -454,8 +466,8 @@ function Delete(param) {
});
}
},
error
:
function
(
xhr
)
{
alert
(
xhr
.
status
+
'
-
'
+
xhr
.
statusTexDa
);
error
:
function
()
{
bootbox
.
alert
({
message
:
'
Data ruang masih terdaftar dalam poli
'
,
centerVertical
:
true
}
);
}
});
},
...
...
public/action-js/antrian-js/action-registrasidokter.js
View file @
7251ee06
...
...
@@ -243,6 +243,7 @@ $('#tambah').on('click', function () {
SaveDataRegister
()
})
function
SaveDataRegister
(
param
)
{
...
...
@@ -255,30 +256,6 @@ function SaveDataRegister(param) {
let
antrian_akhir
=
$
(
'
#antrian_akhir
'
).
val
();
let
waktu_antrian
=
$
(
'
#waktu_antrian
'
).
val
();
let
jam_mulai
=
$
(
'
#jam_mulai
'
).
val
();
/* save data */
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/saveregister
'
,
data
:
{
iruang
:
ruang
,
id
:
param
,
iantrian_all
:
antrian_all
,
//variable json diisi oleh variable yang menyimpan data inputan
iantrian_awal
:
antrian_awal
,
iantrian_akhir
:
antrian_akhir
,
iwaktu_antrian
:
waktu_antrian
,
ipoli
:
poli
,
idokter
:
dokter
,
ijam_mulai
:
jam_mulai
,
},
success
:
function
(
result
)
{
if
(
ruang
==
null
||
ruang
==
""
)
{
swal
({
title
:
""
,
...
...
@@ -399,13 +376,39 @@ function SaveDataRegister(param) {
});
return
false
;
}
else
if
(
result
.
code
==
0
)
{
/* save data */
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/saveregister
'
,
data
:
{
iruang
:
ruang
,
id
:
param
,
iantrian_all
:
antrian_all
,
//variable json diisi oleh variable yang menyimpan data inputan
iantrian_awal
:
antrian_awal
,
iantrian_akhir
:
antrian_akhir
,
iwaktu_antrian
:
waktu_antrian
,
ipoli
:
poli
,
idokter
:
dokter
,
ijam_mulai
:
jam_mulai
,
},
success
:
function
(
result
)
{
if
(
result
.
code
==
0
)
{
$
(
'
#addData
'
).
modal
(
'
hide
'
);
swal
({
title
:
"
<span style='color:#222'>Good Job!</span>
"
,
confirmButtonColor
:
"
#66BB6A
"
,
html
:
true
,
type
:
"
success
"
},
function
()
{
location
.
reload
();
});
// loadpoli();
...
...
@@ -439,12 +442,10 @@ function SaveDataRegister(param) {
$
(
'
#edit
'
).
on
(
'
click
'
,
function
()
{
let
id_register
=
$
(
'
#id_register
'
).
val
();
// if (validasieditnama() == true) {
// alert("Nama Poli Harus Berbeda!")
// } else {
editregister
(
id_register
)
// }
})
...
...
@@ -459,8 +460,129 @@ function editregister(id_register) {
let
waktu_antrian
=
$
(
'
#waktu_antrianedt
'
).
val
();
let
jam_mulai
=
$
(
'
#jam_mulaiedt
'
).
val
();
// if (ruang == null || ruang == "") {
// swal({
// title: "",
// text: "Field ruang is empty!",
// icon: "error",
// button: "ok",
// });
// return false;
// }
if
(
antrian_all
==
null
||
antrian_all
==
""
)
{
swal
({
title
:
""
,
text
:
"
Field antrian seluruh is empty!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
antrian_awal
==
null
||
antrian_awal
==
""
)
{
swal
({
title
:
""
,
text
:
"
Field antrian awal is empty!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
antrian_akhir
==
null
||
antrian_akhir
==
""
)
{
swal
({
title
:
""
,
text
:
"
Field antrian akhir is empty!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
waktu_antrian
==
null
||
waktu_antrian
==
""
)
{
swal
({
title
:
""
,
text
:
"
Field waktu antrian is empty!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
// else if (poli == null || poli == "") {
// swal({
// title: "",
// text: "Field poli is empty!",
// icon: "error",
// button: "ok",
// });
// return false;
// }
// else if (dokter == null || dokter == "") {
// swal({
// title: "",
// text: "Field dokter is empty!",
// icon: "error",
// button: "ok",
// });
// return false;
// }
else
if
(
parseInt
(
antrian_akhir
)
<
parseInt
(
antrian_awal
))
{
if
(
parseInt
(
antrian_akhir
)
<
parseInt
(
antrian_awal
))
{
swal
({
title
:
""
,
text
:
"
antrian awal tidak boleh lebih besar dari antrian akhir!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
parseInt
(
antrian_akhir
)
>
parseInt
(
antrian_all
))
{
swal
({
title
:
""
,
text
:
"
antrian akhir tidak boleh lebih besar dari antrian seluruh!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
}
else
if
(
parseInt
(
antrian_akhir
)
>
parseInt
(
antrian_all
))
{
swal
({
title
:
""
,
text
:
"
antrian akhir tidak boleh lebih besar dari antrian all!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
parseInt
(
antrian_awal
)
==
parseInt
(
antrian_akhir
))
{
swal
({
title
:
""
,
text
:
"
antrian akhir tidak boleh sama dengan antrian awal!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
parseInt
(
antrian_all
)
>
30
)
{
swal
({
title
:
""
,
text
:
"
antrian seluruh tidak boleh lebih dari 30!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
parseInt
(
waktu_antrian
)
>
10
)
{
swal
({
title
:
""
,
text
:
"
waktu antrian per orang tidak lebih dari 10 menit
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
else
if
(
parseInt
(
antrian_awal
)
<
5
)
{
swal
({
title
:
""
,
text
:
"
antrian mobile dimulai dari 5!
"
,
icon
:
"
error
"
,
button
:
"
ok
"
,
});
return
false
;
}
// let image = $('#kode_poli').val();
$
.
ajax
({
type
:
'
POST
'
,
...
...
@@ -469,7 +591,7 @@ function editregister(id_register) {
async
:
false
,
data
:
{
id
:
id_register
,
ipoli
:
poli
,
ipoli
:
poli
,
idokter
:
dokter
,
iruang
:
ruang
,
iantrial_all
:
antrian_all
,
...
...
@@ -482,6 +604,7 @@ function editregister(id_register) {
success
:
function
(
response
)
{
console
.
log
(
response
);
if
(
response
[
'
code
'
]
==
0
)
{
$
(
'
#editData
'
).
modal
(
'
hide
'
);
swal
({
title
:
""
,
text
:
"
Data Berhasil DiUbah!
"
,
...
...
@@ -493,9 +616,6 @@ function editregister(id_register) {
});
//
//window.onload
//location.reload()
}
else
{
...
...
public/tamplate/css/style.css
View file @
7251ee06
...
...
@@ -39,34 +39,34 @@ input:hover, input:focus {
/* line 18, ../../01 cl html template/03_jun 2019/182_medico_html/sass/_common.scss */
.section_padding
{
padding
:
14
0px
0px
;
padding
:
5
0px
0px
;
}
@media
only
screen
and
(
min-width
:
992px
)
and
(
max-width
:
1200px
)
{
/* line 18, ../../01 cl html template/03_jun 2019/182_medico_html/sass/_common.scss */
.section_padding
{
padding
:
8
0px
0px
;
padding
:
4
0px
0px
;
}
}
@media
only
screen
and
(
min-width
:
768px
)
and
(
max-width
:
991px
)
{
/* line 18, ../../01 cl html template/03_jun 2019/182_medico_html/sass/_common.scss */
.section_padding
{
padding
:
7
0px
0px
;
padding
:
3
0px
0px
;
}
}
@media
(
max-width
:
576px
)
{
/* line 18, ../../01 cl html template/03_jun 2019/182_medico_html/sass/_common.scss */
.section_padding
{
padding
:
7
0px
0px
;
padding
:
3
0px
0px
;
}
}
@media
only
screen
and
(
min-width
:
576px
)
and
(
max-width
:
767px
)
{
/* line 18, ../../01 cl html template/03_jun 2019/182_medico_html/sass/_common.scss */
.section_padding
{
padding
:
7
0px
0px
;
padding
:
3
0px
0px
;
}
}
...
...
public/tamplateadmin/js/demo/chart-pie-demo.js
View file @
7251ee06
...
...
@@ -3,75 +3,57 @@ Chart.defaults.global.defaultFontFamily = 'Nunito', '-apple-system,system-ui,Bli
Chart
.
defaults
.
global
.
defaultFontColor
=
'
#858796
'
;
// Pie Chart Example
var
ctx
=
document
.
getElementById
(
"
myPieChart
"
);
var
myPieChart
=
new
Chart
(
ctx
,
{
type
:
'
doughnut
'
,
data
:
{
labels
:
[
"
Direct
"
,
"
Referral
"
,
"
Social
"
],
datasets
:
[{
data
:
[
55
,
30
,
15
],
backgroundColor
:
[
'
#4e73df
'
,
'
#1cc88a
'
,
'
#36b9cc
'
],
hoverBackgroundColor
:
[
'
#2e59d9
'
,
'
#17a673
'
,
'
#2c9faf
'
],
hoverBorderColor
:
"
rgba(234, 236, 244, 1)
"
,
}],
},
options
:
{
maintainAspectRatio
:
false
,
tooltips
:
{
backgroundColor
:
"
rgb(255,255,255)
"
,
bodyFontColor
:
"
#858796
"
,
borderColor
:
'
#dddfeb
'
,
borderWidth
:
1
,
xPadding
:
15
,
yPadding
:
15
,
displayColors
:
false
,
caretPadding
:
10
,
},
legend
:
{
display
:
false
},
cutoutPercentage
:
80
,
},
});
loadpoli
()
function
loadpoli
()
{
// var ctx = document.getElementById("myPieChart");
// var myPieChart = new Chart(ctx, {
// type: 'doughnut',
// data: {
// labels: ["Direct", "Referral", "Social"],
// datasets: [{
// data: [55, 30, 15],
// backgroundColor: ['#4e73df', '#1cc88a', '#36b9cc'],
// hoverBackgroundColor: ['#2e59d9', '#17a673', '#2c9faf'],
// hoverBorderColor: "rgba(234, 236, 244, 1)",
// }],
// },
// options: {
// maintainAspectRatio: false,
// tooltips: {
// backgroundColor: "rgb(255,255,255)",
// bodyFontColor: "#858796",
// borderColor: '#dddfeb',
// borderWidth: 1,
// xPadding: 15,
// yPadding: 15,
// displayColors: false,
// caretPadding: 10,
// },
// legend: {
// display: false
// },
// cutoutPercentage: 80,
// },
// });
jumlahantrian
()
function
jumlahantrian
()
{
var
id
=
document
.
getElementById
(
"
myPieChart
"
);
$
.
ajax
({
type
:
'
POST
'
,
dataType
:
'
json
'
,
url
:
baseURL
+
'
/api/load
Registerpoli
'
,
url
:
baseURL
+
'
/api/load
totalantrian
'
,
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
'
);
}
}
}
});
}
success
:
function
(
result
)
{
console
.
log
(
result
)
}
});
}
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