Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mlite #200

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Mlite #200

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion plugins/anjungan/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -2989,7 +2989,30 @@ public function postSaveSEP()
$data = json_encode($data);
$url = $this->api_url.'antrean/add';
$output = BpjsService::post($url, $data, $this->consid, $this->secretkey, $this->user_key, NULL);
// $data = json_decode($output, true);
$data = json_decode($output, true);
if($data['metadata']['code'] == 200 || $data['metadata']['code'] == 208) {
$this->db('mlite_antrian_referensi')->save([
'tanggal_periksa' => date('Y-m-d'),
'no_rkm_medis' => $reg_periksa['no_rkm_medis'],
'nomor_kartu' => $pasien['no_peserta'],
'nomor_referensi' => $nomorreferensi,
'kodebooking' => $kodebooking,
'jenis_kunjungan' => $_POST['tujuanKunj'],
'status_kirim' => 'Sudah',
'keterangan' => $data['metadata']['code'].': '.$data['metadata']['message']
]);
} else if ($data == null) {
$this->db('mlite_antrian_referensi')->save([
'tanggal_periksa' => date('Y-m-d'),
'no_rkm_medis' => $reg_periksa['no_rkm_medis'],
'nomor_kartu' => $pasien['no_peserta'],
'nomor_referensi' => $nomorreferensi,
'kodebooking' => $kodebooking,
'jenis_kunjungan' => $_POST['tujuanKunj'],
'status_kirim' => 'Sudah',
'keterangan' => $data['metadata']['code'].' null : null '.$data['metadata']['message']
]);
}
}

$data = [
Expand Down
28 changes: 20 additions & 8 deletions plugins/jkn_mobile/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ private function _resultStatusAntrian()
$response = array(
'response' => array(
'namapoli' => $data['nm_poli'],
'namadokter' => $data['nm_dokter'],
'namadokter' => $kddokter['nm_dokter'],
'totalantrean' => $data['total_antrean'],
'sisaantrean' => ($data['sisa_antrean']>0?$data['sisa_antrean']:0),
'sisaantrean' => (int)$data['sisa_antrean'],
'antreanpanggil' => "A-".$max_antrian['no_reg'],
'sisakuotajkn' => ($kuota['kuota']-$data['total_antrean']),
'kuotajkn' => intval($kuota['kuota']),
Expand All @@ -601,12 +601,24 @@ private function _resultStatusAntrian()
http_response_code(200);
} else {
$response = array(
'response' => array(
'namapoli' => $kdpoli['nm_poli_bpjs'],
'namadokter' => $data['nm_dokter'],
'totalantrean' => $data['total_antrean'],
'sisaantrean' => (int)$data['sisa_antrean'],
'antreanpanggil' => "A-0",
'sisakuotajkn' => ($kuota['kuota']-$data['total_antrean']),
'kuotajkn' => intval($kuota['kuota']),
'sisakuotanonjkn' => ($kuota['kuota']-$data['total_antrean']),
'kuotanonjkn' => intval($kuota['kuota']),
'keterangan' => $data['keterangan']
),
'metadata' => array(
'message' => 'Maaf belum ada antrian ditanggal ' . $decode['tanggalperiksa'],
'code' => 201
'message' => 'Ok',
'code' => 200
)
);
http_response_code(201);
http_response_code(200);
}
}
} else {
Expand Down Expand Up @@ -1467,7 +1479,7 @@ private function _resultPasienBaru()
)
);
http_response_code(201);
}else if(empty($decode['rw'])) {
}else if(empty(isset($decode['rw']))) {
$response = array(
'metadata' => array(
'message' => 'RW tidak boleh kosong',
Expand All @@ -1483,7 +1495,7 @@ private function _resultPasienBaru()
)
);
http_response_code(201);
}else if(empty($decode['rt'])) {
}else if(empty(isset($decode['rt']))) {
$response = array(
'metadata' => array(
'message' => 'RT tidak boleh kosong',
Expand Down Expand Up @@ -1560,7 +1572,7 @@ private function _resultPasienBaru()
'norm' => $_POST['no_rkm_medis']
),
'metadata' => array(
'message' => 'Pasien berhasil mendapatkann nomor RM, silahkan lanjutkan ke booking. Pasien tidak perlu ke admisi.',
'message' => 'Pasien berhasil mendapatkan nomor RM, silahkan lanjutkan ke booking. Pasien tidak perlu ke admisi.',
'code' => 200
)
);
Expand Down