55门诊医生站-》中医:诊断字段
This commit is contained in:
@@ -187,6 +187,12 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
condition.setTcmFlag(Whether.YES.getValue());// 中医标识
|
condition.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||||
condition.setRecordedDatetime(new Date());
|
condition.setRecordedDatetime(new Date());
|
||||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||||
|
// 设置租户ID,避免数据库约束错误
|
||||||
|
condition.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||||
|
// 设置创建人,避免数据库约束错误
|
||||||
|
condition.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||||
|
// 设置创建时间,避免数据库约束错误
|
||||||
|
condition.setCreateTime(new Date());
|
||||||
iConditionService.saveOrUpdate(condition);
|
iConditionService.saveOrUpdate(condition);
|
||||||
saveDiagnosisChildParam.setConditionId(condition.getId());
|
saveDiagnosisChildParam.setConditionId(condition.getId());
|
||||||
}
|
}
|
||||||
@@ -225,6 +231,12 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
||||||
encounterDiagnosis.setTcmFlag(Whether.YES.getValue());// 中医标识
|
encounterDiagnosis.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||||
encounterDiagnosis.setSyndromeGroupNo(saveDiagnosisChildParam.getSyndromeGroupNo());// 中医证候组号
|
encounterDiagnosis.setSyndromeGroupNo(saveDiagnosisChildParam.getSyndromeGroupNo());// 中医证候组号
|
||||||
|
// 设置租户ID,避免数据库约束错误
|
||||||
|
encounterDiagnosis.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||||
|
// 设置创建人,避免数据库约束错误
|
||||||
|
encounterDiagnosis.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||||
|
// 设置创建时间,避免数据库约束错误
|
||||||
|
encounterDiagnosis.setCreateTime(new Date());
|
||||||
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
||||||
if (saveDiagnosisChildParam.getDiagSrtNo() == null) {
|
if (saveDiagnosisChildParam.getDiagSrtNo() == null) {
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
@@ -268,6 +280,12 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
condition.setTcmFlag(Whether.YES.getValue());// 中医标识
|
condition.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||||
condition.setRecordedDatetime(new Date());
|
condition.setRecordedDatetime(new Date());
|
||||||
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
condition.setRecorderId(SecurityUtils.getLoginUser().getPractitionerId());// 记录人
|
||||||
|
// 设置租户ID,避免数据库约束错误
|
||||||
|
condition.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||||
|
// 设置创建人,避免数据库约束错误
|
||||||
|
condition.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||||
|
// 设置创建时间,避免数据库约束错误
|
||||||
|
condition.setCreateTime(new Date());
|
||||||
iConditionService.saveOrUpdate(condition);
|
iConditionService.saveOrUpdate(condition);
|
||||||
saveDiagnosisChildParam.setConditionId(condition.getId());
|
saveDiagnosisChildParam.setConditionId(condition.getId());
|
||||||
}
|
}
|
||||||
@@ -289,6 +307,12 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
encounterDiagnosis.setIptDiseTypeCode(saveDiagnosisChildParam.getIptDiseTypeCode()); // 患者疾病诊断类型代码
|
||||||
encounterDiagnosis.setTcmFlag(Whether.YES.getValue());// 中医标识
|
encounterDiagnosis.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||||
encounterDiagnosis.setSyndromeGroupNo(saveDiagnosisChildParam.getSyndromeGroupNo());// 中医证候组号
|
encounterDiagnosis.setSyndromeGroupNo(saveDiagnosisChildParam.getSyndromeGroupNo());// 中医证候组号
|
||||||
|
// 设置租户ID,避免数据库约束错误
|
||||||
|
encounterDiagnosis.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||||
|
// 设置创建人,避免数据库约束错误
|
||||||
|
encounterDiagnosis.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||||
|
// 设置创建时间,避免数据库约束错误
|
||||||
|
encounterDiagnosis.setCreateTime(new Date());
|
||||||
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
iEncounterDiagnosisService.saveOrUpdate(encounterDiagnosis);
|
||||||
}
|
}
|
||||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"中医诊断"}));
|
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"中医诊断"}));
|
||||||
@@ -493,6 +517,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
medicationRequest.setDosageInstruction(adviceSaveDto.getDosageInstruction()); // 用药说明 , 即煎法
|
medicationRequest.setDosageInstruction(adviceSaveDto.getDosageInstruction()); // 用药说明 , 即煎法
|
||||||
}
|
}
|
||||||
iMedicationRequestService.saveOrUpdate(medicationRequest);
|
iMedicationRequestService.saveOrUpdate(medicationRequest);
|
||||||
|
adviceSaveDto.setRequestId(medicationRequest.getId());
|
||||||
if (is_save) {
|
if (is_save) {
|
||||||
// 处理药品发放
|
// 处理药品发放
|
||||||
Long dispenseId
|
Long dispenseId
|
||||||
@@ -608,11 +633,13 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
List<Long> requestIds = medicineList.stream()
|
List<Long> requestIds = medicineList.stream()
|
||||||
.filter(e -> !DbOpType.DELETE.getCode().equals(e.getDbOpType()) && e.getRequestId() != null)
|
.filter(e -> !DbOpType.DELETE.getCode().equals(e.getDbOpType()) && e.getRequestId() != null)
|
||||||
.collect(Collectors.toList()).stream().map(AdviceSaveDto::getRequestId).collect(Collectors.toList());
|
.collect(Collectors.toList()).stream().map(AdviceSaveDto::getRequestId).collect(Collectors.toList());
|
||||||
iChargeItemService.update(new LambdaUpdateWrapper<ChargeItem>()
|
if (!requestIds.isEmpty()) {
|
||||||
.set(ChargeItem::getStatusEnum, ChargeItemStatus.PLANNED.getValue())
|
iChargeItemService.update(new LambdaUpdateWrapper<ChargeItem>()
|
||||||
.eq(ChargeItem::getEncounterId, encounterId)
|
.set(ChargeItem::getStatusEnum, ChargeItemStatus.PLANNED.getValue())
|
||||||
.eq(ChargeItem::getStatusEnum, ChargeItemStatus.DRAFT.getValue())
|
.eq(ChargeItem::getEncounterId, encounterId)
|
||||||
.in(ChargeItem::getServiceId, requestIds));
|
.eq(ChargeItem::getStatusEnum, ChargeItemStatus.DRAFT.getValue())
|
||||||
|
.in(ChargeItem::getServiceId, requestIds));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"门诊中医医嘱"}));
|
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"门诊中医医嘱"}));
|
||||||
|
|||||||
@@ -890,9 +890,12 @@ function selectAdviceBase(key, row, pIndex) {
|
|||||||
type: 'minUnit',
|
type: 'minUnit',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const rowData = JSON.parse(JSON.stringify(row));
|
||||||
prescription.prescriptionList[rowIndex.value] = {
|
prescription.prescriptionList[rowIndex.value] = {
|
||||||
...prescription.prescriptionList[rowIndex.value],
|
...prescription.prescriptionList[rowIndex.value], // 保留原有属性(如 uniqueKey, groupId)
|
||||||
...JSON.parse(JSON.stringify(row)),
|
...rowData, // 覆盖药品信息
|
||||||
|
statusEnum: 1, // 【关键修复】强制状态为“待签发/草稿”,确保能被保存过滤器捕获
|
||||||
|
adviceDefinitionId: rowData.adviceDefinitionId // 确保这个字段有值,后端会根据这个字段过滤空行
|
||||||
};
|
};
|
||||||
prescription.prescriptionList[rowIndex.value].orgId = undefined;
|
prescription.prescriptionList[rowIndex.value].orgId = undefined;
|
||||||
prescription.prescriptionList[rowIndex.value].dose = undefined;
|
prescription.prescriptionList[rowIndex.value].dose = undefined;
|
||||||
@@ -1233,44 +1236,27 @@ function handleSingOut(pIndex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 处理行checkbox选中
|
// 处理行checkbox选中
|
||||||
|
/**
|
||||||
|
* 处理行 checkbox 选中 (修改版)
|
||||||
|
* 删除了根据 groupId 自动联动的逻辑,支持单选。
|
||||||
|
*/
|
||||||
function handleCheckBoxChange(value, index, row, pIndex) {
|
function handleCheckBoxChange(value, index, row, pIndex) {
|
||||||
const prescription = tcmPrescriptionList.value[pIndex];
|
const prescription = tcmPrescriptionList.value[pIndex];
|
||||||
// 选中将当前行索引记录下来,取消将当前行索引删除
|
|
||||||
|
// 1. 基础逻辑:记录或移除当前选中行的索引
|
||||||
if (value) {
|
if (value) {
|
||||||
|
// 选中时,将当前行索引记录到 groupIndexList
|
||||||
prescription.groupIndexList.push(index);
|
prescription.groupIndexList.push(index);
|
||||||
} else {
|
} else {
|
||||||
prescription.groupIndexList.splice(prescription.groupIndexList.indexOf(index), 1);
|
// 取消选中时,从 groupIndexList 中移除
|
||||||
}
|
const targetIndex = prescription.groupIndexList.indexOf(index);
|
||||||
// 如果选中或取消行有组号,将全部相同组号的行全部选中,并记录或删除这些行的索引
|
if (targetIndex !== -1) {
|
||||||
if (row.groupId) {
|
prescription.groupIndexList.splice(targetIndex, 1);
|
||||||
// 获取组号相同行
|
|
||||||
let sameGroupIdList = prescription.prescriptionList.filter((item) => {
|
|
||||||
return item.groupId == row.groupId;
|
|
||||||
});
|
|
||||||
// 如果只有一个组号的情况不做处理
|
|
||||||
if (sameGroupIdList.length == 1) {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
sameGroupIdList.forEach((item) => {
|
|
||||||
// 排除掉当前选中行
|
|
||||||
if (row.uniqueKey != item.uniqueKey) {
|
|
||||||
// 同步选中状态
|
|
||||||
let currentIndex = prescription.prescriptionList.findIndex(
|
|
||||||
(k) => k.uniqueKey == item.uniqueKey
|
|
||||||
);
|
|
||||||
prescription.prescriptionList[currentIndex].check = value;
|
|
||||||
if (value) {
|
|
||||||
prescription.groupIndexList.push(currentIndex); // 或使用索引或唯一标识
|
|
||||||
} else if (!value) {
|
|
||||||
prescription.groupIndexList.splice(
|
|
||||||
prescription.groupIndexList.indexOf(currentIndex),
|
|
||||||
1
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- 原有的 groupId 联动逻辑已删除 ---
|
||||||
|
// 这样医生就可以单独勾选某一味药进行“删除”或“打印”操作,而不会影响同处方的其他药物。
|
||||||
}
|
}
|
||||||
|
|
||||||
// 校验每个组号数量是否大于5和对应分组金额是否大于500
|
// 校验每个组号数量是否大于5和对应分组金额是否大于500
|
||||||
|
|||||||
Reference in New Issue
Block a user