package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
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 = "AsuhanKeperawatanPeriOperasiHeader_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class AsuhanKeperawatanPeriOperasiHeader extends BaseTransaction {

	@Column(name = "NoTrans", length = 20)
	private String noTrans;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPasienFk")
	@NotNull(message = "Pasien tidak boleh kosong")
	private AntrianPasienDiPeriksa pasienDaftar;

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

	@Column(name = "DiagnosaPreOperasi", length = 100)
	private String diagnosaPreOperasi;

	@Column(name = "Tindakan", length = 100)
	private String tindakan;

	@Column(name = "DiagnosaPostOperasi", length = 100)
	private String diagnosaPostOperasi;

	@ManyToOne
	@Caption("DokterBedah")
	@JoinColumn(name = "DokterBedahFk")
	private Pegawai dokterBedah;

	@Column(name = "DokterBedahFk", insertable = false, updatable = false)
	private Integer dokterId;

	@ManyToOne
	@Caption("AsistenBedah")
	@JoinColumn(name = "AsistenBedahFk")
	private Pegawai asistenBedah;

	@Column(name = "AsistenBedahFk", insertable = false, updatable = false)
	private Integer asistenBedahId;

	@ManyToOne
	@Caption("PerawatInstrumen1")
	@JoinColumn(name = "PerawatInstrumen1Fk")
	private Pegawai perawatInstrumen1;

	@Column(name = "PerawatInstrumen1Fk", insertable = false, updatable = false)
	private Integer perawatInstrumen1Id;

	@ManyToOne
	@Caption("PerawatInstrumen2")
	@JoinColumn(name = "PerawatInstrumen2Fk")
	private Pegawai perawatInstrument2;

	@Column(name = "PerawatInstrumen2Fk", insertable = false, updatable = false)
	private Integer perawatInstrument2Id;

	@ManyToOne
	@Caption("PerawatSirkuler")
	@JoinColumn(name = "PerawatSirkulerFk")
	private Pegawai perawatSirkuler;

	@Column(name = "PerawatSirkulerFk", insertable = false, updatable = false)
	private Integer perawatSirkulerId;

	@ManyToOne
	@Caption("OperatorAlatCanggih")
	@JoinColumn(name = "OperatorAlatCanggihFk")
	private Pegawai operatorAlatCanggih;

	@Column(name = "OperatorAlatCanggihFk", insertable = false, updatable = false)
	private Integer operatorAlatCanggihId;

	@Column(name = "OperasiMulai", length = 10)
	private String operasiMulai;

	@Column(name = "OperasiSelesai", length = 10)
	private String operasiSelesai;

	@Column(name = "JamMasukOperasi", length = 10)
	private String jamMasukOperasi;

	@Column(name = "tanggal")
	private Date tanggal;

	@Column(name = "jam", length = 10)
	private String jam;

	@Column(name = "tglTindakan", length = 150)
	private Date tglTindakan;

	@Column(name = "TeknikAnestesi", length = 150)
	private String teknikAnestesi;

	@Column(name = "ProsedurOperasi", length = 150)
	private String prosedurOperasi;

	@Column(name = "Anestesiologi", length = 150)
	private String anestesiologi;

	@Column(name = "PenataAnestesi", length = 150)
	private String penataAnestesi;

}
