|
@@ -12,6 +12,8 @@ import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
|
import java.util.Comparator;
|
|
@@ -27,8 +29,9 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Component
|
|
|
public class THR03023 extends QCCatalogue {
|
|
|
- public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
|
|
|
/**
|
|
|
+ * 入院当天有病重医嘱,当天写首次病程录就好,不需要写查房记录。这个不应该报错。
|
|
|
* 1、有病重医嘱、查房记录。
|
|
|
* 2、第一个病重医嘱的开始时间当天有查房记录,结束时间有查房记录。
|
|
|
* 3、每2天有查房记录。
|
|
@@ -40,11 +43,15 @@ public class THR03023 extends QCCatalogue {
|
|
|
ListUtil.isEmpty(inputInfo.getThreeLevelWardDocs())) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String leaveDateString = "";
|
|
|
+ String inputDateString = "";
|
|
|
+ String input_data = "";
|
|
|
Date leaveDate = null;
|
|
|
if (inputInfo.getLeaveHospitalDoc() != null) {
|
|
|
leaveDateString = inputInfo.getLeaveHospitalDoc().getStructureMap().get("出院时间");
|
|
|
+ inputDateString = inputInfo.getLeaveHospitalDoc().getStructureMap().get("入院时间");
|
|
|
+ input_data = simpleDateFormat.format(simpleDateFormat.parse(inputDateString)).toString();
|
|
|
} else if (inputInfo.getDeathRecordDoc() != null) {
|
|
|
leaveDateString = inputInfo.getDeathRecordDoc().getStructureMap().get("死亡时间");
|
|
|
}
|
|
@@ -61,6 +68,10 @@ public class THR03023 extends QCCatalogue {
|
|
|
String name = structureMap.get("医嘱项目名称");
|
|
|
if (StringUtil.isNotBlank(name) && name.contains("病重")) {
|
|
|
String startDateStr = structureMap.get("医嘱开始时间");
|
|
|
+ String advice_date = simpleDateFormat.format(simpleDateFormat.parse(startDateStr)).toString();
|
|
|
+ if(input_data.equals(advice_date)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
String endDateStr = structureMap.get("医嘱结束时间");
|
|
|
if (StringUtil.isNotBlank(startDateStr) && StringUtil.isNotBlank(endDateStr)) {
|
|
|
Date startDate = StringUtil.parseDateTime(startDateStr);
|