update schedule dokter
This commit is contained in:
@@ -39,19 +39,36 @@ class LmsApi
|
||||
$data['channel'] = 'Website';
|
||||
}
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/jadwaldokter', $data)->json();
|
||||
|
||||
$res = self::http()->post(self::baseUrl() . '/jadwaldokter', $data)->json();
|
||||
|
||||
// Reformat Jam Data
|
||||
$res['data'] = collect($res['data'])->map(function($day) {
|
||||
$res['data'] = collect($res['data'])->map(function ($day) {
|
||||
|
||||
$day['Jam'] = !empty($day['Jam']) ? explode(', ', $day['Jam']) : null;
|
||||
return $day;
|
||||
|
||||
})->toArray();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* dokter
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
public static function dokter($kodeRs, $channel = 'hospitaloka', $timeout = 30)
|
||||
{
|
||||
$data = [
|
||||
'rs' => $kodeRs,
|
||||
'channel' => $channel,
|
||||
];
|
||||
|
||||
$res = self::http()->timeout($timeout)->post('http://lmsapi.primaya.id/dokter', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* jadwalDokterTersedia
|
||||
*
|
||||
@@ -72,21 +89,20 @@ class LmsApi
|
||||
$data['channel'] = 'Website';
|
||||
}
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/jadwaldoktertersedia', $data)->json();
|
||||
|
||||
$res = self::http()->post(self::baseUrl() . '/jadwaldoktertersedia', $data)->json();
|
||||
|
||||
// Reformat Jam Data
|
||||
$res['data'] = collect($res['data'])->map(function($day) {
|
||||
$res['data'] = collect($res['data'])->map(function ($day) {
|
||||
|
||||
// Change jam to Jam to Standarize
|
||||
$day['Jam'] = !empty($day['jam']) ? explode(', ', $day['jam']) : null;
|
||||
unset($day['jam']);
|
||||
return $day;
|
||||
|
||||
})->toArray();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* checkMedrec
|
||||
*
|
||||
@@ -113,11 +129,11 @@ class LmsApi
|
||||
throw new Exception('name, birth_date, nik, phone are required in $patientData');
|
||||
}
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/medrec_nama', $data)->json();
|
||||
$res = self::http()->post(self::baseUrl() . '/medrec_nama', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* checkGantung
|
||||
*
|
||||
@@ -126,7 +142,7 @@ class LmsApi
|
||||
* @return void
|
||||
*/
|
||||
public static function checkGantung($HISKodeRS, $HISMedrec, $patientData)
|
||||
{
|
||||
{
|
||||
$data = [
|
||||
'rs' => $HISKodeRS,
|
||||
'rm' => $HISMedrec,
|
||||
@@ -141,11 +157,11 @@ class LmsApi
|
||||
throw new Exception('name, birth_date are required in $patientData');
|
||||
}
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/cek_gantung', $data)->json();
|
||||
$res = self::http()->post(self::baseUrl() . '/cek_gantung', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* checkSlot
|
||||
*
|
||||
@@ -156,9 +172,9 @@ class LmsApi
|
||||
* @param string $type HIS Slot Type walkin, teleconsultation
|
||||
* @return void
|
||||
*/
|
||||
public static function checkSlot( $HISKodeRS, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $type )
|
||||
public static function checkSlot($HISKodeRS, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $type)
|
||||
{
|
||||
|
||||
|
||||
$data = [
|
||||
'rs' => $HISKodeRS,
|
||||
'dr' => $HISKodeDokter,
|
||||
@@ -169,11 +185,11 @@ class LmsApi
|
||||
$data['channel'] = 'Website';
|
||||
}
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/cek_slot', $data)->json();
|
||||
$res = self::http()->post(self::baseUrl() . '/cek_slot', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* appointmentBaru
|
||||
*
|
||||
@@ -189,7 +205,8 @@ class LmsApi
|
||||
* @param mixed $userId
|
||||
* @return void
|
||||
*/
|
||||
public static function appointmentBaru( $HISKodeRS, $HISKodeDep, $HISKodeDokter, $jenisTC, $tanggalAppointment, $jamAppointment, $jumlahBayar, $kodePembayaran, $patientData, $userId ) {
|
||||
public static function appointmentBaru($HISKodeRS, $HISKodeDep, $HISKodeDokter, $jenisTC, $tanggalAppointment, $jamAppointment, $jumlahBayar, $kodePembayaran, $patientData, $userId)
|
||||
{
|
||||
$data = [
|
||||
'rs' => $HISKodeRS,
|
||||
'dep' => $HISKodeDep,
|
||||
@@ -220,11 +237,11 @@ class LmsApi
|
||||
'jam' => $jamAppointment,
|
||||
];
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/appointment_baru', $data)->json();
|
||||
$res = self::http()->post(self::baseUrl() . '/appointment_baru', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* appointment
|
||||
*
|
||||
@@ -241,7 +258,8 @@ class LmsApi
|
||||
* @param mixed $userId
|
||||
* @return void
|
||||
*/
|
||||
public static function appointment( $HISKodeRS, $HISKodeDep, $HISKodeDokter, $jenisTC, $tanggalAppointment, $jamAppointment, $jumlahBayar, $kodePembayaran, $HISMedrec, $patientData, $userId ) {
|
||||
public static function appointment($HISKodeRS, $HISKodeDep, $HISKodeDokter, $jenisTC, $tanggalAppointment, $jamAppointment, $jumlahBayar, $kodePembayaran, $HISMedrec, $patientData, $userId)
|
||||
{
|
||||
$data = [
|
||||
'rs' => $HISKodeRS,
|
||||
'dep' => $HISKodeDep,
|
||||
@@ -259,11 +277,11 @@ class LmsApi
|
||||
'jam' => $jamAppointment,
|
||||
];
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/appointment', $data)->json();
|
||||
$res = self::http()->post(self::baseUrl() . '/appointment', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* appointmentEdit
|
||||
*
|
||||
@@ -277,7 +295,7 @@ class LmsApi
|
||||
* @param mixed $patientData
|
||||
* @return void
|
||||
*/
|
||||
public static function appointmentEdit( $HISRegid, $HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $HISMedrec, $patientData )
|
||||
public static function appointmentEdit($HISRegid, $HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $HISMedrec, $patientData)
|
||||
{
|
||||
$data = [
|
||||
'regid' => $HISRegid,
|
||||
@@ -293,11 +311,11 @@ class LmsApi
|
||||
'jam' => $jamAppointment,
|
||||
];
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/appointment_edit', $data)->json();
|
||||
|
||||
$res = self::http()->post(self::baseUrl() . '/appointment_edit', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* booking
|
||||
*
|
||||
@@ -314,7 +332,8 @@ class LmsApi
|
||||
* @param mixed $nomorRujukanBPJS
|
||||
* @return void
|
||||
*/
|
||||
public static function booking( $HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $HISMedrec, $patientData, $jenisPenjamin = 0, $namaPenjamin = '', $nomorKartuBPJS = null, $nomorRujukanBPJS = null ) {
|
||||
public static function booking($HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $HISMedrec, $patientData, $jenisPenjamin = 0, $namaPenjamin = '', $nomorKartuBPJS = null, $nomorRujukanBPJS = null)
|
||||
{
|
||||
$data = [
|
||||
'rs' => $HISKodeRS,
|
||||
'dep' => $HISKodeDep,
|
||||
@@ -334,11 +353,11 @@ class LmsApi
|
||||
'norujukan' => $nomorRujukanBPJS
|
||||
];
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/booking', $data)->json();
|
||||
|
||||
$res = self::http()->post(self::baseUrl() . '/booking', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* bookingBaru
|
||||
*
|
||||
@@ -354,7 +373,8 @@ class LmsApi
|
||||
* @param mixed $nomorRujukanBPJS
|
||||
* @return void
|
||||
*/
|
||||
public static function bookingBaru( $HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $patientData, $jenisPenjamin = 0, $namaPenjamin = '', $nomorKartuBPJS = null, $nomorRujukanBPJS = null) {
|
||||
public static function bookingBaru($HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $patientData, $jenisPenjamin = 0, $namaPenjamin = '', $nomorKartuBPJS = null, $nomorRujukanBPJS = null)
|
||||
{
|
||||
$data = [
|
||||
'rs' => $HISKodeRS,
|
||||
'dep' => $HISKodeDep,
|
||||
@@ -385,12 +405,12 @@ class LmsApi
|
||||
'nokartu' => $nomorKartuBPJS,
|
||||
'norujukan' => $nomorRujukanBPJS
|
||||
];
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/booking_baru', $data)->json();
|
||||
|
||||
|
||||
$res = self::http()->post(self::baseUrl() . '/booking_baru', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* bookingEdit
|
||||
* Used for Rescheduling appointment
|
||||
@@ -409,7 +429,8 @@ class LmsApi
|
||||
* @param mixed $nomorRujukanBPJS
|
||||
* @return void
|
||||
*/
|
||||
public static function bookingEdit( $kodeBooking, $HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $tanggalAppointmentBaru, $jamAppointmentBaru, $jenisPenjamin = 0, $namaPenjamin = '', $nomorKartuBPJS = null, $nomorRujukanBPJS = null ) {
|
||||
public static function bookingEdit($kodeBooking, $HISKodeRS, $HISKodeDep, $HISKodeDokter, $tanggalAppointment, $jamAppointment, $tanggalAppointmentBaru, $jamAppointmentBaru, $jenisPenjamin = 0, $namaPenjamin = '', $nomorKartuBPJS = null, $nomorRujukanBPJS = null)
|
||||
{
|
||||
$data = [
|
||||
'kodebooking' => $kodeBooking,
|
||||
'rs' => $HISKodeRS,
|
||||
@@ -424,16 +445,16 @@ class LmsApi
|
||||
'tglbaru' => $tanggalAppointmentBaru,
|
||||
'jambaru' => $jamAppointmentBaru,
|
||||
];
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/booking_edit', $data)->json();
|
||||
|
||||
|
||||
$res = self::http()->post(self::baseUrl() . '/booking_edit', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public static function bookingPaket($kodeRs, $kodeDep, $rm, $ktp, $nama_pasien, $tgl_lahir, $email, $telp, $tgl, $jam, $jenis_penjamin, $penjamin, $paket, $jenis_paket)
|
||||
{
|
||||
throw new Exception("Not Implemented", 1);
|
||||
|
||||
|
||||
$url = Http::withHeaders([
|
||||
'id' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjE3NWZiNDI0LTA4MzMtNGZiMS1iOWNhLWQwMzQ5Nzc'
|
||||
])->post('http://lmsapidev.primaya.id/booking_paket', [
|
||||
@@ -485,7 +506,7 @@ class LmsApi
|
||||
$jenis_paket
|
||||
) {
|
||||
throw new Exception("Not Implemented", 1);
|
||||
|
||||
|
||||
$url = Http::withHeaders([
|
||||
'id' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjE3NWZiNDI0LTA4MzMtNGZiMS1iOWNhLWQwMzQ5Nzc'
|
||||
])->post('http://lmsapidev.primaya.id/booking_baru_paket', [
|
||||
@@ -537,7 +558,7 @@ class LmsApi
|
||||
$jenis_paket
|
||||
) {
|
||||
throw new Exception("Not Implemented", 1);
|
||||
|
||||
|
||||
$url = Http::withHeaders([
|
||||
'id' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjE3NWZiNDI0LTA4MzMtNGZiMS1iOWNhLWQwMzQ5Nzc'
|
||||
])->post('http://lmsapidev.primaya.id/booking_edit_paket', [
|
||||
@@ -558,7 +579,7 @@ class LmsApi
|
||||
return $url;
|
||||
}
|
||||
|
||||
public static function bookingBayar( $kodeBooking, $HISKodeRS, $tanggalBooking, $jumlahBayar, $merchantCode, $merchantOrderId, $reference)
|
||||
public static function bookingBayar($kodeBooking, $HISKodeRS, $tanggalBooking, $jumlahBayar, $merchantCode, $merchantOrderId, $reference)
|
||||
{
|
||||
$data = [
|
||||
"rs" => $HISKodeRS,
|
||||
@@ -570,9 +591,9 @@ class LmsApi
|
||||
'merchantorderid' => $merchantOrderId,
|
||||
'reference' => $reference,
|
||||
];
|
||||
|
||||
$res = self::http()->post( self::baseUrl() . '/booking_bayar', $data)->json();
|
||||
|
||||
|
||||
$res = self::http()->post(self::baseUrl() . '/booking_bayar', $data)->json();
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -603,4 +624,4 @@ class LmsApi
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user