Exemplo n.º 1
0
def doctor_patient(doctorId,patientId):
        u = UserDispatcher()
        _doctor = u.get(doctorId,False)
        _cpatient = u.get(patientId,False)
	_d = Data(patientId)
	_hm_hr,_hm_eda,_hm_temp  = _d.getHeatMapSessions(True)
	return render_template("doctor_patient.html",_hm_hr = _hm_hr,_hm_eda=_hm_eda,_hm_temp= _hm_temp, _patientID = patientId, _doctor = _doctor,_cpatient = _cpatient)
Exemplo n.º 2
0
def doctor(doctorId):
	_userId = 1
        u = UserDispatcher()
        _doctor = u.get(doctorId,False)
	_d = Data(_userId)
	_hm_hr,_hm_eda,_hm_temp  = _d.getHeatMapSessions(True)
	return render_template("doctor.html",_hm_hr = _hm_hr,_hm_eda=_hm_eda,_hm_temp= _hm_temp, _patientID = _userId, _doctor = _doctor)
Exemplo n.º 3
0
def userSession(_userId,_sessionId):
	u = UserDispatcher()
	_user = u.get(_userId,False)
	_d = Data(_userId)
	_sessionEDA = getData(_userId,_sessionId,"EDA",_json=False)
	try:
		_sessionHR = getData(_userId,_sessionId,"HR",_json=False)
		_sHR = _sessionHR["session"]["data"]["HR"]
	except:
		_sHR = []
	try:
		_sessionTEMP = getData(_userId,_sessionId,"TEMP",_json=False)
		_sTEMP =  _sessionTEMP["session"]["data"]["TEMP"]
	except:
		_sTEMP = []
	_sEDA =  _sessionEDA["session"]["data"]["EDA"]
	return render_template("sessionData.html",user = _user,_sessionHR = _sHR,_sessionEDA = _sEDA,_sessionTEMP = _sTEMP,_metadata = _sessionEDA["session"]["metadata"],_session = Session("data/"+_sessionId).getMetaDataOnly())
Exemplo n.º 4
0
def userSessions(_userId):
	_d = Data(_userId)
	_sessions = _d.getSessions(False)
	u = UserDispatcher()
	_user = u.get(_userId,False)
	return render_template("userFeed.html",user = _user,sessions = _sessions)
Exemplo n.º 5
0
def users(_userId):
	u = UserDispatcher()
	return u.get(_userId)