package com.agilex.healthcare.schedulingmanager.datalayer;

import javax.annotation.Resource;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.agilex.healthcare.schedulingmanager.datalayer.vista.util.AuthenticationUtil;
import com.agilex.healthcare.schedulingmanager.mdws.connection.MdwsConfiguration;

@ContextConfiguration(locations = {"classpath:integrationApplicationContext.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
public class SchedulingClinicsDataLayerMdwsVistaTest {
	
	@Resource
	MdwsConfiguration mdwsSchedulingConfiguration;

	@BeforeClass
	public static void login() {
		AuthenticationUtil.loginUser("777", "clerk3434", "clerk4343$", "1");
	}
	@AfterClass
	public static void logoff() {
		AuthenticationUtil.logoffUser();
	}

	@Ignore
	public void getPatientWaitListNear() {
		/*SchedulingClinicsDataLayerMdws dl = new SchedulingClinicsDataLayerMdws(mdwsSchedulingConfiguration);
		Patients patients = dl.getPatientsByClinic("777", "17", "20140103.000000", "20140103.235959");
		assertNotNull(patients);
		assertEquals(1, patients.size());
		
		Patient one = patients.get(0);
		assertNull(one.getAdmittedDateTime());
		assertEquals("0", one.getAge());
		assertNull(one.getCwad());
		assertNull(one.getDateOfBirth());
		assertEquals("BCMA,EIGHT", one.getDisplayName());
		assertNull(one.getEnterpriseId());
		assertEquals("EIGHT", one.getFirstName());
		assertNull(one.getGender());
		assertNull(one.getIcn());
		assertFalse(one.isInpatient());
		assertEquals("BCMA", one.getLastName());
		assertNull(one.getLocationIEN());
		assertNull(one.getMiddleInitial());
		assertNull(one.getMiddleName());
		TestUtil.assertPatientIdentifier(one.getPatientIdentifier(), "dfn-777", "100022");
		assertNull(one.getRoombed());
		assertFalse(one.isSensitive());
		assertFalse(one.isServiceConnected());
		assertNull(one.getServiceConnectedPercent());
		assertEquals("", one.getSsn());
		assertFalse(one.isTextMessagingAllowed());
		assertNull(one.getTextMessagingPhoneNumber());
		assertNull(one.getWardLocation());*/
	}
}
