报告打印统计
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled

This commit is contained in:
旺仔 2024-08-16 23:44:56 +08:00
parent 4962c79588
commit c2c53271d4
4 changed files with 71 additions and 53 deletions

View File

@ -26,11 +26,13 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@ -60,7 +62,7 @@ public class PatientexamlistController {
@PostMapping("/create")
@Operation(summary = "创建PACS检查列表")
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:create')")
@LogRecord(type = "检查列表", subType = "创建", bizNo ="{{#createReqVO.getId}}" , success = "创建ID为{{#createReqVO.getId}}的患者")
@LogRecord(type = "检查列表", subType = "创建", bizNo = "{{#createReqVO.getId}}", success = "创建ID为{{#createReqVO.getId}}的患者")
public CommonResult<String> createPatientexamlist(@Valid @RequestBody PatientexamlistSaveReqVO createReqVO) {
return success(patientexamlistService.createPatientexamlist(createReqVO));
}
@ -73,6 +75,14 @@ public class PatientexamlistController {
return success(true);
}
@PutMapping("/updateExamItemName")
@Operation(summary = "更新ExamItemName")
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')")
public CommonResult<Boolean> updateExamItemNameById(@RequestParam("id") String id, @RequestParam("examItemName") String examItemName) {
patientexamlistService.updateExamItemNameById(id, examItemName);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除PACS检查列表")
@Parameter(name = "id", description = "编号", required = true)
@ -98,28 +108,26 @@ public class PatientexamlistController {
//获取当前登陆用户
AdminUserDO user = userService.getUser(getLoginUserId());
pageReqVO.setOrgId(user.getOrgId()) ;
pageReqVO.setOrgId(user.getOrgId());
PageResult<PatientexamlistDO> pageResult = patientexamlistService.getPatientexamlistPage(pageReqVO);
List<PatientexamlistDO> doList=new ArrayList<>();
String devicetype=pageReqVO.getDeviceType();
if(devicetype!=null&&devicetype.contains("US"))//表示只查询超声的数据
List<PatientexamlistDO> doList = new ArrayList<>();
String devicetype = pageReqVO.getDeviceType();
if (devicetype != null && devicetype.contains("US"))//表示只查询超声的数据
{
// 筛选条件
doList = pageResult.getList().stream()
doList = pageResult.getList().stream()
.filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("US")))
.collect(Collectors.toList());
}
else if(devicetype!=null&&!devicetype.trim().isEmpty())//表示只查询影像的数据
} else if (devicetype != null && !devicetype.trim().isEmpty())//表示只查询影像的数据
{
// 筛选条件
doList = pageResult.getList().stream()
doList = pageResult.getList().stream()
.filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US")))
.collect(Collectors.toList());
}
else //devicetype为空查询全部数据
} else //devicetype为空查询全部数据
{
doList=pageResult.getList();
doList = pageResult.getList();
}
pageResult.setList(doList);
@ -150,6 +158,7 @@ public class PatientexamlistController {
patientexamlistService.dicomDataSync();
return success(true);
}
@GetMapping("/dicomDataRefresh")
@Operation(summary = "dicomj检查后数据刷新")
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
@ -165,12 +174,12 @@ public class PatientexamlistController {
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportPatientexamlistExcel(@Valid PatientexamlistPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PatientexamlistDO> list = patientexamlistService.getPatientexamlistPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "PACS检查列表.xls", "数据", PatientexamlistRespVO.class,
BeanUtils.toBean(list, PatientexamlistRespVO.class));
BeanUtils.toBean(list, PatientexamlistRespVO.class));
}
@ -179,20 +188,19 @@ public class PatientexamlistController {
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@Parameter(name = "orgId", description = "机构编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
@LogRecord(type = "检查列表", subType = "申请", bizNo ="{{#id}}" , success = "ID为{{#id}}的患者申请")
public void UPDATEHigOrg(@RequestParam("id") String id,@RequestParam("orgId") String orgId) {
@LogRecord(type = "检查列表", subType = "申请", bizNo = "{{#id}}", success = "ID为{{#id}}的患者申请")
public void UPDATEHigOrg(@RequestParam("id") String id, @RequestParam("orgId") String orgId) {
//先拿orgid查询出来对应的org表的上级机构代码
String hiorgid= OrgService.GetOrgHiORGId(orgId);
log.debug("查询出来对应的org表的上级机构代码"+hiorgid);
if (!hiorgid.isEmpty())
{
PatientexamlistSaveReqVO updateReqVO=new PatientexamlistSaveReqVO();
String hiorgid = OrgService.GetOrgHiORGId(orgId);
log.debug("查询出来对应的org表的上级机构代码" + hiorgid);
if (!hiorgid.isEmpty()) {
PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO();
updateReqVO.setId(id);
updateReqVO.setHighLevelOrgId(hiorgid);
updateReqVO.setReportstatus("已申请");
updateReqVO.setApplicationDate(LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
patientexamlistService.updatePatientexamlist(updateReqVO);
}
@ -201,10 +209,10 @@ public class PatientexamlistController {
@PutMapping("/examineupdate")
@Operation(summary = "超声保存更新数据")
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')")
@LogRecord(type = "超声保存", subType = "保存", bizNo ="{{#updateReqVO.getId}}" , success = "保存ID为{{#updateReqVO.getId}}的患者")
@LogRecord(type = "超声保存", subType = "保存", bizNo = "{{#updateReqVO.getId}}", success = "保存ID为{{#updateReqVO.getId}}的患者")
public CommonResult<Boolean> updateexaminelist(@Valid @RequestBody PatientexamlistSaveReqVO updateReqVO) {
LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
updateReqVO.setDiagDate(dateTime);
patientexamlistService.updatePatientexamlist(updateReqVO);
@ -214,18 +222,18 @@ public class PatientexamlistController {
@GetMapping("/examine")
@Operation(summary = "超声保存更新数据")
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')")
@LogRecord(type = "超声审核", subType = "审核", bizNo ="{{#updateReqVO.getId}}" , success = "审核ID为{{#id}}的患者")
@LogRecord(type = "超声审核", subType = "审核", bizNo = "{{#updateReqVO.getId}}", success = "审核ID为{{#id}}的患者")
public CommonResult<Boolean> examine(@RequestParam("id") String id) {
LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
//获取当前登陆用户
AdminUserDO user = userService.getUser(getLoginUserId());
PatientexamlistSaveReqVO updateReqVO=new PatientexamlistSaveReqVO();
PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO();
updateReqVO.setId(id);
updateReqVO.setReviewDoctorId(String.valueOf(user.getId()));
updateReqVO.setReviewDoctor(user.getUsername());
updateReqVO.setReviewDate(dateTime);
updateReqVO.setReviewDate(dateTime);
updateReqVO.setReviewStatus("1");
updateReqVO.setReportstatus("已审核");
patientexamlistService.updatePatientexamlist(updateReqVO);
@ -233,6 +241,4 @@ public class PatientexamlistController {
}
}

View File

@ -6,10 +6,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.PatientexamlistDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.*;
import cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* PACS检查列表 Mapper
@ -18,6 +16,9 @@ import org.apache.ibatis.annotations.Select;
*/
@Mapper
public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
//更新
@Update(" UPDATE tb_patientexamlist t1 SET t1.examItemName=#{examItemName} WHERE t1.ID=#{id} ")
int updateExamItemNameById(@Param("id") String id, @Param("examItemName") String examItemName);
//IllnessCasePageReqVO分页
default PageResult<PatientexamlistDO> selectPage(IllnessCasePageReqVO reqVO) {

View File

@ -77,10 +77,19 @@ public interface PatientexamlistService extends IService<PatientexamlistDO> {
* @return
*/
void dicomDataSync();
/**
* 更新examItemName
*
* @param
* @return
*/
void updateExamItemNameById(String id, String examItemName);
/**
* 刷新dicom分检数据至tb_patientexamlist
*
*/
boolean dicomDataRefresh(String orgId);
boolean insertbatch(List<PatientexamlistDO> doList);
}

View File

@ -35,7 +35,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
*/
@Service
@Validated
public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMapper, PatientexamlistDO> implements PatientexamlistService {
public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMapper, PatientexamlistDO> implements PatientexamlistService {
@Resource
private PatientexamlistMapper patientexamlistMapper;
@ -142,7 +142,7 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
patientexamlist.setReportstatus("待分析");
patientexamlist.setApplicationDate(dateTime);
patientexamlist.setBillDoctorDepartment("影像科");
patientexamlist.setSeDc(dicomworklistMapper.GetSeDcByPatientIDAndStudyInsta(dicomStudie.getPatientID(),dicomStudie.getStudyInsta()));
patientexamlist.setSeDc(dicomworklistMapper.GetSeDcByPatientIDAndStudyInsta(dicomStudie.getPatientID(), dicomStudie.getStudyInsta()));
patientexamlist.setCreateDate(dateTime);
patientexamlist.setOrgId(dicomStudie.getOrgId());
if (dicomSeries != null && dicomSeries.size() > 0) {
@ -163,21 +163,24 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
}
}
@Override
public void updateExamItemNameById(String id, String examItemName) {
validatePatientexamlistExists(id);
patientexamlistMapper.updateExamItemNameById(id, examItemName);
}
@Override
public boolean dicomDataRefresh(String orgId) {
//先查询所有的状态是分检的数据并且是检查时间为空的数据
List<PatientexamlistDO> doList= patientexamlistMapper.GetSortingDataList(orgId);
boolean bol=false;
if(!doList.isEmpty())
{ //更新数据集合
List<PatientexamlistDO> aDo = new ArrayList<>();
for (PatientexamlistDO patientexamlistDO:doList)
{
List<DicomstudiesDO> dicomstudiesDOS= dicomworklistMapper.GetInstaDicomStudiesData(patientexamlistDO.getRegId(),patientexamlistDO.getExamId(),orgId);
if(!dicomstudiesDOS.isEmpty())
{
String seim= dicomworklistMapper.GetSeDcByPatientIDAndStudyInsta(dicomstudiesDOS.get(0).getPatientID(),dicomstudiesDOS.get(0).getStudyInsta());
PatientexamlistDO examdo=new PatientexamlistDO();
List<PatientexamlistDO> doList = patientexamlistMapper.GetSortingDataList(orgId);
boolean bol = false;
if (!doList.isEmpty()) { //更新数据集合
List<PatientexamlistDO> aDo = new ArrayList<>();
for (PatientexamlistDO patientexamlistDO : doList) {
List<DicomstudiesDO> dicomstudiesDOS = dicomworklistMapper.GetInstaDicomStudiesData(patientexamlistDO.getRegId(), patientexamlistDO.getExamId(), orgId);
if (!dicomstudiesDOS.isEmpty()) {
String seim = dicomworklistMapper.GetSeDcByPatientIDAndStudyInsta(dicomstudiesDOS.get(0).getPatientID(), dicomstudiesDOS.get(0).getStudyInsta());
PatientexamlistDO examdo = new PatientexamlistDO();
examdo.setId(patientexamlistDO.getId());
examdo.setExamDate(formatLocalDateTime2(String.valueOf(dicomstudiesDOS.get(0).getAccessTime())));
examdo.setSeDc(seim);
@ -185,9 +188,8 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
aDo.add(examdo);
}
}
if(!aDo.isEmpty())
{
bol= updateBatchById(aDo);
if (!aDo.isEmpty()) {
bol = updateBatchById(aDo);
}
}
@ -230,8 +232,8 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
@Override
public boolean insertbatch(List<PatientexamlistDO> doList) {
boolean bol=false;
bol= patientexamlistMapper.insertBatch(doList);
boolean bol = false;
bol = patientexamlistMapper.insertBatch(doList);
return bol;
}