|
@@ -4,11 +4,13 @@ import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
|
|
import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
|
|
|
|
+import com.lantone.qc.pub.model.doc.StagesSummaryDoc;
|
|
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.Calendar;
|
|
import java.util.Calendar;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
+import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -24,17 +26,22 @@ public class DUT0296 extends QCCatalogue {
|
|
status.set("0");
|
|
status.set("0");
|
|
|
|
|
|
LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
|
|
LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
|
|
|
|
+ List<StagesSummaryDoc> stagesSummaryDocs = inputInfo.getStagesSummaryDocs();
|
|
if (leaveHospitalDoc != null) {
|
|
if (leaveHospitalDoc != null) {
|
|
Map<String, String> structureMap_leave = leaveHospitalDoc.getStructureMap();
|
|
Map<String, String> structureMap_leave = leaveHospitalDoc.getStructureMap();
|
|
String be_date = structureMap_leave.get("入院时间"); //2019-12-07 08:48
|
|
String be_date = structureMap_leave.get("入院时间"); //2019-12-07 08:48
|
|
String leave_date = structureMap_leave.get("出院时间");//2019-12-10 10:49
|
|
String leave_date = structureMap_leave.get("出院时间");//2019-12-10 10:49
|
|
if (StringUtil.isNotBlank(be_date) && StringUtil.isNotBlank(leave_date)) {
|
|
if (StringUtil.isNotBlank(be_date) && StringUtil.isNotBlank(leave_date)) {
|
|
- ffr(be_date, leave_date);
|
|
|
|
|
|
+ int ffr = ffr(be_date, leave_date);
|
|
|
|
+ if(ffr >= 31 && (stagesSummaryDocs == null || stagesSummaryDocs.size() == 0)){
|
|
|
|
+ status.set("-1");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- private void ffr(String be_date, String leave_date) {
|
|
|
|
|
|
+ private int ffr(String be_date, String leave_date) {
|
|
|
|
+ int day=0;
|
|
try {
|
|
try {
|
|
Date date_in = StringUtil.parseDateTime(be_date);
|
|
Date date_in = StringUtil.parseDateTime(be_date);
|
|
Date date_out = StringUtil.parseDateTime(leave_date);
|
|
Date date_out = StringUtil.parseDateTime(leave_date);
|
|
@@ -44,13 +51,11 @@ public class DUT0296 extends QCCatalogue {
|
|
to.setTime(date_out);
|
|
to.setTime(date_out);
|
|
int fromMonth = from.get(Calendar.DAY_OF_YEAR);
|
|
int fromMonth = from.get(Calendar.DAY_OF_YEAR);
|
|
int toMonth = to.get(Calendar.DAY_OF_YEAR);
|
|
int toMonth = to.get(Calendar.DAY_OF_YEAR);
|
|
- int day = toMonth - fromMonth;
|
|
|
|
- if (day > 30) {
|
|
|
|
- status.set("-1");
|
|
|
|
- }
|
|
|
|
|
|
+ day = toMonth - fromMonth;
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
+ return day;
|
|
}
|
|
}
|
|
}
|
|
}
|