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,