Persiapan ektraksi dan transformasi data pasien
This commit is contained in:
parent
f48ab9d26c
commit
89ef87d089
@ -2,6 +2,7 @@ package com.jasamedika.medifirst2000.dao;
|
||||
|
||||
import com.jasamedika.medifirst2000.entities.Alamat;
|
||||
import com.jasamedika.medifirst2000.entities.Pasien;
|
||||
import com.jasamedika.medifirst2000.etl.pasien.constant.StatusMigrasi;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Lock;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
@ -120,4 +121,6 @@ public interface PasienDao extends JpaRepository<Pasien, Integer> {
|
||||
+ "where ibu.noCm = anak.reportDisplay " + "and ibu.statusEnabled is true and anak.statusEnabled is true "
|
||||
+ "and ibu.id in (:listIdIbu)")
|
||||
List<Map<String, Object>> findIdByNoCmOfIbu(@Param("listIdIbu") Set<Integer> listIdIbu);
|
||||
|
||||
List<Pasien> findByStatusMigrasi(StatusMigrasi statusMigrasi);
|
||||
}
|
||||
|
||||
@ -1,32 +1,24 @@
|
||||
package com.jasamedika.medifirst2000.entities;
|
||||
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
import static javax.persistence.GenerationType.SEQUENCE;
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.jasamedika.medifirst2000.base.BaseMaster;
|
||||
import com.jasamedika.medifirst2000.etl.pasien.constant.StatusMigrasi;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
import com.jasamedika.medifirst2000.listener.MyEventListener;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EntityListeners;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonBackReference;
|
||||
import com.jasamedika.medifirst2000.base.BaseMaster;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
import com.jasamedika.medifirst2000.listener.MyEventListener;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import static com.jasamedika.medifirst2000.etl.pasien.constant.StatusMigrasi.BELUM_KIRIM;
|
||||
import static javax.persistence.EnumType.STRING;
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
import static javax.persistence.GenerationType.SEQUENCE;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ -219,4 +211,10 @@ public class Pasien extends BaseMaster {
|
||||
@Column(name = "JamLahir")
|
||||
@Caption(value = "JamLahir")
|
||||
private Date jamLahir;
|
||||
|
||||
@Column(length = 30, nullable = false, columnDefinition = "varchar(30) default 'BELUM_KIRIM'")
|
||||
@Enumerated(STRING)
|
||||
@Size(max = 30)
|
||||
@Caption(value = "Status Migrasi")
|
||||
private StatusMigrasi statusMigrasi = BELUM_KIRIM;
|
||||
}
|
||||
|
||||
@ -13,9 +13,7 @@ public enum Agama {
|
||||
KATOLIK(3, "Katolik"),
|
||||
HINDU(4, "Hindu"),
|
||||
BUDHA(5, "Budha"),
|
||||
KONGHUCU(6, "Konghucu"),
|
||||
PENGHAYAT(7, "Penghayat"),
|
||||
LAIN_LAIN(8, "Lain-lain");
|
||||
KONGHUCU(6, "Konghucu");
|
||||
|
||||
private final long id;
|
||||
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package com.jasamedika.medifirst2000.etl.pasien.constant;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 3 Nov 2023
|
||||
*/
|
||||
public enum CaraMeninggal {
|
||||
BAWAH_DAN_48_JAM(1, "Meninggal <=48 Jam"),
|
||||
ATAS_48_JAM(2, "Meninggal >48 Jam"),
|
||||
BAWAH_DAN_8_JAM(3, "Meninggal <=8 Jam"),
|
||||
ATAS_8_JAM(4, "Meninggal >8 Jam"),
|
||||
DOA(5, "Meninggal pada saat kedatangan"),
|
||||
BLUECODE(6, "Meninggal pada saat gawat darurat"),
|
||||
LAHIR(7, "Meninggal pada saat lahir");
|
||||
|
||||
private final long id;
|
||||
|
||||
@Getter
|
||||
private final String name;
|
||||
|
||||
CaraMeninggal(long id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public long id() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Long.toString(id);
|
||||
}
|
||||
|
||||
public static CaraMeninggal valueOf(long id) {
|
||||
for (CaraMeninggal caraMeninggal : values()) {
|
||||
if (caraMeninggal.id == id) {
|
||||
return caraMeninggal;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + id + "]");
|
||||
}
|
||||
}
|
||||
@ -9,8 +9,8 @@ import lombok.Getter;
|
||||
*/
|
||||
public enum JenisIdentitas {
|
||||
KTP(1, "KTP"),
|
||||
KK(2, "KK"),
|
||||
SIM(3, "SIM"),
|
||||
KK(2, "SIM"),
|
||||
SIM(3, "KK"),
|
||||
PASPOR(4, "Paspor"),
|
||||
KITAS(5, "KITAS"),
|
||||
AKTA_LAHIR(6, "Akta Lahir");
|
||||
|
||||
@ -8,18 +8,18 @@ import lombok.Getter;
|
||||
* @since 19/10/2023
|
||||
*/
|
||||
public enum Negara {
|
||||
INDONESIA(1, "Indonesia", 62),
|
||||
MALAYSIA(2, "Malaysia", 60),
|
||||
INDONESIA(0, "Indonesia", 62),
|
||||
THAILAND(1, "Thailand", 66),
|
||||
FILIPINA(2, "Filipina", 63),
|
||||
SINGAPURA(3, "Singapura", 65),
|
||||
BRUNEI_DARUSSALAM(4, "Brunei Darussalam", 673),
|
||||
VIETNAM(5, "Vietnam", 84),
|
||||
KAMBOJA(6, "Kamboja", 855),
|
||||
THAILAND(7, "Thailand", 66),
|
||||
FILIPINA(8, "Filipina", 63),
|
||||
MYANMAR(9, "Myanmar", 95),
|
||||
LAOS(10, "Laos", 856),
|
||||
TIMOR_LESTE(11, "Timor Leste", 670),
|
||||
PAPUA_NUGINI(12, "Papua Nugini", 675);
|
||||
LAOS(6, "Laos", 856),
|
||||
MYANMAR(7, "Myanmar", 95),
|
||||
KAMBOJA(8, "Kamboja", 855),
|
||||
MALAYSIA(9, "Malaysia", 60),
|
||||
TIMOR_LESTE(10, "Timor Leste", 670),
|
||||
PAPUA_NUGINI(11, "Papua Nugini", 675);
|
||||
|
||||
private final long id;
|
||||
|
||||
|
||||
@ -8,11 +8,11 @@ import lombok.Getter;
|
||||
* @since 19/10/2023
|
||||
*/
|
||||
public enum Sapaan {
|
||||
BAYI(1, "Bayi", 1, 2),
|
||||
ANAK(2, "Anak", 4, 10),
|
||||
NONA(3, "Nona", 11, 21),
|
||||
TUAN(4, "Tuan", 17, 50),
|
||||
NYONYA(5, "Nyonya", 17, 50);
|
||||
TUAN(1, "Tuan", 17, 50),
|
||||
NYONYA(2, "Nyonya", 17, 50),
|
||||
ANAK(3, "Anak", 4, 10),
|
||||
BAYI(4, "Bayi", 1, 2),
|
||||
NONA(5, "Nona", 11, 21);
|
||||
|
||||
private final long id;
|
||||
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
package com.jasamedika.medifirst2000.etl.pasien.constant;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 3 Nov 2023
|
||||
*/
|
||||
public enum StatusMigrasi {
|
||||
TERKIRIM, PEMBAHARUAN, BELUM_KIRIM
|
||||
}
|
||||
@ -8,8 +8,24 @@ import lombok.Getter;
|
||||
* @since 19/10/2023
|
||||
*/
|
||||
public enum Suku {
|
||||
SUNDA(1, "Sunda"),
|
||||
JAWA(2, "Jawa");
|
||||
JAWA(1, "Jawa"),
|
||||
SUNDA(2, "Sunda"),
|
||||
MADURA(3, "Madura"),
|
||||
MANADO(4, "Manado"),
|
||||
BALI(5, "Bali"),
|
||||
DAYAK(6, "Dayak"),
|
||||
BETAWI(7, "Betawi"),
|
||||
TAPANULI(8, "Tapanuli"),
|
||||
PAPUA(9, "Papua"),
|
||||
AMBON(10, "Ambon"),
|
||||
PADANG(11, "Padang"),
|
||||
ACEH(12, "Aceh"),
|
||||
BUGIS(13, "Bugis"),
|
||||
MAKASSAR(14, "Makassar"),
|
||||
MELAYU(15, "Melayu"),
|
||||
CINA(16, "Cina"),
|
||||
ARAB(17, "Arab"),
|
||||
KAILI(18, "Kaili");
|
||||
|
||||
private final long id;
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.jasamedika.medifirst2000.vo;
|
||||
|
||||
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
||||
import com.jasamedika.medifirst2000.etl.pasien.constant.StatusMigrasi;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@ -137,4 +138,7 @@ public class PasienVO extends BaseMasterVO {
|
||||
|
||||
@Caption(value = "propinsi")
|
||||
private PropinsiVO propinsi;
|
||||
|
||||
@Caption(value = "Status Migrasi")
|
||||
private StatusMigrasi statusMigrasi;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user