package gov.va.med.pharmacy.persistence.report;

import java.sql.Date;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope("session")
public class SummaryReportFilter {

	// names should be same as those in the javascript.

	private Date dateTo;
	
	private Date dateFrom;
	
	private String visn;
	
	private String stationId;
	
	//TODO: Timezone offset - need to determine and calculate this it can change EST/EDT
	private int offset = 5;


	public Date getDateTo() {
		
		if (dateTo != null){
		dateTo.setTime(dateTo.getTime() + (offset*60)*(60*1000));
		
		}
		return dateTo;
	}

	public void setDateTo(Date dateTo) {
		this.dateTo = dateTo;
	}

	public Date getDateFrom() {
		
		return dateFrom;
	}

	public void setDateFrom(Date dateFrom) {
		this.dateFrom = dateFrom;
	}

	public String getVisn() {
		return visn;
	}

	public void setVisn(String visn) {
		this.visn = visn;
	}

	public String getStationId() {
		return stationId;
	}

	public void setStationId(String stationId) {
		this.stationId = stationId;
	}
	
}
