package com.jasamedika.medifirst2000.controller;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.jasamedika.medifirst2000.controller.base.LocaleController;
import com.jasamedika.medifirst2000.service.StrukOrderService;

@RestController
@RequestMapping("/permintaan-penunjang")
public class PermintaanPenunjangController extends LocaleController{

	@Autowired
	private StrukOrderService strukOrderService;
	
	private static final Logger LOGGER = LoggerFactory.getLogger(PermintaanPenunjangController.class);
	
	@RequestMapping(value = "/find-permintaan-penunjang")
	@ResponseBody
	public List<Map<String, Object>> loadPengkajianAwal(
			@RequestParam(value = "dateStart", required = false) String dateStart, 
			@RequestParam(value = "dateEnd", required = false) String dateEnd,
			@RequestParam(value = "id", required = false) Integer id,
			@RequestParam(value = "noRegistrasi", required = false) String noRegistrasi) {
		return strukOrderService.HistoryPenunjang(dateStart, dateEnd, id, noRegistrasi);	
	}
	
}
