You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
6 days ago
|
<?php
|
||
|
declare(strict_types = 1);
|
||
|
|
||
|
namespace App\Http\Resources\Outpatient\Medical;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||
|
|
||
|
class PrescriptionPreSettleResource extends JsonResource
|
||
|
{
|
||
|
/**
|
||
|
* Transform the resource into an array.
|
||
|
*
|
||
|
* @return array<string, mixed>
|
||
|
*/
|
||
|
public function toArray(Request $request = null): array
|
||
|
{
|
||
|
if (empty($this->resource)) {
|
||
|
return [];
|
||
|
}
|
||
|
|
||
|
return [
|
||
|
// 总金额
|
||
|
'total_amt' => (float) $this->resource['TotalAmount'],
|
||
|
// 减免金额
|
||
|
'medical_amt' => (float) $this->resource['MedicareAmount'],
|
||
|
// 现金金额
|
||
|
'pay_amt' => (float) $this->resource['PayAmount'],
|
||
|
// 个人账户支付金额
|
||
|
'account_amt' => (float) $this->resource['AccountAmount'],
|
||
|
// 其他优惠金额
|
||
|
'other_amt' => 0,
|
||
|
// 加收费费用描述
|
||
|
'extra_fee_desc' => $this->resource['ExtraFeeDesc'] ?? ''
|
||
|
];
|
||
|
}
|
||
|
}
|