package com.jasamedika.medifirst2000.entities;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import com.jasamedika.medifirst2000.entities.ProdukDetailLaboratorium;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;

import javax.validation.constraints.NotNull;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;

/**
 * class HasilPemeriksaan
 * 
 * @author Generator
 */
@Entity //@Audited
@Table(name = "HasilPemeriksaan_T")
public class HasilPemeriksaan extends BaseTransaction {
	@Column(name = "statusVerifikasi", nullable = true, length = 500)
	@Caption(value = "statusVerifikasi")
	private Byte statusVerifikasi;
	
	@JsonBackReference
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "hasilPemeriksaan")
	private Set<HasilPemeriksaanDuplo> hasilPemeriksaanDuploSet=new HashSet<HasilPemeriksaanDuplo>();
	
	public Set<HasilPemeriksaanDuplo> getHasilPemeriksaanDuploSet() {
		return hasilPemeriksaanDuploSet;
	}

	public void setHasilPemeriksaanDuploSet(Set<HasilPemeriksaanDuplo> hasilPemeriksaanDuploSet) {
		this.hasilPemeriksaanDuploSet = hasilPemeriksaanDuploSet;
	}

	public String getNilaiNormal() {
		
		return nilaiNormal;
	}

	public void setNilaiNormal(String nilaiNormal) {
		this.nilaiNormal = nilaiNormal;
	}

	public Byte getStatusVerifikasi() {
		return statusVerifikasi;
	}

	public void setStatusVerifikasi(Byte statusVerifikasi) {
		this.statusVerifikasi = statusVerifikasi;
	}

	public StrukHasilPemeriksaan getStrukHasilPemeriksaan() {
		return strukHasilPemeriksaan;
	}
	@Column(name = "nilaiNormal", nullable = true, length = 500)
	@Caption(value = "Nilai Normal")
	private String nilaiNormal;
	
	@Column(name = "Koment", nullable = true, length = 500)
	@Caption(value = "Koment")
	private String comment;
	
	
	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}
	
	@Column(name = "Expertise", nullable = true, length = 500)
	@Caption(value = "Expertise")
	private String expertise;

	
	@Column(name = "Klinis", nullable = true, length = 500)
	@Caption(value = "Klinis")
	private String klinis;
	
	public String getExpertise() {
		return expertise;
	}

	public void setExpertise(String expertise) {
		this.expertise = expertise;
	}

	public String getKlinis() {
		return klinis;
	}

	public void setKlinis(String klinis) {
		this.klinis = klinis;
	}

	
	@ManyToOne
	@JoinColumn(name = "ProdukFk")
	@NotNull(message = "Produk Harus Diisi")
	@Caption(value = "Produk")
	private Produk  produk;
	
	
	public Produk getProduk() {
		return produk;
	}

	public void setProduk(Produk produk) {
		this.produk = produk;
	}

	@Column(name = "ProdukFk", insertable = false, updatable = false)
	private Integer produkId;
	
	
	@ManyToOne
	@JoinColumn(name = "StrukHasilFk")
	@NotNull(message = "Struk Hasil Harus Diisi")
	@Caption(value = "Struk Hasil")
	private StrukHasilPemeriksaan  strukHasilPemeriksaan;
	
	public StrukHasilPemeriksaan getstrukHasilPemeriksaan() {
		return strukHasilPemeriksaan;
	}

	public void setStrukHasilPemeriksaan(StrukHasilPemeriksaan strukHasilPemeriksaan) {
		this.strukHasilPemeriksaan = strukHasilPemeriksaan;
	}

	@Column(name = "StrukHasilFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String strukHasilPemeriksaanId;
	
	@ManyToOne
	@JoinColumn(name = "DetailFk")
	
	@Caption(value = "Detail")
	private ProdukDetailLaboratorium detail;

	public ProdukDetailLaboratorium getDetail() {
		return detail;
	}

	public void setDetail(ProdukDetailLaboratorium detail) {
		this.detail = detail;
	}

	@Column(name = "DetailFk", insertable = false, updatable = false,nullable=true)
	private Integer detailId;

	@Column(name = "Hasil", nullable = false, length = 100)
	@Caption(value = "Hasil")
	private String hasil;

	public String getHasil() {
		return hasil;
	}

	public void setHasil(String hasil) {
		this.hasil = hasil;
	}

	public Integer getProdukId() {
		return produkId;
	}

	public void setProdukId(Integer produkId) {
		this.produkId = produkId;
	}

	public String getStrukHasilPemeriksaanId() {
		return strukHasilPemeriksaanId;
	}

	public void setStrukHasilPemeriksaanId(String strukHasilPemeriksaanId) {
		this.strukHasilPemeriksaanId = strukHasilPemeriksaanId;
	}

	public Integer getDetailId() {
		return detailId;
	}

	public void setDetailId(Integer detailId) {
		this.detailId = detailId;
	}

	@Column(name = "Satuan", nullable = true, length = 30)
	@Caption(value = "Satuan")
	private String satuan;
	
	@Column(name = "Urutan", nullable = true, length = 30)
	@Caption(value = "Urutan")
	private String urutan;

	@Column(name = "Flag", nullable = true, length = 20)
	@Caption(value = "Flag")
	private String flag; 
	
	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getSatuan() {
		return satuan;
	}

	public void setSatuan(String satuan) {
		this.satuan = satuan;
	}

	public String getUrutan() {
		return urutan;
	}

	public void setUrutan(String urutan) {
		this.urutan = urutan;
	}
	
	
}