|
@@ -7,6 +7,7 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.transferrecord.TransferIntoDoc;
|
|
|
import com.lantone.qc.pub.model.doc.transferrecord.TransferRecordDoc;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.apache.commons.lang3.time.DateUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Date;
|
|
@@ -29,20 +30,27 @@ public class DUT0598 extends QCCatalogue {
|
|
|
}
|
|
|
List<TransferIntoDoc> transferIntoDocs = transferRecordDoc.getTransferIntoDocs();
|
|
|
String rollInRecordDateStr = "", recordDateStr = "";
|
|
|
- for (TransferIntoDoc transferIntoDoc : transferIntoDocs) {
|
|
|
- Map<String, String> transferOutStructureMap = transferIntoDoc.getStructureMap();
|
|
|
- rollInRecordDateStr = transferOutStructureMap.get("转科日期");
|
|
|
- recordDateStr = transferOutStructureMap.get("记录日期");
|
|
|
- if (CatalogueUtil.isEmpty(rollInRecordDateStr) || CatalogueUtil.isEmpty(recordDateStr)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- Date rollOutRecordDate = StringUtil.parseDateTime(rollInRecordDateStr);
|
|
|
- Date recordDate = StringUtil.parseDateTime(recordDateStr);
|
|
|
- if (rollOutRecordDate != null && recordDate != null && rollOutRecordDate.before(recordDate)) {
|
|
|
- boolean compareTime = CatalogueUtil.compareTime(rollOutRecordDate, recordDate, (long) 24 * 60);
|
|
|
- if (compareTime) {
|
|
|
- status.set("-1");
|
|
|
- return;
|
|
|
+ if (inputInfo.getMedicalRecordInfoDoc() != null) {
|
|
|
+ Map<String, String> medicalRecordInfoStructureMap = inputInfo.getMedicalRecordInfoDoc().getStructureMap();
|
|
|
+ //转入时间
|
|
|
+ rollInRecordDateStr = medicalRecordInfoStructureMap.get("transInTime");
|
|
|
+
|
|
|
+ for (TransferIntoDoc transferIntoDoc : transferIntoDocs) {
|
|
|
+ Map<String, String> transferOutStructureMap = transferIntoDoc.getStructureMap();
|
|
|
+// rollInRecordDateStr = transferOutStructureMap.get("转科日期");
|
|
|
+ recordDateStr = transferOutStructureMap.get("病历日期");
|
|
|
+ if (CatalogueUtil.isEmpty(rollInRecordDateStr) || CatalogueUtil.isEmpty(recordDateStr)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Date rollOutRecordDate = StringUtil.parseDateTime(rollInRecordDateStr);
|
|
|
+ Date recordDate = StringUtil.parseDateTime(recordDateStr);
|
|
|
+ if (rollOutRecordDate != null && recordDate != null && rollOutRecordDate.before(recordDate)) {
|
|
|
+ boolean compareTime = CatalogueUtil.compareTime(rollOutRecordDate, recordDate, (long) 24 * 60);
|
|
|
+ DateUtils.isSameDay(rollOutRecordDate, recordDate);
|
|
|
+ if (compareTime) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|