package com.jasamedika.medifirst2000.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.jasamedika.medifirst2000.entities.AsuhanKeperawatanPeriOperasiHeader;

@Repository("IntraOperasiPerawatBedahDao")
public interface IntraOperasiPerawatBedahDao extends PagingAndSortingRepository<AsuhanKeperawatanPeriOperasiHeader, String>{
	@Query("select count(a.noTrans) from "
			+ " AsuhanKeperawatanPeriOperasiHeader a where a.noTrans like %:kode%")
	Long countNoTrans(@Param("kode") String kode);
	
	@Query("select a.noTrans from AsuhanKeperawatanPeriOperasiHeader a "
			+ " where a.noTrans like %:kode% order by a.noTrans asc")
	List<String> noTrans(@Param("kode") String kode);
}
