-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
40 lines (37 loc) · 1.54 KB
/
index.html
File metadata and controls
40 lines (37 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{% extends "base.html" %}
{% block content %}
<h1 class="mb-4">Health Records</h1>
<a href="{{ url_for('new_record') }}" class="btn btn-primary mb-4">Create New Record</a>
{% if records %}
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Patient Name</th>
<th>Date of Birth</th>
<th>Medical Condition</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>{{ record.patient_name }}</td>
<td>{{ record.date_of_birth.strftime('%Y-%m-%d') }}</td>
<td>{{ record.medical_condition }}</td>
<td>
<a href="{{ url_for('view_record', id=record.id) }}" class="btn btn-sm btn-info">View</a>
<a href="{{ url_for('edit_record', id=record.id) }}" class="btn btn-sm btn-warning">Edit</a>
<form action="{{ url_for('delete_record', id=record.id) }}" method="POST" class="d-inline">
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to delete this record?')">Delete</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<p>No health records found.</p>
{% endif %}
{% endblock %}