@foreach ($claims as $i => $r) @php $dateInfinityReceive = Carbon\Carbon::parse($r->date_infinity_recive); // Date when Infinity received the claim $dateClaim = Carbon\Carbon::parse($r->date_claim); // Date when the claim was entered into the cia $dateCiaReceived = Carbon\Carbon::parse($r->date_cia_recived); // Date when the company received the claim $reentryConfirmedDate = Carbon\Carbon::parse($r->reentry_confirmed_date); // Date when the reentry was confirmed $dateLiquidation = Carbon\Carbon::parse($r->date_liquidacion_credito); // Liquidation date $dateCredito = Carbon\Carbon::parse($r->date_credito); // Final credit date // Calculate the days between each pair of dates // 1. Days the claim spent in Infinity before reaching the company $days_in_infinity = $dateInfinityReceive->diffInDays($dateLiquidation); // 2. Days the claim spent in the company until reentry confirmation $days_in_company = $dateClaim->diffInDays($dateLiquidation); // 3. Total days from when Infinity received the claim to final credit $days_total_process = $dateInfinityReceive->diffInDays($dateLiquidation); // 4. Days between company return and internal reentry confirmation $days_return_to_reentry = $dateClaim->diffInDays($dateCiaReceived); @endphp {{-- TH: N. --}} {{-- TH: N. GESTION --}} {{-- TH: STATUS DE INGRESO --}} {{-- TH: CODIGO DE CLIENTE --}} {{-- TH: ASEGURADORA --}} {{-- TH: NOMBRE EMPRESA --}} {{-- TH: RAMO --}} {{-- TH: POLIZA --}} {{-- TH: CIUDAD --}} {{-- TH: NO. CERT. --}} {{-- TH: TITULO SR. / SRA --}} {{-- TH: NOMBRE DEL TITULAR --}} {{-- TH: NOMBRE DEL DEPENDIENTE --}} {{-- TH: PARENTESCO --}} {{-- TH: CORREO --}} {{-- TH: CEL --}} {{-- TH: FECHA DEL GASTO --}} {{-- TH: FECHA RECIBIDO DE RECLAMO EN INFINITY --}} {{-- TH: TIPO DE SOLICITUD --}} {{-- TH: MEDICO TRATANTE --}} {{-- TH: DIAGNOSTICO PRINCIPAL --}} {{-- TH: DIAGNOSTICO SECUNDARIA --}} {{-- TH: USA MEDICAMENTO DE USO CONTINUO --}} {{-- TH: DETALLE MED. USO CONTINUO 1 --}} {{-- TH: F. VENC. RECETA M.U.C 1 --}} {{-- TH: DETALLE MED. USO CONTINUO 2 --}} {{-- TH: F. VENC. RECETA M.U.C 2 --}} {{-- TH: DETALLE MED. USO CONTINUO 3 --}} {{-- TH: F. VENC. RECETA M.U.C 3 --}} {{-- TH: FECHA INGRESO DEL RECLAMO A COMPAÑÍA --}} {{-- TH: NO. RECLAMO --}} {{-- TH: VALOR TOTAL RECLAMO PRESENTADO --}} {{-- TH: COASEGURO --}} {{-- TH: TIPO DE DEDUCIBLE --}} {{-- TH: DEDUCIBLE SEGUN POLIZA --}} {{-- TH: DEDUCIBLE CUBIERTO --}} {{-- TH: DEDUCIBLE POR CUBRIR --}} {{-- TH: gastos no legibles --}} {{-- TH: VALIDACION TOTAL LIQUIDADO --}} {{-- TH: RECLAMO DEVUELTO - F. REINGRESO --}} {{-- TH: OBSERV. DEVOLUCIÓN --}} {{-- TH: F. NOTIFICACIÓN AL CLIENTE --}} {{-- TH: PENDIENTE DEL REINGRESO EN MANOS DE --}} {{-- TH: F. REINGRESO A LA CIA. --}} {{-- TH: STATUS --}} {{-- TH: F. RECIBO LIQUIDACIÓN COMPAÑÍA --}} {{-- TH: OBSERVACIONES DE LA LIQUIDACIÓN --}} {{-- TH: F. ENVÍO LIQUIDACIÓN AL CLIENTE --}} {{-- TH: TIEMPO DE INFINITY --}} {{-- TH: TIEMPO EN CIA. --}} {{-- TH: TIEMPO PARA EL REINGRESO --}} {{-- TH: TIEMPO CIERRE DE GESTIÓN --}} @endforeach
N. N. GESTION STATUS DE INGRESO CODIGO DE CLIENTE ASEGURADORA NOMBRE EMPRESA RAMO POLIZA CIUDAD NO. CERT. TITULO SR. / SRA NOMBRE DEL TITULAR NOMBRE DEL DEPENDIENTE PARENTESCO CORREO CEL FECHA DEL GASTO FECHA RECIBIDO DE RECLAMO EN INFINITY TIPO DE SOLICITUD MEDICO TRATANTE DIAGNOSTICO PRINCIPAL DIAGNOSTICO SECUNDARIA USA MEDICAMENTO DE USO CONTINUO DETALLE MED. USO CONTINUO 1 F. VENC. RECETA M.U.C 1 DETALLE MED. USO CONTINUO 2 F. VENC. RECETA M.U.C 2 DETALLE MED. USO CONTINUO 3 F. VENC. RECETA M.U.C 3 FECHA INGRESO DEL RECLAMO A COMPAÑÍA NO. RECLAMO VALOR TOTAL RECLAMO PRESENTADO COASEGURO TIPO DE DEDUCIBLE DEDUCIBLE SEGUN POLIZA DEDUCIBLE CUBIERTO DEDUCIBLE POR CUBRIR GASTOS NO LEGIBLES TOTAL LIQUIDADO RECLAMO DEVUELTO – F. REINGRESO OBSERV. DEVOLUCIÓN F. NOTIFICACIÓN AL CLIENTE PENDIENTE DEL REINGRESO EN MANOS DE F. REINGRESO A LA CIA. STATUS F. RECIBO LIQUIDACIÓN COMPAÑÍA OBSERVACIONES DE LA LIQUIDACIÓN F. ENVÍO LIQUIDACIÓN AL CLIENTE TIEMPO DE INFINITY TIEMPO EN CIA. TIEMPO PARA EL REINGRESO TIEMPO CIERRE DE GESTIÓN
{{ $r->id }}{{ $r->ticket?->id }}{{ $r->ticket?->getStatus?->ticket_status_name }}{{ $r->ticket?->client_id }}{{ $r->insurance?->name }}{{ getClientName($r->getClient) }}{{ $r->policy?->getBranch?->name }}{{ $r->policy?->policy_id }}{{rvfj(json_encode(cities()), $r->policyInsurer?->location_id) }}{{ $r->policyInsurer?->certificate_id }}{{ $r->client_title == 1 ? 'Sr.' : 'Sra.' }}{{$r->policyInsurer?->name}}{{$r->policyInsurerDependient?->name ?? 'N/A'}}{{$r->policyInsurerDependient?->getBeneficiary?->relation ?? 'Titular'}}{{$r->policyInsurer?->email ?? 'N/A'}}{{$r->policyInsurer?->phone ?? 'N/A'}}{{ $r->date_claim_cost}}{{ translateDate($r->date_infinity_recive) }}{{ $r->ticket?->title }}{{ $r->doctor_name }}{{ $r->principal_diagnost }}{{ $r->second_diagnost }}{{ ($r->medicament_continual_1 || $r->medicament_continual_2 || $r->medicament_continual_3) ? 'Sí' : 'No' }}{{ $r->detail_medicament_continual_1 }}{{ $r->date_final_medicament_continual_1 }}{{ $r->detail_medicament_continual_2 }}{{ $r->date_final_medicament_continual_2}}{{ $r->detail_medicament_continual_3 }}{{ $r->date_final_medicament_continual_3}}{{ $r->date_claim }}{{ $r->claim_number }}{{ $r->valor_total_reclamo }}{{ $r->coaseguro }} @if($r->tipo_deducible == 1) Año póliza @elseif($r->tipo_deducible == 2) año calendario @endif {{ $r->deducible_según_poliza }}{{ $r->deducible_cubierto }}{{ $r->deducible_por_cubrir }}{{ ($r->valor_total_reclamo - $r->total_settled) }}{{ $r->validacion_total_liquidado }}{{ $r->date_cia_recived }}{{ $r->return_observation }}{{ $r->return_notify_date }}{{ $r->reentry_responsible }}{{ $r->reentry_confirmed_date }}{{rvfj( json_encode(medicalClaimsStatuses()), $r->status)}}{{ $r->date_credito }}{{ $r->liquidation_observation }}{{ $r->date_liquidacion_credito }}{{ (int)$days_in_infinity}}{{ (int)$days_in_company}}{{ (int)$days_return_to_reentry}}{{ (int)$days_total_process}}