up
This commit is contained in:
@@ -3,7 +3,6 @@ package com.openhis.web.outpatientmanage.appservice.impl;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -40,6 +39,7 @@ import com.openhis.web.outpatientmanage.mapper.OutpatientManageMapper;
|
|||||||
import com.openhis.workflow.domain.ServiceRequest;
|
import com.openhis.workflow.domain.ServiceRequest;
|
||||||
import com.openhis.workflow.mapper.ServiceRequestMapper;
|
import com.openhis.workflow.mapper.ServiceRequestMapper;
|
||||||
import com.openhis.workflow.service.IServiceRequestService;
|
import com.openhis.workflow.service.IServiceRequestService;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊管理——输液实现类
|
* 门诊管理——输液实现类
|
||||||
@@ -48,6 +48,7 @@ import com.openhis.workflow.service.IServiceRequestService;
|
|||||||
* @date 2025/3/12
|
* @date 2025/3/12
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Transactional
|
||||||
public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionRecordService {
|
public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionRecordService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@@ -119,23 +120,21 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
public IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatient(
|
public IPage<OutpatientInfusionPatientDto> getOutpatientInfusionPatient(
|
||||||
OutpatientInfusionSearchParam outpatientInfusionSearchParam, Integer pageNo, Integer pageSize) {
|
OutpatientInfusionSearchParam outpatientInfusionSearchParam, Integer pageNo, Integer pageSize) {
|
||||||
|
|
||||||
String searchKey;
|
|
||||||
LocalDateTime beginTime;
|
LocalDateTime beginTime;
|
||||||
LocalDateTime endTime;
|
LocalDateTime endTime;
|
||||||
if (outpatientInfusionSearchParam == null || outpatientInfusionSearchParam.getBeginTime() == null
|
if (outpatientInfusionSearchParam == null || outpatientInfusionSearchParam.getBeginTime() == null
|
||||||
|| outpatientInfusionSearchParam.getEndTime() == null) {
|
|| outpatientInfusionSearchParam.getEndTime() == null) {
|
||||||
searchKey = null;
|
|
||||||
beginTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true);
|
beginTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true);
|
||||||
endTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false);
|
endTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false);
|
||||||
} else {
|
} else {
|
||||||
searchKey = outpatientInfusionSearchParam.getSearchKey();
|
|
||||||
beginTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getBeginTime(), true);
|
beginTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getBeginTime(), true);
|
||||||
endTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getEndTime(), false);
|
endTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getEndTime(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<OutpatientInfusionPatientDto> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
QueryWrapper<OutpatientInfusionPatientDto> queryWrapper =
|
||||||
new HashSet<>(Arrays.asList("patient_bus_no", "encounter_bus_no", "patient_name")), null);
|
HisQueryUtils.buildQueryWrapper(null, outpatientInfusionSearchParam.getSearchKey(),
|
||||||
|
new HashSet<>(Arrays.asList("patient_bus_no", "encounter_bus_no", "patient_name")), null);
|
||||||
// based_on_id 是为空的
|
// based_on_id 是为空的
|
||||||
queryWrapper.eq("based_on_id", null);
|
queryWrapper.eq("based_on_id", null);
|
||||||
// 状态是未完成的
|
// 状态是未完成的
|
||||||
@@ -195,8 +194,6 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean editPatientInfusionRecord(OutpatientInfusionRecordDto outpatientInfusionRecordDto, Long exeCount) {
|
public boolean editPatientInfusionRecord(OutpatientInfusionRecordDto outpatientInfusionRecordDto, Long exeCount) {
|
||||||
// 这里执行一次就insert 表 wor_service_request里一条数据,based_on_id一直,以mr.quantity来振分
|
|
||||||
// 点击执行一次,生成一条执行记录,确认执行+1 ,直至所有药品打完,
|
|
||||||
|
|
||||||
// 根据执行人ID,通过登录userId获取
|
// 根据执行人ID,通过登录userId获取
|
||||||
Practitioner practitioner =
|
Practitioner practitioner =
|
||||||
@@ -291,7 +288,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR
|
|||||||
|
|
||||||
LocalDateTime beginDateTime;
|
LocalDateTime beginDateTime;
|
||||||
LocalDateTime endDateTime;
|
LocalDateTime endDateTime;
|
||||||
//筛选时间不传,默认当天记录
|
// 筛选时间不传,默认当天记录
|
||||||
if (beginTime == null || endTime == null) {
|
if (beginTime == null || endTime == null) {
|
||||||
beginDateTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true);
|
beginDateTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true);
|
||||||
endDateTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false);
|
endDateTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
|
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
|
||||||
import com.openhis.web.patientmanage.dto.OutpatientRecordInitDto;
|
|
||||||
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,13 +14,6 @@ import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
|||||||
*/
|
*/
|
||||||
public interface IOutpatientRecordService {
|
public interface IOutpatientRecordService {
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取门诊记录初期数据列表
|
|
||||||
*
|
|
||||||
* @return 门诊记录初期数据列表
|
|
||||||
*/
|
|
||||||
OutpatientRecordInitDto getOutpatientRecordInit();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询门诊记录
|
* 分页查询门诊记录
|
||||||
*
|
*
|
||||||
@@ -33,4 +25,10 @@ public interface IOutpatientRecordService {
|
|||||||
Page<OutpatientRecordDto> getPatient(OutpatientRecordSearchParam outpatientRecordSearchParam, Integer pageNo,
|
Page<OutpatientRecordDto> getPatient(OutpatientRecordSearchParam outpatientRecordSearchParam, Integer pageNo,
|
||||||
Integer pageSize);
|
Integer pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医生名字列表
|
||||||
|
*
|
||||||
|
* @return 医生名字列表
|
||||||
|
*/
|
||||||
|
List<String> getDoctorNames();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ package com.openhis.web.patientmanage.appservice.impl;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -11,12 +12,9 @@ import com.openhis.common.enums.EncounterSubjectStatus;
|
|||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.web.patientmanage.appservice.IOutpatientRecordService;
|
import com.openhis.web.patientmanage.appservice.IOutpatientRecordService;
|
||||||
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
|
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
|
||||||
import com.openhis.web.patientmanage.dto.OutpatientRecordInitDto;
|
|
||||||
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
||||||
import com.openhis.web.patientmanage.mapper.PatientManageMapper;
|
import com.openhis.web.patientmanage.mapper.PatientManageMapper;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊记录查询 应用实现
|
* 门诊记录查询 应用实现
|
||||||
*
|
*
|
||||||
@@ -29,20 +27,6 @@ public class OutpatientRecordServiceImpl implements IOutpatientRecordService {
|
|||||||
@Resource
|
@Resource
|
||||||
PatientManageMapper patientManageMapper;
|
PatientManageMapper patientManageMapper;
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取门诊记录初期数据列表
|
|
||||||
*
|
|
||||||
* @return 门诊记录初期数据列表
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public OutpatientRecordInitDto getOutpatientRecordInit() {
|
|
||||||
|
|
||||||
OutpatientRecordInitDto intoDto = new OutpatientRecordInitDto();
|
|
||||||
// 获取医生名字列表
|
|
||||||
intoDto.setDoctorNames(patientManageMapper.getDoctorNames());
|
|
||||||
return intoDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询门诊记录
|
* 分页查询门诊记录
|
||||||
*
|
*
|
||||||
@@ -74,4 +58,13 @@ public class OutpatientRecordServiceImpl implements IOutpatientRecordService {
|
|||||||
return outpatientRecordPage;
|
return outpatientRecordPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医生名字列表
|
||||||
|
*
|
||||||
|
* @return 医生名字列表
|
||||||
|
*/
|
||||||
|
public List<String> getDoctorNames() {
|
||||||
|
return patientManageMapper.getDoctorNames();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class OutpatientRecordController {
|
|||||||
@GetMapping("/init")
|
@GetMapping("/init")
|
||||||
public R<?> getDoctorNames() {
|
public R<?> getDoctorNames() {
|
||||||
// 获取医生名字列表
|
// 获取医生名字列表
|
||||||
return R.ok(outpatientRecordService.getOutpatientRecordInit());
|
return R.ok(outpatientRecordService.getDoctorNames());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.openhis.web.patientmanage.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 门诊记录初始化
|
|
||||||
*
|
|
||||||
* @author liuhr
|
|
||||||
* @date 2025/3/17
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true)
|
|
||||||
public class OutpatientRecordInitDto {
|
|
||||||
|
|
||||||
//获取医生姓名列表
|
|
||||||
private List<String> doctorNames;
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user