Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7a6578094 | ||
|
|
a5ed6eaea9 | ||
|
|
31504f3260 | ||
|
|
8bd687581c | ||
|
|
2d16d6695c | ||
|
|
d04f998ae7 | ||
|
|
2d5d01bedc | ||
|
|
44fd7de754 |
@@ -341,28 +341,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
&& (DbOpType.INSERT.getCode().equals(e.getDbOpType()) || DbOpType.UPDATE.getCode().equals(e.getDbOpType())))
|
||||
.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) {
|
||||
boolean firstTimeSave = false;// 第一次保存
|
||||
longMedicationRequest = new MedicationRequest();
|
||||
@@ -428,29 +406,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
.getValue().equals(e.getTherapyEnum())
|
||||
&& (DbOpType.INSERT.getCode().equals(e.getDbOpType()) || DbOpType.UPDATE.getCode().equals(e.getDbOpType())))
|
||||
.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) {
|
||||
boolean firstTimeSave = false;// 第一次保存
|
||||
tempMedicationRequest = new MedicationRequest();
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
ae.priority_enum,
|
||||
ae.organization_id,
|
||||
ae.start_time AS in_hos_time,
|
||||
COALESCE(bed.start_time, ae.start_time) AS start_time,
|
||||
bed.start_time,
|
||||
bed.location_id AS bed_id,
|
||||
bed.location_name AS bed_name,
|
||||
house.location_id AS house_id,
|
||||
|
||||
@@ -992,9 +992,7 @@ function handleRowClick(row) {
|
||||
selectedItems.value = [];
|
||||
activeDetailTab.value = 'applyForm';
|
||||
request({ url: `/exam/apply/${row.applyNo}`, method: 'get' }).then(async res => {
|
||||
// Axios interceptor already returns res.data (AjaxResult body: {code, data, items})
|
||||
// Don't double-unwrap: if res has 'code', use res directly; otherwise fall back to res.data
|
||||
const d = (res && res.code !== undefined) ? res : (res.data || res);
|
||||
const d = res.data || res;
|
||||
if (d.data) Object.assign(form, d.data);
|
||||
if (d.items && Array.isArray(d.items)) {
|
||||
try {
|
||||
|
||||
@@ -164,7 +164,7 @@ onMounted(() => {
|
||||
* type(1:watch监听类型 2:点击保存类型)
|
||||
* selectProjectIds(选中项目的id数组)
|
||||
* */
|
||||
const projectWithDepartment = (selectProjectIds) => {
|
||||
const projectWithDepartment = (selectProjectIds, type) => {
|
||||
//1.获取选中的项目 2.判断项目的执行科室是否相同 3.判断执行科室是否配置 4.将项目的执行科室复值到执行科室下拉选位置
|
||||
let isRelease = true;
|
||||
// 选中项目的数组
|
||||
|
||||
@@ -801,9 +801,7 @@ function clickRowDb(row, column, event) {
|
||||
return;
|
||||
}
|
||||
row.showPopover = false;
|
||||
// 允许所有 statusEnum==1 的医嘱进入编辑:
|
||||
// 1. 新医嘱(无 requestId):待保存
|
||||
// 2. 护士退回医嘱(有 requestId):退回后状态重置为 DRAFT(1),需允许医生编辑修改后重新签发
|
||||
// 仅”待签发(statusEnum==1)”允许编辑;”已签发(statusEnum==2)”及之后状态不允许编辑
|
||||
if (row.statusEnum == 1) {
|
||||
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
||||
row.therapyEnum = String(row.therapyEnum ?? '1');
|
||||
|
||||
Reference in New Issue
Block a user