33 lines
1.5 KiB
Java
33 lines
1.5 KiB
Java
package com.jasamedika.medifirst2000.dao;
|
|
|
|
import java.util.Date;
|
|
|
|
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.PapTandaVital;
|
|
|
|
|
|
@Repository("PapTandaVitalDao")
|
|
public interface PapTandaVitalDao extends PagingAndSortingRepository<PapTandaVital, String> {
|
|
@Query("select model from PapTandaVital model where model.pasienDaftar.pasienDaftar.pasien.noCm=:noCm and model.tglInput=:tglInput")
|
|
public PapTandaVital findPapTandaVitalByNoCmAndTglInput(@Param("noCm") String noCm,@Param("tglInput") Date tglInput);
|
|
|
|
@Query("select model from PapTandaVital model where model.pasienDaftar.noRec=:noRec")
|
|
public PapTandaVital findByNoRec(@Param("noRec") String noRec);
|
|
|
|
@Query("select model from PapTandaVital model where model.pasienDaftar.noRec=:noRec and model.tglInput=:tglInput")
|
|
public PapTandaVital findByNoRecAndTglInput(@Param("noRec") String noRec,@Param("tglInput") Date tglInput);
|
|
|
|
/*@Query("select a.kesadaran.name, a.rasiOksigen, a.gcs from PapTandaVital a where a.pasienDaftar.pasienDaftar.pasien.noCm=:noCm")
|
|
public List<Object[]> findByNoCm(@Param("noCm") String noCm);*/
|
|
|
|
@Query("select b.noRec "
|
|
+ "from PapTandaVital a "
|
|
+ "left join a.pasienDaftar b "
|
|
+ "where b.noRec=:noRec")
|
|
String checkNoreg(@Param("noRec") String noRec);
|
|
}
|