|
@@ -18,8 +18,7 @@ import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author wangfeng
|
|
* @author wangfeng
|
|
- * @Description:入院后没有连续记录3天
|
|
|
|
- * 记录分为:首次病程记录+查房记录
|
|
|
|
|
|
+ * @Description:入院后没有连续记录3天 记录分为:首次病程记录+查房记录
|
|
* @date 2020-06-29 17:16
|
|
* @date 2020-06-29 17:16
|
|
*/
|
|
*/
|
|
@Component
|
|
@Component
|
|
@@ -32,12 +31,15 @@ public class THR03010 extends QCCatalogue {
|
|
if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureMap().size() == 0) {
|
|
if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureMap().size() == 0) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() == null || inputInfo.getBeHospitalizedDoc().getStructureMap().size() == 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
String behospitalDate = structureMap.get("入院日期") == null ? null : structureMap.get("入院日期");
|
|
String behospitalDate = structureMap.get("入院日期") == null ? null : structureMap.get("入院日期");
|
|
//String leaveHospitalDate = structureMap.get("leaveHospitalDate") == null ? null : structureMap.get("leaveHospitalDate");
|
|
//String leaveHospitalDate = structureMap.get("leaveHospitalDate") == null ? null : structureMap.get("leaveHospitalDate");
|
|
Map<String, String> structureMaps = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
Map<String, String> structureMaps = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
- String leaveHospitalDate = structureMaps.get("出院时间")!= null ?
|
|
|
|
- structureMaps.get("出院时间") :inputInfo.getMedicalRecordInfoDoc().getStructureMap().get("leaveHospitalDate");
|
|
|
|
|
|
+ String leaveHospitalDate = structureMaps.get("出院时间") != null ?
|
|
|
|
+ structureMaps.get("出院时间") : inputInfo.getMedicalRecordInfoDoc().getStructureMap().get("leaveHospitalDate");
|
|
if (behospitalDate != null && leaveHospitalDate != null) {
|
|
if (behospitalDate != null && leaveHospitalDate != null) {
|
|
Date beDate = StringUtil.parseDateTime(behospitalDate);
|
|
Date beDate = StringUtil.parseDateTime(behospitalDate);
|
|
Date leaveDate = StringUtil.parseDateTime(leaveHospitalDate);
|
|
Date leaveDate = StringUtil.parseDateTime(leaveHospitalDate);
|
|
@@ -57,11 +59,10 @@ public class THR03010 extends QCCatalogue {
|
|
List<Date> wordDateList = new ArrayList<>();
|
|
List<Date> wordDateList = new ArrayList<>();
|
|
//获取首次病程记录时间
|
|
//获取首次病程记录时间
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
- if(firstCourseRecordDoc!=null
|
|
|
|
- &&StringUtil.isNotBlank(firstCourseRecordDoc.getStructureMap().get("病历日期"))) {
|
|
|
|
|
|
+ if (firstCourseRecordDoc != null
|
|
|
|
+ && StringUtil.isNotBlank(firstCourseRecordDoc.getStructureMap().get("病历日期"))) {
|
|
String firstCourseRecorTime = firstCourseRecordDoc.getStructureMap().get("病历日期");
|
|
String firstCourseRecorTime = firstCourseRecordDoc.getStructureMap().get("病历日期");
|
|
- if(StringUtil.isNotBlank(firstCourseRecorTime))
|
|
|
|
- {
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(firstCourseRecorTime)) {
|
|
wordDateList.add(StringUtil.parseDateTime(firstCourseRecorTime));
|
|
wordDateList.add(StringUtil.parseDateTime(firstCourseRecorTime));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -70,26 +71,21 @@ public class THR03010 extends QCCatalogue {
|
|
for (ThreeLevelWardDoc t : threeLevelWardDocs) {
|
|
for (ThreeLevelWardDoc t : threeLevelWardDocs) {
|
|
Date threeLevelDate = StringUtil.parseDateTime(t.getStructureMap().get("查房日期"));
|
|
Date threeLevelDate = StringUtil.parseDateTime(t.getStructureMap().get("查房日期"));
|
|
//去重,同一天就存一次
|
|
//去重,同一天就存一次
|
|
- if(threeLevelDate!=null&&wordDateList.get(wordDateList.size()-1)!=null
|
|
|
|
- &&!DateUtils.isSameDay(wordDateList.get(wordDateList.size()-1),threeLevelDate))
|
|
|
|
- {
|
|
|
|
|
|
+ if (threeLevelDate != null && wordDateList.get(wordDateList.size() - 1) != null
|
|
|
|
+ && !DateUtils.isSameDay(wordDateList.get(wordDateList.size() - 1), threeLevelDate)) {
|
|
wordDateList.add(threeLevelDate);
|
|
wordDateList.add(threeLevelDate);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//如果记录时间没有3天
|
|
//如果记录时间没有3天
|
|
- if(wordDateList.size()<3)
|
|
|
|
- {
|
|
|
|
|
|
+ if (wordDateList.size() < 3) {
|
|
status.set("-1");
|
|
status.set("-1");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//如果住院当天开始做记录
|
|
//如果住院当天开始做记录
|
|
- if(DateUtils.isSameDay(stringDate.get(0),wordDateList.get(0)))
|
|
|
|
- {
|
|
|
|
- for(int i = 1;i<=2;i++)
|
|
|
|
- {
|
|
|
|
|
|
+ if (DateUtils.isSameDay(stringDate.get(0), wordDateList.get(0))) {
|
|
|
|
+ for (int i = 1; i <= 2; i++) {
|
|
//如果时间不相等则时间不连续
|
|
//如果时间不相等则时间不连续
|
|
- if(!DateUtils.isSameDay(stringDate.get(i),wordDateList.get(i)))
|
|
|
|
- {
|
|
|
|
|
|
+ if (!DateUtils.isSameDay(stringDate.get(i), wordDateList.get(i))) {
|
|
status.set("-1");
|
|
status.set("-1");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -97,13 +93,10 @@ public class THR03010 extends QCCatalogue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//如果是住院后第二天开始
|
|
//如果是住院后第二天开始
|
|
- else
|
|
|
|
- {
|
|
|
|
- for(int i = 0;i<=3;i++)
|
|
|
|
- {
|
|
|
|
|
|
+ else {
|
|
|
|
+ for (int i = 0; i <= 3; i++) {
|
|
//如果时间不相等则时间不连续
|
|
//如果时间不相等则时间不连续
|
|
- if(!DateUtils.isSameDay(stringDate.get(i+1),wordDateList.get(i)))
|
|
|
|
- {
|
|
|
|
|
|
+ if (!DateUtils.isSameDay(stringDate.get(i + 1), wordDateList.get(i))) {
|
|
status.set("-1");
|
|
status.set("-1");
|
|
return;
|
|
return;
|
|
}
|
|
}
|