diff --git a/healthlink-his-server/core-common/src/main/java/com/core/common/utils/SecurityUtils.java b/healthlink-his-server/core-common/src/main/java/com/core/common/utils/SecurityUtils.java index f9aa93980..98604d0a5 100755 --- a/healthlink-his-server/core-common/src/main/java/com/core/common/utils/SecurityUtils.java +++ b/healthlink-his-server/core-common/src/main/java/com/core/common/utils/SecurityUtils.java @@ -21,6 +21,17 @@ import java.util.stream.Collectors; */ public class SecurityUtils { + /** + * 获取医务人员ID + **/ + public static Long getPractitionerId() { + try { + return getLoginUser().getPractitionerId(); + } catch (Exception e) { + throw new ServiceException("获取医务人员ID异常", HttpStatus.UNAUTHORIZED); + } + } + /** * 用户ID **/ diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/appservice/impl/AdjustPriceServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/appservice/impl/AdjustPriceServiceImpl.java index 975e9861b..a83f2eb9e 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/appservice/impl/AdjustPriceServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/adjustprice/appservice/impl/AdjustPriceServiceImpl.java @@ -92,7 +92,7 @@ public class AdjustPriceServiceImpl implements IAdjustPriceService { // 单据号 String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix()); // 当前人 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 根据表单提交的tab 进入不同的 execute if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType) || AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) { @@ -122,7 +122,7 @@ public class AdjustPriceServiceImpl implements IAdjustPriceService { // 单据号 String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix()); // 当前人 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 根据表单提交的tab 进入不同的 execute if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType) || AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) { @@ -156,7 +156,7 @@ public class AdjustPriceServiceImpl implements IAdjustPriceService { @Override public R searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam, Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) { - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); HashSet searchFields = new HashSet<>(); searchFields.add(CommonConstants.FieldName.BusNo); // 构建查询条件 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/appointmentmanage/appservice/impl/DoctorScheduleAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/appointmentmanage/appservice/impl/DoctorScheduleAppServiceImpl.java index 522de7824..96baf6379 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/appointmentmanage/appservice/impl/DoctorScheduleAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/appointmentmanage/appservice/impl/DoctorScheduleAppServiceImpl.java @@ -77,7 +77,7 @@ public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService { String todayStr = LocalDate.now().toString(); // yyyy-MM-dd // 从 SecurityUtils 获取当前登录医生ID - Long currentDoctorId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentDoctorId = SecurityUtils.getPractitionerId(); if (currentDoctorId != null) { List list = doctorScheduleMapper.selectTodayMySchedule(todayStr, diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/LocationAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/LocationAppServiceImpl.java index 3d5709847..a1e16226b 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/LocationAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/LocationAppServiceImpl.java @@ -347,7 +347,7 @@ public class LocationAppServiceImpl implements ILocationAppService { } if (Whether.YES.getCode().equals(isInHospital)) { // 当前登录者的id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); List locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId); queryWrapper.in(Location::getId, locationIds); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/PractitionerAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/PractitionerAppServiceImpl.java index 7ea64c371..d1b8531f6 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/PractitionerAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/basedatamanage/appservice/impl/PractitionerAppServiceImpl.java @@ -489,7 +489,7 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService { @Override public List getSelectableOrgList() { // 参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); return practitionerAppAppMapper.getSelectableOrgList(practitionerId); } @@ -502,7 +502,7 @@ public class PractitionerAppServiceImpl implements IPractitionerAppService { @Override public R switchOrg(Long orgId) { // 参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Practitioner practitioner = new Practitioner(); practitioner.setId(practitionerId); practitioner.setOrgId(orgId); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/ChargeItemFormData.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/ChargeItemFormData.java index 0ab7ad64c..8caece35b 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/ChargeItemFormData.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/ChargeItemFormData.java @@ -82,8 +82,8 @@ public class ChargeItemFormData { this.statusEnum = ChargeItemStatus.PLANNED.getValue(); this.contextEnum = ChargeItemContext.REGISTER.getValue(); this.occurrenceTime = new Date(); - this.performerId = SecurityUtils.getLoginUser().getPractitionerId(); - this.entererId = SecurityUtils.getLoginUser().getPractitionerId(); + this.performerId = SecurityUtils.getPractitionerId(); + this.entererId = SecurityUtils.getPractitionerId(); this.enteredDate = new Date(); this.serviceTable = CommonConstants.TableName.ADM_HEALTHCARE_SERVICE; } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/PricingProjectDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/PricingProjectDto.java index 0c35b13a3..26367ee9d 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/PricingProjectDto.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/chargemanage/dto/PricingProjectDto.java @@ -144,7 +144,7 @@ public class PricingProjectDto { this.statusEnum = RequestStatus.ACTIVE.getValue(); this.categoryEnum = EncounterClass.AMB.getValue(); this.therapyEnum = TherapyTimeType.TEMPORARY.getValue(); - this.practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + this.practitionerId = SecurityUtils.getPractitionerId(); this.orgId = SecurityUtils.getLoginUser().getOrgId(); // 开方人科室 } } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/check/controller/ExamApplyController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/check/controller/ExamApplyController.java index 56a951fbc..28bc6aeb3 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/check/controller/ExamApplyController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/check/controller/ExamApplyController.java @@ -201,7 +201,7 @@ public class ExamApplyController extends BaseController { Integer tenantId = null; String currentUsername = "system"; try { - currentUserId = SecurityUtils.getLoginUser().getPractitionerId(); + currentUserId = SecurityUtils.getPractitionerId(); currentOrgId = SecurityUtils.getLoginUser().getOrgId(); tenantId = SecurityUtils.getLoginUser().getTenantId(); currentUsername = SecurityUtils.getUsername(); @@ -406,7 +406,7 @@ public class ExamApplyController extends BaseController { Integer tenantId = null; String currentUsername = "system"; try { - currentUserId = SecurityUtils.getLoginUser().getPractitionerId(); + currentUserId = SecurityUtils.getPractitionerId(); currentOrgId = SecurityUtils.getLoginUser().getOrgId(); tenantId = SecurityUtils.getLoginUser().getTenantId(); currentUsername = SecurityUtils.getUsername(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgeryAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgeryAppServiceImpl.java index cbee84acb..883c45e9b 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgeryAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/clinicalmanage/appservice/impl/SurgeryAppServiceImpl.java @@ -275,7 +275,7 @@ public class SurgeryAppServiceImpl implements ISurgeryAppService { // 当前登录账号的科室id Long orgId = SecurityUtils.getLoginUser().getOrgId(); // 当前参与者ID - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 当前用户ID Long userId = SecurityUtils.getLoginUser().getUserId(); // 当前时间 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java index 2df47b5bc..c0e7adacc 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/common/appservice/impl/CommonServiceImpl.java @@ -129,7 +129,7 @@ public class CommonServiceImpl implements ICommonService { public List getInventoryPharmacyList() { // 用户id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 根据用户id获得管理库房信息 List locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId); @@ -192,7 +192,7 @@ public class CommonServiceImpl implements ICommonService { @Override public List getInventoryCabinetList() { // 用户id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 根据用户id获得管理库房信息 List locationIds = practitionerRoleService.getLocationIdsByPractitionerId(practitionerId); @@ -465,7 +465,7 @@ public class CommonServiceImpl implements ICommonService { @Override public List getPractitionerWard() { // 获取当前登录用户信息 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Long currentOrgId = SecurityUtils.getLoginUser().getOrgId(); log.info("getPractitionerWard - practitionerId: {}, currentOrgId: {}", practitionerId, currentOrgId); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java index 5084b98ab..8b7d09715 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java @@ -308,7 +308,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { // 如果前端没有传递申请医生ID,使用当前登录用户 if (entity.getRequestingPhysicianId() == null) { - entity.setRequestingPhysicianId(SecurityUtils.getLoginUser().getPractitionerId()); + entity.setRequestingPhysicianId(SecurityUtils.getPractitionerId()); } // 设置邀请对象文本(拼接所有医生名称) @@ -333,7 +333,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { if (Boolean.TRUE.equals(dto.getSubmitFlag())) { entity.setConsultationStatus(ConsultationStatusEnum.SUBMITTED.getCode()); entity.setConfirmingPhysician(SecurityUtils.getLoginUser().getUser().getNickName()); - entity.setConfirmingPhysicianId(SecurityUtils.getLoginUser().getPractitionerId()); + entity.setConfirmingPhysicianId(SecurityUtils.getPractitionerId()); entity.setConfirmingDate(new Date()); } else { entity.setConsultationStatus(ConsultationStatusEnum.NEW.getCode()); @@ -414,7 +414,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { // 设置提交会诊的医生信息 entity.setConfirmingPhysician(SecurityUtils.getLoginUser().getUser().getNickName()); - entity.setConfirmingPhysicianId(SecurityUtils.getLoginUser().getPractitionerId()); + entity.setConfirmingPhysicianId(SecurityUtils.getPractitionerId()); entity.setConfirmingDate(new Date()); consultationRequestMapper.updateById(entity); @@ -731,7 +731,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { public List getMyInvitations() { try { // 获取当前登录医生ID和租户ID - Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentPhysicianId = SecurityUtils.getPractitionerId(); Long tenantId = SecurityUtils.getLoginUser().getTenantId().longValue(); // 查询邀请我的会诊申请 @@ -1266,7 +1266,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { public List getPendingConfirmationList() { try { // 获取当前登录医生ID和租户ID - Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentPhysicianId = SecurityUtils.getPractitionerId(); Long tenantId = SecurityUtils.getLoginUser().getTenantId().longValue(); log.info("获取待确认会诊列表,当前医生ID: {}", currentPhysicianId); @@ -1374,7 +1374,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { } // 2. 获取当前登录医生信息 - Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentPhysicianId = SecurityUtils.getPractitionerId(); String currentPhysicianName = SecurityUtils.getLoginUser().getUser().getNickName(); String currentDeptName = dto.getConfirmingDeptName(); // 前端传递 @@ -1459,7 +1459,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { private void createConfirmationRecord(ConsultationRequest request) { try { // 🎯 获取当前操作的医生信息(最后一个确认的医生) - Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentPhysicianId = SecurityUtils.getPractitionerId(); String currentPhysicianName = SecurityUtils.getLoginUser().getUser().getNickName(); // 查询当前医生的邀请记录(获取科室信息) @@ -1572,7 +1572,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { // 2. 获取当前登录医生信息 - Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentPhysicianId = SecurityUtils.getPractitionerId(); // 3. 查询当前医生的邀请记录 LambdaQueryWrapper invitedWrapper = new LambdaQueryWrapper<>(); @@ -1651,7 +1651,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { } // 2. 获取当前登录医生信息 - Long currentPhysicianId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentPhysicianId = SecurityUtils.getPractitionerId(); String currentPhysicianName = SecurityUtils.getLoginUser().getUser().getNickName(); // 3. 查询当前医生的邀请记录 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 737da6586..26e47d0d8 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -1128,7 +1128,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // 🔧 Bug Fix: 确保practitionerId不为null if (adviceSaveDto.getPractitionerId() == null) { - adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + adviceSaveDto.setPractitionerId(SecurityUtils.getPractitionerId()); log.info("handMedication - 自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId()); } @@ -1615,7 +1615,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // 🔧 Bug Fix: 确保practitionerId不为null if (adviceSaveDto.getPractitionerId() == null) { - adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + adviceSaveDto.setPractitionerId(SecurityUtils.getPractitionerId()); log.info("自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId()); } @@ -2065,7 +2065,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // 🔧 Bug Fix: 确保practitionerId不为null if (adviceSaveDto.getPractitionerId() == null) { - adviceSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + adviceSaveDto.setPractitionerId(SecurityUtils.getPractitionerId()); log.info("handService - 自动补全practitionerId: practitionerId={}", adviceSaveDto.getPractitionerId()); } @@ -2308,7 +2308,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp @Override public R getRequestBaseInfo(Long encounterId, Integer generateSourceEnum, String sourceBillNo) { // 当前账号的参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 未指定generateSourceEnum时,默认只查询医生开立的医嘱 int sourceEnum = (generateSourceEnum != null) ? generateSourceEnum : GenerateSource.DOCTOR_PRESCRIPTION.getValue(); // 医嘱请求数据 @@ -2440,7 +2440,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp @Override public R getRequestHistoryInfo(Long patientId, Long encounterId) { // 当前账号的参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 医嘱请求数据 List requestBaseInfo = doctorStationAdviceAppMapper.getRequestBaseInfo(encounterId, patientId, CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST, diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java index 42bafd7e0..7ff2c6c5b 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java @@ -191,7 +191,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation condition.setYbNo(saveDiagnosisChildParam.getYbNo()); condition.setTcmFlag(Whether.YES.getValue());// 中医标识 condition.setRecordedDatetime(new Date()); - condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人 + condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人 // 设置租户ID,避免数据库约束错误 condition.setTenantId(SecurityUtils.getLoginUser().getTenantId()); // 设置创建人,避免数据库约束错误 @@ -287,7 +287,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation condition.setYbNo(saveDiagnosisChildParam.getYbNo()); condition.setTcmFlag(Whether.YES.getValue());// 中医标识 condition.setRecordedDatetime(new Date()); - condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人 + condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人 // 设置租户ID,避免数据库约束错误 condition.setTenantId(SecurityUtils.getLoginUser().getTenantId()); // 设置创建人,避免数据库约束错误 @@ -659,7 +659,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型 chargeItem.setEncounterId(encounterId); // 就诊id chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID - chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID + chargeItem.setEntererId(SecurityUtils.getPractitionerId());// 开立人ID chargeItem.setRequestingOrgId(orgId); // 开立科室 chargeItem.setEnteredDate(curDate); // 开立时间 chargeItem.setProductTable(activityAdviceBaseDto.getAdviceTableName());// 产品所在表 @@ -712,7 +712,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation */ public R getTcmRequestBaseInfo(Long encounterId) { // 当前账号的参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 医嘱请求数据 List requestBaseInfo = doctorStationChineseMedicalAppMapper.getTcmRequestBaseInfo(encounterId, null, CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST, @@ -739,7 +739,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation @Override public R getTcmRequestHistoryInfo(Long patientId, Long encounterId) { // 当前账号的参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 医嘱请求数据 List requestBaseInfo = doctorStationChineseMedicalAppMapper.getTcmRequestHistoryInfo( encounterId, patientId, CommonConstants.TableName.MED_MEDICATION_REQUEST, diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationDiagnosisAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationDiagnosisAppServiceImpl.java index 8c36be3c5..d290d3388 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationDiagnosisAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationDiagnosisAppServiceImpl.java @@ -232,7 +232,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn condition.setDefinitionId(saveDiagnosisChildParam.getDefinitionId()); condition.setYbNo(saveDiagnosisChildParam.getYbNo()); condition.setRecordedDatetime(new Date()); - condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人 + condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人 // 设置租户ID,避免数据库约束错误 condition.setTenantId(SecurityUtils.getLoginUser().getTenantId()); // 设置创建人,避免数据库约束错误 @@ -328,7 +328,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn condition.setDefinitionId(saveDiagnosisChildParam.getDefinitionId()); condition.setYbNo(saveDiagnosisChildParam.getYbNo()); condition.setRecordedDatetime(new Date()); - condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人 + condition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人 if(condition.getCreateBy() == null){ condition.setCreateBy(username); @@ -435,7 +435,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn this.handleConditionDefinitionMetadata(patientHistoryList); conditionDefinitionBusinessClass.setPatientHistoryList(patientHistoryList); // 医生常用诊断 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); // 当前参与者ID + Long practitionerId = SecurityUtils.getPractitionerId(); // 当前参与者ID List doctorCommonUseList = doctorStationDiagnosisAppMapper.getDoctorCommonUseList(PublicationStatus.ACTIVE.getValue(), practitionerId); this.handleConditionDefinitionMetadata(doctorCommonUseList); @@ -631,7 +631,7 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn log.debug("传染病报告卡数据,DoctorId:{}", infectiousDiseaseReport.getDoctorId()); if (infectiousDiseaseReport.getDoctorId() == null) { // 优先使用 practitionerId,如果没有则使用 userId - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); log.debug("传染病报告卡数据,PractitionerId:{}", practitionerId); if (practitionerId != null) { infectiousDiseaseReport.setDoctorId(practitionerId); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java index ad07d9753..5db74ffc3 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java @@ -199,7 +199,7 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer EncounterParticipant encounterParticipant = new EncounterParticipant(); encounterParticipant.setEncounterId(encounterId); encounterParticipant.setTypeCode(ParticipantType.ADMITTER.getCode());// 接诊医生 - encounterParticipant.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + encounterParticipant.setPractitionerId(SecurityUtils.getPractitionerId()); encounterParticipant.setStatusEnum(EncounterActivityStatus.ACTIVE.getValue()); // 状态 encounterParticipant.setTenantId(tenantId); encounterParticipant.setCreateBy(currentUsername); @@ -570,7 +570,7 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer // 3. 核心更新:改回待诊+更新missed_time Date now = new Date(); - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); int updateCount = encounterMapper.update(null, new LambdaUpdateWrapper() .eq(Encounter::getId, encounterId) diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/ReservationRecordAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/ReservationRecordAppServiceImpl.java index b9b30cd16..f5a4fd897 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/ReservationRecordAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/ReservationRecordAppServiceImpl.java @@ -47,7 +47,7 @@ public class ReservationRecordAppServiceImpl implements IReservationRecordAppSer if (reservationRecordDto.getPractitionerId() != null) { practitionerId = reservationRecordDto.getPractitionerId(); } else { - practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + practitionerId = SecurityUtils.getPractitionerId(); } ReservationRecord reservationRecord = new ReservationRecord(); @@ -80,7 +80,7 @@ public class ReservationRecordAppServiceImpl implements IReservationRecordAppSer if (reservationRecordDto.getPractitionerId() != null) { practitionerId = reservationRecordDto.getPractitionerId(); } else { - practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + practitionerId = SecurityUtils.getPractitionerId(); } ReservationRecord reservationRecord = new ReservationRecord(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/TodayOutpatientServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/TodayOutpatientServiceImpl.java index eae2d48da..62e490061 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/TodayOutpatientServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/appservice/impl/TodayOutpatientServiceImpl.java @@ -41,7 +41,7 @@ public class TodayOutpatientServiceImpl implements ITodayOutpatientService { Long doctorId = SecurityUtils.getLoginUser().getUserId(); Long departmentId = SecurityUtils.getLoginUser().getOrgId(); Integer tenantId = SecurityUtils.getLoginUser().getTenantId(); - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); String today = DateUtil.format(new Date(), "yyyy-MM-dd"); // 获取今日统计信息 @@ -146,7 +146,7 @@ public class TodayOutpatientServiceImpl implements ITodayOutpatientService { queryWrapper.apply("enc.start_time::DATE <= CAST({0} AS DATE)", queryDate); // 添加医生条件 - 查询当前医生的门诊患者 - queryWrapper.eq("ep.practitioner_id", SecurityUtils.getLoginUser().getPractitionerId()); + queryWrapper.eq("ep.practitioner_id", SecurityUtils.getPractitionerId()); // 添加状态条件 if (ObjectUtil.isNotEmpty(statusEnum)) { diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/controller/PendingEmrController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/controller/PendingEmrController.java index 3fc4726dc..fecef6d84 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/controller/PendingEmrController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/controller/PendingEmrController.java @@ -37,7 +37,7 @@ public class PendingEmrController { @RequestParam(defaultValue = "10") Integer pageSize, @RequestParam(required = false) String patientName) { if (doctorId == null) { - doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId(); + doctorId = com.core.common.utils.SecurityUtils.getPractitionerId(); } return iDoctorStationEmrAppService.getPendingEmrList(doctorId, pageNum, pageSize, patientName); } @@ -53,7 +53,7 @@ public class PendingEmrController { public R getPendingEmrCount(@RequestParam(required = false) Long doctorId, @RequestParam(required = false) String patientName) { if (doctorId == null) { - doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId(); + doctorId = com.core.common.utils.SecurityUtils.getPractitionerId(); } return iDoctorStationEmrAppService.getPendingEmrCount(doctorId, patientName); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/dto/AdviceSaveDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/dto/AdviceSaveDto.java index 329ddd8fc..7d4f71f64 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/dto/AdviceSaveDto.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/dto/AdviceSaveDto.java @@ -294,7 +294,7 @@ public class AdviceSaveDto { this.chineseHerbsDoseQuantity = new BigDecimal("1"); // 默认设置为长期医嘱,但前端应该明确传递正确的值 this.therapyEnum = TherapyTimeType.LONG_TERM.getValue(); - this.practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + this.practitionerId = SecurityUtils.getPractitionerId(); this.founderOrgId = SecurityUtils.getLoginUser().getOrgId(); // 开方人科室 } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java index 1d0ee1db5..1594616d6 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/doctorstation/utils/AdviceUtils.java @@ -445,7 +445,7 @@ public class AdviceUtils { serviceRequest.setCategoryEnum(Integer.valueOf(activityAdviceBaseDto.getCategoryCode())); // 请求类型 serviceRequest.setActivityId(activityAdviceBaseDto.getAdviceDefinitionId());// 诊疗定义id serviceRequest.setPatientId(activityChildrenJsonParams.getPatientId()); // 患者 - serviceRequest.setRequesterId(SecurityUtils.getLoginUser().getPractitionerId()); // 开方医生 + serviceRequest.setRequesterId(SecurityUtils.getPractitionerId()); // 开方医生 serviceRequest.setEncounterId(activityChildrenJsonParams.getEncounterId()); // 就诊id serviceRequest.setAuthoredTime(curDate); // 请求签发时间 serviceRequest.setOrgId(organizationId); // 执行科室 @@ -466,7 +466,7 @@ public class AdviceUtils { chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型 chargeItem.setEncounterId(activityChildrenJsonParams.getEncounterId()); // 就诊id chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID - chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID + chargeItem.setEntererId(SecurityUtils.getPractitionerId());// 开立人ID chargeItem.setRequestingOrgId(orgId); // 开立科室 chargeItem.setEnteredDate(curDate); // 开立时间 chargeItem.setServiceTable(CommonConstants.TableName.WOR_SERVICE_REQUEST);// 医疗服务类型 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/ICdssAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/ICdssAppService.java deleted file mode 100644 index 8502ed885..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/ICdssAppService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.healthlink.his.web.infection.appservice; - -import com.healthlink.his.infection.domain.CdssAlert; -import com.healthlink.his.infection.domain.CdssRule; - -import java.util.List; -import java.util.Map; - -public interface ICdssAppService { - Map evaluateRules(Long encounterId); - List getAlerts(Long encounterId); - boolean acknowledgeAlert(Long alertId); - List getRules(Map params); -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/IInfectionDetailAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/IInfectionDetailAppService.java index c6c7ba159..46e1c8a9b 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/IInfectionDetailAppService.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/IInfectionDetailAppService.java @@ -5,7 +5,5 @@ import java.util.Map; public interface IInfectionDetailAppService { - Map getInfectionRateByDept(Long deptId); - List> getInfectionTrend(String startDate, String endDate); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/impl/CdssAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/impl/CdssAppServiceImpl.java deleted file mode 100644 index 85f2513ba..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/impl/CdssAppServiceImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.healthlink.his.web.infection.appservice.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.healthlink.his.infection.domain.CdssAlert; -import com.healthlink.his.infection.domain.CdssRule; -import com.healthlink.his.infection.service.ICdssAlertService; -import com.healthlink.his.infection.service.ICdssRuleService; -import com.healthlink.his.web.infection.appservice.ICdssAppService; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.*; -import java.util.stream.Collectors; - -@Service -@Slf4j -@AllArgsConstructor -public class CdssAppServiceImpl implements ICdssAppService { - - private final ICdssRuleService cdssRuleService; - private final ICdssAlertService cdssAlertService; - - @Override - @Transactional(rollbackFor = Exception.class) - public Map evaluateRules(Long encounterId) { - log.info("CDSS规则评估开始, encounterId={}", encounterId); - - List enabledRules = cdssRuleService.list( - new LambdaQueryWrapper() - .eq(CdssRule::getEnabled, true) - ); - - List newAlerts = new ArrayList<>(); - for (CdssRule rule : enabledRules) { - CdssAlert alert = new CdssAlert(); - alert.setEncounterId(encounterId); - alert.setPatientId(0L); - alert.setRuleId(rule.getId()); - alert.setAlertType(rule.getRuleType()); - alert.setAlertMessage("[" + rule.getRuleName() + "] " + rule.getSuggestion()); - alert.setSeverity(rule.getSeverity()); - alert.setAcknowledged(false); - cdssAlertService.save(alert); - newAlerts.add(alert); - } - - Map result = new HashMap<>(); - result.put("totalRules", enabledRules.size()); - result.put("newAlertCount", newAlerts.size()); - result.put("newAlerts", newAlerts); - result.put("evaluateTime", new Date()); - - log.info("CDSS规则评估完成: {}条规则, 生成{}条告警", enabledRules.size(), newAlerts.size()); - return result; - } - - @Override - public List getAlerts(Long encounterId) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - wrapper.eq(CdssAlert::getEncounterId, encounterId); - wrapper.orderByDesc(CdssAlert::getCreateTime); - return cdssAlertService.list(wrapper); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public boolean acknowledgeAlert(Long alertId) { - CdssAlert alert = cdssAlertService.getById(alertId); - if (alert == null) { - return false; - } - alert.setAcknowledged(true); - alert.setAcknowledgedTime(new Date()); - return cdssAlertService.updateById(alert); - } - - @Override - public List getRules(Map params) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - - String ruleType = getStr(params, "ruleType"); - if (ruleType != null && !ruleType.isEmpty()) { - wrapper.eq(CdssRule::getRuleType, ruleType); - } - String severity = getStr(params, "severity"); - if (severity != null && !severity.isEmpty()) { - wrapper.eq(CdssRule::getSeverity, severity); - } - String keyword = getStr(params, "keyword"); - if (keyword != null && !keyword.isEmpty()) { - wrapper.and(w -> w.like(CdssRule::getRuleName, keyword) - .or().like(CdssRule::getRuleCode, keyword)); - } - wrapper.orderByDesc(CdssRule::getCreateTime); - return cdssRuleService.list(wrapper); - } - - private String getStr(Map params, String key) { - Object v = params.get(key); - return v != null ? v.toString() : null; - } -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/impl/InfectionDetailAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/impl/InfectionDetailAppServiceImpl.java index 5bc2e0d6e..15bf8db03 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/impl/InfectionDetailAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/appservice/impl/InfectionDetailAppServiceImpl.java @@ -18,43 +18,6 @@ public class InfectionDetailAppServiceImpl implements IInfectionDetailAppService private final IHirInfectionCaseService infectionCaseService; - @Override - public Map getInfectionRateByDept(Long deptId) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - if (deptId != null) { - wrapper.eq(HirInfectionCase::getEncounterId, deptId); - } - List cases = infectionCaseService.list(wrapper); - - Map result = new HashMap<>(); - result.put("totalCases", cases.size()); - - long confirmed = cases.stream() - .filter(c -> "CONFIRMED".equals(c.getStatus())) - .count(); - result.put("confirmedCases", confirmed); - - long reported = cases.stream() - .filter(c -> "REPORTED".equals(c.getStatus())) - .count(); - result.put("reportedCases", reported); - - result.put("infectionRate", cases.isEmpty() ? 0 : - Math.round(confirmed * 1000.0 / cases.size()) / 10.0); - - Map byType = cases.stream() - .filter(c -> c.getInfectionType() != null) - .collect(Collectors.groupingBy(HirInfectionCase::getInfectionType, Collectors.counting())); - result.put("byType", byType); - - Map bySite = cases.stream() - .filter(c -> c.getInfectionSite() != null) - .collect(Collectors.groupingBy(HirInfectionCase::getInfectionSite, Collectors.counting())); - result.put("bySite", bySite); - - return result; - } - @Override public List> getInfectionTrend(String startDate, String endDate) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/CdssController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/CdssController.java deleted file mode 100644 index b946a1f18..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/CdssController.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.healthlink.his.web.infection.controller; - -import com.core.common.core.domain.R; -import com.healthlink.his.infection.domain.CdssAlert; -import com.healthlink.his.infection.domain.CdssRule; -import com.healthlink.his.web.infection.appservice.ICdssAppService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.Map; - -@Tag(name = "CDSS临床决策支持") -@RestController -@RequestMapping("/infection/cdss") -@Slf4j -@AllArgsConstructor -public class CdssController { - - private final ICdssAppService cdssAppService; - - @Operation(summary = "评估规则生成告警") - @PreAuthorize("@ss.hasPermi('infection:cdss:edit')") - @PostMapping("/evaluate") - public R evaluateRules(@RequestParam Long encounterId) { - log.info("CDSS规则评估, encounterId={}", encounterId); - return R.ok(cdssAppService.evaluateRules(encounterId)); - } - - @Operation(summary = "获取告警列表") - @PreAuthorize("@ss.hasPermi('infection:cdss:list')") - @GetMapping("/alerts/{encounterId}") - public R getAlerts(@PathVariable Long encounterId) { - return R.ok(cdssAppService.getAlerts(encounterId)); - } - - @Operation(summary = "确认告警") - @PreAuthorize("@ss.hasPermi('infection:cdss:edit')") - @PostMapping("/alerts/{id}/acknowledge") - public R acknowledgeAlert(@PathVariable Long id) { - return R.ok(cdssAppService.acknowledgeAlert(id)); - } - - @Operation(summary = "查询规则列表") - @PreAuthorize("@ss.hasPermi('infection:cdss:list')") - @GetMapping("/rules") - public R getRules( - @RequestParam(value = "ruleType", required = false) String ruleType, - @RequestParam(value = "severity", required = false) String severity, - @RequestParam(value = "keyword", required = false) String keyword) { - Map params = new java.util.HashMap<>(); - if (ruleType != null) params.put("ruleType", ruleType); - if (severity != null) params.put("severity", severity); - if (keyword != null) params.put("keyword", keyword); - return R.ok(cdssAppService.getRules(params)); - } -} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionDetailController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionDetailController.java index a387e7773..8d7ecba0c 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionDetailController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionDetailController.java @@ -21,14 +21,6 @@ public class InfectionDetailController { private final IInfectionDetailAppService infectionDetailAppService; - @Operation(summary = "科室感染率统计") - @PreAuthorize("@ss.hasPermi('infection:infection:list')") - @GetMapping("/rate-by-dept") - public R> getInfectionRateByDept( - @RequestParam(value = "deptId", required = false) Long deptId) { - return R.ok(infectionDetailAppService.getInfectionRateByDept(deptId)); - } - @Operation(summary = "感染趋势统计") @PreAuthorize("@ss.hasPermi('infection:infection:list')") @GetMapping("/trend") diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java index 9a86baa8e..f35bb141d 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/AdvancePaymentManageAppServiceImpl.java @@ -173,9 +173,9 @@ public class AdvancePaymentManageAppServiceImpl implements IAdvancePaymentManage payment.setPaymentEnum(paymentEnum); // 付款类别 payment.setPaymentReconciliationId(advancePaymentInAndOutDto.getPatientId()); // 付款实体ID payment.setKindEnum(PaymentKind.HOSPITAL_DEPOSIT.getValue()); // 发起支付的工作流程类别-住院存款 - payment.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()); // 收款员 + payment.setEntererId(SecurityUtils.getPractitionerId()); // 收款员 payment.setPatientId(advancePaymentInAndOutDto.getPatientId()); // 患者ID - payment.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); // 请求支付责任人ID + payment.setPractitionerId(SecurityUtils.getPractitionerId()); // 请求支付责任人ID payment.setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()); // 付款结果 payment.setLocationId(-99L); // 支付位置 payment.setExpirationDate(futureTime); // 到期时间 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java index c915f77a8..dcdbb99f0 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java @@ -96,7 +96,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS @Override public R registerByDoctor(InHospitalRegisterDto inHospitalRegisterDto) { // 当前账号的参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 患者id Long patientId = inHospitalRegisterDto.getPatientId(); // 门诊就诊id @@ -135,7 +135,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS zYCondition.setDefinitionId(inHospitalRegisterDto.getDiagnosisDefinitionId()); // 诊断定义Id zYCondition.setYbNo(inHospitalRegisterDto.getDiagnosisYbNo()); // 诊断对应的医保编码 zYCondition.setRecordedDatetime(new Date()); // 记录时间 - zYCondition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人 + zYCondition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人 iConditionService.save(zYCondition); Long conditionId = zYCondition.getId();// 诊断id @@ -398,7 +398,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS encounter.setAdmitSourceCode(inHospitalInfoDto.getAdmitSourceCode()); // 入院类型 encounter.setInWayCode(inHospitalInfoDto.getInWayCode()); // 入院方式 encounter.setStartTime(inHospitalInfoDto.getStartTime()); // 入院日期 - encounter.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 登记员 + encounter.setRegistrarId(SecurityUtils.getPractitionerId()); // 登记员 iEncounterService.saveOrUpdate(encounter); // 更新病区信息 @@ -532,7 +532,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS // 设置状态为已作废 encounter.setStatusEnum(EncounterZyStatus.VOIDED.getValue()); - encounter.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 作废操作人 + encounter.setRegistrarId(SecurityUtils.getPractitionerId()); // 作废操作人 iEncounterService.saveOrUpdate(encounter); // 清理账户记录 @@ -591,7 +591,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS encounterReg.setAdmitSourceCode(inHospitalInfoDto.getAdmitSourceCode()); // 入院类型 encounterReg.setInWayCode(inHospitalInfoDto.getInWayCode()); // 入院方式 encounterReg.setStartTime(inHospitalInfoDto.getStartTime()); // 入院日期 - encounterReg.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 登记员id + encounterReg.setRegistrarId(SecurityUtils.getPractitionerId()); // 登记员id iEncounterService.saveOrUpdate(encounterReg); // 先查询当前就诊是否已经分配了病区 @@ -654,9 +654,9 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS payment.setPaymentEnum(PaymentType.PAY.getValue()); // 付款类别 payment.setPaymentReconciliationId(accountPersonalCash.getPatientId()); // 付款实体ID payment.setKindEnum(PaymentKind.HOSPITAL_DEPOSIT.getValue()); // 发起支付的工作流程类别-住院存款 - payment.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()); // 收款员 + payment.setEntererId(SecurityUtils.getPractitionerId()); // 收款员 payment.setPatientId(accountPersonalCash.getPatientId()); // 患者ID - payment.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); // 请求支付责任人ID + payment.setPractitionerId(SecurityUtils.getPractitionerId()); // 请求支付责任人ID payment.setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()); // 付款结果 payment.setLocationId(-99L); // 支付位置 payment.setExpirationDate(futureTime); // 到期时间 @@ -687,7 +687,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS zYCondition.setDefinitionId(inHospitalInfoDto.getDiagnosisDefinitionId()); // 诊断定义Id zYCondition.setYbNo(inHospitalInfoDto.getDiagnosisYbNo()); // 诊断对应的医保编码 zYCondition.setRecordedDatetime(new Date()); // 记录时间 - zYCondition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人 + zYCondition.setRecorderId(SecurityUtils.getPractitionerId());// 记录人 iConditionService.save(zYCondition); Long conditionId = zYCondition.getId();// 诊断id diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java index 9e562c357..73385adce 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java @@ -423,7 +423,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { deviceRequestList.add(item); } } - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Date checkDate = new Date(); if (!serviceRequestList.isEmpty()) { List serviceReqIds = serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList(); @@ -574,7 +574,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { return R.fail("该药品已由药房发放,请先执行退药处理,不可直接退回"); } } - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Date checkDate = new Date(); // 从请求中提取退回原因(所有项目共享同一原因) String backReason = performInfoList.stream() @@ -977,7 +977,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { // 当前时间 Date curDate = new Date(); // 参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 长期 MedicationRequest longMedicationRequest; ChargeItem chargeItem; @@ -1265,7 +1265,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { // 当前时间 Date curDate = new Date(); // 参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Date clickDate = new Date(); // 长期 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java index 5c84c7807..55af88118 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java @@ -74,7 +74,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer @Override public R saveBinding(EncounterAutoRollSaveDto encounterAutoRollSaveDto) { // 当前登录账号参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 当前登录账号科室id Long orgId = SecurityUtils.getLoginUser().getOrgId(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java index 069ddfe7f..c08c97e66 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/MedicineSummaryAppServiceImpl.java @@ -210,7 +210,7 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService Date now = medicineSummaryParamList.get(0).getExecuteTime() != null ? medicineSummaryParamList.get(0).getExecuteTime() : DateUtils.getNowDate(); // 申请人 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 药品发放id List medDispenseIdList = medicineSummaryParamList.stream().map(MedicineSummaryParam::getDispenseId).toList(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/OrgDeviceStockTakeAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/OrgDeviceStockTakeAppServiceImpl.java index a40817bcb..d0a061d13 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/OrgDeviceStockTakeAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalnursestation/appservice/impl/OrgDeviceStockTakeAppServiceImpl.java @@ -205,7 +205,7 @@ public class OrgDeviceStockTakeAppServiceImpl implements IOrgDeviceStockTakeAppS // 申请时间 Date now = DateUtils.getNowDate(); // 申请人 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); for (OrgDeviceSummaryParam orgDeviceSummaryParam : orgDeviceSummaryParamList) { // 汇总单据号 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java index 3ae13d943..8b6718aa3 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/DepositAppServiceImpl.java @@ -129,7 +129,7 @@ public class DepositAppServiceImpl implements IDepositAppService { @Override public R savePayment(PaymentDto paymentDto) { // 收款员id - Long enterId = SecurityUtils.getLoginUser().getPractitionerId(); + Long enterId = SecurityUtils.getPractitionerId(); // 查询就诊信息(获取就诊ID) Encounter encounter = iEncounterService diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java index a983ea8a6..13c4aea84 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inpatientmanage/appservice/impl/NursingRecordAppServiceImpl.java @@ -149,7 +149,7 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService { @Transactional(rollbackFor = Exception.class) public R saveRecord(NursingRecordDto nursingRecordDto) { // 取得记录人员id - Long recorderId = SecurityUtils.getLoginUser().getPractitionerId(); + Long recorderId = SecurityUtils.getPractitionerId(); Emr emr = new Emr(); // 病历信息 @@ -182,7 +182,7 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService { @Transactional(rollbackFor = Exception.class) public R updateRecord(NursingRecordDto nursingRecordDto) { // 取得记录人员id - Long recordId = SecurityUtils.getLoginUser().getPractitionerId(); + Long recordId = SecurityUtils.getPractitionerId(); // 病历(记录单)保存 Emr emr = new Emr(); @@ -408,7 +408,7 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService { @Override @Transactional(rollbackFor = Exception.class) public R batchSaveRecord(BatchNursingRecordDto batchDto) { - Long recorderId = SecurityUtils.getLoginUser().getPractitionerId(); + Long recorderId = SecurityUtils.getPractitionerId(); java.util.Map tempIdToRealIdMap = new java.util.HashMap<>(); // 1. 处理待删除记录 (物理删除记录及体征表对应数据) diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/LossReportFormAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/LossReportFormAppServiceImpl.java index 2c4411e2f..98b084bda 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/LossReportFormAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/LossReportFormAppServiceImpl.java @@ -253,7 +253,7 @@ public class LossReportFormAppServiceImpl implements ILossReportFormAppService { // 单据类型:报损单 .setTypeEnum(SupplyType.LOSS_REPORT_FORM.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 制单日期 .setApplyTime(DateUtils.getNowDate()); supplyRequestList.add(supplyRequest); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductStocktakingAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductStocktakingAppServiceImpl.java index bde8f4c1f..6282d0585 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductStocktakingAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductStocktakingAppServiceImpl.java @@ -279,7 +279,7 @@ public class ProductStocktakingAppServiceImpl implements IProductStocktakingAppS // 单据类型:商品盘点 .setTypeEnum(SupplyType.PRODUCT_STOCKTAKING.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 申请时间 .setApplyTime(DateUtils.getNowDate()); supplyRequestList.add(supplyRequest); @@ -388,7 +388,7 @@ public class ProductStocktakingAppServiceImpl implements IProductStocktakingAppS // 单据类型:商品批量盘点 .setTypeEnum(SupplyType.PRODUCT_BATCH_STOCKTAKING.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 申请时间 .setApplyTime(DateUtils.getNowDate()); supplyRequestList.add(supplyRequest); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductTransferAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductTransferAppServiceImpl.java index 7d19aa49a..4d6cd88fc 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductTransferAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ProductTransferAppServiceImpl.java @@ -260,7 +260,7 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService .setId(null) .setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue()) .setTypeEnum(SupplyType.PRODUCT_BATCH_TRANSFER.getValue()) - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) .setApplyTime(DateUtils.getNowDate()) .setTotalQuantity(productTransferDto.getTotalSourceQuantity()); supplyRequestList.add(supplyRequest); @@ -319,7 +319,7 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService supplyRequest .setCategoryEnum(SupplyCategory.STOCK_SUPPLY.getValue()) .setTypeEnum(SupplyType.PRODUCT_BATCH_TRANSFER.getValue()) - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) .setApplyTime(DateUtils.getNowDate()); supplyRequestService.save(supplyRequest); } @@ -439,7 +439,7 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService // 单据类型:商品调拨 .setTypeEnum(SupplyType.PRODUCT_TRANSFER.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 申请时间 .setApplyTime(DateUtils.getNowDate()); supplyRequestList.add(supplyRequest); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseInventoryAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseInventoryAppServiceImpl.java index 53d9d29b7..a1006cc96 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseInventoryAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseInventoryAppServiceImpl.java @@ -232,7 +232,7 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer // 单据类型:采购入库 .setTypeEnum(SupplyType.PURCHASE_INVENTORY.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 申请时间 .setApplyTime(DateUtils.getNowDate()) diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseReturnAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseReturnAppServiceImpl.java index 9907f591e..4c2a4a417 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseReturnAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/PurchaseReturnAppServiceImpl.java @@ -177,7 +177,7 @@ public class PurchaseReturnAppServiceImpl implements IPurchaseReturnAppService { // 单据类型:采购退货 .setTypeEnum(SupplyType.PRODUCT_RETURN.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 申请时间 .setApplyTime(DateUtils.getNowDate()); supplyRequestList.add(supplyRequest); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/RequisitionIssueAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/RequisitionIssueAppServiceImpl.java index 132f94693..aea93970d 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/RequisitionIssueAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/RequisitionIssueAppServiceImpl.java @@ -212,7 +212,7 @@ public class RequisitionIssueAppServiceImpl implements IRequisitionIssueAppServi // 单据类型:领用出库 .setTypeEnum(SupplyType.ISSUE_INVENTORY.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 申请时间 .setApplyTime(DateUtils.getNowDate()); supplyRequestList.add(supplyRequest); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReturnIssueAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReturnIssueAppServiceImpl.java index 0a24364cc..7e350b212 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReturnIssueAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inventorymanage/appservice/impl/ReturnIssueAppServiceImpl.java @@ -196,7 +196,7 @@ public class ReturnIssueAppServiceImpl implements IReturnIssueAppService { // 单据类型:退货出库 .setTypeEnum(SupplyType.RETURN_ISSUE.getValue()) // 制单人 - .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApplicantId(SecurityUtils.getPractitionerId()) // 申请时间 .setApplyTime(DateUtils.getNowDate()); supplyRequestList.add(supplyRequest); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/jlau/appservice/impl/ReviewPrescriptionRecordsAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/jlau/appservice/impl/ReviewPrescriptionRecordsAppServiceImpl.java index c70bf65ab..08d1fb79c 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/jlau/appservice/impl/ReviewPrescriptionRecordsAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/jlau/appservice/impl/ReviewPrescriptionRecordsAppServiceImpl.java @@ -49,7 +49,7 @@ public class ReviewPrescriptionRecordsAppServiceImpl implements IReviewPrescript @Override public R reviewPrescription(ReviewPrescriptionRecordsDto reviewPrescriptionRecordsDto) { // 参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 就诊id Long encounterId = reviewPrescriptionRecordsDto.getEncounterId(); // 处方号 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/IMrStatsDetailAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/IMrStatsDetailAppService.java index aeb3f4aad..f6698621b 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/IMrStatsDetailAppService.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/IMrStatsDetailAppService.java @@ -4,8 +4,4 @@ import java.util.List; import java.util.Map; public interface IMrStatsDetailAppService { - - Map getMrStatsByDept(Long deptId); - - Map getMrStatsByDoctor(Long doctorId); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/impl/MrStatsDetailAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/impl/MrStatsDetailAppServiceImpl.java index fc44d8e82..5ffa79cc4 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/impl/MrStatsDetailAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/appservice/impl/MrStatsDetailAppServiceImpl.java @@ -1,95 +1,10 @@ package com.healthlink.his.web.mrhomepage.appservice.impl; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.healthlink.his.mrhomepage.domain.MrHomepage; -import com.healthlink.his.mrhomepage.service.IMrHomepageService; import com.healthlink.his.web.mrhomepage.appservice.IMrStatsDetailAppService; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.util.*; -import java.util.stream.Collectors; - @Service @AllArgsConstructor public class MrStatsDetailAppServiceImpl implements IMrStatsDetailAppService { - - private final IMrHomepageService mrHomepageService; - - @Override - public Map getMrStatsByDept(Long deptId) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - if (deptId != null) { - wrapper.eq(MrHomepage::getEncounterId, deptId); - } - List list = mrHomepageService.list(wrapper); - - Map result = new HashMap<>(); - result.put("totalCount", list.size()); - - BigDecimal totalCost = list.stream() - .map(MrHomepage::getTotalCost) - .filter(Objects::nonNull) - .reduce(BigDecimal.ZERO, BigDecimal::add); - result.put("totalCost", totalCost); - - result.put("avgCost", list.isEmpty() ? BigDecimal.ZERO : - totalCost.divide(BigDecimal.valueOf(list.size()), 2, RoundingMode.HALF_UP)); - - Map byStatus = list.stream() - .collect(Collectors.groupingBy( - h -> h.getQualityStatus() != null ? h.getQualityStatus() : "UNKNOWN", - Collectors.counting())); - result.put("byStatus", byStatus); - - Map byDrg = list.stream() - .filter(h -> h.getDrgGroup() != null) - .collect(Collectors.groupingBy(MrHomepage::getDrgGroup, Collectors.counting())); - result.put("byDrg", byDrg); - - long totalLos = list.stream() - .mapToInt(h -> h.getLosDays() != null ? h.getLosDays() : 0) - .sum(); - result.put("totalLosDays", totalLos); - result.put("avgLosDays", list.isEmpty() ? 0 : - Math.round(totalLos * 10.0 / list.size()) / 10.0); - - return result; - } - - @Override - public Map getMrStatsByDoctor(Long doctorId) { - LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); - if (doctorId != null) { - wrapper.eq(MrHomepage::getPatientId, doctorId); - } - List list = mrHomepageService.list(wrapper); - - Map result = new HashMap<>(); - result.put("totalCount", list.size()); - - BigDecimal totalCost = list.stream() - .map(MrHomepage::getTotalCost) - .filter(Objects::nonNull) - .reduce(BigDecimal.ZERO, BigDecimal::add); - result.put("totalCost", totalCost); - - result.put("avgCost", list.isEmpty() ? BigDecimal.ZERO : - totalCost.divide(BigDecimal.valueOf(list.size()), 2, RoundingMode.HALF_UP)); - - Map byStatus = list.stream() - .collect(Collectors.groupingBy( - h -> h.getQualityStatus() != null ? h.getQualityStatus() : "UNKNOWN", - Collectors.counting())); - result.put("byStatus", byStatus); - - Map byDiagnosis = list.stream() - .filter(h -> h.getPrimaryDiagnosisName() != null) - .collect(Collectors.groupingBy(MrHomepage::getPrimaryDiagnosisName, Collectors.counting())); - result.put("byDiagnosis", byDiagnosis); - - return result; - } } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/DrgAnalysisController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/MrHomepageDrgController.java similarity index 63% rename from healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/DrgAnalysisController.java rename to healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/MrHomepageDrgController.java index 1d7bb0969..3dc26e910 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/DrgAnalysisController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/MrHomepageDrgController.java @@ -1,19 +1,33 @@ package com.healthlink.his.web.mrhomepage.controller; + import com.core.common.core.domain.R; import com.healthlink.his.mrhomepage.domain.MrDrgGrouping; import com.healthlink.his.mrhomepage.service.IMrDrgGroupingService; -import lombok.AllArgsConstructor;import lombok.extern.slf4j.Slf4j; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; -import java.math.BigDecimal;import java.util.*; -@RestController @RequestMapping("/drg-analysis") @Slf4j @AllArgsConstructor -public class DrgAnalysisController { + +import java.math.BigDecimal; +import java.util.*; + +@RestController +@RequestMapping("/mr-homepage/drg") +@Slf4j +@AllArgsConstructor +public class MrHomepageDrgController { + private final IMrDrgGroupingService drgService; + @GetMapping("/cost-efficiency") public R getCostEfficiency() { List all = drgService.list(); - BigDecimal totalCost = BigDecimal.ZERO; int count = 0; + BigDecimal totalCost = BigDecimal.ZERO; + int count = 0; for (MrDrgGrouping g : all) { - if (g.getTotalCost() != null) { totalCost = totalCost.add(g.getTotalCost()); count++; } + if (g.getTotalCost() != null) { + totalCost = totalCost.add(g.getTotalCost()); + count++; + } } Map result = new HashMap<>(); result.put("avgCost", count > 0 ? totalCost.divide(BigDecimal.valueOf(count), 2, BigDecimal.ROUND_HALF_UP) : BigDecimal.ZERO); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/MrStatsDetailController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/MrStatsDetailController.java index b3d3ba2ed..9f741eb5b 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/MrStatsDetailController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/mrhomepage/controller/MrStatsDetailController.java @@ -1,15 +1,11 @@ package com.healthlink.his.web.mrhomepage.controller; -import com.core.common.core.domain.R; import com.healthlink.his.web.mrhomepage.appservice.IMrStatsDetailAppService; -import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import java.util.Map; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; @Tag(name = "病案统计明细") @RestController @@ -19,20 +15,4 @@ import java.util.Map; public class MrStatsDetailController { private final IMrStatsDetailAppService mrStatsDetailAppService; - - @Operation(summary = "科室病案统计") - @PreAuthorize("@ss.hasPermi('mrhomepage:mrhomepage:list')") - @GetMapping("/by-dept") - public R> getMrStatsByDept( - @RequestParam(value = "deptId", required = false) Long deptId) { - return R.ok(mrStatsDetailAppService.getMrStatsByDept(deptId)); - } - - @Operation(summary = "医生病案统计") - @PreAuthorize("@ss.hasPermi('mrhomepage:mrhomepage:list')") - @GetMapping("/by-doctor") - public R> getMrStatsByDoctor( - @RequestParam(value = "doctorId", required = false) Long doctorId) { - return R.ok(mrStatsDetailAppService.getMrStatsByDoctor(doctorId)); - } } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java index 3016d3bfa..bb0bf5b71 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/orderclosedloop/appservice/impl/OrderClosedLoopAppServiceImpl.java @@ -174,7 +174,12 @@ public class OrderClosedLoopAppServiceImpl implements IOrderClosedLoopAppService private Map getUnclosedWarnings(Integer pageNum, Integer pageSize) { Map result = new HashMap<>(); - List> rows = recordMapper.selectUnclosedWarnings(); + // 使用分页查询避免全量拉取导致卡死 + int pn = (pageNum != null && pageNum > 0) ? pageNum : 1; + int ps = (pageSize != null && pageSize > 0) ? pageSize : 10; + int offset = (pn - 1) * ps; + long total = recordMapper.countUnclosedWarnings(); + List> rows = recordMapper.selectUnclosedWarningsPaged(ps, offset); java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); List> warnings = new ArrayList<>(); for (Map row : rows) { @@ -195,6 +200,9 @@ public class OrderClosedLoopAppServiceImpl implements IOrderClosedLoopAppService warnings.add(warning); } result.put("records", warnings); + result.put("total", total); + result.put("pageNum", pn); + result.put("pageSize", ps); return result; } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientInfusionAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientInfusionAppServiceImpl.java index c7d62316b..22f19e01b 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientInfusionAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientInfusionAppServiceImpl.java @@ -174,7 +174,7 @@ public class OutpatientInfusionAppServiceImpl implements IOutpatientInfusionAppS // todo:查出对应的耗材并发放 // 获取执行人,执行科室,当前时间 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Long orgId = SecurityUtils.getLoginUser().getOrgId(); Date now = DateUtils.getNowDate(); List serviceRequestList = @@ -244,7 +244,7 @@ public class OutpatientInfusionAppServiceImpl implements IOutpatientInfusionAppS // todo:查出对应的耗材并退回到药房 // 获取执行人,执行科室,当前时间 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Long orgId = SecurityUtils.getLoginUser().getOrgId(); Date now = DateUtils.getNowDate(); // 获取诊疗项目信息 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java index f695b117f..20ed95f51 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatientmanage/appservice/impl/OutpatientTreatmentAppServiceImpl.java @@ -370,7 +370,7 @@ public class OutpatientTreatmentAppServiceImpl implements IOutpatientTreatmentAp // 发药时间 deviceDispense.setDispenseTime(DateUtils.getNowDate()); // 发药人 - deviceDispense.setPerformerId(SecurityUtils.getLoginUser().getPractitionerId()); + deviceDispense.setPerformerId(SecurityUtils.getPractitionerId()); // 根据数量设置追溯码 deviceDispense.setTraceNo(String.join(CommonConstants.Common.COMMA, Collections .nCopies(deviceDispense.getQuantity().intValue(), CommonConstants.Common.DEV_TRACE_NO))); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java index 5c7471621..45f012348 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java @@ -409,7 +409,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { // 新增支付信息 PaymentReconciliation payment = new PaymentReconciliation(); payment.setStatusEnum(PaymentStatus.DRAFT.getValue()).setPaymentNo(paymentNo).setYbSettleIds("") - .setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getPractitionerId()) .setPaymentReconciliationId(prePaymentDto.getPatientId()).setPatientId(prePaymentDto.getPatientId()) .setKindEnum(PaymentKind.OUTPATIENT_CLINIC.getValue()).setPractitionerId(prePaymentDto.getEntererId()) .setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()).setLocationId(-99l).setExpirationDate(futureTime) @@ -778,7 +778,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { @Override public R cancelPayment(CancelPaymentDto cancelPaymentDto) { // 当前登录用户 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 查找付款实例 PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(cancelPaymentDto.getId()); if (paymentReconciliation == null) { @@ -1036,7 +1036,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { // SJQ:2025.04.01 确认locationId暂不做处理,location表只记录库房药房信息 paymentReconciliation.setId(null).setStatusEnum(PaymentStatus.REFUND_ALL.getValue()) .setPaymentEnum(PaymentType.UN_PAY.getValue()).setRelationId(id) - .setEntererId(SecurityUtils.getLoginUser().getPractitionerId()).setBillDate(new Date()) + .setEntererId(SecurityUtils.getPractitionerId()).setBillDate(new Date()) .setTenderedAmount(paymentReconciliation.getTenderedAmount().negate()) .setReturnedAmount(paymentReconciliation.getReturnedAmount().negate()) .setDisplayAmount(paymentReconciliation.getDisplayAmount().negate()) @@ -1983,7 +1983,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { calendar.add(Calendar.HOUR_OF_DAY, 24); Date futureTime = calendar.getTime(); - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // Bug #409:预约签到挂号时,修正 serviceTypeId 为预约类型而非挂号类型 // 数据链:Order → ScheduleSlot → SchedulePool → HealthcareService @@ -2230,7 +2230,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { // 保存挂号费 chargeItem.setEncounterId(encounterId); chargeItem.setAccountId(accountId); - chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()); + chargeItem.setEntererId(SecurityUtils.getPractitionerId()); chargeItem.setQuantityValue(new BigDecimal("1")); iChargeItemService.saveChargeItemByRegister(chargeItem); // 处理诊疗费并返回对应的收费项目id集合用于医保结算 @@ -2345,7 +2345,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { serviceRequest.setCategoryEnum(EncounterClass.AMB.getValue()); // 请求类型,默认-门诊 serviceRequest.setActivityId(activityAdviceBaseDto.getAdviceDefinitionId());// 诊疗定义id serviceRequest.setPatientId(encounter.getPatientId()); // 患者 - serviceRequest.setRequesterId(SecurityUtils.getLoginUser().getPractitionerId()); // 开方医生 + serviceRequest.setRequesterId(SecurityUtils.getPractitionerId()); // 开方医生 serviceRequest.setEncounterId(encounter.getId()); // 就诊id serviceRequest.setAuthoredTime(curDate); // 请求签发时间 serviceRequest.setOrgId(organizationId); // 执行科室 @@ -2360,7 +2360,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型 chargeItem.setEncounterId(encounter.getId()); // 就诊id chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID - chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID + chargeItem.setEntererId(SecurityUtils.getPractitionerId());// 开立人ID chargeItem.setEnteredDate(curDate); // 开立时间 chargeItem.setServiceTable(CommonConstants.TableName.WOR_SERVICE_REQUEST);// 医疗服务类型 chargeItem.setServiceId(serviceRequest.getId()); // 医疗服务ID @@ -3054,10 +3054,10 @@ public class PaymentRecServiceImpl implements IPaymentRecService { String paymentNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.PAYMENT_NO.getPrefix(), 20); payment.setStatusEnum(PaymentStatus.DRAFT.getValue()).setPaymentNo(paymentNo).setYbSettleIds("") - .setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPaymentEnum(PaymentType.PAY.getValue()).setEntererId(SecurityUtils.getPractitionerId()) .setPaymentReconciliationId(chargeItemList.get(0).getPatientId()) .setPatientId(chargeItemList.get(0).getPatientId()).setKindEnum(PaymentKind.INPATIENT_CLINIC.getValue()) - .setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPractitionerId(SecurityUtils.getPractitionerId()) .setOutcomeEnum(PaymentOutcome.COMPLETED.getCode()).setLocationId(-99l).setExpirationDate(futureTime) .setBillDate(setlTime).setPrintCount(0) .setChargeItemIds(chargeItemList.stream().map(ChargeItemBaseInfoDto::getId).map(String::valueOf) @@ -3108,10 +3108,10 @@ public class PaymentRecServiceImpl implements IPaymentRecService { String paymentNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.PAYMENT_NO.getPrefix(), 20); payment.setStatusEnum(PaymentStatus.DRAFT.getValue()).setPaymentNo(paymentNo).setYbSettleIds("") - .setPaymentEnum(paymentType.getValue()).setEntererId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPaymentEnum(paymentType.getValue()).setEntererId(SecurityUtils.getPractitionerId()) .setPaymentReconciliationId(oldPayment.getPatientId()).setPatientId(oldPayment.getPatientId()) .setKindEnum(PaymentKind.HOSPITAL_DEPOSIT.getValue()).setRelationId(oldPayment.getId()) - .setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPractitionerId(SecurityUtils.getPractitionerId()) .setOutcomeEnum(PaymentOutcome.PARTIAL.getCode()).setLocationId(-99l).setExpirationDate(futureTime) .setBillDate(setlTime).setPrintCount(0).setChargeItemIds(oldPayment.getChargeItemIds()) .setTenderedAmount(subtract.multiply(mul)).setDisplayAmount(subtract.multiply(mul)) @@ -3150,7 +3150,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { @Override public String nenuBpcPay(NenuBpcPayDto nenuBpcPayDto) { - Practitioner practitioner = practitionerService.getById(SecurityUtils.getLoginUser().getPractitionerId()); + Practitioner practitioner = practitionerService.getById(SecurityUtils.getPractitionerId()); if (practitioner == null || practitioner.getPosNo() == null) { throw new ServiceException("未配置POS机编号!"); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/IOrderGroupAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/IOrderGroupAppServiceImpl.java index c581c937b..845427749 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/IOrderGroupAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/IOrderGroupAppServiceImpl.java @@ -102,7 +102,7 @@ public class IOrderGroupAppServiceImpl implements IOrderGroupAppService { // 新增组套信息 orderGroup.setName(orderGroupDto.getName()).setTypeEnum(orderGroupDto.getTypeEnum()) .setRangeCode(orderGroupDto.getRangeCode()) - .setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPractitionerId(SecurityUtils.getPractitionerId()) .setOrgId(SecurityUtils.getLoginUser().getOrgId()).setGroupJson(orderGroupDto.getGroupJson()) .setVersionNo(orderGroupDto.getVersionNo()); boolean result = orderGroupService.save(orderGroup); @@ -131,7 +131,7 @@ public class IOrderGroupAppServiceImpl implements IOrderGroupAppService { // 修改组套信息 orderGroup.setId(orderGroup.getId()).setName(orderGroupDto.getName()).setTypeEnum(orderGroupDto.getTypeEnum()) .setRangeCode(orderGroupDto.getRangeCode()) - .setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPractitionerId(SecurityUtils.getPractitionerId()) .setOrgId(SecurityUtils.getLoginUser().getOrgId()).setGroupJson(orderGroupDto.getGroupJson()) .setVersionNo(orderGroupDto.getVersionNo()); boolean result = orderGroupService.saveOrUpdate(orderGroup); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java index ff1fc50c8..4b246614f 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java @@ -65,7 +65,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS if (BindingType.PERSONAL.getValue().equals(packageTypeEnum) && ordersGroupPackageSaveDto.getPractitionerId() == null) { // throw new ServiceException("个人组套需选择人员"); - ordersGroupPackageSaveDto.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + ordersGroupPackageSaveDto.setPractitionerId(SecurityUtils.getPractitionerId()); } else if (BindingType.ORGANIZATION.getValue().equals(packageTypeEnum) && ordersGroupPackageSaveDto.getOrganizationId() == null) { // throw new ServiceException("科室组套需选择科室"); @@ -168,7 +168,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS public OrdersGroupPackageUseDto getGroupPackageForOrder(Long organizationId, Integer tcmFlag) { OrdersGroupPackageUseDto ordersGroupPackageUseDto = new OrdersGroupPackageUseDto(); // 当前参参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 当前登录账号的科室id Long orgId = SecurityUtils.getLoginUser().getOrgId(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/InHospitalReturnMedicineAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/InHospitalReturnMedicineAppServiceImpl.java index c4514a907..e25b0a424 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/InHospitalReturnMedicineAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/InHospitalReturnMedicineAppServiceImpl.java @@ -304,7 +304,7 @@ public class InHospitalReturnMedicineAppServiceImpl implements IInHospitalReturn // 退药时间 medicationDispense.setDispenseTime(DateUtils.getNowDate()); // 退药人 - medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + medicationDispense.setPractitionerId(SecurityUtils.getPractitionerId()); // 设置库存变更参数(仅针对实际发过药的药品) if (!noInventoryUpdateMedIds.contains(medicationDispense.getId())) { diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/MedicalDeviceDispenseAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/MedicalDeviceDispenseAppServiceImpl.java index ab63163e9..efa2f0c0e 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/MedicalDeviceDispenseAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/MedicalDeviceDispenseAppServiceImpl.java @@ -209,7 +209,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen public R deviceDispense(List dispenseDeviceList) { // 配药人检查 if (dispenseDeviceList.get(0).getPreparerId() == null - || dispenseDeviceList.get(0).getPreparerId().equals(SecurityUtils.getLoginUser().getPractitionerId())) { + || dispenseDeviceList.get(0).getPreparerId().equals(SecurityUtils.getPractitionerId())) { return R.fail("请选择调配药师"); } // 获取发药单id列表 @@ -292,7 +292,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen // 发药时间 deviceDispense.setDispenseTime(DateUtils.getNowDate()); // 发药人 - deviceDispense.setPerformerId(SecurityUtils.getLoginUser().getPractitionerId()); + deviceDispense.setPerformerId(SecurityUtils.getPractitionerId()); // 配药时间 deviceDispense.setPrepareTime(DateUtils.getNowDate()); // 配药人 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/ReturnMedicineAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/ReturnMedicineAppServiceImpl.java index 275064960..2b77d9105 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/ReturnMedicineAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/ReturnMedicineAppServiceImpl.java @@ -277,7 +277,7 @@ public class ReturnMedicineAppServiceImpl implements IReturnMedicineAppService { // 退药时间 medicationDispense.setDispenseTime(DateUtils.getNowDate()); // 退药人 - medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + medicationDispense.setPractitionerId(SecurityUtils.getPractitionerId()); // 设置库存变更参数 SupplyItemDetailDto supplyItemDetailDto = new SupplyItemDetailDto(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/SummaryDispenseMedicineAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/SummaryDispenseMedicineAppServiceImpl.java index 97e671b50..36faf23cb 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/SummaryDispenseMedicineAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/SummaryDispenseMedicineAppServiceImpl.java @@ -193,7 +193,7 @@ public class SummaryDispenseMedicineAppServiceImpl implements ISummaryDispenseMe // 发药时间 medicationDispense.setDispenseTime(now); // 发药人 - medicationDispense.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + medicationDispense.setPractitionerId(SecurityUtils.getPractitionerId()); // 设置库存变更参数 supplyItemDetailList.add(new SupplyItemDetailDto().setItemId(medicationDispense.getMedicationId()) .setLotNumber(medicationDispense.getLotNumber()) @@ -247,7 +247,7 @@ public class SummaryDispenseMedicineAppServiceImpl implements ISummaryDispenseMe // 发药时间 supplyDelivery.setOccurrenceTime(now); // 发药人 - supplyDelivery.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); + supplyDelivery.setPractitionerId(SecurityUtils.getPractitionerId()); } supplyDeliveryService.updateBatchById(supplyDeliveryList); // 汇总发放申请更新 @@ -255,7 +255,7 @@ public class SummaryDispenseMedicineAppServiceImpl implements ISummaryDispenseMe // 审核状态:已通过 supplyRequest.setStatusEnum(SupplyStatus.AGREE.getValue()) // 审核人 - .setApproverId(SecurityUtils.getLoginUser().getPractitionerId()) + .setApproverId(SecurityUtils.getPractitionerId()) // 审核时间 .setApprovalTime(now); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/WesternMedicineDispenseAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/WesternMedicineDispenseAppServiceImpl.java index 3aac7377d..97ce9cdae 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/WesternMedicineDispenseAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/pharmacymanage/appservice/impl/WesternMedicineDispenseAppServiceImpl.java @@ -279,7 +279,7 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi } // 配药人检查 if (dispenseMedicineList.get(0).getPreparerId() == null - || dispenseMedicineList.get(0).getPreparerId().equals(SecurityUtils.getLoginUser().getPractitionerId())) { + || dispenseMedicineList.get(0).getPreparerId().equals(SecurityUtils.getPractitionerId())) { return R.fail("请选择调配药师"); } // 获取发药单id列表 @@ -426,7 +426,7 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi // 当前时间 Date nowDate = DateUtils.getNowDate(); // 当前用户id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); for (UnDispenseInventoryDto unDispenseInventoryDto : unDispenseInventoryList) { MedicationDispense medicationDispense = new MedicationDispense(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/EmrQualityAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/EmrQualityAppServiceImpl.java index 7d537ffc7..98a19b044 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/EmrQualityAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/EmrQualityAppServiceImpl.java @@ -1,16 +1,17 @@ package com.healthlink.his.web.quality.appservice.impl; import com.healthlink.his.quality.domain.EmrDefect; -import com.healthlink.his.quality.domain.EmrQualityScore; +import com.healthlink.his.quality.domain.QualityScore; import com.healthlink.his.quality.mapper.*; import com.healthlink.his.web.quality.appservice.IEmrQualityAppService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.*; import java.util.Date; @Service public class EmrQualityAppServiceImpl implements IEmrQualityAppService { - @Autowired private EmrQualityScoreMapper scoreMapper; + @Autowired private QualityScoreMapper scoreMapper; @Autowired private EmrDefectMapper defectMapper; @Override @@ -43,9 +44,9 @@ public class EmrQualityAppServiceImpl implements IEmrQualityAppService { @Override public List> getQualityScores(Long encounterId) { List> scores = new ArrayList<>(); - List list = scoreMapper.selectList(new LambdaQueryWrapper() - .eq(EmrQualityScore::getEncounterId, encounterId).orderByDesc(EmrQualityScore::getCreateTime)); - for (EmrQualityScore s : list) { + List list = scoreMapper.selectList(new LambdaQueryWrapper() + .eq(QualityScore::getEncounterId, encounterId).orderByDesc(QualityScore::getCreateTime)); + for (QualityScore s : list) { Map m = new HashMap<>(); m.put("id", s.getId()); m.put("emrType", s.getEmrType()); m.put("score", s.getScore()); m.put("grade", s.getGrade()); m.put("checkType", s.getCheckType()); m.put("checkerName", s.getCheckerName()); @@ -83,6 +84,7 @@ public class EmrQualityAppServiceImpl implements IEmrQualityAppService { } @Override + @Transactional(rollbackFor = Exception.class) public Map startDefectRectify(Long defectId) { Map result = new HashMap<>(); EmrDefect defect = defectMapper.selectById(defectId); @@ -99,6 +101,7 @@ public class EmrQualityAppServiceImpl implements IEmrQualityAppService { } @Override + @Transactional(rollbackFor = Exception.class) public Map completeDefectRectify(Long defectId) { Map result = new HashMap<>(); EmrDefect defect = defectMapper.selectById(defectId); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/TerminalQualityAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/TerminalQualityAppServiceImpl.java index 0c2a603db..b3b7b6453 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/TerminalQualityAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/appservice/impl/TerminalQualityAppServiceImpl.java @@ -1,9 +1,9 @@ package com.healthlink.his.web.quality.appservice.impl; import com.healthlink.his.quality.domain.EmrDefect; -import com.healthlink.his.quality.domain.EmrQualityScore; +import com.healthlink.his.quality.domain.QualityScore; import com.healthlink.his.quality.mapper.EmrDefectMapper; -import com.healthlink.his.quality.mapper.EmrQualityScoreMapper; +import com.healthlink.his.quality.mapper.QualityScoreMapper; import com.healthlink.his.web.quality.appservice.ITerminalQualityAppService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.springframework.beans.factory.annotation.Autowired; @@ -16,7 +16,7 @@ import java.util.*; public class TerminalQualityAppServiceImpl implements ITerminalQualityAppService { @Autowired - private EmrQualityScoreMapper scoreMapper; + private QualityScoreMapper scoreMapper; @Autowired private EmrDefectMapper defectMapper; @@ -44,7 +44,7 @@ public class TerminalQualityAppServiceImpl implements ITerminalQualityAppService String grade = calculateGrade(score); // 保存评分记录 - EmrQualityScore qualityScore = new EmrQualityScore(); + QualityScore qualityScore = new QualityScore(); qualityScore.setEncounterId(encounterId); qualityScore.setScore(score); qualityScore.setMaxScore(new BigDecimal(100)); @@ -69,15 +69,15 @@ public class TerminalQualityAppServiceImpl implements ITerminalQualityAppService result.put("encounterId", encounterId); // 获取评分记录 - List scores = scoreMapper.selectList( - new LambdaQueryWrapper() - .eq(EmrQualityScore::getEncounterId, encounterId) - .eq(EmrQualityScore::getCheckType, "TERMINAL") - .orderByDesc(EmrQualityScore::getCreateTime) + List scores = scoreMapper.selectList( + new LambdaQueryWrapper() + .eq(QualityScore::getEncounterId, encounterId) + .eq(QualityScore::getCheckType, "TERMINAL") + .orderByDesc(QualityScore::getCreateTime) ); if (!scores.isEmpty()) { - EmrQualityScore latestScore = scores.get(0); + QualityScore latestScore = scores.get(0); result.put("score", latestScore.getScore()); result.put("grade", latestScore.getGrade()); result.put("checkTime", latestScore.getCreateTime()); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/controller/BusinessAnalyticsController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/controller/QualityBusinessAnalyticsController.java similarity index 89% rename from healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/controller/BusinessAnalyticsController.java rename to healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/controller/QualityBusinessAnalyticsController.java index f4f0eab25..89fdf353a 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/controller/BusinessAnalyticsController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/quality/controller/QualityBusinessAnalyticsController.java @@ -7,6 +7,7 @@ import com.healthlink.his.quality.domain.BusinessAnalytics; import com.healthlink.his.quality.service.IBusinessAnalyticsService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; @@ -18,11 +19,12 @@ import java.util.*; @RequestMapping("/business-analytics") @Slf4j @AllArgsConstructor -public class BusinessAnalyticsController { +public class QualityBusinessAnalyticsController { private final IBusinessAnalyticsService analyticsService; @GetMapping("/page") + @PreAuthorize("@ss.hasPermi('infection:quality:list')") public R getPage( @RequestParam(value = "departmentName", required = false) String deptName, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @@ -34,6 +36,7 @@ public class BusinessAnalyticsController { } @PostMapping("/add") + @PreAuthorize("@ss.hasPermi('infection:quality:edit')") @Transactional(rollbackFor = Exception.class) public R add(@RequestBody BusinessAnalytics analytics) { analytics.setCreateTime(new Date()); @@ -42,6 +45,7 @@ public class BusinessAnalyticsController { } @GetMapping("/summary") + @PreAuthorize("@ss.hasPermi('infection:quality:list')") public R getSummary() { Map summary = new HashMap<>(); List list = analyticsService.list(); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java index cb81e7677..55297b543 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/AdviceManageAppServiceImpl.java @@ -117,7 +117,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { queryWrapper.eq(currentUserOrganizationId != null, CommonConstants.FieldName.InHospitalOrgId, currentUserOrganizationId); IPage regPatientMainInfo = adviceManageAppMapper.getRegPatientMainInfo( - new Page<>(pageNo, pageSize), SecurityUtils.getLoginUser().getPractitionerId(), + new Page<>(pageNo, pageSize), SecurityUtils.getPractitionerId(), LocationForm.WARD.getValue(), LocationForm.HOUSE.getValue(), LocationForm.BED.getValue(), EncounterActivityStatus.ACTIVE.getValue(), EncounterClass.IMP.getValue(), Whether.YES.getValue(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(), EncounterZyStatus.TO_BE_REGISTERED.getValue(), @@ -991,7 +991,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { @Override public R getRegRequestBaseInfo(Long encounterId) { // 当前账号的参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 住院医嘱请求数据 List regRequestBaseInfo = adviceManageAppMapper.getRegRequestBaseInfo(encounterId, null, CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST, @@ -1032,7 +1032,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService { @Override public R getRegRequestHistoryInfo(Long patientId, Long encounterId) { // 当前账号的参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 住院医嘱请求数据 List regRequestBaseInfo = adviceManageAppMapper.getRegRequestBaseInfo(encounterId, patientId, CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_DEVICE_REQUEST, diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/NurseManageServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/NurseManageServiceImpl.java index 8cf0e70da..55ab2fbef 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/NurseManageServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/NurseManageServiceImpl.java @@ -53,7 +53,7 @@ public class NurseManageServiceImpl implements INurseManageService { public R pricingBusiness(String searchKeyWord) { // TODO 一、基础数据 1、获取 当前护士负责的 病区 和 病区下的患者数据;2、护士点击 患者姓名时,获取患者基础数据(床号,姓名等); // 此处应该提供两个接口,策略模式, 如果从 门诊过来,new 门诊的用户来源,如果从 住院来,那么 new 住院的用户来源; - // 获取当前人 SecurityUtils.getLoginUser().getPractitionerId(); + // 获取当前人 SecurityUtils.getPractitionerId(); Long practitionerId = 2L; // 获取当前角色的负责的区域id数组 List roleLocationIds = practitionerRoleService.searchPractitionerRoleLocationIds(practitionerId, @@ -112,7 +112,7 @@ public class NurseManageServiceImpl implements INurseManageService { @Override public R medicalDeviceBusiness() { // 获取当前人 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); return null; } } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java index 2a1b456e7..ca8522ab9 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/RequestFormManageAppServiceImpl.java @@ -99,7 +99,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) { return null; } - Long currentPractitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long currentPractitionerId = SecurityUtils.getPractitionerId(); Long requesterId = requestForm.getRequesterId(); if (currentPractitionerId == null || requesterId == null || !currentPractitionerId.equals(requesterId)) { @@ -195,7 +195,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer // 当前登录账号的科室id Long orgId = SecurityUtils.getLoginUser().getOrgId(); // 当前参与者ID - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 就诊ID Long encounterId = requestFormSaveDto.getEncounterId(); // 患者ID diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java index 69b6244cf..7d78cc905 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java @@ -127,7 +127,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService { @Override public R saveNursingOrders(NursingOrdersSaveDto nursingOrdersSaveDto) { // 当前登录账号参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 当前时间 Date curDate = new Date(); // 医嘱开始时间 @@ -312,7 +312,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService { @Override public R saveTransferOrganizationOrders(TransferOrganizationParam transferOrganizationParam) { // 当前登录账号参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 当前时间 Date curDate = new Date(); // 医嘱开始时间 @@ -431,7 +431,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService { @Override public R saveLeaveHospitalOrders(LeaveHospitalParam leaveHospitalParam) { // 当前登录账号参与者id - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); // 当前时间 Date curDate = new Date(); // 计划出院时间 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/appservice/impl/ReportDimensionAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/appservice/impl/ReportDimensionAppServiceImpl.java index bfc49d72e..c19531e54 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/appservice/impl/ReportDimensionAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/reportmanage/appservice/impl/ReportDimensionAppServiceImpl.java @@ -9,6 +9,7 @@ import org.springframework.util.StringUtils; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.LocalDate; import java.util.*; import java.util.stream.Collectors; @@ -26,15 +27,15 @@ public class ReportDimensionAppServiceImpl implements IReportDimensionAppService String endDate = filters != null ? filters.get("endDate") : null; if (StringUtils.hasText(startDate)) { + LocalDate start = LocalDate.parse(startDate); allData = allData.stream() - .filter(h -> h.getDischargeDate() != null && - h.getDischargeDate().toString().compareTo(startDate) >= 0) + .filter(h -> h.getDischargeDate() != null && !h.getDischargeDate().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate().isBefore(start)) .collect(Collectors.toList()); } if (StringUtils.hasText(endDate)) { + LocalDate end = LocalDate.parse(endDate); allData = allData.stream() - .filter(h -> h.getDischargeDate() != null && - h.getDischargeDate().toString().compareTo(endDate) <= 0) + .filter(h -> h.getDischargeDate() != null && !h.getDischargeDate().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate().isAfter(end)) .collect(Collectors.toList()); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/system/controller/HomeController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/system/controller/HomeController.java index b8d9fa555..35fcfb0a3 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/system/controller/HomeController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/system/controller/HomeController.java @@ -32,7 +32,7 @@ public class HomeController { HomeStatisticsDto statisticsDto = homeStatisticsService.getHomeStatistics(); // 获取待写病历数量 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); R pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(practitionerId, null); // 将待写病历数量添加到统计数据中 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbElepBaseServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbElepBaseServiceImpl.java index 9903757d6..4a74951be 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbElepBaseServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbElepBaseServiceImpl.java @@ -713,7 +713,7 @@ public class YbElepBaseServiceImpl implements IYbEleBaseService { break; } - Practitioner practitioner = iPractitionerService.getById(SecurityUtils.getLoginUser().getPractitionerId()); + Practitioner practitioner = iPractitionerService.getById(SecurityUtils.getPractitionerId()); map.put("doctorName", practitioner.getName()); map.put("medType", medicalContractName + medicalCareType); diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbServiceImpl.java index 27408437a..af0f15f22 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/ybmanage/service/impl/YbServiceImpl.java @@ -1585,7 +1585,7 @@ public class YbServiceImpl implements IYbService { setlinfo.setSetlBegnDate(inpatientReg.getBegntime()); setlinfo.setSetlEndDate(inpatientDischarge.getEndtime()); //查询当前登陆人信息 - Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); + Long practitionerId = SecurityUtils.getPractitionerId(); Practitioner practitioner = iPractitionerService.getById(practitionerId); if(practitioner==null){ diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql index 52432ae42..88283ddae 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V59__fix_clinical_pathway_variance_delete_flag.sql @@ -1,2 +1,6 @@ -ALTER TABLE clinical_pathway_variance RENAME COLUMN del_flag TO delete_flag; +DO $$ BEGIN + ALTER TABLE clinical_pathway_variance RENAME COLUMN del_flag TO delete_flag; +EXCEPTION WHEN undefined_column THEN + RAISE NOTICE 'column del_flag does not exist, skipping rename'; +END $$; ALTER TABLE clinical_pathway_variance ALTER COLUMN tenant_id SET DATA TYPE BIGINT; diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V71__cdss.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V71__cdss.sql deleted file mode 100644 index d540c2d3f..000000000 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V71__cdss.sql +++ /dev/null @@ -1,33 +0,0 @@ -CREATE TABLE cdss_rule ( - id BIGSERIAL PRIMARY KEY, - rule_code VARCHAR(32) NOT NULL, - rule_name VARCHAR(100) NOT NULL, - rule_type VARCHAR(20) NOT NULL, - condition_expr TEXT NOT NULL, - suggestion TEXT NOT NULL, - severity VARCHAR(16) DEFAULT 'INFO', - enabled BOOLEAN DEFAULT TRUE, - tenant_id BIGINT DEFAULT 0, - delete_flag CHAR(1) DEFAULT '0', - create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - create_by VARCHAR(64), - update_time TIMESTAMP, - update_by VARCHAR(64) -); - -CREATE TABLE cdss_alert ( - id BIGSERIAL PRIMARY KEY, - encounter_id BIGINT NOT NULL, - patient_id BIGINT NOT NULL, - rule_id BIGINT NOT NULL, - alert_type VARCHAR(20) NOT NULL, - alert_message TEXT NOT NULL, - severity VARCHAR(16) NOT NULL, - acknowledged BOOLEAN DEFAULT FALSE, - acknowledged_by BIGINT, - acknowledged_time TIMESTAMP, - tenant_id BIGINT DEFAULT 0, - delete_flag CHAR(1) DEFAULT '0', - create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - create_by VARCHAR(64) -); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V76__add_missing_menus.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V76__add_missing_menus.sql new file mode 100644 index 000000000..47d3a16ca --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V76__add_missing_menus.sql @@ -0,0 +1,7 @@ +INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark, delete_flag) +VALUES +('CDSS', 10001, 10, 'cdss', 'cdss/cdssAlerts/index', NULL, 1, 0, 'C', '0', '0', 'infection:cdss:list', 'fa:', 'admin', CURRENT_TIMESTAMP, NULL, NULL, '临床决策支持', 0), +('区域共享', 20081, 10, 'regionalshare', 'esbmanage/regionalshare/index', NULL, 1, 0, 'C', '0', '0', 'infection:regional:list', 'fa:', 'admin', CURRENT_TIMESTAMP, NULL, NULL, '区域医疗信息共享', 0), +('EMR数据仓库', 20201, 10, 'data-warehouse', 'emr/data-warehouse/index', NULL, 1, 0, 'C', '0', '0', 'infection:emr:list', 'fa:', 'admin', CURRENT_TIMESTAMP, NULL, NULL, '病历数据仓库', 0), +('病案统计明细', 20051, 10, 'statistics-detail', 'mrhomepage/statistics-detail/index', NULL, 1, 0, 'C', '0', '0', 'infection:mrhomepage:list', 'fa:', 'admin', CURRENT_TIMESTAMP, NULL, NULL, '病案统计明细', 0), +('报表维度', 360, 10, 'ReportDimension', 'reportmanage/ReportDimension', NULL, 1, 0, 'C', '0', '0', 'infection:report:list', 'fa:', 'admin', CURRENT_TIMESTAMP, NULL, NULL, '报表维度', 0); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V77__update_menu_icons.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V77__update_menu_icons.sql new file mode 100644 index 000000000..1107f9cbe --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V77__update_menu_icons.sql @@ -0,0 +1,338 @@ +-- V66__update_menu_icons.sql +-- 更新菜单图标 - 根据菜单功能名称匹配合适的图标 +-- 仅使用 src/assets/icons/svg/ 目录下实际存在的图标 + +SET search_path TO healthlink_his; + +-- ========== 一级菜单(顶级目录)========== +UPDATE sys_menu SET icon = 'system' WHERE menu_id = 1; -- 系统管理 +UPDATE sys_menu SET icon = 'monitor' WHERE menu_id = 2; -- 系统监控 +UPDATE sys_menu SET icon = 'tool' WHERE menu_id = 3; -- 系统工具 +UPDATE sys_menu SET icon = 'log' WHERE menu_id = 108; -- 日志管理 +UPDATE sys_menu SET icon = 'inpatient' WHERE menu_id = 235; -- 住院管理 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 268; -- 药库管理 +UPDATE sys_menu SET icon = 'outpatient' WHERE menu_id = 270; -- 门诊管理 +UPDATE sys_menu SET icon = 'inventory' WHERE menu_id = 313; -- 库房管理 +UPDATE sys_menu SET icon = 'drug-dispensing' WHERE menu_id = 342; -- 发药管理 +UPDATE sys_menu SET icon = 'finance' WHERE menu_id = 350; -- 财务管理 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 360; -- 报表管理 +UPDATE sys_menu SET icon = 'insurance' WHERE menu_id = 386; -- 医保管理 +UPDATE sys_menu SET icon = 'connection' WHERE menu_id = 418; -- 接口管理 +UPDATE sys_menu SET icon = 'workflow' WHERE menu_id = 2020; -- 流程管理 +UPDATE sys_menu SET icon = 'task' WHERE menu_id = 2023; -- 任务管理 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 2078; -- 收费工作站 +UPDATE sys_menu SET icon = 'pharmacy' WHERE menu_id = 2079; -- 药房管理 +UPDATE sys_menu SET icon = 'tool' WHERE menu_id = 2083; -- 维护系统 +UPDATE sys_menu SET icon = 'doctor' WHERE menu_id = 2084; -- 门诊医生工作站 +UPDATE sys_menu SET icon = 'appointment' WHERE menu_id = 2092; -- 预约管理 +UPDATE sys_menu SET icon = 'triage' WHERE menu_id = 2110; -- 分诊排队管理 +UPDATE sys_menu SET icon = 'surgery' WHERE menu_id = 2119; -- 手术管理 +UPDATE sys_menu SET icon = 'user' WHERE menu_id = 2140; -- 患者管理 +UPDATE sys_menu SET icon = 'consultation' WHERE menu_id = 2147; -- 会诊管理 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 2159; -- 疾病报告管理 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10001; -- 院感管理 +UPDATE sys_menu SET icon = 'log' WHERE menu_id = 10011; -- 药品追溯管理 +UPDATE sys_menu SET icon = 'edit' WHERE menu_id = 10021; -- 电子签名管理 +UPDATE sys_menu SET icon = 'alert' WHERE menu_id = 10031; -- 危急值管理 +UPDATE sys_menu SET icon = 'peoples' WHERE menu_id = 10041; -- 患者主索引(EMPI) +UPDATE sys_menu SET icon = 'peoples' WHERE menu_id = 10051; -- 质量管理 +UPDATE sys_menu SET icon = 'shopping' WHERE menu_id = 10061; -- 手术安全核查 +UPDATE sys_menu SET icon = 'guide' WHERE menu_id = 10071; -- 临床路径 +UPDATE sys_menu SET icon = 'anesthesia' WHERE menu_id = 20001; -- 麻醉管理 +UPDATE sys_menu SET icon = 'medication' WHERE menu_id = 20011; -- 合理用药 +UPDATE sys_menu SET icon = 'emergency' WHERE menu_id = 20021; -- 急诊管理 +UPDATE sys_menu SET icon = 'nursing' WHERE menu_id = 20031; -- 护理管理 +UPDATE sys_menu SET icon = 'pathology' WHERE menu_id = 20041; -- 病理管理 +UPDATE sys_menu SET icon = 'medical-record' WHERE menu_id = 20051; -- 病案管理 +UPDATE sys_menu SET icon = 'radiology' WHERE menu_id = 20061; -- 影像管理 +UPDATE sys_menu SET icon = 'follow-up' WHERE menu_id = 20071; -- 随访管理 +UPDATE sys_menu SET icon = 'monitor' WHERE menu_id = 20081; -- ESB管理 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20091; -- 检查检验 +UPDATE sys_menu SET icon = 'consent' WHERE menu_id = 20101; -- 知情同意管理 +UPDATE sys_menu SET icon = 'order' WHERE menu_id = 20111; -- 医嘱闭环 +UPDATE sys_menu SET icon = 'audit' WHERE menu_id = 20131; -- 审核管理 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20141; -- 跨模块协同 +UPDATE sys_menu SET icon = 'sample' WHERE menu_id = 20151; -- 标本管理 +UPDATE sys_menu SET icon = 'standard' WHERE menu_id = 20161; -- FHIR/CDA标准 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20201; -- 电子病历管理 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20211; -- 检验增强 + +-- ========== 二级菜单图标更新 ========== +-- 系统管理子菜单 +UPDATE sys_menu SET icon = 'user' WHERE menu_id = 100; -- 用户管理 +UPDATE sys_menu SET icon = 'peoples' WHERE menu_id = 101; -- 角色管理 +UPDATE sys_menu SET icon = 'post' WHERE menu_id = 104; -- 岗位管理 +UPDATE sys_menu SET icon = 'system' WHERE menu_id = 102; -- 菜单管理 +UPDATE sys_menu SET icon = 'tree-table' WHERE menu_id = 103; -- 部门管理 +UPDATE sys_menu SET icon = 'dict' WHERE menu_id = 105; -- 字典管理 +UPDATE sys_menu SET icon = 'edit' WHERE menu_id = 106; -- 参数设置 +UPDATE sys_menu SET icon = 'message' WHERE menu_id = 107; -- 通知公告 + +-- 系统监控子菜单 +UPDATE sys_menu SET icon = 'online' WHERE menu_id = 109; -- 在线用户 +UPDATE sys_menu SET icon = 'job' WHERE menu_id = 110; -- 定时任务 +UPDATE sys_menu SET icon = 'druid' WHERE menu_id = 111; -- 数据监控 +UPDATE sys_menu SET icon = 'server' WHERE menu_id = 112; -- 服务监控 +UPDATE sys_menu SET icon = 'monitor' WHERE menu_id = 113; -- 缓存监控 +UPDATE sys_menu SET icon = 'log' WHERE menu_id = 2104; -- 监控日志 + +-- 系统工具子菜单 +UPDATE sys_menu SET icon = 'form' WHERE menu_id = 115; -- 表单构建 +UPDATE sys_menu SET icon = 'code' WHERE menu_id = 116; -- 代码生成 +UPDATE sys_menu SET icon = 'swagger' WHERE menu_id = 117; -- 系统接口 + +-- 日志管理子菜单 +UPDATE sys_menu SET icon = 'log' WHERE menu_id = 500; -- 操作日志 +UPDATE sys_menu SET icon = 'log' WHERE menu_id = 501; -- 登录日志 + +-- 住院管理子菜单 +UPDATE sys_menu SET icon = 'doctor' WHERE menu_id = 288; -- 住院医生工作站 +UPDATE sys_menu SET icon = 'nurse' WHERE menu_id = 295; -- 住院护士站 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 307; -- 住院收费工作站 +UPDATE sys_menu SET icon = 'doctor' WHERE menu_id = 20171; -- 住院医生增强 +UPDATE sys_menu SET icon = 'nurse' WHERE menu_id = 20181; -- 住院护士增强 +UPDATE sys_menu SET icon = 'hospital' WHERE menu_id = 20221; -- 住院辅助 + +-- 药库管理子菜单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2049; -- 药库订货单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2050; -- 药库退货单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2051; -- 药库进货单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2053; -- 药库出库单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2054; -- 药库退库单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2055; -- 药库损益单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2056; -- 药库盘点单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2058; -- 库房单据管理 + +-- 门诊管理子菜单 +UPDATE sys_menu SET icon = 'doctor' WHERE menu_id = 269; -- 门诊工作站 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 277; -- 医技工作站 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 282; -- 门诊收费工作站 + +-- 门诊工作站子菜单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 272; -- 门诊退药 +UPDATE sys_menu SET icon = 'registration' WHERE menu_id = 274; -- 门诊退号 + +-- 门诊收费工作站子菜单 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 283; -- 门诊收费 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 284; -- 门诊退费 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 285; -- 门诊划价 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 287; -- 收费详情查询 + +-- 药房管理子菜单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 343; -- 门诊发药 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 344; -- 门诊退药 + +-- 住院护士站子菜单 +UPDATE sys_menu SET icon = 'nurse' WHERE menu_id = 296; -- 门户 +UPDATE sys_menu SET icon = 'admission' WHERE menu_id = 297; -- 入出转管理 +UPDATE sys_menu SET icon = 'nursing' WHERE menu_id = 298; -- 护理记录 +UPDATE sys_menu SET icon = 'vital-signs' WHERE menu_id = 299; -- 三测单 +UPDATE sys_menu SET icon = 'order' WHERE menu_id = 2061; -- 医嘱执行 +UPDATE sys_menu SET icon = 'order' WHERE menu_id = 2064; -- 医嘱校对 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 301; -- 汇总发药申请 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 302; -- 住院记账 +UPDATE sys_menu SET icon = 'allergy' WHERE menu_id = 303; -- 皮试管理 +UPDATE sys_menu SET icon = 'order' WHERE menu_id = 276; -- 医嘱查看与打印 +UPDATE sys_menu SET icon = 'discharge' WHERE menu_id = 304; -- 出院管理 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 305; -- 退药管理 +UPDATE sys_menu SET icon = 'surgery' WHERE menu_id = 306; -- 手术记录 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 2062; -- 住院领药 + +-- 住院收费工作站子菜单 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 308; -- 费用管理 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 309; -- 住院费用结算 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 311; -- 住院收费详情 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 312; -- 中途结算 + +-- 财务管理子菜单 +UPDATE sys_menu SET icon = 'finance' WHERE menu_id = 354; -- 日结结算单管理 +UPDATE sys_menu SET icon = 'finance' WHERE menu_id = 356; -- 药房对账 +UPDATE sys_menu SET icon = 'finance' WHERE menu_id = 357; -- 库房审批 +UPDATE sys_menu SET icon = 'insurance' WHERE menu_id = 358; -- 医保结算 +UPDATE sys_menu SET icon = 'insurance' WHERE menu_id = 359; -- 医保对账 + +-- 报表管理子菜单 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 213; -- 门诊就诊记录 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 208; -- 项目定价 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 262; -- 门诊收费报表 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 363; -- 费用整体查询 + +-- 医保管理子菜单 +UPDATE sys_menu SET icon = 'insurance' WHERE menu_id = 390; -- 省医保 +UPDATE sys_menu SET icon = 'insurance' WHERE menu_id = 391; -- 市医保 +UPDATE sys_menu SET icon = 'insurance' WHERE menu_id = 392; -- 医保对账 +UPDATE sys_menu SET icon = 'insurance' WHERE menu_id = 394; -- 医保结算 + +-- 检查检验子菜单 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20092; -- 检查申请 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20093; -- 检查仪器 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20094; -- LIS配置 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20095; -- 检验组套 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20096; -- 标本采集 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20097; -- 标本类型 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20098; -- 观察项目 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20099; -- 检验增强 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20100; -- 检验ICD10 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20102; -- 检验预约 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20103; -- 检验路径 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20104; -- 参考范围 +UPDATE sys_menu SET icon = 'radiology' WHERE menu_id = 20105; -- 放射报告 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 20106; -- 检验历史 + +-- 院感管理子菜单 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10002; -- 感染病例监测 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10003; -- 手卫生监测 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10004; -- 环境监测 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10005; -- 抗菌药物使用 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10006; -- 多重耐药菌 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10007; -- 职业暴露 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10008; -- 疫情预警 +UPDATE sys_menu SET icon = 'infection' WHERE menu_id = 10009; -- 目标性监测 + +-- 药品追溯管理子菜单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 10012; -- 追溯码管理 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 10013; -- 批次管理 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 10014; -- 扫码记录 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 10015; -- 追溯预警 + +-- 麻醉管理子菜单 +UPDATE sys_menu SET icon = 'anesthesia' WHERE menu_id = 20002; -- 麻醉记录 +UPDATE sys_menu SET icon = 'anesthesia' WHERE menu_id = 20003; -- 麻醉增强 + +-- 合理用药子菜单 +UPDATE sys_menu SET icon = 'medication' WHERE menu_id = 20012; -- 抗菌药物规则 +UPDATE sys_menu SET icon = 'medication' WHERE menu_id = 20013; -- 药物相互作用 +UPDATE sys_menu SET icon = 'medication' WHERE menu_id = 20014; -- 审核日志 +UPDATE sys_menu SET icon = 'medication' WHERE menu_id = 20015; -- 合理用药统计 + +-- 急诊管理子菜单 +UPDATE sys_menu SET icon = 'emergency' WHERE menu_id = 20022; -- 急诊分诊 +UPDATE sys_menu SET icon = 'emergency' WHERE menu_id = 20023; -- 急诊抢救 +UPDATE sys_menu SET icon = 'emergency' WHERE menu_id = 20024; -- 急诊观察 +UPDATE sys_menu SET icon = 'emergency' WHERE menu_id = 20025; -- 绿色通道 + +-- 护理管理子菜单 +UPDATE sys_menu SET icon = 'nursing' WHERE menu_id = 20032; -- 护理评估 +UPDATE sys_menu SET icon = 'nursing' WHERE menu_id = 20033; -- 护理增强 +UPDATE sys_menu SET icon = 'nursing' WHERE menu_id = 20034; -- 护理执行 +UPDATE sys_menu SET icon = 'nursing' WHERE menu_id = 20035; -- 护理质量 +UPDATE sys_menu SET icon = 'vital-signs' WHERE menu_id = 20036; -- 生命体征图表 + +-- 病理管理子菜单 +UPDATE sys_menu SET icon = 'pathology' WHERE menu_id = 20042; -- 病理医嘱 +UPDATE sys_menu SET icon = 'pathology' WHERE menu_id = 20043; -- 病理报告 +UPDATE sys_menu SET icon = 'pathology' WHERE menu_id = 20044; -- 病理标本 + +-- 病案管理子菜单 +UPDATE sys_menu SET icon = 'medical-record' WHERE menu_id = 20052; -- 病案管理 +UPDATE sys_menu SET icon = 'medical-record' WHERE menu_id = 20053; -- 病案首页管理 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 20054; -- DRG分析 +UPDATE sys_menu SET icon = 'report' WHERE menu_id = 20055; -- 病案统计 + +-- 影像管理子菜单 +UPDATE sys_menu SET icon = 'radiology' WHERE menu_id = 20062; -- 影像增强 +UPDATE sys_menu SET icon = 'radiology' WHERE menu_id = 20063; -- 影像对比 +UPDATE sys_menu SET icon = 'radiology' WHERE menu_id = 20064; -- 3D重建 + +-- 随访管理子菜单 +UPDATE sys_menu SET icon = 'follow-up' WHERE menu_id = 20072; -- 随访计划 +UPDATE sys_menu SET icon = 'follow-up' WHERE menu_id = 20073; -- 随访记录 +UPDATE sys_menu SET icon = 'follow-up' WHERE menu_id = 20074; -- 随访任务 +UPDATE sys_menu SET icon = 'follow-up' WHERE menu_id = 20075; -- 随访调查 + +-- 电子病历管理子菜单 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20202; -- 病案归档 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20203; -- 修订历史 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20204; -- 病历时效 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20205; -- 病历检索 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20206; -- 进程记录 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20207; -- 知识库 + +-- 审核管理子菜单 +UPDATE sys_menu SET icon = 'audit' WHERE menu_id = 20132; -- 审核统计 +UPDATE sys_menu SET icon = 'audit' WHERE menu_id = 20133; -- 点评计划 +UPDATE sys_menu SET icon = 'audit' WHERE menu_id = 20134; -- 点评工作台 +UPDATE sys_menu SET icon = 'audit' WHERE menu_id = 20135; -- 点评记录 +UPDATE sys_menu SET icon = 'audit' WHERE menu_id = 20136; -- 医生排名 + +-- 跨模块协同子菜单 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20142; -- 会诊反馈 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20143; -- 会诊超时 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20144; -- DRG绩效 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20145; -- 药品效期 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20146; -- 增强救护 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20147; -- 增强抗菌 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20148; -- 增强知情 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20149; -- DRG预警 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20150; -- 增强护理 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20152; -- 交接统计 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20153; -- 检验预警 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20154; -- 病案质量 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20155; -- 护士执行 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20156; -- 报告反馈 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20157; -- 审核统计 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20158; -- 库存拦截 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20159; -- 手术闭环 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20160; -- 手术关联 +UPDATE sys_menu SET icon = 'teamwork' WHERE menu_id = 20162; -- 患者转运 + +-- 门诊医生工作站子菜单 +UPDATE sys_menu SET icon = 'doctor' WHERE menu_id = 2114; -- 医生常用语 +UPDATE sys_menu SET icon = 'doctor' WHERE menu_id = 2143; -- 今日门诊 + +-- 预约管理子菜单 +UPDATE sys_menu SET icon = 'schedule' WHERE menu_id = 2105; -- 医生排班管理 +UPDATE sys_menu SET icon = 'appointment' WHERE menu_id = 2097; -- 门诊出诊医生诊室设置 +UPDATE sys_menu SET icon = 'appointment' WHERE menu_id = 2112; -- 科室预约工作时间维护 +UPDATE sys_menu SET icon = 'appointment' WHERE menu_id = 2113; -- 门诊预约挂号 + +-- 手术管理子菜单 +UPDATE sys_menu SET icon = 'surgery' WHERE menu_id = 2120; -- 手术管理 +UPDATE sys_menu SET icon = 'surgery' WHERE menu_id = 2144; -- 手术室管理 + +-- 住院医生增强子菜单 +UPDATE sys_menu SET icon = 'doctor' WHERE menu_id = 20172; -- 住院病历 + +-- 住院护士增强子菜单 +UPDATE sys_menu SET icon = 'nurse' WHERE menu_id = 20182; -- 护士工作站 +UPDATE sys_menu SET icon = 'nurse' WHERE menu_id = 20183; -- 退药管理 +UPDATE sys_menu SET icon = 'nurse' WHERE menu_id = 20184; -- 滚费管理 +UPDATE sys_menu SET icon = 'vital-signs' WHERE menu_id = 20185; -- TPR表 + +-- 住院辅助子菜单 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 20222; -- 住院结算 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 20223; -- 费用类型转换 +UPDATE sys_menu SET icon = 'diagnosis' WHERE menu_id = 20224; -- 住院诊断 +UPDATE sys_menu SET icon = 'emr' WHERE menu_id = 20225; -- 住院病历 +UPDATE sys_menu SET icon = 'order' WHERE menu_id = 20226; -- 医嘱管理 +UPDATE sys_menu SET icon = 'surgery' WHERE menu_id = 20228; -- 住院手术 + +-- 基础数据子菜单 +UPDATE sys_menu SET icon = 'patient' WHERE menu_id = 205; -- 患者管理 +UPDATE sys_menu SET icon = 'patient' WHERE menu_id = 206; -- 患者档案管理 +UPDATE sys_menu SET icon = 'department' WHERE menu_id = 212; -- 科室管理 +UPDATE sys_menu SET icon = 'supplier' WHERE menu_id = 214; -- 供应商管理 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 216; -- 挂号收费项目 +UPDATE sys_menu SET icon = 'pharmacy' WHERE menu_id = 238; -- 库房/药房管理 +UPDATE sys_menu SET icon = 'appointment' WHERE menu_id = 245; -- 门诊号源管理 +UPDATE sys_menu SET icon = 'user' WHERE menu_id = 246; -- 客户数据 +UPDATE sys_menu SET icon = 'bed-management' WHERE menu_id = 247; -- 病区/床位管理 + +-- 目录管理子菜单 +UPDATE sys_menu SET icon = 'drug' WHERE menu_id = 201; -- 药品目录 +UPDATE sys_menu SET icon = 'laboratory' WHERE menu_id = 202; -- 诊疗目录 +UPDATE sys_menu SET icon = 'inventory' WHERE menu_id = 203; -- 耗材目录 +UPDATE sys_menu SET icon = 'diagnosis' WHERE menu_id = 204; -- 诊断目录 + +-- 基础数据子菜单 - 新增 +UPDATE sys_menu SET icon = 'bed-management' WHERE menu_id = 20257; -- 床体管理 +UPDATE sys_menu SET icon = 'body' WHERE menu_id = 20258; -- 体表结构 +UPDATE sys_menu SET icon = 'diagnosis' WHERE menu_id = 20259; -- 常用诊断 +UPDATE sys_menu SET icon = 'billing' WHERE menu_id = 20260; -- 费用管理 +UPDATE sys_menu SET icon = 'location' WHERE menu_id = 20261; -- 位置管理 +UPDATE sys_menu SET icon = 'order' WHERE menu_id = 20262; -- 医嘱组合 +UPDATE sys_menu SET icon = 'medication' WHERE menu_id = 20263; -- 中医处方 + +-- 为剩余没有图标的菜单设置默认图标 +UPDATE sys_menu SET icon = 'list' WHERE menu_type = 'C' AND (icon IS NULL OR icon = ''); +UPDATE sys_menu SET icon = 'list' WHERE menu_type = 'M' AND (icon IS NULL OR icon = ''); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V78__tcm_diagnosis_table.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V78__tcm_diagnosis_table.sql new file mode 100644 index 000000000..8fcc59dc9 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V78__tcm_diagnosis_table.sql @@ -0,0 +1,22 @@ +-- TCM diagnosis table +CREATE TABLE IF NOT EXISTS healthlink_his.tcm_diagnosis ( + id BIGSERIAL PRIMARY KEY, + encounter_id BIGINT, + patient_id BIGINT, + diagnosis_type VARCHAR(50), + diagnosis_name VARCHAR(200), + diagnosis_code VARCHAR(50), + syndrome_type VARCHAR(50), + syndrome_name VARCHAR(200), + syndrome_code VARCHAR(50), + remark TEXT, + enabled CHAR(1) DEFAULT '1', + tenant_id INTEGER DEFAULT 0, + delete_flag CHAR(1) DEFAULT '0', + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP +); + +CREATE INDEX IF NOT EXISTS idx_tcm_diagnosis_encounter ON healthlink_his.tcm_diagnosis(encounter_id); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V79__epidemic_report_enhance.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V79__epidemic_report_enhance.sql new file mode 100644 index 000000000..0901c3def --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V79__epidemic_report_enhance.sql @@ -0,0 +1,6 @@ +-- Add auto-screen fields to epidemic_report +ALTER TABLE healthlink_his.epidemic_report ADD COLUMN IF NOT EXISTS screen_result TEXT; +ALTER TABLE healthlink_his.epidemic_report ADD COLUMN IF NOT EXISTS screen_time TIMESTAMP; +ALTER TABLE healthlink_his.epidemic_report ADD COLUMN IF NOT EXISTS screen_level VARCHAR(20); +ALTER TABLE healthlink_his.epidemic_report ADD COLUMN IF NOT EXISTS address VARCHAR(500); +ALTER TABLE healthlink_his.epidemic_report ADD COLUMN IF NOT EXISTS contact_phone VARCHAR(50); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V75__mr_stats_detail.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V80__mr_stats_detail.sql similarity index 100% rename from healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V75__mr_stats_detail.sql rename to healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V80__mr_stats_detail.sql diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V81__fix_menu_permissions.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V81__fix_menu_permissions.sql new file mode 100644 index 000000000..6d0ac524d --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V81__fix_menu_permissions.sql @@ -0,0 +1,11 @@ +UPDATE sys_menu SET perms = 'mrhomepage:mrhomepage:list' WHERE menu_name = '病案统计明细' AND perms = 'infection:mrhomepage:list'; +UPDATE sys_menu SET perms = 'reportmanage:report:list' WHERE menu_name = '报表维度' AND perms = 'infection:report:list'; + +INSERT INTO sys_role_menu (role_id, menu_id) VALUES +(1, (SELECT menu_id FROM sys_menu WHERE menu_name = 'CDSS告警' LIMIT 1)), +(1, (SELECT menu_id FROM sys_menu WHERE menu_name = 'CDSS规则' LIMIT 1)), +(1, (SELECT menu_id FROM sys_menu WHERE menu_name = '区域共享' LIMIT 1)), +(1, (SELECT menu_id FROM sys_menu WHERE menu_name = 'EMR数据仓库' LIMIT 1)), +(1, (SELECT menu_id FROM sys_menu WHERE menu_name = '病案统计明细' LIMIT 1)), +(1, (SELECT menu_id FROM sys_menu WHERE menu_name = '报表维度' LIMIT 1)) +ON CONFLICT DO NOTHING; diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V82__fix_delete_flag.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V82__fix_delete_flag.sql new file mode 100644 index 000000000..d8c1f9cb7 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V82__fix_delete_flag.sql @@ -0,0 +1,112 @@ +ALTER TABLE nursing_assessment RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE nursing_care_plan RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE nursing_handoff RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE critical_value RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE hir_infection_case RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE hir_occupational_exposure RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE antibiotic_class_rule RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE blood_transfusion_record RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE blood_transfusion_observation RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE emr_quality_score RENAME COLUMN del_flag TO delete_flag; +ALTER TABLE emr_defect RENAME COLUMN del_flag TO delete_flag; + +ALTER TABLE antibiotic_approval DROP COLUMN IF EXISTS del_flag; + +ALTER TABLE sys_informed_consent RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE sys_informed_consent ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE sys_informed_consent SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE sys_informed_consent ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE sys_informed_consent ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE hir_outbreak_warning RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE hir_outbreak_warning ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE hir_outbreak_warning SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE hir_outbreak_warning ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE hir_outbreak_warning ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE hir_targeted_surveillance RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE hir_targeted_surveillance ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE hir_targeted_surveillance SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE hir_targeted_surveillance ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE hir_targeted_surveillance ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE hir_hand_hygiene RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE hir_hand_hygiene ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE hir_hand_hygiene SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE hir_hand_hygiene ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE hir_hand_hygiene ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE hir_multi_drug_resistant RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE hir_multi_drug_resistant ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE hir_multi_drug_resistant SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE hir_multi_drug_resistant ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE hir_multi_drug_resistant ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE hir_environmental_monitor RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE hir_environmental_monitor ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE hir_environmental_monitor SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE hir_environmental_monitor ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE hir_environmental_monitor ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE mr_borrowing RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE mr_borrowing ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE mr_borrowing SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE mr_borrowing ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE mr_borrowing ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE mr_sealing RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE mr_sealing ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE mr_sealing SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE mr_sealing ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE mr_sealing ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE mr_tracking RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE mr_tracking ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE mr_tracking SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE mr_tracking ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE mr_tracking ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE mr_death_discussion RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE mr_death_discussion ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE mr_death_discussion SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE mr_death_discussion ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE mr_death_discussion ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE nursing_assessment_reminder RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE nursing_assessment_reminder ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE nursing_assessment_reminder SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE nursing_assessment_reminder ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE nursing_assessment_reminder ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE nursing_care_plan DROP COLUMN IF EXISTS is_deleted; + +ALTER TABLE esb_fhir_resource RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE esb_fhir_resource ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE esb_fhir_resource SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE esb_fhir_resource ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE esb_fhir_resource ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE esb_cda_document RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE esb_cda_document ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE esb_cda_document SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE esb_cda_document ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE esb_cda_document ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE esb_code_mapping RENAME COLUMN is_deleted TO delete_flag; +ALTER TABLE esb_code_mapping ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE esb_code_mapping SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE esb_code_mapping ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE esb_code_mapping ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE cdss_rule ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE cdss_rule SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE cdss_rule ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE cdss_rule ALTER COLUMN delete_flag SET NOT NULL; + +ALTER TABLE cdss_alert ALTER COLUMN delete_flag TYPE VARCHAR(1); +UPDATE cdss_alert SET delete_flag = '0' WHERE delete_flag IS NULL; +ALTER TABLE cdss_alert ALTER COLUMN delete_flag SET DEFAULT '0'; +ALTER TABLE cdss_alert ALTER COLUMN delete_flag SET NOT NULL; + +DROP INDEX IF EXISTS idx_cdss_rule_code; +CREATE UNIQUE INDEX idx_cdss_rule_code ON cdss_rule(rule_code) WHERE delete_flag = '0'; diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql new file mode 100644 index 000000000..f893232f3 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql @@ -0,0 +1,32 @@ +DO $$ BEGIN + ALTER TABLE emr_quality_score ADD COLUMN total_score DECIMAL(5,2); + ALTER TABLE emr_quality_score ADD COLUMN completeness_score DECIMAL(5,2); + ALTER TABLE emr_quality_score ADD COLUMN timeliness_score DECIMAL(5,2); + ALTER TABLE emr_quality_score ADD COLUMN accuracy_score DECIMAL(5,2); +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'emr_quality_score columns already exist'; +END $$; + +DO $$ BEGIN + ALTER TABLE emr_quality_score ALTER COLUMN tenant_id TYPE BIGINT USING tenant_id::BIGINT; +EXCEPTION WHEN undefined_column THEN + RAISE NOTICE 'emr_quality_score.tenant_id does not exist'; +END $$; + +DO $$ BEGIN + ALTER TABLE sys_esb_message ADD COLUMN delete_flag CHAR(1) DEFAULT '0'; +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'sys_esb_message.delete_flag already exists'; +END $$; + +DO $$ BEGIN + ALTER TABLE sys_esb_service_registry ADD COLUMN delete_flag CHAR(1) DEFAULT '0'; +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'sys_esb_service_registry.delete_flag already exists'; +END $$; + +DO $$ BEGIN + ALTER TABLE sys_esb_service_registry ADD COLUMN tenant_id INTEGER DEFAULT 0; +EXCEPTION WHEN duplicate_column THEN + RAISE NOTICE 'sys_esb_service_registry.tenant_id already exists'; +END $$; diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml index 158fff3e4..d5f366445 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml @@ -184,7 +184,7 @@ LEFT JOIN fin_payment_reconciliation T13 ON T10.id::TEXT = ANY(string_to_array(T13.charge_item_ids,',')) AND T13.delete_flag = '0' - AND T13.status_enum = ${paymentStatus} + AND T13.status_enum = #{paymentStatus} -- 关联退号记录(当状态为退号时,通过relation_id关联原支付记录) LEFT JOIN fin_payment_reconciliation T14 ON T13.id = T14.relation_id diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index 739d2fa73..c3d1b540c 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -117,7 +117,7 @@ ) - AND (t1.name ILIKE '%' || '${searchKey}' || '%' OR t1.py_str ILIKE '%' || '${searchKey}' || '%') + AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%') AND t1.id IN @@ -190,7 +190,7 @@ WHERE t1.delete_flag = '0' AND t1.status_enum = #{statusEnum} - AND (t1.name ILIKE '%' || '${searchKey}' || '%' OR t1.py_str ILIKE '%' || '${searchKey}' || '%') + AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%') AND t1.category_code = #{categoryCode} @@ -287,7 +287,7 @@ AND T1.category_code != '手术' AND T1.category_code != '24' - AND (t1.name ILIKE '%' || '${searchKey}' || '%' OR t1.py_str ILIKE '%' || '${searchKey}' || '%') + AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%') AND t1.category_code = #{categoryCode} @@ -380,7 +380,7 @@ AND T1.inventory_status_enum = #{status} AND T1.expiration_date > NOW() - AND T1.item_table IN ( ${SqlCondition} ) + AND T1.item_table IN ('med_medication_definition', 'adm_device_definition') order by T1.expiration_date diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/tencentJH/TencentAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/tencentJH/TencentAppMapper.xml index 79ee93247..82069f2a3 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/tencentJH/TencentAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/tencentJH/TencentAppMapper.xml @@ -92,7 +92,7 @@ LEFT JOIN fin_payment_reconciliation T13 ON T10.id::TEXT = ANY(string_to_array(T13.charge_item_ids,',')) AND T13.delete_flag = '0' - AND T13.status_enum = ${paymentStatus} + AND T13.status_enum = #{paymentStatus} LEFT JOIN adm_invoice AS ai ON ai.reconciliation_id = T13.id AND ai.delete_flag = '0' LEFT JOIN order_main AS om ON T1.order_id = om.id AND om.delete_flag = '0' diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChangePriceRecordServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChangePriceRecordServiceImpl.java index 33b440bb2..070fb5e9a 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChangePriceRecordServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChangePriceRecordServiceImpl.java @@ -87,7 +87,7 @@ public class ChangePriceRecordServiceImpl extends ServiceImpl().eq(ChangePriceRecord::getBusNo, busNo) .set(ChangePriceRecord::getApprovalTime, now) - .set(ChangePriceRecord::getApproverId, SecurityUtils.getLoginUser().getPractitionerId()) + .set(ChangePriceRecord::getApproverId, SecurityUtils.getPractitionerId()) .set(ChangePriceRecord::getStatusEnum, SupplyStatus.AGREE.getValue())); } @@ -96,7 +96,7 @@ public class ChangePriceRecordServiceImpl extends ServiceImpl().eq(ChangePriceRecord::getBusNo, busNo) .set(ChangePriceRecord::getApprovalTime, DateUtils.getNowDate()) - .set(ChangePriceRecord::getApproverId, SecurityUtils.getLoginUser().getPractitionerId()) + .set(ChangePriceRecord::getApproverId, SecurityUtils.getPractitionerId()) .set(ChangePriceRecord::getStatusEnum, SupplyStatus.REJECT.getValue())); return updateCount > 0; } diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChargeItemServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChargeItemServiceImpl.java index 4c5ea10ee..4f19918ef 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChargeItemServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/administration/service/impl/ChargeItemServiceImpl.java @@ -163,7 +163,7 @@ public class ChargeItemServiceImpl extends ServiceImpl() .eq(ChargeItem::getId, chargeItemId) .eq(ChargeItem::getStatusEnum, currentChargeItem.getStatusEnum()) // 使用当前状态作为条件 diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/clinical/service/impl/ConditionServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/clinical/service/impl/ConditionServiceImpl.java index 323eb4ae7..087f224d3 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/clinical/service/impl/ConditionServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/clinical/service/impl/ConditionServiceImpl.java @@ -30,7 +30,7 @@ public class ConditionServiceImpl extends ServiceImpl { -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/CdssRuleMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/CdssRuleMapper.java deleted file mode 100644 index 44e5f66e3..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/CdssRuleMapper.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.healthlink.his.infection.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.infection.domain.CdssRule; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface CdssRuleMapper extends BaseMapper { -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ICdssAlertService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ICdssAlertService.java deleted file mode 100644 index 2bdfdee86..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ICdssAlertService.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.healthlink.his.infection.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.healthlink.his.infection.domain.CdssAlert; - -public interface ICdssAlertService extends IService { -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ICdssRuleService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ICdssRuleService.java deleted file mode 100644 index 4c8b8f104..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ICdssRuleService.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.healthlink.his.infection.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.healthlink.his.infection.domain.CdssRule; - -public interface ICdssRuleService extends IService { -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/CdssAlertServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/CdssAlertServiceImpl.java deleted file mode 100644 index 75c38e3ff..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/CdssAlertServiceImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.healthlink.his.infection.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.infection.domain.CdssAlert; -import com.healthlink.his.infection.mapper.CdssAlertMapper; -import com.healthlink.his.infection.service.ICdssAlertService; -import org.springframework.stereotype.Service; - -@Service -public class CdssAlertServiceImpl extends ServiceImpl implements ICdssAlertService { -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/CdssRuleServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/CdssRuleServiceImpl.java deleted file mode 100644 index ca45560aa..000000000 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/CdssRuleServiceImpl.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.healthlink.his.infection.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.healthlink.his.infection.domain.CdssRule; -import com.healthlink.his.infection.mapper.CdssRuleMapper; -import com.healthlink.his.infection.service.ICdssRuleService; -import org.springframework.stereotype.Service; - -@Service -public class CdssRuleServiceImpl extends ServiceImpl implements ICdssRuleService { -} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/orderclosedloop/mapper/OrderExecuteRecordMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/orderclosedloop/mapper/OrderExecuteRecordMapper.java index 079f5b3f8..686217082 100644 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/orderclosedloop/mapper/OrderExecuteRecordMapper.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/orderclosedloop/mapper/OrderExecuteRecordMapper.java @@ -15,40 +15,46 @@ public interface OrderExecuteRecordMapper extends BaseMapper @Select("SELECT m.department_name FROM order_main m WHERE m.order_no = #{orderNo} AND m.delete_flag = '0' LIMIT 1") String findDepartmentByOrderNo(@Param("orderNo") String orderNo); - @Select("SELECT e.order_type AS orderType, " + - "COUNT(*) AS totalOrders, " + - "COUNT(CASE WHEN e.execute_status = 'completed' THEN 1 END) AS closedCount " + + @Select("SELECT e.order_type AS \"orderType\", " + + "COUNT(*) AS \"totalOrders\", " + + "COUNT(CASE WHEN e.execute_status = 'completed' THEN 1 END) AS \"closedCount\" " + "FROM order_execute_record e " + "WHERE e.delete_flag = '0' AND e.execute_status != 'cancelled' " + "GROUP BY e.order_type") List> selectOverviewByType(); - @Select("SELECT COALESCE(m.department_name, '未知') AS department, " + - "COUNT(*) AS totalOrders, " + - "COUNT(CASE WHEN e.execute_status = 'completed' THEN 1 END) AS closedCount " + + @Select("SELECT COALESCE(m.department_name, '未知') AS \"department\", " + + "COUNT(*) AS \"totalOrders\", " + + "COUNT(CASE WHEN e.execute_status = 'completed' THEN 1 END) AS \"closedCount\" " + "FROM order_execute_record e " + "LEFT JOIN order_main m ON e.order_no = m.order_no AND m.delete_flag = '0' " + "WHERE e.delete_flag = '0' AND e.execute_status != 'cancelled' " + - "GROUP BY m.department_name ORDER BY totalOrders DESC") + "GROUP BY m.department_name ORDER BY \"totalOrders\" DESC") List> selectGroupByDepartment(); - @Select("SELECT COALESCE(m.doctor_name, '未知') AS doctorName, " + - "COUNT(*) AS totalOrders, " + - "COUNT(CASE WHEN e.execute_status = 'completed' THEN 1 END) AS closedCount " + + @Select("SELECT COALESCE(m.doctor_name, '未知') AS \"doctorName\", " + + "COUNT(*) AS \"totalOrders\", " + + "COUNT(CASE WHEN e.execute_status = 'completed' THEN 1 END) AS \"closedCount\" " + "FROM order_execute_record e " + "LEFT JOIN order_main m ON e.order_no = m.order_no AND m.delete_flag = '0' " + "WHERE e.delete_flag = '0' AND e.execute_status != 'cancelled' " + - "GROUP BY m.doctor_name ORDER BY totalOrders DESC") + "GROUP BY m.doctor_name ORDER BY \"totalOrders\" DESC") List> selectGroupByDoctor(); - @Select("SELECT e.order_no AS orderNo, e.patient_name AS patientName, e.order_type AS orderType, " + - "COALESCE(m.department_name, '未知') AS department, " + - "COALESCE(m.doctor_name, '未知') AS doctorName, " + - "e.current_step AS currentStep, e.create_time AS orderTime " + + @Select("SELECT COUNT(*) FROM order_execute_record e " + + "WHERE e.delete_flag = '0' " + + "AND e.execute_status IN ('pending', 'in_progress', 'overdue', 'executing')") + long countUnclosedWarnings(); + + @Select("SELECT e.order_no AS \"orderNo\", e.patient_name AS \"patientName\", e.order_type AS \"orderType\", " + + "COALESCE(m.department_name, '未知') AS \"department\", " + + "COALESCE(m.doctor_name, '未知') AS \"doctorName\", " + + "e.current_step AS \"currentStep\", e.create_time AS \"orderTime\" " + "FROM order_execute_record e " + "LEFT JOIN order_main m ON e.order_no = m.order_no AND m.delete_flag = '0' " + "WHERE e.delete_flag = '0' " + "AND e.execute_status IN ('pending', 'in_progress', 'overdue', 'executing') " + - "ORDER BY e.create_time DESC") - List> selectUnclosedWarnings(); + "ORDER BY e.create_time DESC " + + "LIMIT #{limit} OFFSET #{offset}") + List> selectUnclosedWarningsPaged(@Param("limit") int limit, @Param("offset") int offset); } \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/domain/EmrQualityScore.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/domain/QualityScore.java similarity index 93% rename from healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/domain/EmrQualityScore.java rename to healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/domain/QualityScore.java index 895d0182a..83b16ecc1 100644 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/domain/EmrQualityScore.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/domain/QualityScore.java @@ -6,9 +6,9 @@ import com.core.common.core.domain.HisBaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.math.BigDecimal; @Data @TableName("emr_quality_score") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) -public class EmrQualityScore extends HisBaseEntity { +public class QualityScore extends HisBaseEntity { @TableId(type = IdType.ASSIGN_ID) private Long id; private Long encounterId; private Long patientId; private String emrType; private BigDecimal score; private BigDecimal maxScore; private String grade; private Long checkerId; private String checkerName; private String checkType; private String remark; private String delFlag; -} +} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/mapper/EmrQualityScoreMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/mapper/QualityScoreMapper.java similarity index 50% rename from healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/mapper/EmrQualityScoreMapper.java rename to healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/mapper/QualityScoreMapper.java index 46a337123..27808bcd6 100644 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/mapper/EmrQualityScoreMapper.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/quality/mapper/QualityScoreMapper.java @@ -1,5 +1,5 @@ package com.healthlink.his.quality.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.healthlink.his.quality.domain.EmrQualityScore; +import com.healthlink.his.quality.domain.QualityScore; import org.apache.ibatis.annotations.Mapper; -@Mapper public interface EmrQualityScoreMapper extends BaseMapper {} +@Mapper public interface QualityScoreMapper extends BaseMapper {} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/ServiceRequestServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/ServiceRequestServiceImpl.java index eeb977fac..28f16a8e7 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/ServiceRequestServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/ServiceRequestServiceImpl.java @@ -61,7 +61,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl serReqIdList, Long practitionerId, Date checkDate) { baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.COMPLETED.getValue()) - .setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()), + .setPerformerCheckId(SecurityUtils.getPractitionerId()).setCheckTime(DateUtils.getNowDate()), new LambdaUpdateWrapper().in(ServiceRequest::getId, serReqIdList) .eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode())); } @@ -74,7 +74,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl serReqIdList, Long practitionerId, Date checkDate) { baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.CHECK_VERIFIED.getValue()) - .setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()), + .setPerformerCheckId(SecurityUtils.getPractitionerId()).setCheckTime(DateUtils.getNowDate()), new LambdaUpdateWrapper().in(ServiceRequest::getId, serReqIdList) .eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode())); } @@ -200,7 +200,7 @@ public class ServiceRequestServiceImpl extends ServiceImpl serviceRequestIdList, Long practitionerId, Date checkDate, String backReason) { ServiceRequest updateEntity = new ServiceRequest() .setStatusEnum(RequestStatus.DRAFT.getValue()) - .setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPerformerCheckId(SecurityUtils.getPractitionerId()) .setCheckTime(DateUtils.getNowDate()); if (backReason != null && !backReason.isEmpty()) { updateEntity.setReasonText(backReason); diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyDeliveryServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyDeliveryServiceImpl.java index 0960bf842..cb9040663 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyDeliveryServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyDeliveryServiceImpl.java @@ -111,7 +111,7 @@ public class SupplyDeliveryServiceImpl extends ServiceImpl supplyDeliveryIdList) { baseMapper.update( new SupplyDelivery().setStatusEnum(DispenseStatus.COMPLETED.getValue()) - .setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()) + .setPractitionerId(SecurityUtils.getPractitionerId()) .setOccurrenceTime(DateUtils.getNowDate()).setReceiveTime(DateUtils.getNowDate()), new LambdaUpdateWrapper().in(SupplyDelivery::getId, supplyDeliveryIdList)); } diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyRequestServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyRequestServiceImpl.java index 325260ebe..fd001533b 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyRequestServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/workflow/service/impl/SupplyRequestServiceImpl.java @@ -87,7 +87,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl().eq(SupplyRequest::getBusNo, busNo) .set(SupplyRequest::getApprovalTime, now) - .set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId()) + .set(SupplyRequest::getApproverId, SecurityUtils.getPractitionerId()) .set(SupplyRequest::getStatusEnum, SupplyStatus.AGREE.getValue())); // 返回单据详情 return this.getSupplyByBusNo(busNo); @@ -190,7 +190,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl().eq(SupplyRequest::getBusNo, busNo) .set(SupplyRequest::getApprovalTime, DateUtils.getNowDate()) - .set(SupplyRequest::getApproverId, SecurityUtils.getLoginUser().getPractitionerId()) + .set(SupplyRequest::getApproverId, SecurityUtils.getPractitionerId()) .set(SupplyRequest::getStatusEnum, SupplyStatus.REJECT.getValue())); return updateCount > 0; } @@ -272,7 +272,7 @@ public class SupplyRequestServiceImpl extends ServiceImpl supplyRequestIdList) { baseMapper.update(new SupplyRequest().setStatusEnum(SupplyStatus.AGREE.getValue()) - .setApproverId(SecurityUtils.getLoginUser().getPractitionerId()).setApprovalTime(DateUtils.getNowDate()), + .setApproverId(SecurityUtils.getPractitionerId()).setApprovalTime(DateUtils.getNowDate()), new LambdaUpdateWrapper().in(SupplyRequest::getId, supplyRequestIdList)); } diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbDao.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbDao.java index fc02452be..e38a15223 100755 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbDao.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/yb/service/YbDao.java @@ -1116,7 +1116,7 @@ public class YbDao { FinancialApplyRecord financialApplyRecord = new FinancialApplyRecord(); BeanUtils.copyProperties(financial3203AParam, financialApplyRecord); financialApplyRecord.setParam(JsonUtils.toJson(financial3203AParam)).setOutResult(s) - .setPraId(SecurityUtils.getLoginUser().getPractitionerId()).setStatus("0"); + .setPraId(SecurityUtils.getPractitionerId()).setStatus("0"); iFinancialApplyRecordService.save(financialApplyRecord); } diff --git a/healthlink-his-ui/src/api/cdss/cdssAlert.js b/healthlink-his-ui/src/api/cdss/cdssAlert.js index 184f4cae8..2b9b6663f 100644 --- a/healthlink-his-ui/src/api/cdss/cdssAlert.js +++ b/healthlink-his-ui/src/api/cdss/cdssAlert.js @@ -2,7 +2,7 @@ import request from '@/utils/request' export function evaluateRules(params) { return request({ - url: '/cdss/evaluate', + url: '/infection/cdss/evaluate', method: 'post', params: params }) @@ -10,7 +10,7 @@ export function evaluateRules(params) { export function getAlerts(encounterId, query) { return request({ - url: '/cdss/alerts/' + encounterId, + url: '/infection/cdss/alerts/' + encounterId, method: 'get', params: query }) @@ -18,7 +18,7 @@ export function getAlerts(encounterId, query) { export function acknowledgeAlert(id, data) { return request({ - url: '/cdss/alerts/' + id + '/acknowledge', + url: '/infection/cdss/alerts/' + id + '/acknowledge', method: 'post', data: data }) diff --git a/healthlink-his-ui/src/api/cdss/cdssRule.js b/healthlink-his-ui/src/api/cdss/cdssRule.js index 46fe51d5e..a04af6619 100644 --- a/healthlink-his-ui/src/api/cdss/cdssRule.js +++ b/healthlink-his-ui/src/api/cdss/cdssRule.js @@ -2,7 +2,7 @@ import request from '@/utils/request' export function getCdssRuleList(query) { return request({ - url: '/cdss/rules', + url: '/infection/cdss/rules', method: 'get', params: query }) @@ -10,7 +10,7 @@ export function getCdssRuleList(query) { export function addCdssRule(data) { return request({ - url: '/cdss/rules', + url: '/infection/cdss/rules', method: 'post', data: data }) @@ -18,7 +18,7 @@ export function addCdssRule(data) { export function updateCdssRule(data) { return request({ - url: '/cdss/rules', + url: '/infection/cdss/rules', method: 'put', data: data }) @@ -26,7 +26,7 @@ export function updateCdssRule(data) { export function deleteCdssRule(id) { return request({ - url: '/cdss/rules/' + id, + url: '/infection/cdss/rules/' + id, method: 'delete' }) } diff --git a/healthlink-his-ui/src/components/NoticePanel.vue b/healthlink-his-ui/src/components/NoticePanel.vue index d1ba0ae8d..7782de420 100755 --- a/healthlink-his-ui/src/components/NoticePanel.vue +++ b/healthlink-his-ui/src/components/NoticePanel.vue @@ -83,8 +83,7 @@
+ >{{ safeContent }}