Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
叶锦涛
2025-10-23 16:04:48 +08:00
2 changed files with 73 additions and 32 deletions

View File

@@ -98,35 +98,36 @@
<el-descriptions-item label="医生:" width="150">{{ <el-descriptions-item label="医生:" width="150">{{
userStore.name userStore.name
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="" width="300"> <el-descriptions-item label="" width="350">
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)"> <!-- 初诊 / 复诊 按钮 -->
完诊 <el-radio v-model="visitType" label="FIRST">初诊</el-radio>
</el-button> <el-radio v-model="visitType" label="FOLLOW_UP">复诊</el-radio>
<el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
暂离 <!-- 原有按钮 -->
</el-button> <el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
<el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)"> 完诊
退费 </el-button>
</el-button> <el-button type="primary" plain @click.stop="handleLeave(patientInfo.encounterId)">
<el-button 暂离
type="primary" </el-button>
plain <el-button type="primary" plain @click.stop="handleRefund(patientInfo.encounterId)">
@click.stop="getEnPrescription(patientInfo.encounterId)" 退费
> </el-button>
处方单 <el-button
</el-button> type="primary"
<el-button plain
type="primary" @click.stop="getEnPrescription(patientInfo.encounterId)"
plain >
@click.stop=" 处方单
() => { </el-button>
openDialog = true; <el-button
} type="primary"
" plain
> @click.stop="openDialog = true"
办理住院 >
</el-button> 办理住院
</el-descriptions-item> </el-button>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
<div style="padding: 10px"> <div style="padding: 10px">
@@ -204,6 +205,7 @@ import {
leaveEncounter, leaveEncounter,
completeEncounter, completeEncounter,
getEnPrescriptionInfo, getEnPrescriptionInfo,
getEmrHistoryList
} from './components/api.js'; } from './components/api.js';
import prescriptionlist from './components/prescription/prescriptionlist.vue'; import prescriptionlist from './components/prescription/prescriptionlist.vue';
import RefundListDialog from './components/prescription/refundListDialog.vue'; import RefundListDialog from './components/prescription/refundListDialog.vue';
@@ -260,6 +262,7 @@ const diagnosisRef = ref();
const waitCount = ref(0); const waitCount = ref(0);
const loading = ref(false); const loading = ref(false);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const visitType = ref('');
const disabled = computed(() => { const disabled = computed(() => {
return Object.keys(patientInfo.value).length === 0; return Object.keys(patientInfo.value).length === 0;
}); });
@@ -282,7 +285,41 @@ function getPatientList() {
}); });
}); });
} }
function setVisitType(type) {
visitType.value = type;
}
function checkPatientHistory(patient) {
// 如果患者没有身份证号,无法判断是否为初诊
if (!patient.idCard) {
// 默认设置为初诊
visitType.value = 'FIRST';
return;
}
// 查询患者历史就诊记录
const params = {
patientId: patient.patientId,
idCard: patient.idCard
};
getEmrHistoryList(params).then(res => {
if (res.code === 200) {
// 如果有历史记录,则为复诊
if (res.data && res.data.total > 0) {
visitType.value = 'FOLLOW_UP';
} else {
// 如果没有历史记录,则为初诊
visitType.value = 'FIRST';
}
} else {
// 请求失败,默认设置为初诊
visitType.value = 'FIRST';
}
}).catch(() => {
// 异常情况,默认设置为初诊
visitType.value = 'FIRST';
});
}
function getWaitPatient() { function getWaitPatient() {
queryParams.value.registerTimeSTime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 00:00:00'; queryParams.value.registerTimeSTime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 00:00:00';
queryParams.value.registerTimeETime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59'; queryParams.value.registerTimeETime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59';
@@ -341,7 +378,7 @@ function handleOpen() {
} }
function handleCardClick(item, index) { function handleCardClick(item, index) {
currentEncounterId.value = ''; currentEncounterId.value = '';
// if (item.active) { // if (item.active) {
// patientList.value[index].active = false; // patientList.value[index].active = false;
// return; // return;
@@ -351,6 +388,10 @@ function handleCardClick(item, index) {
patient.active = patient.encounterId === item.encounterId; patient.active = patient.encounterId === item.encounterId;
}); });
patientInfo.value = item; patientInfo.value = item;
// 检查患者历史记录以确定初诊/复诊
checkPatientHistory(item);
activeTab.value = 'emr'; activeTab.value = 'emr';
nextTick(() => { nextTick(() => {
prescriptionRef.value.getListInfo(); prescriptionRef.value.getListInfo();

View File

@@ -3,7 +3,7 @@
jdk17 (必须) jdk17 (必须)
node.js-v16.15 (推荐) node.js-v16.15 (推荐)
PostgreSQL-v16.2 (必须) PostgreSQL-v16.2 (必须)1
redis (常用稳定版本即可) redis (常用稳定版本即可)
需要修改数据库和redis的连接信息,详见: 需要修改数据库和redis的连接信息,详见: