新增危急值模块
This commit is contained in:
parent
c8184c3b94
commit
3148c3a0d6
@ -8,6 +8,9 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@ -43,6 +46,11 @@ public class WarningController {
|
|||||||
@Operation(summary = "创建危急值记录")
|
@Operation(summary = "创建危急值记录")
|
||||||
@PreAuthorize("@ss.hasPermission('system:warning:create')")
|
@PreAuthorize("@ss.hasPermission('system:warning:create')")
|
||||||
public CommonResult<String> createWarning(@Valid @RequestBody WarningSaveReqVO createReqVO) {
|
public CommonResult<String> createWarning(@Valid @RequestBody WarningSaveReqVO createReqVO) {
|
||||||
|
UUID guid = UUID.randomUUID();
|
||||||
|
LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
||||||
|
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
createReqVO.setId(guid.toString());
|
||||||
|
createReqVO.setReportDate(dateTime);
|
||||||
return success(warningService.createWarning(createReqVO));
|
return success(warningService.createWarning(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +62,40 @@ public class WarningController {
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/Saveupdate")
|
||||||
|
@Operation(summary = "更新危急值记录")
|
||||||
|
public CommonResult<Boolean> SaveupdateWarning(@Valid @RequestBody WarningSaveReqVO updateReqVO) {
|
||||||
|
|
||||||
|
|
||||||
|
warningService.updateWarning(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/updateWarningdate")
|
||||||
|
@Operation(summary = "更新危急值接收时间和发送回执记录")
|
||||||
|
public CommonResult<Boolean> updateWarningdate( @RequestParam("id") String id,@RequestParam("readDateTime") String readDateTime,@RequestParam("receiptDateTime") String receiptDateTime) {
|
||||||
|
|
||||||
|
WarningSaveReqVO warningSaveReqVO = new WarningSaveReqVO();
|
||||||
|
warningSaveReqVO.setId(id);
|
||||||
|
if(!readDateTime.isEmpty())
|
||||||
|
{
|
||||||
|
LocalDateTime dateTime = LocalDateTime.parse(readDateTime, DateTimeFormatter.ofPattern("yyyy-M-d H:mm:ss"));
|
||||||
|
|
||||||
|
warningSaveReqVO.setReadDateTime(dateTime);
|
||||||
|
}
|
||||||
|
if(!receiptDateTime.isEmpty())
|
||||||
|
{
|
||||||
|
LocalDateTime dateTime = LocalDateTime.parse(receiptDateTime, DateTimeFormatter.ofPattern("yyyy-M-d H:mm:ss"));
|
||||||
|
warningSaveReqVO.setReceiptDateTime(dateTime);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
warningService.updateWarning(warningSaveReqVO);
|
||||||
|
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除危急值记录")
|
@Operation(summary = "删除危急值记录")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@ -72,6 +114,14 @@ public class WarningController {
|
|||||||
return success(BeanUtils.toBean(warning, WarningRespVO.class));
|
return success(BeanUtils.toBean(warning, WarningRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getexmidororgiddata")
|
||||||
|
@Operation(summary = "获得当前危急值记录")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
public CommonResult<WarningRespVO> c(@RequestParam("examID") String examID,@RequestParam("orgID") String orgID) {
|
||||||
|
WarningDO warning = warningService.getexmidororgiddata(examID,orgID);
|
||||||
|
return success(BeanUtils.toBean(warning, WarningRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得危急值记录分页")
|
@Operation(summary = "获得危急值记录分页")
|
||||||
@PreAuthorize("@ss.hasPermission('system:warning:query')")
|
@PreAuthorize("@ss.hasPermission('system:warning:query')")
|
||||||
|
@ -66,7 +66,11 @@ public class WarningRespVO {
|
|||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@Schema(description = "危急值报告进程:Json格式")
|
@Schema(description = "危急值报告进程:Json格式")
|
||||||
@ExcelProperty("危急值报告进程:Json格式")
|
|
||||||
private String warningProcess;
|
private String warningProcess;
|
||||||
|
|
||||||
|
private String readDateTime;
|
||||||
|
private String receiptDateTime;
|
||||||
|
private String readremark;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -52,4 +52,8 @@ public class WarningSaveReqVO {
|
|||||||
@Schema(description = "危急值报告进程:Json格式")
|
@Schema(description = "危急值报告进程:Json格式")
|
||||||
private String warningProcess;
|
private String warningProcess;
|
||||||
|
|
||||||
|
private LocalDateTime readDateTime;
|
||||||
|
private LocalDateTime receiptDateTime;
|
||||||
|
private String readremark;
|
||||||
|
|
||||||
}
|
}
|
@ -15,12 +15,11 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
|||||||
@TableName("tb_warning")
|
@TableName("tb_warning")
|
||||||
@KeySequence("tb_warning_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
@KeySequence("tb_warning_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class WarningDO extends BaseDO {
|
public class WarningDO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
@ -92,5 +91,20 @@ public class WarningDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
@TableField("warningProcess")
|
@TableField("warningProcess")
|
||||||
private String warningProcess;
|
private String warningProcess;
|
||||||
|
/**
|
||||||
|
* 检查端收到危急值时间
|
||||||
|
*/
|
||||||
|
@TableField("readDateTime")
|
||||||
|
private LocalDateTime readDateTime;
|
||||||
|
/**
|
||||||
|
* 检查段发送回执消息时间
|
||||||
|
*/
|
||||||
|
@TableField("receiptDateTime")
|
||||||
|
private LocalDateTime receiptDateTime;
|
||||||
|
/*
|
||||||
|
* 检查端确认备注
|
||||||
|
* */
|
||||||
|
@TableField("readremark")
|
||||||
|
private String readremark;
|
||||||
|
|
||||||
}
|
}
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.warning.WarningDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.warning.WarningDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import cn.iocoder.yudao.module.system.controller.admin.warning.vo.*;
|
import cn.iocoder.yudao.module.system.controller.admin.warning.vo.*;
|
||||||
|
|
||||||
@ -15,6 +16,7 @@ import cn.iocoder.yudao.module.system.controller.admin.warning.vo.*;
|
|||||||
* @author 李晓东
|
* @author 李晓东
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
|
@InterceptorIgnore(tenantLine = "true")
|
||||||
public interface WarningMapper extends BaseMapperX<WarningDO> {
|
public interface WarningMapper extends BaseMapperX<WarningDO> {
|
||||||
|
|
||||||
default PageResult<WarningDO> selectPage(WarningPageReqVO reqVO) {
|
default PageResult<WarningDO> selectPage(WarningPageReqVO reqVO) {
|
||||||
|
@ -44,7 +44,10 @@ public interface WarningService {
|
|||||||
* @return 危急值记录
|
* @return 危急值记录
|
||||||
*/
|
*/
|
||||||
WarningDO getWarning(String id);
|
WarningDO getWarning(String id);
|
||||||
|
/*
|
||||||
|
* 通过检查ID和机构ID查询患者信息
|
||||||
|
* */
|
||||||
|
WarningDO getexmidororgiddata(String examid,String orgid);
|
||||||
/**
|
/**
|
||||||
* 获得危急值记录分页
|
* 获得危急值记录分页
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.warning;
|
package cn.iocoder.yudao.module.system.service.warning;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -68,6 +69,14 @@ public class WarningServiceImpl implements WarningService {
|
|||||||
return warningMapper.selectById(id);
|
return warningMapper.selectById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WarningDO getexmidororgiddata(String examid, String orgid) {
|
||||||
|
QueryWrapper<WarningDO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("examId", examid);
|
||||||
|
queryWrapper.eq("orgId", orgid);
|
||||||
|
return warningMapper.selectOne(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<WarningDO> getWarningPage(WarningPageReqVO pageReqVO) {
|
public PageResult<WarningDO> getWarningPage(WarningPageReqVO pageReqVO) {
|
||||||
return warningMapper.selectPage(pageReqVO);
|
return warningMapper.selectPage(pageReqVO);
|
||||||
|
@ -165,11 +165,18 @@ public class PatientexamlistController {
|
|||||||
.filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("CSH1")))
|
.filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("CSH1")))
|
||||||
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
} else if (devicetype != null && devicetype.contains("ECG"))//表示只查询心电的数据
|
||||||
|
{
|
||||||
|
// 筛选条件:
|
||||||
|
doList = pageResult.getList().stream()
|
||||||
|
.filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("ECG")))
|
||||||
|
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||||
|
.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")) && !(PatientexamlistDO.getDeviceType().contains("CSH1")))
|
.filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US")) && !(PatientexamlistDO.getDeviceType().contains("CSH1")) && !(PatientexamlistDO.getDeviceType().contains("ECG")))
|
||||||
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
.sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else //devicetype为空,查询全部数据
|
} else //devicetype为空,查询全部数据
|
||||||
@ -180,6 +187,7 @@ public class PatientexamlistController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pageResult.setList(doList);
|
pageResult.setList(doList);
|
||||||
|
pageResult.setTotal((long) doList.size());
|
||||||
|
|
||||||
return success(BeanUtils.toBean(pageResult, PatientexamlistRespVO.class));
|
return success(BeanUtils.toBean(pageResult, PatientexamlistRespVO.class));
|
||||||
}
|
}
|
||||||
@ -269,6 +277,8 @@ public class PatientexamlistController {
|
|||||||
@LogRecord(type = "检查列表", subType = "申请", bizNo = "999999", success = "ID为{{#id}}的患者申请")
|
@LogRecord(type = "检查列表", subType = "申请", bizNo = "999999", success = "ID为{{#id}}的患者申请")
|
||||||
public CommonResult<String> UPDATEHigOrg(@RequestParam("id") String id, @RequestParam("orgId") String orgId) {
|
public CommonResult<String> UPDATEHigOrg(@RequestParam("id") String id, @RequestParam("orgId") String orgId) {
|
||||||
|
|
||||||
|
//获取当前登陆用户
|
||||||
|
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||||
//先拿orgid查询出来对应的org表的上级机构代码
|
//先拿orgid查询出来对应的org表的上级机构代码
|
||||||
String hiorgid = OrgService.GetOrgHiORGId(orgId);
|
String hiorgid = OrgService.GetOrgHiORGId(orgId);
|
||||||
log.debug("查询出来对应的org表的上级机构代码" + hiorgid);
|
log.debug("查询出来对应的org表的上级机构代码" + hiorgid);
|
||||||
@ -276,6 +286,7 @@ public class PatientexamlistController {
|
|||||||
PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO();
|
PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO();
|
||||||
updateReqVO.setId(id);
|
updateReqVO.setId(id);
|
||||||
updateReqVO.setHighLevelOrgId(hiorgid);
|
updateReqVO.setHighLevelOrgId(hiorgid);
|
||||||
|
updateReqVO.setApplyhighLevelname(user.getNickname());
|
||||||
updateReqVO.setApplicationDate(LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
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);
|
patientexamlistService.updatePatientexamlist(updateReqVO);
|
||||||
|
@ -117,4 +117,7 @@ public class PatientexamlistPageReqVO extends PageParam {
|
|||||||
|
|
||||||
private LocalDateTime FavouriteTime;
|
private LocalDateTime FavouriteTime;
|
||||||
private String pdfurl;
|
private String pdfurl;
|
||||||
|
|
||||||
|
private String warning;
|
||||||
|
private String applyhighLevelname;
|
||||||
}
|
}
|
@ -134,4 +134,6 @@ public class PatientexamlistRespVO {
|
|||||||
|
|
||||||
private LocalDateTime FavouriteTime;
|
private LocalDateTime FavouriteTime;
|
||||||
private String pdfurl;
|
private String pdfurl;
|
||||||
|
private String warning;
|
||||||
|
private String applyhighLevelname;
|
||||||
}
|
}
|
@ -110,4 +110,7 @@ public class PatientexamlistSaveReqVO {
|
|||||||
private LocalDateTime FavouriteTime;
|
private LocalDateTime FavouriteTime;
|
||||||
|
|
||||||
private String pdfurl;
|
private String pdfurl;
|
||||||
|
private String warning;
|
||||||
|
private String applyhighLevelname;
|
||||||
|
|
||||||
}
|
}
|
@ -183,4 +183,9 @@ public class PatientexamlistDO extends BaseDO {
|
|||||||
|
|
||||||
@TableField(value = "pdfurl")
|
@TableField(value = "pdfurl")
|
||||||
private String pdfurl;
|
private String pdfurl;
|
||||||
|
@TableField(value = "applyhighLevelname")
|
||||||
|
private String applyhighLevelname;
|
||||||
|
|
||||||
|
@TableField(value = "warning")
|
||||||
|
private String warning;
|
||||||
}
|
}
|
@ -79,12 +79,18 @@ public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
|
|||||||
.betweenIfPresent(PatientexamlistDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(PatientexamlistDO::getCreateTime, reqVO.getCreateTime())
|
||||||
//.eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getHighLevelOrgId())
|
//.eqIfPresent(PatientexamlistDO::getOrgId, reqVO.getHighLevelOrgId())
|
||||||
.eqIfPresent(PatientexamlistDO::getIsFavourite, reqVO.getIsFavourite())
|
.eqIfPresent(PatientexamlistDO::getIsFavourite, reqVO.getIsFavourite())
|
||||||
.eq(PatientexamlistDO::getOrgId, reqVO.getOrgId()) // 始终添加orgId条件
|
// .eq(PatientexamlistDO::getOrgId, reqVO.getOrgId()) // 始终添加orgId条件
|
||||||
.or(wrapper -> {
|
// 单独的LIKE条件
|
||||||
// if (reqVO.getHighLevelOrgId() != null) {
|
.and(wrapper -> wrapper
|
||||||
wrapper.eq(PatientexamlistDO::getHighLevelOrgId, reqVO.getOrgId());
|
.eq(PatientexamlistDO::getOrgId, reqVO.getOrgId())
|
||||||
// }
|
.or()
|
||||||
})
|
.eq(PatientexamlistDO::getHighLevelOrgId, reqVO.getOrgId())
|
||||||
|
)
|
||||||
|
// .or(wrapper -> {
|
||||||
|
// // if (reqVO.getHighLevelOrgId() != null) {
|
||||||
|
// wrapper.eq(PatientexamlistDO::getHighLevelOrgId, reqVO.getOrgId());
|
||||||
|
// // }
|
||||||
|
// })
|
||||||
.orderByDesc(PatientexamlistDO::getId));
|
.orderByDesc(PatientexamlistDO::getId));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user