|
@@ -9,6 +9,7 @@ import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
import com.lantone.qc.pub.util.DateUtil;
|
|
import com.lantone.qc.pub.util.DateUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -26,13 +27,22 @@ import java.util.Map;
|
|
public class THR0127 extends QCCatalogue {
|
|
public class THR0127 extends QCCatalogue {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
status.set("0");
|
|
status.set("0");
|
|
- if (inputInfo.getLeaveHospitalDoc() != null
|
|
|
|
- && inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getStructureMap() != null
|
|
|
|
- && inputInfo.getThreeLevelWardDocs().size() > 0) {
|
|
|
|
|
|
+ if (inputInfo.getLeaveHospitalDoc() != null) {
|
|
Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
String admisTime = leaveHospitalStructureMap.get(Content.admisTime);
|
|
String admisTime = leaveHospitalStructureMap.get(Content.admisTime);
|
|
String dischargeTime = leaveHospitalStructureMap.get(Content.dischargeTime);
|
|
String dischargeTime = leaveHospitalStructureMap.get(Content.dischargeTime);
|
|
- if (CatalogueUtil.isEmpty(admisTime) || CatalogueUtil.isEmpty(dischargeTime)) {
|
|
|
|
|
|
+ //如果住院天数小于7天则不判断该条规则
|
|
|
|
+ if (!CatalogueUtil.isEmpty(admisTime) && !CatalogueUtil.isEmpty(dischargeTime)) {
|
|
|
|
+ if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(dischargeTime), (long) (7 * 24 * 60))) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() != null && inputInfo.getThreeLevelWardDocs().size() > 0) {
|
|
|
|
+ Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
|
+ String admisTime = beHospitalStructureMap.get("入院日期");
|
|
|
|
+ if (CatalogueUtil.isEmpty(admisTime)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//开始时间(入院时间)
|
|
//开始时间(入院时间)
|
|
@@ -40,10 +50,6 @@ public class THR0127 extends QCCatalogue {
|
|
if (beginDate == null) {
|
|
if (beginDate == null) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- //如果住院天数小于7天则不判断该条规则
|
|
|
|
- if (!CatalogueUtil.compareTime(beginDate, StringUtil.parseDateTime(dischargeTime), (long) (7 * 24 * 60))) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
|
|
ThreeLevelWardDoc threeLevelWardDoc = inputInfo.getThreeLevelWardDocs().get(0);
|
|
ThreeLevelWardDoc threeLevelWardDoc = inputInfo.getThreeLevelWardDocs().get(0);
|
|
List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|
|
List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|
|
@@ -78,16 +84,19 @@ public class THR0127 extends QCCatalogue {
|
|
status.set("0");
|
|
status.set("0");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ List<String> resultInfos = new ArrayList<>();
|
|
for (int j = 0; j < roundRecordEveryWeek.size(); j++) {
|
|
for (int j = 0; j < roundRecordEveryWeek.size(); j++) {
|
|
int directorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.director);
|
|
int directorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.director);
|
|
int dept_doctorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.dept_doctor);
|
|
int dept_doctorNum = CatalogueUtil.appearNumber(roundRecordEveryWeek.get(j).split(","), Content.dept_doctor);
|
|
if (directorNum + dept_doctorNum < 2) {
|
|
if (directorNum + dept_doctorNum < 2) {
|
|
//每周无2次主任医师查房记录/科主任查房记录
|
|
//每周无2次主任医师查房记录/科主任查房记录
|
|
status.set("-1");
|
|
status.set("-1");
|
|
- info.set(lastWardDateRangeList.get(j));
|
|
|
|
- return;
|
|
|
|
|
|
+ resultInfos.add(lastWardDateRangeList.get(j));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (resultInfos.size() > 0) {
|
|
|
|
+ info.set(StringUtils.join(resultInfos.toArray(), ";"));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -127,10 +136,10 @@ public class THR0127 extends QCCatalogue {
|
|
/* 替换查房标题中主刀/一助的职称 */
|
|
/* 替换查房标题中主刀/一助的职称 */
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
if (title.contains("主刀")) {
|
|
if (title.contains("主刀")) {
|
|
- String doctorTitle = CatalogueUtil.getDoctorTitle(operationDocs, recordDate,"主刀医师");
|
|
|
|
|
|
+ String doctorTitle = CatalogueUtil.getDoctorTitle(operationDocs, recordDate, "主刀医师");
|
|
title = title.replace("主刀", doctorTitle);
|
|
title = title.replace("主刀", doctorTitle);
|
|
- } else if (title.contains("一助")){
|
|
|
|
- String doctorTitle = CatalogueUtil.getDoctorTitle(operationDocs, recordDate,"一助");
|
|
|
|
|
|
+ } else if (title.contains("一助")) {
|
|
|
|
+ String doctorTitle = CatalogueUtil.getDoctorTitle(operationDocs, recordDate, "一助");
|
|
title = title.replace("一助", doctorTitle);
|
|
title = title.replace("一助", doctorTitle);
|
|
}
|
|
}
|
|
if (admisDate.before(recordDate) && !CatalogueUtil.compareTime(admisDate, recordDate, Long.valueOf(duration))) {
|
|
if (admisDate.before(recordDate) && !CatalogueUtil.compareTime(admisDate, recordDate, Long.valueOf(duration))) {
|