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 java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto; import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto;
import com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto; import com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto;
import javax.servlet.http.HttpServletRequest;
/** /**
* 门诊管理——输液实现类 * 门诊管理——输液实现类
* *
@@ -19,14 +19,13 @@ public interface IOutpatientInfusionRecordService {
/** /**
* 获取门诊输液记录的患者列表 * 获取门诊输液记录的患者列表
* *
* @param infusionPatientDto 输液患者实体
* @param searchKey 模糊查询关键字 * @param searchKey 模糊查询关键字
* @param pageNo 当前页 * @param pageNo 当前页
* @param pageSize 每页多少条 * @param pageSize 每页多少条
* @return 分页查询 * @return 分页查询
*/ */
IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatientList(OutpatientInfusionPatientDto infusionPatientDto, IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatientList(String searchKey, Integer pageNo,
String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request); Integer pageSize, HttpServletRequest request);
/** /**
* 点击患者,查询该患者的输液记录 * 点击患者,查询该患者的输液记录

View File

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

View File

@@ -36,20 +36,18 @@ public class OutpatientInfusionRecordController {
/** /**
* 查询门诊输液的患者列表 * 查询门诊输液的患者列表
* *
* @param infusionPatientDto 患者实体
* @param searchKey 模糊查询关键字 * @param searchKey 模糊查询关键字
* @param pageNo 当前页 * @param pageNo 当前页
* @param pageSize 每页多少条 * @param pageSize 每页多少条
* @return 返回门诊输液的患者列表 * @return 返回门诊输液的患者列表
*/ */
@GetMapping(value = "/infusion-patient-list") @GetMapping(value = "/infusion-patient-list")
public R<?> getOutpatientInfusionPatientList(OutpatientInfusionPatientDto infusionPatientDto, public R<?> getOutpatientInfusionPatientList(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
return R 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; package com.openhis.web.outpatientmanage.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data; import lombok.Data;
@@ -51,6 +52,6 @@ public class OutpatientInfusionPatientDto {
private String ageString; 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.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.openhis.common.annotation.Dict; import com.openhis.common.annotation.Dict;
@@ -119,6 +120,6 @@ public class OutpatientInfusionRecordDto {
private String skinTestFlag_enumText; private String skinTestFlag_enumText;
/** 开单时间 */ /** 开单时间 */
private Date createTime; private String createTime;
} }

View File

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