package com.jasamedika.medifirst2000.entities;

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.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;

@Entity //@Audited
@Table(name = "DetailDiagnosaSekunder_T")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class DetailDiagnosaSekunder extends BaseTransaction {
	
	@ManyToOne
	@JoinColumn(name = "DiagnosaFk")
	@NotNull(message = "Diagnosa tidak boleh kosong")
	private Diagnosa diagnosa ;
	
	@Column(name = "DiagnosaFk", insertable = false, updatable = false)
	private Integer diagnosaId;
	
	@ManyToOne
	@JoinColumn(name = "TransferPasienInternalFk", nullable=true)	
	private TransferPasienInternal transferPasienInternal;
	
	@Column(name = "TransferPasienInternalFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String transferPasienInternalId;

	public Diagnosa getDiagnosa() {
		return diagnosa;
	}

	public void setDiagnosa(Diagnosa diagnosa) {
		this.diagnosa = diagnosa;
	}

	public Integer getDiagnosaId() {
		return diagnosaId;
	}

	public void setDiagnosaId(Integer diagnosaId) {
		this.diagnosaId = diagnosaId;
	}

	public TransferPasienInternal getTransferPasienInternal() {
		return transferPasienInternal;
	}

	public void setTransferPasienInternal(TransferPasienInternal transferPasienInternal) {
		this.transferPasienInternal = transferPasienInternal;
	}

	public String getTransferPasienInternalId() {
		return transferPasienInternalId;
	}

	public void setTransferPasienInternalId(String transferPasienInternalId) {
		this.transferPasienInternalId = transferPasienInternalId;
	}

}
