|
|
@@ -12,6 +12,7 @@ import thyyxxk.webserver.config.exception.BizException;
|
|
|
import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.constants.Capacity;
|
|
|
import thyyxxk.webserver.constants.sidicts.MedType;
|
|
|
+import thyyxxk.webserver.constants.sidicts.PsnCertType;
|
|
|
import thyyxxk.webserver.dao.his.inpatient.DismissDao;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.inpatient.dismiss.*;
|
|
|
@@ -191,11 +192,14 @@ public class DismissService {
|
|
|
exception.setMessage("没有找到入院时间,请重新获取病人信息。");
|
|
|
throw new BizException(exception);
|
|
|
}
|
|
|
- if (!IdCardUtil.isValidatedIdCard(param.getSocialNo())) {
|
|
|
+ if (param.getPsnCertType().equals(PsnCertType.RESIDENT_IDENTITY_CARD.getCode()) &&
|
|
|
+ !IdCardUtil.isValidatedIdCard(param.getSocialNo())) {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "身份证不合法!");
|
|
|
}
|
|
|
- Integer age = IdCardUtil.getAgeByIdCard(param.getSocialNo());
|
|
|
- age = age == null ? param.getAge() : age;
|
|
|
+ Integer age = param.getAge();
|
|
|
+ if (param.getPsnCertType().equals(PsnCertType.RESIDENT_IDENTITY_CARD.getCode())) {
|
|
|
+ age = IdCardUtil.getAgeByIdCard(param.getSocialNo());
|
|
|
+ }
|
|
|
if (null != age && (age < 16 || age > 60)) {
|
|
|
if (param.getName().equals(param.getContactName()) ||
|
|
|
param.getContactRelation().equals("0")) {
|