|
@@ -1,6 +1,7 @@
|
|
package com.lantone.qc.kernel.catalogue.firstcourserecord;
|
|
package com.lantone.qc.kernel.catalogue.firstcourserecord;
|
|
|
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
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.BeHospitalizedDoc;
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
@@ -35,14 +36,23 @@ public class FIRC0093 extends QCCatalogue {
|
|
if (StringUtils.isNotEmpty(couDate) && StringUtils.isNotEmpty(beDate)) {
|
|
if (StringUtils.isNotEmpty(couDate) && StringUtils.isNotEmpty(beDate)) {
|
|
Date date_in = StringUtil.parseDateTime(beDate);
|
|
Date date_in = StringUtil.parseDateTime(beDate);
|
|
Date date_out = StringUtil.parseDateTime(couDate);
|
|
Date date_out = StringUtil.parseDateTime(couDate);
|
|
- Calendar from = Calendar.getInstance();
|
|
|
|
- from.setTime(date_in);
|
|
|
|
- Calendar to = Calendar.getInstance();
|
|
|
|
- to.setTime(date_out);
|
|
|
|
- int fromHour = from.get(Calendar.HOUR_OF_DAY);
|
|
|
|
- int toHour = to.get(Calendar.HOUR_OF_DAY);
|
|
|
|
- int hour = toHour - fromHour;
|
|
|
|
- if (hour > 8) {
|
|
|
|
|
|
+ if (date_in == null || date_out == null) return;
|
|
|
|
+ boolean firc = CatalogueUtil.compareTime(date_in, date_out, 8 * 60L);
|
|
|
|
+ if (firc) {
|
|
|
|
+ status.set("-1");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ Map<String, String> beHospitalizedDocStructureMap = beHospitalizedDoc.getStructureMap();
|
|
|
|
+ if (beHospitalizedDocStructureMap != null) {
|
|
|
|
+ String beDate = beHospitalizedDocStructureMap.get("入院日期");
|
|
|
|
+ if (StringUtils.isNotEmpty(beDate)) {
|
|
|
|
+ Date date_in = StringUtil.parseDateTime(beDate);
|
|
|
|
+ Date date_out = new Date();
|
|
|
|
+ if (date_in == null) return;
|
|
|
|
+ boolean firc = CatalogueUtil.compareTime(date_in, date_out, 8 * 60L);
|
|
|
|
+ if (firc) {
|
|
status.set("-1");
|
|
status.set("-1");
|
|
}
|
|
}
|
|
}
|
|
}
|