Add report generation with PDF output and respiratory chart
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Lung Report</title>
|
||||
<!-- TailwindCSS via CDN -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
<body class="p-10 font-sans">
|
||||
<div class="bg-black text-white p-4 rounded-lg mb-6">
|
||||
<h1 class="text-2xl font-bold">Lung Analysis Report</h1>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2 gap-4 mb-6">
|
||||
<div><b>Name:</b> {{ patient.name }}</div>
|
||||
<div><b>Age:</b> {{ patient.age }}</div>
|
||||
<div><b>Height:</b> {{ patient.height }} cm</div>
|
||||
<div><b>Weight:</b> {{ patient.weight }} kg</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-6">
|
||||
<h2 class="text-xl font-semibold mb-2">Lung Function</h2>
|
||||
<div class="w-full h-6 bg-gradient-to-r from-red-500 via-yellow-300 to-green-400 relative">
|
||||
<div class="absolute top-[-5px] left-1/2 transform -translate-x-1/2
|
||||
w-0 h-0 border-l-[7px] border-r-[7px] border-b-[10px] border-black"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-gray-100 p-4 rounded-lg mb-6">
|
||||
<b>Indications:</b> {{ indications }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2 class="text-xl font-semibold mb-2">Respiratory Chart</h2>
|
||||
<img src="{{ chart_path }}" class="border rounded-lg shadow">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user