diff --git a/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php b/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php index 8c9e8e8b..f5eb0217 100644 --- a/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php +++ b/Modules/HospitalPortal/Http/Controllers/Api/RequestLogController.php @@ -732,6 +732,23 @@ class RequestLogController extends Controller $data['signatureAd'] = $signatureAd; + $dataDiagnosis = []; + if($dataRequestLog->diagnosis) + { + $dataDiagnosiCodes = explode(',', $dataRequestLog->diagnosis); + foreach ($dataDiagnosiCodes as $diagnosisCode) + { + $diagnoisis = DB::table('icd') + ->where('icd.code', '=', $diagnosisCode) + ->select('icd.name') + ->first(); + array_push($dataDiagnosis, $diagnoisis); + } + } + + $data['dataDiagnosis'] = $dataDiagnosis; + + $pdf = new Dompdf(); $options = new Options(); diff --git a/Modules/Internal/Services/RequestLogService.php b/Modules/Internal/Services/RequestLogService.php index 05191a87..b25d0483 100644 --- a/Modules/Internal/Services/RequestLogService.php +++ b/Modules/Internal/Services/RequestLogService.php @@ -25,7 +25,8 @@ class RequestLogService "Date Addmission" => "submission_date", "Date Discharge" => "discharge_date", "Member ID Peserta" => "member_id", - "Type of patient" => "service", + "Service" => "service", + "Type of Member" => "type_of_member", "Provider Code" => "organization_id", "End Of Claim Numbers" => "code", "Diagnosis" => "diagnosis", @@ -34,8 +35,9 @@ class RequestLogService "Benefit Item" => "benefit_id", "Amount Approval" => "amount_approval", "Amount Not Approval" => "amount_not_approval", - "Final Billing" => "final_billing", - "Remarks" => "keterangan", + "Total COB" => "total_cob", + "Keterangan IGL" => "keterangan", + "Catatan FGL" => "catatan", "QC 1" => "status_final_log", "Ingestion Code" => "ingestion_code", // TODO I think this should not be here because if user uploading result then ingestion code and status will be filled "Ingestion Status" => "ingestion_status", @@ -47,7 +49,8 @@ class RequestLogService "submission_date" => "Date Addmission", "discharge_date" => "Date Discharge", "member_id" => "Member ID Peserta", - "service" => "Type of patient", + "service" => "Service", + "type_of_member" => "Type of Member", "organization_id" => "Provider Code", "code" => "End Of Claim Numbers", "diagnosis" => "Diagnosis", @@ -56,8 +59,9 @@ class RequestLogService "benefit_id" => "Benefit Item", "amount_approval" => "Amount Approval", "amount_not_approval" => "Amount Not Approval", - "keterangan" => "Remarks", - "final_billing" => "Final Billing", + "total_cob" => "Total COB", + "keterangan" => "Keterangan IGL", + "catatan" => "Catatan FGL", "status_final_log" => "QC 1" , "ingestion_code" => "Ingestion Code", "ingestion_status" => "Ingestion Status", @@ -68,7 +72,8 @@ class RequestLogService "Date Addmission", "Date Discharge", "Member ID Peserta", - "Type of patient", + "Service", + "Type of Member", "Provider Code", "End Of Claim Numbers", "Diagnosis", @@ -77,8 +82,9 @@ class RequestLogService "Benefit Item", "Amount Approval", "Amount Not Approval", - "Final Billing", - "Remarks", + "Total COB", + "Keterangan IGL", + "Catatan FGL", "QC 1", "Ingestion Code", "Ingestion Status", @@ -89,7 +95,8 @@ class RequestLogService "Date Addmission", "Date Discharge", "Member ID Peserta", - "Type of patient", + "Service", + "Type of Member", "Provider Code", "End Of Claim Numbers", "Diagnosis", @@ -98,8 +105,9 @@ class RequestLogService "Benefit Item", "Amount Approval", "Amount Not Approval", - "Final Billing", - "Remarks", + "Total COB", + "Keterangan IGL", + "Catatan FGL", "QC 1", "Ingestion Code", "Ingestion Status", @@ -232,7 +240,9 @@ class RequestLogService 'status_final_log' => $statusFinalLog, 'final_log' =>$final_log, 'import_system' =>TRUE, - // 'catatan' => $row['catatan'], + 'catatan' => $row['catatan'], + 'type_of_member' => $row['type_of_member'], + 'total_cob' => $row['total_cob'], 'keterangan' => $row['keterangan'], 'policy_id' => $member->currentPolicy->id ?? null, 'organization_id' => $organization_id, @@ -251,6 +261,9 @@ class RequestLogService 'status_final_log' => $statusFinalLog, 'final_log' =>$final_log, 'import_system' =>TRUE, + 'catatan' => $row['catatan'], + 'type_of_member' => $row['type_of_member'], + 'total_cob' => $row['total_cob'], 'diagnosis' => $row['diagnosis'], 'keterangan' => $row['keterangan'], 'policy_id' => $member->currentPolicy->id ?? null, diff --git a/app/Models/RequestLog.php b/app/Models/RequestLog.php index 5a1febe0..ce7fb29b 100644 --- a/app/Models/RequestLog.php +++ b/app/Models/RequestLog.php @@ -25,6 +25,8 @@ class RequestLog extends Model 'member_id', 'payment_type', 'service_code', + 'type_of_member', + 'total_cob', 'policy_id', 'final_log', 'status', @@ -56,24 +58,28 @@ class RequestLog extends Model 'deleted_by', ]; - public static $doc_headers_to_field_map = [ + public $doc_headers_to_field_map = [ "Record Mode" => "record_mode", "Date Addmission" => "submission_date", "Date Discharge" => "discharge_date", "Member ID Peserta" => "member_id", - "Type of patient" => "service", + "Service" => "service", + "Type of Member" => "type_of_member", "Provider Code" => "organization_id", "End Of Claim Numbers" => "code", - "Remarks" => "keterangan", - "Diagnosis" => "catatan", + "Diagnosis" => "diagnosis", "Tgl Billing dari RS" => "approved_final_log_at", "Total Billing" => "total_billing", "Benefit Item" => "benefit_id", "Amount Approval" => "amount_approval", "Amount Not Approval" => "amount_not_approval", - "Final Billing" => "final_billing", - "Remarks" => "keterangan", + "Total COB" => "total_cob", + "Keterangan IGL" => "keterangan", + "Catatan FGL" => "catatan", "QC 1" => "status_final_log", + "Ingestion Code" => "ingestion_code", + "Ingestion Status" => "ingestion_status", + ]; public static $listing_doc_headers = [ @@ -81,19 +87,22 @@ class RequestLog extends Model "Date Addmission", "Date Discharge", "Member ID Peserta", - "Type of patient", + "Service", + "Type of Member", "Provider Code", "End Of Claim Numbers", - "Remarks", "Diagnosis", "Tgl Billing dari RS", "Total Billing", "Benefit Item", "Amount Approval", "Amount Not Approval", - "Final Billing", - "Remarks", + "Total COB", + "Keterangan IGL", + "Catatan FGL", "QC 1", + "Ingestion Code", + "Ingestion Status", ]; public static $listing_data_doc_headers = [ diff --git a/database/migrations/2024_01_25_100340_add_column_to_request_logs.php b/database/migrations/2024_01_25_100340_add_column_to_request_logs.php new file mode 100644 index 00000000..60c55a48 --- /dev/null +++ b/database/migrations/2024_01_25_100340_add_column_to_request_logs.php @@ -0,0 +1,34 @@ +string('type_of_member')->after('service_code')->default(null); + $table->integer('total_cob')->after('type_of_member')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('request_logs', function (Blueprint $table) { + $table->dropColumn('type_of_member'); + $table->dropColumn('total_cob'); + }); + } +}; diff --git a/public/files/Template Import Request LOG.xlsx b/public/files/Template Import Request LOG.xlsx index 4d28e7f1..1dc2fe40 100644 Binary files a/public/files/Template Import Request LOG.xlsx and b/public/files/Template Import Request LOG.xlsx differ diff --git a/resources/views/pdf/final_log_page_1.blade.php b/resources/views/pdf/final_log_page_1.blade.php index a641f537..4a5a180c 100644 --- a/resources/views/pdf/final_log_page_1.blade.php +++ b/resources/views/pdf/final_log_page_1.blade.php @@ -424,6 +424,36 @@ + + + + + + + + @php + if(count($dataDiagnosis)) + { + foreach ($dataDiagnosis as $valDiagnosis) + { + @endphp + + + + @php + } + } + else + { + @endphp + + + + @php + } + @endphp + +
Diagnosis
{{ !empty($valDiagnosis->name) ? ' - '.$valDiagnosis->name : '-'}}
-
@@ -432,7 +462,7 @@ - +
{{ !empty($dataRequestLog->catatan) ? $dataRequestLog->catatan : ''}}{{ !empty($dataRequestLog->catatan) ? $dataRequestLog->catatan : '-'}}