anchor.diff:  				searchStr1 += "(0) rank, ";
   			}
   
  -			out.println(searchStr1);		
  -			out.println("<br>"+searchStr2);
  +			//out.println(searchStr1);		
  +			//out.println("<br>"+searchStr2);
  +			
  +			if (request.getParameter("order")!= null) {
  +				searchStr3 = " order by test_date, rank";
  +			}
   
   			if (hasKeyword || hasDate) {
   				//TODO: need to do some sort of security check
   				
   				doSearch = m_con.createStatement();
  -    			ResultSet rset2 = doSearch.executeQuery(searchStr1 + searchStr2 + " order by rank desc");
  +    			ResultSet rset2 = doSearch.executeQuery(searchStr1 + searchStr2 + searchStr3);
   				out.println("<table border=1>");
   				out.println("<tr>");
   				out.println("<th>Patient Name</th>");
  
positive.code: 			//default search string
  			String searchStr1 = "SELECT ";
  			String searchStr2 = "diagnosis, description, (first_name || ' ' || last_name) patient_name, test_date, record_id FROM radiology_record join persons on person_id = patient_id WHERE ";
            	
  			if(!((startdate = request.getParameter("startdate")).equals(""))) {
  		  		out.println("<br>");
  
negative.code: 					<input type=text name=enddate>
  				</td>
  			</tr>
  			<tr>
  				<td>Order by date?</td>
  				<td>
  					<input type="checkbox" name="order" value="Y">
  				</td>
  			</tr>	
  			<td>
  				<input type=submit value="Search" name="search">
  			</td>
  