package com.jasamedika.medifirst2000.service.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;

import com.jasamedika.medifirst2000.entities.RIS_Order;
import com.jasamedika.medifirst2000.service.impl.RIS_OrderServiceImpl;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath*:com/jasamedika/**/applicationContext.xml")
public class AgamaServiceImplTest {
	
	@Autowired
	private RIS_OrderServiceImpl agamaService;
	
	@Test
	@Transactional
	public void testAdd() {
		RIS_Order order = new RIS_Order(); 
		order.setORDER_KEY(1);
		order.setCREATE_DATE("");
		order.setFLAG("");
		order.setPATIENT_ID("");
		order.setPATIENT_NAME("");
		order.setPATIENT_UID("");
		order.setLAST_NAME("");
		order.setFIRST_NAME("");
		order.setMIDDLE_NAME("");
		order.setAETITLE("");
		order.setSTUDY_RESERV_DATE("");
		order.setORDER_MODALITY("");
		order.setACCESSION_NUM("");
		order.setORDER_STATUS("");
		order.setORDER_CODE("");
		order.setORDER_NAME("");
		order.setORDER_REASON("");
		order.setSTUDY_REMARK("");
		order.setORDER_BODYPART("");
		order.setCHARGE_DOC_ID("");
		order.setCHARGE_DOC_NAME("");
		order.setCONSULT_DOC_ID("");
		order.setCONSULT_DOC_NAME("");
		order.setORDER_DEPT("");
		order.setORDER_DATE("");
		order.setORDER_NO("");
		order.setPATIENT_IO("");
		order.setPATIENT_WARD("");
		order.setIO_DATE("");
		order.setPATIENT_BIRTH_DATE("");
		order.setPATIENT_SEX("l");
		order.setORDER_DIAG("");
		order.setPATIENT_BLOOD("");
		order.setORDER_CNT(0);
		order.setGROUP1("");
		order.setGROUP2("");
		order.setGROUP3("");
		order.setORDER_COMMENT("");
		order.setEXTENSION1("");
		order.setEXTENSION2("");
		order.setEXTENSION3("");
		order.setEXTENSION4("");
		order.setEXTENSION5("");
		order.setEXTENSION6("");
		order.setEXTENSION7("");
		order.setEXTENSION8("");
		order.setEXTENSION9("");
		order.setEXTENSION10("");
		agamaService.save(order);
	}
}
