package thyyxxk.webserver.entity.zhuyuanyisheng.emr;

import java.io.Serializable;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
public class EmrAuditDetail implements Serializable {

    private static final long serialVersionUID = 3711491177934905816L;

    private String patNo;
    private Integer times;
    private String patName;

    /**
     * id
     */
    private Integer id;

    /**
     * 审核人id
     */
    private String approver;
    private String approverName;

    /**
     * 审核时间
     */
    private Date reviewTime;

    /**
     * 质控名称
     */
    private String name;

    /**
     * 1-轻度 2-中度 3-重度
     */
    private Integer scoringCriteria;

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

    /**
     * 1-已整改 2-无需整改
     */
    private Integer remediationStatus;

    /**
     * 缺陷数
     */
    private Integer numberOfDefects;

    /**
     * 修改人
     */
    private String modifyPerson;
    private String modifyPersonName;

    /**
     * 修改时间
     */
    private Date modificationTime;

    /**
     * 电子病历id
     */
    private Integer emrId;

    /**
     * 0-最新 1-历史
     */
    private Integer history;

    /**
     * 电子病历中的名称
     */
    private String emrName;

    /**
     * 需要发送给那个医生
     */
    private String doctor;

    /**
     * 在查询的审核查看是否已经匹配上了
     */
    private Boolean matching = false;

    /**
     * 是否为终末质控
     */
    private Integer finalControl;

    private Integer sort;

    public String getScoringCriteriaName() {
        if (scoringCriteria == null) return "";
        switch (scoringCriteria) {
            case 1:
                return "轻";
            case 2:
                return "中";
            case 3:
                return "重";
            default:
                return "";
        }
    }

    public String getRemediationStatusName() {
        if (remediationStatus == null) return "";
        switch (remediationStatus) {
            case 1:
                return "已整改";
            case 2:
                return "已知无需整改";
            default:
                return "";
        }
    }


}
