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.helper.Caption;

@Entity
@Table(name = "PelayananPasienDetail_T")
public class PelayananPasienDetail extends MedicalRecordTransaction {
		
	@ManyToOne
	@JoinColumn(name = "Generik")	
	@Caption(value = "Generik")
	private Generik generik;

	@Column(name = "Generik", insertable = false, updatable = false,nullable=true)
	private Integer generikId;
	
	@Caption(value = "statusOrder")
	@Column(name = "statusOrder")
	private Byte statusOrder;
	
	@ManyToOne
	@JoinColumn(name = "KomponenHargaFk")
	@NotNull(message = "Struk Order Harus Diisi")
	@Caption(value = "Komponen Harga")
	private KomponenHarga komponenHarga;

	@Caption(value = "Tanggal Pelayanan")
	@Column(name = "TglPelayanan")
	private Date tglPelayanan;
	
	@Caption(value = "jasa")
	@Column(name = "jasa")
	private Double jasa;
	
	@Column(name = "KomponenHargaFk", insertable = false, updatable = false)
	private Integer komponenHargaId;

	@Caption(value = "Harga Satuan")
	@Column(name = "hargaSatuan")
	private Double hargaSatuan;
	
	@Caption(value = "Harga Jual")
	@Column(name = "HargaJual")
	private Double hargaJual;

	@Caption(value = "Nilai Normal")
	@Column(name = "NilaiNormal")
	private Boolean nilaiNormal;
	
	@Caption(value = "Harga Discount")
	@Column(name = "hargaDiscount")
	private Double hargaDiscount;

	@Caption(value = "Piutang Penjamin")
	@Column(name = "piutangPenjamin")
	private Double piutangPenjamin;
	
	@Caption(value = "Piutang Rumah Sakit")
	@Column(name = "piutangRumahSakit")
	private Double piutangRumahSakit;
	
	@ManyToOne
	@JoinColumn(name = "StrukOrderFk")
	@Caption(value = "Struk Order")
	private StrukOrder strukOrder;

	@Column(name = "StrukOrderFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String strukOrderId;
	
	@ManyToOne
	@JoinColumn(name = "JenisObatFk")
	@Caption(value = "Jenis Obat")
	private JenisObat jenisObat;

	@Column(name = "JenisObatFk", insertable = false, updatable = false)
	private Integer jenisObatId;

	@ManyToOne
	@JoinColumn(name = "ProdukFk")
	@NotNull(message = "Produk Harus Diisi")
	@Caption(value = "Produk")
	private Produk produk;
	
	@Column(name = "ProdukFk", insertable = false, updatable = false)
	private Integer produkId;
	
	@ManyToOne
	@JoinColumn(name = "PelayananPasien")
	@NotNull(message = "Pelayanan Pasien Tidak boleh Kosong")
	@Caption(value = "PelayananPasien")
	private PelayananPasien pelayananPasien;

	@Column(name = "PelayananPasien", columnDefinition = "CHAR(32)", insertable = false, updatable = false,nullable=false)
	private String pelayananPasienId;
	
	@Column(name = "Stock",  length = 100)
	@Caption(value = "Stock")
	private Integer stock;

	@NotNull(message="jumlah Tidak boleh Kosong")
	@Column(name = "Jumlah", nullable = false, length = 100)
	@Caption(value = "Jumlah")
	private Double jumlah;

	@Column(name = "AturanPakai",  length = 100)
	@Caption(value = "AturanPakai")
	private String aturanPakai;

	@ManyToOne
	@JoinColumn(name = "RouteFk")
	@Caption(value = "Route")
	private RouteFarmasi route;

	@Column(name = "RouteFk", insertable = false, updatable = false)
	private Integer routeId;
	
	@ManyToOne
	@JoinColumn(name = "KeteranganPakaiFk")
	@Caption(value = "Keterangan Pakai")
	private Stigma keteranganPakai;

	@Column(name = "KeteranganPakaiFk", insertable = false, updatable = false)
	private Integer keteranganPakaiId;
	
	@Column(name = "KeteranganPakai2",  length = 100)
	@Caption(value = "KeteranganPakai2")
	private String keteranganPakai2;

	@Column(name = "KeteranganLain",  length = 100)
	@Caption(value = "KeteranganLain")
	private String keteranganLain;

	@Caption(value = "hargaNetto")
	@Column(name = "hargaNetto")
	private Double hargaNetto;
	
	@Caption(value = "NoRecTriger")
	@Column(name = "noRecTriger", nullable = true)
	private String noRecTriger;

	public Generik getGenerik() {
		return generik;
	}

	public void setGenerik(Generik generik) {
		this.generik = generik;
	}

	public Integer getGenerikId() {
		return generikId;
	}

	public void setGenerikId(Integer generikId) {
		this.generikId = generikId;
	}

	public Byte getStatusOrder() {
		return statusOrder;
	}

	public void setStatusOrder(Byte statusOrder) {
		this.statusOrder = statusOrder;
	}

	public KomponenHarga getKomponenHarga() {
		return komponenHarga;
	}

	public void setKomponenHarga(KomponenHarga komponenHarga) {
		this.komponenHarga = komponenHarga;
	}

	public Date getTglPelayanan() {
		return tglPelayanan;
	}

	public void setTglPelayanan(Date tglPelayanan) {
		this.tglPelayanan = tglPelayanan;
	}

	public Integer getKomponenHargaId() {
		return komponenHargaId;
	}

	public void setKomponenHargaId(Integer komponenHargaId) {
		this.komponenHargaId = komponenHargaId;
	}

	public Double getHargaSatuan() {
		return hargaSatuan;
	}

	public void setHargaSatuan(Double hargaSatuan) {
		this.hargaSatuan = hargaSatuan;
	}

	public Double getHargaJual() {
		return hargaJual;
	}

	public void setHargaJual(Double hargaJual) {
		this.hargaJual = hargaJual;
	}

	public Boolean getNilaiNormal() {
		return nilaiNormal;
	}

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

	public Double getHargaDiscount() {
		return hargaDiscount;
	}

	public void setHargaDiscount(Double hargaDiscount) {
		this.hargaDiscount = hargaDiscount;
	}

	public Double getPiutangPenjamin() {
		return piutangPenjamin;
	}

	public void setPiutangPenjamin(Double piutangPenjamin) {
		this.piutangPenjamin = piutangPenjamin;
	}

	public Double getPiutangRumahSakit() {
		return piutangRumahSakit;
	}

	public void setPiutangRumahSakit(Double piutangRumahSakit) {
		this.piutangRumahSakit = piutangRumahSakit;
	}

	public StrukOrder getStrukOrder() {
		return strukOrder;
	}

	public void setStrukOrder(StrukOrder strukOrder) {
		this.strukOrder = strukOrder;
	}

	public String getStrukOrderId() {
		return strukOrderId;
	}

	public void setStrukOrderId(String strukOrderId) {
		this.strukOrderId = strukOrderId;
	}

	public JenisObat getJenisObat() {
		return jenisObat;
	}

	public void setJenisObat(JenisObat jenisObat) {
		this.jenisObat = jenisObat;
	}

	public Integer getJenisObatId() {
		return jenisObatId;
	}

	public void setJenisObatId(Integer jenisObatId) {
		this.jenisObatId = jenisObatId;
	}

	public Produk getProduk() {
		return produk;
	}

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

	public PelayananPasien getPelayananPasien() {
		return pelayananPasien;
	}

	public void setPelayananPasien(PelayananPasien pelayananPasien) {
		this.pelayananPasien = pelayananPasien;
	}

	public String getPelayananPasienId() {
		return pelayananPasienId;
	}

	public void setPelayananPasienId(String pelayananPasienId) {
		this.pelayananPasienId = pelayananPasienId;
	}

	public Integer getProdukId() {
		return produkId;
	}

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

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	public Double getJumlah() {
		return jumlah;
	}

	public void setJumlah(Double jumlah) {
		this.jumlah = jumlah;
	}

	public String getAturanPakai() {
		return aturanPakai;
	}

	public void setAturanPakai(String aturanPakai) {
		this.aturanPakai = aturanPakai;
	}

	public RouteFarmasi getRoute() {
		return route;
	}

	public void setRoute(RouteFarmasi route) {
		this.route = route;
	}

	public Integer getRouteId() {
		return routeId;
	}

	public void setRouteId(Integer routeId) {
		this.routeId = routeId;
	}

	public Stigma getKeteranganPakai() {
		return keteranganPakai;
	}

	public void setKeteranganPakai(Stigma keteranganPakai) {
		this.keteranganPakai = keteranganPakai;
	}

	public Integer getKeteranganPakaiId() {
		return keteranganPakaiId;
	}

	public void setKeteranganPakaiId(Integer keteranganPakaiId) {
		this.keteranganPakaiId = keteranganPakaiId;
	}

	public String getKeteranganPakai2() {
		return keteranganPakai2;
	}

	public void setKeteranganPakai2(String keteranganPakai2) {
		this.keteranganPakai2 = keteranganPakai2;
	}

	public String getKeteranganLain() {
		return keteranganLain;
	}

	public void setKeteranganLain(String keteranganLain) {
		this.keteranganLain = keteranganLain;
	}

	public Double getHargaNetto() {
		return hargaNetto;
	}

	public void setHargaNetto(Double hargaNetto) {
		this.hargaNetto = hargaNetto;
	}

	public String getNoRecTriger() {
		return noRecTriger;
	}

	public void setNoRecTriger(String noRecTriger) {
		this.noRecTriger = noRecTriger;
	}


}