需求17 门诊医生站-》患者列表;从adm_encounter表中查询到first_enum字段用以判断初复诊

This commit is contained in:
HuangShun
2026-01-27 15:39:04 +08:00
parent b0f2eabf6b
commit acfce391dc
4 changed files with 39 additions and 2 deletions

View File

@@ -111,6 +111,8 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
e.setAge(e.getBirthDate() != null ? AgeCalculatorUtil.getAge(e.getBirthDate()) : ""); e.setAge(e.getBirthDate() != null ? AgeCalculatorUtil.getAge(e.getBirthDate()) : "");
// 就诊状态 // 就诊状态
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(EncounterStatus.class, e.getStatusEnum())); e.setStatusEnum_enumText(EnumUtils.getInfoByValue(EncounterStatus.class, e.getStatusEnum()));
// 初复诊
e.setFirstEnum_enumText(EnumUtils.getInfoByValue(EncounterType.class, e.getFirstEnum()));
}); });
return patientInfo; return patientInfo;
} }

View File

@@ -133,4 +133,10 @@ public class PatientInfoDto {
* 过号时间 * 过号时间
*/ */
private Date missedTime; private Date missedTime;
/**
* 初复诊标识
*/
private Integer firstEnum;
private String firstEnum_enumText;
} }

View File

@@ -25,7 +25,9 @@
T10.jz_practitioner_user_id, T10.jz_practitioner_user_id,
T10.bus_no, T10.bus_no,
T10.identifier_no, T10.identifier_no,
T10.missed_time T10.missed_time,
T10.first_enum,
T10.first_enum_enumText
from from
( (
SELECT T1.tenant_id AS tenant_id, SELECT T1.tenant_id AS tenant_id,
@@ -52,7 +54,13 @@
T1.organization_id AS org_id, T1.organization_id AS org_id,
T8.bus_no AS bus_no, T8.bus_no AS bus_no,
T9.identifier_no AS identifier_no, T9.identifier_no AS identifier_no,
T1.missed_time AS missed_time T1.missed_time AS missed_time,
T1.first_enum AS first_enum,
CASE
WHEN T1.first_enum = 1 THEN '初诊'
WHEN T1.first_enum = 2 THEN '复诊'
ELSE NULL
END AS first_enum_enumText
FROM adm_encounter AS T1 FROM adm_encounter AS T1
LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0' LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0'
LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0' LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0'

View File

@@ -99,6 +99,10 @@
{{ userStore.nickName }} {{ userStore.nickName }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="" width="300"> <el-descriptions-item label="" width="300">
<el-radio-group v-model="firstEnum">
<el-radio :label="1">初诊</el-radio>
<el-radio :label="2">复诊</el-radio>
</el-radio-group>
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)"> <el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
完诊 完诊
</el-button> </el-button>
@@ -276,6 +280,7 @@ const loading = ref(false);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const visitType = ref(''); const visitType = ref('');
const firstVisitDate = ref(''); const firstVisitDate = ref('');
const firstEnum = ref(1); // 初复诊标识1=初诊2=复诊
const disabled = computed(() => { const disabled = computed(() => {
// 只有在有患者信息但某些条件不满足时才启用覆盖层 // 只有在有患者信息但某些条件不满足时才启用覆盖层
// 当前逻辑保持不变,但我们将在按钮级别处理禁用状态 // 当前逻辑保持不变,但我们将在按钮级别处理禁用状态
@@ -506,6 +511,15 @@ function handleCardClickOriginal(item, index) {
console.log('patientInfo.value 设置为:', patientInfo.value); console.log('patientInfo.value 设置为:', patientInfo.value);
console.log('patientInfo.value.encounterId:', patientInfo.value?.encounterId); console.log('patientInfo.value.encounterId:', patientInfo.value?.encounterId);
// 根据患者信息设置初复诊标识
const backendValue = item.firstEnum ?? item.first_enum;
if (backendValue !== undefined && backendValue !== null) {
firstEnum.value = Number(backendValue); // 确保是数字类型
} else {
firstEnum.value = 1;
}
// 确保患者信息包含必要的字段 // 确保患者信息包含必要的字段
if (!patientInfo.value.encounterId) { if (!patientInfo.value.encounterId) {
console.error('患者信息缺少encounterId字段:', patientInfo.value); console.error('患者信息缺少encounterId字段:', patientInfo.value);
@@ -566,11 +580,18 @@ function handleFinish(encounterId) {
patientInfo.value = {}; patientInfo.value = {};
visitType.value = ''; // 重置初复诊标识 visitType.value = ''; // 重置初复诊标识
visitTypeDisabled.value = false; // 重置禁用状态 visitTypeDisabled.value = false; // 重置禁用状态
firstEnum.value = 1; // 重置为初诊
getPatientList(); getPatientList();
} }
}); });
} }
// 监听初复诊标识变化
watch(firstEnum, (newValue) => {
// 这里可以添加更新后端的逻辑,如果需要实时同步到后端
// 例如updateEncounterFirstEnum(patientInfo.value.encounterId, newValue)
});
function handleTimeChange(value) { function handleTimeChange(value) {
queryParams.value.registerTimeSTime = value + ' 00:00:00'; queryParams.value.registerTimeSTime = value + ' 00:00:00';
queryParams.value.registerTimeETime = value + ' 23:59:59'; queryParams.value.registerTimeETime = value + ' 23:59:59';