新增根据体检编号和项目编号获取检查项目方法

This commit is contained in:
lxd 2025-03-24 14:42:16 +08:00
parent b70b74efd8
commit 3ed71a7fad
3 changed files with 25 additions and 2 deletions

View File

@ -198,7 +198,13 @@ public class InspectPatientitemsController {
List<InspectPatientitemsDO> patientitems = patientitemsService.GetPatientItemList(medicalSn);
return success(patientitems);
}
@GetMapping("/Getanalyse")
@Operation(summary = "根据体检编号和项目编号获取患者体检项目")
public CommonResult<String> Getanalyse(@RequestParam("medicalSn") String medicalSn, @RequestParam("itemCode") String itemCode)
{
String analyse = patientitemsService.Getanalyse(medicalSn, itemCode);
return success(analyse);
}
@GetMapping("/get")
@Operation(summary = "获得患者体检项目")

View File

@ -61,6 +61,10 @@ public interface InspectPatientitemsService {
* 根据体检编号查询患者检查项目JSON
* */
List<InspectPatientitemsDO> GetPatientItemList(String medicalSn);
/*
* 根据体检编号和项目编号查询指定项目
* */
String Getanalyse(String medicalSn, String itemCode);
/**
* 获得患者体检项目

View File

@ -113,7 +113,20 @@ public class InspectPatientitemsServiceImpl implements InspectPatientitemsServic
return patientDO;
}
@Override
public String Getanalyse(String medicalSn, String itemCode)
{
String msg="";
QueryWrapper<InspectPatientitemsDO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("medicalSn", medicalSn);
queryWrapper.eq("itemCode", itemCode);
InspectPatientitemsDO patientitemsDO= patientitemsMapper.selectOne(queryWrapper);
if(patientitemsDO!=null)
{
msg = patientitemsDO.getAnalyse();
}
return msg;
}
private void validatePatientitemsExists(Integer id) {
if (patientitemsMapper.selectById(id) == null) {