package com.jasamedika.medifirst2000.dao;

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.PasienInstruksiPerjanjianT;

/**
 * Repository class for PasienInstruksiPerjanjian
 * 
 * @author adik
 */
@Repository("PasienInstruksiDao")
public interface PasienInstruksiDao extends PagingAndSortingRepository<PasienInstruksiPerjanjianT, String> {
	
	
	@Query("select model "+
			"from PasienInstruksiPerjanjianT model "+
			"left join model.pasien pasien "+
			"where pasien.id=:pasienId ")
	PasienInstruksiPerjanjianT findPapInstruksiPerjanjianByNoCm(@Param("pasienId") Integer pasienId);
	
}
