|
@@ -13,6 +13,7 @@ import com.lantone.qc.pub.model.doc.transferrecord.TransferOutDoc;
|
|
|
import com.lantone.qc.pub.model.doc.transferrecord.TransferRecordDoc;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -36,26 +37,11 @@ public class THR03137 extends QCCatalogue {
|
|
|
if(ListUtil.isEmpty(doctorAdviceDocs)){
|
|
|
return;
|
|
|
}
|
|
|
- //1.1【首次病程录】“科别”和【出院小结】“科别”不一致为转科
|
|
|
+
|
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
|
LeaveHospitalDoc leaveHospitalDoc = inputInfo.getLeaveHospitalDoc();
|
|
|
- if(null != firstCourseRecordDoc && StringUtils.isNotBlank(firstCourseRecordDoc.getStructureMap().get("临床科室")) && null != leaveHospitalDoc && StringUtils.isNotBlank(leaveHospitalDoc.getStructureMap().get("临床科室"))){
|
|
|
- String deptFir = firstCourseRecordDoc.getStructureMap().get("临床科室");
|
|
|
- String deptSec= leaveHospitalDoc.getStructureMap().get("临床科室");
|
|
|
- if(!deptFir.equals(deptSec)){
|
|
|
- flag = true;
|
|
|
- }
|
|
|
- }
|
|
|
- //1.2【病案首页】“入院科别”和“出院科别”不一致为转科
|
|
|
FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
|
- if(null != firstPageRecordDoc && StringUtils.isNotBlank(firstPageRecordDoc.getStructureMap().get("入院科别")) &&
|
|
|
- StringUtils.isNotBlank(firstPageRecordDoc.getStructureMap().get("出院科别"))){
|
|
|
- String deptFir = firstPageRecordDoc.getStructureMap().get("入院科别");
|
|
|
- String deptSec= firstPageRecordDoc.getStructureMap().get("出院科别");
|
|
|
- if(!deptFir.equals(deptSec)){
|
|
|
- flag = true;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
for (DoctorAdviceDoc doctorAdviceDoc : doctorAdviceDocs) {
|
|
|
//取长期临时医嘱,不为作废医嘱
|
|
|
if(doctorAdviceDoc.getStructureMap()!=null){
|
|
@@ -73,7 +59,7 @@ public class THR03137 extends QCCatalogue {
|
|
|
if(medicalOrderName.startsWith("停")){
|
|
|
continue;
|
|
|
}
|
|
|
- //1.3【临时医嘱/长期医嘱】包含【转科医嘱】4字
|
|
|
+ //1【临时医嘱/长期医嘱】包含【转科医嘱】4字
|
|
|
if(medicalOrderName.contains("转科医嘱")){
|
|
|
flag = true;
|
|
|
break;
|
|
@@ -84,6 +70,38 @@ public class THR03137 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //2【病案首页】“入院科别”和“转科科别”不一致且排除转科科别为空为转科
|
|
|
+ if(null != firstPageRecordDoc && MapUtils.isNotEmpty(firstPageRecordDoc.getStructureMap())){
|
|
|
+ String deptFir = firstPageRecordDoc.getStructureMap().get("入院科别");
|
|
|
+ String deptTran= firstPageRecordDoc.getStructureMap().get("转科科别");
|
|
|
+ deptTran = deptTran.replace("无", "")
|
|
|
+ .replace("—", "")
|
|
|
+ .replace("/", "")
|
|
|
+ .replace("无、", "")
|
|
|
+ .replace("-", "")
|
|
|
+ .replace("--", "");
|
|
|
+ if(StringUtils.isNotBlank(deptFir) && StringUtils.isNotBlank(deptTran) && !deptFir.equals(deptTran)){
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //3【首次病程录】“科别”和【出院小结】“科别”不一致 &&【病案首页】“入院科别”和“出院科别”不一致为转科
|
|
|
+ if(null != firstPageRecordDoc && MapUtils.isNotEmpty(firstPageRecordDoc.getStructureMap())){
|
|
|
+ String deptFir = firstPageRecordDoc.getStructureMap().get("入院科别");
|
|
|
+ String deptSec= firstPageRecordDoc.getStructureMap().get("出院科别");
|
|
|
+ if(StringUtils.isNotBlank(deptFir) && StringUtils.isNotBlank(deptSec) && !deptFir.equals(deptSec)){
|
|
|
+ if(null != firstCourseRecordDoc && MapUtils.isNotEmpty(firstCourseRecordDoc.getStructureMap()) && null != leaveHospitalDoc
|
|
|
+ && MapUtils.isNotEmpty(leaveHospitalDoc.getStructureMap()) ){
|
|
|
+ String clinicalDeptFir = firstCourseRecordDoc.getStructureMap().get("临床科室");
|
|
|
+ String clinicalDeptSec= leaveHospitalDoc.getStructureMap().get("临床科室");
|
|
|
+ if(StringUtils.isNotBlank(clinicalDeptFir) && StringUtils.isNotBlank(clinicalDeptSec) && !clinicalDeptFir.equals(clinicalDeptSec)){
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//1.4为转科人员判断是否有【转入记录/转科记录】
|
|
|
if(flag){
|
|
|
status.set("-1");
|
|
@@ -102,6 +120,7 @@ public class THR03137 extends QCCatalogue {
|
|
|
|
|
|
//2.1不存在【转入记录】或【转出记录】与【转入记录】数量不一致则报
|
|
|
TransferRecordDoc transferRecordDocs = inputInfo.getTransferRecordDocs();
|
|
|
+ status.set("0");
|
|
|
if(transferRecordDocs==null){
|
|
|
return;
|
|
|
}
|