|
@@ -14,13 +14,14 @@ import com.diagbot.service.impl.QcresultDetailServiceImpl;
|
|
|
import com.diagbot.service.impl.QcresultInfoServiceImpl;
|
|
|
import com.diagbot.util.*;
|
|
|
import com.diagbot.vo.*;
|
|
|
-import net.sf.jsqlparser.expression.LongValue;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @Description:
|
|
@@ -46,6 +47,8 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
@Autowired
|
|
|
private MedCheckInfoFacade medCheckInfoFacade;
|
|
|
@Autowired
|
|
|
+ private QcresultDetailFacade qcresultDetailFacade;
|
|
|
+ @Autowired
|
|
|
@Qualifier("medQcresultCasesServiceImpl")
|
|
|
private MedQcresultCasesServiceImpl medQcresultCasesService;
|
|
|
|
|
@@ -617,6 +620,43 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取病历第一次评分和质控缺陷
|
|
|
+ * @param qcFirstAnalyzeVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public QcFirstAnalyzeDTO getQcFirstAnalyze(QcFirstAnalyzeVO qcFirstAnalyzeVO) {
|
|
|
+
|
|
|
+ //1.根据医院id和病历号查询qcresultInfo表
|
|
|
+ QcresultInfo qcresultInfo = this.lambdaQuery()
|
|
|
+ .eq(QcresultInfo::getHospitalId, qcFirstAnalyzeVO.getHospitalId())
|
|
|
+ .like(QcresultInfo::getBehospitalCode, qcFirstAnalyzeVO.getBehospitalCode())
|
|
|
+ .orderByAsc(QcresultInfo::getGmtCreate)
|
|
|
+ .last("LIMIT 1")
|
|
|
+ .one();
|
|
|
+ //2.判断病历等级是否为甲级
|
|
|
+ if(qcresultInfo == null || qcresultInfo.getLevel().equals("甲")){
|
|
|
+ return new QcFirstAnalyzeDTO();
|
|
|
+ }
|
|
|
+ QcFirstAnalyzeDTO dto = new QcFirstAnalyzeDTO();
|
|
|
+ dto.setLevel(qcresultInfo.getLevel());
|
|
|
+ dto.setScoreRes(qcresultInfo.getScoreRes());
|
|
|
+ //3.查询第一次质控缺陷条目
|
|
|
+ List<QcresultDetail> list = qcresultDetailFacade.lambdaQuery()
|
|
|
+ .eq(QcresultDetail::getBehospitalCode, qcresultInfo.getBehospitalCode())
|
|
|
+ .eq(QcresultDetail::getGmtCreate, qcresultInfo.getGmtCreate())
|
|
|
+ .list();
|
|
|
+ List<String> msgs = new ArrayList<>();
|
|
|
+ for (QcresultDetail qcresultDetail : list) {
|
|
|
+ String msg = qcresultDetail.getMsg();
|
|
|
+ msgs.add(msg);
|
|
|
+ }
|
|
|
+ dto.setMsg(msgs);
|
|
|
+
|
|
|
+ return dto;
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|