package thyyxxk.webserver.entity.medicalinsurance.query;

import lombok.Data;
import thyyxxk.webserver.constants.sidicts.PsnCertType;
import thyyxxk.webserver.utils.StringUtil;

/**
 * @description: 查询患者基本信息参数
 * @author: DingJie
 * @create: 2021/7/2211:36
 */
@Data
public class QryPsnBsInfo {
    private String patNo;
    private Integer times;
    private Integer ledgerSn;
    private String medType;
    private String psnCertType;
    private String socialNo;
    private String name;
    private String admdvs;
    private String psnName;

    private String staffId;
    private Integer onlyQry;
    private Integer needSaving;

    private String mdtrtCertType;
    private String readCardResult;
    private String busCardInfo;

    public String getPsnCertType() {
        if (StringUtil.isBlank(psnCertType) || psnCertType.length() != 2) {
            return PsnCertType.RESIDENT_IDENTITY_CARD.getCode();
        }
        return psnCertType;
    }
}
