输液记录更新
This commit is contained in:
@@ -28,7 +28,7 @@ public class DiagnosisTreatmentUpDto {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 目录类别 */
|
/** 目录类别 */
|
||||||
@NotNull(message = "目录类别不能为空")
|
@NotBlank(message = "目录类别不能为空")
|
||||||
private String categoryCode;
|
private String categoryCode;
|
||||||
|
|
||||||
/** 编码 */
|
/** 编码 */
|
||||||
|
|||||||
@@ -55,9 +55,10 @@ public interface IOutpatientInfusionRecordService {
|
|||||||
/**
|
/**
|
||||||
* 门诊输液执行历史记录查询
|
* 门诊输液执行历史记录查询
|
||||||
*
|
*
|
||||||
|
* @param patientId 患者ID
|
||||||
* @param historyFlag 查询的是否为执行履历
|
* @param historyFlag 查询的是否为执行履历
|
||||||
* @return 门诊输液记录列表
|
* @return 门诊输液记录列表
|
||||||
*/
|
*/
|
||||||
List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(HttpServletRequest request, boolean historyFlag);
|
List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(Long patientId,HttpServletRequest request, boolean historyFlag);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
|
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper =
|
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper =
|
||||||
HisQueryUtils.buildQueryWrapper(new OutpatientInfusionPatientDto(), null, null, request);
|
HisQueryUtils.buildQueryWrapper(null, null, null, request);
|
||||||
|
|
||||||
queryWrapper.eq(CommonConstants.FieldName.PatientId, outpatientInfusionPatientDto.getPatientId());
|
queryWrapper.eq(CommonConstants.FieldName.PatientId, outpatientInfusionPatientDto.getPatientId());
|
||||||
// based_on_id 是为空的
|
// based_on_id 是为空的
|
||||||
@@ -239,7 +239,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
public List<Long> checkServiceRequestIsCompleted() {
|
public List<Long> checkServiceRequestIsCompleted() {
|
||||||
|
|
||||||
//获取全部执行输液记录
|
//获取全部执行输液记录
|
||||||
List<OutpatientInfusionRecordDto> patientInfusionList =getPatientInfusionPerformRecord(null,false);
|
List<OutpatientInfusionRecordDto> patientInfusionList =getPatientInfusionPerformRecord(null,null,false);
|
||||||
// 按 serviceId 分组
|
// 按 serviceId 分组
|
||||||
Map<Long, List<OutpatientInfusionRecordDto>> servicePatientInfusionList = patientInfusionList.stream()
|
Map<Long, List<OutpatientInfusionRecordDto>> servicePatientInfusionList = patientInfusionList.stream()
|
||||||
.collect(Collectors.groupingBy(OutpatientInfusionRecordDto::getServiceId));
|
.collect(Collectors.groupingBy(OutpatientInfusionRecordDto::getServiceId));
|
||||||
@@ -334,16 +334,17 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
/**
|
/**
|
||||||
* 显示门诊输液执行记录查询
|
* 显示门诊输液执行记录查询
|
||||||
*
|
*
|
||||||
|
* @param patientId 患者输液信息
|
||||||
* @param historyFlag 查询的是否为执行履历
|
* @param historyFlag 查询的是否为执行履历
|
||||||
* @return 返回门诊输液执行记录查询
|
* @return 返回门诊输液执行记录查询
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(HttpServletRequest request,
|
public List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(Long patientId,HttpServletRequest request,
|
||||||
boolean historyFlag) {
|
boolean historyFlag) {
|
||||||
|
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper =
|
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper =
|
||||||
HisQueryUtils.buildQueryWrapper(new OutpatientInfusionRecordDto(), null, null, request);
|
HisQueryUtils.buildQueryWrapper(null, null, null, request);
|
||||||
|
|
||||||
// 执行历史查询的条件
|
// 执行历史查询的条件
|
||||||
if (historyFlag) {
|
if (historyFlag) {
|
||||||
@@ -351,6 +352,8 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
queryWrapper.isNotNull(CommonConstants.FieldName.BasedOnId);
|
queryWrapper.isNotNull(CommonConstants.FieldName.BasedOnId);
|
||||||
// 状态是已完成
|
// 状态是已完成
|
||||||
queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.COMPLETED.getValue());
|
queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.COMPLETED.getValue());
|
||||||
|
//筛选当前ID的患者历史执行记录
|
||||||
|
queryWrapper.eq(CommonConstants.FieldName.PatientId,patientId);
|
||||||
|
|
||||||
List<OutpatientInfusionRecordDto> infusionPerformList = editRecords(queryWrapper);
|
List<OutpatientInfusionRecordDto> infusionPerformList = editRecords(queryWrapper);
|
||||||
List<Long> medicationIds = checkServiceRequestIsCompleted(infusionPerformList);
|
List<Long> medicationIds = checkServiceRequestIsCompleted(infusionPerformList);
|
||||||
@@ -365,6 +368,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
|
|
||||||
// 门诊输液待执行记录查询
|
// 门诊输液待执行记录查询
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// based_on_id 为空,此条件筛选控制不显示执行履历
|
// based_on_id 为空,此条件筛选控制不显示执行履历
|
||||||
queryWrapper.isNull(CommonConstants.FieldName.BasedOnId);
|
queryWrapper.isNull(CommonConstants.FieldName.BasedOnId);
|
||||||
// 状态是进行中
|
// 状态是进行中
|
||||||
|
|||||||
@@ -103,18 +103,19 @@ public class OutpatientInfusionRecordController {
|
|||||||
@GetMapping(value = "/infusion-wait-perform-record")
|
@GetMapping(value = "/infusion-wait-perform-record")
|
||||||
public R<?> getPatientInfusionRecords(HttpServletRequest request) {
|
public R<?> getPatientInfusionRecords(HttpServletRequest request) {
|
||||||
|
|
||||||
return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(request, false));
|
return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(null,request, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊输液执行历史记录查询
|
* 门诊输液执行历史记录查询
|
||||||
*
|
*
|
||||||
|
* @param patientId 患者ID
|
||||||
* @return 门诊输液执行历史记录列表
|
* @return 门诊输液执行历史记录列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/infusion-perform-record")
|
@GetMapping(value = "/infusion-perform-record")
|
||||||
public R<?> getPatientInfusionPerformRecord(HttpServletRequest request) {
|
public R<?> getPatientInfusionPerformRecord(@RequestParam Long patientId,HttpServletRequest request) {
|
||||||
|
|
||||||
return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(request, true));
|
return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId,request, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user