-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (95 loc) · 4.86 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HeartLog Prototype</title>
<link rel="stylesheet" href="node_modules/chartist/dist/chartist.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="titleContainer">
<h1 id="title">HeartLog</h1>
</div>
<div id="patientInfo">
<div id="getIDdiv">
<label for="patientID">Patient ID: </label>
<input type="number" id="patientID" name="patientID" pattern="[0-9]*" inputmode="numeric" min="0" value="0">
<button id="updateDataButton" onclick="showData(true)">Change User / Refresh Data</button><br>
</div>
<fieldset>
<legend><b class="fieldsetBold">Patient Data: </b></legend>
<div id="patientFieldSet">
<!-- <p id="patientId"></p> -->
<p id="patientName"></p>
<p id="dateOfBirth"></p>
<p id="currentAge"></p>
<p id="nationalID"></p>
<p id="emailAddress"></p>
<p id="phoneNumber"></p>
</div>
<p id="patientDataNote" class="centerText" style="display: none;">Data not available.</p>
</fieldset>
</div>
<br><hr class="widht98"><br>
<div id="graphHeaderContainer">
<h1 id="formTitle">Graphs</h1>
<h3 id="graphNote" class="centerText" style="display: none;"><br>Data not available.</h3>
<br>
</div>
<div id="graphsContainer">
<!-- Heart rate -->
<div id="heartGraphContainer">
<h2 class="graphTitle">Heart rate data</h2>
<div id="heartGraph" class="graphStyle"></div>
</div>
<p id="heartGraphNote" class="centerText" style="display: none;"><br>Heart rate data not found.</p>
<br><br>
<!-- SpO2 graph -->
<div id="oxygenGraphContainer">
<h2 class="graphTitle">SpO2 data</h2>
<p class="centerText">(Oxygen percentage in blood data)</p>
<div id="oxygenGraph" class="graphStyle"></div>
</div>
<p id="oxygenGraphNote" class="centerText" style="display: none;"><br>SpO2 data not available.</p>
<br><h6 class="centerText">Quick note: The data in these graphs is randomly generated <br>until I figure out a way to connect a heart rate monitor and Spo2 sensors here.</h6>
</div>
<br><hr class="width98"><br>
<div id="formTitleContainer">
<h1 id="formTitle">Add a patient</h1>
<h4 class="centerText">NOTE: Do not enter your real data here, anyone can open and view this database.</h4>
</div>
<div id="formContainer">
<form id="patientForm">
<!-- I'm currently only including the required data specified in the database
schema (check schema.json) in this prototype. -->
<label for="formFullName">Full Name:</label>
<input type="text" id="formFullName" name="fullName"><br>
<label for="formBirthDate">Birth Date:</label>
<input type="date" id="formBirthDate" name="birthDate"><br>
<label for="formNationalID">National ID:</label>
<input type="text" id="formNationalID" name="nationalID" pattern="[0-9]*" inputmode="numeric" min="0"><br>
<label for="formEmailAddress">Email Address:</label>
<input type="email" id="formEmailAddress" name="emailAddress"><br>
<label for="formPhoneNumber">Phone Number:</label>
<input type="tel" id="formPhoneNumber" name="phoneNumber" pattern="[0-9]*" inputmode="numeric" min="0"><br>
<!-- Generate random BPM & SpO2 data for the new user -->
<label for="includeHeartData" id="bpmLabel">Add BPM data:</label>
<input type="checkbox" id="includeHeartData"><br>
<label for="includeOxygenData" id="spo2Label">Add SpO2 data:</label>
<input type="checkbox" id="includeOxygenData"><br>
<h5 class="centerText">Note: The 'Add ... data' checkboxes will generate random BPM and SpO2 data for the patient.</h5>
<div id="submitContainer"> <!-- To be able to center it -->
<button id="submitButton" onclick="submitData(event)">Submit</button>
</div>
</form>
</div>
<div id="notification" class="notification"></div>
<br><br>
<footer><p class="centerText">Copyright (C) 2024 Kareem Osama</p></footer>
<br>
<script src="node_modules/chartist/dist/chartist.js"></script>
<script src="node_modules/chartist-plugin-axistitle/dist/chartist-plugin-axistitle.js"></script>
<script src="client.js"></script>
</body>
</html>