package com.jasamedika.medifirst2000.dao;

import java.util.List;

import org.springframework.data.domain.Pageable;
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.Diagnosa;

@Repository("DiagnosaDao")
public interface DiagnosaDao extends PagingAndSortingRepository<Diagnosa, Integer>{
	
	@Query("select diagnosa from Diagnosa diagnosa where diagnosa.kdDiagnosa like :kdDiagnosa and  diagnosa.statusEnabled=true")
	List<Diagnosa> findDiagnosaByKode(@Param("kdDiagnosa") String kdDiagnosa, Pageable page);

}
