53 lines
1.6 KiB
Java
53 lines
1.6 KiB
Java
package com.jasamedika.medifirst2000.dao;
|
|
|
|
import java.util.Map;
|
|
|
|
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.PapStatusFungsional;
|
|
|
|
@Repository("PapStatusFungsionalDao")
|
|
public interface PapStatusFungsionalDao extends PagingAndSortingRepository<PapStatusFungsional, String> {
|
|
|
|
@Query("select NEW Map ("
|
|
+ "a.noRec as noRec,"
|
|
+ "b.noRec as noRegistrasi,"
|
|
+ "c.id as statuSFungsionalId,"
|
|
+ "d.id as pernahJatuhId,"
|
|
+ "e.id as menggunakanAlatBantuId) "
|
|
+ "from PapStatusFungsional a "
|
|
+ "left join a.antrianPasienDiPeriksa b "
|
|
+ "left join a.statusFungsional c "
|
|
+ "left join a.pernahJatuh d "
|
|
+ "left join a.menggunakanAlatBantu e "
|
|
+ "where b.noRec=:noRec")
|
|
Map<String, Object> getPapStatusFungsional(
|
|
@Param("noRec") String noRec);
|
|
|
|
@Query("select NEW Map ("
|
|
+ "a.noRec as noRec) "
|
|
+ "from AntrianPasienDiPeriksa a "
|
|
+ "where a.noRec=:noRec")
|
|
Map<String, Object> getNoRegistrasi(
|
|
@Param("noRec") String noRec);
|
|
|
|
@Query("select NEW Map ("
|
|
+ "a.id as id, "
|
|
+ "a.name as name) "
|
|
+ "from StatusFungsional a "
|
|
+ "where a.id=:id")
|
|
Map<String, Object> getStatusFungsional(
|
|
@Param("id") Integer id);
|
|
|
|
@Query("select NEW Map ("
|
|
+ "a.id as id, "
|
|
+ "a.name as name) "
|
|
+ "from StatusYaTidak a "
|
|
+ "where a.id=:id")
|
|
Map<String, Object> getStatusYaTidak(
|
|
@Param("id") Integer id);
|
|
}
|