@extends('template.index') @section('title', 'Dashboard') @section('content')

Dashboard Prediksi Penyakit Jantung

Selamat Datang, {{ Auth::user()->name }}!

Semoga harimu menyenangkan. Berikut ringkasan data prediksi penyakit jantung.

@php $charts = [ ['id' => 'positiveByGender', 'title' => 'Positif - Jenis Kelamin', 'data' => $chartData['gender'], 'colors' => ['#4e73df','#f6c23e']], ['id' => 'negativeByGender', 'title' => 'Negatif - Jenis Kelamin', 'data' => $chartData['gender'], 'colors' => ['#1cc88a','#e74a3b']], ['id' => 'positiveByAgeGroup', 'title' => 'Positif - Usia', 'data' => $chartData['ageGroup'], 'colors' => ['#36b9cc','#f6c23e','#e74a3b','#4e73df','#858796','#1cc88a']], ['id' => 'negativeByAgeGroup', 'title' => 'Negatif - Usia', 'data' => $chartData['ageGroup'], 'colors' => ['#36b9cc','#f6c23e','#e74a3b','#4e73df','#858796','#1cc88a']], ['id' => 'positiveByTensi', 'title' => 'Positif - Tekanan Darah', 'data' => $chartData['tensi'], 'colors' => ['#4e73df','#f6c23e']], ['id' => 'negativeByTensi', 'title' => 'Negatif - Tekanan Darah', 'data' => $chartData['tensi'], 'colors' => ['#1cc88a','#e74a3b']], ['id' => 'positiveByChol', 'title' => 'Positif - Kolesterol', 'data' => $chartData['chol'], 'colors' => ['#36b9cc','#f6c23e']], ['id' => 'negativeByChol', 'title' => 'Negatif - Kolesterol', 'data' => $chartData['chol'], 'colors' => ['#e74a3b','#858796']], ]; @endphp @foreach($charts as $chart)
{{ $chart['title'] }}
@foreach($chart['data']['labels'] as $i => $label)
{{ $label }}
@endforeach
@endforeach
Data Pasien
@foreach($patients as $index => $p) @endforeach
No Nama Pasien Usia Jenis Kelamin Tekanan Darah Kolesterol Hasil EKG Denyut Jantung Prediksi
{{ $patients->firstItem() + $index }} {{ $p->patient_name }} {{ $p->age }} {{ $p->sex == 1 ? 'Laki-laki' : 'Perempuan' }} {{ $p->trestbps }} mmHg {{ $p->chol }} mg/dL @if($p->restecg == 0) Normal @elseif($p->restecg == 1) ST-T Abnormal @else Hipertrofi Kiri @endif {{ $p->thalach }} bpm @if($p->prediction == 1) Risiko Tinggi @else Tidak Berisiko @endif
{{ $patients->links('pagination::bootstrap-5') }}
@endsection @section('scripts') @endsection