-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
197 lines (177 loc) · 7.66 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="//stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="styles.css">
<link href="//fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<script src="//rawgithub.com/smart-on-fhir/client-js/master/dist/fhir-client.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const smart = FHIR.client({
serviceUrl: 'https://r2.smarthealthit.org',
patientId: '86b1134b-3cbe-4432-bad6-9049c9c2c922'
});
smart.patient.read().then(function (pt) {
const firstName = pt.name[0].given;
const lastName = pt.name[0].family;
document.getElementById('patient-name').textContent = `${firstName} ${lastName}`;
document.getElementById('birthdate').textContent = `${pt.birthDate}`;
document.getElementById('gender').textContent = `${pt.gender}`;
});
const immunizationRecord = smart.patient.api.search({ type: 'Immunization' });
const immunizationList = document.getElementById('immunization-list');
immunizationRecord.done(immunizations => {
immunizations.data.entry.map((item) => { console.log(item); immunizationList.innerHTML += `<li>${item.resource.vaccineCode.text}</li>` });
});
});
</script>
</head>
<body>
<div class="container-fluid">
<div class="row title-box">
<h1>immunity.app</h1>
</div>
<div class="row patient-box">
<div class="col">
<img src="assets/profile_placeholder.png" alt="profile picture" class="img-responsive profile-picture">
</div>
<div class="col patient-info">
<h2 id="patient-name" style="margin-left:-18px;" />
<h4>
<ul>
<li id="birthdate" />
<li id="gender" />
<li id="weight">16.5 pounds</li>
<li id="height">26 inches</li>
</ul>
</h4>
</div>
</div>
<div class="timeline-box">
<h2>Birth</h2>
<div class="row">
<div class="col-auto">
<img src="assets/immunity vaccine icons/hepB logo.png" class="vaccine-icon">
</div>
<div class="col">Hepatitus B
<div class="dose">1st dose</div>
</div>
<div class="col administered">Administered</div>
</div>
</div>
<div class="timeline-box">
<h2>1 month</h2>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/hepB logo month begin.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">Hepatitus B</div>
<div class="dose">2nd dose</div>
</div>
<div class="col upcoming">between months 1 and 2
</div>
</div>
</div>
<div class="timeline-box">
<h2>2 months</h2>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/hepB logo month end.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">Hepatitus B</div>
<div class="dose">2nd dose</div>
</div>
<div class="col upcoming">between months 1 and 2</div>
</div>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/RV logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">Rotavirus</div>
<div class="dose">1st dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/DTaP logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">DTaP</div>
<div class="dose">1st dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/Hib logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">Hib</div>
<div class="dose">1st dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/PCV13 logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">PCV13</div>
<div class="dose">1st dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
</div>
<div class="timeline-box">
<h2>4 months</h2>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/RV logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">Rotavirus</div>
<div class="dose">2nd dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/DTaP logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">DTaP</div>
<div class="dose">2nd dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/Hib logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">Hib</div>
<div class="dose">2nd dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
<div class="row immunization-list-item">
<div class="col-auto">
<img src="assets/immunity vaccine icons/PCV13 logo.png" class="vaccine-icon">
</div>
<div class="col">
<div class="immunization-name">PCV13</div>
<div class="dose">2nd dose</div>
</div>
<div class="col upcoming">upcoming</div>
</div>
</div>
</div>
</div>
</body>
</html>