管理端首页修改
This commit is contained in:
parent
9817ecf55e
commit
f2879346f8
@ -37,4 +37,9 @@ public class SystemHomePageController extends BaseController {
|
|||||||
public AjaxResult serviceModeStatistics() {
|
public AjaxResult serviceModeStatistics() {
|
||||||
return AjaxResult.success(systemHomePageService.serviceModeStatistics());
|
return AjaxResult.success(systemHomePageService.serviceModeStatistics());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("taskSituation")
|
||||||
|
public AjaxResult taskSituation(){
|
||||||
|
return AjaxResult.success(systemHomePageService.taskSituation());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.xinelu.manage.mapper.signpatientmanageroutenode;
|
|||||||
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||||
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
import com.xinelu.manage.dto.signpatientmanageroutenode.SignPatientManageRouteNodeDto;
|
||||||
|
import com.xinelu.manage.vo.homepage.PatientAndNode;
|
||||||
import com.xinelu.manage.vo.signpatientmanageroutenode.*;
|
import com.xinelu.manage.vo.signpatientmanageroutenode.*;
|
||||||
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeAuditVo;
|
import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeAuditVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -155,4 +156,6 @@ public interface SignPatientManageRouteNodeMapper {
|
|||||||
int selectNodeCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
int selectNodeCountByCreateTime(@Param("firstDay") LocalDate firstDay, @Param("now") LocalDate now);
|
||||||
|
|
||||||
BigDecimal selectNodeCount(@Param("phoneDialMethod") String phoneDialMethod, @Param("messagePushSign") Long messagePushSign, @Param("appletPushSign") Long appletPushSign);
|
BigDecimal selectNodeCount(@Param("phoneDialMethod") String phoneDialMethod, @Param("messagePushSign") Long messagePushSign, @Param("appletPushSign") Long appletPushSign);
|
||||||
|
|
||||||
|
List<PatientAndNode> selectNodeExecuteStatus();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,10 @@ import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
|
|||||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.IntentionalSignVo;
|
import com.xinelu.manage.vo.signpatientrecord.IntentionalSignVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
|
||||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||||
|
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,4 +44,6 @@ public interface SignPatientRecordMapper {
|
|||||||
* @Date 2024-08-08 11:00
|
* @Date 2024-08-08 11:00
|
||||||
*/
|
*/
|
||||||
IntentionalSignVo getIntentionalSign(Long id);
|
IntentionalSignVo getIntentionalSign(Long id);
|
||||||
|
|
||||||
|
int selectCheckStatus(@Param("routeCheckStatus") String routeCheckStatus, @Param("serviceStatus") String serviceStatus);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.xinelu.manage.service.homepage;
|
|||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.manage.vo.homepage.ServiceModeStatistics;
|
import com.xinelu.manage.vo.homepage.ServiceModeStatistics;
|
||||||
import com.xinelu.manage.vo.homepage.SignPatientCount;
|
import com.xinelu.manage.vo.homepage.SignPatientCount;
|
||||||
|
import com.xinelu.manage.vo.homepage.TaskSituation;
|
||||||
import com.xinelu.manage.vo.homepage.TopStatisticsVO;
|
import com.xinelu.manage.vo.homepage.TopStatisticsVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -19,5 +20,7 @@ public interface SystemHomePageService {
|
|||||||
|
|
||||||
List<SignPatientCount> signPatientCount();
|
List<SignPatientCount> signPatientCount();
|
||||||
|
|
||||||
ServiceModeStatistics serviceModeStatistics();
|
List<ServiceModeStatistics> serviceModeStatistics();
|
||||||
|
|
||||||
|
List<TaskSituation> taskSituation();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
package com.xinelu.manage.service.homepage.impl;
|
package com.xinelu.manage.service.homepage.impl;
|
||||||
|
|
||||||
|
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
||||||
import com.xinelu.common.enums.PhoneDialMethodEnum;
|
import com.xinelu.common.enums.PhoneDialMethodEnum;
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||||
import com.xinelu.manage.mapper.patientprehospitalization.PatientPreHospitalizationMapper;
|
import com.xinelu.manage.mapper.patientprehospitalization.PatientPreHospitalizationMapper;
|
||||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||||
|
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
|
||||||
import com.xinelu.manage.service.homepage.SystemHomePageService;
|
import com.xinelu.manage.service.homepage.SystemHomePageService;
|
||||||
import com.xinelu.manage.vo.homepage.ServiceModeStatistics;
|
import com.xinelu.manage.vo.homepage.*;
|
||||||
import com.xinelu.manage.vo.homepage.SignPatientCount;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import com.xinelu.manage.vo.homepage.TopStatisticsVO;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -17,6 +18,7 @@ import java.time.LocalDate;
|
|||||||
import java.time.temporal.TemporalAdjusters;
|
import java.time.temporal.TemporalAdjusters;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页信息Service业务层处理
|
* 首页信息Service业务层处理
|
||||||
@ -32,6 +34,8 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
private PatientPreHospitalizationMapper patientPreHospitalizationMapper;
|
private PatientPreHospitalizationMapper patientPreHospitalizationMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
|
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
|
||||||
|
@Resource
|
||||||
|
private SignPatientRecordMapper signPatientRecordMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TopStatisticsVO topStatistics() {
|
public TopStatisticsVO topStatistics() {
|
||||||
@ -72,17 +76,55 @@ public class SystemHomePageServiceImpl implements SystemHomePageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ServiceModeStatistics serviceModeStatistics() {
|
public List<ServiceModeStatistics> serviceModeStatistics() {
|
||||||
ServiceModeStatistics serviceModeStatistics = new ServiceModeStatistics();
|
ArrayList<ServiceModeStatistics> serviceModeStatisticsList = new ArrayList<>();
|
||||||
BigDecimal all = signPatientManageRouteNodeMapper.selectNodeCount(null, null, null);
|
|
||||||
BigDecimal common = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.COMMON.getInfo(), null, null);
|
BigDecimal common = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.COMMON.getInfo(), null, null);
|
||||||
BigDecimal AI = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.AI.getInfo(), null, null);
|
BigDecimal AI = signPatientManageRouteNodeMapper.selectNodeCount(PhoneDialMethodEnum.AI.getInfo(), null, null);
|
||||||
BigDecimal messagePushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, 0L, null);
|
BigDecimal messagePushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, 0L, null);
|
||||||
BigDecimal appletPushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, null, 0L);
|
BigDecimal appletPushSign = signPatientManageRouteNodeMapper.selectNodeCount(null, null, 0L);
|
||||||
serviceModeStatistics.setAI(AI.divide(all, 2, RoundingMode.HALF_UP));
|
BigDecimal all = common.add(AI).add(messagePushSign).add(appletPushSign);
|
||||||
serviceModeStatistics.setMessage(messagePushSign.divide(all, 2, RoundingMode.HALF_UP));
|
serviceModeStatisticsList.add(new ServiceModeStatistics("AI", AI.divide(all, 2, RoundingMode.HALF_UP), AI));
|
||||||
serviceModeStatistics.setCommon(common.divide(all, 2, RoundingMode.HALF_UP));
|
serviceModeStatisticsList.add(new ServiceModeStatistics("短信", messagePushSign.divide(all, 2, RoundingMode.HALF_UP), messagePushSign));
|
||||||
serviceModeStatistics.setWeChat(appletPushSign.divide(all, 2, RoundingMode.HALF_UP));
|
serviceModeStatisticsList.add(new ServiceModeStatistics("微信", appletPushSign.divide(all, 2, RoundingMode.HALF_UP), appletPushSign));
|
||||||
return serviceModeStatistics;
|
serviceModeStatisticsList.add(new ServiceModeStatistics("人工随访", common.divide(all, 2, RoundingMode.HALF_UP), common));
|
||||||
|
return serviceModeStatisticsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TaskSituation> taskSituation() {
|
||||||
|
LocalDate now = LocalDate.now();
|
||||||
|
List<TaskSituation> taskSituations = new ArrayList<>();
|
||||||
|
//未审核
|
||||||
|
int checkStatusCount = signPatientRecordMapper.selectCheckStatus("UNAUDITED", "SERVICE_CENTER");
|
||||||
|
//全部
|
||||||
|
int signTimeCount = signPatientRecordMapper.selectCheckStatus(null, "SERVICE_CENTER");
|
||||||
|
//任务
|
||||||
|
List<PatientAndNode> patientAndNodes = signPatientManageRouteNodeMapper.selectNodeExecuteStatus();
|
||||||
|
int unExecutedCount = 0;
|
||||||
|
int allCount = 0;
|
||||||
|
if (CollectionUtils.isNotEmpty(patientAndNodes)) {
|
||||||
|
allCount = patientAndNodes.size();
|
||||||
|
for (PatientAndNode patientAndNode : patientAndNodes) {
|
||||||
|
LocalDate localDate = null;
|
||||||
|
if (Objects.nonNull(patientAndNode.getDischargeTime())) {
|
||||||
|
localDate = patientAndNode.getDischargeTime().plusDays(patientAndNode.getRouteNodeDay());
|
||||||
|
}
|
||||||
|
if (Objects.isNull(patientAndNode.getDischargeTime()) && Objects.nonNull(patientAndNode.getVisitDate())) {
|
||||||
|
localDate = patientAndNode.getVisitDate().plusDays(patientAndNode.getRouteNodeDay());
|
||||||
|
}
|
||||||
|
if (Objects.isNull(localDate)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
boolean before = localDate.isBefore(LocalDate.now()) || localDate.isEqual(LocalDate.now());
|
||||||
|
if (before) {
|
||||||
|
if (!NodeExecuteStatusEnum.EXECUTED.getInfo().equals(patientAndNode.getNodeExecuteStatus())) {
|
||||||
|
unExecutedCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
taskSituations.add(new TaskSituation("人工审核", checkStatusCount, signTimeCount));
|
||||||
|
taskSituations.add(new TaskSituation("人工随访", unExecutedCount, allCount));
|
||||||
|
return taskSituations;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.xinelu.manage.vo.homepage;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PatientAndNode {
|
||||||
|
|
||||||
|
private Long signPatientManageRouteNodeIds;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "出院时间(出院患者)")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate dischargeTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private LocalDate visitDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
|
||||||
|
private Integer routeNodeDay;
|
||||||
|
|
||||||
|
private String nodeExecuteStatus;
|
||||||
|
}
|
||||||
@ -8,22 +8,24 @@ import java.math.BigDecimal;
|
|||||||
public class ServiceModeStatistics {
|
public class ServiceModeStatistics {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短信
|
* 名称
|
||||||
*/
|
*/
|
||||||
private BigDecimal message;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ai
|
* 比例
|
||||||
*/
|
*/
|
||||||
private BigDecimal AI;
|
private BigDecimal proportion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人工随访
|
* 数量
|
||||||
*/
|
*/
|
||||||
private BigDecimal common;
|
private BigDecimal count;
|
||||||
|
|
||||||
/**
|
public ServiceModeStatistics(String name, BigDecimal proportion, BigDecimal count) {
|
||||||
* 微信
|
super();
|
||||||
*/
|
this.name = name;
|
||||||
private BigDecimal weChat;
|
this.proportion = proportion;
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.xinelu.manage.vo.homepage;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TaskSituation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分子
|
||||||
|
*/
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分母
|
||||||
|
*/
|
||||||
|
private Integer allCount;
|
||||||
|
|
||||||
|
public TaskSituation(String name, Integer count, Integer allCount) {
|
||||||
|
super();
|
||||||
|
this.name = name;
|
||||||
|
this.count = count;
|
||||||
|
this.allCount = allCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<result property="visitDate" column="visit_date"/>
|
<result property="visitDate" column="visit_date"/>
|
||||||
<result property="dischargeMethod" column="discharge_method"/>
|
<result property="dischargeMethod" column="discharge_method"/>
|
||||||
<result property="patientSource" column="patient_source"/>
|
<result property="patientSource" column="patient_source"/>
|
||||||
<result property="surgicalName" column="surgical_name" />
|
<result property="surgicalName" column="surgical_name"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
@ -53,7 +53,8 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPatientInfoVo">
|
<sql id="selectPatientInfoVo">
|
||||||
select p.id,p.resident_id,
|
select p.id,
|
||||||
|
p.resident_id,
|
||||||
p.patient_name,
|
p.patient_name,
|
||||||
p.patient_phone,
|
p.patient_phone,
|
||||||
p.family_member_phone,
|
p.family_member_phone,
|
||||||
@ -62,14 +63,43 @@
|
|||||||
p.sex,
|
p.sex,
|
||||||
p.address,
|
p.address,
|
||||||
p.patient_type,
|
p.patient_type,
|
||||||
p.sign_status,p.sign_patient_record_id,p.service_status,
|
p.sign_status,
|
||||||
|
p.sign_patient_record_id,
|
||||||
|
p.service_status,
|
||||||
p.sign_time,
|
p.sign_time,
|
||||||
p.visit_method, p.attending_physician_id, p.attending_physician_name, p.main_diagnosis,
|
p.visit_method,
|
||||||
p.hospital_agency_id, p.hospital_agency_name, p.campus_agency_id, p.campus_agency_name, p.department_id, p.department_name, p.ward_id, p.ward_name,
|
p.attending_physician_id,
|
||||||
p.responsible_nurse, p.patient_visit_record_id, p.visit_serial_number,
|
p.attending_physician_name,
|
||||||
p.admission_time, p.patient_pre_hospitalization_id, p.discharge_time, p.patient_pre_hospitalization_id, p.appointment_treatment_group,
|
p.main_diagnosis,
|
||||||
p.registration_no, p.registration_date, p.appointment_date, p.in_hospital_number, p.visit_date, p.discharge_method,
|
p.hospital_agency_id,
|
||||||
p.patient_source, p.surgical_name, p.del_flag, p.create_by, p.create_time, p.update_by, p.update_time
|
p.hospital_agency_name,
|
||||||
|
p.campus_agency_id,
|
||||||
|
p.campus_agency_name,
|
||||||
|
p.department_id,
|
||||||
|
p.department_name,
|
||||||
|
p.ward_id,
|
||||||
|
p.ward_name,
|
||||||
|
p.responsible_nurse,
|
||||||
|
p.patient_visit_record_id,
|
||||||
|
p.visit_serial_number,
|
||||||
|
p.admission_time,
|
||||||
|
p.patient_pre_hospitalization_id,
|
||||||
|
p.discharge_time,
|
||||||
|
p.patient_pre_hospitalization_id,
|
||||||
|
p.appointment_treatment_group,
|
||||||
|
p.registration_no,
|
||||||
|
p.registration_date,
|
||||||
|
p.appointment_date,
|
||||||
|
p.in_hospital_number,
|
||||||
|
p.visit_date,
|
||||||
|
p.discharge_method,
|
||||||
|
p.patient_source,
|
||||||
|
p.surgical_name,
|
||||||
|
p.del_flag,
|
||||||
|
p.create_by,
|
||||||
|
p.create_time,
|
||||||
|
p.update_by,
|
||||||
|
p.update_time
|
||||||
from patient_info p
|
from patient_info p
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -171,7 +201,8 @@
|
|||||||
|
|
||||||
<select id="getPatientList" parameterType="com.xinelu.manage.dto.patientinfo.PatientInfoDto"
|
<select id="getPatientList" parameterType="com.xinelu.manage.dto.patientinfo.PatientInfoDto"
|
||||||
resultType="com.xinelu.manage.vo.patientinfo.PatientInfoVo">
|
resultType="com.xinelu.manage.vo.patientinfo.PatientInfoVo">
|
||||||
select p.*, count(p.manage_route_node_id) as taskNum, SUM(p.task_finish_status) as taskFinishNum, SUM(p.task_execute_status) as taskExecuteNum,
|
select p.*, count(p.manage_route_node_id) as taskNum, SUM(p.task_finish_status) as taskFinishNum,
|
||||||
|
SUM(p.task_execute_status) as taskExecuteNum,
|
||||||
case
|
case
|
||||||
when count(p.manage_route_node_id) = 0 then 0
|
when count(p.manage_route_node_id) = 0 then 0
|
||||||
else
|
else
|
||||||
@ -274,26 +305,37 @@
|
|||||||
GROUP BY p.id order by p.id desc
|
GROUP BY p.id order by p.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPatientNextTask" parameterType="Long" resultType="com.xinelu.manage.vo.patientinfo.PatientNextTaskVo">
|
<select id="getPatientNextTask" parameterType="Long"
|
||||||
select p.task_name, p.execute_date_time from patient_task_view p
|
resultType="com.xinelu.manage.vo.patientinfo.PatientNextTaskVo">
|
||||||
where
|
select p.task_name, p.execute_date_time
|
||||||
p.id = #{patientId} and p.node_execute_status = 'UNEXECUTED'
|
from patient_task_view p
|
||||||
|
where p.id = #{patientId}
|
||||||
|
and p.node_execute_status = 'UNEXECUTED'
|
||||||
order by p.execute_date_time limit 1
|
order by p.execute_date_time limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPatientInfoById" parameterType="Long" resultMap="PatientInfoResult">
|
<select id="selectPatientInfoById" parameterType="Long" resultMap="PatientInfoResult">
|
||||||
<include refid="selectPatientInfoVo" />
|
<include refid="selectPatientInfoVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPatientBaseInfo" parameterType="Long" resultType="com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo">
|
<select id="getPatientBaseInfo" parameterType="Long"
|
||||||
select id, resident_id, patient_name, patient_phone, family_member_phone,
|
resultType="com.xinelu.manage.vo.patientinfo.PatientBaseInfoVo">
|
||||||
birth_date, card_no, sex, address
|
select id,
|
||||||
|
resident_id,
|
||||||
|
patient_name,
|
||||||
|
patient_phone,
|
||||||
|
family_member_phone,
|
||||||
|
birth_date,
|
||||||
|
card_no,
|
||||||
|
sex,
|
||||||
|
address
|
||||||
from patient_info
|
from patient_info
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertPatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertPatientInfo" parameterType="com.xinelu.manage.domain.patientinfo.PatientInfo"
|
||||||
|
useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into patient_info
|
insert into patient_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="residentId != null">
|
<if test="residentId != null">
|
||||||
@ -680,7 +722,8 @@
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<update id="deletePatientInfoById" parameterType="Long">
|
<update id="deletePatientInfoById" parameterType="Long">
|
||||||
update patient_info set del_flag = 1
|
update patient_info
|
||||||
|
set del_flag = 1
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
@ -721,8 +764,12 @@
|
|||||||
from patient_info
|
from patient_info
|
||||||
where
|
where
|
||||||
del_flag = 0
|
del_flag = 0
|
||||||
|
<if test="firstDay != null">
|
||||||
and create_time >= #{firstDay}
|
and create_time >= #{firstDay}
|
||||||
|
</if>
|
||||||
|
<if test="firstDay != null">
|
||||||
and create_time <= #{now}
|
and create_time <= #{now}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPatientInfoCountBySignTime" resultType="java.lang.Integer">
|
<select id="selectPatientInfoCountBySignTime" resultType="java.lang.Integer">
|
||||||
@ -731,8 +778,12 @@
|
|||||||
from patient_info
|
from patient_info
|
||||||
where
|
where
|
||||||
del_flag = 0
|
del_flag = 0
|
||||||
|
<if test="firstDay != null">
|
||||||
and sign_time >= #{firstDay}
|
and sign_time >= #{firstDay}
|
||||||
|
</if>
|
||||||
|
<if test="firstDay != null">
|
||||||
and sign_time <= #{now}
|
and sign_time <= #{now}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPatientSignTotalCount" resultType="java.lang.Integer">
|
<select id="selectPatientSignTotalCount" resultType="java.lang.Integer">
|
||||||
|
|||||||
@ -345,9 +345,9 @@
|
|||||||
LEFT JOIN patient_visit_record pvr ON pi.patient_visit_record_id = pvr.id
|
LEFT JOIN patient_visit_record pvr ON pi.patient_visit_record_id = pvr.id
|
||||||
<where>
|
<where>
|
||||||
pi.del_flag = 0
|
pi.del_flag = 0
|
||||||
|
and spmrn.phone_push_sign = 1
|
||||||
AND spmrn.route_check_status = 'AGREE'
|
AND spmrn.route_check_status = 'AGREE'
|
||||||
AND spmrn.task_node_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE')
|
AND spmrn.task_node_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE')
|
||||||
AND spmrn.phone_dial_method = 'COMMON'
|
|
||||||
<if test="patientName != null and patientName != ''">
|
<if test="patientName != null and patientName != ''">
|
||||||
AND pi.patient_name LIKE concat('%', #{patientName}, '%')
|
AND pi.patient_name LIKE concat('%', #{patientName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@ -943,7 +943,7 @@
|
|||||||
select count(1)
|
select count(1)
|
||||||
from sign_patient_manage_route_node
|
from sign_patient_manage_route_node
|
||||||
where del_flag = 0
|
where del_flag = 0
|
||||||
and phone_push_sign = 0
|
and phone_push_sign = 1
|
||||||
and create_time >= #{firstDay}
|
and create_time >= #{firstDay}
|
||||||
and create_time <= #{now}
|
and create_time <= #{now}
|
||||||
</select>
|
</select>
|
||||||
@ -963,4 +963,19 @@
|
|||||||
OR official_push_sign =#{appletPushSign})
|
OR official_push_sign =#{appletPushSign})
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNodeExecuteStatus" resultType="com.xinelu.manage.vo.homepage.PatientAndNode">
|
||||||
|
SELECT spmrn.id signPatientManageRouteNodeIds,
|
||||||
|
spmrn.node_execute_status,
|
||||||
|
pi.discharge_time,
|
||||||
|
pi.visit_date,
|
||||||
|
spmrn.route_node_day
|
||||||
|
from sign_patient_manage_route_node spmrn
|
||||||
|
LEFT JOIN sign_patient_manage_route spmr on spmr.id = spmrn.manage_route_id
|
||||||
|
LEFT JOIN patient_info pi ON pi.id = spmr.patient_id
|
||||||
|
where pi.del_flag = 0
|
||||||
|
and spmrn.phone_push_sign = 1
|
||||||
|
AND spmrn.route_check_status = 'AGREE'
|
||||||
|
AND spmrn.task_node_type in ('PHONE_OUTBOUND','QUESTIONNAIRE_SCALE')
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -523,4 +523,29 @@
|
|||||||
select id, patient_id, intentional_source ,intentional_time, billing_doctor_id, billing_doctor_name
|
select id, patient_id, intentional_source ,intentional_time, billing_doctor_id, billing_doctor_name
|
||||||
from sign_patient_record where id = #{id}
|
from sign_patient_record where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCheckStatus" resultType="java.lang.Integer">
|
||||||
|
SELECT COUNT(1)
|
||||||
|
from sign_patient_record spr
|
||||||
|
left join patient_info pi on pi.sign_patient_record_id = spr.id
|
||||||
|
<where>
|
||||||
|
spr.del_flag = 0 and pi.del_flag = 0
|
||||||
|
<if test="serviceStatus != null">
|
||||||
|
and pi.service_status = #{serviceStatus}
|
||||||
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="routeCheckStatus != null and routeCheckStatus == 'UNAUDITED'.toString()">
|
||||||
|
and (spr.route_check_status is null or spr.portait_check_status is null)
|
||||||
|
</when>
|
||||||
|
<when test="routeCheckStatus != null and routeCheckStatus == 'AGREE'.toString()">
|
||||||
|
and spr.route_check_status = #{routeCheckStatus} and spr.portait_check_status =
|
||||||
|
#{routeCheckStatus}
|
||||||
|
</when>
|
||||||
|
<when test="routeCheckStatus != null and routeCheckStatus == 'DISAGREE'.toString()">
|
||||||
|
and (spr.route_check_status = #{routeCheckStatus} or spr.portait_check_status =
|
||||||
|
#{routeCheckStatus})
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user