package com.jasamedika.medifirst2000.entities;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity 
@Table(name="GawatDarurat_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class GawatDarurat extends BaseTransaction{
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "Object AntrianPasien Di Periksa")
	@JoinColumn(name = "ObjectAntrianPasienDiPeriksaFk")
	private AntrianPasienDiPeriksa antrianPasienDiPeriksa;
	
	@Column(name = "ObjectAntrianPasienDiPeriksaFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String antrianPasienDiPeriksaId;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "skalaNyeri")
	@JoinColumn(name = "ObjectSkalaNyeriFk")
	private SkalaNyeri skalaNyeri;
	
	@Column(name = "ObjectSkalaNyeriFk", insertable = false, updatable = false, nullable = true)
	private Integer skalaNyeriId;
	
	@Column(name = "skorNyeri", nullable = true)
	@Caption(value = "skorNyeri")
	private Integer skorNyeri;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "Jenis Nyeri")
	@JoinColumn(name = "ObjectJenisNyeriFk")
	private JenisNyeri jenisNyeri;
	
	@Column(name = "ObjectJenisNyeriFk", insertable = false, updatable = false, nullable = true)
	private Integer jenisNyeriId;
	
	@Caption(value = "lokasi")
	@Column(name = "lokasi", nullable = true)
	private String lokasi;
	
	@Caption(value = "durasi")
	@Column(name = "durasi", nullable = true)
	private String durasi;
	
	@Caption(value = "pencetus")
	@Column(name = "pencetus", nullable = true)
	private String pencetus;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "Object Status Pasien")
	@JoinColumn(name = "ObjectStatusPasienFk")
	private DeathOnArrival statusPasien;

	@Column(name = "ObjectStatusPasienFk", insertable = false, updatable = false, nullable = true)
	private Integer statusPasienId;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "Object Tanda Kehidupan")
	@JoinColumn(name = "ObjectTandaKehidupanFk")
	private TandaKehidupan tandaKehidupan;

	@Column(name = "ObjectTandaKehidupanFk", insertable = false, updatable = false, nullable = true)
	private Integer tandaKehidupanId;
	
	@Caption(value = "jam Penentuan Kematian")
	@Column(name = "jamPenentuanKematian", nullable = true)
	private String jamPenentuanKematian;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "Object Psikologis")
	@JoinColumn(name = "ObjectPsikologisFk")
	private Psikologis psikologis;

	@Column(name = "ObjectPsikologisFk", insertable = false, updatable = false, nullable = true)
	private Integer psikologisId;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "Object Resiko Jatuh")
	@JoinColumn(name = "ObjectResikoJatuhFk")
	private ResikoJatuh resikoJatuh;
	
	@Column(name = "ObjectResikoJatuhFk", insertable = false, updatable = false, nullable = true)
	private Integer resikoJatuhId;
	
	@Column(name = "skorResikoJatuh", nullable = true)
	@Caption(value = "skorResikoJatuh")
	private Integer skorResikoJatuh;
	
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="gawatDarurat")
	private Set<MapStatusImageToGawatDarurat> statusGambar = new HashSet<>();
	
	@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="gawatDarurat")
	private Set<MapStatusKeputusanToGawatDarurat> diputuskan = new HashSet<>();
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "ObjectDiagnosaKeperawatanFk")
	private DiagnosisKeperawatan diagnosaKeperawatan;
	
	@Column(name = "ObjectDiagnosaKeperawatanFk", insertable = false, updatable = false, nullable = true)
	private Integer diagnosaKeperawatanId;
	
	@Column(name = "isapLendir", nullable = true)
	@Caption(value = "isapLendir")
	private String isapLendir;
	
	@Column(name = "pasangOroPharsingAirway", nullable = true)
	@Caption(value = "pasangOroPharsingAirway")
	private String pasangOroPharsingAirway;
	
	@Column(name = "aturPosisi1", nullable = true)
	@Caption(value = "aturPosisi1")
	private String aturPosisi1;
	
	@Column(name = "aturPosisi2", nullable = true)
	@Caption(value = "aturPosisi2")
	private String aturPosisi2;
	
	@Column(name = "monitorIntakeOutput", nullable = true)
	@Caption(value = "monitorIntakeOutput")
	private String monitorIntakeOutput;
	
	@Column(name = "monitorTtvdanSp021", nullable = true)
	@Caption(value = "monitorTtvdanSp021")
	private String monitorTtvdanSp021;
	
	@Column(name = "monitorTtvdanSp022", nullable = true)
	@Caption(value = "monitorTtvdanSp022")
	private String monitorTtvdanSp022;
	
	@Column(name = "berikanOksigen1", nullable = true)
	@Caption(value = "berikanOksigen1")
	private String berikanOksigen1;

	@Column(name = "berikanOksigen2", nullable = true)
	@Caption(value = "berikanOksigen2")
	private String berikanOksigen2;
	
	@Column(name = "pasangInfus1", nullable = true)
	@Caption(value = "pasangInfus1")
	private String pasangInfus1;

	@Column(name = "pasangInfus2", nullable = true)
	@Caption(value = "pasangInfus2")
	private String pasangInfus2;
	
	@Column(name = "pasangEtt1", nullable = true)
	@Caption(value = "pasangEtt1")
	private String pasangEtt1;
	
	@Column(name = "pasangEtt2", nullable = true)
	@Caption(value = "pasangEtt2")
	private String pasangEtt2;
	
	@Column(name = "defibrasi1", nullable = true)
	@Caption(value = "defibrasi1")
	private String defibrasi1;

	@Column(name = "defibrasi2", nullable = true)
	@Caption(value = "defibrasi2")
	private String defibrasi2;
	
	@Column(name = "pemeriksaanLaboratorium", nullable = true)
	@Caption(value = "pemeriksaanLaboratorium")
	private String pemeriksaanLaboratorium;
	
	@Column(name = "pemberiObat", nullable = true)
	@Caption(value = "pemberiObat")
	private String pemberiObat;
	
	@Column(name = "lainnya", nullable = true)
	@Caption(value = "lainnya")
	private String lainnya;
	
	@Column(name = "skor", nullable = true)
	@Caption(value = "skor")
	private String skor;

	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "Ruangan Perawat")
	@JoinColumn(name = "ObjectRuanganPerawatFk")
	private RuangPerawatanIGD ruanganPerawat;
	
	@Column(name = "ObjectRuanganPerawatFk", insertable = false, updatable = false, nullable = true)
	private Integer ruanganPerawatId;

	public AntrianPasienDiPeriksa getAntrianPasienDiPeriksa() {
		return antrianPasienDiPeriksa;
	}

	public void setAntrianPasienDiPeriksa(AntrianPasienDiPeriksa antrianPasienDiPeriksa) {
		this.antrianPasienDiPeriksa = antrianPasienDiPeriksa;
	}

	public String getAntrianPasienDiPeriksaId() {
		return antrianPasienDiPeriksaId;
	}

	public void setAntrianPasienDiPeriksaId(String antrianPasienDiPeriksaId) {
		this.antrianPasienDiPeriksaId = antrianPasienDiPeriksaId;
	}

	public SkalaNyeri getSkalaNyeri() {
		return skalaNyeri;
	}

	public void setSkalaNyeri(SkalaNyeri skalaNyeri) {
		this.skalaNyeri = skalaNyeri;
	}

	public Integer getSkalaNyeriId() {
		return skalaNyeriId;
	}

	public void setSkalaNyeriId(Integer skalaNyeriId) {
		this.skalaNyeriId = skalaNyeriId;
	}

	public Integer getSkorNyeri() {
		return skorNyeri;
	}

	public void setSkorNyeri(Integer skorNyeri) {
		this.skorNyeri = skorNyeri;
	}

	public JenisNyeri getJenisNyeri() {
		return jenisNyeri;
	}

	public void setJenisNyeri(JenisNyeri jenisNyeri) {
		this.jenisNyeri = jenisNyeri;
	}

	public Integer getJenisNyeriId() {
		return jenisNyeriId;
	}

	public void setJenisNyeriId(Integer jenisNyeriId) {
		this.jenisNyeriId = jenisNyeriId;
	}

	public String getLokasi() {
		return lokasi;
	}

	public void setLokasi(String lokasi) {
		this.lokasi = lokasi;
	}

	public String getDurasi() {
		return durasi;
	}

	public void setDurasi(String durasi) {
		this.durasi = durasi;
	}

	public String getPencetus() {
		return pencetus;
	}

	public void setPencetus(String pencetus) {
		this.pencetus = pencetus;
	}

	public DeathOnArrival getStatusPasien() {
		return statusPasien;
	}

	public void setStatusPasien(DeathOnArrival statusPasien) {
		this.statusPasien = statusPasien;
	}

	public Integer getStatusPasienId() {
		return statusPasienId;
	}

	public void setStatusPasienId(Integer statusPasienId) {
		this.statusPasienId = statusPasienId;
	}

	public TandaKehidupan getTandaKehidupan() {
		return tandaKehidupan;
	}

	public void setTandaKehidupan(TandaKehidupan tandaKehidupan) {
		this.tandaKehidupan = tandaKehidupan;
	}

	public Integer getTandaKehidupanId() {
		return tandaKehidupanId;
	}

	public void setTandaKehidupanId(Integer tandaKehidupanId) {
		this.tandaKehidupanId = tandaKehidupanId;
	}

	public String getJamPenentuanKematian() {
		return jamPenentuanKematian;
	}

	public void setJamPenentuanKematian(String jamPenentuanKematian) {
		this.jamPenentuanKematian = jamPenentuanKematian;
	}

	public Psikologis getPsikologis() {
		return psikologis;
	}

	public void setPsikologis(Psikologis psikologis) {
		this.psikologis = psikologis;
	}

	public Integer getPsikologisId() {
		return psikologisId;
	}

	public void setPsikologisId(Integer psikologisId) {
		this.psikologisId = psikologisId;
	}

	public ResikoJatuh getResikoJatuh() {
		return resikoJatuh;
	}

	public void setResikoJatuh(ResikoJatuh resikoJatuh) {
		this.resikoJatuh = resikoJatuh;
	}

	public Integer getResikoJatuhId() {
		return resikoJatuhId;
	}

	public void setResikoJatuhId(Integer resikoJatuhId) {
		this.resikoJatuhId = resikoJatuhId;
	}

	public Integer getSkorResikoJatuh() {
		return skorResikoJatuh;
	}

	public void setSkorResikoJatuh(Integer skorResikoJatuh) {
		this.skorResikoJatuh = skorResikoJatuh;
	}

	public Set<MapStatusImageToGawatDarurat> getStatusGambar() {
		return statusGambar;
	}

	public void setStatusGambar(Set<MapStatusImageToGawatDarurat> statusGambar) {
		this.statusGambar = statusGambar;
	}

	public Set<MapStatusKeputusanToGawatDarurat> getDiputuskan() {
		return diputuskan;
	}

	public void setDiputuskan(Set<MapStatusKeputusanToGawatDarurat> diputuskan) {
		this.diputuskan = diputuskan;
	}

	public DiagnosisKeperawatan getDiagnosaKeperawatan() {
		return diagnosaKeperawatan;
	}

	public void setDiagnosaKeperawatan(DiagnosisKeperawatan diagnosaKeperawatan) {
		this.diagnosaKeperawatan = diagnosaKeperawatan;
	}

	public Integer getDiagnosaKeperawatanId() {
		return diagnosaKeperawatanId;
	}

	public void setDiagnosaKeperawatanId(Integer diagnosaKeperawatanId) {
		this.diagnosaKeperawatanId = diagnosaKeperawatanId;
	}

	public String getIsapLendir() {
		return isapLendir;
	}

	public void setIsapLendir(String isapLendir) {
		this.isapLendir = isapLendir;
	}

	public String getPasangOroPharsingAirway() {
		return pasangOroPharsingAirway;
	}

	public void setPasangOroPharsingAirway(String pasangOroPharsingAirway) {
		this.pasangOroPharsingAirway = pasangOroPharsingAirway;
	}

	public String getAturPosisi1() {
		return aturPosisi1;
	}

	public void setAturPosisi1(String aturPosisi1) {
		this.aturPosisi1 = aturPosisi1;
	}

	public String getAturPosisi2() {
		return aturPosisi2;
	}

	public void setAturPosisi2(String aturPosisi2) {
		this.aturPosisi2 = aturPosisi2;
	}

	public String getMonitorIntakeOutput() {
		return monitorIntakeOutput;
	}

	public void setMonitorIntakeOutput(String monitorIntakeOutput) {
		this.monitorIntakeOutput = monitorIntakeOutput;
	}

	public String getMonitorTtvdanSp021() {
		return monitorTtvdanSp021;
	}

	public void setMonitorTtvdanSp021(String monitorTtvdanSp021) {
		this.monitorTtvdanSp021 = monitorTtvdanSp021;
	}

	public String getMonitorTtvdanSp022() {
		return monitorTtvdanSp022;
	}

	public void setMonitorTtvdanSp022(String monitorTtvdanSp022) {
		this.monitorTtvdanSp022 = monitorTtvdanSp022;
	}

	public String getBerikanOksigen1() {
		return berikanOksigen1;
	}

	public void setBerikanOksigen1(String berikanOksigen1) {
		this.berikanOksigen1 = berikanOksigen1;
	}

	public String getBerikanOksigen2() {
		return berikanOksigen2;
	}

	public void setBerikanOksigen2(String berikanOksigen2) {
		this.berikanOksigen2 = berikanOksigen2;
	}

	public String getPasangInfus1() {
		return pasangInfus1;
	}

	public void setPasangInfus1(String pasangInfus1) {
		this.pasangInfus1 = pasangInfus1;
	}

	public String getPasangInfus2() {
		return pasangInfus2;
	}

	public void setPasangInfus2(String pasangInfus2) {
		this.pasangInfus2 = pasangInfus2;
	}

	public String getPasangEtt1() {
		return pasangEtt1;
	}

	public void setPasangEtt1(String pasangEtt1) {
		this.pasangEtt1 = pasangEtt1;
	}

	public String getPasangEtt2() {
		return pasangEtt2;
	}

	public void setPasangEtt2(String pasangEtt2) {
		this.pasangEtt2 = pasangEtt2;
	}

	public String getDefibrasi1() {
		return defibrasi1;
	}

	public void setDefibrasi1(String defibrasi1) {
		this.defibrasi1 = defibrasi1;
	}

	public String getDefibrasi2() {
		return defibrasi2;
	}

	public void setDefibrasi2(String defibrasi2) {
		this.defibrasi2 = defibrasi2;
	}

	public String getPemeriksaanLaboratorium() {
		return pemeriksaanLaboratorium;
	}

	public void setPemeriksaanLaboratorium(String pemeriksaanLaboratorium) {
		this.pemeriksaanLaboratorium = pemeriksaanLaboratorium;
	}

	public String getPemberiObat() {
		return pemberiObat;
	}

	public void setPemberiObat(String pemberiObat) {
		this.pemberiObat = pemberiObat;
	}

	public String getLainnya() {
		return lainnya;
	}

	public void setLainnya(String lainnya) {
		this.lainnya = lainnya;
	}

	public String getSkor() {
		return skor;
	}

	public void setSkor(String skor) {
		this.skor = skor;
	}

	public RuangPerawatanIGD getRuanganPerawat() {
		return ruanganPerawat;
	}

	public void setRuanganPerawat(RuangPerawatanIGD ruanganPerawat) {
		this.ruanganPerawat = ruanganPerawat;
	}

	public Integer getRuanganPerawatId() {
		return ruanganPerawatId;
	}

	public void setRuanganPerawatId(Integer ruanganPerawatId) {
		this.ruanganPerawatId = ruanganPerawatId;
	}
	
}
