/* Returns the latest evaluation for a patient, only with the date and the final score */ public Evaluation getMinimizedLatestEvaluation(String patientUUID) { SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.query( TABLE_EVALUATIONS, new String[] {KEY_EVALUATION_DATE, KEY_EVALUATION_SCORE}, FK_PATIENT + "=?", new String[] {patientUUID}, null, null, null, null); Evaluation evaluation = null; if (cursor != null && cursor.moveToLast()) { evaluation = new Evaluation(); evaluation.setDate(cursor.getString(0)); evaluation.setScore(cursor.getInt(1)); } db.close(); return evaluation; }