@extends('layouts.admin')

@section('title', 'Hasil Diagnosa')

@section('content')

<div class="card shadow">
    <div class="card-body">

        <h4 class="mb-3">Hasil Diagnosa</h4>

        <p><b>Nama:</b> {{ $diagnosa->pasien->nama }}</p>
        <p><b>Penyakit:</b> {{ $diagnosa->penyakit->nama }}</p>
        <p><b>Nilai CF:</b> {{ number_format($diagnosa->cf_hasil * 100, 2) }}%</p>

        <hr>

        <h5>Deskripsi</h5>
        <p>{!! $diagnosa->penyakit->deskripsi !!}</p>

        <h5>Solusi</h5>
        <p>{!! $diagnosa->penyakit->solusi !!}</p>

        <h5>Risiko Komplikasi</h5>
        <p>{!! $diagnosa->penyakit->komplikasi ?? '-' !!}</p>

        <hr>

        <a href="{{ route('diagnosa.pdf', $diagnosa->id) }}" 
           class="btn btn-success">
           Download PDF
        </a>

        <a href="{{ route('admin.riwayat') }}" 
           class="btn btn-secondary">
           Kembali
        </a>

    </div>
</div>

@endsection