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("AsuhanKeperawatanPeriOperatifDao")
public interface AsuhanKeperawatanPeriOperatifDao extends PagingAndSortingRepository<AsuhanKeperawatanPeriOperatif, String>{
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Transfer Ke Kamar Operasi dengan') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataTransferKeKamar();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Tingkat Kesadaran') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataTingkatKesadaran();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Sistem Integumen') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataSistemIntegumen();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Sistem Muskuloskeletal') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataSistemMuskuloskeletal();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Protesa') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataProtesa();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Diagnosa Keperawatan') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataDiagnosaKeperawatan();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Status Psikososial') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataPsikososial();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.keterangan in('Data & Masalah Keperawatan') " +
			" and a.flagAsuhan in('Data & Masalah Keperawatan') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getHeaderDataMasalah();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.flagAsuhan in('Intervensi') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataIntervensi();
	
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from AsuhanKeperawatanPeriOperatif a " +
			" where a.flagAsuhan in('Evaluasi') and a.flagHeader in('Asuhan')")
	List<Map<String, Object>> getDataEvaluasi();
	
	/* 
	 * 
	 * show data intra operasi (perawat bedah)
	 *  
	 */
	/* shoe data Data & Masalah keperawatan*/
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Data & Masalah Keperawatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahIntraOperasi();
	
	/* show data Diagnosa Keperawatan */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Diagnosa Keperawatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahIntraOperasiDiagnosaKeperawatan();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  header keteter urin
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal in('Keteter Urin')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanKeteterUrinHeader();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  detail keteter urin
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and " +
			" a.namaExternal <> 'Keteter Urin' and a.flagParent in('Keteter Urin')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanKeteterUrinDetail();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  header drainage/tube
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal in('Drainage/Tube')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanDrainageHeader();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  detail drainage/tube
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal <> 'Drainage/Tube' " +
			" and a.flagParent in('Drainage/Tube')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanDrainageDetail();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  header balutan
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal in('Balutan')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanBalutanHeader();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  detail balutan
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal <> 'Balutan' " +
			" and a.flagParent in('Balutan')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanBalutanDetail();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  header gips
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal in('Gips')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanGipsHeader();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  detail gips
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal <> 'Gips' " +
			" and a.flagParent in('Gips')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanGipsDetail();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  header Klasifikasi luka
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal in('Klasifikasi luka')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanKlasifikasiLukaHeader();
	
	/*
	 * Klien terpasang alat-alat kesehatan
	 * show data  detail Klasifikasi luka
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.namaExternal <> 'Klasifikasi luka' " +
			" and a.flagParent in('Klasifikasi luka')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanKlasifikasiLukaDetail();
	
	/*
	 * header alat-alat kesehatan
	 * detail yang tidak memiliki child
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Klien terpasang alat-alat kesehatan') " +
			" and a.flagParent is null " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahKlienTerpasangAlatKesehatanNonChild();
	
	//intervensi
	/* show data intra operasi (perawat bedah) */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.keterangan in('Intervensi') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListIntervensi();
	
	/*
	 * Header:
	 * Berikan dan pastikan keamanan klien selama
	 * pemasangan negative cauter dan dipasang oleh
	 * 
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.id in('103')")
	List<Map<String, Object>> getListIntervensiNegativeCauterHeader();
	
	/*
	 * Detail:
	 * Berikan dan pastikan keamanan klien selama
	 * pemasangan negative cauter dan dipasang oleh
	 * 
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.id <> '103' " +
			" and a.flagParent in('Letak')")
	List<Map<String, Object>> getListIntervensiNegativeCauterDetail();
	
	/*
	 * Header:
	 * Couterisasi
	 * 
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.id in('111')")
	List<Map<String, Object>> getListIntervensiCouterisasiHeader();
	
	/*
	 * Detail:
	 * Couterisasi
	 * 
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.id <> '111' " +
			" and a.flagParent in('Kode Diatermi')")
	List<Map<String, Object>> getListIntervensiCouterisasiDetail();
	
	/* Lakukan pencegahan perdarahan dengan */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.keterangan in('Lakukan pencegahan perdarahan dengan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListIntervensiPencegahanPerdarahan();
	
	/*
	 * Header:
	 * Torniquet
	 * 
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.id in('117')")
	List<Map<String, Object>> getListIntervensiTorniquetHeader();
	
	/*
	 * Detail:
	 * Torniquet
	 * 
	 * 
	 * */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.id <> '117' " +
			" and a.flagParent in('Torniquet')")
	List<Map<String, Object>> getListIntervensiTorniquetDetail();
	
	//Kriteria Evaluasi
	/* show data intra operasi (perawat bedah) */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Evaluasi') " +
			" and a.keterangan in('Evaluasi') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListIntraOperasiKriteriaEvaluasi();
	
	
	
	/*
	 * show data post operasi perawat bedah
	 */
	/* show data Cairan Drain */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Cairan Drain') " +
			" and a.flagHeader in('Post Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahPostOperasiCairanDrain();
	
	/*
	 * show data post operasi perawat bedah
	 */
	
	/* show data Sirkulasi */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Sirkulasi') " +
			" and a.flagHeader in('Post Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahPostOperasiSirkulasi();
	
	/*
	 * show data post operasi perawat bedah
	 */
	
	/* show data Kondisi Kulit */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Kondisi Kulit') " +
			" and a.flagHeader in('Post Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahPostOperasiKondisiKulit();
	
	
	/*
	 * show data post operasi perawat bedah
	 */
	/* show data Ekstremitas */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Ekstremitas') " +
			" and a.flagHeader in('Post Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahPostOperasiEkstremitas();
	
	/*
	 * show data post operasi perawat bedah
	 */
	/* show data Diagnosa Keperawatan */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Diagnosa Keperawatan') " +
			" and a.flagHeader in('Post Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListDataMasalahPostOperasiDiagnosaKeperawatan();
	
	/*
	 * show data post operasi perawat bedah
	 */
	/* show Intervensi */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.keterangan in('Intervensi') " +
			" and a.flagHeader in('Post Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListIntervensiPostOperasiDiagnosaKeperawatan();
	
	/*
	 * show data post operasi perawat bedah
	 */
	/* show Evaluasi */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Evaluasi') " +
			" and a.keterangan in('Evaluasi') " +
			" and a.flagHeader in('Post Operasi-Perawat Bedah')")
	List<Map<String, Object>> getListEvaluasiPostOperasiDiagnosaKeperawatan();
	
	/*
	 * show data intra operasi (anestesi)
	 * 
	 * Data & Masalah Perawatan
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.keterangan in('Data & Masalah Keperawatan') " +
			" and a.flagHeader in('Intra Operasi-Anestesi')")
	List<Map<String, Object>> getListIntraOperasiAnestesiDataMasalahPerawatan();
	
	/*
	 * show data intra operasi (anestesi)
	 * 
	 * Data & Masalah Perawatan
	 * Header Suhu
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.id in('177')")
	List<Map<String, Object>> getListIntraOperasiAnestesiDataMasalahPerawatanSuhuHeader();
	
	/*
	 * show data intra operasi (anestesi)
	 * 
	 * Data & Masalah Perawatan
	 * Detail Suhu
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.flagHeader in('Intra Operasi-Anestesi') and a.idParent=:id ")
	List<Map<String, Object>> getListIntraOperasiAnestesiDataMasalahPerawatanSuhuDetail(@Param("id") int id);
	
	/*
	 * show data intra operasi (anestesi)
	 * 
	 * Intervensi
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.keterangan in('Intervensi') " +
			" and a.flagHeader in('Intra Operasi-Anestesi')")
	List<Map<String, Object>> getListIntraOperasiAnestesiIntervensi();
	
	/*
	 * show data intra operasi (anestesi)
	 * 
	 * Intervensi-Koloborasi dengan dokter anestesi (Header)
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.id in('198')")
	List<Map<String, Object>> getListIntraOperasiAnestesiIntervensiDokterAnestesiHeader();
	
	/*
	 * show data intra operasi (anestesi)
	 * 
	 * Intervensi-Koloborasi dengan dokter anestesi (detail)
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.idParent=:id and a.flagHeader in('Intra Operasi-Anestesi') ")
	List<Map<String, Object>> getListIntraOperasiAnestesiIntervensiDokterAnestesiDetail(@Param("id") int id);
	
	
	/*
	 * show data intra operasi (anestesi)
	 * 
	 * Evaluasi
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Evaluasi') " +
			" and a.flagHeader in('Intra Operasi-Anestesi') and a.keterangan in('Evaluasi')")
	List<Map<String, Object>> getListIntraOperasiAnestesiEvaluasi();
	
	/*
	 * show data intra operasi (anestesi)
	 * Evaluasi-Detail
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Evaluasi') " +
			" and a.idParent=:id and a.flagHeader in('Intra Operasi-Anestesi') ")
	List<Map<String, Object>> getListInteraAnestesiEvaluasiDetail(@Param("id") int id);

	/*
	 * show data post operasi(anestesi)
	 * data & masalah keperawatan
	 * header
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.flagHeader in('Post Operasi-Anestesi') and a.keterangan in('Data & Masalah Keperawatan')")
	List<Map<String, Object>> getListPostOperasiAnestesiDataMasalah();
	
	/*
	 * show data post operasi(anestesi)
	 * data & masalah keperawatan
	 * detail
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.idParent=:id and a.flagHeader in('Post Operasi-Anestesi') ")
	List<Map<String, Object>> getListPostOperasiAnestesiDataMasalahDetail(@Param("id") int id);
	
	/*
	 * show data post operasi(anestesi)
	 * intervensi
	 * header
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.flagHeader in('Post Operasi-Anestesi') and a.keterangan in('Intervensi')")
	List<Map<String, Object>> getListPostOperasiAnestesiIntervensi();
	
	/*
	 * show data post operasi(anestesi)
	 * intervensi
	 * detail
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.idParent=:id and a.flagHeader in('Post Operasi-Anestesi') ")
	List<Map<String, Object>> getListPostOperasiAnestesiIntervensiDetail(@Param("id") int id);
	
	/*
	 * show data post operasi(anestesi)
	 * evaluasi
	 * header
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Evaluasi') " +
			" and a.flagHeader in('Post Operasi-Anestesi') and a.keterangan in('Evaluasi')")
	List<Map<String, Object>> getListPostOperasiAnestesiEvaluasi();
	
	/*
	 * show data post operasi(anestesi)
	 * evaluasi
	 * detail
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Evaluasi') " +
			" and a.idParent=:id and a.flagHeader in('Post Operasi-Anestesi') ")
	List<Map<String, Object>> getListPostOperasiAnestesiEvaluasiDetail(@Param("id") int id);
	
	//Intra Operasi-Perawat Bedah Revisi.0.1
	/*
	 * show data intra operasi(perawat bedah)
	 * header
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.keterangan in('Data & Masalah Keperawatan') " +
			" and a.idParent in(0)")
	List<Map<String, Object>> getListIntraOperasiPerawatBedahDataMasalahV1();
	
	/*
	 * show data intra operasi(perawat bedah)
	 * detail level-1
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.idParent=:id and a.flagHeader in('Intra Operasi-Perawat Bedah') ")
	List<Map<String, Object>> getListIntraOperasiPerawatBedahDataMasalahDetailV1(@Param("id") int id);
	
	/*
	 * show data intra operasi(perawat bedah)
	 * detail level-2
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.idParent=:id and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.idParent in(69,76,81,84)")
	List<Map<String, Object>> getListIntraOperasiPerawatBedahDataMasalahDetailLevel1V1(@Param("id") int id);
	
	
	//Intra Operasi-Perawat Bedah Revisi.0.1
	/*
	 * show data intra operasi(perawat bedah)
	 * header untuk diagnosa keperawatan
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Data & Masalah Keperawatan') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.keterangan in('Diagnosa Keperawatan')")
	List<Map<String, Object>> getListIntraOperasiPerawatBedahDataMasalahDiagnosaV1();
	
	//Intra Operasi-Perawat Bedah Revisi.0.1
	/*
	 * show data intra operasi(perawat bedah)
	 * header untuk intervensi
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.keterangan in('Intervensi')")
	List<Map<String, Object>> getListIntraOperasiIntervensiV1();
	
	/*
	 * show data intra operasi(perawat bedah)
	 * detail intervensi
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Intervensi') " +
			" and a.idParent=:id and a.flagHeader in('Intra Operasi-Perawat Bedah') ")
	List<Map<String, Object>> getListIntraOperasiIntervensiDetailV1(@Param("id") int id);
	
	//Intra Operasi-Perawat Bedah Revisi.0.1
	/*
	 * show data intra operasi(perawat bedah)
	 * header untuk Evaluasi
	 */
	@Query("select new map(a.id as id, a.namaExternal as namaExternal) from " +
			" AsuhanKeperawatanPeriOperatif a where a.flagAsuhan in('Evaluasi') " +
			" and a.flagHeader in('Intra Operasi-Perawat Bedah') and a.keterangan in('Evaluasi')")
	List<Map<String, Object>> getListIntraOperasiEvaluasiV1();
}
