查询当日就诊数据
This commit is contained in:
@@ -73,4 +73,14 @@ public interface IOutpatientRegistrationAppService {
|
||||
*/
|
||||
R<?> saveRegister(OutpatientRegistrationAddParam outpatientRegistrationAddParam);
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
IPage<CurrentDayEncounterDto> getCurrentDayEncounter(String searchKey, Integer pageNo, Integer pageSize);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.enums.PractitionerRole;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -26,6 +24,8 @@ import com.openhis.clinical.domain.ConditionDefinition;
|
||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.enums.PractitionerRole;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
@@ -268,4 +268,30 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"挂号"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
@Override
|
||||
public IPage<CurrentDayEncounterDto> getCurrentDayEncounter(String searchKey, Integer pageNo, Integer pageSize) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<CurrentDayEncounterDto> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
|
||||
null);
|
||||
|
||||
IPage<CurrentDayEncounterDto> currentDayEncounter =
|
||||
outpatientRegistrationAppMapper.getCurrentDayEncounter(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
currentDayEncounter.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 就诊状态
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(EncounterStatus.class, e.getStatusEnum()));
|
||||
});
|
||||
return currentDayEncounter;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
@@ -20,8 +22,6 @@ import com.openhis.web.outpatientservice.dto.OutpatientRegistrationInitDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 门诊挂号 controller
|
||||
*/
|
||||
@@ -134,4 +134,19 @@ public class OutpatientRegistrationController {
|
||||
return iOutpatientRegistrationAppService.saveRegister(outpatientRegistrationAddParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页
|
||||
* @param pageSize 每页多少条
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
@GetMapping(value = "/current-day-encounter")
|
||||
public R<?> getCurrentDayEncounter(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return R.ok(iOutpatientRegistrationAppService.getCurrentDayEncounter(searchKey, pageNo, pageSize));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.openhis.web.outpatientservice.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 当天就诊信息
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class CurrentDayEncounterDto {
|
||||
|
||||
/** 租户ID */
|
||||
private Integer tenantId;
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 科室ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long organizationId;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String organizationName;
|
||||
|
||||
/**
|
||||
* 挂号类型
|
||||
*/
|
||||
private String healthcareName;
|
||||
|
||||
/**
|
||||
* 专家账号id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long practitionerUserId;
|
||||
|
||||
/**
|
||||
* 专家
|
||||
*/
|
||||
private String practitionerName;
|
||||
|
||||
/**
|
||||
* 费用性质
|
||||
*/
|
||||
private String contractName;
|
||||
|
||||
/**
|
||||
* 患者id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者性别
|
||||
*/
|
||||
private Integer genderEnum;
|
||||
private String genderEnum_enumText;
|
||||
|
||||
/**
|
||||
* 证件号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 就诊状态
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/**
|
||||
* 挂号日期/时间
|
||||
*/
|
||||
private Date registerTime;
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.outpatientservice.dto.CurrentDayEncounterDto;
|
||||
import com.openhis.web.outpatientservice.dto.PractitionerMetadata;
|
||||
|
||||
/**
|
||||
@@ -27,4 +28,14 @@ public interface OutpatientRegistrationAppMapper {
|
||||
Integer getNumByPatientIdAndOrganizationId(@Param("patientId") Long patientId,
|
||||
@Param("serviceTypeId") Long serviceTypeId);
|
||||
|
||||
/**
|
||||
* 查询当日就诊数据
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 当日就诊数据
|
||||
*/
|
||||
IPage<CurrentDayEncounterDto> getCurrentDayEncounter(@Param("page") Page<CurrentDayEncounterDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<CurrentDayEncounterDto> queryWrapper);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user