Compare commits
19 Commits
bugfix-403
...
c424a37ebd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c424a37ebd | ||
|
|
93fc43715f | ||
|
|
1459bae9d0 | ||
|
|
40a7e0c231 | ||
|
|
4263cbbd9d | ||
|
|
6100d585c0 | ||
|
|
7df3999917 | ||
|
|
b21d499f66 | ||
|
|
1476c406cf | ||
|
|
9843ff9c05 | ||
| a620f8da22 | |||
|
|
374658923d | ||
|
|
a81e7ec980 | ||
| 39fefe9e80 | |||
|
|
5a4c2b6354 | ||
|
|
6626c8f1cd | ||
|
|
e2f4996f47 | ||
|
|
37b57e8b12 | ||
|
|
4bd0d2dcc8 |
@@ -25,7 +25,7 @@ public class SysTenantController extends BaseController {
|
|||||||
private ISysTenantService sysTenantService;
|
private ISysTenantService sysTenantService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户分页列表
|
* 查询租户分页列表(只读操作,不限制租户管理权限)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID查询
|
* @param tenantId 租户ID查询
|
||||||
* @param tenantCode 租户编码模糊查询
|
* @param tenantCode 租户编码模糊查询
|
||||||
@@ -35,7 +35,7 @@ public class SysTenantController extends BaseController {
|
|||||||
* @param pageSize 每页多少条
|
* @param pageSize 每页多少条
|
||||||
* @return 租户分页列表
|
* @return 租户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public R<IPage<SysTenant>> getTenantPage(@RequestParam(required = false) Integer tenantId,
|
public R<IPage<SysTenant>> getTenantPage(@RequestParam(required = false) Integer tenantId,
|
||||||
@RequestParam(required = false) String tenantCode, @RequestParam(required = false) String tenantName,
|
@RequestParam(required = false) String tenantCode, @RequestParam(required = false) String tenantName,
|
||||||
@@ -45,19 +45,19 @@ public class SysTenantController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户详情
|
* 查询租户详情(只读操作)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID
|
* @param tenantId 租户ID
|
||||||
* @return 租户分页列表
|
* @return 租户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/{tenantId}")
|
@GetMapping("/{tenantId}")
|
||||||
public R<SysTenant> getTenantDetail(@PathVariable Integer tenantId) {
|
public R<SysTenant> getTenantDetail(@PathVariable Integer tenantId) {
|
||||||
return R.ok(sysTenantService.getById(tenantId));
|
return R.ok(sysTenantService.getById(tenantId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户所属用户分页列表
|
* 查询租户所属用户分页列表(只读操作)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID查询
|
* @param tenantId 租户ID查询
|
||||||
* @param userName 用户昵称模糊查询
|
* @param userName 用户昵称模糊查询
|
||||||
@@ -67,7 +67,7 @@ public class SysTenantController extends BaseController {
|
|||||||
* @param pageSize 每页多少条
|
* @param pageSize 每页多少条
|
||||||
* @return 租户所属用户分页列表
|
* @return 租户所属用户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/user/page")
|
@GetMapping("/user/page")
|
||||||
public R<IPage<SysUser>> getTenantUserPage(@RequestParam(required = false) Integer tenantId,
|
public R<IPage<SysUser>> getTenantUserPage(@RequestParam(required = false) Integer tenantId,
|
||||||
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
||||||
@@ -141,14 +141,14 @@ public class SysTenantController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户未绑定的用户列表
|
* 查询租户未绑定的用户列表(只读操作)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID
|
* @param tenantId 租户ID
|
||||||
* @param pageNum 当前页
|
* @param pageNum 当前页
|
||||||
* @param pageSize 每页多少条
|
* @param pageSize 每页多少条
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/{tenantId}/unbind-users")
|
@GetMapping("/{tenantId}/unbind-users")
|
||||||
public R<IPage<SysUser>> getUnbindTenantUserList(@PathVariable Integer tenantId,
|
public R<IPage<SysUser>> getUnbindTenantUserList(@PathVariable Integer tenantId,
|
||||||
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
||||||
@@ -194,4 +194,4 @@ public class SysTenantController extends BaseController {
|
|||||||
public R<List<SysTenant>> getUserBindTenantList(@PathVariable String username) {
|
public R<List<SysTenant>> getUserBindTenantList(@PathVariable String username) {
|
||||||
return sysTenantService.getUserBindTenantList(username);
|
return sysTenantService.getUserBindTenantList(username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,6 +246,16 @@ public class OpCreateScheduleDto {
|
|||||||
*/
|
*/
|
||||||
private String communicationInfo;
|
private String communicationInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否外请专家 1-是 0-否
|
||||||
|
*/
|
||||||
|
private Integer isExternalExpert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外请专家姓名
|
||||||
|
*/
|
||||||
|
private String externalExpertName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -106,4 +106,9 @@ public class OpScheduleDto extends OpSchedule {
|
|||||||
* 创建人名称
|
* 创建人名称
|
||||||
*/
|
*/
|
||||||
private String createByName;
|
private String createByName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用类别
|
||||||
|
*/
|
||||||
|
private String feeType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,29 +231,49 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
|||||||
// 费用定价主表ID集合
|
// 费用定价主表ID集合
|
||||||
List<Long> chargeItemDefinitionIdList = adviceBaseDtoList.stream().map(AdviceBaseDto::getChargeItemDefinitionId)
|
List<Long> chargeItemDefinitionIdList = adviceBaseDtoList.stream().map(AdviceBaseDto::getChargeItemDefinitionId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
// 医嘱库存集合
|
|
||||||
List<AdviceInventoryDto> adviceInventoryList = doctorStationAdviceAppMapper.getAdviceInventory(locationId,
|
// 判断是否包含药品或耗材类型(只有这些类型才需要库存相关查询)
|
||||||
adviceDefinitionIdList,
|
boolean hasMedOrDevice = adviceTypes != null
|
||||||
CommonConstants.SqlCondition.ABOUT_INVENTORY_TABLE_STR, PublicationStatus.ACTIVE.getValue());
|
&& (adviceTypes.contains(1) || adviceTypes.contains(2));
|
||||||
// 待发放个数信息
|
|
||||||
List<AdviceInventoryDto> adviceDraftInventoryList = doctorStationAdviceAppMapper.getAdviceDraftInventory(
|
// 医嘱库存集合 — 仅药品/耗材需要库存查询,手术/诊疗(3,6)无库存概念,跳过以减少数据库开销
|
||||||
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION,
|
List<AdviceInventoryDto> adviceInventoryList;
|
||||||
DispenseStatus.DRAFT.getValue(), DispenseStatus.PREPARATION.getValue());
|
List<AdviceInventoryDto> adviceDraftInventoryList;
|
||||||
// 预减库存
|
List<AdviceInventoryDto> adviceInventory;
|
||||||
List<AdviceInventoryDto> adviceInventory = adviceUtils.subtractInventory(adviceInventoryList,
|
if (hasMedOrDevice) {
|
||||||
adviceDraftInventoryList);
|
adviceInventoryList = doctorStationAdviceAppMapper.getAdviceInventory(locationId,
|
||||||
// 查询取药科室配置
|
adviceDefinitionIdList,
|
||||||
List<AdviceInventoryDto> medLocationConfig = doctorStationAdviceAppMapper.getMedLocationConfig(organizationId);
|
CommonConstants.SqlCondition.ABOUT_INVENTORY_TABLE_STR, PublicationStatus.ACTIVE.getValue());
|
||||||
// 将配置转为 {categoryCode -> 允许的locationId集合}
|
// 待发放个数信息
|
||||||
Map<String, Set<Long>> allowedLocByCategory = new HashMap<>();
|
adviceDraftInventoryList = doctorStationAdviceAppMapper.getAdviceDraftInventory(
|
||||||
if (medLocationConfig != null && !medLocationConfig.isEmpty()) {
|
CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION,
|
||||||
for (AdviceInventoryDto cfg : medLocationConfig) {
|
DispenseStatus.DRAFT.getValue(), DispenseStatus.PREPARATION.getValue());
|
||||||
if (cfg.getCategoryCode() == null || cfg.getLocationId() == null) {
|
// 预减库存
|
||||||
continue;
|
adviceInventory = adviceUtils.subtractInventory(adviceInventoryList, adviceDraftInventoryList);
|
||||||
|
} else {
|
||||||
|
adviceInventoryList = Collections.emptyList();
|
||||||
|
adviceDraftInventoryList = Collections.emptyList();
|
||||||
|
adviceInventory = Collections.emptyList();
|
||||||
|
}
|
||||||
|
// 查询取药科室配置 — 仅药品开单场景需要
|
||||||
|
List<AdviceInventoryDto> medLocationConfig;
|
||||||
|
Map<String, Set<Long>> allowedLocByCategory;
|
||||||
|
if (hasMedOrDevice) {
|
||||||
|
medLocationConfig = doctorStationAdviceAppMapper.getMedLocationConfig(organizationId);
|
||||||
|
// 将配置转为 {categoryCode -> 允许的locationId集合}
|
||||||
|
allowedLocByCategory = new HashMap<>();
|
||||||
|
if (medLocationConfig != null && !medLocationConfig.isEmpty()) {
|
||||||
|
for (AdviceInventoryDto cfg : medLocationConfig) {
|
||||||
|
if (cfg.getCategoryCode() == null || cfg.getLocationId() == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
allowedLocByCategory.computeIfAbsent(String.valueOf(cfg.getCategoryCode()), k -> new HashSet<>())
|
||||||
|
.add(cfg.getLocationId());
|
||||||
}
|
}
|
||||||
allowedLocByCategory.computeIfAbsent(String.valueOf(cfg.getCategoryCode()), k -> new HashSet<>())
|
|
||||||
.add(cfg.getLocationId());
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
medLocationConfig = Collections.emptyList();
|
||||||
|
allowedLocByCategory = Collections.emptyMap();
|
||||||
}
|
}
|
||||||
// 费用定价子表信息 - 使用分批处理避免大量参数问题
|
// 费用定价子表信息 - 使用分批处理避免大量参数问题
|
||||||
List<AdvicePriceDto> childCharge = new ArrayList<>();
|
List<AdvicePriceDto> childCharge = new ArrayList<>();
|
||||||
|
|||||||
@@ -39,10 +39,9 @@ public interface IRequestFormManageAppService {
|
|||||||
* @param typeCode 申请单类型
|
* @param typeCode 申请单类型
|
||||||
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
||||||
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
||||||
* @param status 单据状态(可选)
|
|
||||||
* @return 申请单列表
|
* @return 申请单列表
|
||||||
*/
|
*/
|
||||||
List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status);
|
List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询申请单
|
* 分页查询申请单
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
|||||||
@Override
|
@Override
|
||||||
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode) {
|
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode) {
|
||||||
// 调用重载方法,不传筛选参数
|
// 调用重载方法,不传筛选参数
|
||||||
return getRequestForm(encounterId, typeCode, null, null, null);
|
return getRequestForm(encounterId, typeCode, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -424,17 +424,16 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
|||||||
* @param typeCode 申请单类型
|
* @param typeCode 申请单类型
|
||||||
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
||||||
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
||||||
* @param status 单据状态(可选)
|
|
||||||
* @return 申请单列表
|
* @return 申请单列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status) {
|
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate) {
|
||||||
// 检查参数
|
// 检查参数
|
||||||
if (encounterId == null) {
|
if (encounterId == null) {
|
||||||
return new java.util.ArrayList<>(); // 返回空列表而不是查询数据库
|
return new java.util.ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<RequestFormQueryDto> requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate, status, null);
|
List<RequestFormQueryDto> requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate,null,null);
|
||||||
for (RequestFormQueryDto requestFormQueryDto : requestFormList) {
|
for (RequestFormQueryDto requestFormQueryDto : requestFormList) {
|
||||||
// 查询处方详情
|
// 查询处方详情
|
||||||
List<RequestFormDetailQueryDto> requestFormDetail =
|
List<RequestFormDetailQueryDto> requestFormDetail =
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class RequestFormManageController {
|
|||||||
if (encounterId == null) {
|
if (encounterId == null) {
|
||||||
return R.fail("就诊ID不能为空");
|
return R.fail("就诊ID不能为空");
|
||||||
}
|
}
|
||||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROOF.getCode(), startDate, endDate, status));
|
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROOF.getCode(), startDate, endDate));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=histest&characterEncoding=UTF-8&client_encoding=UTF-8
|
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=histest1&characterEncoding=UTF-8&client_encoding=UTF-8
|
||||||
username: postgresql
|
username: postgresql
|
||||||
password: Jchl1528
|
password: Jchl1528
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
|
|||||||
@@ -89,11 +89,15 @@
|
|||||||
cs.apply_doctor_name AS apply_doctor_name,
|
cs.apply_doctor_name AS apply_doctor_name,
|
||||||
drf.create_time AS apply_time,
|
drf.create_time AS apply_time,
|
||||||
os.surgery_nature AS surgeryType,
|
os.surgery_nature AS surgeryType,
|
||||||
|
fc.contract_name AS feeType,
|
||||||
COALESCE(pi.identifier_no, ap.bus_no, '') AS identifierNo
|
COALESCE(pi.identifier_no, ap.bus_no, '') AS identifierNo
|
||||||
FROM op_schedule os
|
FROM op_schedule os
|
||||||
LEFT JOIN adm_patient ap ON os.patient_id = ap.id
|
LEFT JOIN adm_patient ap ON os.patient_id = ap.id
|
||||||
INNER JOIN cli_surgery cs ON os.oper_code = cs.surgery_no AND cs.delete_flag = '0'
|
INNER JOIN cli_surgery cs ON os.oper_code = cs.surgery_no AND cs.delete_flag = '0'
|
||||||
LEFT JOIN adm_organization o ON cs.org_id = o.id
|
LEFT JOIN adm_organization o ON cs.org_id = o.id
|
||||||
|
LEFT JOIN adm_encounter ae ON ae.id = cs.encounter_id AND ae.delete_flag = '0'
|
||||||
|
LEFT JOIN adm_account aa ON aa.encounter_id = ae.id AND aa.delete_flag = '0'
|
||||||
|
LEFT JOIN fin_contract fc ON fc.bus_no = aa.contract_no AND fc.delete_flag = '0'
|
||||||
LEFT JOIN doc_request_form drf ON drf.prescription_no=cs.surgery_no
|
LEFT JOIN doc_request_form drf ON drf.prescription_no=cs.surgery_no
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT patient_id, identifier_no
|
SELECT patient_id, identifier_no
|
||||||
|
|||||||
@@ -98,9 +98,6 @@
|
|||||||
INNER JOIN adm_organization_location AS T6 ON T6.distribution_category_code = t1.category_code AND T6.delete_flag = '0' AND T6.item_code = '1' AND T6.organization_id = #{organizationId} AND (CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time)
|
INNER JOIN adm_organization_location AS T6 ON T6.distribution_category_code = t1.category_code AND T6.delete_flag = '0' AND T6.item_code = '1' AND T6.organization_id = #{organizationId} AND (CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time)
|
||||||
WHERE t1.delete_flag = '0'
|
WHERE t1.delete_flag = '0'
|
||||||
AND T2.status_enum = #{statusEnum}
|
AND T2.status_enum = #{statusEnum}
|
||||||
<if test="pricingFlag == 1">
|
|
||||||
AND 1 = 2
|
|
||||||
</if>
|
|
||||||
<if test="categoryCode != null and categoryCode != ''">
|
<if test="categoryCode != null and categoryCode != ''">
|
||||||
<!-- 🔧 BugFix: 支持两种匹配方式 -->
|
<!-- 🔧 BugFix: 支持两种匹配方式 -->
|
||||||
<!-- 1. 直接匹配:distribution_category_code = category_code(都是数字代码) -->
|
<!-- 1. 直接匹配:distribution_category_code = category_code(都是数字代码) -->
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
drf.desc_json,
|
drf.desc_json,
|
||||||
drf.requester_id,
|
drf.requester_id,
|
||||||
drf.create_time,
|
drf.create_time,
|
||||||
drf.status,
|
|
||||||
ap.NAME AS patient_name
|
ap.NAME AS patient_name
|
||||||
FROM doc_request_form AS drf
|
FROM doc_request_form AS drf
|
||||||
LEFT JOIN adm_encounter AS ae ON ae.ID = drf.encounter_id
|
LEFT JOIN adm_encounter AS ae ON ae.ID = drf.encounter_id
|
||||||
@@ -28,9 +27,6 @@
|
|||||||
<if test="endDate != null and endDate != ''">
|
<if test="endDate != null and endDate != ''">
|
||||||
AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second')
|
AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second')
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
|
||||||
AND drf.status = #{status}::integer
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRequestFormDetail" resultType="com.openhis.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
<select id="getRequestFormDetail" resultType="com.openhis.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
||||||
|
|||||||
@@ -187,6 +187,12 @@ public class OpSchedule extends HisBaseEntity {
|
|||||||
/** 沟通信息 */
|
/** 沟通信息 */
|
||||||
private String communicationInfo;
|
private String communicationInfo;
|
||||||
|
|
||||||
|
/** 是否外请专家 1-是 0-否 */
|
||||||
|
private Integer isExternalExpert;
|
||||||
|
|
||||||
|
/** 外请专家姓名 */
|
||||||
|
private String externalExpertName;
|
||||||
|
|
||||||
/** 备注信息 */
|
/** 备注信息 */
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ const queryParams = ref({
|
|||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
adviceTypes: '1,2,3',
|
adviceTypes: '1,2,3',
|
||||||
|
categoryCode: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
// 节流函数 - 与V1.3一致:300ms,首次立即响应
|
// 节流函数 - 与V1.3一致:300ms,首次立即响应
|
||||||
@@ -148,6 +149,7 @@ watch(
|
|||||||
} else {
|
} else {
|
||||||
queryParams.value.adviceTypes = '1,2,3';
|
queryParams.value.adviceTypes = '1,2,3';
|
||||||
}
|
}
|
||||||
|
queryParams.value.categoryCode = newValue.categoryCode || '';
|
||||||
throttledGetList();
|
throttledGetList();
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
@@ -175,6 +177,12 @@ function getList() {
|
|||||||
const types = adviceTypes.split(',').map(t => parseInt(t));
|
const types = adviceTypes.split(',').map(t => parseInt(t));
|
||||||
filteredData = filteredData.filter(item => types.includes(item.adviceType));
|
filteredData = filteredData.filter(item => types.includes(item.adviceType));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据 categoryCode 过滤(如西药='2',中成药='1')
|
||||||
|
const categoryCode = queryParams.value.categoryCode;
|
||||||
|
if (categoryCode) {
|
||||||
|
filteredData = filteredData.filter(item => String(item.categoryCode) === String(categoryCode));
|
||||||
|
}
|
||||||
|
|
||||||
// 根据搜索关键词过滤
|
// 根据搜索关键词过滤
|
||||||
if (searchKey && searchKey.length >= 1) {
|
if (searchKey && searchKey.length >= 1) {
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ const finishCallPatient = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await completeEncounter(currentCallPatient.value.encounterId);
|
await completeEncounter({ encounterId: currentCallPatient.value.encounterId, firstEnum: currentCallPatient.value.firstEnum || 1 });
|
||||||
emit('finish');
|
emit('finish');
|
||||||
emit('update:dialogVisible', false);
|
emit('update:dialogVisible', false);
|
||||||
ElMessage.success('患者已完诊');
|
ElMessage.success('患者已完诊');
|
||||||
|
|||||||
@@ -918,6 +918,13 @@ function handleSave() {
|
|||||||
ElMessage.warning('请至少选择一个检查明细项目');
|
ElMessage.warning('请至少选择一个检查明细项目');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 检查每个项目是否已选择检查方法
|
||||||
|
const itemsWithoutMethod = selectedItems.value.filter(item => !item.selectedMethod);
|
||||||
|
if (itemsWithoutMethod.length > 0) {
|
||||||
|
const names = itemsWithoutMethod.map(item => item.name).join('、');
|
||||||
|
ElMessage.warning(`以下项目未选择检查方法:${names},请在右侧勾选后再保存`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 从已选项目推导检查类型编码(取第一个项目的 checkType,如 CT / ECG / GI)
|
// 从已选项目推导检查类型编码(取第一个项目的 checkType,如 CT / ECG / GI)
|
||||||
const firstCheckType = selectedItems.value[0]?.checkType || 'unknown';
|
const firstCheckType = selectedItems.value[0]?.checkType || 'unknown';
|
||||||
form.examTypeCode = firstCheckType;
|
form.examTypeCode = firstCheckType;
|
||||||
@@ -1105,12 +1112,6 @@ async function handleItemSelect(checked, item, cat) {
|
|||||||
form.performDeptCode = cat.performDeptName;
|
form.performDeptCode = cat.performDeptName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果有且仅有一个检查方法,自动选中并更新显示
|
|
||||||
if (methods.length === 1) {
|
|
||||||
const lastIdx = selectedItems.value.length - 1;
|
|
||||||
selectedItems.value[lastIdx].selectedMethod = methods[0];
|
|
||||||
updateMethodDisplay(); // Bug #384修复: 联动更新显示
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
const idx = selectedItems.value.findIndex(s => s.id === item.id);
|
const idx = selectedItems.value.findIndex(s => s.id === item.id);
|
||||||
if (idx > -1) selectedItems.value.splice(idx, 1);
|
if (idx > -1) selectedItems.value.splice(idx, 1);
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const encounterId = ref();
|
const encounterId = ref();
|
||||||
|
const firstEnum = ref(1); // 初复诊标识:1=初诊,2=复诊
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPatientList();
|
getPatientList();
|
||||||
});
|
});
|
||||||
@@ -127,6 +128,7 @@ function getPatientList() {
|
|||||||
|
|
||||||
function clickRow(row) {
|
function clickRow(row) {
|
||||||
encounterId.value = row.encounterId;
|
encounterId.value = row.encounterId;
|
||||||
|
firstEnum.value = row.firstEnum ?? row.first_enum ?? 1;
|
||||||
emits('cellClick', row);
|
emits('cellClick', row);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +184,7 @@ function handleComplete() {
|
|||||||
}
|
}
|
||||||
proxy.$modal.confirm('是否完成该患者问诊?').then(() => {
|
proxy.$modal.confirm('是否完成该患者问诊?').then(() => {
|
||||||
proxy.$modal.loading();
|
proxy.$modal.loading();
|
||||||
completeEncounter(encounterId.value).then(() => {
|
completeEncounter({ encounterId: encounterId.value, firstEnum: firstEnum.value }).then(() => {
|
||||||
proxy.$modal.closeLoading();
|
proxy.$modal.closeLoading();
|
||||||
proxy.$modal.msgSuccess('完成问诊成功');
|
proxy.$modal.msgSuccess('完成问诊成功');
|
||||||
getPatientList();
|
getPatientList();
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
|
|
||||||
<!-- 手术单号 -->
|
<!-- 手术单号 -->
|
||||||
<el-table-column label="手术单号" align="center" width="150">
|
<el-table-column label="手术单号" align="center" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -33,29 +33,31 @@
|
|||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 申请日期 -->
|
<!-- 申请日期 -->
|
||||||
<el-table-column label="申请日期" align="center" prop="createTime" width="180">
|
<el-table-column label="申请日期" align="center" prop="createTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 患者姓名 -->
|
<!-- 患者姓名 -->
|
||||||
<el-table-column label="患者姓名" align="center" prop="patientName" width="100" />
|
<el-table-column label="患者姓名" align="center" prop="patientName" width="100" />
|
||||||
|
|
||||||
<!-- 申请医生 -->
|
<!-- 申请医生 -->
|
||||||
<el-table-column label="申请医生" align="center" prop="applyDoctorName" width="100" />
|
<el-table-column label="申请医生" align="center" prop="applyDoctorName" width="100" />
|
||||||
|
|
||||||
<!-- 申请科室 -->
|
<!-- 申请科室 -->
|
||||||
<el-table-column label="申请科室" align="center" prop="applyDeptName" width="120" show-overflow-tooltip />
|
<el-table-column label="申请科室" align="center" prop="applyDeptName" width="120" show-overflow-tooltip />
|
||||||
|
|
||||||
<!-- 手术名称 -->
|
<!-- 手术名称 -->
|
||||||
<el-table-column label="手术名称" align="center" prop="surgeryName" min-width="150" show-overflow-tooltip />
|
<el-table-column label="手术名称" align="center" prop="surgeryName" min-width="150" show-overflow-tooltip />
|
||||||
|
|
||||||
<!-- 手术等级 -->
|
<!-- 手术等级 -->
|
||||||
<el-table-column label="手术等级" align="center" prop="surgeryLevel_dictText" width="100" />
|
<el-table-column label="手术等级" align="center" prop="surgeryLevel_dictText" width="100" />
|
||||||
|
|
||||||
|
<!-- 手术室确认时间 -->
|
||||||
|
|
||||||
<el-table-column label="手术室确认时间" align="center" prop="operatingRoomConfirmTime" width="180">
|
<el-table-column label="手术室确认时间" align="center" prop="operatingRoomConfirmTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.operatingRoomConfirmTime ? parseTime(scope.row.operatingRoomConfirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
|
{{ scope.row.operatingRoomConfirmTime ? parseTime(scope.row.operatingRoomConfirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
|
||||||
@@ -73,16 +75,16 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 操作 -->
|
<!-- 操作 -->
|
||||||
<el-table-column label="操作" align="center" width="200" fixed="right">
|
<el-table-column label="操作" align="center" width="200" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 查看:显示手术申请详情(只读模式) -->
|
<!-- 查看:显示手术申请详情(只读模式) -->
|
||||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||||
|
|
||||||
<!-- 编辑:修改手术申请信息(只有状态为新开的能修改) -->
|
<!-- 编辑:修改手术申请信息(只有状态为新开的能修改) -->
|
||||||
<el-button link type="primary" icon="Edit" @click="handleEdit(scope.row)" v-if="scope.row.statusEnum === 0">编辑</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleEdit(scope.row)" v-if="scope.row.statusEnum === 0">编辑</el-button>
|
||||||
|
|
||||||
<!-- 删除:取消手术申请(作废) -->
|
<!-- 删除:取消手术申请(作废) -->
|
||||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-if="scope.row.statusEnum === 0 || scope.row.statusEnum === 1">删除</el-button>
|
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-if="scope.row.statusEnum === 0 || scope.row.statusEnum === 1">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -509,6 +511,10 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
|
const surgeryLoading = ref(false)
|
||||||
|
const anesthesiaLoading = ref(false)
|
||||||
|
let surgerySearchTimer = null
|
||||||
|
let anesthesiaSearchTimer = null
|
||||||
const surgeryList = ref([])
|
const surgeryList = ref([])
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
const viewOpen = ref(false)
|
const viewOpen = ref(false)
|
||||||
|
|||||||
@@ -103,8 +103,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
<el-table-column prop="requesterId_dictText" label="申请者" width="120" />
|
||||||
<el-table-column label="操作" align="center" fixed="right">
|
<el-table-column label="操作" align="center" fixed="right" width="160">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<template v-if="scope.row.billStatus == 0 || scope.row.status == 0">
|
||||||
|
<el-button link type="primary" @click="handleEdit(scope.row)">修改</el-button>
|
||||||
|
<el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="scope.row.billStatus == 1 || scope.row.status == 1">
|
||||||
|
<el-button link type="warning" @click="handleWithdraw(scope.row)">撤回</el-button>
|
||||||
|
</template>
|
||||||
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
<el-button link type="primary" @click="handleViewDetail(scope.row)">详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -181,8 +188,8 @@
|
|||||||
import {computed, getCurrentInstance, ref, watch} from 'vue';
|
import {computed, getCurrentInstance, ref, watch} from 'vue';
|
||||||
import {Refresh, Search} from '@element-plus/icons-vue';
|
import {Refresh, Search} from '@element-plus/icons-vue';
|
||||||
import {patientInfo} from '../../store/patient.js';
|
import {patientInfo} from '../../store/patient.js';
|
||||||
import {getInspection} from './api';
|
import {getInspection, deleteRequestForm, withdrawRequestForm} from './api';
|
||||||
import {getDepartmentList} from '@/api/public.js';
|
import {getOrgList} from '@/views/doctorstation/components/api.js';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
@@ -353,11 +360,13 @@ const getLocationInfo = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const recursionFun = (targetDepartment) => {
|
const recursionFun = (targetDepartment) => {
|
||||||
|
if (!targetDepartment) return '';
|
||||||
let name = '';
|
let name = '';
|
||||||
for (let index = 0; index < orgOptions.value.length; index++) {
|
for (let index = 0; index < orgOptions.value.length; index++) {
|
||||||
const obj = orgOptions.value[index];
|
const obj = orgOptions.value[index];
|
||||||
if (obj.id == targetDepartment) {
|
if (obj.id == targetDepartment) {
|
||||||
name = obj.name;
|
name = obj.name;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
const subObjArray = obj['children'];
|
const subObjArray = obj['children'];
|
||||||
if (subObjArray && subObjArray.length > 0) {
|
if (subObjArray && subObjArray.length > 0) {
|
||||||
@@ -365,9 +374,11 @@ const recursionFun = (targetDepartment) => {
|
|||||||
const item = subObjArray[i];
|
const item = subObjArray[i];
|
||||||
if (item.id == targetDepartment) {
|
if (item.id == targetDepartment) {
|
||||||
name = item.name;
|
name = item.name;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (name) break;
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
};
|
};
|
||||||
@@ -385,7 +396,6 @@ const handleViewDetail = async (row) => {
|
|||||||
const obj = JSON.parse(row.descJson);
|
const obj = JSON.parse(row.descJson);
|
||||||
obj.targetDepartment = recursionFun(obj.targetDepartment);
|
obj.targetDepartment = recursionFun(obj.targetDepartment);
|
||||||
descJsonData.value = obj;
|
descJsonData.value = obj;
|
||||||
// descJsonData.value = JSON.parse(row.descJson);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('解析 descJson 失败:', e);
|
console.error('解析 descJson 失败:', e);
|
||||||
descJsonData.value = null;
|
descJsonData.value = null;
|
||||||
@@ -396,6 +406,61 @@ const handleViewDetail = async (row) => {
|
|||||||
detailDialogVisible.value = true;
|
detailDialogVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改检验申请单(待签发状态)
|
||||||
|
*/
|
||||||
|
const handleEdit = (row) => {
|
||||||
|
// 复用详情查看逻辑,后续可扩展为打开编辑弹窗
|
||||||
|
handleViewDetail(row);
|
||||||
|
proxy.$modal?.msgInfo?.('修改功能待接入,请通过详情弹窗查看后重新开立');
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验申请单(仅待签发状态可删除)
|
||||||
|
*/
|
||||||
|
const handleDelete = async (row) => {
|
||||||
|
try {
|
||||||
|
await proxy.$modal?.confirm?.(`确定要删除申请单 "${row.prescriptionNo}" 吗?此操作不可恢复。`);
|
||||||
|
} catch {
|
||||||
|
return; // 用户取消
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await deleteRequestForm({ prescriptionNo: row.prescriptionNo });
|
||||||
|
if (res?.code === 200) {
|
||||||
|
proxy.$modal?.msgSuccess?.('删除成功');
|
||||||
|
await fetchData();
|
||||||
|
} else {
|
||||||
|
proxy.$modal?.msgError?.(res?.msg || '删除失败');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
proxy.$modal?.msgError?.(e.message || '删除异常');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤回检验申请单(已签发状态撤回至待签发)
|
||||||
|
*/
|
||||||
|
const handleWithdraw = async (row) => {
|
||||||
|
try {
|
||||||
|
await proxy.$modal?.confirm?.(`确定要撤回申请单 "${row.prescriptionNo}" 吗?撤回后将恢复为待签发状态。`);
|
||||||
|
} catch {
|
||||||
|
return; // 用户取消
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await withdrawRequestForm({ prescriptionNo: row.prescriptionNo });
|
||||||
|
if (res?.code === 200) {
|
||||||
|
proxy.$modal?.msgSuccess?.('撤回成功');
|
||||||
|
await fetchData();
|
||||||
|
} else {
|
||||||
|
proxy.$modal?.msgError?.(res?.msg || '撤回失败');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
proxy.$modal?.msgError?.(e.message || '撤回异常');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => patientInfo.value?.encounterId,
|
() => patientInfo.value?.encounterId,
|
||||||
async (val) => {
|
async (val) => {
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ const showApplicationFormDialog = (name) => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
applicationFormName.value = components.value[name];
|
applicationFormName.value = components.value[name];
|
||||||
applicationFormDialogVisible.value = true;
|
applicationFormDialogVisible.value = true;
|
||||||
|
// 列表(项目列表)
|
||||||
|
applicationFormNameRef?.value.getList?.();
|
||||||
// 科室列表
|
// 科室列表
|
||||||
applicationFormNameRef?.value.getLocationInfo();
|
applicationFormNameRef?.value.getLocationInfo();
|
||||||
// 诊断目录列表
|
// 诊断目录列表
|
||||||
@@ -121,6 +123,8 @@ const showApplicationFormDialog = (name) => {
|
|||||||
applicationFormName.value = components.value[name];
|
applicationFormName.value = components.value[name];
|
||||||
applicationFormDialogVisible.value = true;
|
applicationFormDialogVisible.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
// 列表(项目列表)
|
||||||
|
applicationFormNameRef?.value.getList?.();
|
||||||
// 科室列表
|
// 科室列表
|
||||||
applicationFormNameRef?.value.getLocationInfo();
|
applicationFormNameRef?.value.getLocationInfo();
|
||||||
// 诊断目录列表
|
// 诊断目录列表
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
import {getCurrentInstance, onBeforeMount, onMounted, reactive, watch} from 'vue';
|
import {getCurrentInstance, onBeforeMount, onMounted, reactive, watch} from 'vue';
|
||||||
import {patientInfo} from '../../../store/patient.js';
|
import {patientInfo} from '../../../store/patient.js';
|
||||||
import {getApplicationList, saveInspection} from './api';
|
import {getApplicationList, saveInspection} from './api';
|
||||||
import {getDepartmentList} from '@/api/public.js';
|
import {getOrgList} from '@/views/doctorstation/components/api.js';
|
||||||
import {getEncounterDiagnosis} from '../../api.js';
|
import {getEncounterDiagnosis} from '../../api.js';
|
||||||
import {ElMessage} from 'element-plus';
|
import {ElMessage} from 'element-plus';
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ onMounted(() => {
|
|||||||
* type(1:watch监听类型 2:点击保存类型)
|
* type(1:watch监听类型 2:点击保存类型)
|
||||||
* selectProjectIds(选中项目的id数组)
|
* selectProjectIds(选中项目的id数组)
|
||||||
* */
|
* */
|
||||||
const projectWithDepartment = (selectProjectIds, type) => {
|
const projectWithDepartment = (selectProjectIds) => {
|
||||||
//1.获取选中的项目 2.判断项目的执行科室是否相同 3.判断执行科室是否配置 4.将项目的执行科室复值到执行科室下拉选位置
|
//1.获取选中的项目 2.判断项目的执行科室是否相同 3.判断执行科室是否配置 4.将项目的执行科室复值到执行科室下拉选位置
|
||||||
let isRelease = true;
|
let isRelease = true;
|
||||||
// 选中项目的数组
|
// 选中项目的数组
|
||||||
@@ -208,10 +208,8 @@ const projectWithDepartment = (selectProjectIds, type) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type == 1) {
|
if (findItem && isRelease) {
|
||||||
if (isRelease) {
|
form.targetDepartment = findItem.id;
|
||||||
form.targetDepartment = findItem.id;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isRelease;
|
return isRelease;
|
||||||
@@ -272,8 +270,8 @@ const submit = () => {
|
|||||||
};
|
};
|
||||||
/** 查询科室 */
|
/** 查询科室 */
|
||||||
const getLocationInfo = () => {
|
const getLocationInfo = () => {
|
||||||
getDepartmentList().then((res) => {
|
getOrgList().then((res) => {
|
||||||
orgOptions.value = res.data || [];
|
orgOptions.value = res.data.records;
|
||||||
console.log('科室========>', JSON.stringify(orgOptions.value));
|
console.log('科室========>', JSON.stringify(orgOptions.value));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -310,7 +308,7 @@ function getDiagnosisList() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
defineExpose({ state, submit, getLocationInfo, getDiagnosisList });
|
defineExpose({ state, submit, getLocationInfo, getDiagnosisList, getList });
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.LaboratoryTests-container {
|
.LaboratoryTests-container {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -197,7 +197,6 @@
|
|||||||
style="width: 62%"
|
style="width: 62%"
|
||||||
v-model="scope.row.adviceName"
|
v-model="scope.row.adviceName"
|
||||||
placeholder="请选择项目"
|
placeholder="请选择项目"
|
||||||
@input="handleChange"
|
|
||||||
@click="handleFocus(scope.row, scope.$index)"
|
@click="handleFocus(scope.row, scope.$index)"
|
||||||
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
|
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
|
||||||
@keydown="
|
@keydown="
|
||||||
@@ -380,7 +379,7 @@ const form = ref({
|
|||||||
prescriptionList: prescriptionList.value,
|
prescriptionList: prescriptionList.value,
|
||||||
});
|
});
|
||||||
const adviceQueryParams = ref({
|
const adviceQueryParams = ref({
|
||||||
adviceType: 1,
|
adviceType: '',
|
||||||
categoryCode: '', // 初始为空,等待加载配置后动态设置
|
categoryCode: '', // 初始为空,等待加载配置后动态设置
|
||||||
searchKey: '',
|
searchKey: '',
|
||||||
});
|
});
|
||||||
@@ -686,7 +685,7 @@ function loadConfiguredCategories() {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 创建新对象触发响应式更新
|
// 创建新对象触发响应式更新
|
||||||
adviceQueryParams.value = {
|
adviceQueryParams.value = {
|
||||||
adviceType: 1,
|
adviceType: '',
|
||||||
categoryCode: defaultCategoryCode,
|
categoryCode: defaultCategoryCode,
|
||||||
searchKey: '',
|
searchKey: '',
|
||||||
};
|
};
|
||||||
@@ -802,8 +801,10 @@ function clickRowDb(row, column, event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
row.showPopover = false;
|
row.showPopover = false;
|
||||||
// “待签发(已保存 requestId存在)”不允许再编辑;仅“待保存(无requestId)”允许编辑
|
// 允许所有 statusEnum==1 的医嘱进入编辑:
|
||||||
if (row.statusEnum == 1 && !row.requestId) {
|
// 1. 新医嘱(无 requestId):待保存
|
||||||
|
// 2. 护士退回医嘱(有 requestId):退回后状态重置为 DRAFT(1),需允许医生编辑修改后重新签发
|
||||||
|
if (row.statusEnum == 1) {
|
||||||
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
||||||
row.therapyEnum = String(row.therapyEnum ?? '1');
|
row.therapyEnum = String(row.therapyEnum ?? '1');
|
||||||
row.isEdit = true;
|
row.isEdit = true;
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ const activeNames = ref([]);
|
|||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const prescriptionList = ref([]);
|
const prescriptionList = ref([]);
|
||||||
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
|
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
|
||||||
const therapyEnum = ref(undefined);
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const chooseAll = ref(false);
|
const chooseAll = ref(false);
|
||||||
@@ -190,6 +189,10 @@ const props = defineProps({
|
|||||||
deadline: {
|
deadline: {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
therapyEnum: {
|
||||||
|
type: Number,
|
||||||
|
default: undefined,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleGetPrescription() {
|
function handleGetPrescription() {
|
||||||
@@ -200,7 +203,7 @@ function handleGetPrescription() {
|
|||||||
encounterIds: encounterIds,
|
encounterIds: encounterIds,
|
||||||
pageSize: 10000,
|
pageSize: 10000,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
therapyEnum: therapyEnum.value,
|
therapyEnum: props.therapyEnum,
|
||||||
exeStatus: props.exeStatus,
|
exeStatus: props.exeStatus,
|
||||||
requestStatus: props.requestStatus,
|
requestStatus: props.requestStatus,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
:clearable="false"
|
:clearable="false"
|
||||||
@change="handleGetPrescription"
|
@change="handleGetPrescription"
|
||||||
/>
|
/>
|
||||||
<el-radio-group v-model="therapyEnum" class="ml20" @change="handleRadioChange">
|
<el-radio-group v-model="therapyEnum" class="ml20" @change="handleTherapyChange">
|
||||||
<el-radio :value="undefined">全部</el-radio>
|
<el-radio :value="undefined">全部</el-radio>
|
||||||
<el-radio :value="1">长期</el-radio>
|
<el-radio :value="1">长期</el-radio>
|
||||||
<el-radio :value="2">临时</el-radio>
|
<el-radio :value="2">临时</el-radio>
|
||||||
@@ -79,6 +79,7 @@
|
|||||||
:exeStatus="exeStatus"
|
:exeStatus="exeStatus"
|
||||||
:requestStatus="requestStatus"
|
:requestStatus="requestStatus"
|
||||||
:deadline="deadline"
|
:deadline="deadline"
|
||||||
|
:therapyEnum="therapyEnum"
|
||||||
/>
|
/>
|
||||||
<SummaryMedicineList v-else />
|
<SummaryMedicineList v-else />
|
||||||
<!-- <el-tabs v-model="activeName" class="demo-tabs centered-tabs" @tab-change="handleClick">
|
<!-- <el-tabs v-model="activeName" class="demo-tabs centered-tabs" @tab-change="handleClick">
|
||||||
@@ -120,6 +121,7 @@ const requestStatus = ref(RequestStatus.COMPLETED);
|
|||||||
const chooseAll = ref(false);
|
const chooseAll = ref(false);
|
||||||
const drugType = ref('1');
|
const drugType = ref('1');
|
||||||
const isDetails = ref('1');
|
const isDetails = ref('1');
|
||||||
|
const therapyEnum = ref(undefined);
|
||||||
|
|
||||||
// 存储子组件引用的对象
|
// 存储子组件引用的对象
|
||||||
const prescriptionRefs = ref();
|
const prescriptionRefs = ref();
|
||||||
@@ -175,6 +177,10 @@ function handleRadioChange(value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleTherapyChange() {
|
||||||
|
handleGetPrescription();
|
||||||
|
}
|
||||||
|
|
||||||
function handleExecute() {
|
function handleExecute() {
|
||||||
proxy.$refs['prescriptionRefs'].handleMedicineSummary();
|
proxy.$refs['prescriptionRefs'].handleMedicineSummary();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ function normalizeDayTimeHm(part) {
|
|||||||
return `${h}:${m}`;
|
return `${h}:${m}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleGetPrescription() {
|
function handleGetPrescription(skipAutoSelectAll = false) {
|
||||||
if (patientInfoList.value.length > 0) {
|
if (patientInfoList.value.length > 0) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(',');
|
let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(',');
|
||||||
@@ -430,10 +430,12 @@ function handleGetPrescription() {
|
|||||||
|
|
||||||
// 将分组结果转换为数组形式
|
// 将分组结果转换为数组形式
|
||||||
prescriptionList.value = Object.values(groupedPrescriptions);
|
prescriptionList.value = Object.values(groupedPrescriptions);
|
||||||
// 默认选中全部行
|
// 默认选中全部行(执行后刷新时不自动全选,保持用户操作状态)
|
||||||
nextTick(() => {
|
if (!skipAutoSelectAll) {
|
||||||
defaultSelectAllRows();
|
nextTick(() => {
|
||||||
});
|
defaultSelectAllRows();
|
||||||
|
});
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('医嘱执行-获取处方列表数据处理失败:', error);
|
console.error('医嘱执行-获取处方列表数据处理失败:', error);
|
||||||
prescriptionList.value = [];
|
prescriptionList.value = [];
|
||||||
@@ -469,18 +471,17 @@ function handleExecute() {
|
|||||||
console.log(list, 'list');
|
console.log(list, 'list');
|
||||||
adviceExecute({ exeDate: exeDate.value, adviceExecuteDetailList: list }).then((res) => {
|
adviceExecute({ exeDate: exeDate.value, adviceExecuteDetailList: list }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
handleGetPrescription();
|
// 仅当选中医嘱中包含耗材类医嘱时,才调用耗材批号匹配(排除纯药品医嘱场景)
|
||||||
// 仅当选中医嘱中包含药品/耗材类医嘱时,才调用耗材批号匹配
|
const hasDevice = list.some((item) =>
|
||||||
const hasMedOrDevice = list.some(
|
String(item.adviceTable || '').includes('device'),
|
||||||
(item) =>
|
|
||||||
item.adviceTable === 'med_medication_request' ||
|
|
||||||
String(item.adviceTable || '').includes('device'),
|
|
||||||
);
|
);
|
||||||
if (hasMedOrDevice) {
|
if (hasDevice) {
|
||||||
lotNumberMatch({ encounterIdList: encounterIds }, { skipErrorMsg: true }).catch((error) => {
|
lotNumberMatch({ encounterIdList: encounterIds }, { skipErrorMsg: true }).catch((error) => {
|
||||||
console.warn('lotNumberMatch failed after adviceExecute:', error);
|
console.warn('lotNumberMatch failed after adviceExecute:', error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 刷新列表(不自动全选,保持用户操作前的选择状态)
|
||||||
|
handleGetPrescription(true);
|
||||||
proxy.$modal.msgSuccess(res.msg || '医嘱执行成功');
|
proxy.$modal.msgSuccess(res.msg || '医嘱执行成功');
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError(res.msg || '医嘱执行失败');
|
proxy.$modal.msgError(res.msg || '医嘱执行失败');
|
||||||
@@ -504,7 +505,7 @@ function handleNoExecute() {
|
|||||||
adviceNoExecute({ adviceExecuteDetailList: list }).then((res) => {
|
adviceNoExecute({ adviceExecuteDetailList: list }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$modal.msgSuccess(res.msg || '操作成功');
|
proxy.$modal.msgSuccess(res.msg || '操作成功');
|
||||||
handleGetPrescription();
|
handleGetPrescription(true);
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError(res.msg || '操作失败');
|
proxy.$modal.msgError(res.msg || '操作失败');
|
||||||
}
|
}
|
||||||
@@ -543,7 +544,7 @@ function handleCancel() {
|
|||||||
adviceCancel({ adviceExecuteDetailList: producerIds }).then((res) => {
|
adviceCancel({ adviceExecuteDetailList: producerIds }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$modal.msgSuccess(res.msg || '取消执行成功');
|
proxy.$modal.msgSuccess(res.msg || '取消执行成功');
|
||||||
handleGetPrescription();
|
handleGetPrescription(true);
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError(res.msg || '取消执行失败');
|
proxy.$modal.msgError(res.msg || '取消执行失败');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -829,7 +829,7 @@
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding: 10px">
|
<div style="padding: 10px">
|
||||||
<prescriptionlist :patientInfo="chargePatientInfo" ref="prescriptionRef" />
|
<prescriptionlist v-if="showChargeDialog" :patientInfo="chargePatientInfo" ref="prescriptionRef" />
|
||||||
<div class="overlay" v-if="disabled"></div>
|
<div class="overlay" v-if="disabled"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1136,12 +1136,14 @@ function loadDeptList() {
|
|||||||
const tree = res.data?.records || res.data || []
|
const tree = res.data?.records || res.data || []
|
||||||
deptList.value = flattenOrgTree(tree)
|
deptList.value = flattenOrgTree(tree)
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError('获取科室列表失败')
|
// 权限不足时静默降级,不弹窗阻断(Bug #441)
|
||||||
|
console.warn('科室列表加载失败(可能无权限):', res.message || res.code)
|
||||||
deptList.value = []
|
deptList.value = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
proxy.$modal.msgError('获取科室列表失败')
|
// 网络错误或权限拒绝:静默降级
|
||||||
|
console.warn('科室列表加载失败:', error?.message || error)
|
||||||
deptList.value = []
|
deptList.value = []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1154,12 +1156,14 @@ function loadDoctorList() {
|
|||||||
const records = res.data?.records || []
|
const records = res.data?.records || []
|
||||||
doctorList.value = records.map(mapPractitionerToOption).filter(it => it.code && it.name)
|
doctorList.value = records.map(mapPractitionerToOption).filter(it => it.code && it.name)
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError('获取医生列表失败')
|
// 权限不足时静默降级,不弹窗阻断(Bug #441)
|
||||||
|
console.warn('医生列表加载失败(可能无权限):', res.message || res.code)
|
||||||
doctorList.value = []
|
doctorList.value = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
proxy.$modal.msgError('获取医生列表失败')
|
// 网络错误或权限拒绝:静默降级
|
||||||
|
console.warn('医生列表加载失败:', error?.message || error)
|
||||||
doctorList.value = []
|
doctorList.value = []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1172,12 +1176,14 @@ function loadNurseList() {
|
|||||||
const records = res.data?.records || []
|
const records = res.data?.records || []
|
||||||
nurseList.value = records.map(mapPractitionerToOption).filter(it => it.code && it.name)
|
nurseList.value = records.map(mapPractitionerToOption).filter(it => it.code && it.name)
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError('获取护士列表失败')
|
// 权限不足时静默降级,不弹窗阻断(Bug #441)
|
||||||
|
console.warn('护士列表加载失败(可能无权限):', res.message || res.code)
|
||||||
nurseList.value = []
|
nurseList.value = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
proxy.$modal.msgError('获取护士列表失败')
|
// 网络错误或权限拒绝:静默降级
|
||||||
|
console.warn('护士列表加载失败:', error?.message || error)
|
||||||
nurseList.value = []
|
nurseList.value = []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1190,12 +1196,14 @@ function loadOperatingRoomList() {
|
|||||||
const records = res.data?.records || []
|
const records = res.data?.records || []
|
||||||
operatingRoomList.value = records.map(mapOperatingRoomToOption).filter(it => it.roomCode)
|
operatingRoomList.value = records.map(mapOperatingRoomToOption).filter(it => it.roomCode)
|
||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError('获取手术室列表失败')
|
// 权限不足时静默降级,不弹窗阻断(Bug #441)
|
||||||
|
console.warn('手术室列表加载失败(可能无权限):', res.message || res.code)
|
||||||
operatingRoomList.value = []
|
operatingRoomList.value = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
proxy.$modal.msgError('获取手术室列表失败')
|
// 网络错误或权限拒绝:静默降级
|
||||||
|
console.warn('手术室列表加载失败:', error?.message || error)
|
||||||
operatingRoomList.value = []
|
operatingRoomList.value = []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1404,6 +1412,10 @@ async function handleChargeCharge(row) {
|
|||||||
|
|
||||||
// 关闭计费弹窗
|
// 关闭计费弹窗
|
||||||
function closeChargeDialog() {
|
function closeChargeDialog() {
|
||||||
|
// 先关闭 prescriptionlist 内所有已打开的项目字典 popover
|
||||||
|
if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) {
|
||||||
|
prescriptionRef.value.closeAllPopovers()
|
||||||
|
}
|
||||||
showChargeDialog.value = false
|
showChargeDialog.value = false
|
||||||
chargePatientInfo.value = {}
|
chargePatientInfo.value = {}
|
||||||
chargeSurgeryInfo.value = {}
|
chargeSurgeryInfo.value = {}
|
||||||
@@ -1910,6 +1922,7 @@ function resetForm() {
|
|||||||
allergyRemark: undefined,
|
allergyRemark: undefined,
|
||||||
surgeryNature: undefined,
|
surgeryNature: undefined,
|
||||||
surgerySite: undefined,
|
surgerySite: undefined,
|
||||||
|
incisionType: undefined,
|
||||||
admissionTime: undefined,
|
admissionTime: undefined,
|
||||||
entryTime: undefined,
|
entryTime: undefined,
|
||||||
roomCode: undefined,
|
roomCode: undefined,
|
||||||
|
|||||||
18
sql/bug_462_add_specimen_code_dict.sql
Normal file
18
sql/bug_462_add_specimen_code_dict.sql
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-- Bug #462: 诊疗目录编辑弹窗中"所需标本"下拉框数据加载失败
|
||||||
|
-- 根因: sys_dict_type 表中缺少 specimen_code 字典类型,sys_dict_data 表中缺少对应数据
|
||||||
|
-- 修复: 插入字典类型及7条标本数据
|
||||||
|
|
||||||
|
-- 插入字典类型
|
||||||
|
INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, remark)
|
||||||
|
VALUES ('标本类型', 'specimen_code', '0', 'admin', NOW(), '诊疗项目所需标本类型字典');
|
||||||
|
|
||||||
|
-- 插入标本数据
|
||||||
|
INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, remark)
|
||||||
|
VALUES
|
||||||
|
(1, '血液', '1', 'specimen_code', '0', 'admin', NOW(), '血液标本'),
|
||||||
|
(2, '尿液', '2', 'specimen_code', '0', 'admin', NOW(), '尿液标本'),
|
||||||
|
(3, '粪便', '3', 'specimen_code', '0', 'admin', NOW(), '粪便标本'),
|
||||||
|
(4, '呼吸道', '4', 'specimen_code', '0', 'admin', NOW(), '呼吸道标本'),
|
||||||
|
(5, '无菌体液', '5', 'specimen_code', '0', 'admin', NOW(), '无菌体液标本'),
|
||||||
|
(6, '生殖道', '6', 'specimen_code', '0', 'admin', NOW(), '生殖道标本'),
|
||||||
|
(7, '其他', '7', 'specimen_code', '0', 'admin', NOW(), '其他标本');
|
||||||
Reference in New Issue
Block a user