|
@@ -1,12 +1,10 @@
|
|
package com.lantone.qc.kernel.catalogue.firstpagerecord;
|
|
package com.lantone.qc.kernel.catalogue.firstpagerecord;
|
|
|
|
|
|
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.Content;
|
|
import com.lantone.qc.pub.Content;
|
|
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.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -29,6 +27,9 @@ public class FIRP0275 extends QCCatalogue {
|
|
Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
String firstDischargeTime = firstpageStructureMap.get(Content.actualStay);//病案首页出院时间
|
|
String firstDischargeTime = firstpageStructureMap.get(Content.actualStay);//病案首页出院时间
|
|
String dischargeTime = leaveHospitalStructureMap.get(Content.stayLength);//出院小结出院时间
|
|
String dischargeTime = leaveHospitalStructureMap.get(Content.stayLength);//出院小结出院时间
|
|
|
|
+ if (StringUtil.isBlank(firstDischargeTime) || StringUtil.isBlank(dischargeTime)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
String first = copileNum(firstDischargeTime);
|
|
String first = copileNum(firstDischargeTime);
|
|
String disc = copileNum(dischargeTime);
|
|
String disc = copileNum(dischargeTime);
|
|
if (!first.equals(disc)) {
|
|
if (!first.equals(disc)) {
|
|
@@ -38,11 +39,11 @@ public class FIRP0275 extends QCCatalogue {
|
|
}
|
|
}
|
|
|
|
|
|
private String copileNum(String firstDischargeTime) {
|
|
private String copileNum(String firstDischargeTime) {
|
|
- String num= "";
|
|
|
|
|
|
+ String num = "";
|
|
String compile = "([1-9]\\d*\\.?\\d*)|(0\\.\\d*[1-9])";
|
|
String compile = "([1-9]\\d*\\.?\\d*)|(0\\.\\d*[1-9])";
|
|
Pattern compile1 = Pattern.compile(compile);
|
|
Pattern compile1 = Pattern.compile(compile);
|
|
Matcher matcher = compile1.matcher(firstDischargeTime);
|
|
Matcher matcher = compile1.matcher(firstDischargeTime);
|
|
- while (matcher.find()){
|
|
|
|
|
|
+ while (matcher.find()) {
|
|
num = matcher.group(0);
|
|
num = matcher.group(0);
|
|
}
|
|
}
|
|
return num;
|
|
return num;
|