|
@@ -6,6 +6,7 @@ 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.OutputInfo;
|
|
|
+import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ward.DirectorDoctorWardDoc;
|
|
@@ -27,25 +28,36 @@ import java.util.Map;
|
|
|
@Component
|
|
|
public class THR0125 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- if (inputInfo.getThreeLevelWardDocs().size() == 0) {
|
|
|
- status.set("0");
|
|
|
- return;
|
|
|
- }
|
|
|
- if (inputInfo.getLeaveHospitalDoc() != null && inputInfo.getLeaveHospitalDoc().getStructureMap() != null) {
|
|
|
- Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
|
- String admisTime = leaveHospitalStructureMap.get("入院日期");
|
|
|
- String dischargeTime = leaveHospitalStructureMap.get("出院日期");
|
|
|
- if (CatalogueUtil.isEmpty(admisTime)) {
|
|
|
+
|
|
|
+ MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null &&
|
|
|
+ medicalRecordInfoDoc != null) {
|
|
|
+ Map<String, String> getFirstPageRecordStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ String admisTime = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
|
|
|
+ String dischargeTime = getFirstPageRecordStructureMap.get("出院时间");
|
|
|
+ if (CatalogueUtil.isEmpty(admisTime) || CatalogueUtil.isEmpty(dischargeTime)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!CatalogueUtil.compareTime(
|
|
|
+ StringUtil.parseDateTime(admisTime),
|
|
|
+ StringUtil.parseDateTime(DateUtil.nowString()),
|
|
|
+ Long.valueOf(72 * 60))) {//如果入院未超过72小时,规则不判断
|
|
|
status.set("0");
|
|
|
return;
|
|
|
}
|
|
|
//如果住院天数小于3天则不判断该条规则
|
|
|
- if (DateUtil.parseDate(dischargeTime) != null && StringUtil.isNotEmpty(dischargeTime) &&
|
|
|
+ if (DateUtil.parseDate(dischargeTime) != null &&
|
|
|
!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(dischargeTime), (long) (72 * 60))) {
|
|
|
status.set("0");
|
|
|
return;
|
|
|
+ } else {
|
|
|
+ if (inputInfo.getThreeLevelWardDocs().size() == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (inputInfo.getBeHospitalizedDoc() != null) {
|
|
|
Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
String admisTime = beHospitalStructureMap.get("入院日期");
|