package com.fs.his.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import com.vdurmont.emoji.EmojiParser;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 处方对象 fs_prescribe
 *
 * @author fs
 * @date 2023-06-13
 */
public class FsPrescribe extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long prescribeId;

    /** 处方类型 1问诊 2订单 */
    @Excel(name = "处方类型 1西药 2中药")
    private Integer prescribeType;

    /** 订单ID */
    @Excel(name = "订单ID")
    private Long inquiryOrderId;

    /** 店铺订单ID */
    @Excel(name = "店铺订单ID")
    private Long storeOrderId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 患者ID */
    @Excel(name = "患者ID")
    private Long patientId;

    /** 处⽅单ID（唯⼀ID） */
    @Excel(name = "处⽅单ID")
    private String prescribeCode;

    /** 病情描述(主诉） */
    @Excel(name = "病情描述(主诉）")
    private String patientDescs;

    /** 现病史 */
    @Excel(name = "现病史")
    private String nowIllness;

    /** 既往史 */
    @Excel(name = "既往史")
    private String historyIllness;

    /** 患者年龄 */
    @Excel(name = "患者年龄")
    private String patientAge;

    /** 患者姓名 */
    @Excel(name = "患者姓名")
    private String patientName;

    /** 体重 */
    @Excel(name = "体重")
    private String weight;

    /** 是否有过敏史（传值：是/否） */
    @Excel(name = "是否有过敏史")
    private String isHistoryAllergic;

    /** 过敏史 */
    @Excel(name = "过敏史")
    private String historyAllergic;

    /** 肝功能是否异常（传值：是/否） */
    @Excel(name = "肝功能是否异常")
    private String liverUnusual;

    /** 肾功能是否异常（传值：是/否） */
    @Excel(name = "肾功能是否异常")
    private String renalUnusual;

    /** 是否是备孕/怀孕/哺乳期（传值：是 */
    @Excel(name = "是否是备孕/怀孕/哺乳期")
    private String isLactation;

    /** 患者电话 */
    @Excel(name = "患者电话")
    private String patientTel;

    /** 患者性别(传数字，1男 2⼥) */
    @Excel(name = "患者性别(传数字，1男 2⼥)")
    private String patientGender;

    /** 复诊凭证 */
    @Excel(name = "复诊凭证")
    private String recordPic;

    /** 处方图片地址 */
    @Excel(name = "处方图片地址")
    private String prescribeImgUrl;

    /** 拒绝原因 */
    @Excel(name = "拒绝原因")
    private String auditReason;

    /** 诊断 */
    @Excel(name = "诊断")
    private String diagnose;

    /** 医生ID */
    @Excel(name = "医生ID")
    private Long doctorId;

    /** 医生ID */
    @Excel(name = "药师ID")
    private Long drugDoctorId;

    /** 状态 0未开 1已开 */
    @Excel(name = "状态 0未开 1已开")
    private Integer status;

    @Excel(name = "使用方法")
    private String usageJson;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    @Excel(name = "病人生日")
    private String patientBirthday;
    @Excel(name = "备注")
    private String remark;
    @Excel(name = "店铺id")
    private Long storeId;

    @Excel(name = "开方医生id")
    private Long prescribeDoctorId;

    @Excel(name = "开方医生签名")
    private String doctorSignUrl;

    @Excel(name = "处方医生签名")
    private String prescribeDoctorSignUrl;

    @Excel(name = "药师签名")
    private String drugDoctorSignUrl;

    @Excel(name = "0颗粒1膏方")
    private Integer recipeType;
    private String prescribeCodeUrl;
    private String prescribeImgStoreUrl;


    private Integer cycle;



    private String icdCode;

    public Integer source;


    public String getPrescribeImgStoreUrl() {
        return prescribeImgStoreUrl;
    }

    public void setPrescribeImgStoreUrl(String prescribeImgStoreUrl) {
        this.prescribeImgStoreUrl = prescribeImgStoreUrl;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public String getIcdCode() {
        return icdCode;
    }

    public void setIcdCode(String icdCode) {
        this.icdCode = icdCode;
    }

    public Integer getCycle() {
        return cycle;
    }

    public void setCycle(Integer cycle) {
        this.cycle = cycle;
    }

    public String getPrescribeCodeUrl() {
        return prescribeCodeUrl;
    }

    public void setPrescribeCodeUrl(String prescribeCodeUrl) {
        this.prescribeCodeUrl = prescribeCodeUrl;
    }

    public Integer getRecipeType() {
        return recipeType;
    }

    public void setRecipeType(Integer recipeType) {
        this.recipeType = recipeType;
    }

    public Long getPrescribeDoctorId() {
        return prescribeDoctorId;
    }

    public void setPrescribeDoctorId(Long prescribeDoctorId) {
        this.prescribeDoctorId = prescribeDoctorId;
    }

    public String getDoctorSignUrl() {
        return doctorSignUrl;
    }

    public void setDoctorSignUrl(String doctorSignUrl) {
        this.doctorSignUrl = doctorSignUrl;
    }

    public String getPrescribeDoctorSignUrl() {
        return prescribeDoctorSignUrl;
    }

    public void setPrescribeDoctorSignUrl(String prescribeDoctorSignUrl) {
        this.prescribeDoctorSignUrl = prescribeDoctorSignUrl;
    }

    public String getPatientBirthday() {
        return patientBirthday;
    }

    public void setPatientBirthday(String patientBirthday) {
        this.patientBirthday = patientBirthday;
    }

    public String getDrugDoctorSignUrl() {
        return drugDoctorSignUrl;
    }

    public void setDrugDoctorSignUrl(String drugDoctorSignUrl) {
        this.drugDoctorSignUrl = drugDoctorSignUrl;
    }



    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public String getUsageJson() {
        return usageJson;
    }

    public void setUsageJson(String usageJson) {
        this.usageJson = usageJson;
    }

    @Override
    public String getRemark() {
        return remark;
    }

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

    public Long getDrugDoctorId() {
        return drugDoctorId;
    }

    public void setDrugDoctorId(Long drugDoctorId) {
        this.drugDoctorId = drugDoctorId;
    }

    public void setPrescribeId(Long prescribeId)
    {
        this.prescribeId = prescribeId;
    }

    public Long getPrescribeId()
    {
        return prescribeId;
    }
    public void setPrescribeType(Integer prescribeType)
    {
        this.prescribeType = prescribeType;
    }

    public Integer getPrescribeType()
    {
        return prescribeType;
    }
    public void setInquiryOrderId(Long inquiryOrderId)
    {
        this.inquiryOrderId = inquiryOrderId;
    }

    public Long getInquiryOrderId()
    {
        return inquiryOrderId;
    }
    public void setStoreOrderId(Long storeOrderId)
    {
        this.storeOrderId = storeOrderId;
    }

    public Long getStoreOrderId()
    {
        return storeOrderId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setPatientId(Long patientId)
    {
        this.patientId = patientId;
    }

    public Long getPatientId()
    {
        return patientId;
    }
    public void setPrescribeCode(String prescribeCode)
    {
        this.prescribeCode = prescribeCode;
    }

    public String getPrescribeCode()
    {
        return prescribeCode;
    }
    public void setPatientDescs(String patientJson)
    {
        if(StringUtils.isNotEmpty(patientJson)){
            this.patientDescs= EmojiParser.parseToHtmlDecimal(patientJson);
        }
        else{
            this.patientDescs= patientJson;
        }

    }

    public String getPatientDescs()
    {
        if(StringUtils.isNotEmpty(patientDescs)){
            return EmojiParser.parseToUnicode(patientDescs);
        }
        else{
            return patientDescs;
        }
    }
    public void setNowIllness(String nowIllness)
    {
        this.nowIllness = nowIllness;
    }

    public String getNowIllness()
    {
        return nowIllness;
    }
    public void setHistoryIllness(String historyIllness)
    {
        this.historyIllness = historyIllness;
    }

    public String getHistoryIllness()
    {
        return historyIllness;
    }
    public void setPatientAge(String patientAge)
    {
        this.patientAge = patientAge;
    }

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

    public String getPatientName()
    {
        return patientName;
    }
    public void setWeight(String weight)
    {
        this.weight = weight;
    }

    public String getWeight()
    {
        return weight;
    }
    public void setIsHistoryAllergic(String isHistoryAllergic)
    {
        this.isHistoryAllergic = isHistoryAllergic;
    }

    public String getIsHistoryAllergic()
    {
        return isHistoryAllergic;
    }
    public void setHistoryAllergic(String historyAllergic)
    {
        this.historyAllergic = historyAllergic;
    }

    public String getHistoryAllergic()
    {
        return historyAllergic;
    }
    public void setLiverUnusual(String liverUnusual)
    {
        this.liverUnusual = liverUnusual;
    }

    public String getLiverUnusual()
    {
        return liverUnusual;
    }
    public void setRenalUnusual(String renalUnusual)
    {
        this.renalUnusual = renalUnusual;
    }

    public String getRenalUnusual()
    {
        return renalUnusual;
    }
    public void setIsLactation(String isLactation)
    {
        this.isLactation = isLactation;
    }

    public String getIsLactation()
    {
        return isLactation;
    }
    public void setPatientTel(String patientTel)
    {
        this.patientTel = patientTel;
    }

    public String getPatientTel()
    {
        return patientTel;
    }
    public void setPatientGender(String patientGender)
    {
        this.patientGender = patientGender;
    }

    public String getPatientGender()
    {
        return patientGender;
    }
    public void setRecordPic(String recordPic)
    {
        this.recordPic = recordPic;
    }

    public String getRecordPic()
    {
        return recordPic;
    }
    public void setPrescribeImgUrl(String prescribeImgUrl)
    {
        this.prescribeImgUrl = prescribeImgUrl;
    }

    public String getPrescribeImgUrl()
    {
        return prescribeImgUrl;
    }
    public void setAuditReason(String auditReason)
    {
        this.auditReason = auditReason;
    }

    public String getAuditReason()
    {
        return auditReason;
    }
    public void setDiagnose(String diagnose)
    {
        this.diagnose = diagnose;
    }

    public String getDiagnose()
    {
        return diagnose;
    }
    public void setDoctorId(Long doctorId)
    {
        this.doctorId = doctorId;
    }

    public Long getDoctorId()
    {
        return doctorId;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setAuditTime(Date auditTime)
    {
        this.auditTime = auditTime;
    }

    public Date getAuditTime()
    {
        return auditTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("prescribeId", getPrescribeId())
            .append("prescribeType", getPrescribeType())
            .append("inquiryOrderId", getInquiryOrderId())
            .append("storeOrderId", getStoreOrderId())
            .append("userId", getUserId())
            .append("patientId", getPatientId())
            .append("prescribeCode", getPrescribeCode())
            .append("patientDescs", getPatientDescs())
            .append("nowIllness", getNowIllness())
            .append("historyIllness", getHistoryIllness())
            .append("patientAge", getPatientAge())
            .append("patientName", getPatientName())
            .append("weight", getWeight())
            .append("isHistoryAllergic", getIsHistoryAllergic())
            .append("historyAllergic", getHistoryAllergic())
            .append("liverUnusual", getLiverUnusual())
            .append("renalUnusual", getRenalUnusual())
            .append("isLactation", getIsLactation())
            .append("patientTel", getPatientTel())
            .append("patientGender", getPatientGender())
            .append("recordPic", getRecordPic())
            .append("prescribeImgUrl", getPrescribeImgUrl())
            .append("auditReason", getAuditReason())
            .append("diagnose", getDiagnose())
            .append("doctorId", getDoctorId())
            .append("createTime", getCreateTime())
            .append("status", getStatus())
            .append("auditTime", getAuditTime())
            .toString();
    }
}
