From 04b0b2943d3002a65dfd7fe976e372979ba7f78a Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Thu, 2 May 2024 08:21:56 +0700 Subject: [PATCH] update --- Modules/Internal/Transformers/LivechatResource.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Modules/Internal/Transformers/LivechatResource.php b/Modules/Internal/Transformers/LivechatResource.php index 3c2585d9..28018765 100644 --- a/Modules/Internal/Transformers/LivechatResource.php +++ b/Modules/Internal/Transformers/LivechatResource.php @@ -22,7 +22,15 @@ class LivechatResource extends JsonResource $diagnosis = $prescription ? $prescription->icd_code : ''; $hospital = $prescription ? $prescription->organization_id : ''; - $prescriptionItem = $prescription ? PrescriptionItem::where('prescription_id', $prescription->id)->get() : []; + $prescriptionItem = $prescription ? PrescriptionItem::where('prescription_id', $prescription->id)->get() : [ + [ + 'drug_id' => 0, + 'qty' => 0, + 'signa' => '', + 'unit_id' => 0, + 'note' => '', // input to database + ] + ]; $livechat = [ 'id' => $this->nID,