Compare commits
4 Commits
bugfix/518
...
bugfix/523
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
253f8921c1 | ||
|
|
b435de9e7b | ||
|
|
bc13fd6968 | ||
|
|
d9ad63397b |
@@ -96,4 +96,9 @@ public class DiagnosisQueryDto {
|
||||
*/
|
||||
private String diagnosisDoctor;
|
||||
|
||||
/**
|
||||
* 是否已有传染病报卡(0-无,1-有)
|
||||
*/
|
||||
private Integer hasInfectiousReport;
|
||||
|
||||
}
|
||||
|
||||
@@ -134,7 +134,11 @@
|
||||
T2.yb_no,
|
||||
T1.onset_date AS onsetDate,
|
||||
T1.diagnosis_time AS diagnosisTime,
|
||||
T1.doctor AS diagnosisDoctor
|
||||
T1.doctor AS diagnosisDoctor,
|
||||
CASE WHEN EXISTS (
|
||||
SELECT 1 FROM infectious_card T4
|
||||
WHERE T4.diag_id = T2.id AND T4.delete_flag = '0' AND T4.status >= 1
|
||||
) THEN 1 ELSE 0 END AS hasInfectiousReport
|
||||
FROM adm_encounter_diagnosis AS T1
|
||||
LEFT JOIN cli_condition AS T2 ON T2.ID = T1.condition_id
|
||||
AND T2.delete_flag = '0' AND T2.tcm_flag = 0
|
||||
|
||||
@@ -692,6 +692,7 @@ async function handleFoodDiseasesCheck() {
|
||||
/**
|
||||
* 传染病报告卡处理
|
||||
* 通过诊断名称自动识别并勾选传染病报告卡中的疾病
|
||||
* 修复 Bug #519:跳过已有已提交报卡的诊断
|
||||
*/
|
||||
function handleInfectiousDiseaseReport() {
|
||||
// 疾病名称到报卡编码的映射(根据传染病报告卡弹窗中的疾病列表)
|
||||
@@ -743,8 +744,9 @@ function handleInfectiousDiseaseReport() {
|
||||
'手足口病': '0311',
|
||||
};
|
||||
|
||||
// 获取所有诊断名称对应的报卡编码
|
||||
// 获取所有诊断名称对应的报卡编码,但跳过已有已提交报卡的诊断
|
||||
const allSelectedDiseases = form.value.diagnosisList
|
||||
.filter(d => d.name && d.hasInfectiousReport !== 1)
|
||||
.map(d => diseaseNameToCode[d.name] || null)
|
||||
.filter(code => code);
|
||||
|
||||
@@ -752,9 +754,9 @@ function handleInfectiousDiseaseReport() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 优先使用主诊断
|
||||
const mainDiagnosis = form.value.diagnosisList.find(d => d.maindiseFlag === 1);
|
||||
const firstDiagnosis = form.value.diagnosisList[0];
|
||||
// 优先使用主诊断(同样跳过已有报卡的)
|
||||
const mainDiagnosis = form.value.diagnosisList.find(d => d.maindiseFlag === 1 && d.hasInfectiousReport !== 1);
|
||||
const firstDiagnosis = form.value.diagnosisList.find(d => d.hasInfectiousReport !== 1) || form.value.diagnosisList[0];
|
||||
|
||||
const diagnosisToShow = {
|
||||
...(mainDiagnosis || firstDiagnosis),
|
||||
|
||||
@@ -1034,6 +1034,17 @@ function normalizeSex(value) {
|
||||
return '未知';
|
||||
}
|
||||
|
||||
function normalizeSexFromPatientInfo(patientInfo) {
|
||||
// 优先使用文本字段
|
||||
if (patientInfo.genderEnum_enumText) return patientInfo.genderEnum_enumText;
|
||||
if (patientInfo.genderName) return patientInfo.genderName;
|
||||
if (patientInfo.sex) return normalizeSex(patientInfo.sex);
|
||||
// 使用数字枚举字段
|
||||
if (patientInfo.genderEnum === 1) return '男';
|
||||
if (patientInfo.genderEnum === 2) return '女';
|
||||
return '未知';
|
||||
}
|
||||
|
||||
function normalizeAgeUnit(value) {
|
||||
const ageUnitMap = {
|
||||
1: '岁',
|
||||
@@ -1295,7 +1306,7 @@ async function show(diagnosisData) {
|
||||
patName: patientInfo.patientName || patientInfo.name || '', // 患者姓名
|
||||
parentName: '', // 家长姓名(14岁以下患者必填)
|
||||
idNo: patientInfo.idCard, // 身份证号
|
||||
sex: patientInfo.sex || patientInfo.genderName || '男', // 性别
|
||||
sex: normalizeSexFromPatientInfo(patientInfo), // 性别
|
||||
|
||||
// 出生日期信息
|
||||
birthYear: birthInfo.year, // 出生年份
|
||||
|
||||
@@ -1503,16 +1503,16 @@ function handleSaveBatch() {
|
||||
}
|
||||
|
||||
function setValue(row) {
|
||||
// 构造单位列表
|
||||
// 构造单位列表,确保 value 始终为 String 类型,避免 el-select 值类型不匹配
|
||||
unitCodeList.value = [
|
||||
{ value: row.unitCode, label: row.unitCode_dictText, type: 'unit' },
|
||||
{ value: String(row.unitCode ?? ''), label: row.unitCode_dictText, type: 'unit' },
|
||||
{
|
||||
value: row.doseUnitCode,
|
||||
value: String(row.doseUnitCode ?? ''),
|
||||
label: row.doseUnitCode_dictText,
|
||||
type: 'dose',
|
||||
},
|
||||
{
|
||||
value: row.minUnitCode,
|
||||
value: String(row.minUnitCode ?? ''),
|
||||
label: row.minUnitCode_dictText,
|
||||
type: 'minUnit',
|
||||
},
|
||||
@@ -1577,9 +1577,9 @@ function setValue(row) {
|
||||
orgName: row.adviceType != 3 ? undefined : (findOrgName(row.orgId || row.positionId || patientInfo.value?.inHospitalOrgId) || row.orgName || patientInfo.value?.inHospitalOrgName || ''),
|
||||
// dose: undefined, Removed to preserve dose value from group package
|
||||
unitCodeList: unitCodeList.value,
|
||||
doseUnitCode: row.doseUnitCode,
|
||||
minUnitCode: row.minUnitCode,
|
||||
unitCode: row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode,
|
||||
doseUnitCode: String(row.doseUnitCode ?? ''),
|
||||
minUnitCode: String(row.minUnitCode ?? ''),
|
||||
unitCode: row.partAttributeEnum == 1 ? String(row.minUnitCode ?? '') : String(row.unitCode ?? ''),
|
||||
categoryEnum: row.categoryCode,
|
||||
definitionId: row.chargeItemDefinitionId,
|
||||
executeNum: 1,
|
||||
@@ -1595,6 +1595,10 @@ function setValue(row) {
|
||||
? new Decimal(selectedStock.price).div(row.partPercent).toFixed(6)
|
||||
: prevRow.minUnitPrice,
|
||||
positionName: selectedStock?.locationName,
|
||||
// 🔧 Bug #523 修复:初始化 totalPrice 为 0,避免总金额列显示为横杠
|
||||
totalPrice: row.quantity
|
||||
? new Decimal(row.quantity).mul(selectedStock?.price ?? 0).toFixed(6)
|
||||
: '0',
|
||||
}
|
||||
: {
|
||||
quantity: 1,
|
||||
|
||||
@@ -1057,8 +1057,8 @@ function confirmCharge() {
|
||||
params.recordingDate = formData.value.recordingDate || moment(new Date()).format('YYYY-MM-DD');
|
||||
|
||||
addVitalSigns(params).then(res => {
|
||||
console.log('保存成功:', res);
|
||||
if (res.code === 200) {
|
||||
proxy.msgSuccess('保存成功');
|
||||
// 保存成功后刷新列表
|
||||
getPatientList();
|
||||
// 清空表单
|
||||
@@ -1087,8 +1087,6 @@ function confirmCharge() {
|
||||
urineVolume: '',
|
||||
stoolVolume: '',
|
||||
};
|
||||
// 保存成功后关闭弹窗
|
||||
closeDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user