diff --git a/Modules/Internal/Transformers/AppointmentResource.php b/Modules/Internal/Transformers/AppointmentResource.php
index f5948e45..ad3e4e47 100644
--- a/Modules/Internal/Transformers/AppointmentResource.php
+++ b/Modules/Internal/Transformers/AppointmentResource.php
@@ -31,7 +31,8 @@ class AppointmentResource extends JsonResource
'his_detail' => [
'RegID' => $this->sRegID,
'Medrec' => $this->sNomorRekamMedis
- ]
+ ],
+ 'type' => $this->type
];
$payment_detail = null;
diff --git a/app/Models/OLDLMS/Appointment.php b/app/Models/OLDLMS/Appointment.php
index 374b6bfb..c04215b8 100644
--- a/app/Models/OLDLMS/Appointment.php
+++ b/app/Models/OLDLMS/Appointment.php
@@ -31,6 +31,12 @@ class Appointment extends Model
5 => 'Voucher',
];
+ public $nIDJenisBookingNames = [
+ 1 => 'Rawat Jalan',
+ 2 => 'Telekonsultasi',
+ 3 => 'Chat Sekarang'
+ ];
+
protected $connection = 'oldlms';
protected $table = 'tx_appointment';
@@ -53,7 +59,8 @@ class Appointment extends Model
protected $appends = [
'status_name',
- 'payment_method'
+ 'payment_method',
+ 'type'
];
protected function statusName(): Attribute
@@ -74,6 +81,15 @@ class Appointment extends Model
);
}
+ protected function type(): Attribute
+ {
+ return Attribute::make(
+ get: function($value) {
+ return $this->nIDJenisBookingNames[$this->nIDJenisBooking] ?? '-';
+ }
+ );
+ }
+
public function appointmentDetail()
{
diff --git a/frontend/dashboard/src/pages/Report/Appointments/List.tsx b/frontend/dashboard/src/pages/Report/Appointments/List.tsx
index afc2552b..e6a5c5b5 100644
--- a/frontend/dashboard/src/pages/Report/Appointments/List.tsx
+++ b/frontend/dashboard/src/pages/Report/Appointments/List.tsx
@@ -189,6 +189,7 @@ export default function List() {
{row.patient_name ? row.patient_name : '-'}
{row.health_care ? row.health_care : '-'}
{row.doctor_name ? row.doctor_name : '-'}
+ {row.type ? row.type : '-'}
{row.status ? row.status : '-'}
@@ -370,7 +371,7 @@ export default function List() {
Dokter
- Appointment Via App/Website
+ Jenis
Status Appointment