This commit is contained in:
ivan-sim
2024-09-23 09:20:20 +07:00
parent 59e38b969e
commit 15138f7edf
3 changed files with 21 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ class ReportPrescriptionResource extends JsonResource
public function toArray($request)
{
$patientName = $this->user ? $this->user->sFirstName .' '. $this->user->sLastName : '-';
$data = [
'id' => $this->nID,
'patient_name' => $patientName,
@@ -25,6 +25,7 @@ class ReportPrescriptionResource extends JsonResource
'date_consultation' => $this->dTanggalResep ? Carbon::parse($this->dTanggalResep)->format('Y-m-d H:i:s') : null,
'doctor_name' => $this->sDokterName ? $this->sDokterName : '-',
'items' => $this->items ? $this->items : [],
'status_prescription' => $this->status_prescription
];
return $data;