|
@@ -7,9 +7,12 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
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.model.doc.operation.OperationRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
|
|
+import com.lantone.qc.pub.util.DateUtil;
|
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -24,13 +27,16 @@ import java.util.Map;
|
|
public class THR02900 extends QCCatalogue {
|
|
public class THR02900 extends QCCatalogue {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
status.set("0");
|
|
status.set("0");
|
|
- if (inputInfo.getThreeLevelWardDocs().size() == 0 || inputInfo.getOperationDocs().size() == 0) {
|
|
|
|
|
|
+ if (inputInfo.getOperationDocs().size() == 0) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- ThreeLevelWardDoc threeLevelWardDoc = inputInfo.getThreeLevelWardDocs().get(0);
|
|
|
|
- List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|
|
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
-
|
|
|
|
|
|
+ ThreeLevelWardDoc threeLevelWardDoc = new ThreeLevelWardDoc();
|
|
|
|
+ List<ThreeLevelWardDoc> allDoctorWradDocs = new ArrayList<>();
|
|
|
|
+ if(inputInfo.getThreeLevelWardDocs() != null){
|
|
|
|
+ threeLevelWardDoc = inputInfo.getThreeLevelWardDocs().get(0);
|
|
|
|
+ threeLevelWardDoc.getAllDoctorWradDocs();
|
|
|
|
+ }
|
|
String allTitle = "";
|
|
String allTitle = "";
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
|
|
OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
|
|
@@ -45,16 +51,29 @@ public class THR02900 extends QCCatalogue {
|
|
if (opeEndDate == null) {
|
|
if (opeEndDate == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- for (ThreeLevelWardDoc wardDoc : allDoctorWradDocs) {
|
|
|
|
- Map<String, String> wardStructureMap = wardDoc.getStructureMap();
|
|
|
|
- String recordDateStr = wardStructureMap.get("查房日期");
|
|
|
|
- String recordTitle = wardStructureMap.get("查房标题");
|
|
|
|
- Date recordDate = CatalogueUtil.parseStringDate(recordDateStr);
|
|
|
|
- if (StringUtil.isBlank(recordTitle) || recordDate == null) {
|
|
|
|
- continue;
|
|
|
|
|
|
+ if (!CatalogueUtil.compareTime(
|
|
|
|
+ StringUtil.parseDateTime(opeEndTime),
|
|
|
|
+ StringUtil.parseDateTime(DateUtil.nowString()),
|
|
|
|
+ Long.valueOf(24 * 60))) {//如果接收未超过6小时,规则不判断
|
|
|
|
+ return;
|
|
|
|
+ }else {
|
|
|
|
+ if((StringUtil.isNotEmpty(chiefSurgeon) || StringUtil.isNotEmpty(firstAssistant)) && ListUtil.isEmpty(allDoctorWradDocs)) {
|
|
|
|
+ status.set("-1");
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- if (opeEndDate.before(recordDate) && !CatalogueUtil.compareTime(opeEndDate, recordDate, 24 * 60L)) {
|
|
|
|
- allTitle += recordTitle;
|
|
|
|
|
|
+ }
|
|
|
|
+ if(ListUtil.isNotEmpty(allDoctorWradDocs)){
|
|
|
|
+ for (ThreeLevelWardDoc wardDoc : allDoctorWradDocs) {
|
|
|
|
+ Map<String, String> wardStructureMap = wardDoc.getStructureMap();
|
|
|
|
+ String recordDateStr = wardStructureMap.get("查房日期");
|
|
|
|
+ String recordTitle = wardStructureMap.get("查房标题");
|
|
|
|
+ Date recordDate = CatalogueUtil.parseStringDate(recordDateStr);
|
|
|
|
+ if (StringUtil.isBlank(recordTitle) || recordDate == null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ if (opeEndDate.before(recordDate) && !CatalogueUtil.compareTime(opeEndDate, recordDate, 24 * 60L)) {
|
|
|
|
+ allTitle += recordTitle;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|