package com.jasamedika.medifirst2000.vo;

import java.sql.Date;
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 javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.helper.Caption;

public class RiwayatKesehatanVO extends MedicalRecordTransactionVO{
	
	@Column(name = "pernahDirawat", nullable = true)
	@Caption(value = "pernahDirawat")
	private boolean pernahDirawat;
	
	@Column(name = "terpasangAlatImplan", nullable = true)
	@Caption(value = "terpasangAlatImplan")
	private boolean terpasangAlatImplan;
	
	@Column(name = "riwayatPenyakitMayor", nullable = true)
	@Caption(value = "riwayatPenyakitMayor")
	private boolean riwayatPenyakitMayor;
	
	@ManyToOne
	@JoinColumn(name = "ObjectDataPenyakitMayorFk")
	@Caption(value = "ID DataPenyakitMayor")
	//@NotNull(message = "ID HasilTriase tidak boleh kosong")
	private DataPenyakitMayorVO dataPenyakitMayor;
	
	@Column(name = "keterangan", nullable = true)
	@Caption(value = "keterangan")
	private String keterangan;
	
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "riwayatKesehatan")
	private Set<PernahDirawatDetailVO> pernahDirawatDetail = new HashSet<PernahDirawatDetailVO>();

	public boolean isPernahDirawat() {
		return pernahDirawat;
	}

	public void setPernahDirawat(boolean pernahDirawat) {
		this.pernahDirawat = pernahDirawat;
	}

	public boolean isTerpasangAlatImplan() {
		return terpasangAlatImplan;
	}

	public void setTerpasangAlatImplan(boolean terpasangAlatImplan) {
		this.terpasangAlatImplan = terpasangAlatImplan;
	}

	public boolean isRiwayatPenyakitMayor() {
		return riwayatPenyakitMayor;
	}

	public void setRiwayatPenyakitMayor(boolean riwayatPenyakitMayor) {
		this.riwayatPenyakitMayor = riwayatPenyakitMayor;
	}

	public DataPenyakitMayorVO getDataPenyakitMayor() {
		return dataPenyakitMayor;
	}

	public void setDataPenyakitMayor(DataPenyakitMayorVO dataPenyakitMayor) {
		this.dataPenyakitMayor = dataPenyakitMayor;
	}

	public String getKeterangan() {
		return keterangan;
	}

	public void setKeterangan(String keterangan) {
		this.keterangan = keterangan;
	}

	public Set<PernahDirawatDetailVO> getPernahDirawatDetail() {
		return pernahDirawatDetail;
	}

	public void setPernahDirawatDetail(Set<PernahDirawatDetailVO> pernahDirawatDetail) {
		this.pernahDirawatDetail = pernahDirawatDetail;
	}
	
	
	
}
