Commit 7251ee06 authored by Azy Mushofy Anwary's avatar Azy Mushofy Anwary

condisi

parent b6beb3c7
......@@ -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;
......
......@@ -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
LEFT JOIN antrian_pasien ap
ON ap.id_pasien = p.id_pasien
WHERE p.no_rekam_medis='$no_rekam_medis' ";
$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);
......@@ -1046,13 +1088,13 @@ 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
FROM dokter_to_poli
INNER JOIN poli
ON dokter_to_poli.id_poli = poli.id_poli
INNER JOIN condition
ON condition.id_condition = dokter_to_poli.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
INNER JOIN condition
ON condition.id_condition = dokter_to_poli.id_condition
";
if($id){
$sql .= " Where dokter_to_poli.id_dokter = $id";
......
......@@ -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">
......
......@@ -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">
......
......@@ -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>
......
......@@ -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">&times;</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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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">
......
......@@ -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,13 +142,7 @@
<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 &copy;
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>
</div>
......
$('#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 });
......
......@@ -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;
......
......@@ -152,6 +152,7 @@ function editdatapasien(id_pasien) {
},
success: function (response) {
$('#Editdata').modal('hide');
console.log(response);
if (response['code'] == 0) {
swal({
......
......@@ -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 (nama_ruang == data[x]['nama_ruang']) {
// }
// }
if (lantai == data[x]['lantai']) {
if (lantai == data[x]['lantai']) {
if (nama_ruang == data[x]['nama_ruang']) {
exist = 1;
}
if (nama_ruang == data[x]['nama_ruang']) {
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 });
}
});
},
......
......@@ -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: 140px 0px;
padding: 50px 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: 80px 0px;
padding: 40px 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: 70px 0px;
padding: 30px 0px;
}
}
@media (max-width: 576px) {
/* line 18, ../../01 cl html template/03_jun 2019/182_medico_html/sass/_common.scss */
.section_padding {
padding: 70px 0px;
padding: 30px 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: 70px 0px;
padding: 30px 0px;
}
}
......
......@@ -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/loadRegisterpoli',
url: baseURL + '/api/loadtotalantrian',
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)
}
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment