118 lines
5.9 KiB
Java
118 lines
5.9 KiB
Java
package com.jasamedika.medifirst2000.dao;
|
|
|
|
import java.util.List;
|
|
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.AsuhanKeperawatanPeriOperatif;
|
|
|
|
@Repository("LapPembedahanDanInstruksiPascaBedahDao")
|
|
public interface LapPembedahanDanInstruksiPascaBedahDao extends PagingAndSortingRepository<AsuhanKeperawatanPeriOperatif, String>{
|
|
//show data lap pembedahaan header
|
|
@Query("select new map(a.id as id, a.namaExternal as namaExternal) " +
|
|
" from AsuhanKeperawatanPeriOperatif a " +
|
|
" where a.flagHeader in('Laporan Pembedahaan')")
|
|
List<Map<String, Object>> getLapPembedahanHeader();
|
|
|
|
//@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
|
|
// " where a.idParent in(257)")
|
|
//show data lap pembedahaan deteil
|
|
@Query("select new map(a.id as id, a.namaExternal as namaExternal) " +
|
|
" from AsuhanKeperawatanPeriOperatif a " +
|
|
" where a.idParent in(257) and a.idParent=:id")
|
|
List<Map<String, Object>> getLapPembedahanDetail(@Param("id") int id);
|
|
|
|
//show data instruksi pasca bedah header
|
|
@Query("select new map(a.id as id, a.namaExternal as namaExternal) " +
|
|
" from AsuhanKeperawatanPeriOperatif a " +
|
|
" where a.flagHeader in('Instruksi Pasca Bedah')")
|
|
List<Map<String, Object>> getInstruksiPascaBedahHeader();
|
|
|
|
//show data instruksi pasca bedah deteil
|
|
@Query("select new map(a.id as id, a.namaExternal as namaExternal) " +
|
|
" from AsuhanKeperawatanPeriOperatif a " +
|
|
" where a.idParent in(262,269) and a.idParent=:id")
|
|
List<Map<String, Object>> getInstruksiPascaBedahDetail(@Param("id") int id);
|
|
|
|
@Query("select new map(a.noTrans as noTrans, " +
|
|
" a.tindakan as tindakan, a.noRec as noRec, " +
|
|
" a.diagnosaPostOperasi as diagnosaPostOperasi, " +
|
|
" a.operasiMulai as operasiMulai, a.operasiSelesai as operasiSelesai, " +
|
|
" a.jamMasukOperasi as jamMasukOperasi, a.tanggal as tanggal, " +
|
|
" a.jam as jam, dokterBedah.id as idDokterBedah, " +
|
|
" dokterBedah.namaLengkap as nameDokterBedah, " +
|
|
" asistenBedah.id as idAsistenBedah, " +
|
|
" asistenBedah.namaLengkap as nameAsistenBedah, " +
|
|
" perawatInstrumen1.id as idPerawatInstrumen1, " +
|
|
" perawatInstrumen1.namaLengkap as namePerawatInstrumen1, " +
|
|
" perawatInstrument2.id as idPerawatInstrumen2, " +
|
|
" perawatInstrument2.namaLengkap as namePerawatInstrumen2, " +
|
|
" perawatSirkuler.id as idPerawatSirkuler, " +
|
|
" perawatSirkuler.namaLengkap as namePerawatSirkuler, " +
|
|
" operatorAlatCanggih.id as idOperatorAlatCanggih, " +
|
|
" operatorAlatCanggih.namaLengkap as nameOperatorAlatCanggih, " +
|
|
" kelas.id as idKelas, kelas.namaKelas as namaKelas, " +
|
|
" ruangan.id as idRuangan, ruangan.namaRuangan as namaRuangan, " +
|
|
" pasien.jenisKelamin.jenisKelamin as jenisKelamin, " +
|
|
" pasien.namaPasien as namaPasien, pasien.tglLahir as tglLahir, " +
|
|
" pasien.noCm as noCm, alamats.alamatLengkap as alamatLengkap)" +
|
|
" from AsuhanKeperawatanPeriOperasiHeader a " +
|
|
" left join a.dokterBedah dokterBedah " +
|
|
" left join a.asistenBedah asistenBedah " +
|
|
" left join a.perawatInstrumen1 perawatInstrumen1 " +
|
|
" left join a.perawatInstrument2 perawatInstrument2 " +
|
|
" left join a.perawatSirkuler perawatSirkuler " +
|
|
" left join a.operatorAlatCanggih operatorAlatCanggih " +
|
|
" left join a.pasienDaftar antrian " +
|
|
" left join antrian.ruangan ruangan " +
|
|
" left join antrian.kelas kelas " +
|
|
" left join antrian.pasienDaftar pasienDaftar " +
|
|
" left join pasienDaftar.pasien pasien " +
|
|
" left join pasien.alamats alamats " +
|
|
" where a.statusEnabled in ('true') and a.noTrans=:notrans")
|
|
Map<String, Object> getListAsuhanTransByNoTrans(@Param("notrans") String notrans);
|
|
|
|
//laporan bedah
|
|
@Query("select new map(a.objekDataMasalahId as id, a.noRec as noRec, a.asuhankeperawatanHeaderId as noTrans, " +
|
|
" b.id as id, a.keterangan as keterangan, b.flagAsuhan as flagAsuhan, " +
|
|
" b.idParent as idParent, " +
|
|
" b.flagHeader as flagHeader, b.namaExternal as namaExternal) " +
|
|
" from AsuhanKeperawatanPeriOperasiTrans a left join a.objekDataMasalah b " +
|
|
" where a.asuhankeperawatanHeaderId=:notrans and a.statusEnabled in ('true') and " +
|
|
" b.flagAsuhan in('Laporan Pembedahaan') and b.keterangan in('Laporan Pembedahaan')")
|
|
List<Map<String, Object>> getListLaporanBedahTransByNoTrans(@Param("notrans") String notrans);
|
|
|
|
//Intruksi Pasca Bedah
|
|
@Query("select new map(a.noRec as noRec, a.asuhankeperawatanHeaderId as noTrans, " +
|
|
" b.id as id, a.keterangan as keterangan, b.flagAsuhan as flagAsuhan, " +
|
|
" b.idParent as idParent, " +
|
|
" b.flagHeader as flagHeader, b.namaExternal as namaExternal) " +
|
|
" from AsuhanKeperawatanPeriOperasiTrans a left join a.objekDataMasalah b " +
|
|
" where a.asuhankeperawatanHeaderId=:notrans and a.statusEnabled in ('true') and " +
|
|
" b.flagAsuhan in('Instruksi Pasca Bedah')")
|
|
List<Map<String, Object>> getListLapPascaBedahTransByNoTrans(@Param("notrans") String notrans);
|
|
|
|
//Penggunaan Infus
|
|
@Query("select new map(a.noRec as noRec, " +
|
|
" a.pembedahanDanInstruksiId as noTrans," +
|
|
" a.jumlah as jumlah, a.tetesan as tetesan, " +
|
|
" b.id as id, b.name as nameInfus) " +
|
|
" from InfusDetail a left join a.macamInfus b " +
|
|
" where a.pembedahanDanInstruksiId=:notrans and a.statusEnabled in ('true')")
|
|
List<Map<String, Object>> getListLapInfusTransByNoTrans(@Param("notrans") String notrans);
|
|
|
|
@Query("select new map(a.noRec as noRec, a.noTrans as noTrans) " +
|
|
" from AsuhanKeperawatanPeriOperasiHeader a " +
|
|
" left join a.pasienDaftar antrian where " +
|
|
" antrian.noRec=:noRec and a.noTrans like 'PO%'")
|
|
List<Map<String, Object>> getPascaBedahByNoRecAntrian(@Param("noRec") String noRec);
|
|
|
|
@Query("select new map(a.id as id, a.name as name) from Infus a")
|
|
List<Map<String, Object>> getMacamInfus();
|
|
|
|
}
|