Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -98,7 +98,12 @@
|
||||
<el-descriptions-item label="医生:" width="150">{{
|
||||
userStore.name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="300">
|
||||
<el-descriptions-item label="" width="350">
|
||||
<!-- 初诊 / 复诊 按钮 -->
|
||||
<el-radio v-model="visitType" label="FIRST">初诊</el-radio>
|
||||
<el-radio v-model="visitType" label="FOLLOW_UP">复诊</el-radio>
|
||||
|
||||
<!-- 原有按钮 -->
|
||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||
完诊
|
||||
</el-button>
|
||||
@@ -118,15 +123,11 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="
|
||||
() => {
|
||||
openDialog = true;
|
||||
}
|
||||
"
|
||||
@click.stop="openDialog = true"
|
||||
>
|
||||
办理住院
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div style="padding: 10px">
|
||||
@@ -204,6 +205,7 @@ import {
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
getEmrHistoryList
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
@@ -260,6 +262,7 @@ const diagnosisRef = ref();
|
||||
const waitCount = ref(0);
|
||||
const loading = ref(false);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const visitType = ref('');
|
||||
const disabled = computed(() => {
|
||||
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() {
|
||||
queryParams.value.registerTimeSTime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59';
|
||||
@@ -351,6 +388,10 @@ function handleCardClick(item, index) {
|
||||
patient.active = patient.encounterId === item.encounterId;
|
||||
});
|
||||
patientInfo.value = item;
|
||||
|
||||
// 检查患者历史记录以确定初诊/复诊
|
||||
checkPatientHistory(item);
|
||||
|
||||
activeTab.value = 'emr';
|
||||
nextTick(() => {
|
||||
prescriptionRef.value.getListInfo();
|
||||
|
||||
Reference in New Issue
Block a user