-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatients.html
More file actions
144 lines (139 loc) · 5.83 KB
/
patients.html
File metadata and controls
144 lines (139 loc) · 5.83 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="MedCare HMS — Patient Management">
<title>Patients — MedCare HMS</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="app-layout">
<div id="sidebarPlaceholder"></div>
<main class="main-content">
<div class="page-header">
<div class="page-title">
<p class="breadcrumb">Home / Patients</p>
<h1>Patient Management</h1>
<p>Manage patient records, history, and health data</p>
</div>
<div style="display:flex;gap:10px;flex-wrap:wrap;">
<button class="btn btn-outline" id="exportPatientsBtn">⬇ Export CSV</button>
<button class="btn btn-primary" id="addPatientBtn">➕ Add Patient</button>
</div>
</div>
<div class="page-body">
<div class="card">
<div class="card-header">
<h2>👥 All Patients <span class="badge badge-primary" id="patientCount">0</span></h2>
<div class="toolbar">
<div class="search-wrapper">
<span class="search-icon">🔍</span>
<input type="text" class="search-input" id="patientSearch" placeholder="Search name, ID, disease…">
</div>
<select class="form-select" id="genderFilter" style="width:130px;">
<option value="">All Genders</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</div>
</div>
<div class="table-wrapper">
<table>
<thead>
<tr><th>ID</th><th>Name</th><th>Age</th><th>Gender</th><th>Disease</th><th>Contact</th><th>Blood</th><th>Actions</th></tr>
</thead>
<tbody id="patientTableBody">
<tr><td colspan="8" class="empty-row"><div class="empty-state"><span class="empty-icon">👤</span><p>Loading…</p></div></td></tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
</div>
<!-- ADD / EDIT MODAL -->
<div class="modal-overlay" id="patientModal">
<div class="modal">
<div class="modal-header">
<h2 id="modalTitle">Add New Patient</h2>
<button class="modal-close" data-close-modal="patientModal">✕</button>
</div>
<div class="modal-body">
<form id="patientForm" novalidate>
<div class="form-row">
<div class="form-group">
<label class="form-label" for="pName">Full Name *</label>
<input class="form-input" type="text" id="pName" placeholder="John Doe" required>
</div>
<div class="form-group">
<label class="form-label" for="pAge">Age *</label>
<input class="form-input" type="number" id="pAge" min="0" max="130" placeholder="25" required>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label class="form-label" for="pGender">Gender *</label>
<select class="form-select" id="pGender" required>
<option value="">Select</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</div>
<div class="form-group">
<label class="form-label" for="pBlood">Blood Group</label>
<select class="form-select" id="pBlood">
<option value="">Unknown</option>
<option>A+</option><option>A-</option><option>B+</option><option>B-</option>
<option>O+</option><option>O-</option><option>AB+</option><option>AB-</option>
</select>
</div>
</div>
<div class="form-group">
<label class="form-label" for="pDisease">Primary Diagnosis / Disease *</label>
<input class="form-input" type="text" id="pDisease" placeholder="e.g. Diabetes, Hypertension" required>
</div>
<div class="form-group">
<label class="form-label" for="pContact">Contact Number *</label>
<input class="form-input" type="tel" id="pContact" placeholder="10-digit mobile number" required>
</div>
<div class="form-group">
<label class="form-label" for="pAddress">Address</label>
<textarea class="form-textarea" id="pAddress" placeholder="Patient's full address" rows="2"></textarea>
</div>
<div class="form-group">
<label class="form-label" for="pEmergencyContact">Emergency Contact</label>
<input class="form-input" type="tel" id="pEmergencyContact" placeholder="Emergency contact number">
</div>
<div class="form-group">
<label class="form-label" for="pAllergies">Allergies</label>
<input class="form-input" type="text" id="pAllergies" placeholder="e.g. Penicillin, Sulpha drugs">
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-outline" data-close-modal="patientModal">Cancel</button>
<button class="btn btn-primary" onclick="document.getElementById('patientForm').requestSubmit()">Save Patient</button>
</div>
</div>
</div>
<!-- HISTORY / VIEW MODAL -->
<div class="modal-overlay" id="historyModal">
<div class="modal modal-lg">
<div class="modal-header">
<h2>Patient Profile & History</h2>
<button class="modal-close" data-close-modal="historyModal">✕</button>
</div>
<div class="modal-body" id="historyContent"></div>
<div class="modal-footer">
<button class="btn btn-outline" data-close-modal="historyModal">Close</button>
</div>
</div>
</div>
<script src="js/utils.js"></script>
<script src="js/sidebar.js"></script>
<script src="js/patients.js"></script>
</body>
</html>