24 lines
1.1 KiB
Java
24 lines
1.1 KiB
Java
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.MasalahKeperawatanDetail;
|
|
|
|
/**
|
|
* @author Shakato
|
|
*/
|
|
@Repository("MasalahKeperawatanDetailDao")
|
|
public interface MasalahKeperawatanDetailDao extends PagingAndSortingRepository<MasalahKeperawatanDetail, String> {
|
|
@Query("select p from MasalahKeperawatanDetail p where p.masalahKeperawatan.noRec=:noRec")
|
|
List<MasalahKeperawatanDetail> findByMasalahKeperawatan(@Param("noRec")String noRec);
|
|
|
|
@Query("select to_char(a.tanggalDitemukan,'yyyy-MM-dd'), a.dataMasalahKeperawatan, to_char(a.tanggalTeratasi,'yyyy-MM-dd') from MasalahKeperawatanDetail a, MasalahKeperawatan b where a.pasienDaftar.pasienDaftar.pasien.noCm=:noCm and to_char(b.tglInput,'yyyy-MM-dd')=:tglInput")
|
|
List<Object[]> findByNocmAndTglInput(@Param("noCm")String noCm,@Param("tglInput") String tglInput);
|
|
|
|
}
|