sessao.setObservacoes(txtObs.getText());
sessao.setData(new Date(new java.util.Date().getTime()));
dbc.InsertSessao(sessao, sessao.getPacienteID());
Medicao medicao;
StickmanText stickTemp = null;
if( stickman1 instanceof StickmanText ){
stickTemp = (StickmanText) stickman1;
} else {
stickTemp = (StickmanText) stickman2;
}
if (stickTemp != null){
for (Entry<String, dadosDeAngulo> i : (stickTemp).getData().entrySet() ){
if (i.getValue().inicializado){
medicao = new Medicao();
medicao.setNome(i.getKey() + "max");
medicao.setValor(i.getValue().valorMaximo);
dbc.InsertMedicao(medicao, sessao.getID());
medicao = new Medicao();
medicao.setNome(i.getKey() + "min");
medicao.setValor(i.getValue().valorMinimo);
dbc.InsertMedicao(medicao, sessao.getID());
medicao = new Medicao();
medicao.setNome(i.getKey() + "avg");
medicao.setValor(1.0*i.getValue().valorSoma / i.getValue().valorN);
dbc.InsertMedicao(medicao, sessao.getID());
}
}
// Persistência dos alarmes