package com.yihu.jw.entity.door;

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

import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 上门服务开方表
 *
 * @author humingfen on  2019年07月24日
 *
 */
@Entity
@Table(name = "wlyy_door_prescription")
@SequenceGenerator(name="id_generated", sequenceName="wlyy_door_prescription")
public class WlyyDoorPrescriptionDO extends IntegerIdentityEntity {

    private String code ;//业务标识
//    private String number;//线上单号
    private String orderId;//工单id
    private String recipeNo;//基位处方code（开方成功后返回）
    private String visitNo;//挂号号
    private String diagnosisCode;//诊断的病种code
    private String diagnosisName;//诊断名称
    private String diagnosisSubCode;//次诊断的病种code
    private String diagnosisSubName;//次诊断名称
    private String remark;//处方备注
    private Integer status;//-1 审核不通过,30 开方中/药师审核成功,40开方完成/待支付 ,50 支付成功/待配药
    private String hospital;  //基卫-开处方的医院编码
    private String hospitalName; //开方机构名称
    private String doctorCode; //基卫-开方医生的编码
    private String doctorName;//医生名字

    private String jwDeptCode;  //基卫-开处方的科室编码
    private String jwHospital;  //基卫-开处方的医院编码
    private String jwDoctorCode; //基卫-开方医生的编码
    private BigDecimal jwRegisterFee; //基卫-诊金
    private Integer jwPayStatus;//处方结算状态，0为未结算，1为结算成功，默认为0

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date visitTime; //处方建立时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date createTime;               //处方创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date payTime;                   //支付时间
    private Integer dispensaryType;  //取药类型:1 自取 2快递配送 3健管师配送'
    private Integer isAfterDoor;//创建处方状态（1上门前开方 2上门后开方）
    private String reason;//取消处方原因
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date updateTime;               //取消处方时间

    private String patient;//居民code
    private String patientName;//居民名称
    private String ssc;//居民社保卡号
    private Long adminTeamId;//患者签约的行政团队
    private String visitDept; //挂号科室编码
    private String visitDeptName;//挂号科室名称
    private String registerType;//基卫-挂号类型编码
    private String registerTypeName;//挂号类别名称
    private String rateType;//挂号费别编码
    private String rateTypeName;//挂号费别名称
//    private Date validStartTime; //有效起始时间
//    private Date validEndTime;//有效截止时间
    private String digitalSignNo;//CA数字签名唯一流水号
    private String originalDataAbstract;//原文的MD5摘要
    private String strOriginalData; //CA原文数据
    private String caCertData;                  //ca加密信息（签名证书主题数据）
    private String caMessage;                   //ca指纹信息（签名值）

    private List<WlyyDoorPrescriptionDrugDO> recipeDetailList;

    @Transient
    public List<WlyyDoorPrescriptionDrugDO> getRecipeDetailList() {
        return recipeDetailList;
    }

    public void setRecipeDetailList(List<WlyyDoorPrescriptionDrugDO> recipeDetailList) {
        this.recipeDetailList = recipeDetailList;
    }

    public String getPatient() {
        return patient;
    }

    public void setPatient(String patient) {
        this.patient = patient;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public String getSsc() {
        return ssc;
    }

    public void setSsc(String ssc) {
        this.ssc = ssc;
    }

    public String getHospital() {
        return hospital;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    public String getHospitalName() {
        return hospitalName;
    }

    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    public String getDoctorCode() {
        return doctorCode;
    }

    public void setDoctorCode(String doctorCode) {
        this.doctorCode = doctorCode;
    }

    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    public Integer getDispensaryType() {
        return dispensaryType;
    }

    public void setDispensaryType(Integer dispensaryType) {
        this.dispensaryType = dispensaryType;
    }

    public String getOrderId() {
        return orderId;
    }

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

    public String getRecipeNo() {
        return recipeNo;
    }

    public void setRecipeNo(String recipeNo) {
        this.recipeNo = recipeNo;
    }

    public String getDiagnosisCode() {
        return diagnosisCode;
    }

    public void setDiagnosisCode(String diagnosisCode) {
        this.diagnosisCode = diagnosisCode;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getJwDeptCode() {
        return jwDeptCode;
    }

    public void setJwDeptCode(String jwDeptCode) {
        this.jwDeptCode = jwDeptCode;
    }

    public String getJwHospital() {
        return jwHospital;
    }

    public void setJwHospital(String jwHospital) {
        this.jwHospital = jwHospital;
    }

    public String getJwDoctorCode() {
        return jwDoctorCode;
    }

    public void setJwDoctorCode(String jwDoctorCode) {
        this.jwDoctorCode = jwDoctorCode;
    }

    public BigDecimal getJwRegisterFee() {
        return jwRegisterFee;
    }

    public void setJwRegisterFee(BigDecimal jwRegisterFee) {
        this.jwRegisterFee = jwRegisterFee;
    }

    public Integer getJwPayStatus() {
        return jwPayStatus;
    }

    public void setJwPayStatus(Integer jwPayStatus) {
        this.jwPayStatus = jwPayStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getDiagnosisName() {
        return diagnosisName;
    }

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

    public Date getVisitTime() {
        return visitTime;
    }

    public void setVisitTime(Date visitTime) {
        this.visitTime = visitTime;
    }

    public Integer getIsAfterDoor() {
        return isAfterDoor;
    }

    public void setIsAfterDoor(Integer isAfterDoor) {
        this.isAfterDoor = isAfterDoor;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getVisitNo() {
        return visitNo;
    }

    public void setVisitNo(String visitNo) {
        this.visitNo = visitNo;
    }

    public String getDiagnosisSubCode() {
        return diagnosisSubCode;
    }

    public void setDiagnosisSubCode(String diagnosisSubCode) {
        this.diagnosisSubCode = diagnosisSubCode;
    }

    public String getDiagnosisSubName() {
        return diagnosisSubName;
    }

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

    public String getVisitDept() {
        return visitDept;
    }

    public void setVisitDept(String visitDept) {
        this.visitDept = visitDept;
    }

    public String getVisitDeptName() {
        return visitDeptName;
    }

    public void setVisitDeptName(String visitDeptName) {
        this.visitDeptName = visitDeptName;
    }

    public String getRegisterType() {
        return registerType;
    }

    public void setRegisterType(String registerType) {
        this.registerType = registerType;
    }

    public String getRegisterTypeName() {
        return registerTypeName;
    }

    public void setRegisterTypeName(String registerTypeName) {
        this.registerTypeName = registerTypeName;
    }

    public String getRateType() {
        return rateType;
    }

    public void setRateType(String rateType) {
        this.rateType = rateType;
    }

    public String getRateTypeName() {
        return rateTypeName;
    }

    public void setRateTypeName(String rateTypeName) {
        this.rateTypeName = rateTypeName;
    }

    public String getDigitalSignNo() {
        return digitalSignNo;
    }

    public void setDigitalSignNo(String digitalSignNo) {
        this.digitalSignNo = digitalSignNo;
    }

    public String getOriginalDataAbstract() {
        return originalDataAbstract;
    }

    public void setOriginalDataAbstract(String originalDataAbstract) {
        this.originalDataAbstract = originalDataAbstract;
    }

    public String getStrOriginalData() {
        return strOriginalData;
    }

    public void setStrOriginalData(String strOriginalData) {
        this.strOriginalData = strOriginalData;
    }

    public String getCaCertData() {
        return caCertData;
    }

    public void setCaCertData(String caCertData) {
        this.caCertData = caCertData;
    }

    public String getCaMessage() {
        return caMessage;
    }

    public void setCaMessage(String caMessage) {
        this.caMessage = caMessage;
    }

    public Long getAdminTeamId() {
        return adminTeamId;
    }

    public void setAdminTeamId(Long adminTeamId) {
        this.adminTeamId = adminTeamId;
    }
}
