anchor.diff:  
   		//both entered
   		if (kWord != "" && kTime1 != "" && kTime2 != "") {
  +		sql = sql + ", ";
  +		String[] wordList = kWord.split(" ");
  +		int count_score = 0;
  +		for (int i = 0; i < wordList.length; i++) {
  +			sql = sql + "6*score("+ Integer.toString(count_score+3) +")+6*score("+ Integer.toString(count_score+4) +")+3*score("+ Integer.toString(count_score+1) +")+score("+ Integer.toString(count_score+2)+") ";
  +							
  +			if (i != wordList.length - 1)
  +				sql = sql + "+ ";
  +		}
  +		sql = sql + "as rank ";
  +
  +		sql = sql + "from radiology_record r FULL JOIN persons p ON r.patient_id = p.person_id where ";
  +
   			out.println("Records for keyword(s): " + kWord
   					+ " between dates " + kTime1 + " and " + kTime2);
  -			String[] wordList = kWord.split(" ");
  +			//String[] wordList = kWord.split(" ");
   
   			sql = sql + "r.test_date between to_date('" + kTime1
   					+ "', 'DD/MM/YYYY') AND to_date('" + kTime2
   					+ "', 'DD/MM/YYYY') AND ";
   
  +			int count_contains = 0;
   			for (int i = 0; i < wordList.length; i++) {
   				sql = sql + class_id + "r.DIAGNOSIS ='" + wordList[i]
   						+ "' or p.LAST_NAME = '" + wordList[i]
  
positive.code: 		out.println("<H1>Search</H1>");
  
  		/*TODO: need to add into SQL how to get images of record*/
  		String sql = "select r.*, p.first_name, p.last_name from radiology_record r FULL JOIN persons p ON r.patient_id = p.person_id where ";
  		// Test sql for images:
  		// String sql = "select r.*, p.first_name, p.last_name, pi.image_id from radiology_record r FULL JOIN persons p ON r.patient_id = p.person_id FULL JOIN pacs_images pi ON pi.record_id = r.record_id where ";
  
  
negative.code: 				&& !kTime2.equals("")) {
  			out.println("Records of time period between " + kTime1
  					+ " and " + kTime2);
  
  			sql = sql + "from radiology_record r FULL JOIN persons p ON r.patient_id = p.person_id where ";
  
  			sql = sql + class_id + "r.test_date between to_date('" + kTime1
  					+ "', 'DD/MM/YYYY') AND to_date('" + kTime2
  					+ "', 'DD/MM/YYYY') ORDER BY " + SQLOrder;
  