/*package com.jasamedika.medifirst2000.controller;

import java.awt.Rectangle;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.validation.Valid;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.orm.jpa.JpaSystemException;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.util.UriComponentsBuilder;

import com.jasamedika.medifirst2000.constants.Constants;
import com.jasamedika.medifirst2000.controller.base.IBaseRestController;
import com.jasamedika.medifirst2000.controller.base.LocaleController;
import com.jasamedika.medifirst2000.entities.AgamaM;
import com.jasamedika.medifirst2000.entities.Pasien;
import com.jasamedika.medifirst2000.entities.PasienDaftar;
import com.jasamedika.medifirst2000.entities.PurchasedTest;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.ModelService;
import com.jasamedika.medifirst2000.service.PasienDaftarService;
import com.jasamedika.medifirst2000.service.PasienService;
import com.jasamedika.medifirst2000.service.TestService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.ModelVO;
import com.jasamedika.medifirst2000.vo.PasienDaftarVO;
import com.jasamedika.medifirst2000.vo.ModelVO;
import com.jasamedika.medifirst2000.vo.PasienVO;

*//**
 * Controller class for Pasien Business
 * 
 * @author Roberto
 *//*
@RestController
@RequestMapping("/pasien-daftar")
public class PasienDaftarController extends LocaleController<PasienDaftarVO>
		implements IBaseRestController<PasienDaftarVO> {
	@Autowired
	private PasienService pasienService;

	@Autowired
	private PasienDaftarService pasienDaftarService;

	private static final Logger LOGGER = LoggerFactory.getLogger(PasienDaftarController.class);

	@RequestMapping(value = "/baru-pasien-daftar", method = RequestMethod.GET)
	public ResponseEntity<PasienDaftarVO> baruPasienDaftar() {
		System.out.println("Controller : baruPasienDaftar");
		PasienDaftarVO pasienDaftarVO = pasienDaftarService.baru();
		addHeaderMessage(Constants.MessageInfo.INFO_MESSAGE, "DATA BERHASIL DISIMPAN");
		return RestUtil.getJsonResponse(pasienDaftarVO, HttpStatus.OK);

	}

	@RequestMapping(value = "/list-pasien-daftar", method = RequestMethod.GET)
	public ResponseEntity<List<PasienDaftarVO>> listPasienDaftar() {
		List<PasienDaftarVO> listPasienDaftarVO = pasienDaftarService.findAll();
		addHeaderMessage(Constants.MessageInfo.INFO_MESSAGE, "DATA BERHASIL DISIMPAN");
		return RestUtil.getJsonResponse(listPasienDaftarVO, HttpStatus.OK, mapHeaderMessage);

	}

	@RequestMapping(value = "/save-pasien-daftar", method = RequestMethod.POST)
	public ResponseEntity<String> addVO(@Valid @RequestBody PasienDaftarVO vo) {
		try {
			PasienDaftarVO result = pasienDaftarService.add(vo);

			if (null != result)
				addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "");
			RestUtil.getJsonHttptatus(HttpStatus.CREATED);
			return RestUtil.getJsonResponse("SAVE SUKSESSSSSSSSSSSSSSS", HttpStatus.CREATED);

		} catch (ServiceVOException e) {
			LOGGER.error("Got exception {} when add Pasien", e.getMessage());
			addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
			return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
		} catch (JpaSystemException jse) {
			LOGGER.error("Got exception {} when add Pasien", jse.getMessage());
			addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
			return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
		}

	}

	public ResponseEntity<String> editVO(@Valid @RequestBody PasienDaftarVO vo) {

		try {
			PasienDaftarVO result = pasienDaftarService.update(vo);

			if (null != result)
				return RestUtil.getJsonResponse(vo.getNoCM().toString(), HttpStatus.OK);
		} catch (ServiceVOException e) {
			LOGGER.error("Got exception {} when update Pasien", e.getMessage());
			addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
			return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
		} catch (JpaSystemException jse) {
			LOGGER.error("Got exception {} when update Pasien", jse.getMessage());
			addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
			return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage);
		}

		return RestUtil.getJsonHttptatus(HttpStatus.NOT_ACCEPTABLE);
	}

	public ResponseEntity<PasienDaftarVO> getVO(@PathVariable("id") String id) {
		// PasienVO pasienVO = pasienService.findById(id);

		// return RestUtil.getJsonResponse(pasienVO, HttpStatus.OK);
		return null;
	}

	public ResponseEntity<Collection<PasienDaftarVO>> getAllVOWithQueryString(Integer page, Integer limit, String sort,
			String dir) {
		return null;
	}

	@Override
	protected List<PasienDaftarVO> getAllVOFromService() {
		return pasienDaftarService.findAll();
	}

	@Override
	public ResponseEntity<String> deleteVO(Integer id) {
		return null;
	}

	@Override
	public ResponseEntity<Collection<PasienDaftarVO>> getAllVO() {
		return null;
	}

}
*/