/******************************************************************************
 * IGodsDBWrapper.cs 
 * 
 * <Copyright and License> 
 * 
 * This file is part of GODS, a package for annotating medical images. 
 * 
 * Copyright (C) 2004 
 * Xuedong Chen 
 * Heri Mariwa 
 * Kimmy (Hsiang-ling) Lin 
 * Rui Yu 
 * 
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation; either version 2 
 * of the License, or (at your option) any later version. 
 * 
 * This program is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * GNU General Public License for more details. 
 * 
 * You should have received a copy of the GNU General Public License 
 * along with this program; if not, write to the Free Software 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
 *  
 * For further questions about this file, please send email to 
 * gods@cs.umb.edu or visit us at http://gods.sourceforge.net.  
 ******************************************************************************/

using System;

namespace GODS.DBHandler
{
	/// <summary>
	/// Summary description for IGodsDBWrapper.
	/// </summary>
	public interface IGodsDBWrapper
	{
		/// <summary>
		/// Get all rows with the specified mrn from image table
		/// </summary>
		ImageData[] getImgData(string mrn);

		ImageData getImgDataByDate(string mrn, DateTime appDate);

		/// <summary>
		/// Get all mrns from image table
		/// </summary>
		string[] getAllMrn();

		/// <summary>
		/// get the latest image that is getting edited
		/// In general the latest image means the one with largest imageID
		/// Todo: It it is possible to use the date as the only criteria then we use
		/// date field. 
		/// </summary>
		/// <param name="mrn"></param>
		/// <returns></returns>
		ImageData getLatestImgData(string mrn);

		/// <summary>
		/// get existing max Image ID for insert new image
		/// return 0 means no image yet. Normally image id starts from 1
		/// </summary>
		int getMaxImgID();

		/// <summary>
		/// update a row in image table
		/// </summary>
		void insertImgTB(ImageData imgData);

		/// <summary>
		/// update a row in image table
		/// </summary>
		void updateImgTB(ImageData imgData);

		/// <summary>
		/// get all marks for an image
		/// </summary>		
		ImageMarkData[] getImageMarks(int imgId);

		/// <summary>
		/// insert a mark for an image
		/// </summary>		
		void insertMark(ImageMarkData imgMarkData);

		/// <summary>
		/// delete all marks for an image
		/// </summary>	
		void deleteMarks(int imageID);
		/// <summary>
		/// Get all rows with the specified mrn from PatientInfo table
		/// </summary>
		/*PatientInfoData[] getPatientInfoData(int mrn);*/

		void finalizeRecord(int imageID);
	}
}
