-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·217 lines (179 loc) · 8.82 KB
/
index.php
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
<?php
/************************************************
ANTIBIOGRAM WEB APPLICATION
---------------------------
Developed by: Jeremy Voros <[email protected]>
NOTES:
- NOTES in php header so it doesn't show up on HTML page ;)
- can't use JQM "Back" button because of bug in mobile Safari when using cache manifest
- iOS9 navigation was broken, had to remove - data-transition="slide" - from all the back button links
************************************************/
// INITIALIZE
date_default_timezone_set('America/Denver'); //timezone for modified date
require_once('lib/rb.php'); // Redbean ORM v3.4 for database handling
R::setup('sqlite:admin/abx-db'); //connect redbean to the database
// get data from database
$organs = R::findAll('organ', ' ORDER BY orderid');
R::preload($organs, 'infection, infection.treatment');
$ver = R::load('version', 1);
?>
<!DOCTYPE html>
<!--DYNAMICALLY GENERATED CACHE MANIFEST
be sure to modify manifest to exclude files not needed for mobile,
like /admin
-->
<html manifest="manifest.php">
<head>
<title>Abx:DH</title>
<!-- MOBILE WEB APP META-->
<meta name="apple-mobile-web-app-title" content="Abx:DH">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta http-equiv="cleartype" content="on">
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon.png">
<link rel="icon" href="apple-touch-icon.png">
<!-- JQM LOCAL for JS and CSS-->
<link rel="stylesheet" href="css/jquery.mobile.flatui.css" />
<script src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
// Override of $.fn.animationComplete muse be called before initialise jquery mobile js
// fixes iOS 9 problems with scrolling
$(document).bind('mobileinit', function() {
$.fn.animationComplete = function(callback) {
if ($.support.cssTransitions) {
var superfy= "WebKitTransitionEvent" in window ? "webkitAnimationEnd" : "animationend";
return $(this).one(superfy, callback);
} else {
setTimeout(callback, 0);
return $(this);
}
};
})
</script>
<script src="js/jquery.mobile-1.3.2.min.js"></script>
<!-- EXTRA LIBRARIES-->
<script src="js/fastclick.js"></script>
<script src="https://cdn.flurry.com/js/flurry.js"></script>
<script>
// ENABLE FAST-CLICK
$(function() {
FastClick.attach(document.body);
});
// LOG EVENTS TO FLURRY
FlurryAgent.startSession("PXRS2Q9VP4DWCC289H2N");
$(document).on("pageshow", ".flurry", function(event) {
var event = $(this).find('.ui-header').find('h1').html();
console.log('Event: ' + event);
FlurryAgent.logEvent(event);
});
</script>
<!-- CUSTOM STYLES-->
<style>
/* USED IF TRANSLUCENT IPHONE STATUS BAR
.ui-mobile .ui-header { padding-top: 15px; }
.ui-header .ui-btn-left { top: 18px; }
*/
/* remove link underlines*/
a { text-decoration: none; }
/* border around back button*/
.ui-bar-a .ui-btn-up-a { border: 1px solid #34495e; }
/* bottom border on list items and word wrapping in list items*/
.ui-listview>li { border-bottom: 1px solid white; }
.ui-listview>li p { font-size: 0.85em; white-space: normal; }
/* Last Updated styles */
.last-mod { text-align:center; color: #16a085; font-size: 0.8em; }
</style>
</head>
<body>
<!-- STARTING PAGE-->
<div data-role="page" id="home">
<div data-role="header" data-position="fixed">
<h1>Organs</h1>
</div>
<div class="ui-content">
<ul data-role="listview">
<? foreach($organs as $organ) : ?>
<li><a href="#organ-<?=$organ->id?>" data-transition="slide"><?=$organ->name?></a></li>
<? endforeach; ?>
<li data-role="list-divider"></li>
<li><a href="#about" data-transition="flip">About</a></li>
</ul>
<br />
<p class="last-mod">Updated: <?=date('d M Y', strtotime($ver->modified))?></p>
</div>
</div>
<!-- ORGAN PAGES, ONE FOR EACH ORGAN, LISTS INFECTIONS -->
<? foreach($organs as $organ) : ?>
<div data-role="page" id="organ-<?=$organ->id?>">
<div data-role="header" data-position="fixed">
<a data-role="button" href="#home" data-direction="reverse">Back</a>
<h1><?=$organ->name?></h1>
</div>
<div class="ui-content">
<ul data-role="listview">
<? $infections = $organ->ownInfection; foreach ($infections as $infection) : ?>
<li>
<a href="#infection-<?=$infection->id?>" data-transition="slide">
<h2><?=$infection->title?></h2>
<p><?=$infection->subtitle?></p>
</a>
</li>
<? endforeach;?>
</ul>
</div>
</div>
<? endforeach;?>
<!-- END ORGAN PAGES-->
<!-- INFECTION PAGE, ONE FOR EACH INFECTION, LISTS TREATMENTS -->
<? foreach($organs as $organ) : $infections = $organ->ownInfection; foreach($infections as $infection) : ?>
<div data-role="page" id="infection-<?=$infection->id?>" class="flurry">
<div data-role="header" data-position="fixed">
<a data-role="button" href="#organ-<?=$organ->id?>" data-direction="reverse">Back</a>
<h1><?=$infection->title?></h1>
</div>
<div class="ui-content">
<ul data-role="listview">
<? $treatments = $infection->ownTreatment; foreach($treatments as $treatment) :?>
<li data-role="list-divider"><?=$treatment->location?></li>
<li><h3>First Line</h3><p><?=$treatment->first?></p></li>
<? if ($treatment->alt) : ?><li><h3>Alternate</h3><p><?=$treatment->alt?></p></li><? endif; ?>
<? if ($treatment->duration) : ?><li><h3>Duration</h3><p><?=$treatment->duration?></p></li><? endif; ?>
<? if ($treatment->notes != '' && $treatment->notes != ' ') : ?><li><h3>Notes</h3><p><?=$treatment->notes?></p></li><? endif; ?>
<? endforeach; ?>
</ul>
</div>
</div>
<? endforeach; endforeach; ?>
<!-- END INFECTION PAGES -->
<!-- ABOUT-->
<div data-role="page" id="about" class="flurry">
<div data-role="header" data-position="fixed">
<a data-role="button" href="#home" data-transition="flip">Back</a>
<h1>About</h1>
</div>
<div class="ui-content">
<h2>Abx:DH</h2>
<p>Last Updated <?=date('d M Y', strtotime($ver->modified))?></p>
<p><i>Software Version 1.0</i> - July 2014</p>
<p>Developed by: <b>Jeremy Voros, MD</b></p>
<p>Conceptual assistance by: <b>Dave Bosch, DO</b></p>
<p>Painstaking data entry by: <b>Heather Young, MD</b></p>
<p>Institutional support from: Jeffery Sankoff, MD, Michelle Haas, MD, Tim Jenkins, MD</p>
<p>Questions? Email: <b><a href="mailto:[email protected]">[email protected]</a></b></p>
<div data-role="collapsible">
<h3>Denver Health Legal Disclaimer</h3>
<p>Antibiotic Stewardship Application - DISCLAIMER - December 31, 2013</p>
<p>This Antibiotic Stewardship Application ("Application") has been created for the Denver Health and Hospital Authority ("Denver Health") and is intended for informational purposes only. Although Denver Health attempts to keep this information as accurate as possible, Denver Health makes no guarantees or warranties of any kind, express or implied, with respect to the use of this Application.</p>
<p>This Application is not intended to be, nor should it be used as a substitute for, the professional medical advice or analysis required when prescribing an antibiotic for a Denver Health patient or any patient outside of Denver Health. Use of this Application is not intended to, nor does it create, a physician-patient or healthcare provider-patient relationship between Denver Health and the user or the user's patient. Application users assume full responsibility for any actions taken on the basis of the information obtained from use of the Application and agree that Denver Health bears no responsibility for any claim, loss or damage caused by or related to its use.</p>
<p>Since Denver Health has no legal obligation to update the information provided on this Application, Denver Health cannot ensure that all information reflects the most up-to-date information regarding prescribing antibiotics. Denver Health may make changes or improvements to this Application at any time without notice or announcement. Application users outside of Denver Health should consult their local facility policies and procedures regarding antibiotic use.</p>
<p>If you have any questions about this disclaimer or any other information contained in this Application, you can contact Denver Health Infectious Disease Department.</p>
</div>
</div>
</div>
<!-- END ABOUT-->
<script type="text/javascript">
</script>
</body>
</html>