Update access object migrasi pasien
Penambahan filter untuk cleaning data pasien belum lengkap no identitas nik
This commit is contained in:
parent
30de930495
commit
1132e8f3d6
@ -16,8 +16,8 @@ import java.util.List;
|
||||
*/
|
||||
public interface MigrasiPasienDao extends JpaRepository<MigrasiPasien, String> {
|
||||
@Query("select ps from MigrasiPasien mp " + "inner join mp.pasien ps "
|
||||
+ "where mp.statusMigrasi in (:listStatusMigrasi) "
|
||||
+ "and (ps.noIdentitas is not null or ps.noidentitas <> '')")
|
||||
+ "where mp.statusMigrasi in (:listStatusMigrasi) " + "and ps.noIdentitas is not null "
|
||||
+ "and ps.noIdentitas <> '' " + "and ps.noIdentitas <> '-'")
|
||||
List<Pasien> findPasienByStatusMigrasiIn(@Param("listStatusMigrasi") List<StatusMigrasi> statusMigrasiList);
|
||||
|
||||
@Query(value = "select mp.* from migrasipasien_t mp " + "inner join pasien_m ps on mp.pasienfk = ps.id "
|
||||
|
||||
@ -127,7 +127,8 @@ public interface PasienDao extends JpaRepository<Pasien, Integer> {
|
||||
|
||||
@Query(value = "select ps.* from pasien_m ps " + "where ps.statusenabled is true " + "and ps.nocm ~ '^[0-9\\.]+$' "
|
||||
+ "and length(ps.nocm) = 8 " + "and cast(ps.nocm as integer) < 10000000 "
|
||||
+ "and ps.id not in (select mp.pasienfk from migrasipasien_t mp) "
|
||||
+ "order by cast(ps.nocm as integer) desc " + "limit 100", nativeQuery = true)
|
||||
+ "and ps.id not in (select mp.pasienfk from migrasipasien_t mp) " + "and ps.noidentitas is not null "
|
||||
+ "and ps.noidentitas <> '' " + "and ps.noidentitas <> '-' " + "order by cast(ps.nocm as integer) desc "
|
||||
+ "limit 100", nativeQuery = true)
|
||||
List<Pasien> find100LatestByNotMigrateYet();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user