package com.jasamedika.medifirst2000.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;

@Entity //@Audited
@Table(name="PapDiagnosis_T")
public class PapDiagnosis extends BaseTransaction{
	/**
	 * @author andri
	 */
	@ManyToOne
	@JoinColumn(name = "ObjectRegistrasiPelayananPasienFk")
	@NotNull(message = "RegistrasiPelayananPasien tidak boleh kosong")
	private RegistrasiPelayananPasien registrasiPelayananPasien;
	
	@Column(name = "ObjectRegistrasiPelayananPasienFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String registrasiPelayananPasienId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectPasienFk")
	@NotNull(message = "Pasien tidak boleh kosong")
	private Pasien pasien;	
	
	@Column(name = "ObjectPasienFk", insertable = false, updatable = false, nullable = false)
	private Integer pasienId;
	
	@NotNull(message = "Tgl Input tidak boleh kosong")
	@Column(name = "tglInput", nullable = false)
	@Caption(value = "Tgl Input")
	private Date tglInput;

	@ManyToOne
	@JoinColumn(name = "ObjectDiagnosaFk")
	@NotNull(message = "Diagnosa tidak boleh kosong")
	private Diagnosa diagnosa;
	
	@Column(name = "ObjectDiagnosaFk", insertable = false, updatable = false, nullable = false)
	private Integer diagnosaId;
	
	@NotNull(message = "Kode ICD tidak boleh kosong")
	@Column(name = "kodeIcd", nullable = false)
	@Caption(value = "Kode ICD")
	private String kodeIcd;

	@NotNull(message = "ICD tidak boleh kosong")
	@Column(name = "icd", nullable = false)
	@Caption(value = "ICD")
	private String icd;
	
	public Diagnosa getDiagnosa() {
		return diagnosa;
	}
	public void setDiagnosa(Diagnosa diagnosa) {
		this.diagnosa = diagnosa;
	}
	public Pasien getPasien() {
		return pasien;
	}
	public void setPasien(Pasien pasien) {
		this.pasien = pasien;
	}
	public RegistrasiPelayananPasien getRegistrasiPelayananPasien() {
		return registrasiPelayananPasien;
	}
	public void setRegistrasiPelayananPasien(RegistrasiPelayananPasien registrasiPelayananPasien) {
		this.registrasiPelayananPasien = registrasiPelayananPasien;
	}
	public Date getTglInput() {
		return tglInput;
	}
	public void setTglInput(Date tglInput) {
		this.tglInput = tglInput;
	}
	public String getIcd() {
		return icd;
	}
	public void setIcd(String icd) {
		this.icd = icd;
	}
	
}
