|
|
@ -92,9 +92,9 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
// 2.生成初步诊断依据
|
|
|
|
// 2.生成初步诊断依据
|
|
|
|
diagnosisResultResVO.setBasisPrimaryResultResVO(createBasisPrimaryResult(patient, medicalRec, process));
|
|
|
|
diagnosisResultResVO.setBasisPrimaryResultResVO(createBasisPrimaryResult(patient, medicalRec, process));
|
|
|
|
// 3.生成证实诊断依据
|
|
|
|
// 3.生成证实诊断依据
|
|
|
|
diagnosisResultResVO.setBasisConfirmResultResVO(createBasisConfirmResult(medicalRec, processId, diseasesList));
|
|
|
|
diagnosisResultResVO.setBasisConfirmResultResVO(createBasisConfirmResult(medicalRec, processId));
|
|
|
|
// 4.生成鉴别诊断依据
|
|
|
|
// 4.生成鉴别诊断依据
|
|
|
|
diagnosisResultResVO.setBasisIdentificationResult(createBasisIdentificationResult(medicalRec,processId));
|
|
|
|
diagnosisResultResVO.setBasisIdentificationResult(createBasisIdentificationResult(medicalRec, processId));
|
|
|
|
// 5.全面检查-(暂无相关数据) 后面再看
|
|
|
|
// 5.全面检查-(暂无相关数据) 后面再看
|
|
|
|
diagnosisResultResVO.setFullCheck(null);
|
|
|
|
diagnosisResultResVO.setFullCheck(null);
|
|
|
|
// 6.处置方案
|
|
|
|
// 6.处置方案
|
|
|
@ -142,7 +142,7 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private BasisIdentificationResultResVO createBasisIdentificationResult(MedicalRec medicalRec,String processId) {
|
|
|
|
private BasisIdentificationResultResVO createBasisIdentificationResult(MedicalRec medicalRec, String processId) {
|
|
|
|
BasisIdentificationResultResVO basisIdentificationResultResVO = new BasisIdentificationResultResVO();
|
|
|
|
BasisIdentificationResultResVO basisIdentificationResultResVO = new BasisIdentificationResultResVO();
|
|
|
|
// 鉴别诊断依据,来自于medicalRec的DifferentialDiagnosisCriteria
|
|
|
|
// 鉴别诊断依据,来自于medicalRec的DifferentialDiagnosisCriteria
|
|
|
|
basisIdentificationResultResVO.setIdentificationDiagnosis(medicalRec.getDifferentialDiagnosisCriteria());
|
|
|
|
basisIdentificationResultResVO.setIdentificationDiagnosis(medicalRec.getDifferentialDiagnosisCriteria());
|
|
|
@ -155,7 +155,7 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
nodeResVO.setRecordName(e.getToolLocationName());
|
|
|
|
nodeResVO.setRecordName(e.getToolLocationName());
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
// 如果是必做的,则是正确
|
|
|
|
// 如果是必做的,则是正确
|
|
|
|
nodeResVO.setCorrect(null == e.getBasisIdentification() ? Integer.valueOf(0) : e.getBasisIdentification());
|
|
|
|
nodeResVO.setCorrect(Objects.equals(e.getBasisIdentification(), e.getRecordBasisIdentificationFlag()) ? 1 : 0);
|
|
|
|
return nodeResVO;
|
|
|
|
return nodeResVO;
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
// 2.3 获取辅助检查
|
|
|
|
// 2.3 获取辅助检查
|
|
|
@ -163,7 +163,7 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
List<BasisDiagnosisNodeResVO> collect = ancillaryRecordList.stream()
|
|
|
|
List<BasisDiagnosisNodeResVO> collect = ancillaryRecordList.stream()
|
|
|
|
.filter(distinctPredicateNotNull(AncillaryRecordByResultDAO::getItemName)).map(e -> {
|
|
|
|
.filter(distinctPredicateNotNull(AncillaryRecordByResultDAO::getItemName)).map(e -> {
|
|
|
|
BasisDiagnosisNodeResVO nodeResVO = new BasisDiagnosisNodeResVO();
|
|
|
|
BasisDiagnosisNodeResVO nodeResVO = new BasisDiagnosisNodeResVO();
|
|
|
|
nodeResVO.setCorrect(null == e.getBasisIdentification() ? Integer.valueOf(0) : e.getBasisIdentification());
|
|
|
|
nodeResVO.setCorrect(Objects.equals(e.getBasisIdentification(), e.getRecordBasisIdentificationFlag()) ? 1 : 0);
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
nodeResVO.setRecordName(e.getItemName());
|
|
|
|
nodeResVO.setRecordName(e.getItemName());
|
|
|
|
nodeResVO.setType(2);
|
|
|
|
nodeResVO.setType(2);
|
|
|
@ -175,11 +175,11 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
return basisIdentificationResultResVO;
|
|
|
|
return basisIdentificationResultResVO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private BasisConfirmResultResVO createBasisConfirmResult(MedicalRec medicalRec, String processId, List<Disease> diseasesList) {
|
|
|
|
private BasisConfirmResultResVO createBasisConfirmResult(MedicalRec medicalRec, String processId) {
|
|
|
|
BasisConfirmResultResVO basisConfirmResultResVO = new BasisConfirmResultResVO();
|
|
|
|
BasisConfirmResultResVO basisConfirmResultResVO = new BasisConfirmResultResVO();
|
|
|
|
// 正式诊断依据,来自于medicalRec的ConfirmDiagnosisCriteria
|
|
|
|
// 证实诊断依据,来自于medicalRec的ConfirmDiagnosisCriteria
|
|
|
|
basisConfirmResultResVO.setConfirmingDiagnosis(medicalRec.getConfirmDiagnosisCriteria());
|
|
|
|
basisConfirmResultResVO.setConfirmingDiagnosis(medicalRec.getConfirmDiagnosisCriteria());
|
|
|
|
// 2.2 获取体格检查
|
|
|
|
// 2.2 获取体格检查的证实诊断依据
|
|
|
|
List<PhysicalRecordByResultDAO> physicalRecordList = diagnosisPhysicalRecordService.queryPhysicalResultByProcessId(processId);
|
|
|
|
List<PhysicalRecordByResultDAO> physicalRecordList = diagnosisPhysicalRecordService.queryPhysicalResultByProcessId(processId);
|
|
|
|
List<BasisDiagnosisNodeResVO> nodeList = physicalRecordList.stream()
|
|
|
|
List<BasisDiagnosisNodeResVO> nodeList = physicalRecordList.stream()
|
|
|
|
.filter(distinctPredicateNotNull(PhysicalRecordByResultDAO::getToolLocationName)).map(e -> {
|
|
|
|
.filter(distinctPredicateNotNull(PhysicalRecordByResultDAO::getToolLocationName)).map(e -> {
|
|
|
@ -187,16 +187,16 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
nodeResVO.setType(1);
|
|
|
|
nodeResVO.setType(1);
|
|
|
|
nodeResVO.setRecordName(e.getToolLocationName());
|
|
|
|
nodeResVO.setRecordName(e.getToolLocationName());
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
// 如果是必做的,则是正确
|
|
|
|
nodeResVO.setCorrect(Objects.equals(e.getBasisConfirm(), e.getRecordBasisConfirmFlag()) ? 1 : 0);
|
|
|
|
nodeResVO.setCorrect(null == e.getBasisConfirm() ? Integer.valueOf(0) : e.getBasisConfirm());
|
|
|
|
|
|
|
|
return nodeResVO;
|
|
|
|
return nodeResVO;
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
// 2.3 获取辅助检查
|
|
|
|
// 2.3 获取辅助检查
|
|
|
|
List<AncillaryRecordByResultDAO> ancillaryRecordList = diagnosisAncillaryRecordService.queryAncillaryResultByProcessId(processId);
|
|
|
|
List<AncillaryRecordByResultDAO> ancillaryRecordList = diagnosisAncillaryRecordService.queryAncillaryResultByProcessId(processId);
|
|
|
|
List<BasisDiagnosisNodeResVO> collect = ancillaryRecordList.stream()
|
|
|
|
List<BasisDiagnosisNodeResVO> collect = ancillaryRecordList.stream()
|
|
|
|
.filter(distinctPredicateNotNull(AncillaryRecordByResultDAO::getItemName)).map(e -> {
|
|
|
|
.filter(distinctPredicateNotNull(AncillaryRecordByResultDAO::getItemName)).map(e -> {
|
|
|
|
BasisDiagnosisNodeResVO nodeResVO = new BasisDiagnosisNodeResVO();
|
|
|
|
BasisDiagnosisNodeResVO nodeResVO = new BasisDiagnosisNodeResVO();
|
|
|
|
nodeResVO.setCorrect(null == e.getBasisConfirm() ? Integer.valueOf(0) : e.getBasisConfirm());
|
|
|
|
nodeResVO.setCorrect(Objects.equals(e.getBasisConfirm(), e.getRecordBasisConfirmFlag()) ? 1 : 0);
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
nodeResVO.setRecordId(e.getRecordId());
|
|
|
|
nodeResVO.setRecordName(e.getItemName());
|
|
|
|
nodeResVO.setRecordName(e.getItemName());
|
|
|
|
nodeResVO.setType(2);
|
|
|
|
nodeResVO.setType(2);
|
|
|
|