|
@@ -1,12 +1,13 @@
|
|
|
package com.lantone.qc.kernel.catalogue.behospitalized;
|
|
|
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
-import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
-import com.lantone.qc.pub.Content;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@@ -18,7 +19,27 @@ import java.util.Map;
|
|
|
@Component
|
|
|
public class BEH0422 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ /**
|
|
|
+ * 记录日期比入院日期早就报错
|
|
|
+ */
|
|
|
status.set("0");
|
|
|
-
|
|
|
+ BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
+ if (beHospitalizedDoc == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> docStructureMap = beHospitalizedDoc.getStructureMap();
|
|
|
+ String admissionDateStr = docStructureMap.get("入院日期");
|
|
|
+ String recordDateStr = docStructureMap.get("记录日期");
|
|
|
+ if (StringUtil.isBlank(admissionDateStr) || StringUtil.isBlank(recordDateStr)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Date admissionDate = StringUtil.parseDateTime(admissionDateStr);
|
|
|
+ Date recordDate = StringUtil.parseDateTime(recordDateStr);
|
|
|
+ if (admissionDate == null || recordDate == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (admissionDate.after(recordDate)) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
}
|
|
|
}
|