|
@@ -5,13 +5,11 @@ import thyyxxk.webserver.constants.Capacity;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetDisdiag;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetMain;
|
|
|
import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetSurgery;
|
|
|
+import thyyxxk.webserver.entity.dictionary.PureCodeName;
|
|
|
import thyyxxk.webserver.utils.DateUtil;
|
|
|
import thyyxxk.webserver.utils.StringUtil;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @author dj
|
|
@@ -30,311 +28,309 @@ public class VerifyCaseFrontSheet {
|
|
|
return INSTANCE;
|
|
|
}
|
|
|
|
|
|
- public String saveVerify(CaseFrontsheetMain sheet) {
|
|
|
- StringBuilder builder = new StringBuilder();
|
|
|
+ public List<PureCodeName> saveVerify(CaseFrontsheetMain sheet) {
|
|
|
+ List<PureCodeName> array = new ArrayList<>();
|
|
|
if (null != sheet.getLivePlace()) {
|
|
|
try {
|
|
|
byte[] livePlaceBytes = sheet.getLivePlace().getBytes("GBK");
|
|
|
if (livePlaceBytes.length > 32) {
|
|
|
- builder.append("患者现住址不能超过32个字节,当前字节数为")
|
|
|
- .append(livePlaceBytes.length)
|
|
|
- .append("(1汉字=2字节,1字母或数字=1字节)!");
|
|
|
+ array.add(new PureCodeName("livePlace", "患者现住址不能超过32个字节,当前字节数为" + livePlaceBytes.length + "(1汉字=2字节,1字母或数字=1字节)!"));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("分析患者现住址长度出现异常", e);
|
|
|
}
|
|
|
}
|
|
|
if (null != sheet.getHkPlaceName() && sheet.getHkPlaceName().length() > 10) {
|
|
|
- builder.append("患者户口地址不能超过10个汉字!");
|
|
|
+ array.add(new PureCodeName("hkPlaceName", "患者户口地址不能超过10个汉字!"));
|
|
|
}
|
|
|
if (null != sheet.getUnitPlace() && sheet.getUnitPlace().length() > 16) {
|
|
|
- builder.append("患者单位地址不能超过16个汉字!");
|
|
|
+ array.add(new PureCodeName("unitPlace", "患者单位地址不能超过16个汉字!"));
|
|
|
}
|
|
|
if (null != sheet.getContactAddrName() && sheet.getContactAddrName().length() > 16) {
|
|
|
- builder.append("患者联系人地址不能超过16个汉字!");
|
|
|
+ array.add(new PureCodeName("contactAddrName", "患者联系人地址不能超过16个汉字!"));
|
|
|
}
|
|
|
if (betweenDays(sheet.getQualityControlDate(), sheet.getDismissDate()) > 7) {
|
|
|
- builder.append("质控日期不能大于出院7天!");
|
|
|
+ array.add(new PureCodeName("qualityControlDate", "质控日期不能大于出院7天!"));
|
|
|
}
|
|
|
- return connectedVerify(builder, sheet);
|
|
|
+ return connectedVerify(array, sheet);
|
|
|
}
|
|
|
|
|
|
- public String printVerify(CaseFrontsheetMain info) {
|
|
|
- StringBuilder sb = new StringBuilder();
|
|
|
+ public List<PureCodeName> printVerify(CaseFrontsheetMain info) {
|
|
|
+ List<PureCodeName> array = new ArrayList<>();
|
|
|
if (StringUtil.isBlank(info.getName())) {
|
|
|
- sb.append("患者姓名不能为空!");
|
|
|
+ array.add(new PureCodeName("name", "患者姓名不能为空!"));
|
|
|
}
|
|
|
if (null == info.getBirthDate()) {
|
|
|
- sb.append("患者出生日期不能为空!");
|
|
|
+ array.add(new PureCodeName("birthDate", "患者出生日期不能为空!"));
|
|
|
}
|
|
|
if (null == info.getAge()) {
|
|
|
- sb.append("患者年龄不能为空!");
|
|
|
+ array.add(new PureCodeName("age","患者年龄不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getCountry())) {
|
|
|
- sb.append("患者国籍不能为空!");
|
|
|
+ array.add(new PureCodeName("country","患者国籍不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getBirthPlace())) {
|
|
|
- sb.append("患者出生地不能为空!");
|
|
|
+ array.add(new PureCodeName("birthPlaceName","患者出生地不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getNativePlace())) {
|
|
|
- sb.append("患者籍贯不能为空!");
|
|
|
+ array.add(new PureCodeName("nativePlaceName","患者籍贯不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getNation())) {
|
|
|
- sb.append("患者民族不能为空!");
|
|
|
+ array.add(new PureCodeName("nation","患者民族不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getSocialNo())) {
|
|
|
- sb.append("患者身份证不能为空!");
|
|
|
+ array.add(new PureCodeName("socialNo","患者身份证不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getOccupation())) {
|
|
|
- sb.append("患者职业不能为空!");
|
|
|
+ array.add(new PureCodeName("occupation","患者职业不能为空!"));
|
|
|
}
|
|
|
if (null == info.getMarriage()) {
|
|
|
- sb.append("患者婚姻状况不能为空!");
|
|
|
+ array.add(new PureCodeName("marriage","患者婚姻状况不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getLivePlace())) {
|
|
|
- sb.append("患者现住址不能为空!");
|
|
|
+ array.add(new PureCodeName("livePlace","患者现住址不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getPhone())) {
|
|
|
- sb.append("患者电话不能为空!");
|
|
|
+ array.add(new PureCodeName("phone","患者电话不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getAddrZipCode())) {
|
|
|
- sb.append("现住址邮编不能为空!");
|
|
|
+ array.add(new PureCodeName("addrZipCode","现住址邮编不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getHkZipCode())) {
|
|
|
- sb.append("户口地址邮编不能为空!");
|
|
|
+ array.add(new PureCodeName("hkZipCode","户口地址邮编不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getUnitZipCode())) {
|
|
|
- sb.append("工作住址邮编不能为空!");
|
|
|
+ array.add(new PureCodeName("unitZipCode","工作住址邮编不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getHkPlaceName())) {
|
|
|
- sb.append("患者户口地址不能为空!");
|
|
|
+ array.add(new PureCodeName("hkPlaceName","患者户口地址不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getUnitName()) || StringUtil.isBlank(info.getUnitPlace())) {
|
|
|
- sb.append("患者工作单位及地址不能为空!");
|
|
|
+ array.add(new PureCodeName("unitName","患者工作单位及地址不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getUnitPhone())) {
|
|
|
- sb.append("患者单位电话不能为空!");
|
|
|
+ array.add(new PureCodeName("unitPhone","患者单位电话不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getContactName())) {
|
|
|
- sb.append("患者联系人姓名不能为空!");
|
|
|
+ array.add(new PureCodeName("contactName","患者联系人姓名不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getContactRelation())) {
|
|
|
- sb.append("患者联系人关系不能为空!");
|
|
|
+ array.add(new PureCodeName("contactRelation","患者联系人关系不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getContactAddrName())) {
|
|
|
- sb.append("患者联系人地址不能为空!");
|
|
|
+ array.add(new PureCodeName("contactAddrName","患者联系人地址不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getContactPhone())) {
|
|
|
- sb.append("患者联系人电话不能为空!");
|
|
|
+ array.add(new PureCodeName("contactPhone","患者联系人电话不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getZyAdmissWay())) {
|
|
|
- sb.append("患者入院途径不能为空!");
|
|
|
+ array.add(new PureCodeName("zyAdmissWay","患者入院途径不能为空!"));
|
|
|
}
|
|
|
if (null == info.getAdmissDate()) {
|
|
|
- sb.append("患者入院时间不能为空!");
|
|
|
+ array.add(new PureCodeName("admissDate","患者入院时间不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getAdmissDept())) {
|
|
|
- sb.append("患者入院科别不能为空!");
|
|
|
+ array.add(new PureCodeName("admissDept","患者入院科别不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getHasSurgery())) {
|
|
|
- sb.append("患者是否手术不能为空!");
|
|
|
+ array.add(new PureCodeName("hasSurgery","患者是否手术不能为空!"));
|
|
|
}
|
|
|
if (null == info.getDismissDate()) {
|
|
|
- sb.append("患者出院时间不能为空!");
|
|
|
+ array.add(new PureCodeName("dismissDate","患者出院时间不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getDismissDept())) {
|
|
|
- sb.append("患者出院科别不能为空!");
|
|
|
+ array.add(new PureCodeName("dismissDept","患者出院科别不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getAdmissDays())) {
|
|
|
- sb.append("患者住院天数不能为空!");
|
|
|
+ array.add(new PureCodeName("admissDays","患者住院天数不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getDisdiagList().get(0).getName())) {
|
|
|
- sb.append("患者主要诊断不能为空!");
|
|
|
+ array.add(new PureCodeName("disdiagMain","患者主要诊断不能为空!"));
|
|
|
}
|
|
|
if (null == info.getDisdiagList().get(0).getAdmissStatus()) {
|
|
|
- sb.append("患者主要诊断入院病情不能为空!");
|
|
|
+ array.add(new PureCodeName("disdiagMainAdmStatus","患者主要诊断入院病情不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getAllergy())) {
|
|
|
- sb.append("患者有无药物过敏不能为空!");
|
|
|
+ array.add(new PureCodeName("allergy","患者有无药物过敏不能为空!"));
|
|
|
}
|
|
|
if (null == info.getBloodType()) {
|
|
|
- sb.append("患者ABO血型不能为空!");
|
|
|
+ array.add(new PureCodeName("bloodType","患者ABO血型不能为空!"));
|
|
|
}
|
|
|
if (null == info.getRh()) {
|
|
|
- sb.append("患者Rh血型不能为空!");
|
|
|
+ array.add(new PureCodeName("rh","患者Rh血型不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getDeptLeader())) {
|
|
|
- sb.append("科主任不能为空!");
|
|
|
+ array.add(new PureCodeName("deptLeader","科主任不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getLeaderDoctor())) {
|
|
|
- sb.append("主任(副主任)医师不能为空!");
|
|
|
+ array.add(new PureCodeName("leaderDoctor","主任(副主任)医师不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getMainDoctor())) {
|
|
|
- sb.append("主治医师不能为空!");
|
|
|
+ array.add(new PureCodeName("mainDoctor","主治医师不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getAdmissDoctor())) {
|
|
|
- sb.append("住院医师不能为空!");
|
|
|
+ array.add(new PureCodeName("admissDoctor","住院医师不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getQualityControlLevel())) {
|
|
|
- sb.append("病案质量不能为空!");
|
|
|
+ array.add(new PureCodeName("qualityControlLevel","病案质量不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getZyDismissWay())) {
|
|
|
- sb.append("患者离院方式不能为空!");
|
|
|
+ array.add(new PureCodeName("zyDismissWay","患者离院方式不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getAdmissAgainInOneMonth())) {
|
|
|
- sb.append("患者是否有出院31天内再住院计划不能为空!");
|
|
|
+ array.add(new PureCodeName("admissAgainInOneMonth","患者是否有出院31天内再住院计划不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getQualityControlDoctor())) {
|
|
|
- sb.append("质控医生不能为空!");
|
|
|
+ array.add(new PureCodeName("qualityControlDoctor","质控医生不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getCaseClassification())) {
|
|
|
- sb.append("病例分型不能为空!");
|
|
|
+ array.add(new PureCodeName("caseClassification","病例分型不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getHasIcu())) {
|
|
|
- sb.append("实施重症监护不能为空!");
|
|
|
+ array.add(new PureCodeName("hasIcu","实施重症监护不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getMonopathyManagement())) {
|
|
|
- sb.append("单病种管理不能为空!");
|
|
|
+ array.add(new PureCodeName("monopathyManagement","单病种管理不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getClinicalPathwayManagement())) {
|
|
|
- sb.append("实施临床路径管理不能为空!");
|
|
|
+ array.add(new PureCodeName("clinicalPathwayManagement","实施临床路径管理不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getDrgsManagement())) {
|
|
|
- sb.append("DRGs管理不能为空!");
|
|
|
+ array.add(new PureCodeName("drgsManagement","DRGs管理不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getUseAntibiotic())) {
|
|
|
- sb.append("抗生素使用不能为空!");
|
|
|
+ array.add(new PureCodeName("useAntibiotic","抗生素使用不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getBacilliculture())) {
|
|
|
- sb.append("细菌培养标本送检不能为空!");
|
|
|
+ array.add(new PureCodeName("bacilliculture","细菌培养标本送检不能为空!"));
|
|
|
}
|
|
|
if (zipCodeLengthWrong(info.getAddrZipCode())) {
|
|
|
- sb.append("现住址邮编长度错误!");
|
|
|
+ array.add(new PureCodeName("addrZipCode","现住址邮编长度错误!"));
|
|
|
}
|
|
|
if (zipCodeLengthWrong(info.getHkZipCode())) {
|
|
|
- sb.append("户口地址邮编长度错误!");
|
|
|
+ array.add(new PureCodeName("hkZipCode","户口地址邮编长度错误!"));
|
|
|
}
|
|
|
if (zipCodeLengthWrong(info.getUnitZipCode())) {
|
|
|
- sb.append("工作地址邮编错误!");
|
|
|
+ array.add(new PureCodeName("unitZipCode","工作地址邮编错误!"));
|
|
|
}
|
|
|
if (phoneLengthWrong(info.getPhone())) {
|
|
|
- sb.append("患者电话号码长度错误!");
|
|
|
+ array.add(new PureCodeName("phone","患者电话号码长度错误!"));
|
|
|
}
|
|
|
if (phoneLengthWrong(info.getContactPhone())) {
|
|
|
- sb.append("联系人电话号码长度错误!");
|
|
|
+ array.add(new PureCodeName("contactPhone","联系人电话号码长度错误!"));
|
|
|
}
|
|
|
if (phoneLengthWrong(info.getUnitPhone())) {
|
|
|
- sb.append("工作单位电话长度错误!");
|
|
|
+ array.add(new PureCodeName("unitPhone","工作单位电话长度错误!"));
|
|
|
}
|
|
|
if (betweenDays(info.getDismissDate(), info.getAdmissDate()) < 0) {
|
|
|
- sb.append("出院时间不能小于入院时间!");
|
|
|
+ array.add(new PureCodeName("dismissDate","出院时间不能小于入院时间!"));
|
|
|
}
|
|
|
if (betweenDays(info.getBirthDate(), info.getAdmissDate()) > 0) {
|
|
|
- sb.append("出生时间不能大于入院时间!");
|
|
|
+ array.add(new PureCodeName("birthDate","出生时间不能大于入院时间!"));
|
|
|
}
|
|
|
if (betweenDays(info.getQualityControlDate(), info.getDismissDate()) > 7) {
|
|
|
- sb.append("质控日期不能大于出院7天!");
|
|
|
+ array.add(new PureCodeName("qualityControlDate","质控日期不能大于出院7天!"));
|
|
|
}
|
|
|
if (isNewBorn(info.getHasInfant(), info.getBirthDate())) {
|
|
|
if (isNewBornInfoNull(info.getNewBornWeight()) ||
|
|
|
isNewBornInfoNull(info.getNewBornAdmissWeight())) {
|
|
|
- sb.append("请填写新生儿信息!");
|
|
|
+ array.add(new PureCodeName("newBornWeight","请填写新生儿信息!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(info.getXxeApgar())) {
|
|
|
- sb.append("新生儿Apgar评分不能为空!");
|
|
|
+ array.add(new PureCodeName("xxeApgar","新生儿Apgar评分不能为空!"));
|
|
|
}
|
|
|
} else {
|
|
|
if (!isNewBornInfoNull(info.getNewBornWeight()) ||
|
|
|
!isNewBornInfoNull(info.getNewBornAdmissWeight())) {
|
|
|
- sb.append("非新生儿请保持新生信息为空!");
|
|
|
+ array.add(new PureCodeName("newBornWeight","非新生儿请保持新生信息为空!"));
|
|
|
}
|
|
|
}
|
|
|
- return connectedVerify(sb, info);
|
|
|
+ return connectedVerify(array, info);
|
|
|
}
|
|
|
|
|
|
- private String connectedVerify(StringBuilder sb, CaseFrontsheetMain info) {
|
|
|
+ private List<PureCodeName> connectedVerify(List<PureCodeName> array, CaseFrontsheetMain info) {
|
|
|
if (StringUtil.notBlank(info.getZyDismissWay())) {
|
|
|
if ("1".equals(info.getZyDismissWay()) || "2".equals(info.getZyDismissWay())) {
|
|
|
if (StringUtil.isBlank(info.getDismissDestination())) {
|
|
|
- sb.append("患者转入医疗机构不能为空!");
|
|
|
+ array.add(new PureCodeName("dismissDestination","患者转入医疗机构不能为空!"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getHasSurgery()) && "0".equals(info.getHasSurgery()) && !"0".equals(info.getDiagConform3())) {
|
|
|
- sb.append("无手术时,诊断符合情况中的术前与术后需要为【未做】!");
|
|
|
+ array.add(new PureCodeName("diagConform3","无手术时,诊断符合情况中的术前与术后需要为【未做】!"));
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getHasSurgery())) {
|
|
|
if ("1".equals(info.getHasSurgery()) || "2".equals(info.getHasSurgery()) || "3".equals(info.getHasSurgery())) {
|
|
|
if ("0".equals(info.getDiagConform3())) {
|
|
|
- sb.append("有手术时,诊断符合情况中的术前与术后不可为【未做】!");
|
|
|
+ array.add(new PureCodeName("diagConform3","有手术时,诊断符合情况中的术前与术后不可为【未做】!"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getAutopsy()) && !"".equals(info.getAutopsy())) {
|
|
|
if (!"4".equals(info.getZyDismissWay())) {
|
|
|
- sb.append("尸检不为空时,需要离院方式为死亡!");
|
|
|
+ array.add(new PureCodeName("zyDismissWay","尸检不为空时,需要离院方式为死亡!"));
|
|
|
}
|
|
|
}
|
|
|
for (CaseFrontsheetSurgery surgery : info.getSurgeryList()) {
|
|
|
- checkSurgery(sb, surgery);
|
|
|
+ checkSurgery(array, surgery);
|
|
|
}
|
|
|
if (needPathologicDiag(info.getDisdiagList().get(0).getCode()) &&
|
|
|
(StringUtil.isBlank(info.getPathologicDiagStr()) || StringUtil.isBlank(info.getPathologicDiagCode()))) {
|
|
|
- sb.append("根据患者出院主要诊断,病理诊断不能为空!");
|
|
|
+ array.add(new PureCodeName("pathologicDiagCode","根据患者出院主要诊断,病理诊断不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getHasIcu()) && "2".equals(info.getHasIcu()) &&
|
|
|
(StringUtil.isBlank(info.getIcuDays()) || StringUtil.isBlank(info.getIcuHours()))) {
|
|
|
- sb.append("患者ICU时间不能为空!");
|
|
|
+ array.add(new PureCodeName("icuHours","患者ICU时间不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getHasSurgery()) && hasSurgery(info.getHasSurgery()) &&
|
|
|
StringUtil.isBlank(info.getSurgeryList().get(0).getName())) {
|
|
|
- sb.append("患者有手术时,手术列表不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryMain","患者有手术时,手术列表不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getAllergy()) && "2".equals(info.getAllergy()) && StringUtil.isBlank(info.getAllergicMedicine())) {
|
|
|
- sb.append("患者有药物过敏时,过敏药物名称不能为空!");
|
|
|
+ array.add(new PureCodeName("allergicMedicine","患者有药物过敏时,过敏药物名称不能为空!"));
|
|
|
}
|
|
|
if (!StringUtil.isBlank(info.getPathologicDiagFee()) && StringUtil.isBlank(info.getBlh())) {
|
|
|
- sb.append("患者有病理诊断费,病理号不能为空!");
|
|
|
+ array.add(new PureCodeName("blh","患者有病理诊断费,病理号不能为空!"));
|
|
|
}
|
|
|
if (hasSurgeryFee(info.getSurgeryFee()) && StringUtil.isBlank(info.getSurgeryList().get(0).getName())) {
|
|
|
- sb.append("患者有手术费,手术列表不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryMain","患者有手术费,手术列表不能为空!"));
|
|
|
}
|
|
|
if (needHurtReason(info.getDisdiagList().get(0).getCode()) &&
|
|
|
(StringUtil.isBlank(info.getHurtReasonName()) || StringUtil.isBlank(info.getHurtReasonCode()))) {
|
|
|
- sb.append("根据患者出院主要诊断,损伤中毒诊断不能为空!");
|
|
|
+ array.add(new PureCodeName("hurtReasonCode","根据患者出院主要诊断,损伤中毒诊断不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getBloodType()) && !"5".equals(info.getBloodType()) &&
|
|
|
("1".equals(info.getRh()) && "2".equals(info.getRh()))) {
|
|
|
- sb.append("患者血型确定时,Rh血型应为阴或阳!");
|
|
|
+ array.add(new PureCodeName("rh","患者血型确定时,Rh血型应为阴或阳!"));
|
|
|
}
|
|
|
if (hasDuplicateDiag(info.getDisdiagList())) {
|
|
|
- sb.append("出院诊断不能存在相同的诊断编码!");
|
|
|
+ array.add(new PureCodeName("diagTable","出院诊断不能存在相同的诊断编码!"));
|
|
|
}
|
|
|
if (hasSameSurgeryInOneDay(info.getSurgeryList())) {
|
|
|
- sb.append("同一天不能有相同的手术!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","同一天不能有相同的手术!"));
|
|
|
}
|
|
|
if (surgeryDateWrong(info.getSurgeryList(), info.getAdmissDate(), info.getDismissDate())) {
|
|
|
- sb.append("手术时间必须在入院时间和出院时间之间!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术时间必须在入院时间和出院时间之间!"));
|
|
|
}
|
|
|
if ((StringUtil.notBlank(info.getBloodType()) && ("5".equals(info.getBloodType()) || "6".equals(info.getBloodType()))) &&
|
|
|
(StringUtil.notBlank(info.getRh()) && !"0".equals(info.getRh()) && !"3".equals(info.getRh()))) {
|
|
|
- sb.append("患者血型不确定时,Rh血型应为不详或未查!");
|
|
|
+ array.add(new PureCodeName("rh","患者血型不确定时,Rh血型应为不详或未查!"));
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getAutopsy()) || (StringUtil.notBlank(info.getZyDismissWay()) && "4".equals(info.getZyDismissWay()))) {
|
|
|
if (StringUtil.notBlank(info.getRescueTimes()) && Integer.parseInt(info.getRescueTimes()) <= 0) {
|
|
|
- sb.append("患者死亡时,抢救次数不能小于一次!");
|
|
|
+ array.add(new PureCodeName("rescueTimes","患者死亡时,抢救次数不能小于一次!"));
|
|
|
}
|
|
|
}
|
|
|
if (StringUtil.notBlank(info.getRescueTimes()) && Integer.parseInt(info.getRescueTimes()) < 0) {
|
|
|
- sb.append("抢救次数不能为负数!");
|
|
|
+ array.add(new PureCodeName("rescueTimes","抢救次数不能为负数!"));
|
|
|
}
|
|
|
if (Integer.parseInt(info.getRescueTimes()) < Integer.parseInt(info.getRescueSuccessTimes())) {
|
|
|
- sb.append("抢救成功次数不能大于抢救次数!");
|
|
|
+ array.add(new PureCodeName("rescueSuccessTimes","抢救成功次数不能大于抢救次数!"));
|
|
|
}
|
|
|
if (Integer.parseInt(info.getRescueTimes()) - Integer.parseInt(info.getRescueSuccessTimes()) > 1) {
|
|
|
- sb.append("抢救成功次数不能少于抢救次数两次!");
|
|
|
+ array.add(new PureCodeName("rescueSuccessTimes","抢救成功次数不能少于抢救次数两次!"));
|
|
|
}
|
|
|
- return sb.toString();
|
|
|
+ return array;
|
|
|
}
|
|
|
|
|
|
private boolean hasSurgeryFee(String str) {
|
|
@@ -356,34 +352,34 @@ public class VerifyCaseFrontSheet {
|
|
|
return StringUtil.notBlank(level) && ("3".equals(level) || "4".equals(level));
|
|
|
}
|
|
|
|
|
|
- private void checkSurgery(StringBuilder sb, CaseFrontsheetSurgery surgery) {
|
|
|
+ private void checkSurgery(List<PureCodeName> array, CaseFrontsheetSurgery surgery) {
|
|
|
if (StringUtil.isBlank(surgery.getName())) {
|
|
|
return;
|
|
|
}
|
|
|
if (isHighLevelSurgery(surgery.getLevel())) {
|
|
|
if (StringUtil.isBlank(surgery.getName())) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术名称、编码不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术名称、编码不能为空!"));
|
|
|
}
|
|
|
if (null == surgery.getDate()) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术日期不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术日期不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(surgery.getOperator())) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术术者不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术术者不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(surgery.getAssistantOne())) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术I助不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术I助不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(surgery.getCutHeal())) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术切口愈合等级不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术切口愈合等级不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(surgery.getAnaesthesia())) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术麻醉方式不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术麻醉方式不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(surgery.getAnaesthesiaor())) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术麻醉医师不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术麻醉医师不能为空!"));
|
|
|
}
|
|
|
if (StringUtil.isBlank(surgery.getAssistantTwo())) {
|
|
|
- sb.append("手术").append(surgery.getNo()).append(",三、四级手术II助不能为空!");
|
|
|
+ array.add(new PureCodeName("surgeryTable","手术" + surgery.getNo() + ",三、四级手术II助不能为空!"));
|
|
|
}
|
|
|
}
|
|
|
}
|