package com.docus.server.record.common.pojo.dto;

import com.docus.infrastructure.core.exception.BaseException;
import com.docus.server.record.RecordExceptionEnum;

/**
 * 住院号
 */
public class InpatientNo {


    private String inpatientNo;

    public InpatientNo(String inpatientNo) {
        this.inpatientNo = inpatientNo;
        this.vaid();
    }


    public void vaid() {
        if (inpatientNo == null) {
            throw new BaseException(RecordExceptionEnum.NOT_NULL, "inpatientNo不能为空");
        }
    }


    public static InpatientNo of(String inpatientNo) {
        return new InpatientNo(inpatientNo);
    }
}
