Compare commits
8 Commits
fix-668-te
...
guanyu
| Author | SHA1 | Date | |
|---|---|---|---|
| 71013aa6d8 | |||
| 9c644a1c6d | |||
| f54a7ff825 | |||
| d64e1c753a | |||
| 55785252f6 | |||
| 5fd00011db | |||
| e2510fe0dd | |||
| d405e9cb5e |
1
healthlink-his-server/.mvn/jvm.config
Normal file
1
healthlink-his-server/.mvn/jvm.config
Normal file
@@ -0,0 +1 @@
|
||||
--sun-misc-unsafe-memory-access=allow
|
||||
@@ -1,6 +1,6 @@
|
||||
# Web Layer - API Controllers
|
||||
|
||||
**Module**: `openhis-application/web`
|
||||
**Module**: `healthlink-his-application/web`
|
||||
**Role**: API endpoint layer - all REST controllers for frontend communication
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
@@ -153,7 +153,7 @@ public class TicketAppServiceImpl implements ITicketAppService {
|
||||
dto.setIdCard(raw.getIdCard());
|
||||
dto.setDoctorId(raw.getDoctorId());
|
||||
dto.setDepartmentId(raw.getDepartmentId());
|
||||
dto.setRealPatientId(raw.getPatientId());
|
||||
dto.setRealPatientId(raw.getRealPatientId() != null ? raw.getRealPatientId() : raw.getPatientId());
|
||||
dto.setOrderId(raw.getOrderId());
|
||||
dto.setOrderNo(raw.getOrderNo());
|
||||
|
||||
|
||||
@@ -515,29 +515,28 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
// 构建查询条件
|
||||
QueryWrapper<CurrentDayEncounterDto> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name", "identifier_no")),
|
||||
request);
|
||||
null); // registerTimeSTime/ETime 已下推到 SQL 内层 WHERE,跳过 buildQueryWrapper 的自动 *STime/*ETime 处理
|
||||
|
||||
// 手动处理 statusEnum 参数(用于过滤退号记录)
|
||||
// 提取statusEnum参数,下推到内层WHERE(避免外层重复过滤)
|
||||
Integer statusFilter = null;
|
||||
String statusEnumParam = request.getParameter("statusEnum");
|
||||
if (statusEnumParam != null && !statusEnumParam.isEmpty()) {
|
||||
try {
|
||||
Integer statusEnum = Integer.parseInt(statusEnumParam);
|
||||
if (statusEnum == -1) {
|
||||
// -1 表示排除退号记录(正常挂号)
|
||||
queryWrapper.ne("status_enum", 6);
|
||||
} else {
|
||||
// 其他值表示精确匹配
|
||||
queryWrapper.eq("status_enum", statusEnum);
|
||||
}
|
||||
statusFilter = Integer.parseInt(statusEnumParam);
|
||||
} catch (NumberFormatException e) {
|
||||
// 忽略无效的参数值
|
||||
}
|
||||
}
|
||||
|
||||
// 提取日期范围参数,下推到内层WHERE以优化性能(避免全表JOIN后再过滤)
|
||||
String registerTimeSTime = request.getParameter("registerTimeSTime");
|
||||
String registerTimeETime = request.getParameter("registerTimeETime");
|
||||
|
||||
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter(
|
||||
new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), EncounterStatus.IN_PROGRESS.getValue(),
|
||||
ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode(), queryWrapper,
|
||||
ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue());
|
||||
ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue(),
|
||||
registerTimeSTime, registerTimeETime, statusFilter);
|
||||
|
||||
// 过滤候选池排除列表
|
||||
// 仅当调用方显式传 excludeFromCandidatePool=true 时才过滤,避免非分诊场景(挂号/收费)
|
||||
|
||||
@@ -54,7 +54,10 @@ public interface OutpatientRegistrationAppMapper {
|
||||
@Param("classEnum") Integer classEnum, @Param("statusEnum") Integer statusEnum,
|
||||
@Param("participantType1") String participantType1, @Param("participantType2") String participantType2,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<CurrentDayEncounterDto> queryWrapper,
|
||||
@Param("register") Integer register, @Param("paymentStatus") Integer paymentStatus);
|
||||
@Param("register") Integer register, @Param("paymentStatus") Integer paymentStatus,
|
||||
@Param("registerTimeSTime") String registerTimeSTime,
|
||||
@Param("registerTimeETime") String registerTimeETime,
|
||||
@Param("statusFilter") Integer statusFilter);
|
||||
|
||||
/**
|
||||
* 查询item绑定的信息(耗材或诊疗)
|
||||
|
||||
@@ -451,30 +451,49 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
// 删除费用项
|
||||
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.MED_MEDICATION_REQUEST,
|
||||
adviceSaveDto.getRequestId());
|
||||
// 删除代煎费
|
||||
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
||||
.eq(ChargeItem::getPrescriptionNo, adviceSaveDto.getPrescriptionNo())
|
||||
.eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||
// 删除代煎费(按处方号精确清理)
|
||||
if (adviceSaveDto.getPrescriptionNo() != null) {
|
||||
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
||||
.eq(ChargeItem::getPrescriptionNo, adviceSaveDto.getPrescriptionNo())
|
||||
.eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (is_sign) {
|
||||
// 按groupId分组
|
||||
Map<Long, List<AdviceSaveDto>> groupMap
|
||||
= insertOrUpdateList.stream().collect(Collectors.groupingBy(AdviceSaveDto::getGroupId));
|
||||
// 为每个分组生成唯一的处方号
|
||||
groupMap.forEach((groupId, groupList) -> {
|
||||
// 先查询当前groupId是否已经被签发生成过处方号
|
||||
List<MedicationRequest> list = iMedicationRequestService
|
||||
.list(new LambdaQueryWrapper<MedicationRequest>().eq(MedicationRequest::getGroupId, groupId));
|
||||
if (!list.isEmpty() && StringUtils.isNotEmpty(list.get(0).getPrescriptionNo())) {
|
||||
groupList.forEach(dto -> dto.setPrescriptionNo(list.get(0).getPrescriptionNo()));
|
||||
} else {
|
||||
String prescriptionNo
|
||||
= assignSeqUtil.getSeq(AssignSeqEnum.PRESCRIPTION_CHINESE_HERBAL_MEDICINE.getPrefix(), 8);
|
||||
groupList.forEach(dto -> dto.setPrescriptionNo(prescriptionNo));
|
||||
// 有 groupId 的按组生成处方号(groupingBy 不接受 null key,先过滤)
|
||||
insertOrUpdateList.stream()
|
||||
.filter(e -> e.getGroupId() != null)
|
||||
.collect(Collectors.groupingBy(AdviceSaveDto::getGroupId))
|
||||
.forEach((groupId, groupList) -> {
|
||||
// 先查询当前groupId是否已经被签发生成过处方号
|
||||
List<MedicationRequest> list = iMedicationRequestService
|
||||
.list(new LambdaQueryWrapper<MedicationRequest>()
|
||||
.eq(MedicationRequest::getGroupId, groupId));
|
||||
if (!list.isEmpty() && StringUtils.isNotEmpty(list.get(0).getPrescriptionNo())) {
|
||||
groupList.forEach(dto -> dto.setPrescriptionNo(list.get(0).getPrescriptionNo()));
|
||||
} else {
|
||||
String prescriptionNo = assignSeqUtil.getSeq(
|
||||
AssignSeqEnum.PRESCRIPTION_CHINESE_HERBAL_MEDICINE.getPrefix(), 8);
|
||||
groupList.forEach(dto -> dto.setPrescriptionNo(prescriptionNo));
|
||||
}
|
||||
});
|
||||
|
||||
// 无 groupId 的各自生成处方号
|
||||
for (AdviceSaveDto dto : insertOrUpdateList) {
|
||||
if (dto.getGroupId() != null) {
|
||||
continue;
|
||||
}
|
||||
});
|
||||
if (dto.getRequestId() != null) {
|
||||
MedicationRequest existing = iMedicationRequestService.getById(dto.getRequestId());
|
||||
if (existing != null && StringUtils.isNotEmpty(existing.getPrescriptionNo())) {
|
||||
dto.setPrescriptionNo(existing.getPrescriptionNo());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
dto.setPrescriptionNo(assignSeqUtil.getSeq(
|
||||
AssignSeqEnum.PRESCRIPTION_CHINESE_HERBAL_MEDICINE.getPrefix(), 8));
|
||||
}
|
||||
}
|
||||
|
||||
// 医嘱签发编码
|
||||
@@ -597,8 +616,12 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
Long encounterDiagnosisId = medicineList.get(0).getEncounterDiagnosisId();
|
||||
// 中药付数
|
||||
BigDecimal chineseHerbsDoseQuantity = medicineList.get(0).getChineseHerbsDoseQuantity();
|
||||
// 处方号
|
||||
String prescriptionNo = insertOrUpdateList.get(0).getPrescriptionNo();
|
||||
// 收集所有处方号(不同分组可能有不同处方号)
|
||||
List<String> prescriptionNos = insertOrUpdateList.stream()
|
||||
.map(AdviceSaveDto::getPrescriptionNo)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 签发时,生成中药代煎的账单
|
||||
if (Whether.YES.getValue().equals(sufferingFlag) && is_sign) {
|
||||
@@ -607,9 +630,10 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
AdviceBaseDto adviceBaseDto = new AdviceBaseDto();
|
||||
adviceBaseDto.setAdviceDefinitionId(sufferingDefinitionId); // 医嘱定义id
|
||||
|
||||
// 先删除中药代煎的账单
|
||||
// 先删除该就诊关联的所有中药代煎账单
|
||||
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
||||
.eq(ChargeItem::getPrescriptionNo, prescriptionNo).eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||
.eq(ChargeItem::getEncounterId, encounterId)
|
||||
.eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||
|
||||
// 对应的诊疗医嘱信息
|
||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null,
|
||||
@@ -618,40 +642,42 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
// 费用定价
|
||||
AdvicePriceDto advicePriceDto = activityAdviceBaseDto.getPriceList().get(0);
|
||||
if (advicePriceDto != null) {
|
||||
// 生成账单
|
||||
chargeItem = new ChargeItem();
|
||||
chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||
chargeItem.setPrescriptionNo(prescriptionNo); // 处方号
|
||||
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue()); // 收费状态
|
||||
chargeItem.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.CHARGE_ITEM_NO.getPrefix(), 4));
|
||||
chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||
chargeItem.setPatientId(patientId); // 患者
|
||||
chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型
|
||||
chargeItem.setEncounterId(encounterId); // 就诊id
|
||||
chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID
|
||||
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID
|
||||
chargeItem.setRequestingOrgId(orgId); // 开立科室
|
||||
chargeItem.setEnteredDate(curDate); // 开立时间
|
||||
chargeItem.setProductTable(activityAdviceBaseDto.getAdviceTableName());// 产品所在表
|
||||
chargeItem.setProductId(activityAdviceBaseDto.getAdviceDefinitionId());// 收费项id
|
||||
chargeItem.setAccountId(accountId);// 关联账户ID
|
||||
chargeItem.setConditionId(conditionId); // 诊断id
|
||||
chargeItem.setEncounterDiagnosisId(encounterDiagnosisId); // 就诊诊断id
|
||||
// 为每个处方号分别生成代煎账单
|
||||
for (String prescriptionNo : prescriptionNos) {
|
||||
chargeItem = new ChargeItem();
|
||||
chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||
chargeItem.setPrescriptionNo(prescriptionNo); // 处方号
|
||||
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue()); // 收费状态
|
||||
chargeItem.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.CHARGE_ITEM_NO.getPrefix(), 4));
|
||||
chargeItem.setPatientId(patientId); // 患者
|
||||
chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型
|
||||
chargeItem.setEncounterId(encounterId); // 就诊id
|
||||
chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID
|
||||
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID
|
||||
chargeItem.setRequestingOrgId(orgId); // 开立科室
|
||||
chargeItem.setEnteredDate(curDate); // 开立时间
|
||||
chargeItem.setProductTable(activityAdviceBaseDto.getAdviceTableName());// 产品所在表
|
||||
chargeItem.setProductId(activityAdviceBaseDto.getAdviceDefinitionId());// 收费项id
|
||||
chargeItem.setAccountId(accountId);// 关联账户ID
|
||||
chargeItem.setConditionId(conditionId); // 诊断id
|
||||
chargeItem.setEncounterDiagnosisId(encounterDiagnosisId); // 就诊诊断id
|
||||
|
||||
chargeItem.setQuantityValue(quantity); // 数量
|
||||
chargeItem.setQuantityUnit(activityAdviceBaseDto.getUnitCode()); // 单位
|
||||
chargeItem.setUnitPrice(advicePriceDto.getPrice()); // 单价
|
||||
// 计算总价,保留6位小数
|
||||
BigDecimal qty = quantity;
|
||||
chargeItem.setTotalPrice(qty.multiply(advicePriceDto.getPrice()).setScale(6, RoundingMode.HALF_UP)); // 总价
|
||||
chargeItem.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||
iChargeItemService.save(chargeItem);
|
||||
chargeItem.setQuantityValue(quantity); // 数量
|
||||
chargeItem.setQuantityUnit(activityAdviceBaseDto.getUnitCode()); // 单位
|
||||
chargeItem.setUnitPrice(advicePriceDto.getPrice()); // 单价
|
||||
// 计算总价,保留6位小数
|
||||
BigDecimal qty = quantity;
|
||||
chargeItem.setTotalPrice(qty.multiply(advicePriceDto.getPrice()).setScale(6, RoundingMode.HALF_UP)); // 总价
|
||||
chargeItem.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||
iChargeItemService.save(chargeItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (Whether.NO.getValue().equals(sufferingFlag)) {
|
||||
// 删除中药代煎的账单
|
||||
// 删除该就诊关联的所有中药代煎账单
|
||||
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
||||
.eq(ChargeItem::getPrescriptionNo, prescriptionNo).eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||
.eq(ChargeItem::getEncounterId, encounterId)
|
||||
.eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||
}
|
||||
|
||||
// 签发时,把草稿状态的账单更新为待收费[中医]
|
||||
|
||||
@@ -177,11 +177,17 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
// 初始化查询参数
|
||||
String encounterIds = inpatientAdviceParam.getEncounterIds();
|
||||
inpatientAdviceParam.setEncounterIds(null);
|
||||
// Bug #715: 提取therapyEnum手动处理,避免自动条件排除therapy_enum为NULL的耗材医嘱
|
||||
Integer therapyEnum = inpatientAdviceParam.getTherapyEnum();
|
||||
inpatientAdviceParam.setTherapyEnum(null);
|
||||
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
||||
inpatientAdviceParam.setExeStatus(null);
|
||||
// 提取requestStatus手动处理,支持COMPLETED(3)和CHECK_VERIFIED(10)同时查询
|
||||
Integer requestStatus = inpatientAdviceParam.getRequestStatus();
|
||||
inpatientAdviceParam.setRequestStatus(null);
|
||||
// Bug #714: 提取deadline手动处理,UNION子查询列名为end_time
|
||||
String deadline = inpatientAdviceParam.getDeadline();
|
||||
inpatientAdviceParam.setDeadline(null);
|
||||
// 构建查询条件
|
||||
QueryWrapper<InpatientAdviceParam> queryWrapper
|
||||
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
|
||||
@@ -204,10 +210,25 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
= Arrays.stream(encounterIds.split(CommonConstants.Common.COMMA)).map(Long::parseLong).toList();
|
||||
queryWrapper.in(CommonConstants.FieldName.EncounterId, encounterIdList);
|
||||
}
|
||||
// Bug #715: 手动拼接therapyEnum条件,耗材医嘱(DeviceRequest)无therapy_enum(NULL),需兼容
|
||||
if (therapyEnum != null) {
|
||||
queryWrapper.and(w -> w.eq("therapy_enum", therapyEnum).or().isNull("therapy_enum"));
|
||||
}
|
||||
// Bug #714: 手动拼接deadline条件,按医嘱截止时间筛选
|
||||
if (deadline != null && !deadline.isEmpty()) {
|
||||
try {
|
||||
LocalDateTime deadlineTime = LocalDateTime.parse(deadline,
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
queryWrapper.le("end_time", deadlineTime);
|
||||
} catch (DateTimeParseException e) {
|
||||
// 忽略无效的日期格式
|
||||
}
|
||||
}
|
||||
// 患者医嘱分页列表
|
||||
Page<InpatientAdviceDto> inpatientAdvicePage
|
||||
= adviceProcessAppMapper.selectInpatientAdvicePage(new Page<>(pageNo, pageSize), queryWrapper,
|
||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, CommonConstants.TableName.WOR_SERVICE_REQUEST,
|
||||
CommonConstants.TableName.WOR_DEVICE_REQUEST,
|
||||
RequestStatus.DRAFT.getValue(), EncounterActivityStatus.ACTIVE.getValue(), LocationForm.BED.getValue(),
|
||||
ParticipantType.ADMITTING_DOCTOR.getCode(), AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
|
||||
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
|
||||
@@ -379,14 +400,17 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> adviceVerify(List<PerformInfoDto> performInfoList) {
|
||||
// 分别创建两个列表来存储不同类型的请求
|
||||
// 分别创建列表来存储不同类型的请求
|
||||
List<PerformInfoDto> serviceRequestList = new ArrayList<>();
|
||||
List<PerformInfoDto> medRequestList = new ArrayList<>();
|
||||
List<PerformInfoDto> deviceRequestList = new ArrayList<>();
|
||||
for (PerformInfoDto item : performInfoList) {
|
||||
if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(item.getRequestTable())) {
|
||||
serviceRequestList.add(item);
|
||||
} else if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(item.getRequestTable())) {
|
||||
medRequestList.add(item);
|
||||
} else if (CommonConstants.TableName.WOR_DEVICE_REQUEST.equals(item.getRequestTable())) {
|
||||
deviceRequestList.add(item);
|
||||
}
|
||||
}
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
@@ -425,6 +449,11 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
medicationRequestService.updateCompletedStatusBatch(
|
||||
medRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate);
|
||||
}
|
||||
if (!deviceRequestList.isEmpty()) {
|
||||
// 更新耗材请求状态已完成
|
||||
deviceRequestService.updateCompletedStatusBatch(
|
||||
deviceRequestList.stream().map(PerformInfoDto::getRequestId).toList());
|
||||
}
|
||||
return R.ok(null, "校对成功");
|
||||
}
|
||||
|
||||
@@ -436,14 +465,17 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> adviceReject(List<PerformInfoDto> performInfoList) {
|
||||
// 分别创建两个列表来存储不同类型的请求
|
||||
// 分别创建列表来存储不同类型的请求
|
||||
List<PerformInfoDto> serviceRequestList = new ArrayList<>();
|
||||
List<PerformInfoDto> medRequestList = new ArrayList<>();
|
||||
List<PerformInfoDto> deviceRequestList = new ArrayList<>();
|
||||
for (PerformInfoDto item : performInfoList) {
|
||||
if (CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(item.getRequestTable())) {
|
||||
serviceRequestList.add(item);
|
||||
} else if (CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(item.getRequestTable())) {
|
||||
medRequestList.add(item);
|
||||
} else if (CommonConstants.TableName.WOR_DEVICE_REQUEST.equals(item.getRequestTable())) {
|
||||
deviceRequestList.add(item);
|
||||
}
|
||||
}
|
||||
// 校验医嘱是否已执行,已执行的医嘱需要先取消执行后才能退回
|
||||
@@ -493,6 +525,11 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
medicationRequestService.updateDraftStatusBatch(
|
||||
medRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate, backReason);
|
||||
}
|
||||
if (!deviceRequestList.isEmpty()) {
|
||||
// 更新耗材请求状态待发送
|
||||
deviceRequestService.updateDraftStatusBatch(
|
||||
deviceRequestList.stream().map(PerformInfoDto::getRequestId).toList());
|
||||
}
|
||||
return R.ok(null, "退回成功");
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ public interface AdviceProcessAppMapper {
|
||||
Page<InpatientAdviceDto> selectInpatientAdvicePage(@Param("page") Page<InpatientAdviceDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<InpatientAdviceParam> queryWrapper,
|
||||
@Param("medMedicationRequest") String medMedicationRequest,
|
||||
@Param("worServiceRequest") String worServiceRequest, @Param("draft") Integer draft,
|
||||
@Param("worServiceRequest") String worServiceRequest,
|
||||
@Param("worDeviceRequest") String worDeviceRequest, @Param("draft") Integer draft,
|
||||
@Param("active") Integer active, @Param("bed") Integer bed, @Param("admittingDoctor") String admittingDoctor,
|
||||
@Param("personalCashAccount") String personalCashAccount, @Param("billable") Integer billable,
|
||||
@Param("billed") Integer billed, @Param("refunded") Integer refunded, @Param("imp") Integer imp,
|
||||
|
||||
@@ -16,7 +16,7 @@ public class RequestFormDetailQueryDto {
|
||||
/**
|
||||
* 诊疗活动定义ID(wor_service_request.activity_id,与开立检验时项目字典的 id / adviceDefinitionId 一致,用于编辑回显)
|
||||
*/
|
||||
private Long activityId;
|
||||
private Long adviceDefinitionId;
|
||||
|
||||
/** 医嘱名称 */
|
||||
private String adviceName;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
-- Bug #735: 新医嘱签发后"停嘱医生"字段错误生成数据
|
||||
-- 原因:stopper_name 映射到 update_by 字段,签发时 MyBatis-Plus 自动填充导致错误赋值
|
||||
-- 修复:添加专用 stopper_id 字段,仅在停嘱操作时设置
|
||||
|
||||
-- 药品请求表添加停嘱医生ID字段
|
||||
ALTER TABLE med_medication_request ADD COLUMN IF NOT EXISTS stopper_id BIGINT;
|
||||
|
||||
-- 服务请求表添加停嘱医生ID字段
|
||||
ALTER TABLE wor_service_request ADD COLUMN IF NOT EXISTS stopper_id BIGINT;
|
||||
@@ -217,6 +217,11 @@
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.class_enum = #{classEnum}
|
||||
AND T10.context_enum = #{register}
|
||||
AND (#{registerTimeSTime} IS NULL OR T1.create_time >= CAST(#{registerTimeSTime} AS TIMESTAMP))
|
||||
AND (#{registerTimeETime} IS NULL OR T1.create_time <= CAST(#{registerTimeETime} AS TIMESTAMP))
|
||||
AND (#{statusFilter} IS NULL
|
||||
OR (#{statusFilter} >= 0 AND T1.status_enum = #{statusFilter})
|
||||
OR (#{statusFilter} = -1 AND T1.status_enum != 6))
|
||||
) AS T9
|
||||
${ew.customSqlSegment}
|
||||
ORDER BY T9.register_time DESC
|
||||
|
||||
@@ -439,6 +439,139 @@
|
||||
ELSE 1=1 END
|
||||
AND T1.refund_service_id IS NULL
|
||||
ORDER BY T1.status_enum )
|
||||
UNION
|
||||
( SELECT DISTINCT T1.encounter_id,
|
||||
T1.tenant_id,
|
||||
#{worDeviceRequest} AS advice_table,
|
||||
T1.id AS request_id,
|
||||
T1.req_authored_time AS start_time,
|
||||
NULL::timestamp AS end_time,
|
||||
T1.requester_id AS requester_id,
|
||||
T1.create_time AS request_time,
|
||||
NULL::integer AS skin_test_flag,
|
||||
NULL::integer AS inject_flag,
|
||||
NULL::bigint AS group_id,
|
||||
T1.performer_check_id,
|
||||
T2."name" AS advice_name,
|
||||
T2.id AS item_id,
|
||||
NULL::varchar AS volume,
|
||||
T1.lot_number AS lot_number,
|
||||
T1.quantity AS quantity,
|
||||
T1.unit_code AS unit_code,
|
||||
T1.status_enum AS request_status,
|
||||
NULL::varchar AS method_code,
|
||||
T1.rate_code AS rate_code,
|
||||
NULL::numeric AS dose,
|
||||
NULL::varchar AS dose_unit_code,
|
||||
ao1.id AS position_id,
|
||||
ao1."name" AS position_name,
|
||||
NULL::integer AS dispense_per_duration,
|
||||
1::numeric AS part_percent,
|
||||
ccd."name" AS condition_definition_name,
|
||||
NULL::integer AS therapy_enum,
|
||||
NULL::integer AS sort_number,
|
||||
T1.quantity AS execute_num,
|
||||
af.day_times,
|
||||
ae.bus_no,
|
||||
ap."name" AS patient_name,
|
||||
al2."name" AS bed_name,
|
||||
ap.gender_enum,
|
||||
ap.birth_date,
|
||||
ap.id AS patient_id,
|
||||
fc.contract_name,
|
||||
diagnosis.condition_names,
|
||||
pra."name" AS admitting_doctor_name,
|
||||
personal_account.balance_amount,
|
||||
personal_account.id AS account_id,
|
||||
T2.category_code,
|
||||
NULL::integer AS dispense_status,
|
||||
NULL::numeric AS unit_price,
|
||||
NULL::numeric AS total_price,
|
||||
NULL::bigint AS stopper_id,
|
||||
NULL::varchar AS stopper_name
|
||||
FROM wor_device_request AS T1
|
||||
LEFT JOIN adm_device_definition AS T2
|
||||
ON T2.id = T1.device_def_id
|
||||
AND T2.delete_flag = '0'
|
||||
LEFT JOIN adm_organization AS ao1
|
||||
ON ao1.id = T1.org_id
|
||||
AND ao1.delete_flag = '0'
|
||||
LEFT JOIN cli_condition AS cc
|
||||
ON cc.id = T1.condition_id
|
||||
AND cc.delete_flag = '0'
|
||||
LEFT JOIN cli_condition_definition AS ccd
|
||||
ON ccd.id = cc.definition_id
|
||||
AND ccd.delete_flag = '0'
|
||||
LEFT JOIN adm_encounter ae
|
||||
ON ae.id = T1.encounter_id
|
||||
AND ae.class_enum = #{imp}
|
||||
AND ae.delete_flag = '0'
|
||||
LEFT JOIN adm_patient ap
|
||||
ON ae.patient_id = ap.id
|
||||
AND ap.delete_flag = '0'
|
||||
LEFT JOIN adm_encounter_location ael
|
||||
ON ae.id = ael.encounter_id
|
||||
AND ael.delete_flag = '0'
|
||||
AND ael.status_enum = #{active}
|
||||
AND ael.form_enum = #{bed}
|
||||
LEFT JOIN adm_location al2
|
||||
ON ael.location_id = al2.id
|
||||
AND al2.delete_flag = '0'
|
||||
LEFT JOIN adm_account aa
|
||||
ON ae.id = aa.encounter_id
|
||||
AND aa.encounter_flag = 1
|
||||
AND aa.delete_flag = '0'
|
||||
LEFT JOIN fin_contract fc
|
||||
ON aa.contract_no = fc.bus_no
|
||||
AND fc.delete_flag = '0'
|
||||
LEFT JOIN ( SELECT aed.encounter_id,
|
||||
STRING_AGG(ccd.name, ', ') AS condition_names
|
||||
FROM adm_encounter_diagnosis aed
|
||||
INNER JOIN cli_condition cc
|
||||
ON cc.id = aed.condition_id
|
||||
AND cc.delete_flag = '0'
|
||||
INNER JOIN cli_condition_definition ccd
|
||||
ON ccd.id = cc.definition_id
|
||||
AND ccd.delete_flag = '0'
|
||||
WHERE aed.delete_flag = '0'
|
||||
GROUP BY aed.encounter_id
|
||||
) AS diagnosis
|
||||
ON ae.id = diagnosis.encounter_id
|
||||
LEFT JOIN adm_encounter_participant aep
|
||||
ON ae.id = aep.encounter_id
|
||||
AND aep.delete_flag = '0'
|
||||
AND aep.status_enum = #{active}
|
||||
AND aep.type_code = #{admittingDoctor}
|
||||
LEFT JOIN adm_practitioner pra
|
||||
ON aep.practitioner_id = pra.id
|
||||
AND pra.delete_flag = '0'
|
||||
LEFT JOIN ( SELECT aa.id,
|
||||
aa.encounter_id,
|
||||
(aa.balance_amount -
|
||||
COALESCE(SUM(CASE WHEN aci.status_enum IN (#{billed}, #{billable})
|
||||
THEN aci.total_price ELSE 0 END), 0) +
|
||||
COALESCE(SUM(CASE WHEN aci.status_enum = #{refunded}
|
||||
THEN aci.total_price ELSE 0 END), 0)) AS balance_amount
|
||||
FROM adm_account aa
|
||||
LEFT JOIN adm_charge_item aci
|
||||
ON aa.encounter_id = aci.encounter_id
|
||||
AND aa.delete_flag = '0'
|
||||
WHERE aa.type_code = #{personalCashAccount}
|
||||
AND aa.delete_flag = '0'
|
||||
GROUP BY aa.id,
|
||||
aa.encounter_id,
|
||||
aa.balance_amount
|
||||
) AS personal_account
|
||||
ON personal_account.encounter_id = ae.id
|
||||
LEFT JOIN adm_frequency af
|
||||
ON af.rate_code = T1.rate_code
|
||||
AND af.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.generate_source_enum = #{doctorPrescription}
|
||||
AND CASE WHEN T1.status_enum = #{draft}
|
||||
THEN FALSE
|
||||
ELSE TRUE END
|
||||
ORDER BY T1.status_enum )
|
||||
) AS ii
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
@@ -4,111 +4,66 @@
|
||||
<!-- 病人信息相关查询-->
|
||||
<select id="getPatientPage" resultType="com.healthlink.his.web.patientmanage.dto.PatientBaseInfoDto">
|
||||
SELECT
|
||||
pt.identifier_no,
|
||||
pt.tenant_id,
|
||||
pt.id,
|
||||
pt.active_flag,
|
||||
pt.temp_flag,
|
||||
pt.name,
|
||||
pt.name_json,
|
||||
pt.bus_no,
|
||||
pt.gender_enum,
|
||||
pt.birth_date,
|
||||
pt.deceased_date,
|
||||
pt.marital_status_enum,
|
||||
pt.prfs_enum,
|
||||
pt.phone,
|
||||
pt.address,
|
||||
pt.address_province,
|
||||
pt.address_city,
|
||||
pt.address_district,
|
||||
pt.address_street,
|
||||
pt.address_json,
|
||||
pt.nationality_code,
|
||||
pt.id_card,
|
||||
pt.py_str,
|
||||
pt.wb_str,
|
||||
pt.blood_abo,
|
||||
pt.blood_rh,
|
||||
pt.work_company,
|
||||
pt.native_place,
|
||||
pt.country_code,
|
||||
pt.link_name,
|
||||
pt.link_relation_code,
|
||||
pt.link_telcom,
|
||||
pt.link_jsons,
|
||||
pt.organization_id,
|
||||
pt.create_time,
|
||||
pt.postal_code,
|
||||
pt.hukou_address,
|
||||
pt.guardian_name,
|
||||
pt.guardian_relation,
|
||||
pt.guardian_phone,
|
||||
pt.guardian_id_type,
|
||||
pt.guardian_id_no,
|
||||
pt.guardian_address,
|
||||
pt.patient_derived,
|
||||
pt.education_level,
|
||||
pt.company_address
|
||||
FROM (
|
||||
SELECT
|
||||
(
|
||||
SELECT api.identifier_no
|
||||
FROM adm_patient_identifier api
|
||||
WHERE api.tenant_id = p.tenant_id
|
||||
AND api.patient_id = p.id
|
||||
LIMIT 1
|
||||
) AS identifier_no,
|
||||
p.tenant_id,
|
||||
p.id,
|
||||
p.active_flag,
|
||||
p.temp_flag,
|
||||
p.name,
|
||||
p.name_json,
|
||||
p.bus_no,
|
||||
p.gender_enum,
|
||||
p.birth_date,
|
||||
p.deceased_date,
|
||||
p.marital_status_enum,
|
||||
p.prfs_enum,
|
||||
p.phone,
|
||||
p.address,
|
||||
p.address_province,
|
||||
p.address_city,
|
||||
p.address_district,
|
||||
p.address_street,
|
||||
p.address_json,
|
||||
p.nationality_code,
|
||||
p.id_card,
|
||||
p.py_str,
|
||||
p.wb_str,
|
||||
p.blood_abo,
|
||||
p.blood_rh,
|
||||
p.work_company,
|
||||
p.native_place,
|
||||
p.country_code,
|
||||
p.link_name,
|
||||
p.link_relation_code,
|
||||
p.link_telcom,
|
||||
p.link_jsons,
|
||||
p.organization_id,
|
||||
p.create_time,
|
||||
p.postal_code,
|
||||
p.hukou_address,
|
||||
p.guardian_name,
|
||||
p.guardian_relation,
|
||||
p.guardian_phone,
|
||||
p.guardian_id_type,
|
||||
p.guardian_id_no,
|
||||
p.guardian_address,
|
||||
p.patient_derived,
|
||||
p.education_level,
|
||||
p.company_address
|
||||
FROM adm_patient p
|
||||
where p.delete_flag = '0'
|
||||
) AS pt
|
||||
${ew.customSqlSegment}
|
||||
ORDER BY pt.bus_no DESC
|
||||
(
|
||||
SELECT api.identifier_no
|
||||
FROM adm_patient_identifier api
|
||||
WHERE api.tenant_id = p.tenant_id
|
||||
AND api.patient_id = p.id
|
||||
LIMIT 1
|
||||
) AS identifier_no,
|
||||
p.tenant_id,
|
||||
p.id,
|
||||
p.active_flag,
|
||||
p.temp_flag,
|
||||
p.name,
|
||||
p.name_json,
|
||||
p.bus_no,
|
||||
p.gender_enum,
|
||||
p.birth_date,
|
||||
p.deceased_date,
|
||||
p.marital_status_enum,
|
||||
p.prfs_enum,
|
||||
p.phone,
|
||||
p.address,
|
||||
p.address_province,
|
||||
p.address_city,
|
||||
p.address_district,
|
||||
p.address_street,
|
||||
p.address_json,
|
||||
p.nationality_code,
|
||||
p.id_card,
|
||||
p.py_str,
|
||||
p.wb_str,
|
||||
p.blood_abo,
|
||||
p.blood_rh,
|
||||
p.work_company,
|
||||
p.native_place,
|
||||
p.country_code,
|
||||
p.link_name,
|
||||
p.link_relation_code,
|
||||
p.link_telcom,
|
||||
p.link_jsons,
|
||||
p.organization_id,
|
||||
p.create_time,
|
||||
p.postal_code,
|
||||
p.hukou_address,
|
||||
p.guardian_name,
|
||||
p.guardian_relation,
|
||||
p.guardian_phone,
|
||||
p.guardian_id_type,
|
||||
p.guardian_id_no,
|
||||
p.guardian_address,
|
||||
p.patient_derived,
|
||||
p.education_level,
|
||||
p.company_address
|
||||
FROM adm_patient p
|
||||
<where>
|
||||
p.delete_flag = '0'
|
||||
<if test="ew.sqlSegment != null and ew.sqlSegment != ''">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY p.bus_no DESC
|
||||
</select>
|
||||
|
||||
<select id="getPatientIdInfo" resultType="com.healthlink.his.web.patientmanage.dto.PatientIdInfoDto">
|
||||
|
||||
@@ -108,8 +108,6 @@
|
||||
<if test="statusEnum == 18">
|
||||
T4.status_enum = #{submitted}
|
||||
</if>
|
||||
AND T4.summary_no IS NOT NULL
|
||||
AND T4.summary_no != ''
|
||||
) AS ii
|
||||
${ew.customSqlSegment}
|
||||
GROUP BY ii.encounter_id,
|
||||
@@ -268,8 +266,6 @@
|
||||
AND T15.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0'
|
||||
-- 因发药配药合并,前台只能看到待发药,已发药状态,但是后台配药发药状态都查
|
||||
AND T1.summary_no IS NOT NULL
|
||||
AND T1.summary_no != ''
|
||||
AND
|
||||
<if test="dispenseStatus == null">
|
||||
T1.status_enum IN (#{inProgress},#{completed},#{preparation},#{prepared},#{summarized})
|
||||
|
||||
@@ -220,8 +220,8 @@
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.medication_id AS advice_definition_id,
|
||||
T1.content_json::jsonb ->> 'remark' AS remark,
|
||||
T1.effective_dose_end AS stop_time,
|
||||
T1.update_by AS stop_user_name
|
||||
CASE WHEN T1.status_enum = 6 THEN T1.effective_dose_end ELSE NULL END AS stop_time,
|
||||
CASE WHEN T1.status_enum = 6 THEN T1.update_by ELSE NULL END AS stop_user_name
|
||||
FROM med_medication_request AS T1
|
||||
LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id
|
||||
AND T2.delete_flag = '0'
|
||||
@@ -331,8 +331,8 @@
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.activity_id AS advice_definition_id,
|
||||
T1.remark AS remark,
|
||||
T1.occurrence_end_time AS stop_time,
|
||||
T1.update_by AS stop_user_name
|
||||
CASE WHEN T1.status_enum = 6 THEN T1.occurrence_end_time ELSE NULL END AS stop_time,
|
||||
CASE WHEN T1.status_enum = 6 THEN T1.update_by ELSE NULL END AS stop_user_name
|
||||
FROM wor_service_request AS T1
|
||||
LEFT JOIN wor_activity_definition AS T2
|
||||
ON T2.ID = T1.activity_id
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getRequestFormDetail" resultType="com.healthlink.his.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
||||
SELECT wsr.activity_id AS activity_id,
|
||||
SELECT wsr.activity_id AS advice_definition_id,
|
||||
wsr.quantity,
|
||||
wsr.unit_code,
|
||||
COALESCE(wad.NAME, wsr.content_json::jsonb->>'surgeryName') AS advice_name,
|
||||
|
||||
@@ -21,6 +21,7 @@ public class TicketSlotDTO {
|
||||
private String patientName;
|
||||
private String medicalCard;
|
||||
private Long patientId;
|
||||
private Long realPatientId;
|
||||
private String phone;
|
||||
private Integer orderStatus;
|
||||
private Long orderId;
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
o.order_no AS orderNo,
|
||||
COALESCE(CAST(o.gender AS VARCHAR), CAST(pinfo.gender_enum AS VARCHAR)) AS patientGender,
|
||||
pinfo.gender_enum AS genderEnum,
|
||||
pinfo.id AS realPatientId,
|
||||
pinfo.id_card AS idCard,
|
||||
o.appointment_time AS appointmentTime,
|
||||
<include refid="orderStatusNormExpr" /> AS orderStatus,
|
||||
@@ -230,6 +231,7 @@
|
||||
o.order_no AS orderNo,
|
||||
COALESCE(CAST(o.gender AS VARCHAR), CAST(pinfo.gender_enum AS VARCHAR)) AS patientGender,
|
||||
pinfo.gender_enum AS genderEnum,
|
||||
pinfo.id AS realPatientId,
|
||||
pinfo.id_card AS idCard,
|
||||
o.appointment_time AS appointmentTime,
|
||||
<include refid="orderStatusNormExpr" /> AS orderStatus,
|
||||
|
||||
@@ -4,7 +4,7 @@ rem 设置项目根目录
|
||||
set PROJECT_ROOT=%~dp0
|
||||
|
||||
rem 设置classpath
|
||||
set CLASSPATH=%PROJECT_ROOT%openhis-application\target\classes;%PROJECT_ROOT%openhis-domain\target\classes;%PROJECT_ROOT%openhis-common\target\classes;%PROJECT_ROOT%core-admin\target\classes;%PROJECT_ROOT%core-framework\target\classes;%PROJECT_ROOT%core-system\target\classes;%PROJECT_ROOT%core-quartz\target\classes;%PROJECT_ROOT%core-generator\target\classes;%PROJECT_ROOT%core-flowable\target\classes;%PROJECT_ROOT%core-common\target\classes
|
||||
set CLASSPATH=%PROJECT_ROOT%healthlink-his-application\target\classes;%PROJECT_ROOT%healthlink-his-domain\target\classes;%PROJECT_ROOT%healthlink-his-common\target\classes;%PROJECT_ROOT%core-admin\target\classes;%PROJECT_ROOT%core-framework\target\classes;%PROJECT_ROOT%core-system\target\classes;%PROJECT_ROOT%core-quartz\target\classes;%PROJECT_ROOT%core-generator\target\classes;%PROJECT_ROOT%core-flowable\target\classes;%PROJECT_ROOT%core-common\target\classes
|
||||
|
||||
rem 启动应用
|
||||
java -cp "%CLASSPATH%" com.openhis.OpenHisApplication
|
||||
java -cp "%CLASSPATH%" com.healthlink.his.HealthLinkHisApplication
|
||||
@@ -4,10 +4,10 @@
|
||||
PROJECT_ROOT=$(pwd)
|
||||
|
||||
# 设置classpath
|
||||
CLASSPATH="$PROJECT_ROOT/openhis-application/target/classes:$PROJECT_ROOT/openhis-domain/target/classes:$PROJECT_ROOT/openhis-common/target/classes:$PROJECT_ROOT/core-admin/target/classes:$PROJECT_ROOT/core-framework/target/classes:$PROJECT_ROOT/core-system/target/classes:$PROJECT_ROOT/core-quartz/target/classes:$PROJECT_ROOT/core-generator/target/classes:$PROJECT_ROOT/core-flowable/target/classes:$PROJECT_ROOT/core-common/target/classes"
|
||||
CLASSPATH="$PROJECT_ROOT/healthlink-his-application/target/classes:$PROJECT_ROOT/healthlink-his-domain/target/classes:$PROJECT_ROOT/healthlink-his-common/target/classes:$PROJECT_ROOT/core-admin/target/classes:$PROJECT_ROOT/core-framework/target/classes:$PROJECT_ROOT/core-system/target/classes:$PROJECT_ROOT/core-quartz/target/classes:$PROJECT_ROOT/core-generator/target/classes:$PROJECT_ROOT/core-flowable/target/classes:$PROJECT_ROOT/core-common/target/classes"
|
||||
|
||||
# 添加所有依赖jar包
|
||||
export CLASSPATH="$CLASSPATH:$(find $PROJECT_ROOT/openhis-application/target/dependency -name '*.jar' | tr '\n' ':')"
|
||||
export CLASSPATH="$CLASSPATH:$(find $PROJECT_ROOT/healthlink-his-application/target/dependency -name '*.jar' | tr '\n' ':')"
|
||||
|
||||
# 启动应用
|
||||
java -cp "$CLASSPATH" com.openhis.OpenHisApplication
|
||||
java -cp "$CLASSPATH" com.healthlink.his.HealthLinkHisApplication
|
||||
@@ -61,7 +61,7 @@
|
||||
ref="patientListRef"
|
||||
height="620"
|
||||
:data="patientList"
|
||||
:row-config="{ keyField: 'encounterId', keyField: 'id' }"
|
||||
:row-config="{ keyField: 'encounterId' }"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
@@ -447,7 +447,8 @@ function checkSelectable(row, index) {
|
||||
/**
|
||||
* 点击患者列表行 获取处方列表
|
||||
*/
|
||||
function clickRow(row) {
|
||||
function clickRow(params) {
|
||||
const row = params.row || params;
|
||||
patientInfo.value = row;
|
||||
chargeLoading.value = true;
|
||||
encounterId.value = row.encounterId;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
v-loading="readCardLoading"
|
||||
class="app-container"
|
||||
@@ -122,6 +122,7 @@
|
||||
<patientList
|
||||
:searchkey="patientSearchKey"
|
||||
@selsect-patient="selsectPatient"
|
||||
@mousedown.prevent
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input
|
||||
@@ -2079,10 +2080,20 @@ async function confirmCheckIn() {
|
||||
// 每次开始新的签到流程先清理残留 slotId,避免历史脏值串单
|
||||
currentSlotId.value = null;
|
||||
|
||||
// 防御性校验:确保关键字段存在
|
||||
if (!patient.departmentId) {
|
||||
ElMessage.error('该号源缺少科室信息,无法完成签到,请联系管理员');
|
||||
return;
|
||||
}
|
||||
if (!patient.realPatientId) {
|
||||
ElMessage.error('该号源缺少患者信息,无法完成签到,请联系管理员');
|
||||
return;
|
||||
}
|
||||
|
||||
// 弹出确认提示
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确认为患者【${patient.patientName}】办理签到挂号?\n` +
|
||||
`确认为患者【${patient.patientName || '未知患者'}】办理签到挂号?\n` +
|
||||
`科室:${patient.department || '-'}\n` +
|
||||
`医生:${patient.doctor || '-'}\n` +
|
||||
`费用:¥${patient.fee || '0.00'}`,
|
||||
@@ -2215,7 +2226,7 @@ async function confirmCheckIn() {
|
||||
* 点击患者列表给表单赋值
|
||||
*/
|
||||
function selsectPatient(row) {
|
||||
form.value = { ...form.value, ...row };
|
||||
Object.assign(form.value, row);
|
||||
form.value.patientId = row.id;
|
||||
form.value.searchKey = row.name;
|
||||
form.value.name = row.name;
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
currentDetail.createTime || '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="处方号">
|
||||
<el-descriptions-item label="手术单号">
|
||||
{{
|
||||
currentDetail.prescriptionNo || '-'
|
||||
}}
|
||||
@@ -574,6 +574,7 @@ const handleEdit = async (row) => {
|
||||
editFormRef.value?.getLocationInfo?.();
|
||||
editFormRef.value?.getDiagnosisList?.();
|
||||
editFormRef.value?.loadDoctorOptions?.();
|
||||
await editFormRef.value?.getList?.();
|
||||
if (row.requestFormDetailList?.length > 0) {
|
||||
editFormRef.value?.fillForm?.(
|
||||
JSON.parse(row.descJson || '{}'),
|
||||
|
||||
@@ -420,7 +420,7 @@ const getList = async (key) => {
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
getSurgeryPage({
|
||||
return getSurgeryPage({
|
||||
pageSize: 1000,
|
||||
keyword: key || undefined,
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
v-model="type"
|
||||
@change="handleRadioChange"
|
||||
>
|
||||
<el-radio :value="null">
|
||||
<el-radio :value="0">
|
||||
全部
|
||||
</el-radio>
|
||||
<el-radio :value="1">
|
||||
@@ -26,6 +26,14 @@
|
||||
临时
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<el-date-picker
|
||||
v-model="deadline"
|
||||
type="datetime"
|
||||
placeholder="选择截止时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 200px"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@@ -336,7 +344,7 @@ import {RequestStatus} from '@/utils/medicalConstants';
|
||||
const activeNames = ref([]);
|
||||
const prescriptionList = ref([]);
|
||||
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
|
||||
const type = ref(null);
|
||||
const type = ref(0);
|
||||
const backReasonVisible = ref(false);
|
||||
const backReasonForm = ref({ reason: '' });
|
||||
const backReasonFormRef = ref(null);
|
||||
@@ -435,7 +443,8 @@ function handleGetPrescription() {
|
||||
getPrescriptionList({
|
||||
encounterIds: encounterIds,
|
||||
requestStatus: props.requestStatus,
|
||||
...(type.value != null ? { therapyEnum: type.value } : {}),
|
||||
...(type.value !== 0 ? { therapyEnum: type.value } : {}),
|
||||
...(deadline.value ? { deadline: deadline.value } : {}),
|
||||
pageSize: 10000,
|
||||
pageNo: 1,
|
||||
}).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user