package com.yihu.jw.entity.hospital.prescription;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;


/**
* 在线处方主表实体
*
* @author Administrator on  2019年05月16日
*
*/
@Entity
@Table(name = "wlyy_prescription")
public class WlyyPrescriptionDO extends UuidIdentityEntity {

    /**
     * 门诊记录说
     */
    private String outpatientId;

    /**
     *
     */
    private String realOrder;

    /**
     * his原始处方号
     */
    private String originRealOrder;

    /**
     * 就诊编号
     */
    private String admNo;

    /**
     * 原始就诊记录唯一编码
     */
    private String originAdmNo;

    /**
     * 挂号流水号
     */
    private String serialNo;

    /**
     * 序列号
     */
    private String originSerialNo;

    /**
     * 1 处方 2 续方
     */
    private Integer type;

    /**
     * 关联 居民表 code
     */
    private String patientCode;

    /**
     * 患者名称
     */
    private String patientName;

    /**
     * 居民身份证号
     */
    private String idcard;

    /**
     * 社保卡号
     */
    private String ssc;

    /**
     * 开处方的医生code 关联 wlyy_doctor
     */
    private String doctor;

    /**
     * 开处方的医生名称
     */
    private String doctorName;

    /**
     * 续方取消：-3 支付过期取消，-2 患者自己取消 ，-1 医生取消
     * 候诊中：0 候诊中
     * 就诊中：10 诊断中，11 药师审核失败 / 调整中，12  药师审核完成，13  开方失败/调整中
     * 待支付：20 诊断完成/开方成功/待支付，21 支付失败/待支付中
     * 待取药：30 支付成功/等待配药，31 配药成功/等待取药，32 配送中
     * 已完成：100 已完成/未评价
     */
    private Integer status;

    /**
     * 美康审方失败原因
     */
    private String mkFailReason;

    /**
     * 美康审方失败时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date mkTime;

    /**
     * 开方成功时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date prescribeTime;

    /**
     * 开方失败原因
     */
    private String prescribeReason;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date payTime;

    /**
     * 配药完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date dosageTime;

    /**
     * 配送员确认送达或居民确认取药的时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date finishTime;

    /**
     * 处方创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date createTime;

    /**
     * 开处方的科室code
     */
    private String dept;

    /**
     * 开处方的科室名称
     */
    private String deptName;

    /**
     * 开处方的医院 关联 dm_hospital code
     */
    private String hospital;

    /**
     * 开处方的医院 关联 dm_hospital name
     */
    private String hospitalName;

    /**
     * 咨询id 1对1
     */
    private String consult;

    /**
     * 取药类型:1 自取 2快递配送
     */
    private Integer dispensaryType;

    /**
     * 续方原因
     */
    private String reason;

    /**
     * 病症图片
     */
    private String diseaseImg;

    /**
     * 处方备注
     */
    private String remark;

    /**
     * 医生取消续方原因
     */
    private String cancelReason;

    /**
     * 处方结算状态，0为未结算，1为结算成功，默认为0
     */
    private Integer payStatus;
    /**
     * 发药医生/审方医生
     */
    private String dispUser;
    /**
     * 发药医生/审方医生 姓名
     */
    private String dispUserName;
    /**
     * 发药时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date dispDate;

    /**
     * 药品总价，单位元
     */
    private Double drugFee;

    /**
     * 检查检验总价，单位元
     */
    private Double inspectFee;

    /**
     * 诊查费，单位元
     */
    private Double regFee;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 订单id
     */
    private String orderId;

    /**
     * 审核状态0未审核1审核退回4审核通过
     */
    private Integer checkStatus;

    /**
     * 审方原因
     */
    private String checkReason;

    /**
     * 处理状态 1处方修改2执行处方
     */
    private Integer dealStatus;

    /**
     * 处理原因
     */
    private String dealReason;

    /**
     * 付款方式（0自费，1医保）
     */
    private Integer payType;

    /**
     * 是否签名
     */
    private Integer signFlag;

    /**
     * 单据号
     */
    private String voucherNo;

    private String diagnosisName;
    private String diagnosisSubName;

    private Date disableTime;


    @Column(name = "disable_time")
    public Date getDisableTime() {
        return disableTime;
    }

    public void setDisableTime(Date disableTime) {
        this.disableTime = disableTime;
    }

    /**
     * 处方审方唯一标识
     */
    private String hisId;
    @Column(name = "his_id")
    public String getHisId() {
        return hisId;
    }

    public void setHisId(String hisId) {
        this.hisId = hisId;
    }

    @Column(name = "outpatient_id")
    public String getOutpatientId() {
        return outpatientId;
    }

    public void setOutpatientId(String outpatientId) {
        this.outpatientId = outpatientId;
    }

    @Column(name = "real_order")
    public String getRealOrder() {
        return realOrder;
    }
    public void setRealOrder(String realOrder) {
        this.realOrder = realOrder;
    }

    @Column(name = "origin_real_order")
    public String getOriginRealOrder() {
        return originRealOrder;
    }
    public void setOriginRealOrder(String originRealOrder) {
        this.originRealOrder = originRealOrder;
    }

    @Column(name = "adm_no")
    public String getAdmNo() {
        return admNo;
    }
    public void setAdmNo(String admNo) {
        this.admNo = admNo;
    }

    @Column(name = "origin_adm_no")
    public String getOriginAdmNo() {
        return originAdmNo;
    }
    public void setOriginAdmNo(String originAdmNo) {
        this.originAdmNo = originAdmNo;
    }

    @Column(name = "serial_no")
    public String getSerialNo() {
        return serialNo;
    }
    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    @Column(name = "origin_serial_no")
    public String getOriginSerialNo() {
        return originSerialNo;
    }

    public void setOriginSerialNo(String originSerialNo) {
        this.originSerialNo = originSerialNo;
    }

    @Column(name = "type")
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }

    @Column(name = "patient_code")
    public String getPatientCode() {
        return patientCode;
    }
    public void setPatientCode(String patientCode) {
        this.patientCode = patientCode;
    }

    @Column(name = "patient_name")
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    @Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    @Column(name = "ssc")
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }

    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }
    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }

    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }
    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "mk_fail_reason")
    public String getMkFailReason() {
        return mkFailReason;
    }
    public void setMkFailReason(String mkFailReason) {
        this.mkFailReason = mkFailReason;
    }

    @Column(name = "mk_time")
    public Date getMkTime() {
        return mkTime;
    }
    public void setMkTime(Date mkTime) {
        this.mkTime = mkTime;
    }

    @Column(name = "prescribe_time")
    public Date getPrescribeTime() {
        return prescribeTime;
    }
    public void setPrescribeTime(Date prescribeTime) {
        this.prescribeTime = prescribeTime;
    }

    @Column(name = "prescribe_reason")
    public String getPrescribeReason() {
        return prescribeReason;
    }
    public void setPrescribeReason(String prescribeReason) {
        this.prescribeReason = prescribeReason;
    }

    @Column(name = "pay_time")
    public Date getPayTime() {
        return payTime;
    }
    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    @Column(name = "dosage_time")
    public Date getDosageTime() {
        return dosageTime;
    }
    public void setDosageTime(Date dosageTime) {
        this.dosageTime = dosageTime;
    }

    @Column(name = "finish_time")
    public Date getFinishTime() {
        return finishTime;
    }
    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Column(name = "dept")
    public String getDept() {
        return dept;
    }
    public void setDept(String dept) {
        this.dept = dept;
    }

    @Column(name = "dept_name")
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    @Column(name = "hospital")
    public String getHospital() {
        return hospital;
    }
    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }
    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    @Column(name = "consult")
    public String getConsult() {
        return consult;
    }
    public void setConsult(String consult) {
        this.consult = consult;
    }

    @Column(name = "dispensary_type")
    public Integer getDispensaryType() {
        return dispensaryType;
    }
    public void setDispensaryType(Integer dispensaryType) {
        this.dispensaryType = dispensaryType;
    }

    @Column(name = "reason")
    public String getReason() {
        return reason;
    }
    public void setReason(String reason) {
        this.reason = reason;
    }

    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name = "cancel_reason")
    public String getCancelReason() {
        return cancelReason;
    }
    public void setCancelReason(String cancelReason) {
        this.cancelReason = cancelReason;
    }


    @Column(name = "pay_status")
    public Integer getPayStatus() {
        return payStatus;
    }
    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    @Column(name = "disease_img")
    public String getDiseaseImg() {
        return diseaseImg;
    }

    public void setDiseaseImg(String diseaseImg) {
        this.diseaseImg = diseaseImg;
    }
    @Column(name = "disp_user")
    public String getDispUser() {
        return dispUser;
    }

    public void setDispUser(String dispUser) {
        this.dispUser = dispUser;
    }
    @Column(name = "disp_user_name")
    public String getDispUserName() {
        return dispUserName;
    }

    public void setDispUserName(String dispUserName) {
        this.dispUserName = dispUserName;
    }
    @Column(name = "disp_date")
    public Date getDispDate() {
        return dispDate;
    }

    public void setDispDate(Date dispDate) {
        this.dispDate = dispDate;
    }

    @Column(name = "drug_fee")
    public Double getDrugFee() {
        return drugFee;
    }

    public void setDrugFee(Double drugFee) {
        this.drugFee = drugFee;
    }

    @Column(name = "inspect_fee")
    public Double getInspectFee() {
        return inspectFee;
    }

    public void setInspectFee(Double inspectFee) {
        this.inspectFee = inspectFee;
    }

    @Column(name = "reg_fee")
    public Double getRegFee() {
        return regFee;
    }

    public void setRegFee(Double regFee) {
        this.regFee = regFee;
    }

    @Column(name = "order_no")
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    @Column(name = "order_id")
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Column(name = "check_status")
    public Integer getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(Integer checkStatus) {
        this.checkStatus = checkStatus;
    }

    @Column(name = "check_reason")
    public String getCheckReason() {
        return checkReason;
    }

    public void setCheckReason(String checkReason) {
        this.checkReason = checkReason;
    }

    @Column(name = "deal_status")
    public Integer getDealStatus() {
        return dealStatus;
    }

    public void setDealStatus(Integer dealStatus) {
        this.dealStatus = dealStatus;
    }

    @Column(name = "deal_reason")
    public String getDealReason() {
        return dealReason;
    }

    public void setDealReason(String dealReason) {
        this.dealReason = dealReason;
    }

    @Column(name = "pay_type")
    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    @Column(name = "sign_flag")
    public Integer getSignFlag() {
        return signFlag;
    }

    public void setSignFlag(Integer signFlag) {
        this.signFlag = signFlag;
    }

    @Column(name = "voucher_no")
    public String getVoucherNo() {
        return voucherNo;
    }

    public void setVoucherNo(String voucherNo) {
        this.voucherNo = voucherNo;
    }

    @Transient
    public String getDiagnosisName() {
        return diagnosisName;
    }

    public void setDiagnosisName(String diagnosisName) {
        this.diagnosisName = diagnosisName;
    }

    @Transient
    public String getDiagnosisSubName() {
        return diagnosisSubName;
    }

    public void setDiagnosisSubName(String diagnosisSubName) {
        this.diagnosisSubName = diagnosisSubName;
    }
}