package thyyxxk.webserver.entity.criticalValue;

import lombok.Data;
import thyyxxk.webserver.api.medicallaboratory.model.PatientType;

import java.util.Date;

@Data
public class CriticalValue {
    private Integer id;
    private String patNo;
    private String msgId;
    private String msgType;
    private String sourceCode;
    private String sourceName;
    private String targetDeptCode;
    private String targetDeptName;
    private String content;
    private Date createTime;
    private PatientType patientType;
    private InspectionType inspectionType;
    private CriticalValueState state;
    private Date sendTime;
    private Date handleTime;
    private String handleStaff;
    private String handleStaffName;

    public CriticalValue(String patNo, String msgId, String msgType, String sourceCode, String sourceName, String targetDeptCode, String targetDeptName, String content, Date createTime, PatientType patientType, InspectionType inspectionType) {
        this.patNo = patNo;
        this.msgId = msgId;
        this.msgType = msgType;
        this.sourceCode = sourceCode;
        this.sourceName = sourceName;
        this.targetDeptCode = targetDeptCode;
        this.targetDeptName = targetDeptName;
        this.content = content;
        this.createTime = createTime;
        this.patientType = patientType;
        this.inspectionType = inspectionType;
    }

    public CriticalValue() {
    }

    public static class Builder {
        private String patNo;
        private String msgId;
        private String msgType;
        private String sourceCode;
        private String sourceName;
        private String targetDeptCode;
        private String targetDeptName;
        private String content;
        private Date createTime;
        private PatientType patientType;
        private InspectionType inspectionType;

        public Builder patNo(String patNo) {
            this.patNo = patNo;
            return this;
        }

        public Builder msgId(String msgId) {
            this.msgId = msgId;
            return this;
        }


        public Builder msgType(String msgType) {
            this.msgType = msgType;
            return this;
        }


        public Builder sourceCode(String sourceCode) {
            this.sourceCode = sourceCode;
            return this;
        }


        public Builder sourceName(String sourceName) {
            this.sourceName = sourceName;
            return this;
        }


        public Builder targetDeptCode(String targetDeptCode) {
            this.targetDeptCode = targetDeptCode;
            return this;
        }


        public Builder targetDeptName(String targetDeptName) {
            this.targetDeptName = targetDeptName;
            return this;
        }


        public Builder content(String content) {
            this.content = content;
            return this;
        }

        public Builder createTime(Date createTime) {
            this.createTime = createTime;
            return this;
        }

        public Builder patientType(PatientType patientType) {
            this.patientType = patientType;
            return this;
        }

        public Builder inspectionType(InspectionType inspectionType) {
            this.inspectionType = inspectionType;
            return this;
        }


        public CriticalValue build() {
            return new CriticalValue(patNo, msgId, msgType, sourceCode, sourceName, targetDeptCode, targetDeptName, content, createTime, patientType, inspectionType);
        }
    }

}
