Skip to content

Commit b776316

Browse files
committed
publish: Initial commit of the SMART on FHIR tutorial in it's final repository location.
generated from commit 4952572
0 parents  commit b776316

23 files changed

+45636
-0
lines changed

example-smart-app/health.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<title>Example-SMART-App</title>
7+
</head>
8+
<body>
9+
<img src="./src/images/batman.gif" alt="Batman">
10+
<p>Healthy!</p>
11+
</body>
12+
</html>

example-smart-app/index.html

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
5+
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
6+
<title>Example-SMART-App</title>
7+
8+
<link rel='stylesheet' type='text/css' href='./src/css/example-smart-app.css'>
9+
</head>
10+
<body>
11+
<h2>Example-SMART-App</h2>
12+
<div id='errors'>
13+
</div>
14+
<div id="loading">Loading...</div>
15+
<div id='holder' >
16+
17+
<h2>Patient Resource</h2>
18+
<table>
19+
<tr>
20+
<th>First Name:</th>
21+
<td id='fname'></td>
22+
</tr>
23+
<tr>
24+
<th>Last Name:</th>
25+
<td id='lname'></td>
26+
</tr>
27+
<tr>
28+
<th>Gender:</th>
29+
<td id='gender'></td>
30+
</tr>
31+
<tr>
32+
<th>Date of Birth:</th>
33+
<td id='birthdate'></td>
34+
</tr>
35+
<tr>
36+
<th>Age:</th>
37+
<td id='age'></td>
38+
</tr>
39+
</table>
40+
<h2>Observation Resource</h2>
41+
<table>
42+
<tr>
43+
<th>Height:</th>
44+
<td id='height'></td>
45+
</tr>
46+
<tr>
47+
<th>Systolic Blood Pressure:</th>
48+
<td id='systolicbp'></td>
49+
50+
</tr>
51+
<tr>
52+
<th>Diastolic Blood Pressure:</th>
53+
<td id='diastolicbp'></td>
54+
</tr>
55+
<tr>
56+
<th>LDL:</th>
57+
<td id='ldl'></td>
58+
</tr>
59+
<tr>
60+
<th>HDL:</th>
61+
<td id='hdl'></td>
62+
</tr>
63+
</table>
64+
</div>
65+
<script src='./src/js/example-smart-app.js'></script>
66+
<script src='./lib/fhir-client.js'></script>
67+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
68+
<script>
69+
extractData().then(
70+
//Display Patient Demographics and Observations if extractData was success
71+
function(p) {
72+
drawVisualization(p);
73+
},
74+
75+
//Display 'Failed to call FHIR Service' if extractData failed
76+
function() {
77+
$('#errors').html('<p> Failed to call FHIR Service </p>');
78+
}
79+
);
80+
</script>
81+
</body>
82+
</html>

example-smart-app/launch.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<title>Example-SMART-App</title>
7+
</head>
8+
Loading...
9+
<body>
10+
<script src='./lib/fhir-client.js'></script>
11+
<script>
12+
FHIR.oauth2.authorize({
13+
'client_id': 'df7c5a17-52dd-4c88-8a32-cdfb557ba758',
14+
'scope': 'patient/Patient.read patient/Observation.read launch online_access openid profile'
15+
});
16+
</script>
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)