public int AddTherapy(string date, string objetive, string description, string patient_id, string therapy_id) { TherapySession therapySession = new TherapySession(); TherapySessionDAO therapySessionDao = new TherapySessionDAO(); therapySession.Date = date; therapySession.Objective = objetive; therapySession.Description = description; therapySession.Patient_id = patient_id; therapySession.Therapist_id = therapy_id; //game.Level(); int result = therapySessionDao.InsertTherapySessions(therapySession); if (result == -1) { return(result); } else { Debug.Log("error"); } return(0); }
public void saveLastGameSession() { if (therapyId == "") { therapyId = TherapySessionDAO.GetLastTherapyId(patient.Id_num).ToString(); } GameSessionDAO.InsertGameSession(gameSessionList [gameSessionList.Count - 1], therapyId); currentGameSessionId = GameSessionDAO.GetLastGameSessionId(therapyId); }
public void Login() { GameObject input = GameObject.Find("Input ID Text"); string id = input.GetComponent <Text>().text; patient = PatientDAO.ConsultPatient(id); therapist = TherapistDAO.ConsultTherapist("123"); if (patient != null && therapist != null) { therapySession = new TherapySession(therapist.Id_num, patient.Id_num); bool insertion = TherapySessionDAO.InsertTherapySession(therapySession); } }
public void SaveObservations(string observations) { therapySession.Description = observations; if (therapyId == "") { therapyId = TherapySessionDAO.GetLastTherapyId(patient.Id_num).ToString(); } if (TherapySessionDAO.insertObservations(therapyId, therapySession.Description)) { Debug.Log("Observations successfully saved"); } else { Debug.Log("Observations not saved"); } }