|
@@ -6,6 +6,7 @@ import com.diagbot.dto.AlgorithmDTO;
|
|
import com.diagbot.dto.AnalyzeDTO;
|
|
import com.diagbot.dto.AnalyzeDTO;
|
|
import com.diagbot.dto.QcResultDTO;
|
|
import com.diagbot.dto.QcResultDTO;
|
|
import com.diagbot.entity.BehospitalInfo;
|
|
import com.diagbot.entity.BehospitalInfo;
|
|
|
|
+import com.diagbot.entity.MedCheckInfo;
|
|
import com.diagbot.entity.MedQcresultCases;
|
|
import com.diagbot.entity.MedQcresultCases;
|
|
import com.diagbot.entity.QcresultDetail;
|
|
import com.diagbot.entity.QcresultDetail;
|
|
import com.diagbot.entity.QcresultInfo;
|
|
import com.diagbot.entity.QcresultInfo;
|
|
@@ -49,6 +50,8 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
@Autowired
|
|
@Autowired
|
|
private BehospitalInfoFacade behospitalInfoFacade;
|
|
private BehospitalInfoFacade behospitalInfoFacade;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private MedCheckInfoFacade medCheckInfoFacade;
|
|
|
|
+ @Autowired
|
|
@Qualifier("medQcresultCasesServiceImpl")
|
|
@Qualifier("medQcresultCasesServiceImpl")
|
|
private MedQcresultCasesServiceImpl medQcresultCasesService;
|
|
private MedQcresultCasesServiceImpl medQcresultCasesService;
|
|
|
|
|
|
@@ -112,6 +115,7 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
analyzeVO.setHospitalId(hospitalId);
|
|
analyzeVO.setHospitalId(hospitalId);
|
|
analyzeVO.setBehospitalCode(qcresultVO.getBehospitalCode());
|
|
analyzeVO.setBehospitalCode(qcresultVO.getBehospitalCode());
|
|
|
|
+ analyzeVO.setDelStatus(qcresultVO.getDelStatus());
|
|
Date date = this.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, null, null, false, qcresultInfo);
|
|
Date date = this.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, null, null, false, qcresultInfo);
|
|
//返回参数组装
|
|
//返回参数组装
|
|
AnalyzeDTO analyzeDTO = new AnalyzeDTO();
|
|
AnalyzeDTO analyzeDTO = new AnalyzeDTO();
|
|
@@ -254,17 +258,89 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
);
|
|
);
|
|
break;
|
|
break;
|
|
case 4:
|
|
case 4:
|
|
- //逻辑删除质控明细
|
|
|
|
- qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
|
- .eq("id", algorithmVO.getOptResultAlgVO().getId())
|
|
|
|
|
|
+ //获取病历核查人员id,该操作只能是核查员操作
|
|
|
|
+ Long checkId = medCheckInfoFacade.getOne(new QueryWrapper<MedCheckInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("hospital_id", analyzeVO.getHospitalId())
|
|
.eq("hospital_id", analyzeVO.getHospitalId())
|
|
- .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
- .set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
|
- .set("opt_type", 2)
|
|
|
|
- .set("modifier", useId)
|
|
|
|
- .set("gmt_modified", now)
|
|
|
|
- );
|
|
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())).getCheckId();
|
|
|
|
+ if(checkId==null)
|
|
|
|
+ {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "病历没有分配核查人员");
|
|
|
|
+ }
|
|
|
|
+ if(!checkId.equals(useId))
|
|
|
|
+ {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "当前用户不是分配的核查人员");
|
|
|
|
+ }
|
|
|
|
+ //逻辑删除质控明细 0删除
|
|
|
|
+ if(analyzeVO.getDelStatus()==0)
|
|
|
|
+ {
|
|
|
|
+ //在remark字段插入机器评分 ,手动评分用来恢复用
|
|
|
|
+ //该条目是机器插入条目
|
|
|
|
+ qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
|
+ .eq("id", algorithmVO.getOptResultAlgVO().getId())
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
+ .eq("grade_type",1)
|
|
|
|
+ .set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
|
+ .set("grade_type",2)
|
|
|
|
+ .set("opt_type", 2)
|
|
|
|
+ .set("modifier", useId)
|
|
|
|
+ .set("remark","机器评分")
|
|
|
|
+ .set("gmt_modified", now)
|
|
|
|
+ );
|
|
|
|
+ //该条目是手动插入条目时
|
|
|
|
+ qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
|
+ .eq("id", algorithmVO.getOptResultAlgVO().getId())
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
+ .eq("grade_type",2)
|
|
|
|
+ .set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
|
+ .set("opt_type", 2)
|
|
|
|
+ .set("modifier", useId)
|
|
|
|
+ .set("remark","手动评分")
|
|
|
|
+ .set("gmt_modified", now)
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ //1恢复
|
|
|
|
+ else if(analyzeVO.getDelStatus()==1)
|
|
|
|
+ {
|
|
|
|
+ String creater = qcresultDetailServiceImpl.getOne(new QueryWrapper<QcresultDetail>()
|
|
|
|
+ .eq("id", algorithmVO.getOptResultAlgVO().getId())).getCreator();
|
|
|
|
+ //该条目是机器插入条目
|
|
|
|
+ qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
|
+ .eq("id", algorithmVO.getOptResultAlgVO().getId())
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
+ .eq("remark","机器评分")
|
|
|
|
+ .set("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .set("grade_type",1)
|
|
|
|
+ .set("opt_type", 1)
|
|
|
|
+ .set("modifier", creater)
|
|
|
|
+ .set("remark", null)
|
|
|
|
+ .set("gmt_modified", now)
|
|
|
|
+ );
|
|
|
|
+ //该条目是手动插入条目时
|
|
|
|
+ qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
|
+ .eq("id", algorithmVO.getOptResultAlgVO().getId())
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
+ .eq("remark","手动评分")
|
|
|
|
+ .set("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .set("opt_type", 1)
|
|
|
|
+ .set("modifier", useId)
|
|
|
|
+ .set("remark", null)
|
|
|
|
+ .set("gmt_modified", now)
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "delStatus参数错误");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
/* DO NOTHING */
|
|
/* DO NOTHING */
|