reminder/resources/views/patients/reminders.blade.php

129 lines
5.8 KiB
PHP

@extends('layouts.app')
@section('title', '随访提醒 - 病例回访提醒系统')
@section('content')
<div class="page-header">
<h1 class="page-title">本月随访</h1>
<p class="page-subtitle">{{ now()->format('Y年n月') }} 需要随访的患者</p>
</div>
<!-- 统计栏 -->
<div class="stats-filter-bar">
<div class="stats-filter-grid">
<div class="stats-filter-item active">
<span class="sf-value">{{ $stats['count'] }}</span>
<span class="sf-label">本月待随访</span>
</div>
<div class="stats-filter-item success">
<span class="sf-value">{{ $stats['completed'] }}</span>
<span class="sf-label">已完成</span>
</div>
<div class="stats-filter-item">
<span class="sf-value">{{ $stats['total'] }}</span>
<span class="sf-label">总患者</span>
</div>
</div>
<a href="{{ route('patients.export') }}" class="export-icon-btn" title="导出">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
</a>
</div>
@if($reminders->isEmpty())
<div class="card">
<div class="empty-state">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<path d="M8 14s1.5 2 4 2 4-2 4-2"/>
<line x1="9" y1="9" x2="9.01" y2="9"/>
<line x1="15" y1="9" x2="15.01" y2="9"/>
</svg>
<div class="empty-state-title">本月暂无需要随访的患者</div>
<p>太棒了!本月没有需要随访的患者</p>
</div>
</div>
@else
<!-- 提醒卡片列表 -->
<div class="reminder-grid">
@foreach($reminders as $reminder)
@php
$patient = $reminder['patient'];
$followUpDate = $reminder['follow_up_date'];
$followUpNumber = $reminder['follow_up_number'];
@endphp
<div class="reminder-card fade-in">
{{-- 卡片头部 --}}
<div class="reminder-card-header">
<div class="reminder-patient-info">
<div class="reminder-avatar {{ $patient->gender == '女' ? 'female' : 'male' }}">{{ mb_substr($patient->name, 0, 1) }}</div>
<div>
<div class="reminder-name">{{ $patient->name }}</div>
<div class="reminder-meta">{{ $patient->gender }} · {{ $patient->age }}</div>
</div>
</div>
<span class="badge badge-info">{{ $followUpNumber }}</span>
</div>
{{-- 诊断标签 --}}
<div class="reminder-diagnosis">
<span class="diagnosis-tag">{{ $patient->getDiagnosisType() }}</span>
</div>
{{-- 关键信息 --}}
<div class="reminder-details">
<div class="detail-row">
<span class="detail-icon">🏥</span>
<span class="detail-label">转诊日期</span>
<span class="detail-value">{{ $patient->discharge_date->format('Y-m-d') }}</span>
</div>
<div class="detail-row">
<span class="detail-icon">📅</span>
<span class="detail-label">随访日期</span>
<span class="detail-value">{{ $followUpDate->format('Y-m-d') }}</span>
</div>
<div class="detail-row">
<span class="detail-icon">📞</span>
<span class="detail-label">联系方式</span>
<span class="detail-value">
@if($patient->phone)
<a href="tel:{{ $patient->phone }}" class="phone-link">{{ $patient->phone }}</a>
@else
-
@endif
</span>
</div>
<div class="detail-row">
<span class="detail-icon">📍</span>
<span class="detail-label">地址</span>
<span class="detail-value text-truncate">{{ $patient->address ?: '-' }}</span>
</div>
@if($patient->remark)
<div class="detail-row remark-row">
<span class="detail-icon">📝</span>
<span class="detail-label">备注</span>
<span class="detail-value remark-text">{{ $patient->remark }}</span>
</div>
@endif
</div>
{{-- 拨打电话按钮 --}}
@if($patient->phone)
<div class="reminder-actions">
<a href="tel:{{ $patient->phone }}" class="call-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18">
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
</svg>
拨打电话
</a>
</div>
@endif
</div>
@endforeach
</div>
@endif
@endsection