Compare commits
60 Commits
刘备
...
f7a3f658fb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7a3f658fb | ||
|
|
dd36dc49ea | ||
|
|
559821e4d3 | ||
|
|
0dd4c25c12 | ||
|
|
3590a18adc | ||
|
|
b96acc2402 | ||
|
|
1c9bb92663 | ||
|
|
6ddd9bb2dc | ||
|
|
c8ed4e5856 | ||
|
|
253ceaffc6 | ||
|
|
ed7c388d11 | ||
|
|
f581f72693 | ||
|
|
55b517c8c6 | ||
|
|
0c36230158 | ||
|
|
351a2fba2e | ||
|
|
09e5825dab | ||
|
|
1f94efa1d2 | ||
|
|
d4d9ede5d7 | ||
|
|
876e46bfea | ||
|
|
7388e01b5d | ||
|
|
4af2fc5f54 | ||
|
|
c04432e39a | ||
|
|
21e68da15e | ||
|
|
6fdf96edab | ||
|
|
2ef1ce9f35 | ||
|
|
11fd9b839c | ||
|
|
5357ddb220 | ||
|
|
79bd7c0281 | ||
|
|
4c4f01abd1 | ||
|
|
e83c35c3f1 | ||
|
|
b5d876be36 | ||
|
|
5539d4cc03 | ||
|
|
982e905990 | ||
|
|
0d46f03e68 | ||
|
|
3cab8306c2 | ||
|
|
0600bbecbc | ||
|
|
ac57ac21e9 | ||
|
|
d38efd15b3 | ||
|
|
c7404e9d3f | ||
|
|
b4d452995f | ||
|
|
23c75b147e | ||
|
|
1e431d096d | ||
|
|
e1de467b68 | ||
| 53a3460092 | |||
|
|
084d04d518 | ||
|
|
d7f8a20d76 | ||
| 331fc532fc | |||
|
|
dafa5961c4 | ||
|
|
f223192ec5 | ||
|
|
c7956a116b | ||
|
|
845354e863 | ||
|
|
56ea4b6af1 | ||
|
|
703e9ead43 | ||
|
|
a43f98cc5a | ||
|
|
9215c288d3 | ||
|
|
777ba71c7d | ||
|
|
c3dfd3eb21 | ||
|
|
8093f8acda | ||
|
|
8fae6fe3d5 | ||
|
|
5af86494dd |
@@ -7,6 +7,7 @@ import com.core.common.utils.MessageUtils;
|
|||||||
import com.openhis.administration.domain.Location;
|
import com.openhis.administration.domain.Location;
|
||||||
import com.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
import com.openhis.administration.domain.OrganizationLocation;
|
import com.openhis.administration.domain.OrganizationLocation;
|
||||||
|
import com.openhis.workflow.domain.ActivityDefinition;
|
||||||
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
||||||
import com.openhis.administration.service.ILocationService;
|
import com.openhis.administration.service.ILocationService;
|
||||||
import com.openhis.administration.service.IOrganizationLocationService;
|
import com.openhis.administration.service.IOrganizationLocationService;
|
||||||
@@ -70,6 +71,7 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
// 获取科室下拉选列表
|
// 获取科室下拉选列表
|
||||||
List<Organization> organizationList = organizationService.getList(OrganizationType.DEPARTMENT.getValue(), null);
|
List<Organization> organizationList = organizationService.getList(OrganizationType.DEPARTMENT.getValue(), null);
|
||||||
List<OrgLocInitDto.departmentOption> organizationOptions = organizationList.stream()
|
List<OrgLocInitDto.departmentOption> organizationOptions = organizationList.stream()
|
||||||
|
.filter(organization -> organization != null && organization.getName() != null)
|
||||||
.map(organization -> new OrgLocInitDto.departmentOption(organization.getId(), organization.getName()))
|
.map(organization -> new OrgLocInitDto.departmentOption(organization.getId(), organization.getName()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
initDto.setLocationFormOptions(chargeItemStatusOptions).setDepartmentOptions(organizationOptions);
|
initDto.setLocationFormOptions(chargeItemStatusOptions).setDepartmentOptions(organizationOptions);
|
||||||
@@ -131,12 +133,18 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
|||||||
@Override
|
@Override
|
||||||
public R<?> addOrEditOrgLoc(OrgLocQueryDto orgLocQueryDto) {
|
public R<?> addOrEditOrgLoc(OrgLocQueryDto orgLocQueryDto) {
|
||||||
|
|
||||||
|
// Validate required fields before processing
|
||||||
|
if (orgLocQueryDto.getOrganizationId() == null) {
|
||||||
|
return R.fail("请选择执行科室");
|
||||||
|
}
|
||||||
|
|
||||||
OrganizationLocation orgLoc = new OrganizationLocation();
|
OrganizationLocation orgLoc = new OrganizationLocation();
|
||||||
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
||||||
|
|
||||||
Long activityDefinitionId = orgLoc.getActivityDefinitionId();
|
Long activityDefinitionId = orgLoc.getActivityDefinitionId();
|
||||||
String activityName = activityDefinitionId != null
|
ActivityDefinition activityDef = activityDefinitionId != null
|
||||||
? activityDefinitionMapper.selectById(activityDefinitionId).getName() : "";
|
? activityDefinitionMapper.selectById(activityDefinitionId) : null;
|
||||||
|
String activityName = activityDef != null ? activityDef.getName() : "";
|
||||||
|
|
||||||
List<OrganizationLocation> organizationLocationList =
|
List<OrganizationLocation> organizationLocationList =
|
||||||
organizationLocationService.getOrgLocListByOrgIdAndActivityDefinitionId(orgLoc.getActivityDefinitionId());
|
organizationLocationService.getOrgLocListByOrgIdAndActivityDefinitionId(orgLoc.getActivityDefinitionId());
|
||||||
|
|||||||
@@ -319,15 +319,30 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果队列项存在且未完成,更新队列状态为已完成
|
// 如果队列项存在,更新队列状态为已完成
|
||||||
// 使用排除法而非白名单:只要不是"已完成"就可以完诊,覆盖跳过、等待等非标准流转状态
|
// 使用 LambdaUpdateWrapper 直接更新数据库,避免 updateById 实体序列化导致的类型映射问题
|
||||||
if (queueItem != null &&
|
if (queueItem != null) {
|
||||||
!TriageQueueStatus.COMPLETED.getValue().equals(queueItem.getStatus())) {
|
Integer targetStatus = TriageQueueStatus.COMPLETED.getValue();
|
||||||
java.time.LocalDateTime nowLocal = java.time.LocalDateTime.now().truncatedTo(ChronoUnit.SECONDS);
|
// 排除法:只要不是"已完成"就执行更新,覆盖等待、叫号中、诊中、跳过等状态
|
||||||
queueItem.setStatus(TriageQueueStatus.COMPLETED.getValue());
|
if (!targetStatus.equals(queueItem.getStatus())) {
|
||||||
queueItem.setUpdateTime(nowLocal);
|
java.time.LocalDateTime nowLocal = java.time.LocalDateTime.now().truncatedTo(ChronoUnit.SECONDS);
|
||||||
triageQueueItemService.updateById(queueItem);
|
boolean updated = triageQueueItemService.update(
|
||||||
} else if (queueItem == null) {
|
new LambdaUpdateWrapper<TriageQueueItem>()
|
||||||
|
.eq(TriageQueueItem::getId, queueItem.getId())
|
||||||
|
.set(TriageQueueItem::getStatus, targetStatus)
|
||||||
|
.set(TriageQueueItem::getUpdateTime, nowLocal)
|
||||||
|
);
|
||||||
|
if (updated) {
|
||||||
|
log.info("完诊:更新队列状态为 COMPLETED(30) 成功,queueItemId={}, encounterId={}",
|
||||||
|
queueItem.getId(), encounterId);
|
||||||
|
} else {
|
||||||
|
log.error("完诊:更新队列状态为 COMPLETED(30) 失败,queueItemId={}, encounterId={}",
|
||||||
|
queueItem.getId(), encounterId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.info("完诊:队列状态已为 COMPLETED(30),无需重复更新,queueItemId={}", queueItem.getId());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
log.error("完诊:未找到任何 triage_queue_item 记录,encounterId={}, tenantId={}",
|
log.error("完诊:未找到任何 triage_queue_item 记录,encounterId={}, tenantId={}",
|
||||||
encounterId, tenantId);
|
encounterId, tenantId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,19 @@ public interface IRequestFormManageAppService {
|
|||||||
*/
|
*/
|
||||||
List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate);
|
List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询申请单(支持筛选+状态+关键字)
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @param typeCode 申请单类型
|
||||||
|
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
||||||
|
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
||||||
|
* @param status 单据状态(可选)
|
||||||
|
* @param keyword 关键字(可选,申请单号/项目名称模糊匹配)
|
||||||
|
* @return 申请单列表
|
||||||
|
*/
|
||||||
|
List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status, String keyword);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询申请单
|
* 分页查询申请单
|
||||||
*
|
*
|
||||||
@@ -50,4 +63,20 @@ public interface IRequestFormManageAppService {
|
|||||||
* @return 申请单
|
* @return 申请单
|
||||||
*/
|
*/
|
||||||
IPage<RequestFormPageDto> getRequestFormPage(RequestFormDto requestFormDto);
|
IPage<RequestFormPageDto> getRequestFormPage(RequestFormDto requestFormDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除申请单(仅待签发状态可删除)
|
||||||
|
*
|
||||||
|
* @param requestFormId 申请单ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<?> deleteRequestForm(Long requestFormId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤回申请单(已签发状态撤回至待签发)
|
||||||
|
*
|
||||||
|
* @param requestFormId 申请单ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<?> withdrawRequestForm(Long requestFormId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,6 +341,28 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
&& (DbOpType.INSERT.getCode().equals(e.getDbOpType()) || DbOpType.UPDATE.getCode().equals(e.getDbOpType())))
|
&& (DbOpType.INSERT.getCode().equals(e.getDbOpType()) || DbOpType.UPDATE.getCode().equals(e.getDbOpType())))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 防重复保存:对新增医嘱进行去重,避免签发单条长期医嘱时产生重复记录
|
||||||
|
Set<String> longUniqueKeySet = new HashSet<>();
|
||||||
|
List<RegAdviceSaveDto> longUniqueList = new ArrayList<>();
|
||||||
|
for (RegAdviceSaveDto adviceSaveDto : longInsertOrUpdateList) {
|
||||||
|
String uniqueKey = adviceSaveDto.getPatientId() + "_"
|
||||||
|
+ adviceSaveDto.getEncounterId() + "_"
|
||||||
|
+ adviceSaveDto.getAdviceDefinitionId() + "_"
|
||||||
|
+ adviceSaveDto.getDose() + "_"
|
||||||
|
+ adviceSaveDto.getMethodCode() + "_"
|
||||||
|
+ adviceSaveDto.getRateCode();
|
||||||
|
if (DbOpType.INSERT.getCode().equals(adviceSaveDto.getDbOpType()) && longUniqueKeySet.contains(uniqueKey)) {
|
||||||
|
log.warn("防重复保存:检测到重复长期医嘱,跳过保存 - patientId={}, encounterId={}, adviceDefinitionId={}, dose={}",
|
||||||
|
adviceSaveDto.getPatientId(), adviceSaveDto.getEncounterId(),
|
||||||
|
adviceSaveDto.getAdviceDefinitionId(), adviceSaveDto.getDose());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
longUniqueKeySet.add(uniqueKey);
|
||||||
|
longUniqueList.add(adviceSaveDto);
|
||||||
|
}
|
||||||
|
log.info("防重复保存(长期):去重前{}条,去重后{}条", longInsertOrUpdateList.size(), longUniqueList.size());
|
||||||
|
longInsertOrUpdateList = longUniqueList;
|
||||||
|
|
||||||
for (RegAdviceSaveDto regAdviceSaveDto : longInsertOrUpdateList) {
|
for (RegAdviceSaveDto regAdviceSaveDto : longInsertOrUpdateList) {
|
||||||
boolean firstTimeSave = false;// 第一次保存
|
boolean firstTimeSave = false;// 第一次保存
|
||||||
longMedicationRequest = new MedicationRequest();
|
longMedicationRequest = new MedicationRequest();
|
||||||
@@ -406,6 +428,29 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
.getValue().equals(e.getTherapyEnum())
|
.getValue().equals(e.getTherapyEnum())
|
||||||
&& (DbOpType.INSERT.getCode().equals(e.getDbOpType()) || DbOpType.UPDATE.getCode().equals(e.getDbOpType())))
|
&& (DbOpType.INSERT.getCode().equals(e.getDbOpType()) || DbOpType.UPDATE.getCode().equals(e.getDbOpType())))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 防重复保存:对新增医嘱进行去重
|
||||||
|
Set<String> tempUniqueKeySet = new HashSet<>();
|
||||||
|
List<RegAdviceSaveDto> tempUniqueList = new ArrayList<>();
|
||||||
|
for (RegAdviceSaveDto adviceSaveDto : tempInsertOrUpdateList) {
|
||||||
|
String uniqueKey = adviceSaveDto.getPatientId() + "_"
|
||||||
|
+ adviceSaveDto.getEncounterId() + "_"
|
||||||
|
+ adviceSaveDto.getAdviceDefinitionId() + "_"
|
||||||
|
+ adviceSaveDto.getDose() + "_"
|
||||||
|
+ adviceSaveDto.getMethodCode() + "_"
|
||||||
|
+ adviceSaveDto.getRateCode();
|
||||||
|
if (DbOpType.INSERT.getCode().equals(adviceSaveDto.getDbOpType()) && tempUniqueKeySet.contains(uniqueKey)) {
|
||||||
|
log.warn("防重复保存:检测到重复临时医嘱,跳过保存 - patientId={}, encounterId={}, adviceDefinitionId={}, dose={}",
|
||||||
|
adviceSaveDto.getPatientId(), adviceSaveDto.getEncounterId(),
|
||||||
|
adviceSaveDto.getAdviceDefinitionId(), adviceSaveDto.getDose());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
tempUniqueKeySet.add(uniqueKey);
|
||||||
|
tempUniqueList.add(adviceSaveDto);
|
||||||
|
}
|
||||||
|
log.info("防重复保存(临时):去重前{}条,去重后{}条", tempInsertOrUpdateList.size(), tempUniqueList.size());
|
||||||
|
tempInsertOrUpdateList = tempUniqueList;
|
||||||
|
|
||||||
for (RegAdviceSaveDto regAdviceSaveDto : tempInsertOrUpdateList) {
|
for (RegAdviceSaveDto regAdviceSaveDto : tempInsertOrUpdateList) {
|
||||||
boolean firstTimeSave = false;// 第一次保存
|
boolean firstTimeSave = false;// 第一次保存
|
||||||
tempMedicationRequest = new MedicationRequest();
|
tempMedicationRequest = new MedicationRequest();
|
||||||
|
|||||||
@@ -428,12 +428,28 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate) {
|
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate) {
|
||||||
|
return getRequestForm(encounterId, typeCode, startDate, endDate, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询申请单(支持筛选+状态+关键字)
|
||||||
|
*
|
||||||
|
* @param encounterId 就诊id
|
||||||
|
* @param typeCode 申请单类型
|
||||||
|
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
||||||
|
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
||||||
|
* @param status 单据状态(可选)
|
||||||
|
* @param keyword 关键字(可选,申请单号/项目名称模糊匹配)
|
||||||
|
* @return 申请单列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode, String startDate, String endDate, String status, String keyword) {
|
||||||
// 检查参数
|
// 检查参数
|
||||||
if (encounterId == null) {
|
if (encounterId == null) {
|
||||||
return new java.util.ArrayList<>();
|
return new java.util.ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<RequestFormQueryDto> requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate,null,null);
|
List<RequestFormQueryDto> requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode, startDate, endDate, status, keyword);
|
||||||
for (RequestFormQueryDto requestFormQueryDto : requestFormList) {
|
for (RequestFormQueryDto requestFormQueryDto : requestFormList) {
|
||||||
// 查询处方详情
|
// 查询处方详情
|
||||||
List<RequestFormDetailQueryDto> requestFormDetail =
|
List<RequestFormDetailQueryDto> requestFormDetail =
|
||||||
@@ -455,4 +471,68 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
|||||||
return requestFormManageAppMapper.getRequestFormPage(requestFormDto, page);
|
return requestFormManageAppMapper.getRequestFormPage(requestFormDto, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除申请单(仅待签发状态可删除)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public R<?> deleteRequestForm(Long requestFormId) {
|
||||||
|
if (requestFormId == null) {
|
||||||
|
return R.fail("申请单ID不能为空");
|
||||||
|
}
|
||||||
|
RequestForm requestForm = iRequestFormService.getById(requestFormId);
|
||||||
|
if (requestForm == null) {
|
||||||
|
return R.fail("申请单不存在");
|
||||||
|
}
|
||||||
|
if (!Integer.valueOf(0).equals(requestForm.getStatus())) {
|
||||||
|
return R.fail("仅待签发状态的申请单可删除");
|
||||||
|
}
|
||||||
|
// 删除申请单
|
||||||
|
iRequestFormService.removeById(requestFormId);
|
||||||
|
// 删除关联的诊疗项目及账单
|
||||||
|
String prescriptionNo = requestForm.getPrescriptionNo();
|
||||||
|
List<Long> serviceRequestIds = iServiceRequestService
|
||||||
|
.list(new LambdaQueryWrapper<ServiceRequest>().eq(ServiceRequest::getPrescriptionNo, prescriptionNo))
|
||||||
|
.stream().map(ServiceRequest::getId).collect(Collectors.toList());
|
||||||
|
for (Long serviceRequestId : serviceRequestIds) {
|
||||||
|
iServiceRequestService.removeById(serviceRequestId);
|
||||||
|
iChargeItemService.deleteByServiceTableAndId(CommonConstants.TableName.WOR_SERVICE_REQUEST, serviceRequestId);
|
||||||
|
}
|
||||||
|
return R.ok(null, "删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤回申请单(已签发状态撤回至待签发)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public R<?> withdrawRequestForm(Long requestFormId) {
|
||||||
|
if (requestFormId == null) {
|
||||||
|
return R.fail("申请单ID不能为空");
|
||||||
|
}
|
||||||
|
RequestForm requestForm = iRequestFormService.getById(requestFormId);
|
||||||
|
if (requestForm == null) {
|
||||||
|
return R.fail("申请单不存在");
|
||||||
|
}
|
||||||
|
if (!Integer.valueOf(1).equals(requestForm.getStatus())) {
|
||||||
|
return R.fail("仅已签发状态的申请单可撤回");
|
||||||
|
}
|
||||||
|
// 将申请单状态回滚至待签发
|
||||||
|
RequestForm updateForm = new RequestForm();
|
||||||
|
updateForm.setId(requestFormId);
|
||||||
|
updateForm.setStatus(0);
|
||||||
|
iRequestFormService.updateById(updateForm);
|
||||||
|
// 将关联的诊疗项目状态回滚至DRAFT
|
||||||
|
String prescriptionNo = requestForm.getPrescriptionNo();
|
||||||
|
List<ServiceRequest> serviceRequests = iServiceRequestService
|
||||||
|
.list(new LambdaQueryWrapper<ServiceRequest>().eq(ServiceRequest::getPrescriptionNo, prescriptionNo));
|
||||||
|
for (ServiceRequest serviceRequest : serviceRequests) {
|
||||||
|
ServiceRequest updateService = new ServiceRequest();
|
||||||
|
updateService.setId(serviceRequest.getId());
|
||||||
|
updateService.setStatusEnum(RequestStatus.DRAFT.getValue());
|
||||||
|
iServiceRequestService.updateById(updateService);
|
||||||
|
}
|
||||||
|
return R.ok(null, "撤回成功");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public class RequestFormManageController {
|
|||||||
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
||||||
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
||||||
* @param status 单据状态(可选)
|
* @param status 单据状态(可选)
|
||||||
|
* @param keyword 关键字(可选,申请单号/检验项目名称模糊匹配)
|
||||||
* @return 检验申请单
|
* @return 检验申请单
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/get-inspection")
|
@GetMapping(value = "/get-inspection")
|
||||||
@@ -105,11 +106,12 @@ public class RequestFormManageController {
|
|||||||
@RequestParam(required = false) Long encounterId,
|
@RequestParam(required = false) Long encounterId,
|
||||||
@RequestParam(required = false) String startDate,
|
@RequestParam(required = false) String startDate,
|
||||||
@RequestParam(required = false) String endDate,
|
@RequestParam(required = false) String endDate,
|
||||||
@RequestParam(required = false) String status) {
|
@RequestParam(required = false) String status,
|
||||||
|
@RequestParam(required = false) String keyword) {
|
||||||
if (encounterId == null) {
|
if (encounterId == null) {
|
||||||
return R.fail("就诊ID不能为空");
|
return R.fail("就诊ID不能为空");
|
||||||
}
|
}
|
||||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROOF.getCode(), startDate, endDate));
|
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROOF.getCode(), startDate, endDate, status, keyword));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -100,6 +100,7 @@
|
|||||||
WHEN T1.context_enum = 6 AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
WHEN T1.context_enum = 6 AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
||||||
WHEN T1.context_enum = 6 THEN T2."name"
|
WHEN T1.context_enum = 6 THEN T2."name"
|
||||||
WHEN T1.context_enum = #{activity} AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
WHEN T1.context_enum = #{activity} AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
||||||
|
WHEN T1.context_enum = #{activity} AND T1.service_table = 'wor_service_request' THEN COALESCE(T9.surgery_name, wsr.content_json::json->>'surgeryName', wsr.content_json::json->>'adviceName', T2."name")
|
||||||
WHEN T1.context_enum = #{activity} THEN COALESCE(wsr.content_json::json->>'surgeryName', wsr.content_json::json->>'adviceName', T2."name")
|
WHEN T1.context_enum = #{activity} THEN COALESCE(wsr.content_json::json->>'surgeryName', wsr.content_json::json->>'adviceName', T2."name")
|
||||||
WHEN T1.context_enum = #{medication} THEN T3."name"
|
WHEN T1.context_enum = #{medication} THEN T3."name"
|
||||||
WHEN T1.context_enum = #{device} THEN T4."name"
|
WHEN T1.context_enum = #{device} THEN T4."name"
|
||||||
@@ -225,6 +226,7 @@
|
|||||||
WHEN T1.context_enum = 6 AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
WHEN T1.context_enum = 6 AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
||||||
WHEN T1.context_enum = 6 THEN T2."name"
|
WHEN T1.context_enum = 6 THEN T2."name"
|
||||||
WHEN T1.context_enum = #{activity} AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
WHEN T1.context_enum = #{activity} AND T1.product_id = 0 AND T1.service_table = 'wor_service_request' THEN COALESCE(wsr.content_json::json->>'adviceName', T2."name")
|
||||||
|
WHEN T1.context_enum = #{activity} AND T1.service_table = 'wor_service_request' THEN COALESCE(T9.surgery_name, wsr.content_json::json->>'surgeryName', wsr.content_json::json->>'adviceName', T2."name")
|
||||||
WHEN T1.context_enum = #{activity} THEN COALESCE(wsr.content_json::json->>'surgeryName', wsr.content_json::json->>'adviceName', T2."name")
|
WHEN T1.context_enum = #{activity} THEN COALESCE(wsr.content_json::json->>'surgeryName', wsr.content_json::json->>'adviceName', T2."name")
|
||||||
WHEN T1.context_enum = #{medication} THEN T3."name"
|
WHEN T1.context_enum = #{medication} THEN T3."name"
|
||||||
WHEN T1.context_enum = #{device} THEN T4."name"
|
WHEN T1.context_enum = #{device} THEN T4."name"
|
||||||
|
|||||||
@@ -231,7 +231,7 @@
|
|||||||
ae.priority_enum,
|
ae.priority_enum,
|
||||||
ae.organization_id,
|
ae.organization_id,
|
||||||
ae.start_time AS in_hos_time,
|
ae.start_time AS in_hos_time,
|
||||||
bed.start_time,
|
COALESCE(bed.start_time, ae.start_time) AS start_time,
|
||||||
bed.location_id AS bed_id,
|
bed.location_id AS bed_id,
|
||||||
bed.location_name AS bed_name,
|
bed.location_name AS bed_name,
|
||||||
house.location_id AS house_id,
|
house.location_id AS house_id,
|
||||||
|
|||||||
@@ -280,9 +280,17 @@
|
|||||||
aa.balance_amount
|
aa.balance_amount
|
||||||
) AS personal_account
|
) AS personal_account
|
||||||
ON personal_account.encounter_id = ae.id
|
ON personal_account.encounter_id = ae.id
|
||||||
LEFT JOIN med_medication_dispense mmd
|
LEFT JOIN (
|
||||||
|
SELECT med_req_id, status_enum
|
||||||
|
FROM (
|
||||||
|
SELECT med_req_id, status_enum,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY med_req_id ORDER BY id DESC) AS rn
|
||||||
|
FROM med_medication_dispense
|
||||||
|
WHERE delete_flag = '0'
|
||||||
|
) t
|
||||||
|
WHERE rn = 1
|
||||||
|
) mmd
|
||||||
ON mmd.med_req_id = T1.id
|
ON mmd.med_req_id = T1.id
|
||||||
AND mmd.delete_flag = '0'
|
|
||||||
WHERE T1.delete_flag = '0'
|
WHERE T1.delete_flag = '0'
|
||||||
AND T1.refund_medicine_id IS NULL
|
AND T1.refund_medicine_id IS NULL
|
||||||
AND T1.generate_source_enum = #{doctorPrescription}
|
AND T1.generate_source_enum = #{doctorPrescription}
|
||||||
|
|||||||
@@ -12,12 +12,24 @@
|
|||||||
drf.desc_json,
|
drf.desc_json,
|
||||||
drf.requester_id,
|
drf.requester_id,
|
||||||
drf.create_time,
|
drf.create_time,
|
||||||
ap.NAME AS patient_name
|
ap.NAME AS patient_name,
|
||||||
|
CASE MIN(wsr.status_enum)
|
||||||
|
WHEN 1 THEN 0
|
||||||
|
WHEN 2 THEN 1
|
||||||
|
WHEN 3 THEN 4
|
||||||
|
WHEN 4 THEN 4
|
||||||
|
WHEN 5 THEN 5
|
||||||
|
WHEN 6 THEN 5
|
||||||
|
WHEN 7 THEN 5
|
||||||
|
ELSE NULL
|
||||||
|
END AS status
|
||||||
FROM doc_request_form AS drf
|
FROM doc_request_form AS drf
|
||||||
LEFT JOIN adm_encounter AS ae ON ae.ID = drf.encounter_id
|
LEFT JOIN adm_encounter AS ae ON ae.ID = drf.encounter_id
|
||||||
AND ae.delete_flag = '0'
|
AND ae.delete_flag = '0'
|
||||||
LEFT JOIN adm_patient AS ap ON ap.ID = ae.patient_id
|
LEFT JOIN adm_patient AS ap ON ap.ID = ae.patient_id
|
||||||
AND ap.delete_flag = '0'
|
AND ap.delete_flag = '0'
|
||||||
|
LEFT JOIN wor_service_request AS wsr ON wsr.prescription_no = drf.prescription_no
|
||||||
|
AND wsr.delete_flag = '0'
|
||||||
WHERE drf.delete_flag = '0'
|
WHERE drf.delete_flag = '0'
|
||||||
AND drf.encounter_id = #{encounterId}
|
AND drf.encounter_id = #{encounterId}
|
||||||
AND drf.type_code = #{typeCode}
|
AND drf.type_code = #{typeCode}
|
||||||
@@ -27,6 +39,33 @@
|
|||||||
<if test="endDate != null and endDate != ''">
|
<if test="endDate != null and endDate != ''">
|
||||||
AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second')
|
AND drf.create_time <= (#{endDate}::date + INTERVAL '1 day' - INTERVAL '1 second')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
AND CASE MIN(wsr.status_enum)
|
||||||
|
WHEN 1 THEN 0
|
||||||
|
WHEN 2 THEN 1
|
||||||
|
WHEN 3 THEN 4
|
||||||
|
WHEN 4 THEN 4
|
||||||
|
WHEN 5 THEN 5
|
||||||
|
WHEN 6 THEN 5
|
||||||
|
WHEN 7 THEN 5
|
||||||
|
ELSE NULL
|
||||||
|
END = #{status}::integer
|
||||||
|
</if>
|
||||||
|
<if test="keyword != null and keyword != ''">
|
||||||
|
AND (drf.prescription_no ILIKE '%' || #{keyword} || '%'
|
||||||
|
OR EXISTS (
|
||||||
|
SELECT 1 FROM wor_service_request wsr2
|
||||||
|
WHERE wsr2.prescription_no = drf.prescription_no
|
||||||
|
AND wsr2.delete_flag = '0'
|
||||||
|
AND wsr2.activity_id IN (
|
||||||
|
SELECT id FROM wor_activity_definition wad
|
||||||
|
WHERE wad.delete_flag = '0'
|
||||||
|
AND wad.name ILIKE '%' || #{keyword} || '%'
|
||||||
|
)
|
||||||
|
))
|
||||||
|
</if>
|
||||||
|
GROUP BY drf.id, drf.encounter_id, drf.prescription_no, drf.name, drf.desc_json,
|
||||||
|
drf.requester_id, drf.create_time, ap.name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRequestFormDetail" resultType="com.openhis.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
<select id="getRequestFormDetail" resultType="com.openhis.web.regdoctorstation.dto.RequestFormDetailQueryDto">
|
||||||
|
|||||||
@@ -59,4 +59,9 @@ public class RequestForm extends HisBaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String typeCode;
|
private String typeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据状态 0=待签发 1=已签发 2=已校对 3=待接收 4=已接收 5=已检查 6=已出报告 7=已作废
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -475,8 +475,13 @@ function calculateTotalPrice() {
|
|||||||
});
|
});
|
||||||
totalPrice.value = sum.toFixed(2);
|
totalPrice.value = sum.toFixed(2);
|
||||||
// Bug #464: 零售价与诊疗子项合计总价实时同步
|
// Bug #464: 零售价与诊疗子项合计总价实时同步
|
||||||
if (treatmentItems.value.length > 0 && treatmentItems.value[0].adviceDefinitionId !== '') {
|
const hasValidItem = treatmentItems.value.some(
|
||||||
|
(item) => item.adviceDefinitionId && item.adviceDefinitionId !== ''
|
||||||
|
);
|
||||||
|
if (hasValidItem) {
|
||||||
form.value.retailPrice = parseFloat(totalPrice.value);
|
form.value.retailPrice = parseFloat(totalPrice.value);
|
||||||
|
} else {
|
||||||
|
form.value.retailPrice = undefined;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
totalPrice.value = '0.00';
|
totalPrice.value = '0.00';
|
||||||
@@ -486,7 +491,7 @@ function calculateTotalPrice() {
|
|||||||
|
|
||||||
// 添加表单项
|
// 添加表单项
|
||||||
function addItem() {
|
function addItem() {
|
||||||
treatmentItems.value.push({ adviceDefinitionId: '', childrenRequestNum: 1, retailPrice: 0 });
|
treatmentItems.value.push({ adviceDefinitionId: '', childrenRequestNum: 1, name: '', retailPrice: 0 });
|
||||||
// 使用nextTick确保DOM更新后再计算
|
// 使用nextTick确保DOM更新后再计算
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
calculateTotalPrice();
|
calculateTotalPrice();
|
||||||
@@ -647,12 +652,15 @@ async function submitForm() {
|
|||||||
form.value.ybMatchFlag ? (form.value.ybMatchFlag = 1) : (form.value.ybMatchFlag = 0);
|
form.value.ybMatchFlag ? (form.value.ybMatchFlag = 1) : (form.value.ybMatchFlag = 0);
|
||||||
form.value.ruleId ? (form.value.ruleId = 1) : (form.value.ruleId = 0);
|
form.value.ruleId ? (form.value.ruleId = 1) : (form.value.ruleId = 0);
|
||||||
form.value.childrenJson =
|
form.value.childrenJson =
|
||||||
treatmentItems.value.length > 0 && treatmentItems.value[0].adviceDefinitionId != ''
|
treatmentItems.value.some((item) => item.adviceDefinitionId != '' && item.adviceDefinitionId)
|
||||||
? JSON.stringify(treatmentItems.value)
|
? JSON.stringify(treatmentItems.value)
|
||||||
: undefined;
|
: undefined;
|
||||||
// Bug #464 修复:零售价自动与诊疗子项合计总价同步
|
// Bug #464 修复:零售价自动与诊疗子项合计总价同步
|
||||||
// 当有子项时,零售价自动设置为子项合计总价
|
// 当有子项时,零售价自动设置为子项合计总价
|
||||||
if (treatmentItems.value.length > 0 && treatmentItems.value[0].adviceDefinitionId != '') {
|
const hasValidItem = treatmentItems.value.some(
|
||||||
|
(item) => item.adviceDefinitionId && item.adviceDefinitionId !== ''
|
||||||
|
);
|
||||||
|
if (hasValidItem) {
|
||||||
form.value.retailPrice = parseFloat(totalPrice.value) || 0;
|
form.value.retailPrice = parseFloat(totalPrice.value) || 0;
|
||||||
}
|
}
|
||||||
proxy.$refs['diagnosisTreatmentRef'].validate(async (valid) => {
|
proxy.$refs['diagnosisTreatmentRef'].validate(async (valid) => {
|
||||||
|
|||||||
@@ -1318,7 +1318,11 @@ async function show(diagnosisData) {
|
|||||||
// 系统关联信息
|
// 系统关联信息
|
||||||
encounterId: patientInfo.encounterId || '', // 就诊ID
|
encounterId: patientInfo.encounterId || '', // 就诊ID
|
||||||
patientId: patientInfo.patientId || '', // 患者ID
|
patientId: patientInfo.patientId || '', // 患者ID
|
||||||
diagnosisId: diagnosisData?.conditionId || diagnosisData?.definitionId || '', // 诊断ID
|
diagnosisId: (diagnosisData?.conditionId != null && diagnosisData?.conditionId !== '')
|
||||||
|
? diagnosisData.conditionId
|
||||||
|
: (diagnosisData?.definitionId != null && diagnosisData?.definitionId !== '')
|
||||||
|
? diagnosisData.definitionId
|
||||||
|
: '', // 诊断ID
|
||||||
};
|
};
|
||||||
|
|
||||||
// 更新selectedDiseases数组
|
// 更新selectedDiseases数组
|
||||||
@@ -1373,7 +1377,7 @@ async function buildSubmitData() {
|
|||||||
const submitData = {
|
const submitData = {
|
||||||
cardNo: formData.cardNo,
|
cardNo: formData.cardNo,
|
||||||
visitId: props.patientInfo?.encounterId || formData.encounterId || null,
|
visitId: props.patientInfo?.encounterId || formData.encounterId || null,
|
||||||
diagId: formData.diagnosisId || null,
|
diagId: formData.diagnosisId ? Number(formData.diagnosisId) : null,
|
||||||
patId: formData.patientId || null,
|
patId: formData.patientId || null,
|
||||||
idType: 1, // 默认身份证
|
idType: 1, // 默认身份证
|
||||||
idNo: formData.idNo,
|
idNo: formData.idNo,
|
||||||
@@ -1539,6 +1543,12 @@ async function handleSubmit() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查诊断ID是否有效(后端 @NotNull 校验要求)
|
||||||
|
if (!form.value.diagnosisId) {
|
||||||
|
proxy.$modal.msgError('诊断信息不完整,请重新选择诊断后重试');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 开始加载状态,防止重复提交
|
// 开始加载状态,防止重复提交
|
||||||
submitLoading.value = true;
|
submitLoading.value = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1013,15 +1013,29 @@ const mapAdviceTypeLabel = (type, adviceTableName) => {
|
|||||||
if (type === 2 && adviceTableName === 'adm_device_definition') {
|
if (type === 2 && adviceTableName === 'adm_device_definition') {
|
||||||
return '耗材';
|
return '耗材';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 🔧 Bug Fix: 处理检查类型(adviceType=23)
|
// 🔧 Bug Fix: 处理检查类型(adviceType=23)
|
||||||
// 检查类型属于诊疗类,应该显示为"检查"
|
// 检查类型属于诊疗类,应该显示为"检查"
|
||||||
if (type === 23) {
|
if (type === 23) {
|
||||||
return '检查';
|
return '检查';
|
||||||
}
|
}
|
||||||
|
|
||||||
const found = adviceTypeList.value.find((item) => item.value === type);
|
const found = adviceTypeList.value.find((item) => item.value === type);
|
||||||
return found ? found.label : '';
|
if (found) {
|
||||||
|
return found.label;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 Bug #458 Fix: 诊疗/手术类型字典缺失时的兜底,避免保存后"医嘱类型"列显示为空
|
||||||
|
if (adviceTableName === 'wor_activity_definition' || adviceTableName === 'wor_service_request') {
|
||||||
|
if (type === 6) return '手术';
|
||||||
|
if (type === 4) return '手术';
|
||||||
|
if (type === 1) return '检验';
|
||||||
|
if (type === 2) return '检查';
|
||||||
|
if (type === 5) return '其他';
|
||||||
|
return '诊疗';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
};
|
};
|
||||||
|
|
||||||
// 西药处方管理相关变量
|
// 西药处方管理相关变量
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ import {computed, getCurrentInstance, ref, watch} from 'vue';
|
|||||||
import {Refresh, Search} from '@element-plus/icons-vue';
|
import {Refresh, Search} from '@element-plus/icons-vue';
|
||||||
import {patientInfo} from '../../store/patient.js';
|
import {patientInfo} from '../../store/patient.js';
|
||||||
import {getCheck} from './api';
|
import {getCheck} from './api';
|
||||||
import {getOrgList} from '@/views/doctorstation/components/api.js';
|
import {getDepartmentList} from '@/api/public.js';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
@@ -293,8 +293,8 @@ const hasMatchedFields = computed(() => {
|
|||||||
|
|
||||||
/** 查询科室 */
|
/** 查询科室 */
|
||||||
const getLocationInfo = () => {
|
const getLocationInfo = () => {
|
||||||
getOrgList().then((res) => {
|
getDepartmentList().then((res) => {
|
||||||
orgOptions.value = res.data.records;
|
orgOptions.value = res.data || [];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -306,17 +306,19 @@ const recursionFun = (targetDepartment) => {
|
|||||||
name = obj.name;
|
name = obj.name;
|
||||||
}
|
}
|
||||||
const subObjArray = obj['children'];
|
const subObjArray = obj['children'];
|
||||||
for (let index = 0; index < subObjArray.length; index++) {
|
if (subObjArray && subObjArray.length > 0) {
|
||||||
const item = subObjArray[index];
|
for (let index = 0; index < subObjArray.length; index++) {
|
||||||
if (item.id == targetDepartment) {
|
const item = subObjArray[index];
|
||||||
name = item.name;
|
if (item.id == targetDepartment) {
|
||||||
|
name = item.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleViewDetail = (row) => {
|
const handleViewDetail = async (row) => {
|
||||||
console.log('targetDepartment========>', JSON.stringify(row));
|
console.log('targetDepartment========>', JSON.stringify(row));
|
||||||
|
|
||||||
currentDetail.value = row;
|
currentDetail.value = row;
|
||||||
@@ -324,6 +326,15 @@ const handleViewDetail = (row) => {
|
|||||||
if (row.descJson) {
|
if (row.descJson) {
|
||||||
try {
|
try {
|
||||||
const obj = JSON.parse(row.descJson);
|
const obj = JSON.parse(row.descJson);
|
||||||
|
// 确保科室数据已加载
|
||||||
|
if (!orgOptions.value || orgOptions.value.length === 0) {
|
||||||
|
await new Promise((resolve) => {
|
||||||
|
getDepartmentList().then((res) => {
|
||||||
|
orgOptions.value = res.data || [];
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
obj.targetDepartment = recursionFun(obj.targetDepartment);
|
obj.targetDepartment = recursionFun(obj.targetDepartment);
|
||||||
descJsonData.value = obj;
|
descJsonData.value = obj;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -41,8 +41,6 @@
|
|||||||
<el-option label="全部" value="" />
|
<el-option label="全部" value="" />
|
||||||
<el-option label="待签发" value="0" />
|
<el-option label="待签发" value="0" />
|
||||||
<el-option label="已签发" value="1" />
|
<el-option label="已签发" value="1" />
|
||||||
<el-option label="已采集" value="2" />
|
|
||||||
<el-option label="已收样" value="3" />
|
|
||||||
<el-option label="报告已出" value="4" />
|
<el-option label="报告已出" value="4" />
|
||||||
<el-option label="已作废" value="5" />
|
<el-option label="已作废" value="5" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -298,8 +296,6 @@ const parseBillStatus = (status) => {
|
|||||||
const statusMap = {
|
const statusMap = {
|
||||||
'0': '待签发',
|
'0': '待签发',
|
||||||
'1': '已签发',
|
'1': '已签发',
|
||||||
'2': '已采集',
|
|
||||||
'3': '已收样',
|
|
||||||
'4': '报告已出',
|
'4': '报告已出',
|
||||||
'5': '已作废',
|
'5': '已作废',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -801,8 +801,8 @@ function clickRowDb(row, column, event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
row.showPopover = false;
|
row.showPopover = false;
|
||||||
// “待签发(已保存 requestId存在)”不允许再编辑;仅“待保存(无requestId)”允许编辑
|
// 仅”待签发(statusEnum==1)”允许编辑;”已签发(statusEnum==2)”及之后状态不允许编辑
|
||||||
if (row.statusEnum == 1 && !row.requestId) {
|
if (row.statusEnum == 1) {
|
||||||
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
||||||
row.therapyEnum = String(row.therapyEnum ?? '1');
|
row.therapyEnum = String(row.therapyEnum ?? '1');
|
||||||
row.isEdit = true;
|
row.isEdit = true;
|
||||||
|
|||||||
@@ -1416,9 +1416,12 @@ function closeChargeDialog() {
|
|||||||
if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) {
|
if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) {
|
||||||
prescriptionRef.value.closeAllPopovers()
|
prescriptionRef.value.closeAllPopovers()
|
||||||
}
|
}
|
||||||
showChargeDialog.value = false
|
// 等 Vue 完成 DOM 更新后再关闭弹窗,确保 popover 先消失
|
||||||
chargePatientInfo.value = {}
|
nextTick(() => {
|
||||||
chargeSurgeryInfo.value = {}
|
showChargeDialog.value = false
|
||||||
|
chargePatientInfo.value = {}
|
||||||
|
chargeSurgeryInfo.value = {}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 🔧 新增:标志位,用于区分是"打开"还是"刷新"
|
// 🔧 新增:标志位,用于区分是"打开"还是"刷新"
|
||||||
|
|||||||
Reference in New Issue
Block a user