Pembuatan konstanta untuk etl data pasien
This commit is contained in:
parent
5d6e2e61b7
commit
66062dc9dd
@ -0,0 +1,45 @@
|
||||
package com.jasamedika.medifirst2000.etl.pasien.constant;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 21 Oct 2023
|
||||
*/
|
||||
public enum GolonganResus {
|
||||
POSITIF(1, "Resus positif", '+'),
|
||||
NEGATIF(2, "Resus negatif", '-');
|
||||
|
||||
private final long id;
|
||||
|
||||
@Getter
|
||||
private final String name;
|
||||
|
||||
@Getter
|
||||
private final char code;
|
||||
|
||||
GolonganResus(long id, String name, char code) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public long id() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Long.toString(id);
|
||||
}
|
||||
|
||||
public static GolonganResus valueOf(long id) {
|
||||
for (GolonganResus golonganResus : values()) {
|
||||
if (golonganResus.id == id) {
|
||||
return golonganResus;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + id + "]");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.jasamedika.medifirst2000.etl.pasien.constant;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 21 Oct 2023
|
||||
*/
|
||||
public enum HubunganKeluarga {
|
||||
AYAH(1, "Ayah"),
|
||||
IBU(2, "Ibu"),
|
||||
ANAK(3, "Anak"),
|
||||
SUAMI(4, "Suami"),
|
||||
ISTRI(5, "Istri");
|
||||
|
||||
private final long id;
|
||||
|
||||
@Getter
|
||||
private final String name;
|
||||
|
||||
HubunganKeluarga(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 HubunganKeluarga valueOf(long id) {
|
||||
for (HubunganKeluarga hubunganKeluarga : values()) {
|
||||
if (hubunganKeluarga.id == id) {
|
||||
return hubunganKeluarga;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + id + "]");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.jasamedika.medifirst2000.etl.pasien.constant;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import static com.jasamedika.medifirst2000.etl.pasien.constant.KategoriBerkas.*;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 21 Oct 2023
|
||||
*/
|
||||
public enum JenisBerkas {
|
||||
KTP(1, "KTP", PRIBADI),
|
||||
KK(2, "KK", PRIBADI),
|
||||
SIM(3, "SIM", PRIBADI),
|
||||
PASPOR(4, "Paspor", PRIBADI),
|
||||
KITAS(5, "KITAS", PRIBADI),
|
||||
AKTA_LAHIR(6, "Akta Lahir", PRIBADI),
|
||||
HASIL_USG(7, "Hasil USG", PENUNJANG),
|
||||
HASIL_PA(8, "Hasil PA", PENUNJANG),
|
||||
HASIL_ECHO(9, "Hasil Echo", PENUNJANG),
|
||||
REKAM_MEDIS(10, "Rekam Medis", RMIK),
|
||||
GENERAL_CONSENT(11, "General Consent", RMIK);
|
||||
|
||||
private final long id;
|
||||
|
||||
@Getter
|
||||
private final String name;
|
||||
|
||||
@Getter
|
||||
private final KategoriBerkas kategory;
|
||||
|
||||
JenisBerkas(long id, String name, KategoriBerkas category) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.kategory = category;
|
||||
}
|
||||
|
||||
public long id() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Long.toString(id);
|
||||
}
|
||||
|
||||
public static JenisBerkas valueOf(long id) {
|
||||
for (JenisBerkas jenisBerkas : values()) {
|
||||
if (jenisBerkas.id == id) {
|
||||
return jenisBerkas;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + id + "]");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.jasamedika.medifirst2000.etl.pasien.constant;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 21 Oct 2023
|
||||
*/
|
||||
public enum KategoriBerkas {
|
||||
PRIBADI(1, "Pribadi"),
|
||||
PENUNJANG(2, "Penunjang"),
|
||||
RMIK(3, "RMIK");
|
||||
|
||||
private final long id;
|
||||
|
||||
@Getter
|
||||
private final String name;
|
||||
|
||||
KategoriBerkas(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 KategoriBerkas valueOf(long id) {
|
||||
for (KategoriBerkas kategoriBerkas : values()) {
|
||||
if (kategoriBerkas.id == id) {
|
||||
return kategoriBerkas;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + id + "]");
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user