fix(Bug#708): 修复启动脚本openhis旧名引用 + 医嘱校对增加耗材请求支持

- start.sh/start.bat: openhis-application/domain/common → healthlink-his-application/domain/common
- start.sh/start.bat: com.openhis.OpenHisApplication → com.healthlink.his.HealthLinkHisApplication
- AGENTS.md: 修正模块引用名
- AdviceProcessAppServiceImpl: 医嘱校对/驳回增加WOR_DEVICE_REQUEST类型处理
- AdviceProcessAppMapper.xml: 查询增加WOR_DEVICE_REQUEST表关联
- RequestFormDetailQueryDto: 字段修正
- surgeryApplication/surgery vue: 前端适配
This commit is contained in:
2026-06-10 00:26:43 +08:00
parent babf62083a
commit d405e9cb5e
10 changed files with 165 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
# Web Layer - API Controllers
**Module**: `openhis-application/web`
**Module**: `healthlink-his-application/web`
**Role**: API endpoint layer - all REST controllers for frontend communication
## OVERVIEW

View File

@@ -208,6 +208,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
Page<InpatientAdviceDto> inpatientAdvicePage
= adviceProcessAppMapper.selectInpatientAdvicePage(new Page<>(pageNo, pageSize), queryWrapper,
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_SERVICE_REQUEST,
CommonConstants.TableName.WOR_DEVICE_REQUEST,
RequestStatus.DRAFT.getValue(), EncounterActivityStatus.ACTIVE.getValue(), LocationForm.BED.getValue(),
ParticipantType.ADMITTING_DOCTOR.getCode(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
@@ -379,14 +380,17 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
*/
@Override
public R<?> adviceVerify(List<PerformInfoDto> performInfoList) {
// 分别创建两个列表来存储不同类型的请求
// 分别创建列表来存储不同类型的请求
List<PerformInfoDto> serviceRequestList = new ArrayList<>();
List<PerformInfoDto> medRequestList = new ArrayList<>();
List<PerformInfoDto> deviceRequestList = new ArrayList<>();
for (PerformInfoDto item : performInfoList) {
if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(item.getRequestTable())) {
serviceRequestList.add(item);
} else if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(item.getRequestTable())) {
medRequestList.add(item);
} else if (CommonConstants.TableName.WOR_DEVICE_REQUEST.equals(item.getRequestTable())) {
deviceRequestList.add(item);
}
}
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
@@ -425,6 +429,11 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
medicationRequestService.updateCompletedStatusBatch(
medRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate);
}
if (!deviceRequestList.isEmpty()) {
// 更新耗材请求状态已完成
deviceRequestService.updateCompletedStatusBatch(
deviceRequestList.stream().map(PerformInfoDto::getRequestId).toList());
}
return R.ok(null, "校对成功");
}
@@ -436,14 +445,17 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
*/
@Override
public R<?> adviceReject(List<PerformInfoDto> performInfoList) {
// 分别创建两个列表来存储不同类型的请求
// 分别创建列表来存储不同类型的请求
List<PerformInfoDto> serviceRequestList = new ArrayList<>();
List<PerformInfoDto> medRequestList = new ArrayList<>();
List<PerformInfoDto> deviceRequestList = new ArrayList<>();
for (PerformInfoDto item : performInfoList) {
if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(item.getRequestTable())) {
serviceRequestList.add(item);
} else if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(item.getRequestTable())) {
medRequestList.add(item);
} else if (CommonConstants.TableName.WOR_DEVICE_REQUEST.equals(item.getRequestTable())) {
deviceRequestList.add(item);
}
}
// 校验医嘱是否已执行,已执行的医嘱需要先取消执行后才能退回
@@ -493,6 +505,11 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
medicationRequestService.updateDraftStatusBatch(
medRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate, backReason);
}
if (!deviceRequestList.isEmpty()) {
// 更新耗材请求状态待发送
deviceRequestService.updateDraftStatusBatch(
deviceRequestList.stream().map(PerformInfoDto::getRequestId).toList());
}
return R.ok(null, "退回成功");
}

View File

@@ -65,7 +65,8 @@ public interface AdviceProcessAppMapper {
Page<InpatientAdviceDto> selectInpatientAdvicePage(@Param("page") Page<InpatientAdviceDto> page,
@Param(Constants.WRAPPER) QueryWrapper<InpatientAdviceParam> queryWrapper,
@Param("medMedicationRequest") String medMedicationRequest,
@Param("worServiceRequest") String worServiceRequest, @Param("draft") Integer draft,
@Param("worServiceRequest") String worServiceRequest,
@Param("worDeviceRequest") String worDeviceRequest, @Param("draft") Integer draft,
@Param("active") Integer active, @Param("bed") Integer bed, @Param("admittingDoctor") String admittingDoctor,
@Param("personalCashAccount") String personalCashAccount, @Param("billable") Integer billable,
@Param("billed") Integer billed, @Param("refunded") Integer refunded, @Param("imp") Integer imp,

View File

@@ -14,9 +14,9 @@ import java.math.BigDecimal;
public class RequestFormDetailQueryDto {
/**
* 诊疗活动定义IDwor_service_request.activity_id与开立检验时项目字典的 id / adviceDefinitionId 一致,用于编辑回显)
* 诊疗活动定义IDwor_service_request.id与开立检验时项目字典的 id / adviceDefinitionId 一致,用于编辑回显)
*/
private Long activityId;
private Long adviceDefinitionId;
/** 医嘱名称 */
private String adviceName;

View File

@@ -439,6 +439,139 @@
ELSE 1=1 END
AND T1.refund_service_id IS NULL
ORDER BY T1.status_enum )
UNION
( SELECT DISTINCT T1.encounter_id,
T1.tenant_id,
#{worDeviceRequest} AS advice_table,
T1.id AS request_id,
T1.req_authored_time AS start_time,
NULL::timestamp AS end_time,
T1.requester_id AS requester_id,
T1.create_time AS request_time,
NULL::integer AS skin_test_flag,
NULL::integer AS inject_flag,
NULL::bigint AS group_id,
T1.performer_check_id,
T2."name" AS advice_name,
T2.id AS item_id,
NULL::varchar AS volume,
T1.lot_number AS lot_number,
T1.quantity AS quantity,
T1.unit_code AS unit_code,
T1.status_enum AS request_status,
NULL::varchar AS method_code,
T1.rate_code AS rate_code,
NULL::numeric AS dose,
NULL::varchar AS dose_unit_code,
ao1.id AS position_id,
ao1."name" AS position_name,
NULL::integer AS dispense_per_duration,
1::numeric AS part_percent,
ccd."name" AS condition_definition_name,
NULL::integer AS therapy_enum,
NULL::integer AS sort_number,
T1.quantity AS execute_num,
af.day_times,
ae.bus_no,
ap."name" AS patient_name,
al2."name" AS bed_name,
ap.gender_enum,
ap.birth_date,
ap.id AS patient_id,
fc.contract_name,
diagnosis.condition_names,
pra."name" AS admitting_doctor_name,
personal_account.balance_amount,
personal_account.id AS account_id,
T2.category_code,
NULL::integer AS dispense_status,
NULL::numeric AS unit_price,
NULL::numeric AS total_price,
NULL::bigint AS stopper_id,
NULL::varchar AS stopper_name
FROM wor_device_request AS T1
LEFT JOIN adm_device_definition AS T2
ON T2.id = T1.device_def_id
AND T2.delete_flag = '0'
LEFT JOIN adm_organization AS ao1
ON ao1.id = T1.org_id
AND ao1.delete_flag = '0'
LEFT JOIN cli_condition AS cc
ON cc.id = T1.condition_id
AND cc.delete_flag = '0'
LEFT JOIN cli_condition_definition AS ccd
ON ccd.id = cc.definition_id
AND ccd.delete_flag = '0'
LEFT JOIN adm_encounter ae
ON ae.id = T1.encounter_id
AND ae.class_enum = #{imp}
AND ae.delete_flag = '0'
LEFT JOIN adm_patient ap
ON ae.patient_id = ap.id
AND ap.delete_flag = '0'
LEFT JOIN adm_encounter_location ael
ON ae.id = ael.encounter_id
AND ael.delete_flag = '0'
AND ael.status_enum = #{active}
AND ael.form_enum = #{bed}
LEFT JOIN adm_location al2
ON ael.location_id = al2.id
AND al2.delete_flag = '0'
LEFT JOIN adm_account aa
ON ae.id = aa.encounter_id
AND aa.encounter_flag = 1
AND aa.delete_flag = '0'
LEFT JOIN fin_contract fc
ON aa.contract_no = fc.bus_no
AND fc.delete_flag = '0'
LEFT JOIN ( SELECT aed.encounter_id,
STRING_AGG(ccd.name, ', ') AS condition_names
FROM adm_encounter_diagnosis aed
INNER JOIN cli_condition cc
ON cc.id = aed.condition_id
AND cc.delete_flag = '0'
INNER JOIN cli_condition_definition ccd
ON ccd.id = cc.definition_id
AND ccd.delete_flag = '0'
WHERE aed.delete_flag = '0'
GROUP BY aed.encounter_id
) AS diagnosis
ON ae.id = diagnosis.encounter_id
LEFT JOIN adm_encounter_participant aep
ON ae.id = aep.encounter_id
AND aep.delete_flag = '0'
AND aep.status_enum = #{active}
AND aep.type_code = #{admittingDoctor}
LEFT JOIN adm_practitioner pra
ON aep.practitioner_id = pra.id
AND pra.delete_flag = '0'
LEFT JOIN ( SELECT aa.id,
aa.encounter_id,
(aa.balance_amount -
COALESCE(SUM(CASE WHEN aci.status_enum IN (#{billed}, #{billable})
THEN aci.total_price ELSE 0 END), 0) +
COALESCE(SUM(CASE WHEN aci.status_enum = #{refunded}
THEN aci.total_price ELSE 0 END), 0)) AS balance_amount
FROM adm_account aa
LEFT JOIN adm_charge_item aci
ON aa.encounter_id = aci.encounter_id
AND aa.delete_flag = '0'
WHERE aa.type_code = #{personalCashAccount}
AND aa.delete_flag = '0'
GROUP BY aa.id,
aa.encounter_id,
aa.balance_amount
) AS personal_account
ON personal_account.encounter_id = ae.id
LEFT JOIN adm_frequency af
ON af.rate_code = T1.rate_code
AND af.delete_flag = '0'
WHERE T1.delete_flag = '0'
AND T1.generate_source_enum = #{doctorPrescription}
AND CASE WHEN T1.status_enum = #{draft}
THEN FALSE
ELSE TRUE END
ORDER BY T1.status_enum )
) AS ii
${ew.customSqlSegment}
</select>

View File

@@ -140,7 +140,7 @@
</select>
<select id="getRequestFormDetail" resultType="com.healthlink.his.web.regdoctorstation.dto.RequestFormDetailQueryDto">
SELECT wsr.activity_id AS activity_id,
SELECT wsr.activity_id AS advice_definition_id,
wsr.quantity,
wsr.unit_code,
COALESCE(wad.NAME, wsr.content_json::jsonb->>'surgeryName') AS advice_name,

View File

@@ -4,7 +4,7 @@ rem 设置项目根目录
set PROJECT_ROOT=%~dp0
rem 设置classpath
set CLASSPATH=%PROJECT_ROOT%openhis-application\target\classes;%PROJECT_ROOT%openhis-domain\target\classes;%PROJECT_ROOT%openhis-common\target\classes;%PROJECT_ROOT%core-admin\target\classes;%PROJECT_ROOT%core-framework\target\classes;%PROJECT_ROOT%core-system\target\classes;%PROJECT_ROOT%core-quartz\target\classes;%PROJECT_ROOT%core-generator\target\classes;%PROJECT_ROOT%core-flowable\target\classes;%PROJECT_ROOT%core-common\target\classes
set CLASSPATH=%PROJECT_ROOT%healthlink-his-application\target\classes;%PROJECT_ROOT%healthlink-his-domain\target\classes;%PROJECT_ROOT%healthlink-his-common\target\classes;%PROJECT_ROOT%core-admin\target\classes;%PROJECT_ROOT%core-framework\target\classes;%PROJECT_ROOT%core-system\target\classes;%PROJECT_ROOT%core-quartz\target\classes;%PROJECT_ROOT%core-generator\target\classes;%PROJECT_ROOT%core-flowable\target\classes;%PROJECT_ROOT%core-common\target\classes
rem 启动应用
java -cp "%CLASSPATH%" com.openhis.OpenHisApplication
java -cp "%CLASSPATH%" com.healthlink.his.HealthLinkHisApplication

View File

@@ -4,10 +4,10 @@
PROJECT_ROOT=$(pwd)
# 设置classpath
CLASSPATH="$PROJECT_ROOT/openhis-application/target/classes:$PROJECT_ROOT/openhis-domain/target/classes:$PROJECT_ROOT/openhis-common/target/classes:$PROJECT_ROOT/core-admin/target/classes:$PROJECT_ROOT/core-framework/target/classes:$PROJECT_ROOT/core-system/target/classes:$PROJECT_ROOT/core-quartz/target/classes:$PROJECT_ROOT/core-generator/target/classes:$PROJECT_ROOT/core-flowable/target/classes:$PROJECT_ROOT/core-common/target/classes"
CLASSPATH="$PROJECT_ROOT/healthlink-his-application/target/classes:$PROJECT_ROOT/healthlink-his-domain/target/classes:$PROJECT_ROOT/healthlink-his-common/target/classes:$PROJECT_ROOT/core-admin/target/classes:$PROJECT_ROOT/core-framework/target/classes:$PROJECT_ROOT/core-system/target/classes:$PROJECT_ROOT/core-quartz/target/classes:$PROJECT_ROOT/core-generator/target/classes:$PROJECT_ROOT/core-flowable/target/classes:$PROJECT_ROOT/core-common/target/classes"
# 添加所有依赖jar包
export CLASSPATH="$CLASSPATH:$(find $PROJECT_ROOT/openhis-application/target/dependency -name '*.jar' | tr '\n' ':')"
export CLASSPATH="$CLASSPATH:$(find $PROJECT_ROOT/healthlink-his-application/target/dependency -name '*.jar' | tr '\n' ':')"
# 启动应用
java -cp "$CLASSPATH" com.openhis.OpenHisApplication
java -cp "$CLASSPATH" com.healthlink.his.HealthLinkHisApplication

View File

@@ -574,6 +574,7 @@ const handleEdit = async (row) => {
editFormRef.value?.getLocationInfo?.();
editFormRef.value?.getDiagnosisList?.();
editFormRef.value?.loadDoctorOptions?.();
await editFormRef.value?.getList?.();
if (row.requestFormDetailList?.length > 0) {
editFormRef.value?.fillForm?.(
JSON.parse(row.descJson || '{}'),

View File

@@ -420,7 +420,7 @@ const getList = async (key) => {
return;
}
loading.value = true;
getSurgeryPage({
return getSurgeryPage({
pageSize: 1000,
keyword: key || undefined,
})