package cn.hnthyy.thmz.entity.his.mz;

import cn.hnthyy.thmz.vo.MzPrescriptionVo;
import lombok.Data;

import java.util.Date;

/**
 *  门诊病历字典
 */
@Data
public class MzBaRecord {
    //病人id
    private String patientId;
    //就诊次数
    private Integer times;
    //病历编号
    private Integer blCode;
    //创建日期
    private Date createDate;
    //创建人
    private String createCode;
    //归档
    private String archiveMark;
    //关键字
    private String keyword1;
    //关键字2
    private String keyword2;
    //关键字3
    private String keyword3;
    //关键字4
    private String keyword4;
    //关键字5
    private String keyword5;
    //记录日期
    private Date recordDate;
    //归档日期
    private Date archiveDate;
    //归档人
    private String archiveCode;
    //最后编辑者
    private String lastModifier;
    //就诊科室
    private String deptCode;
    //就诊病房
    private String wardCode;
    //备注说明
    private String remarkText;



    public static MzBaRecord getMzBaRecord(MzPrescriptionVo mzPrescriptionVo, int times, Date now, int blNo) {
        MzBaRecord mzBaRecord = new MzBaRecord();
        mzBaRecord.setPatientId(mzPrescriptionVo.getPatientId());
        mzBaRecord.setTimes(times);
        mzBaRecord.setBlCode(blNo);
        mzBaRecord.setCreateDate(now);
        mzBaRecord.setCreateCode(mzPrescriptionVo.getDoctorCode());
        mzBaRecord.setRecordDate(now);
        mzBaRecord.setLastModifier(mzPrescriptionVo.getDoctorCode());
        mzBaRecord.setDeptCode(mzPrescriptionVo.getVisitDeptCode());
        return mzBaRecord;
    }
}
