forked from simpledotorg/hearts360
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstructions.html
365 lines (326 loc) · 11.5 KB
/
instructions.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>HEARTS 360 Dashboard: Instructions</title>
<meta
name="description"
content="A free, open source, template for creating a very useful hypertension dashboard to support public health projects."
/>
<meta name="author" content="Resolve to Save Lives" />
<link rel="icon" href="favicon.png" />
<link rel="stylesheet" href="css/preflight.css?v=1.0" />
<link rel="stylesheet" href="css/template.css" />
</head>
<body>
<div class="banner">
<div class="banner-body">
<a href="index.html">
← Home
</a>
<div class="desktop-only">
<div class="link-list">
<span>v1.3</span>
<a href="instructions.html">Setup instructions</a>
<a
class="external-link"
href="https://github.com/simpledotorg/hypertension-dashboard"
>GitHub</a
>
</div>
</div>
</div>
</div>
<nav class="navigation">
</nav>
<main class="main menu">
<h1 class="span-2-col" style="margin-top: 2rem;">Setup instructions</h1>
<div class="card markdown-body ">
<h2 id="about">About</h2>
<p>This is a free and open source dashboard that is intended as a template that can be used by any hypertension control program. The code is available for free on <a href="https://github.com/simpledotorg/hypertension-dashboard">Github</a> and is licensed under an MIT License.</p>
<p>This page details the data required to setup a working version of this <a href="index.html">dashboard</a></p>
<!--h2 id="background">Background</h2>
<h3 id="Blood pressure reading">Blood pressure reading</h3>
<p>A blood pressure reading is made up of 2 measurements, systolic pressure and diastolic pressure. This is commonly written as [systolic] / [diastolic] (eg 120/80)</p>
<p>
Blood pressure is classed as controlled when a systolic reading is below 140 <b>AND</b> the
diastolic reading is below 90. The <b>AND</b> is important, both statements must be for blood pressure control
</p>
<p>
<b>Controlled</b>: BP reading where systolic <140
<b>AND</b> diastolic <90
</p>
<p>
<b>Uncontrolled</b>: BP reading where systolic ≥140
<b>OR</b> diastolic ≥90
</p>
<h3 id="numerators-and-denominators">Numerators and denominators</h3>
<p>
<b>Numerators</b> and <b>denominators</b> are common descriptors in
epidemiology and will be used throught this document and the
dashboard.
</p>
<p>
The <b>denominator</b> indicates to pool of patients being explored
while the <b>numerator</b> is a subset of the denominator.
</p>
<p>Eg. [numerator] / [deonminator] - where 150 / 200 is 75%</p>
<h2 id="patient">Patient</h2>
<p>A patient requires the following data points:</p>
<h3>Enrollment date</h3>
<p><span class="definition">enrollment_date</span></p>
<p>The date the patient was registered into the hypertension program</p>
<h3>Facility</h3>
<p><span class="definition">facility</span></p>
<p>Facility visited by the patient for blood pressure monitoring</p>
<h3>Patient status</h3>
<p><span class="definition">dead</span></p>
<p>Is this patient dead</p>
<p class="note">
Dead patients are removed from the dashboard figures and are only show
in the tooltips.
</p>
<h2>Patient visits</h2>
<h3 id="most-recent-visit-date">Most recent visit date</h3>
<p><span class="definition">latest_visit_date</span></p>
<p>The date of the patients most recent visit</p>
<h3>Most recent visit outcome</h3>
<p><span class="definition">latest_visit_bp_controlled</span></p>
<p>The blood pressure control status - controlled or uncontrolled.</p>
<h2>Definitions</h2>
<h3 class="block">
Registered patients
<span class="definition">registered_patients</span>
</h3>
<p>All patients registered on the hypertension program that are not dead</p>
<p>All patients where:</p>
<ul>
<li><span class="definition">dead</span> is 'FALSE'</li>
</ul>
<h3 class="block">
Patients under care
<span class="definition">patients_under_care</span>
</h3>
<p>
The number of patients that have received at least one blood pressure
reading in the last 3 months
</p>
<p>All patients where:</p>
<ul>
<li><span class="definition">dead</span> is 'FALSE'</li>
<li><span class="definition">ltfu_12month</span> is 'FALSE'</li>
</ul>
<h3 id="bp-controlled" class="block">
Controlled blood pressure
<<span class="definition">bp_controlled</span>
</h3>
<p>A blood pressure reading where systolic <140 <b><u>AND</u></b> diastolic <90 </p>
<h3 id="bp-uncontrolled" class="block">
Uncontrolled blood pressure
<span class="definition">bp_controlled</span>
</h3>
<p>A blood pressure reading where systolic ≥140 <b><u>OR</u></b> diastolic ≥90 </p>
<h3 class="block">
3 month lost to follow up
<span class="definition">three_month_lost_to_follow_up</span>
</h3>
<p>A patient with no blood pressure recording in a last 3 months</p>
<h3 class="block">
12 month lost to follow up
<span class="definition">twelve_month_lost_to_follow_up</span>
</h3>
<p>A patient with no blood pressure recording in last 12 months</p>
<h2 id="bp-control">BP controlled</h2>
<h3>Numerator</h3>
<p>Patients from denominator with <span class="definition">bp_controlled</span></p>
<h3>Denominator</h3>
<p><span class="definition">patients_under_care</span> with:</p>
<ul>
<li>
<span class="definition">enrollment_date</span> at least 3 months
from today
</li>
<li><span class="definition">ltfu_3month</span> is 'FALSE'</li>
<li>
<span class="definition">latest_visit_bp_controlled</span> is
'controlled'
</li>
</ul>
<p class="note">
Patients registered for less than 3 months are excluded to allow
healthcare workers time to get a patients blood pressure under
control.
</p>
<h2 id="bp-uncontrolled">BP uncontrolled</h2>
<h2 id="3-month-lost-to-follow-up">3 month lost to follow up</h2>
<h2 id="12-month-lost-to-follow-up">12 month lost to follow up</h2>
<h2 id="patients-under-care">Patients under care</h2>
<h2 id="population-coverage">Population coverage</h2>
<h2 id="quarterly-cohort-report">Quarterly cohort report</h2>
<h2 id="compare-sub--regions">Compare sub-regions</h2>
<h2 id="anti--hypertensive-drug-stock">Anti-hypertensive drug stock</h2>
<h2 id="blood-pressure-monitors">Blood pressure monitors</h2>
<h2 id="stock-by-reporting-facility">Stock reporting by facility</h2>
</div-->
<aside>
<h2>Navigation</h2>
<ul class="nav-jump-links"></ul>
</aside>
</main>
</body>
<style>
.menu {
display: grid;
grid-template-columns: 3fr 1fr;
gap: 36px;
margin-top: 0px;
margin-bottom: 48px;
}
.span-2-col {
grid-column: span 2;
}
a {
position: relative;
}
a::before {
position: absolute;
top: -30px;
}
/* h1,
h2,
h3 {
font-weight: 700;
}
h3 {
font-size: 1.2rem;
margin: 8px 0;
}
article {
margin: 16px 0;
} */
.markdown-body {
/* background: none; */
padding: 24px;
& h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 700;
}
& h1 {
font-size: 3rem;
}
& h2 {
text-transform: none;
margin-top: 3rem;
font-size: 1.75rem;
}
& h3.block {
display: flex;
gap: 8px;
align-items: center;
}
.note {
color: #616161;
font-style: italic;
}
.note::before {
content: "Note";
background: #e2e2e2;
color: #4e4e4e;
padding: 3px 6px;
font-size: 0.9rem;
margin-right: 8px;
border-radius: 3px;
}
}
.definition {
background: rgba(255, 51, 85, 0.1);
border: 1px solid rgba(255, 51, 85, 0.2);
padding: 1px 6px;
color: #770b0b;
border-radius: 4px;
font-family: monospace;
font-weight: 500;
font-size: 1rem;
}
.nav-jump-links {
& li {
margin: 8px 0 8px 8px;
&.parent {
font-weight: 700;
/* font-size: 1.1rem; */
margin-left: 0;
}
&:not(.parent) p::before {
content: '⎣';
margin-right: 4px;
color: #a9a9a9;
font-size: 0.5rem;
vertical-align: text-top;
}
}
}
</style>
<script>
function kebabToSentenceCase(kebabCaseString) {
// Split the string by hyphens to get individual words
const words = kebabCaseString.split("-");
// Capitalize the first letter of the first word and make the rest lowercase
const sentenceCaseWords = words.map((word, index) => {
if (index === 0) {
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
} else {
return word.toLowerCase();
}
});
// Join the words back to form the sentence case string
const sentenceCaseString = sentenceCaseWords.join(" ");
return sentenceCaseString.replace(/bp/gi, "BP");
}
function findIds() {
// Find all elements with an 'id' attribute
const elementsWithIds = document.querySelectorAll("[id]");
console.log(elementsWithIds);
// Create a list of jump links from the anchor tags
const jumpLinks = [];
for (const element of elementsWithIds) {
const tag = element.localName;
const id = element.id;
jumpLinks.push({ tag, id });
}
return jumpLinks;
}
const jumpLinks = findIds();
if (jumpLinks.length > 0) {
console.log("List of Jump Links:");
console.log(jumpLinks);
} else {
console.log("No jump links found.");
}
function buildNavList(arrayOfLinks) {
let html = "";
arrayOfLinks.forEach((element) => {
html += `
<li ${element.tag === "h2" ? 'class="parent"' : ""}>
<p>
<a href="#${element.id}">
${kebabToSentenceCase(element.id)}
</a>
</p>
</li>
`;
// ${element.tag === "h3" ? '<span class="definition">' : ""}
// ${element.tag === "h2" ? kebabToSentenceCase(element.id) : element.id}
// ${element.tag === "h3" ? '</span>' : ""}
});
console.log(html);
return html;
}
document.getElementsByClassName("nav-jump-links")[0].innerHTML =
buildNavList(jumpLinks);
</script>
</html>