Compare commits
3 Commits
0962245d43
...
a7a51fc7f8
Author | SHA1 | Date | |
---|---|---|---|
a7a51fc7f8 | |||
d833ffd7da | |||
e726fba2f7 |
@ -1014,7 +1014,19 @@ public class InspectPatientController {
|
||||
inspectPacs.setData(pdfurl);
|
||||
inspectPacs.setType("US");
|
||||
inspectPacs.setPersonName(pname);
|
||||
pacsDataService.createPacsData(inspectPacs);
|
||||
|
||||
// 检查数据是否存在
|
||||
if (pacsDataService.IspacsDataExist(medicalSn, "US")) {
|
||||
// 如果存在,获取现有数据并更新
|
||||
InspectPacsDataDO existingData = pacsDataService.getPacsDataByCode(medicalSn, "US");
|
||||
if (existingData != null) {
|
||||
inspectPacs.setId(existingData.getId());
|
||||
pacsDataService.updatePacsData(inspectPacs);
|
||||
}
|
||||
} else {
|
||||
// 如果不存在,创建新数据
|
||||
pacsDataService.createPacsData(inspectPacs);
|
||||
}
|
||||
}
|
||||
//更新超声所见所得
|
||||
if (examDescription != null && !examDescription.isEmpty() && diagResults != null && !diagResults.isEmpty()) {
|
||||
@ -1900,6 +1912,9 @@ public class InspectPatientController {
|
||||
|
||||
// 使用Map来存储统计结果,key为卫生院名称+行政村名称
|
||||
Map<String, WorkloadStatisticsVO> statisticsMap = new HashMap<>();
|
||||
|
||||
// 使用Set来记录已经统计过的患者ID,避免重复统计
|
||||
Set<String> countedPatients = new HashSet<>();
|
||||
|
||||
// 遍历所有补充信息进行统计
|
||||
for (PatientSupplementVO supplement : supplements) {
|
||||
@ -1917,7 +1932,16 @@ public class InspectPatientController {
|
||||
return vo;
|
||||
});
|
||||
|
||||
// 统计各项数量
|
||||
// 获取患者体检编号
|
||||
String patientId = supplement.getMedicalSn();
|
||||
|
||||
// 统计各项数量,但每个人只统计一次
|
||||
if (!countedPatients.contains(patientId)) {
|
||||
countedPatients.add(patientId);
|
||||
statistics.setSum(statistics.getSum() + 1); // 总数加1
|
||||
}
|
||||
|
||||
// 统计具体指标
|
||||
if ("1".equals(supplement.getOldmanflag())) {
|
||||
statistics.setOldmanflag(statistics.getOldmanflag() + 1);
|
||||
}
|
||||
@ -1933,11 +1957,6 @@ public class InspectPatientController {
|
||||
if ("1".equals(supplement.getPulflag())) {
|
||||
statistics.setPulflag(statistics.getPulflag() + 1);
|
||||
}
|
||||
|
||||
// 计算总数
|
||||
statistics.setSum(statistics.getOldmanflag() + statistics.getHtnflag() +
|
||||
statistics.getDiaflag() + statistics.getSmiflag() +
|
||||
statistics.getPulflag());
|
||||
}
|
||||
|
||||
// 将Map转换为List并返回
|
||||
|
@ -248,6 +248,24 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
.eq(InspectPatientDO::getCardId, searchKey)
|
||||
.or()
|
||||
.like(InspectPatientDO::getPName, searchKey));
|
||||
lambdaQuery.select(
|
||||
InspectPatientDO::getId,
|
||||
InspectPatientDO::getMedicalSn,
|
||||
InspectPatientDO::getPName,
|
||||
InspectPatientDO::getGender,
|
||||
InspectPatientDO::getBirthday,
|
||||
InspectPatientDO::getCardType,
|
||||
InspectPatientDO::getCardId,
|
||||
InspectPatientDO::getPhoneNum,
|
||||
InspectPatientDO::getStatus,
|
||||
InspectPatientDO::getMedicalDateTime,
|
||||
//InspectPatientDO::getHeadPicUrl,
|
||||
InspectPatientDO::getSummaryResult,
|
||||
InspectPatientDO::getAuditor,
|
||||
InspectPatientDO::getAuditStatus,
|
||||
InspectPatientDO::getIsprint,
|
||||
InspectPatientDO::getPrinttime
|
||||
);
|
||||
|
||||
return patientMapper.selectList(lambdaQuery);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user