Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -215,6 +215,24 @@ class RequestLogController extends Controller
|
||||
return Helper::responseJson(data: $manipulatedIcds);
|
||||
}
|
||||
|
||||
public function hospitals(){
|
||||
$organizations = Organization::query()
|
||||
->where([
|
||||
'type' => 'hospital',
|
||||
'status' => 'active',
|
||||
])
|
||||
->get();
|
||||
|
||||
$manipulatedOrganizations = $organizations->map(function ($organization) {
|
||||
// Contoh manipulasi, tambahkan atau ubah properti sesuai kebutuhan
|
||||
return [
|
||||
'value' => $organization->id, // Ganti dengan properti yang sesuai dari model Icd
|
||||
'label' => $organization->name, // Ganti dengan properti yang sesuai dari model Icd
|
||||
];
|
||||
});
|
||||
return Helper::responseJson(data: $manipulatedOrganizations);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
* @param int $id
|
||||
@@ -255,6 +273,14 @@ class RequestLogController extends Controller
|
||||
$requestLog->catatan = $request->catatan;
|
||||
}
|
||||
|
||||
if (!empty($request->billing_no)) {
|
||||
$requestLog->billing_no = $request->billing_no;
|
||||
}
|
||||
|
||||
if (!empty($request->invoice_no)) {
|
||||
$requestLog->invoice_no = $request->invoice_no;
|
||||
}
|
||||
|
||||
if (!empty($request->reason)) {
|
||||
$requestLog->reason = $request->reason;
|
||||
}
|
||||
@@ -301,10 +327,12 @@ class RequestLogController extends Controller
|
||||
$requestLog = RequestLog::findOrFail($id);
|
||||
$requestLog->status_final_log = null;
|
||||
$requestLog->final_log = 0;
|
||||
$requestLog->reason_final = 'Reason Delete ' .$request->reason;
|
||||
$requestLog->reason_final = 'Reason Delete Final LOG' .$request->reason;
|
||||
$requestLog->save();
|
||||
|
||||
// Hapus semua manfaat log permintaan terkait
|
||||
RequestLogBenefit::where('request_log_id', $id)->delete();
|
||||
|
||||
return response()->json([
|
||||
'error' => false,
|
||||
'message' => 'Delete Final LOG',
|
||||
@@ -406,7 +434,13 @@ class RequestLogController extends Controller
|
||||
// Update Request LOG untuk lanjut ke Final LOG
|
||||
// if (!empty($request->catatan)) {
|
||||
$requestLog->catatan = $request->catatan;
|
||||
// }
|
||||
}
|
||||
if (!empty($request->billing_no)) {
|
||||
$requestLog->billing_no = $request->billing_no;
|
||||
}
|
||||
if (!empty($request->invoice_no)) {
|
||||
$requestLog->invoice_no = $request->invoice_no;
|
||||
}
|
||||
if ($request->discharge_date) {
|
||||
$requestLog->discharge_date = $request->discharge_date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user