|
@@ -0,0 +1,44 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.firstpagerecord;
|
|
|
+
|
|
|
+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.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FIRP03239
|
|
|
+ * @Description : 首页入院时间晚于出院时间
|
|
|
+ * @Author : dy
|
|
|
+ * @Date: 2021-11-12 15:57
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class FIRP03239 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo){
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getFirstPageRecordDoc()!=null && inputInfo.getFirstPageRecordDoc().getStructureMap()!=null){
|
|
|
+ Map<String, String> structureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ Map<String, String> structureMap1 = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ String admissionTime = structureMap.get(Content.admisTime);
|
|
|
+ String dischargeTime = structureMap1.get(Content.dischargeTime);
|
|
|
+ //病案首页入院时间和病案首页的出院时间比较,大于出院时间则报错
|
|
|
+ if (StringUtil.isNotBlank(admissionTime) && StringUtil.isNotBlank(dischargeTime)){
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ //SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ try {
|
|
|
+ if (CatalogueUtil.compareDate(admissionTime,admissionTime,-1)){
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|