package gov.va.vinci.dart.rule;

import gov.va.vinci.dart.biz.DataSource;
import gov.va.vinci.dart.biz.DocumentTemplate;
import gov.va.vinci.dart.biz.Participant;
import gov.va.vinci.dart.biz.Request;

//OperationalRequest Vital Status documents
public class OVSDocumentRuleEvaluator extends OperationalDocumentRuleEvaluator {

	@Override
	public boolean isRequired(final Request req, final DataSource ds, final DocumentTemplate temp, final Participant participant, final boolean isIndependentOnly) {
		
//As of 3/23/2015, VA Form 9957 is no longer required for any NDS data source (probably true for Operations also -- need to verify once Operations is turned back on)		
//		// VA Form 9957 is required of all participants whose data access is true
//		if (participant.getPrincipalInvestigator().booleanValue() == true || participant.getDataAccess().booleanValue() == true) {
//			if (temp.getName().startsWith("VA Form 9957") ) {
//				return true;
//			}
//		}

		
		// CDW Justification Memo is required of all participants
		if (temp.getName().startsWith("CDW Justification Memo")) {
			return true;
		}

		
//As of 3/1, they don't want to require the Data Access Agreement for Operations		
//		// VHA Privacy Data Access Agreement is required of all participants
//		if (temp.getName().startsWith("VHA Privacy Data Access Agreement")) {
//			return true;
//		}

		
		if (temp.getName().startsWith("Vital Status Rules of Behavior")) {
			return true;
		}

		
		return false;
	}
}
