This commit is contained in:
liuhongrui
2025-03-20 20:13:31 +08:00
parent 9c1a45c56a
commit 1490056b25
6 changed files with 26 additions and 28 deletions

View File

@@ -2,12 +2,12 @@ package com.openhis.web.outpatientmanage.appservice;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto;
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto;
import javax.servlet.http.HttpServletRequest;
/**
* 门诊管理——输液实现类
*
@@ -19,14 +19,13 @@ public interface IOutpatientInfusionRecordService {
/**
* 获取门诊输液记录的患者列表
*
* @param infusionPatientDto 输液患者实体
* @param searchKey 模糊查询关键字
* @param pageNo 当前页
* @param pageSize 每页多少条
* @return 分页查询
*/
IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatientList(OutpatientInfusionPatientDto infusionPatientDto,
String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request);
IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatientList(String searchKey, Integer pageNo,
Integer pageSize, HttpServletRequest request);
/**
* 点击患者,查询该患者的输液记录
@@ -59,6 +58,6 @@ public interface IOutpatientInfusionRecordService {
* @param historyFlag 查询的是否为执行履历
* @return 门诊输液记录列表
*/
List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(HttpServletRequest request,boolean historyFlag);
List<OutpatientInfusionRecordDto> getPatientInfusionPerformRecord(HttpServletRequest request, boolean historyFlag);
}

View File

@@ -64,22 +64,21 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
/**
* 获取门诊输液记录的患者列表
*
* @param infusionPatientDto 输液患者实体
* @param searchKey 模糊查询关键字
* @param pageNo 当前页
* @param pageSize 每页多少条
* @return 分页查询
*/
@Override
public IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatientList(
OutpatientInfusionPatientDto infusionPatientDto, String searchKey, Integer pageNo, Integer pageSize,
HttpServletRequest request) {
public IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatientList(String searchKey, Integer pageNo,
Integer pageSize, HttpServletRequest request) {
// 构建查询条件
QueryWrapper<OutpatientInfusionPatientDto> queryWrapper = HisQueryUtils.buildQueryWrapper(infusionPatientDto, searchKey,
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientBusNo,
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.PatientName)),
request);
QueryWrapper<OutpatientInfusionPatientDto> queryWrapper =
HisQueryUtils.buildQueryWrapper(new OutpatientInfusionPatientDto(), searchKey,
new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientBusNo,
CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.PatientName)),
request);
IPage<OutpatientInfusionPatientDto> outpatientInfusionPatientDto =
outpatientManageMapper.getOutpatientInfusionPatient(new Page<>(pageNo, pageSize), queryWrapper);
@@ -113,11 +112,11 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
// 构建查询条件
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper =
HisQueryUtils.buildQueryWrapper(null, null, null, request);
HisQueryUtils.buildQueryWrapper(new OutpatientInfusionPatientDto(), null, null, request);
queryWrapper.eq(CommonConstants.FieldName.PatientId, outpatientInfusionPatientDto.getPatientId());
// based_on_id 是为空的
queryWrapper.eq(CommonConstants.FieldName.BasedOnId, null);
queryWrapper.isNull(CommonConstants.FieldName.BasedOnId);
// 状态是未完成的
queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.IN_PROGRESS.getValue());
@@ -315,7 +314,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
// 构建查询条件
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper =
HisQueryUtils.buildQueryWrapper(null, null, null, request);
HisQueryUtils.buildQueryWrapper(new OutpatientInfusionRecordDto(), null, null, request);
// 执行历史查询的条件
if (historyFlag) {

View File

@@ -36,20 +36,18 @@ public class OutpatientInfusionRecordController {
/**
* 查询门诊输液的患者列表
*
* @param infusionPatientDto 患者实体
* @param searchKey 模糊查询关键字
* @param pageNo 当前页
* @param pageSize 每页多少条
* @return 返回门诊输液的患者列表
*/
@GetMapping(value = "/infusion-patient-list")
public R<?> getOutpatientInfusionPatientList(OutpatientInfusionPatientDto infusionPatientDto,
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
public R<?> getOutpatientInfusionPatientList(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
return R
.ok(outpatientInfusionRecordService.getOutpatientInfusionPatientList(infusionPatientDto,searchKey, pageNo, pageSize, request));
.ok(outpatientInfusionRecordService.getOutpatientInfusionPatientList(searchKey, pageNo, pageSize, request));
}
/**

View File

@@ -1,5 +1,6 @@
package com.openhis.web.outpatientmanage.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
@@ -51,6 +52,6 @@ public class OutpatientInfusionPatientDto {
private String ageString;
/** 开单时间 */
private Date createTime;
private String createTime;
}

View File

@@ -3,6 +3,7 @@ package com.openhis.web.outpatientmanage.dto;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.openhis.common.annotation.Dict;
@@ -119,6 +120,6 @@ public class OutpatientInfusionRecordDto {
private String skinTestFlag_enumText;
/** 开单时间 */
private Date createTime;
private String createTime;
}

View File

@@ -157,8 +157,8 @@
pt.name AS patient_name, --病人姓名
pt.id_card AS id_card, --病人身份证号
sr.tenant_id,
pt.gender_enum AS gender_enum, --病人性别
mr.create_time AS create_time --开单时间
pt.gender_enum, --病人性别
to_char(mr.create_time, 'YYYY-MM-DD HH24:MI:SS') AS create_time--开单时间
FROM
wor_service_request sr
LEFT JOIN adm_encounter e ON e.id = sr.encounter_id
@@ -172,7 +172,7 @@
AND sr.based_on_id is null
</where>
ORDER BY
mr.create_time,e.bus_no,pt.bus_no
create_time,e.bus_no,pt.bus_no
) AS T1
${ew.customSqlSegment}
</select>
@@ -241,7 +241,7 @@
sr.performer_id, --执行护士
to_char(sr.occurrence_start_time, 'YYYY-MM-DD HH24:MI:SS') AS occurrence_start_time, --预计执行时间
to_char(sr.occurrence_end_time, 'YYYY-MM-DD HH24:MI:SS') AS occurrence_end_time, --预计结束时间
mr.create_time --开单时间
to_char(mr.create_time, 'YYYY-MM-DD HH24:MI:SS') AS create_time--开单时间
FROM
wor_service_request sr
LEFT JOIN adm_encounter e ON e.id = sr.encounter_id
@@ -257,7 +257,7 @@
</where>
ORDER BY
mr.create_time desc,e.bus_no,pt.bus_no
create_time desc,e.bus_no,pt.bus_no
) AS T1
${ew.customSqlSegment}
</select>