From d34a314f022eb24568ac2f1b10c5ececfd58c371 Mon Sep 17 00:00:00 2001 From: chenjinyang <1950285536@qq.com> Date: Fri, 6 Feb 2026 17:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=9099=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/clinicalmanage/dto/OpScheduleDto.java | 5 + .../DoctorStationAdviceAppServiceImpl.java | 11 +- .../web/doctorstation/dto/AdviceSaveDto.java | 10 ++ .../SurgicalScheduleAppMapper.xml | 1 + .../openhis/common/enums/GenerateSource.java | 7 +- .../bargain/component/prescriptionlist.vue | 5 + .../src/views/surgicalschedule/index.vue | 160 +++++++++++++++--- 7 files changed, 170 insertions(+), 29 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/dto/OpScheduleDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/dto/OpScheduleDto.java index da6c2a8a..8d017a6b 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/dto/OpScheduleDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/clinicalmanage/dto/OpScheduleDto.java @@ -22,6 +22,11 @@ public class OpScheduleDto extends OpSchedule { */ private String patientName; + /** + * 就诊ID + */ + private Long encounterId; + /** * 性别 */ diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 58d66b77..37552c92 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -629,7 +629,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp chargeItem.setId(adviceSaveDto.getChargeItemId()); // 费用项id chargeItem.setStatusEnum(ChargeItemStatus.DRAFT.getValue()); // 收费状态 chargeItem.setBusNo(AssignSeqEnum.CHARGE_ITEM_NO.getPrefix().concat(medicationRequest.getBusNo())); - chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源 + // 生成来源:如果前端指定了生成来源,使用前端值;否则使用默认的医生开立 + if (adviceSaveDto.getGenerateSourceEnum() != null) { + chargeItem.setGenerateSourceEnum(adviceSaveDto.getGenerateSourceEnum()); + } else { + chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); + } chargeItem.setPrescriptionNo(adviceSaveDto.getPrescriptionNo()); // 处方号 chargeItem.setPatientId(adviceSaveDto.getPatientId()); // 患者 chargeItem.setContextEnum(adviceSaveDto.getAdviceType()); // 类型 @@ -647,6 +652,10 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp chargeItem.setConditionId(adviceSaveDto.getConditionId()); // 诊断id chargeItem.setEncounterDiagnosisId(adviceSaveDto.getEncounterDiagnosisId()); // 就诊诊断id chargeItem.setDispenseId(dispenseId); // 发放ID + // 来源业务单据号:如果前端指定了来源业务单据号,设置该字段 + if (adviceSaveDto.getSourceBillNo() != null) { + chargeItem.setSourceBillNo(adviceSaveDto.getSourceBillNo()); + } chargeItem.setTenantId(tenantId); // 设置租户ID (修复本次报错) chargeItem.setCreateBy(currentUsername); // 设置创建人 chargeItem.setCreateTime(curDate); // 设置创建时间 diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceSaveDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceSaveDto.java index a1eea6d2..9bb6802a 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceSaveDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/AdviceSaveDto.java @@ -235,6 +235,16 @@ public class AdviceSaveDto { @JsonSerialize(using = ToStringSerializer.class) private Long basedOnId; + /** + * 生成来源枚举值 + */ + private Integer generateSourceEnum; + + /** + * 来源业务单据号 + */ + private String sourceBillNo; + /** * 设置默认值 */ diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml index adf68611..d268a842 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/clinicalmanage/SurgicalScheduleAppMapper.xml @@ -29,6 +29,7 @@ cs.apply_dept_id, cs.apply_dept_name, cs.org_id, + cs.encounter_id, o.name AS org_name, cs.main_surgeon_name AS surgeon_name FROM op_schedule os diff --git a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/GenerateSource.java b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/GenerateSource.java index 8b21120d..2f9123f9 100644 --- a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/GenerateSource.java +++ b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/GenerateSource.java @@ -39,7 +39,12 @@ public enum GenerateSource implements HisEnumInterface { /** * 自动滚费 */ - AUTO_ROLL_FEES(5, "5", "自动滚费"); + AUTO_ROLL_FEES(5, "5", "自动滚费"), + + /** + * 手术计费 + */ + SURGERY_BILLING(6, "6", "手术计费"); private final Integer value; private final String code; diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue index 9e4fc423..22e30cec 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue @@ -757,6 +757,11 @@ function handleSaveSign(row, index) { row.dbOpType = row.requestId ? '2' : '1'; row.minUnitQuantity = row.quantity * row.partPercent; row.categoryEnum = row.adviceType + // 如果是手术计费,设置生成来源和来源业务单据号 + if (props.patientInfo.sourceBillNo) { + row.generateSourceEnum = 6; // 手术计费 + row.sourceBillNo = props.patientInfo.sourceBillNo; + } console.log('row', row) savePrescription({ adviceSaveList: [row] }).then((res) => { if (res.code === 200) { diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index 49133650..6b382ec2 100644 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -763,26 +763,64 @@ + + + +
+
+
+ + + {{ + Object.keys(chargePatientInfo).length !== 0 + ? chargePatientInfo.patientName + + ' / ' + + chargePatientInfo.age + + ' / ' + + chargePatientInfo.genderEnum_enumText + + ' / ' + + chargePatientInfo.typeCode_dictText + : '-' + }} + + + {{ Object.keys(chargePatientInfo).length !== 0 ? formatChargeDate(chargePatientInfo.registerTime) : '-' }} + + {{ userStore.name }} + {{ chargeSurgeryInfo.surgeryName }} + +
+
+ +
+
+
+
+