修复初诊和就诊的bug
This commit is contained in:
@@ -100,8 +100,8 @@
|
|||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="" width="350">
|
<el-descriptions-item label="" width="350">
|
||||||
<!-- 初诊 / 复诊 按钮 -->
|
<!-- 初诊 / 复诊 按钮 -->
|
||||||
<el-radio v-model="visitType" label="FIRST">初诊</el-radio>
|
<el-radio v-model="visitType" label="FIRST" :disabled="visitTypeDisabled">初诊</el-radio>
|
||||||
<el-radio v-model="visitType" label="FOLLOW_UP">复诊</el-radio>
|
<el-radio v-model="visitType" label="FOLLOW_UP" :disabled="visitTypeDisabled">复诊</el-radio>
|
||||||
|
|
||||||
<!-- 原有按钮 -->
|
<!-- 原有按钮 -->
|
||||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||||
@@ -253,6 +253,8 @@ const emits = defineEmits(['click']);
|
|||||||
const activeTab = ref('emr');
|
const activeTab = ref('emr');
|
||||||
const patientList = ref([]);
|
const patientList = ref([]);
|
||||||
const patientInfo = ref({});
|
const patientInfo = ref({});
|
||||||
|
const visitTypeDisabled = ref(false);
|
||||||
|
|
||||||
const prescriptionInfo = ref([]);
|
const prescriptionInfo = ref([]);
|
||||||
const registerTime = ref([formatDate(new Date()), formatDate(new Date())]);
|
const registerTime = ref([formatDate(new Date()), formatDate(new Date())]);
|
||||||
const patientDrawerRef = ref();
|
const patientDrawerRef = ref();
|
||||||
@@ -290,6 +292,9 @@ function setVisitType(type) {
|
|||||||
visitType.value = type;
|
visitType.value = type;
|
||||||
}
|
}
|
||||||
function checkPatientHistory(patient) {
|
function checkPatientHistory(patient) {
|
||||||
|
// 重置状态
|
||||||
|
visitTypeDisabled.value = false;
|
||||||
|
|
||||||
// 如果患者没有身份证号,无法判断是否为初诊
|
// 如果患者没有身份证号,无法判断是否为初诊
|
||||||
if (!patient.idCard) {
|
if (!patient.idCard) {
|
||||||
// 默认设置为初诊
|
// 默认设置为初诊
|
||||||
@@ -297,6 +302,16 @@ function checkPatientHistory(patient) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果当前就诊已经有明确的初复诊标识,则使用该标识
|
||||||
|
if (patient.visitType) {
|
||||||
|
visitType.value = patient.visitType;
|
||||||
|
// 如果是已完诊的记录,禁用修改
|
||||||
|
if (patient.statusEnum && patient.statusEnum !== 2) { // 假设2是就诊中状态
|
||||||
|
visitTypeDisabled.value = true;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 查询患者历史就诊记录
|
// 查询患者历史就诊记录
|
||||||
const params = {
|
const params = {
|
||||||
patientId: patient.patientId,
|
patientId: patient.patientId,
|
||||||
@@ -380,10 +395,6 @@ function handleOpen() {
|
|||||||
|
|
||||||
function handleCardClick(item, index) {
|
function handleCardClick(item, index) {
|
||||||
currentEncounterId.value = '';
|
currentEncounterId.value = '';
|
||||||
// if (item.active) {
|
|
||||||
// patientList.value[index].active = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
patientList.value.forEach((patient) => {
|
patientList.value.forEach((patient) => {
|
||||||
patient.active = patient.encounterId === item.encounterId;
|
patient.active = patient.encounterId === item.encounterId;
|
||||||
@@ -421,6 +432,8 @@ function handleFinish(encounterId) {
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
patientInfo.value = {};
|
patientInfo.value = {};
|
||||||
|
visitType.value = ''; // 重置初复诊标识
|
||||||
|
visitTypeDisabled.value = false; // 重置禁用状态
|
||||||
getPatientList();
|
getPatientList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -434,7 +447,6 @@ function handleTimeChange(value) {
|
|||||||
|
|
||||||
// 接诊回调
|
// 接诊回调
|
||||||
function handleReceive(row) {
|
function handleReceive(row) {
|
||||||
// patientInfo.value = row;
|
|
||||||
handleCardClick(row);
|
handleCardClick(row);
|
||||||
currentEncounterId.value = row.encounterId;
|
currentEncounterId.value = row.encounterId;
|
||||||
drawer.value = false;
|
drawer.value = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user