|
@@ -49,7 +49,7 @@ public class VerifyCaseFrontSheet {
|
|
|
if (null != sheet.getContactAddrName() && sheet.getContactAddrName().length() > 16) {
|
|
|
array.add(new PureCodeName("contactAddrName", "患者联系人地址不能超过16个汉字!"));
|
|
|
}
|
|
|
- if (betweenDays(sheet.getQualityControlDate(), sheet.getDismissDate()) > 7) {
|
|
|
+ if (DateUtil.daysBetween(sheet.getQualityControlDate(), sheet.getDismissDate()) > 7) {
|
|
|
array.add(new PureCodeName("qualityControlDate", "质控日期不能大于出院7天!"));
|
|
|
}
|
|
|
return connectedVerify(array, sheet);
|
|
@@ -222,13 +222,13 @@ public class VerifyCaseFrontSheet {
|
|
|
if (phoneLengthWrong(info.getUnitPhone())) {
|
|
|
array.add(new PureCodeName("unitPhone","工作单位电话长度错误!"));
|
|
|
}
|
|
|
- if (betweenDays(info.getDismissDate(), info.getAdmissDate()) < 0) {
|
|
|
+ if (DateUtil.daysBetween(info.getDismissDate(), info.getAdmissDate()) < 0) {
|
|
|
array.add(new PureCodeName("dismissDate","出院时间不能小于入院时间!"));
|
|
|
}
|
|
|
- if (betweenDays(info.getBirthDate(), info.getAdmissDate()) > 0) {
|
|
|
+ if (DateUtil.daysBetween(info.getBirthDate(), info.getAdmissDate()) > 0) {
|
|
|
array.add(new PureCodeName("birthDate","出生时间不能大于入院时间!"));
|
|
|
}
|
|
|
- if (betweenDays(info.getQualityControlDate(), info.getDismissDate()) > 7) {
|
|
|
+ if (DateUtil.daysBetween(info.getQualityControlDate(), info.getDismissDate()) > 7) {
|
|
|
array.add(new PureCodeName("qualityControlDate","质控日期不能大于出院7天!"));
|
|
|
}
|
|
|
if (isNewBorn(info.getHasInfant(), info.getBirthDate())) {
|
|
@@ -275,7 +275,7 @@ public class VerifyCaseFrontSheet {
|
|
|
checkSurgery(array, surgery);
|
|
|
}
|
|
|
if (needPathologicDiag(info.getDisdiagList().get(0).getCode()) &&
|
|
|
- (StringUtil.invalidValue(info.getPathologicDiagStr()) || StringUtil.invalidValue(info.getPathologicDiagCode()))) {
|
|
|
+ (StringUtil.isBlank(info.getPathologicDiagStr()) || StringUtil.isBlank(info.getPathologicDiagCode()))) {
|
|
|
array.add(new PureCodeName("pathologicDiagCode","根据患者出院主要诊断,病理诊断不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.validValue(info.getHasIcu()) && "2".equals(info.getHasIcu()) &&
|
|
@@ -449,8 +449,8 @@ public class VerifyCaseFrontSheet {
|
|
|
if (null == item.getDate()) {
|
|
|
return false;
|
|
|
}
|
|
|
- if (betweenDays(item.getDate(), admissDate) < 0 ||
|
|
|
- betweenDays(item.getDate(), outmissDate) > 0) {
|
|
|
+ if (DateUtil.daysBetween(item.getDate(), admissDate) < 0 ||
|
|
|
+ DateUtil.daysBetween(item.getDate(), outmissDate) > 0) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -464,14 +464,7 @@ public class VerifyCaseFrontSheet {
|
|
|
return phone.length() != 11 && phone.length() != 12 && phone.length() != 8;
|
|
|
}
|
|
|
|
|
|
- public Integer betweenDays(Date date1, Date date2) {
|
|
|
- if (null == date1 || null == date2) {
|
|
|
- return -1;
|
|
|
- }
|
|
|
- return (int) ((date1.getTime() - date2.getTime()) / (1000L * 3600L * 24L));
|
|
|
- }
|
|
|
-
|
|
|
private boolean isNewBorn(String hasInfant, Date birthDate) {
|
|
|
- return (StringUtil.validValue(hasInfant) && "1".equals(hasInfant)) || betweenDays(new Date(), birthDate) <= 28;
|
|
|
+ return (StringUtil.validValue(hasInfant) && "1".equals(hasInfant)) || DateUtil.daysBetween(new Date(), birthDate) <= 28;
|
|
|
}
|
|
|
}
|