Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -491,8 +491,8 @@ class ClaimController extends Controller
|
|||||||
!empty($item_benefit->amount_not_approved) ? $item_benefit->amount_not_approved : '',
|
!empty($item_benefit->amount_not_approved) ? $item_benefit->amount_not_approved : '',
|
||||||
!empty($item_benefit->excess_paid) ? $item_benefit->excess_paid : '',
|
!empty($item_benefit->excess_paid) ? $item_benefit->excess_paid : '',
|
||||||
!empty($item->diagnosis) ? $item->diagnosis : '',
|
!empty($item->diagnosis) ? $item->diagnosis : '',
|
||||||
!empty($item->catatan) ? $item->catatan : '',
|
|
||||||
!empty($item->keterangan) ? $item->keterangan : '',
|
!empty($item->keterangan) ? $item->keterangan : '',
|
||||||
|
!empty($item->catatan) ? $item->catatan : '',
|
||||||
|
|
||||||
];
|
];
|
||||||
array_push($dataRow,$rowData);
|
array_push($dataRow,$rowData);
|
||||||
|
|||||||
@@ -212,7 +212,8 @@ class CorporateMemberController extends Controller
|
|||||||
'benefit'
|
'benefit'
|
||||||
],
|
],
|
||||||
'requestLogDailyMonitorings:id,request_log_id,created_at,subject,body_temperature,sistole,diastole,respiration_rate,analysis,lab_date,provider,examination' => [
|
'requestLogDailyMonitorings:id,request_log_id,created_at,subject,body_temperature,sistole,diastole,respiration_rate,analysis,lab_date,provider,examination' => [
|
||||||
'requestLogMedicalPlans:request_log_daily_monitoring_id,plan,type'
|
'requestLogMedicalPlans:request_log_daily_monitoring_id,plan,type',
|
||||||
|
// 'document'
|
||||||
],
|
],
|
||||||
'service:code,name',
|
'service:code,name',
|
||||||
'files',
|
'files',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace Modules\Client\Transformers\AlarmCenter;
|
|||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
use App\Models\Icd;
|
use App\Models\Icd;
|
||||||
|
use DB;
|
||||||
|
|
||||||
class DataServiceMonitoring extends JsonResource
|
class DataServiceMonitoring extends JsonResource
|
||||||
{
|
{
|
||||||
@@ -22,17 +23,22 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
$filesFinalLogKondisi = [];
|
$filesFinalLogKondisi = [];
|
||||||
if (count($this->files)>0){
|
if (count($this->files)>0){
|
||||||
foreach ($this->files as $key => $value) {
|
foreach ($this->files as $key => $value) {
|
||||||
if($value->type == 'final-log-result'){
|
/*
|
||||||
|
Sementara di buat satu dulu, jangan di hapus..
|
||||||
|
karena suka labil client nya, tiba2 hide tiba2 munculin fitur :D
|
||||||
|
*/
|
||||||
|
|
||||||
|
// if($value->type == 'final-log-result'){
|
||||||
array_push($filesFinalLogResult, $value);
|
array_push($filesFinalLogResult, $value);
|
||||||
};
|
// };
|
||||||
|
|
||||||
if($value->type == 'final-log-diagnosis'){
|
// if($value->type == 'final-log-diagnosis'){
|
||||||
array_push($filesFinalLogDiagnosis, $value);
|
// array_push($filesFinalLogDiagnosis, $value);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if($value->type == 'final-log-kondisi'){
|
// if($value->type == 'final-log-kondisi'){
|
||||||
array_push($filesFinalLogKondisi, $value);
|
// array_push($filesFinalLogKondisi, $value);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
$files = [
|
$files = [
|
||||||
@@ -77,7 +83,6 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'companyName' => $this->member->currentCorporate->name ?? null,
|
'companyName' => $this->member->currentCorporate->name ?? null,
|
||||||
'serviceCode' => $this->service_code ?? null,
|
'serviceCode' => $this->service_code ?? null,
|
||||||
@@ -111,6 +116,23 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
->map(function ($groupedItems) {
|
->map(function ($groupedItems) {
|
||||||
return collect($groupedItems)
|
return collect($groupedItems)
|
||||||
->map(function ($requestLogDailyMonitoring) {
|
->map(function ($requestLogDailyMonitoring) {
|
||||||
|
$arr_document = [];
|
||||||
|
$document = DB::table('files')
|
||||||
|
->where(['fileable_type' => 'App\Models\LaboratoriumResult', 'fileable_id' => $requestLogDailyMonitoring->id])
|
||||||
|
->whereIn('type', ['medical-action-letter', 'confirmation-medical-letter'])
|
||||||
|
->get();
|
||||||
|
if ($document){
|
||||||
|
foreach($document as $d){
|
||||||
|
$arr_document[]= [
|
||||||
|
'path' => env('APP_URL') . '/storage/lab_result/' . $d->name . '.' . $d->extension,
|
||||||
|
'type' => $d->type,
|
||||||
|
'original_name' => $d->original_name,
|
||||||
|
'name' => $d->name,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'time' => $requestLogDailyMonitoring->created_at->format('H:i') ?? null,
|
'time' => $requestLogDailyMonitoring->created_at->format('H:i') ?? null,
|
||||||
'status' => 'Done' ?? null,
|
'status' => 'Done' ?? null,
|
||||||
@@ -130,6 +152,7 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
})
|
})
|
||||||
->sortBy('type')
|
->sortBy('type')
|
||||||
->all()) ?? null,
|
->all()) ?? null,
|
||||||
|
'files' => $arr_document
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
->sortByDesc(function ($item) {
|
->sortByDesc(function ($item) {
|
||||||
@@ -148,11 +171,27 @@ class DataServiceMonitoring extends JsonResource
|
|||||||
->map(function ($groupedItems) {
|
->map(function ($groupedItems) {
|
||||||
return collect($groupedItems)
|
return collect($groupedItems)
|
||||||
->map(function ($requestLogDailyMonitoring) {
|
->map(function ($requestLogDailyMonitoring) {
|
||||||
|
$arr_document = [];
|
||||||
|
$document = DB::table('files')
|
||||||
|
->where(['fileable_type' => 'App\Models\LaboratoriumResult', 'fileable_id' => $requestLogDailyMonitoring->id])
|
||||||
|
->whereIn('type', ['laboratorium-result'])
|
||||||
|
->get();
|
||||||
|
if ($document){
|
||||||
|
foreach($document as $d){
|
||||||
|
$arr_document[]= [
|
||||||
|
'path' => env('APP_URL') . '/storage/lab_result/' . $d->name . '.' . $d->extension,
|
||||||
|
'type' => $d->type,
|
||||||
|
'original_name' => $d->original_name,
|
||||||
|
'name' => $d->name,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
return [
|
return [
|
||||||
'code' => $requestLogDailyMonitoring->code,
|
'code' => $requestLogDailyMonitoring->code,
|
||||||
'date' => Carbon::parse($requestLogDailyMonitoring->lab_date)->format('d M Y') ?? null,
|
'date' => Carbon::parse($requestLogDailyMonitoring->lab_date)->format('d M Y') ?? null,
|
||||||
'examination' => $requestLogDailyMonitoring->examination ?? null,
|
'examination' => $requestLogDailyMonitoring->examination ?? null,
|
||||||
'location' => $requestLogDailyMonitoring->provider ?? null,
|
'location' => $requestLogDailyMonitoring->provider ?? null,
|
||||||
|
'files' => $arr_document
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
->sortByDesc(function ($item) {
|
->sortByDesc(function ($item) {
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ class RequestLogController extends Controller
|
|||||||
'member_id' => $request->member_id,
|
'member_id' => $request->member_id,
|
||||||
'service_code' => $request->service_code,
|
'service_code' => $request->service_code,
|
||||||
'organization_id' => $request->organization_id,
|
'organization_id' => $request->organization_id,
|
||||||
'organization_name' => $request->organization_name,
|
'organization_name' => !empty($request->organization_name) ? $request->organization_name : null,
|
||||||
'address_provider' => $request->address_provider,
|
'address_provider' => !empty($request->address_provider) ? $request->address_provider : null,
|
||||||
'submission_date' => $request->submission_date,
|
'submission_date' => $request->submission_date,
|
||||||
'corporate_id_partner' => $request->corporate_id_partner,
|
'corporate_id_partner' => !empty($request->corporate_id_partner) ? $request->corporate_id_partner : [],
|
||||||
];
|
];
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'member_id' => 'required',
|
'member_id' => 'required',
|
||||||
@@ -40,7 +40,7 @@ class RequestLogController extends Controller
|
|||||||
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
'service_code.required' => trans('Validation.required',['attribute' => 'Service Code']),
|
||||||
'submission_date.required' => trans('Validation.required',['attribute' => 'Submission Date']),
|
'submission_date.required' => trans('Validation.required',['attribute' => 'Submission Date']),
|
||||||
]);
|
]);
|
||||||
if($request->organization_id)
|
if(!empty($request->organization_id))
|
||||||
{
|
{
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'organization_id' => 'required',
|
'organization_id' => 'required',
|
||||||
@@ -62,7 +62,7 @@ class RequestLogController extends Controller
|
|||||||
{
|
{
|
||||||
//insert data to organization
|
//insert data to organization
|
||||||
try {
|
try {
|
||||||
if(!$request->organization_id)
|
if (!empty($request->organization_name) && !empty($request->address_provider))
|
||||||
{
|
{
|
||||||
// Memulai transaksi
|
// Memulai transaksi
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
@@ -111,42 +111,47 @@ class RequestLogController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$requestLogControllerInstance = new PrimeCenterRequestLog();
|
$requestLogControllerInstance = new PrimeCenterRequestLog();
|
||||||
$response = $requestLogControllerInstance->createNew($request);
|
try {
|
||||||
|
$response = $requestLogControllerInstance->createNew($request);
|
||||||
if($response->original['statusCode'] == 200)
|
|
||||||
{
|
if($response->original['statusCode'] == 200)
|
||||||
//send email
|
|
||||||
// Insert data notifications
|
|
||||||
$emailTo = 'alarm.center@linksehat.com';
|
|
||||||
$dataNotif = [
|
|
||||||
'email' => $emailTo,
|
|
||||||
'title' => 'Request LOG',
|
|
||||||
'description' => 'Request LOG from Hospital Portal',
|
|
||||||
'type' => 1,
|
|
||||||
'isUnRead' => true,
|
|
||||||
'created_by' => auth()->user()->id,
|
|
||||||
'created_at' => date('Y-m-d H:i:s'),
|
|
||||||
'updated_at' => date('Y-m-d H:i:s'),
|
|
||||||
];
|
|
||||||
$sendNotif = Helper::insertNotification($dataNotif);
|
|
||||||
// Send Email after insert notifications
|
|
||||||
if($sendNotif)
|
|
||||||
{
|
{
|
||||||
//send to alarm
|
//send email
|
||||||
$nameTo = 'Admin LinkSehat';
|
// Insert data notifications
|
||||||
$dataEmail = [
|
$emailTo = 'alarm.center@linksehat.com';
|
||||||
|
$dataNotif = [
|
||||||
'email' => $emailTo,
|
'email' => $emailTo,
|
||||||
'name' => $nameTo,
|
'title' => 'Request LOG',
|
||||||
'subject' => 'Request LOG from Hospital Portal'. ' '.date('Y-m-d H:i:s'),
|
'description' => 'Request LOG from Hospital Portal',
|
||||||
'body' => View::make('email/notif_email', ['name' => $nameTo, 'link' => 'https://primecenter.linksehat.com/'])->render(),
|
'type' => 1,
|
||||||
|
'isUnRead' => true,
|
||||||
|
'created_by' => auth()->user()->id,
|
||||||
|
'created_at' => date('Y-m-d H:i:s'),
|
||||||
|
'updated_at' => date('Y-m-d H:i:s'),
|
||||||
];
|
];
|
||||||
Helper::sendEmail($dataEmail);
|
$sendNotif = Helper::insertNotification($dataNotif);
|
||||||
|
// Send Email after insert notifications
|
||||||
|
if($sendNotif)
|
||||||
|
{
|
||||||
|
//send to alarm
|
||||||
|
$nameTo = 'Admin LinkSehat';
|
||||||
|
$dataEmail = [
|
||||||
|
'email' => $emailTo,
|
||||||
|
'name' => $nameTo,
|
||||||
|
'subject' => 'Request LOG from Hospital Portal'. ' '.date('Y-m-d H:i:s'),
|
||||||
|
'body' => View::make('email/notif_email', ['name' => $nameTo, 'link' => 'https://primecenter.linksehat.com/'])->render(),
|
||||||
|
];
|
||||||
|
Helper::sendEmail($dataEmail);
|
||||||
|
}
|
||||||
|
return ApiResponse::apiResponse("Success", $data, trans('Message.success'), 200);
|
||||||
}
|
}
|
||||||
return ApiResponse::apiResponse("Success", $data, trans('Message.success'), 200);
|
else
|
||||||
}
|
{
|
||||||
else
|
return ApiResponse::apiResponse('Server Error', $data, trans('Message.server_error'), 500);
|
||||||
{
|
}
|
||||||
return ApiResponse::apiResponse('Server Error', $data, trans('Message.server_error'), 500);
|
} catch (\Exception $e) {
|
||||||
|
// Tangani kesalahan di sini
|
||||||
|
return ApiResponse::apiResponse('Server Error', $data, $e->getMessage(), 500);
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// Rollback transaksi jika terjadi kesalahan
|
// Rollback transaksi jika terjadi kesalahan
|
||||||
|
|||||||
@@ -312,13 +312,14 @@ class DailyMonitoringController extends Controller
|
|||||||
$name = 'labresult-' . uniqid();
|
$name = 'labresult-' . uniqid();
|
||||||
$extension= $file->getClientOriginalExtension();
|
$extension= $file->getClientOriginalExtension();
|
||||||
$fileName = $name . '.' . $extension;
|
$fileName = $name . '.' . $extension;
|
||||||
|
$orignalName = $file->getClientOriginalName();
|
||||||
$path = $file->storeAs($this->path_for_store, $fileName);
|
$path = $file->storeAs($this->path_for_store, $fileName);
|
||||||
File::create([
|
File::create([
|
||||||
'fileable_type' => 'App\Models\LaboratoriumResult',
|
'fileable_type' => 'App\Models\LaboratoriumResult',
|
||||||
'fileable_id' => $db_response->id,
|
'fileable_id' => $db_response->id,
|
||||||
'type' => 'confirmation-medical-letter',
|
'type' => 'confirmation-medical-letter',
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'original_name' => $fileName,
|
'original_name' => $orignalName,
|
||||||
'extension' => $extension,
|
'extension' => $extension,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
]);
|
]);
|
||||||
@@ -330,13 +331,14 @@ class DailyMonitoringController extends Controller
|
|||||||
$name = 'labresult-' . uniqid();
|
$name = 'labresult-' . uniqid();
|
||||||
$extension= $file->getClientOriginalExtension();
|
$extension= $file->getClientOriginalExtension();
|
||||||
$fileName = $name . '.' . $extension;
|
$fileName = $name . '.' . $extension;
|
||||||
|
$orignalName = $file->getClientOriginalName();
|
||||||
$path = $file->storeAs($this->path_for_store, $fileName);
|
$path = $file->storeAs($this->path_for_store, $fileName);
|
||||||
File::create([
|
File::create([
|
||||||
'fileable_type' => 'App\Models\LaboratoriumResult',
|
'fileable_type' => 'App\Models\LaboratoriumResult',
|
||||||
'fileable_id' => $db_response->id,
|
'fileable_id' => $db_response->id,
|
||||||
'type' => 'medical-action-letter',
|
'type' => 'medical-action-letter',
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'original_name' => $fileName,
|
'original_name' => $orignalName,
|
||||||
'extension' => $extension,
|
'extension' => $extension,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
]);
|
]);
|
||||||
@@ -348,6 +350,7 @@ class DailyMonitoringController extends Controller
|
|||||||
foreach ($request->result as $file) {
|
foreach ($request->result as $file) {
|
||||||
$name = 'labresult-' . uniqid();
|
$name = 'labresult-' . uniqid();
|
||||||
$extension= $file->getClientOriginalExtension();
|
$extension= $file->getClientOriginalExtension();
|
||||||
|
$orignalName = $file->getClientOriginalName();
|
||||||
$fileName = $name . '.' . $extension;
|
$fileName = $name . '.' . $extension;
|
||||||
$path = $file->storeAs($this->path_for_store, $fileName);
|
$path = $file->storeAs($this->path_for_store, $fileName);
|
||||||
File::create([
|
File::create([
|
||||||
@@ -355,7 +358,7 @@ class DailyMonitoringController extends Controller
|
|||||||
'fileable_id' => $db_response->id,
|
'fileable_id' => $db_response->id,
|
||||||
'type' => 'laboratorium-result',
|
'type' => 'laboratorium-result',
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'original_name' => $fileName,
|
'original_name' => $orignalName,
|
||||||
'extension' => $extension,
|
'extension' => $extension,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -106,64 +106,67 @@ class RequestLogController extends Controller
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if ($request->member_id){
|
if ($request->member_id){
|
||||||
$code = $this->getNextCode($request);
|
try {
|
||||||
$member = Member::find($request->member_id);
|
$code = !empty($this->getNextCode($request)) ? $this->getNextCode($request) : null;
|
||||||
|
$member = Member::find($request->member_id);
|
||||||
|
|
||||||
$memberValid = false;
|
$memberValid = false;
|
||||||
if ($member){
|
if ($member){
|
||||||
if (($member->members_effective_date <= date('Y-m-d')) &&
|
if (($member->members_effective_date <= date('Y-m-d')) &&
|
||||||
($member->members_expire_date >= date('Y-m-d')) &&
|
($member->members_expire_date >= date('Y-m-d')) &&
|
||||||
($member->active == 1) &&
|
($member->active == 1) &&
|
||||||
($member->suspended == 'N')
|
($member->suspended == 'N')
|
||||||
){
|
){
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
try {
|
try {
|
||||||
$newRequestLog = AppRequestLogService::storeRequestLog(
|
$newRequestLog = AppRequestLogService::storeRequestLog(
|
||||||
row: [],
|
row: [],
|
||||||
code: $code,
|
code: $code,
|
||||||
member: $member,
|
member: $member,
|
||||||
paymentType: 'cashless',
|
paymentType: 'cashless',
|
||||||
serviceCode: $request->service_code,
|
serviceCode: $request->service_code,
|
||||||
submissionDate: $request->submission_date,
|
submissionDate: $request->submission_date,
|
||||||
// status: 'approved',
|
// status: 'approved',
|
||||||
status: 'requested', // di nonaktifkan dulu auto approved
|
status: 'requested', // di nonaktifkan dulu auto approved
|
||||||
organization_id: $request->organization_id,
|
organization_id: $request->organization_id,
|
||||||
source: $request->source
|
source: $request->source
|
||||||
);
|
);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
|
}
|
||||||
|
catch (\Throwable $th) {
|
||||||
|
DB::rollBack();
|
||||||
|
|
||||||
|
return Helper::responseJson(status: 'failed', statusCode: 500, message: $th->getMessage());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
DB::beginTransaction();
|
||||||
|
try {
|
||||||
|
$newRequestLog = AppRequestLogService::storeRequestLog(
|
||||||
|
row: [],
|
||||||
|
code: $code,
|
||||||
|
member: $member,
|
||||||
|
paymentType: 'cashless',
|
||||||
|
serviceCode: $request->service_code,
|
||||||
|
submissionDate: $request->submission_date,
|
||||||
|
status: 'requested',
|
||||||
|
organization_id: $request->organization_id,
|
||||||
|
source: $request->source
|
||||||
|
);
|
||||||
|
|
||||||
|
DB::commit();
|
||||||
|
}
|
||||||
|
catch (\Throwable $th) {
|
||||||
|
DB::rollBack();
|
||||||
|
|
||||||
|
return Helper::responseJson(status: 'failed', statusCode: 500, message: $th->getMessage());
|
||||||
|
}
|
||||||
|
// return Helper::responseJson(status: 'failed', statusCode: 500, message: 'Member Not Valid');
|
||||||
}
|
}
|
||||||
catch (\Throwable $th) {
|
|
||||||
DB::rollBack();
|
|
||||||
|
|
||||||
return Helper::responseJson(status: 'failed', statusCode: 500, message: $th->getMessage());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
DB::beginTransaction();
|
|
||||||
try {
|
|
||||||
$newRequestLog = AppRequestLogService::storeRequestLog(
|
|
||||||
row: [],
|
|
||||||
code: $code,
|
|
||||||
member: $member,
|
|
||||||
paymentType: 'cashless',
|
|
||||||
serviceCode: $request->service_code,
|
|
||||||
submissionDate: $request->submission_date,
|
|
||||||
status: 'requested',
|
|
||||||
organization_id: $request->organization_id,
|
|
||||||
source: $request->source
|
|
||||||
);
|
|
||||||
|
|
||||||
DB::commit();
|
|
||||||
}
|
|
||||||
catch (\Throwable $th) {
|
|
||||||
DB::rollBack();
|
|
||||||
|
|
||||||
return Helper::responseJson(status: 'failed', statusCode: 500, message: $th->getMessage());
|
|
||||||
}
|
|
||||||
// return Helper::responseJson(status: 'failed', statusCode: 500, message: 'Member Not Valid');
|
|
||||||
}
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return Helper::responseJson(status: 'failed', statusCode: 500, message: $th->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Helper::responseJson(status: 'success', statusCode: 200, message: 'Request LOG berhasil ajukan!', data: $request->toArray());
|
return Helper::responseJson(status: 'success', statusCode: 200, message: 'Request LOG berhasil ajukan!', data: $request->toArray());
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class RequestLogService
|
|||||||
"Tgl Billing dari RS" => "approved_final_log_at",
|
"Tgl Billing dari RS" => "approved_final_log_at",
|
||||||
"Total Billing" => "total_billing",
|
"Total Billing" => "total_billing",
|
||||||
"Benefit Item" => "benefit_id",
|
"Benefit Item" => "benefit_id",
|
||||||
|
"Amount Incurred" => "amount_incurred",
|
||||||
"Amount Approval" => "amount_approval",
|
"Amount Approval" => "amount_approval",
|
||||||
"Amount Not Approval" => "amount_not_approval",
|
"Amount Not Approval" => "amount_not_approval",
|
||||||
"Total COB" => "total_cob",
|
"Total COB" => "total_cob",
|
||||||
@@ -57,6 +58,7 @@ class RequestLogService
|
|||||||
"approved_final_log_at" => "Tgl Billing dari RS",
|
"approved_final_log_at" => "Tgl Billing dari RS",
|
||||||
"total_billing" => "Total Billing",
|
"total_billing" => "Total Billing",
|
||||||
"benefit_id" => "Benefit Item",
|
"benefit_id" => "Benefit Item",
|
||||||
|
"amount_incurred" => "Amount Incurred",
|
||||||
"amount_approval" => "Amount Approval",
|
"amount_approval" => "Amount Approval",
|
||||||
"amount_not_approval" => "Amount Not Approval",
|
"amount_not_approval" => "Amount Not Approval",
|
||||||
"total_cob" => "Total COB",
|
"total_cob" => "Total COB",
|
||||||
@@ -80,6 +82,7 @@ class RequestLogService
|
|||||||
"Tgl Billing dari RS",
|
"Tgl Billing dari RS",
|
||||||
"Total Billing",
|
"Total Billing",
|
||||||
"Benefit Item",
|
"Benefit Item",
|
||||||
|
"Amount Incurred",
|
||||||
"Amount Approval",
|
"Amount Approval",
|
||||||
"Amount Not Approval",
|
"Amount Not Approval",
|
||||||
"Total COB",
|
"Total COB",
|
||||||
@@ -103,6 +106,7 @@ class RequestLogService
|
|||||||
"Tgl Billing dari RS",
|
"Tgl Billing dari RS",
|
||||||
"Total Billing",
|
"Total Billing",
|
||||||
"Benefit Item",
|
"Benefit Item",
|
||||||
|
"Amount Incurred",
|
||||||
"Amount Approval",
|
"Amount Approval",
|
||||||
"Amount Not Approval",
|
"Amount Not Approval",
|
||||||
"Total COB",
|
"Total COB",
|
||||||
@@ -297,7 +301,7 @@ class RequestLogService
|
|||||||
'request_log_id' => $requestLog->id,
|
'request_log_id' => $requestLog->id,
|
||||||
'benefit_id' => $benefit->id,
|
'benefit_id' => $benefit->id,
|
||||||
// 'amount_incurred' => ($row['amount_approval'] ? $row['amount_approval'] : 0) + ($row['amount_not_approval'] ? $row['amount_not_approval'] : 0) ,
|
// 'amount_incurred' => ($row['amount_approval'] ? $row['amount_approval'] : 0) + ($row['amount_not_approval'] ? $row['amount_not_approval'] : 0) ,
|
||||||
'amount_incurred' => $row['total_billing'] ,
|
'amount_incurred' => $row['amount_incurred'] ,
|
||||||
'amount_approved' => $row['amount_approval'] ?? 0,
|
'amount_approved' => $row['amount_approval'] ?? 0,
|
||||||
'amount_not_approved' => $row['amount_not_approval'] ?? 0,
|
'amount_not_approved' => $row['amount_not_approval'] ?? 0,
|
||||||
'excess_paid' => $row['amount_not_approval'] ?? 0,
|
'excess_paid' => $row['amount_not_approval'] ?? 0,
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class RequestDailyMonitoring extends Model
|
|||||||
foreach ($document as $row) {
|
foreach ($document as $row) {
|
||||||
$arr_document[] = [
|
$arr_document[] = [
|
||||||
'file_name' => $row->original_name,
|
'file_name' => $row->original_name,
|
||||||
'path' => env('APP_URL') . '/storage/lab_result/' . $row->original_name,
|
'path' => env('APP_URL') . '/storage/lab_result/' . $row->name .'.'. $row->extension,
|
||||||
'type' => $row->type,
|
'type' => $row->type,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,6 +175,10 @@ export default function List() {
|
|||||||
<VisibilityOutlinedIcon />
|
<VisibilityOutlinedIcon />
|
||||||
View
|
View
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
{/* <MenuItem onClick={() => navigate('service-monitoring/' + obj.id)}>
|
||||||
|
<Download />
|
||||||
|
Document Member
|
||||||
|
</MenuItem> */}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -179,6 +179,12 @@ type ServiceMonitoringProps = {
|
|||||||
type: number;
|
type: number;
|
||||||
plan: string;
|
plan: string;
|
||||||
}[];
|
}[];
|
||||||
|
files: {
|
||||||
|
type: string;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
path: string;
|
||||||
|
}[];
|
||||||
}>
|
}>
|
||||||
>;
|
>;
|
||||||
laboratoriumResults: Record<
|
laboratoriumResults: Record<
|
||||||
@@ -188,6 +194,12 @@ type ServiceMonitoringProps = {
|
|||||||
date: string;
|
date: string;
|
||||||
examination: string;
|
examination: string;
|
||||||
location: string;
|
location: string;
|
||||||
|
files: {
|
||||||
|
type: string;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
path: string;
|
||||||
|
}[];
|
||||||
}>
|
}>
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
@@ -387,7 +399,7 @@ export default function ServiceMonitoring() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12} container spacing={3}>
|
<Grid item xs={12} container spacing={3}>
|
||||||
<Grid item container xs={12} spacing={1.5}>
|
{/* <Grid item container xs={12} spacing={1.5}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="subtitle2" color={'grey.600'}>
|
<Typography variant="subtitle2" color={'grey.600'}>
|
||||||
{loading ? <Skeleton animation={'wave'} width={200} /> : 'Symptoms'}
|
{loading ? <Skeleton animation={'wave'} width={200} /> : 'Symptoms'}
|
||||||
@@ -404,8 +416,8 @@ export default function ServiceMonitoring() {
|
|||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid> */}
|
||||||
<Grid item container xs={12} spacing={1.5}>
|
{/* <Grid item container xs={12} spacing={1.5}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="subtitle2" color={'grey.600'}>
|
<Typography variant="subtitle2" color={'grey.600'}>
|
||||||
{loading ? <Skeleton animation={'wave'} width={200} /> : 'Sign'}
|
{loading ? <Skeleton animation={'wave'} width={200} /> : 'Sign'}
|
||||||
@@ -422,7 +434,7 @@ export default function ServiceMonitoring() {
|
|||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid> */}
|
||||||
<Grid item container xs={12} spacing={1.5}>
|
<Grid item container xs={12} spacing={1.5}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="subtitle2" color={'grey.600'}>
|
<Typography variant="subtitle2" color={'grey.600'}>
|
||||||
@@ -441,7 +453,7 @@ export default function ServiceMonitoring() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item container xs={12} spacing={1.5}>
|
{/* <Grid item container xs={12} spacing={1.5}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="subtitle2" color={'grey.600'}>
|
<Typography variant="subtitle2" color={'grey.600'}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
@@ -462,14 +474,14 @@ export default function ServiceMonitoring() {
|
|||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid> */}
|
||||||
<Grid item container xs={12} spacing={1.5}>
|
<Grid item container xs={12} spacing={1.5}>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Typography variant="subtitle2" color={'grey.600'}>
|
<Typography variant="subtitle2" color={'grey.600'}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<Skeleton animation={'wave'} width={200} />
|
<Skeleton animation={'wave'} width={200} />
|
||||||
) : (
|
) : (
|
||||||
'Files Result'
|
'Files Document'
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -502,7 +514,7 @@ export default function ServiceMonitoring() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
{/* <Grid item xs={12}>
|
||||||
<Typography variant="subtitle2" color={'grey.600'}>
|
<Typography variant="subtitle2" color={'grey.600'}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<Skeleton animation={'wave'} width={200} />
|
<Skeleton animation={'wave'} width={200} />
|
||||||
@@ -539,8 +551,8 @@ export default function ServiceMonitoring() {
|
|||||||
-
|
-
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
</Grid>
|
</Grid> */}
|
||||||
<Grid item xs={12}>
|
{/* <Grid item xs={12}>
|
||||||
<Typography variant="subtitle2" color={'grey.600'}>
|
<Typography variant="subtitle2" color={'grey.600'}>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<Skeleton animation={'wave'} width={200} />
|
<Skeleton animation={'wave'} width={200} />
|
||||||
@@ -548,8 +560,8 @@ export default function ServiceMonitoring() {
|
|||||||
'Files Kondisi'
|
'Files Kondisi'
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid> */}
|
||||||
<Grid item>
|
{/* <Grid item>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<Skeleton animation="wave" width={300} />
|
<Skeleton animation="wave" width={300} />
|
||||||
) : data && data.files && data.files.kondisi.length > 0 ?
|
) : data && data.files && data.files.kondisi.length > 0 ?
|
||||||
@@ -576,7 +588,7 @@ export default function ServiceMonitoring() {
|
|||||||
-
|
-
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
</Grid>
|
</Grid> */}
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -833,338 +845,393 @@ export default function ServiceMonitoring() {
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
</Grid> */}
|
</Grid> */}
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
{data?.serviceCode === 'IP' ? (
|
||||||
{loading ? (
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
<Card sx={{ borderRadius: '16px', padding: '24px' }}>
|
{loading ? (
|
||||||
<Grid container>
|
<Card sx={{ borderRadius: '16px', padding: '24px' }}>
|
||||||
<Grid item xs={2}>
|
<Grid container>
|
||||||
<Skeleton animation="wave" sx={{ width: 'calc(100% - 24px)' }} />
|
<Grid item xs={2}>
|
||||||
|
<Skeleton animation="wave" sx={{ width: 'calc(100% - 24px)' }} />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={2}>
|
||||||
|
<Skeleton animation="wave" sx={{ width: 'calc(100% - 24px)' }} />
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={12} paddingTop={2}>
|
||||||
|
<Skeleton animation="wave" sx={{ width: 'calc(100% - 24px)' }} />
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={2}>
|
</Card>
|
||||||
<Skeleton animation="wave" sx={{ width: 'calc(100% - 24px)' }} />
|
) : (
|
||||||
</Grid>
|
<Card sx={{ borderRadius: '16px', padding: '24px' }}>
|
||||||
<Grid item xs={12} paddingTop={2}>
|
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||||
<Skeleton animation="wave" sx={{ width: 'calc(100% - 24px)' }} />
|
<StyledTabs value={value} onChange={handleChange} aria-label="basic tabs example">
|
||||||
</Grid>
|
<StyledTab label="Daily Monitoring" {...a11yProps(0)} />
|
||||||
</Grid>
|
<StyledTab label="Laboratorium Result" {...a11yProps(1)} />
|
||||||
</Card>
|
</StyledTabs>
|
||||||
) : (
|
</Box>
|
||||||
<Card sx={{ borderRadius: '16px', padding: '24px' }}>
|
<TabPanel value={value} index={0}>
|
||||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
<Grid item xs={12} md={12} padding={data && data.dailyMonitorings ? 0 : 3}>
|
||||||
<StyledTabs value={value} onChange={handleChange} aria-label="basic tabs example">
|
{data && data.dailyMonitorings ? (
|
||||||
<StyledTab label="Daily Monitoring" {...a11yProps(0)} />
|
<Timeline
|
||||||
<StyledTab label="Laboratorium Result" {...a11yProps(1)} />
|
sx={{
|
||||||
</StyledTabs>
|
gap: 2,
|
||||||
</Box>
|
paddingY: 2,
|
||||||
<TabPanel value={value} index={0}>
|
paddingX: 1.5,
|
||||||
<Grid item xs={12} md={12} padding={data && data.dailyMonitorings ? 0 : 3}>
|
[`& .${timelineItemClasses.root}:before`]: {
|
||||||
{data && data.dailyMonitorings ? (
|
flex: 0,
|
||||||
<Timeline
|
padding: 0,
|
||||||
sx={{
|
},
|
||||||
gap: 2,
|
}}
|
||||||
paddingY: 2,
|
>
|
||||||
paddingX: 1.5,
|
{data &&
|
||||||
[`& .${timelineItemClasses.root}:before`]: {
|
data.dailyMonitorings &&
|
||||||
flex: 0,
|
Object.keys(data.dailyMonitorings).length > 0 &&
|
||||||
padding: 0,
|
Object.keys(data.dailyMonitorings).map((date, dateIndex) => (
|
||||||
},
|
<TimelineItem key={dateIndex}>
|
||||||
}}
|
<TimelineSeparator>
|
||||||
>
|
<TimelineDot />
|
||||||
{data &&
|
<TimelineConnector />
|
||||||
data.dailyMonitorings &&
|
</TimelineSeparator>
|
||||||
Object.keys(data.dailyMonitorings).length > 0 &&
|
<TimelineContent
|
||||||
Object.keys(data.dailyMonitorings).map((date, dateIndex) => (
|
sx={{
|
||||||
<TimelineItem key={dateIndex}>
|
'&.MuiTimelineContent-root': {
|
||||||
<TimelineSeparator>
|
paddingX: 2,
|
||||||
<TimelineDot />
|
},
|
||||||
<TimelineConnector />
|
}}
|
||||||
</TimelineSeparator>
|
>
|
||||||
<TimelineContent
|
<Typography variant="subtitle1" marginBottom={2}>
|
||||||
sx={{
|
{date ? date : '-'}
|
||||||
'&.MuiTimelineContent-root': {
|
</Typography>
|
||||||
paddingX: 2,
|
{data.dailyMonitorings[date].map(
|
||||||
},
|
(dailyMonitoring, dailyMonitoringIndex) => (
|
||||||
}}
|
<Card
|
||||||
>
|
key={dailyMonitoringIndex}
|
||||||
<Typography variant="subtitle1" marginBottom={2}>
|
|
||||||
{date ? date : '-'}
|
|
||||||
</Typography>
|
|
||||||
{data.dailyMonitorings[date].map(
|
|
||||||
(dailyMonitoring, dailyMonitoringIndex) => (
|
|
||||||
<Card
|
|
||||||
key={dailyMonitoringIndex}
|
|
||||||
sx={{
|
|
||||||
padding: 3,
|
|
||||||
marginBottom:
|
|
||||||
dailyMonitoringIndex !==
|
|
||||||
data.dailyMonitorings[date].length - 1
|
|
||||||
? 2
|
|
||||||
: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Stack
|
|
||||||
direction={'row'}
|
|
||||||
sx={{
|
sx={{
|
||||||
alignItems: 'center',
|
padding: 3,
|
||||||
justifyContent: 'space-between',
|
marginBottom:
|
||||||
|
dailyMonitoringIndex !==
|
||||||
|
data.dailyMonitorings[date].length - 1
|
||||||
|
? 2
|
||||||
|
: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Label>
|
<Stack
|
||||||
{dailyMonitoring.time ? dailyMonitoring.time : '-'}
|
direction={'row'}
|
||||||
</Label>
|
sx={{
|
||||||
<Label color="success" sx={{ marginRight: 0 }}>
|
alignItems: 'center',
|
||||||
{dailyMonitoring.status ? dailyMonitoring.status : '-'}
|
justifyContent: 'space-between',
|
||||||
</Label>
|
}}
|
||||||
</Stack>
|
>
|
||||||
<Divider sx={{ marginY: 2 }} />
|
<Label>
|
||||||
<Stack spacing={3} sx={{ paddingY: 1, paddingX: 3 }}>
|
{dailyMonitoring.time ? dailyMonitoring.time : '-'}
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
</Label>
|
||||||
<Stack spacing={1}>
|
<Label color="success" sx={{ marginRight: 0 }}>
|
||||||
<Typography variant="h6">Subject</Typography>
|
{dailyMonitoring.status ? dailyMonitoring.status : '-'}
|
||||||
<Typography variant="inherit">
|
</Label>
|
||||||
{dailyMonitoring.subject
|
</Stack>
|
||||||
? dailyMonitoring.subject
|
<Divider sx={{ marginY: 2 }} />
|
||||||
: '-'}
|
<Stack spacing={3} sx={{ paddingY: 1, paddingX: 3 }}>
|
||||||
</Typography>
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
</Stack>
|
<Stack spacing={1}>
|
||||||
</Grid>
|
<Typography variant="h6">Subject</Typography>
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
<Typography variant="inherit">
|
||||||
<Stack spacing={1}>
|
{dailyMonitoring.subject
|
||||||
<Typography variant="h6" sx={{ paddingBottom: 2 }}>
|
? dailyMonitoring.subject
|
||||||
Objektif
|
: '-'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
</Grid>
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
<Stack>
|
<Stack spacing={1}>
|
||||||
<Typography variant="inherit">
|
<Typography variant="h6" sx={{ paddingBottom: 2 }}>
|
||||||
Body Temperature
|
Objektif
|
||||||
</Typography>
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="inherit">
|
||||||
|
Body Temperature
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{dailyMonitoring.bodyTemperature
|
||||||
|
? dailyMonitoring.bodyTemperature
|
||||||
|
: '-'}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="inherit">Sistole</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{dailyMonitoring.sistole
|
||||||
|
? dailyMonitoring.sistole
|
||||||
|
: '-'}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="inherit">Diastole</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{dailyMonitoring.diastole
|
||||||
|
? dailyMonitoring.diastole
|
||||||
|
: '-'}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="inherit">
|
||||||
|
Respiration Rate
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{dailyMonitoring.respirationRate
|
||||||
|
? dailyMonitoring.respirationRate
|
||||||
|
: '-'}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="inherit">Complaints</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
<Grid item xs={6} lg={6} md={6}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{dailyMonitoring.complaints
|
||||||
|
? dailyMonitoring.complaints
|
||||||
|
: '-'}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
<Stack spacing={1}>
|
||||||
|
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
||||||
|
Analysis
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} sx={{ paddingY: 2 }} spacing={2}>
|
||||||
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
|
<Stack>
|
||||||
|
<Typography variant="inherit">
|
||||||
|
{dailyMonitoring.analysis
|
||||||
|
? dailyMonitoring.analysis
|
||||||
|
: '-'}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
<Stack spacing={1}>
|
||||||
|
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
||||||
|
Medical Plan :
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
<Stack direction={'row'} spacing={2}>
|
||||||
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
|
<Stack marginLeft={5}>
|
||||||
|
{data.dailyMonitorings ? (
|
||||||
|
<ul style={{ listStyleType: 'disc' }}>
|
||||||
|
{dailyMonitoring.plans.length > 0 ? (
|
||||||
|
dailyMonitoring.plans.map((plan, planIndex) =>
|
||||||
|
plan.type === 1 ? (
|
||||||
|
<li key={planIndex}>{plan.plan}</li>
|
||||||
|
) : null
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<li>No plans available</li>
|
||||||
|
)}
|
||||||
|
</ul>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid>
|
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
</Grid>
|
||||||
<Stack>
|
</Stack>
|
||||||
<Typography variant="subtitle1">
|
<Stack spacing={1}>
|
||||||
{dailyMonitoring.bodyTemperature
|
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
||||||
? dailyMonitoring.bodyTemperature
|
Non Medikamentosa Plan :
|
||||||
: '-'}
|
</Typography>
|
||||||
</Typography>
|
</Stack>
|
||||||
|
<Stack direction={'row'} spacing={2}>
|
||||||
|
<Grid item xs={12} lg={12} md={12}>
|
||||||
|
<Stack marginLeft={5}>
|
||||||
|
{data.dailyMonitorings ? (
|
||||||
|
<ul style={{ listStyleType: 'disc' }}>
|
||||||
|
{dailyMonitoring.plans.length > 0 ? (
|
||||||
|
dailyMonitoring.plans.map((plan, planIndex) =>
|
||||||
|
plan.type === 2 ? (
|
||||||
|
<li key={planIndex}>{plan.plan}</li>
|
||||||
|
) : null
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<li>No plans available</li>
|
||||||
|
)}
|
||||||
|
</ul>
|
||||||
|
) : (
|
||||||
|
'-'
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid>
|
|
||||||
</Stack>
|
</Grid>
|
||||||
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
</Stack>
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
|
||||||
<Stack>
|
<Stack spacing={1}>
|
||||||
<Typography variant="inherit">Sistole</Typography>
|
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
||||||
</Stack>
|
File Document :
|
||||||
</Grid>
|
</Typography>
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
</Stack>
|
||||||
<Stack>
|
<Stack direction={'row'} spacing={2}>
|
||||||
<Typography variant="subtitle1">
|
|
||||||
{dailyMonitoring.sistole
|
|
||||||
? dailyMonitoring.sistole
|
|
||||||
: '-'}
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="inherit">Diastole</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="subtitle1">
|
|
||||||
{dailyMonitoring.diastole
|
|
||||||
? dailyMonitoring.diastole
|
|
||||||
: '-'}
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="inherit">
|
|
||||||
Respiration Rate
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="subtitle1">
|
|
||||||
{dailyMonitoring.respirationRate
|
|
||||||
? dailyMonitoring.respirationRate
|
|
||||||
: '-'}
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
<Stack direction={'row'} sx={{ paddingY: 1 }} spacing={2}>
|
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="inherit">Complaints</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
<Grid item xs={6} lg={6} md={6}>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="subtitle1">
|
|
||||||
{dailyMonitoring.complaints
|
|
||||||
? dailyMonitoring.complaints
|
|
||||||
: '-'}
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
|
||||||
Analysis
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
<Stack direction={'row'} sx={{ paddingY: 2 }} spacing={2}>
|
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="inherit">
|
|
||||||
{dailyMonitoring.analysis
|
|
||||||
? dailyMonitoring.analysis
|
|
||||||
: '-'}
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
<Stack spacing={1}>
|
|
||||||
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
|
||||||
Medical Plan :
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
<Stack direction={'row'} spacing={2}>
|
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
|
||||||
<Stack marginLeft={5}>
|
<Stack marginLeft={5}>
|
||||||
{data.dailyMonitorings ? (
|
{data.dailyMonitorings ? (
|
||||||
<ul style={{ listStyleType: 'disc' }}>
|
<ul style={{ listStyleType: 'disc' }}>
|
||||||
{dailyMonitoring.plans.length > 0 ? (
|
{dailyMonitoring.files.length > 0 ? (
|
||||||
dailyMonitoring.plans.map((plan, planIndex) =>
|
dailyMonitoring.files.map((file, fileIndex) =>
|
||||||
plan.type === 1 ? (
|
(
|
||||||
<li key={planIndex}>{plan.plan}</li>
|
<li key={fileIndex}>
|
||||||
) : null
|
<a
|
||||||
|
href={file.path}
|
||||||
|
download={file.original_name ? file.original_name : 'test'}
|
||||||
|
style={{ cursor: 'pointer', textDecoration: 'none', color: '#19BBBB' }}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{file.original_name}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
)
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<li>No plans available</li>
|
<li>-</li>
|
||||||
)}
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
) : (
|
) : (
|
||||||
'-'
|
<span>-</span>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
</TimelineContent>
|
||||||
|
</TimelineItem>
|
||||||
|
))}
|
||||||
|
</Timeline>
|
||||||
|
) : (
|
||||||
|
<Typography variant="subtitle1" textAlign={'center'}>
|
||||||
|
No Data Found
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</Grid>
|
||||||
|
</TabPanel>
|
||||||
|
|
||||||
</Grid>
|
<TabPanel value={value} index={1}>
|
||||||
</Stack>
|
<Grid item xs={12} padding={data && data.laboratoriumResults ? 0 : 3}>
|
||||||
<Stack spacing={1}>
|
{data &&
|
||||||
<Typography variant="h6" sx={{ paddingTop: 2 }}>
|
data.laboratoriumResults &&
|
||||||
Non Medikamentosa Plan :
|
Object.keys(data.laboratoriumResults).length > 0 ? (
|
||||||
</Typography>
|
Object.keys(data.laboratoriumResults).map((date, dateIndex) => (
|
||||||
</Stack>
|
<Card
|
||||||
<Stack direction={'row'} spacing={2}>
|
sx={{
|
||||||
<Grid item xs={12} lg={12} md={12}>
|
padding: 3,
|
||||||
<Stack marginLeft={5}>
|
border: '1px solid #919EAB52',
|
||||||
{data.dailyMonitorings ? (
|
boxShadow: 'none',
|
||||||
<ul style={{ listStyleType: 'disc' }}>
|
marginTop: 5,
|
||||||
{dailyMonitoring.plans.length > 0 ? (
|
}}
|
||||||
dailyMonitoring.plans.map((plan, planIndex) =>
|
key={dateIndex}
|
||||||
plan.type === 2 ? (
|
>
|
||||||
<li key={planIndex}>{plan.plan}</li>
|
<Stack>
|
||||||
) : null
|
<Typography variant="subtitle1">{date ? date : '-'}</Typography>
|
||||||
)
|
{data.laboratoriumResults[date]?.map((laboratoriumResult, laboratoriumResultIndex) => (
|
||||||
|
<Card key={laboratoriumResultIndex} sx={{ marginTop: 3, paddingX: 2.5, paddingY: 2 }}>
|
||||||
|
<Label>{laboratoriumResult.code || '-'}</Label>
|
||||||
|
<Table sx={{ marginY: 2 }}>
|
||||||
|
<TableHead>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>Date</TableCell>
|
||||||
|
<TableCell>Examination</TableCell>
|
||||||
|
<TableCell>Location</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
</TableHead>
|
||||||
|
<TableBody>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell><Label>{laboratoriumResult.date || '-'}</Label></TableCell>
|
||||||
|
<TableCell>{laboratoriumResult.examination || '-'}</TableCell>
|
||||||
|
<TableCell>{laboratoriumResult.location || '-'}</TableCell>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow>
|
||||||
|
<TableCell>
|
||||||
|
{data.dailyMonitorings ? (
|
||||||
|
<ul style={{ listStyleType: 'disc' }}>
|
||||||
|
{laboratoriumResult.files.length > 0 ? (
|
||||||
|
laboratoriumResult.files.map((file, fileIndex) =>
|
||||||
|
(
|
||||||
|
<li key={fileIndex}>
|
||||||
|
<a
|
||||||
|
href={file.path}
|
||||||
|
download={file.original_name ? file.original_name : 'test'}
|
||||||
|
style={{ cursor: 'pointer', textDecoration: 'none', color: '#19BBBB' }}
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{file.original_name}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) : (
|
||||||
|
<li>-</li>
|
||||||
|
)}
|
||||||
|
</ul>
|
||||||
) : (
|
) : (
|
||||||
<li>No plans available</li>
|
<span>-</span>
|
||||||
)}
|
)}
|
||||||
</ul>
|
</TableCell>
|
||||||
) : (
|
</TableRow>
|
||||||
'-'
|
</TableBody>
|
||||||
)}
|
</Table>
|
||||||
</Stack>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
</Card>
|
||||||
)
|
))}
|
||||||
)}
|
</Stack>
|
||||||
</TimelineContent>
|
</Card>
|
||||||
</TimelineItem>
|
))
|
||||||
))}
|
) : (
|
||||||
</Timeline>
|
<Typography padding={3} variant="subtitle1" textAlign={'center'}>
|
||||||
) : (
|
No Data Found
|
||||||
<Typography variant="subtitle1" textAlign={'center'}>
|
</Typography>
|
||||||
No Data Found
|
)}
|
||||||
</Typography>
|
</Grid>
|
||||||
)}
|
</TabPanel>
|
||||||
</Grid>
|
</Card>
|
||||||
</TabPanel>
|
)}
|
||||||
|
</Grid>
|
||||||
<TabPanel value={value} index={1}>
|
) : null}
|
||||||
<Grid item xs={12} padding={data && data.laboratoriumResults ? 0 : 3}>
|
|
||||||
{data &&
|
|
||||||
data.laboratoriumResults &&
|
|
||||||
Object.keys(data.laboratoriumResults).length > 0 ? (
|
|
||||||
Object.keys(data.laboratoriumResults).map((date, dateIndex) => (
|
|
||||||
<Card
|
|
||||||
sx={{
|
|
||||||
padding: 3,
|
|
||||||
border: '1px solid #919EAB52',
|
|
||||||
boxShadow: 'none',
|
|
||||||
marginTop: 5,
|
|
||||||
}}
|
|
||||||
key={dateIndex}
|
|
||||||
>
|
|
||||||
<Stack>
|
|
||||||
<Typography variant="subtitle1">{date ? date : '-'}</Typography>
|
|
||||||
{data.laboratoriumResults[date]?.map((laboratoriumResult, laboratoriumResultIndex) => (
|
|
||||||
<Card key={laboratoriumResultIndex} sx={{ marginTop: 3, paddingX: 2.5, paddingY: 2 }}>
|
|
||||||
<Label>{laboratoriumResult.code || '-'}</Label>
|
|
||||||
<Table sx={{ marginY: 2 }}>
|
|
||||||
<TableHead>
|
|
||||||
<TableRow>
|
|
||||||
<TableCell>Date</TableCell>
|
|
||||||
<TableCell>Examination</TableCell>
|
|
||||||
<TableCell>Location</TableCell>
|
|
||||||
</TableRow>
|
|
||||||
</TableHead>
|
|
||||||
<TableBody>
|
|
||||||
<TableRow>
|
|
||||||
<TableCell><Label>{laboratoriumResult.date || '-'}</Label></TableCell>
|
|
||||||
<TableCell>{laboratoriumResult.examination || '-'}</TableCell>
|
|
||||||
<TableCell>{laboratoriumResult.location || '-'}</TableCell>
|
|
||||||
{/* <TableMoreMenu
|
|
||||||
actions={
|
|
||||||
<>
|
|
||||||
<MenuItem onClick={() => handleDownloadClick(laboratoriumResult.file)}>
|
|
||||||
<DownloadIcon /> Download
|
|
||||||
</MenuItem>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
/> */}
|
|
||||||
</TableRow>
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
</Card>
|
|
||||||
))}
|
|
||||||
</Stack>
|
|
||||||
</Card>
|
|
||||||
))
|
|
||||||
) : (
|
|
||||||
<Typography padding={3} variant="subtitle1" textAlign={'center'}>
|
|
||||||
No Data Found
|
|
||||||
</Typography>
|
|
||||||
)}
|
|
||||||
</Grid>
|
|
||||||
</TabPanel>
|
|
||||||
</Card>
|
|
||||||
)}
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ export default function DialogFinalLog({ member, getData, onClose, handleSubmitS
|
|||||||
style={{ display: 'none' }}
|
style={{ display: 'none' }}
|
||||||
multiple
|
multiple
|
||||||
onChange={handleKondisiInputChange}
|
onChange={handleKondisiInputChange}
|
||||||
accept="application/pdf"
|
accept="application/pdf,image/*"
|
||||||
/>
|
/>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -257,7 +257,7 @@ export default function DialogFinalLog({ member, getData, onClose, handleSubmitS
|
|||||||
style={{ display: 'none' }}
|
style={{ display: 'none' }}
|
||||||
multiple
|
multiple
|
||||||
onChange={handleDiagnosaInputChange}
|
onChange={handleDiagnosaInputChange}
|
||||||
accept="application/pdf"
|
accept="application/pdf,image/*"
|
||||||
/>
|
/>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -318,7 +318,7 @@ export default function DialogFinalLog({ member, getData, onClose, handleSubmitS
|
|||||||
style={{ display: 'none' }}
|
style={{ display: 'none' }}
|
||||||
multiple
|
multiple
|
||||||
onChange={handleResultInputChange}
|
onChange={handleResultInputChange}
|
||||||
accept="application/pdf"
|
accept="application/pdf,image/*"
|
||||||
/>
|
/>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
Reference in New Issue
Block a user