package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "AntrianPasienDiPeriksa_T")
public class AntrianPasienDiPeriksa extends BaseTransaction {

	private static final long serialVersionUID = 1243474652074108524L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKelasFk")
	@Caption(value = "Object Kelas")
	private Kelas kelas;

	@Column(name = "ObjectKelasFk", insertable = false, updatable = false)
	private Integer kelasId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectStrukOrderFk")
	@Caption(value = "Object Struk OrderFk")
	private StrukOrder strukOrder;

	@Column(name = "ObjectStrukOrderFk", insertable = false, updatable = false)
	private String strukOrderId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectAsalRujukanFk")
	@Caption(value = "Object Asal Rujukan")
	private AsalRujukan asalRujukan;

	@Column(name = "ObjectAsalRujukanFk", insertable = false, updatable = false)
	private Integer asalRujuakanId;

	@Column(name = "statusKunjungan")
	private String statusKunjungan;

	@Column(name = "isRawatGabung")
	private Boolean isRawatGabung;

	@Column(name = "statusPenyakit")
	private String statusPenyakit;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPegawaiFk")
	@Caption(value = "Object Pegawai")
	private Pegawai pegawai;

	@Column(name = "ObjectPegawaiFk", insertable = false, updatable = false)
	private Integer pegawaiId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectStrukReturFk")
	@Caption(value = "Object Struk Retur")
	private StrukRetur strukRetur;

	@Column(name = "ObjectStrukReturFk", insertable = false, updatable = false)
	private String strukReturId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKamarFk")
	@Caption(value = "Object Kamar")
	private Kamar kamar;

	@Column(name = "ObjectKamarFk", insertable = false, updatable = false)
	private Integer kamarId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKasusPenyakitFk")
	@Caption(value = "Object Kasus Penyakit")
	private KasusPenyakit kasusPenyakit;

	@Column(name = "ObjectKasusPenyakitFk", insertable = false, updatable = false)
	private Integer kasusPeyakitId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;

	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false)
	private Integer ruanganId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRuanganAsalFk")
	@Caption(value = "Object RuanganAsal")
	private Ruangan ruanganAsal;

	@Column(name = "ObjectRuanganAsalFk", insertable = false, updatable = false)
	private Integer ruanganAsalId;

	@Caption(value = "No Antrian")
	@Column(name = "NoAntrian", nullable = false)
	private Integer noAntrian;

	@Caption(value = "No Bed")
	@Column(name = "NoBed")
	private Integer noBed;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoRegistrasiFk")
	@NotNull(message = "No Registrasi Harus Diisi")
	@Caption(value = "No Registrasi")
	private PasienDaftar pasienDaftar;

	@Column(name = "NoRegistrasiFk", insertable = false, updatable = false, nullable = false)
	private String pasienDaftarId;

	@Caption(value = "Prefix No Antrian")
	@Column(name = "PrefixNoAntrian", length = 4)
	private String prefixNoAntrian;

	@Caption(value = "Status Pasien")
	@Column(name = "StatusPasien", nullable = false)
	private Byte statusPasien;

	@Caption(value = "Tanggal Registrasi")
	@Column(name = "TglRegistrasi", nullable = false)
	private Date tglRegistrasi;

	@Caption(value = "Tanggal Masuk")
	@Column(name = "tglMasuk")
	private Date tglMasuk;

	@Caption(value = "Tanggal Keluar")
	@Column(name = "tglKeluar")
	private Date tglKeluar;

	@Caption(value = "Tanggal Dipanggil Suster")
	@Column(name = "TglDipanggilSuster")
	private Date tglDipanggilSuster;

	@Caption(value = "Tanggal Dipanggil Dokter")
	@Column(name = "TglDipanggilDokter")
	private Date tglDipanggilDokter;

	@Column(name = "noMasuk", length = 200)
	@Caption(value = "No Masuk ")
	private String noMasuk;

	@Column(name = "statusAntrian", length = 200)
	@Caption(value = "Status Antrian ")
	private String statusAntrian;

}
