fix(infusion): 修复输液记录功能中的参数传递和服务状态查询问题
- 修改前端API调用,将encounterId作为params对象传递而非直接参数 - 移除表格行样式设置功能并调整相关代码结构 - 更新服务状态默认值从10改为3(已完成状态) - 修复后端查询逻辑,当serviceStatus为null时不添加状态过滤条件 - 调整控制器参数注解,使serviceStatus和serviceReqId参数可选 - 在门诊输液应用服务实现中优化查询条件构建逻辑 - 更新Mapper XML文件,添加输液标志过滤条件 - 优化费用管理服务中的诊断ID列表处理,过滤空值并去重
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
-- 添加缺失的字段到 sys_user_config 表
|
||||
|
||||
-- 添加 create_by 字段
|
||||
ALTER TABLE sys_user_config ADD COLUMN IF NOT EXISTS create_by VARCHAR(64) DEFAULT NULL COMMENT '创建者';
|
||||
|
||||
-- 添加 create_time 字段
|
||||
ALTER TABLE sys_user_config ADD COLUMN IF NOT EXISTS create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间';
|
||||
|
||||
-- 添加 update_by 字段
|
||||
ALTER TABLE sys_user_config ADD COLUMN IF NOT EXISTS update_by VARCHAR(64) DEFAULT NULL COMMENT '更新者';
|
||||
|
||||
-- 添加 update_time 字段
|
||||
ALTER TABLE sys_user_config ADD COLUMN IF NOT EXISTS update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间';
|
||||
@@ -1,39 +0,0 @@
|
||||
-- 添加缺失的字段到 sys_user_config 表 (PostgreSQL 版本)
|
||||
|
||||
-- 添加 create_by 字段
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name='sys_user_config' AND column_name='create_by') THEN
|
||||
ALTER TABLE sys_user_config ADD COLUMN create_by VARCHAR(64) DEFAULT NULL;
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
-- 添加 create_time 字段
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name='sys_user_config' AND column_name='create_time') THEN
|
||||
ALTER TABLE sys_user_config ADD COLUMN create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
|
||||
COMMENT ON COLUMN sys_user_config.create_time IS '创建时间';
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
-- 添加 update_by 字段
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name='sys_user_config' AND column_name='update_by') THEN
|
||||
ALTER TABLE sys_user_config ADD COLUMN update_by VARCHAR(64) DEFAULT NULL;
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
-- 添加 update_time 字段
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name='sys_user_config' AND column_name='update_time') THEN
|
||||
ALTER TABLE sys_user_config ADD COLUMN update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
|
||||
COMMENT ON COLUMN sys_user_config.update_time IS '更新时间';
|
||||
END IF;
|
||||
END $$;
|
||||
@@ -1,104 +0,0 @@
|
||||
-- 检查流水号(display_order)是否按“科室+医生+当天”正确递增
|
||||
--
|
||||
-- 说明:
|
||||
-- 1. display_order 存的是纯数字(1, 2, 3...),不带时间戳前缀
|
||||
-- 2. 时间戳前缀(如 20260109)是在前端显示时加上的
|
||||
-- 3. 后端用 Redis key "ORG-{科室ID}-DOC-{医生ID}" 按天自增
|
||||
--
|
||||
-- 如何判断逻辑是否正确:
|
||||
-- 同一科室、同一医生、同一天的记录,display_order 应该递增(1, 2, 3...)
|
||||
-- 不同科室、不同医生、不同天的记录,可能都是 1(这是正常的)
|
||||
|
||||
-- ========================================
|
||||
-- 查询1:按“科室+医生+日期”分组,看每组内的 display_order 是否递增
|
||||
-- ========================================
|
||||
SELECT
|
||||
DATE(start_time) AS 日期,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
COUNT(*) AS 该组记录数,
|
||||
MIN(display_order) AS 最小序号,
|
||||
MAX(display_order) AS 最大序号,
|
||||
STRING_AGG(display_order::text, ', ' ORDER BY start_time) AS 序号列表,
|
||||
STRING_AGG(id::text, ', ' ORDER BY start_time) AS 记录ID列表
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND start_time >= CURRENT_DATE - INTERVAL '7 days' -- 只看最近7天
|
||||
AND display_order IS NOT NULL
|
||||
GROUP BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY 日期 DESC, 科室ID, 医生ID;
|
||||
|
||||
-- ========================================
|
||||
-- 查询2:详细查看每条记录,看同组内的序号是否连续
|
||||
-- ========================================
|
||||
SELECT
|
||||
id AS 记录ID,
|
||||
DATE(start_time) AS 日期,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
start_time AS 挂号时间,
|
||||
display_order AS 流水号,
|
||||
-- 计算:同组内的序号应该是 1, 2, 3...,看是否有重复或跳号
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY start_time
|
||||
) AS 应该是第几个,
|
||||
CASE
|
||||
WHEN display_order = ROW_NUMBER() OVER (
|
||||
PARTITION BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY start_time
|
||||
) THEN '✓ 正常'
|
||||
ELSE '✗ 异常'
|
||||
END AS 是否正常
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND start_time >= CURRENT_DATE - INTERVAL '7 days'
|
||||
AND display_order IS NOT NULL
|
||||
ORDER BY DATE(start_time) DESC, organization_id, registrar_id, start_time;
|
||||
|
||||
-- ========================================
|
||||
-- 查询3:只看今天的数据(最直观)
|
||||
-- ========================================
|
||||
SELECT
|
||||
id AS 记录ID,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
start_time AS 挂号时间,
|
||||
display_order AS 流水号
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND DATE(start_time) = CURRENT_DATE
|
||||
AND display_order IS NOT NULL
|
||||
ORDER BY organization_id, registrar_id, start_time;
|
||||
|
||||
-- ========================================
|
||||
-- 查询4:发现问题 - 找出同组内 display_order 重复的记录
|
||||
-- ========================================
|
||||
WITH ranked AS (
|
||||
SELECT
|
||||
id,
|
||||
DATE(start_time) AS reg_date,
|
||||
organization_id,
|
||||
registrar_id,
|
||||
start_time,
|
||||
display_order,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY start_time
|
||||
) AS should_be_order
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND start_time >= CURRENT_DATE - INTERVAL '7 days'
|
||||
AND display_order IS NOT NULL
|
||||
)
|
||||
SELECT
|
||||
reg_date AS 日期,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
COUNT(*) AS 重复数量,
|
||||
STRING_AGG(id::text || '->' || display_order::text, ', ') AS 问题记录
|
||||
FROM ranked
|
||||
WHERE display_order != should_be_order
|
||||
GROUP BY reg_date, organization_id, registrar_id
|
||||
ORDER BY reg_date DESC;
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
-- 会诊邀请对象表
|
||||
CREATE TABLE hisdev.consultation_invited (
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
consultation_request_id BIGINT NOT NULL,
|
||||
invited_department_id BIGINT,
|
||||
invited_department_name VARCHAR(100),
|
||||
invited_physician_id BIGINT,
|
||||
invited_physician_name VARCHAR(50),
|
||||
invited_status SMALLINT DEFAULT 0,
|
||||
confirm_time TIMESTAMP,
|
||||
confirm_opinion TEXT,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
create_by VARCHAR(64),
|
||||
update_by VARCHAR(64),
|
||||
tenant_id BIGINT,
|
||||
is_deleted SMALLINT DEFAULT 0
|
||||
);
|
||||
|
||||
-- 添加注释
|
||||
COMMENT ON TABLE hisdev.consultation_invited IS '会诊邀请对象表';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.id IS '主键ID';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.consultation_request_id IS '会诊申请ID(外键)';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.invited_department_id IS '邀请科室ID';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.invited_department_name IS '邀请科室名称';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.invited_physician_id IS '邀请医生ID';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.invited_physician_name IS '邀请医生姓名';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.invited_status IS '邀请状态(0-待确认,1-已确认,2-已拒绝)';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.confirm_time IS '确认时间';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.confirm_opinion IS '确认意见';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.update_time IS '更新时间';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.create_by IS '创建人';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.update_by IS '更新人';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN hisdev.consultation_invited.is_deleted IS '删除标识(0-未删除,1-已删除)';
|
||||
|
||||
-- 创建索引
|
||||
CREATE INDEX idx_consultation_request_id ON hisdev.consultation_invited(consultation_request_id);
|
||||
CREATE INDEX idx_invited_physician_id ON hisdev.consultation_invited(invited_physician_id);
|
||||
CREATE INDEX idx_tenant_id ON hisdev.consultation_invited(tenant_id);
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
package com.core.framework.handler;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.framework.config.TenantContext;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* MyBatis-Plus 自动填充处理器
|
||||
* 用于自动填充创建时间和更新时间,以及创建人和更新人
|
||||
*/
|
||||
@Component
|
||||
public class MybastisColumnsHandler implements MetaObjectHandler {
|
||||
|
||||
// 设置数据新增时的字段自动赋值规则
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
// 填充创建时间
|
||||
Date currentTime = new Date();
|
||||
this.strictInsertFill(metaObject, "createTime", Date.class, currentTime);
|
||||
this.strictInsertFill(metaObject, "create_time", Date.class, currentTime);
|
||||
|
||||
// 获取当前登录用户名
|
||||
String username = getCurrentUsername();
|
||||
|
||||
// 填充创建人
|
||||
this.strictInsertFill(metaObject, "createBy", String.class, username);
|
||||
this.strictInsertFill(metaObject, "create_by", String.class, username);
|
||||
|
||||
// 确保tenantId被设置
|
||||
Integer tenantId = getCurrentTenantId();
|
||||
if (tenantId == null) {
|
||||
throw new RuntimeException("无法获取当前租户ID,请确保用户已登录或正确设置租户上下文");
|
||||
}
|
||||
this.strictInsertFill(metaObject, "tenantId", Integer.class, tenantId);
|
||||
this.strictInsertFill(metaObject, "tenant_id", Integer.class, tenantId);
|
||||
}
|
||||
|
||||
// 设置数据修改时的字段自动赋值规则
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
// 填充更新时间
|
||||
Date currentTime = new Date();
|
||||
this.strictUpdateFill(metaObject, "updateTime", Date.class, currentTime);
|
||||
this.strictUpdateFill(metaObject, "update_time", Date.class, currentTime);
|
||||
|
||||
// 填充更新人
|
||||
String username = getCurrentUsername();
|
||||
this.strictUpdateFill(metaObject, "updateBy", String.class, username);
|
||||
this.strictUpdateFill(metaObject, "update_by", String.class, username);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录用户名
|
||||
* @return 当前登录用户名,如果无法获取则返回 "system"
|
||||
*/
|
||||
private String getCurrentUsername() {
|
||||
String username = "system"; // 默认值
|
||||
|
||||
try {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null) {
|
||||
username = loginUser.getUsername();
|
||||
} else {
|
||||
// 尝试从请求中获取用户信息
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (attributes != null) {
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
// 可以在这里添加额外的逻辑来从请求中获取用户信息
|
||||
// 例如从请求头、session等获取用户信息
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 记录异常但不中断处理流程
|
||||
System.err.println("获取当前登录用户时发生异常: " + e.getMessage());
|
||||
// 可以考虑记录日志
|
||||
}
|
||||
|
||||
return username;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前租户 ID
|
||||
*/
|
||||
private Integer getCurrentTenantId() {
|
||||
Integer result = null;
|
||||
|
||||
// 首先尝试从线程局部变量中获取租户ID(适用于定时任务等场景)
|
||||
Integer threadLocalTenantId = TenantContext.getCurrentTenant();
|
||||
if (threadLocalTenantId != null) {
|
||||
result = threadLocalTenantId;
|
||||
} else {
|
||||
// 获取当前登录用户的租户ID(优先使用SecurityUtils中储存的LoginUser的租户ID)
|
||||
try {
|
||||
if (SecurityUtils.getAuthentication() != null) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null) {
|
||||
result = loginUser.getTenantId();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 记录异常但不中断处理
|
||||
System.err.println("获取当前登录用户租户ID时发生异常: " + e.getMessage());
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
// 尝试从请求头中获取租户ID
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||
if (attributes != null) {
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
if (request != null) {
|
||||
// 从请求头获取租户ID,假设header名称为"X-Tenant-ID" ; 登录接口前端把租户id放到请求头里
|
||||
String tenantIdHeader = request.getHeader("X-Tenant-ID");
|
||||
String requestMethodName = request.getHeader("Request-Method-Name");
|
||||
// 登录
|
||||
if ("login".equals(requestMethodName)) {
|
||||
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
||||
try {
|
||||
result = Integer.parseInt(tenantIdHeader);
|
||||
} catch (NumberFormatException e) {
|
||||
System.err.println("解析请求头中的租户ID时发生异常: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果仍然没有获取到租户ID,返回默认值
|
||||
if (result == null) {
|
||||
System.out.println("警告: 未能获取当前租户ID,将使用默认租户ID 1");
|
||||
result = 1; // 默认租户ID
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.openhis;
|
||||
|
||||
/**
|
||||
* 示例类 - 引用 OpenHisApplication
|
||||
*/
|
||||
public class Fragment {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 引用 OpenHisApplication
|
||||
Class<?> applicationClass = com.openhis.OpenHisApplication.class;
|
||||
System.out.println("Application class: " + applicationClass.getName());
|
||||
}
|
||||
}
|
||||
@@ -145,9 +145,9 @@ public class OutpatientInfusionAppServiceImpl implements IOutpatientInfusionAppS
|
||||
*/
|
||||
@Override
|
||||
public R<?> getInfusionPendingRecord(Long encounterId, Integer serviceStatus, Integer pageNo, Integer pageSize) {
|
||||
// 构建查询条件
|
||||
// 构建查询条件 - 当 serviceStatus 为 null 时,不添加状态过滤
|
||||
QueryWrapper<OutpatientInfusionRecordDto> queryWrapper = HisQueryUtils
|
||||
.buildQueryWrapper(new OutpatientInfusionRecordDto().setServiceStatus(serviceStatus), null, null, null);
|
||||
.buildQueryWrapper(serviceStatus != null ? new OutpatientInfusionRecordDto().setServiceStatus(serviceStatus) : new OutpatientInfusionRecordDto(), null, null, null);
|
||||
// 查询门诊输液待执行记录
|
||||
Page<OutpatientInfusionRecordDto> outpatientInfusionRecordPage =
|
||||
outpatientInfusionAppMapper.selectInfusionPendingRecord(new Page<>(pageNo, pageSize), queryWrapper,
|
||||
|
||||
@@ -63,7 +63,8 @@ public class OutpatientInfusionController {
|
||||
* @return 门诊输液待执行记录列表
|
||||
*/
|
||||
@GetMapping(value = "/infusion-pending-record")
|
||||
public R<?> getInfusionPendingRecord(@RequestParam Long encounterId, @RequestParam Integer serviceStatus,
|
||||
public R<?> getInfusionPendingRecord(@RequestParam Long encounterId,
|
||||
@RequestParam(value = "serviceStatus", required = false) Integer serviceStatus,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return outpatientInfusionAppService.getInfusionPendingRecord(encounterId, serviceStatus, pageNo, pageSize);
|
||||
@@ -78,7 +79,8 @@ public class OutpatientInfusionController {
|
||||
* @return 门诊输液执行历史记录列表
|
||||
*/
|
||||
@GetMapping(value = "/infusion-perform-record")
|
||||
public R<?> getInfusionPerformRecord(@RequestParam Long serviceReqId,
|
||||
public R<?> getInfusionPerformRecord(
|
||||
@RequestParam(value = "serviceReqId", required = false) Long serviceReqId,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return outpatientInfusionAppService.getInfusionPerformRecord(serviceReqId, pageNo, pageSize);
|
||||
|
||||
@@ -198,7 +198,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
|
||||
// 此次chargeItem的就诊诊断id集合
|
||||
List<Long> diagIdList
|
||||
= chargeItemList.stream().map(ChargeItem::getEncounterDiagnosisId).collect(Collectors.toList());
|
||||
= chargeItemList.stream().map(ChargeItem::getEncounterDiagnosisId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
if (diagIdList.isEmpty()) {
|
||||
throw new ServiceException("收费项的就诊诊断查询为空");
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
LEFT JOIN med_medication_request mmr
|
||||
ON mmr.group_id = wsr.group_id
|
||||
AND mmr.delete_flag = '0'
|
||||
AND mmr.infusion_flag = 1
|
||||
LEFT JOIN med_medication_dispense dis
|
||||
ON dis.med_req_id = mmr.id
|
||||
AND dis.delete_flag = '0'
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 待执行输液记录查询
|
||||
export function listInfusionRecord(encounterId) {
|
||||
export function listInfusionRecord(params) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/infusion-pending-record',
|
||||
method: 'get',
|
||||
params: encounterId
|
||||
params: params
|
||||
})
|
||||
}
|
||||
// 病人列表
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
highlight-current-row
|
||||
border
|
||||
style="width: 100%; height: 300px"
|
||||
:row-style="rowStyle"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
ref="tableRef"
|
||||
@@ -211,7 +210,7 @@ const data = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
serviceStatus: 10,
|
||||
serviceStatus: 3, // 默认值为已完成 (对应 RequestStatus.COMPLETED)
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
@@ -460,15 +459,12 @@ function clearSelections() {
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
// function rowStyle({ row }) {
|
||||
// const colorIndex = row.groupId % 2; // 奇偶性决定颜色索引
|
||||
// return { backgroundColor: groupColors[colorIndex] };
|
||||
// }
|
||||
|
||||
function handleCurrentChange(row) {
|
||||
currentRow.value = row; // 更新当前选中行的数据
|
||||
console.log(row, '123123');
|
||||
listInfusionRecord({ encounterId: row.encounterId, serviceStatus: row.serviceStatus }).then(
|
||||
// 加载院注医嘱(待执行记录)- 不传 serviceStatus 查询所有状态
|
||||
listInfusionRecord({ encounterId: row.encounterId, serviceStatus: null }).then(
|
||||
(response) => {
|
||||
encounterId.value = row.encounterId;
|
||||
console.log('Full response1:', response);
|
||||
@@ -484,12 +480,24 @@ function handleCurrentChange(row) {
|
||||
const groupCounts = countGroupRows(infusionList.value);
|
||||
// 设置每行的标记
|
||||
markers.value = getRowMarkers(groupCounts, infusionList.value);
|
||||
// 加载第一条记录的执行历史
|
||||
if (infusionList.value.length > 0) {
|
||||
listPatientInfusionPerformRecord({ serviceReqId: infusionList.value[0].serviceId }).then((res) => {
|
||||
historyRecordsList.value =
|
||||
res.data.records.length > 0
|
||||
? res.data.records.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
isEdit: true,
|
||||
};
|
||||
})
|
||||
: [];
|
||||
});
|
||||
} else {
|
||||
historyRecordsList.value = [];
|
||||
}
|
||||
}
|
||||
);
|
||||
historyRecordsList.value = [];
|
||||
// listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => {
|
||||
// historyRecordsList.value = response.data;
|
||||
// });
|
||||
}
|
||||
|
||||
function handleOccurrenceTimeChange(value, row) {
|
||||
|
||||
Reference in New Issue
Block a user