Created
February 24, 2014 19:31
-
-
Save timothyclemans/9195283 to your computer and use it in GitHub Desktop.
[wearscript]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700' rel='stylesheet' type='text/css'> | |
<style> | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td, | |
article, aside, canvas, details, embed, | |
figure, figcaption, footer, header, hgroup, | |
menu, nav, output, ruby, section, summary, | |
time, mark, audio, video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
font-size: 100%; | |
font: inherit; | |
vertical-align: baseline; | |
} | |
/* HTML5 display-role reset for older browsers */ | |
article, aside, details, figcaption, figure, | |
footer, header, hgroup, menu, nav, section { | |
display: block; | |
} | |
body { | |
line-height: 1; | |
background:#000; | |
color:#FFF; | |
font:20px Roboto; | |
font-weight:100; | |
padding:40px; | |
} | |
strong, * > strong { | |
font-weight:300; | |
} | |
#header { | |
border-bottom:1px solid #FFF; | |
margin-bottom:10px; | |
} | |
h1 { | |
font-size:40px; | |
text-transform:capitalize; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Patient</h1> | |
<!--<p id="header"><strong>Continuous Note Taker:</strong> To take a note tap the touchpad. To save notes and exit tap the touchpad and say "exit".</p>--> | |
<p id="main"></p> | |
<script> | |
var current = 0; | |
var sections = ['patient', 'subjective', 'objective', 'assesment', 'plan', 'narrative', 'save']; | |
var notes = {'patient': '', 'subjective': '', 'objective': '', 'assesment': '', 'plan': '', 'narrative': ''}; | |
var ok = true; | |
function takeNote(data) { | |
notes[sections[current]] += ' '+data; | |
$('#main').text(notes[sections[current]]); | |
} | |
function onGesture(name) { | |
if (name == 'TAP') { | |
if (sections[current] == 'save') { | |
WS.say('saved'); | |
} else { | |
WS.speechRecognize('Say your note', 'takeNote'); | |
} | |
} else if (name == 'SWIPE_RIGHT') { | |
if (current == 6) { | |
current = 0; | |
} else { | |
current += 1; | |
} | |
$('h1').text(sections[current]); | |
$('#main').text(notes[sections[current]]); | |
} else if (name == 'SWIPE_LEFT') { | |
if (current == 0) { | |
current = 6; | |
} else { | |
current -= 1; | |
} | |
$('h1').text(sections[current]); | |
$('#main').text(notes[sections[current]]); | |
} | |
} | |
function getAuthKey(data) { | |
oauth_token = data; | |
} | |
function server() { | |
WS.dataLog(false, true, .15); | |
} | |
$(function() { | |
WS.activityCreate(); | |
//WS.qr('getAuthKey'); | |
WS.liveCardCreate(false, .2); | |
setInterval(function () { WS.wake(); }, 10000); | |
WS.gestureCallback('onGesture', 'onGesture'); | |
WS.serverConnect('{{WSUrl}}', 'server'); | |
}); | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment