package com.jasamedika.medifirst2000.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 *  class MedicalRecordTransaction
 * 
 * @author Generator
 */
@MappedSuperclass	
public class MedicalRecordTransaction extends BaseTransaction {
	@Caption(value="Tanggal Registrasi")
	@Column(name = "TglRegistrasi", nullable = true )
	private Date tglRegistrasi;
	
	public Date getTanggalPendaftaran() {
		return tglRegistrasi;
	}

	public void setTanggalPendaftaran(Date tanggalPendaftaran) {
		this.tglRegistrasi = tanggalPendaftaran;
	}
	
	@ManyToOne
	@JoinColumn(name = "NoRegistrasiFk")
	@NotNull(message="No Registrasi Harus Diisi")
	@Caption(value="No Registrasi")
	private AntrianPasienDiPeriksa pasienDaftar;

	public void setPasien(AntrianPasienDiPeriksa pasienDaftar) {
		this.pasienDaftar = pasienDaftar;
	}

	@Column(name = "NoRegistrasi", nullable = false , length = 15)
	public AntrianPasienDiPeriksa getPasien(){
		return this.pasienDaftar;
	}
	@Column(name = "NoRegistrasiFk", insertable=false,updatable=false)
	private String pasienDaftarId;
}

