提交merge1.3
This commit is contained in:
@@ -15,9 +15,22 @@
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<<<<<<< HEAD
|
||||
<el-date-picker v-model="registerTime" @change="handleTimeChange" type="daterange"
|
||||
style="width: 100%; margin-bottom: 10px" :clearable="false" placeholder="挂号时间" format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD" />
|
||||
=======
|
||||
<el-date-picker
|
||||
v-model="registerTime"
|
||||
@change="handleTimeChange"
|
||||
type="date"
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
:clearable="false"
|
||||
placeholder="挂号时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
<el-scrollbar height="700px">
|
||||
<div v-for="(item, index) in patientList" :class="item.active ? 'patient-card actived' : 'patient-card'"
|
||||
:key="item.id" @click="handleCardClick(item, index)">
|
||||
@@ -53,29 +66,53 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="personal-info-container">
|
||||
<div class="name-container">
|
||||
<div class="name">
|
||||
<el-text tclass="name" width="auto">病历号:</el-text>
|
||||
<el-text tclass="name" width="auto">
|
||||
{{ item.busNo ? item.busNo : '-' }}
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div class="disabled-wrapper" style="width: 85%; border: 1px solid #eee; position: relative">
|
||||
<div style="padding: 10px; border: 1px solid #eee; height: 50px; border-left: 0">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="患者信息:" width="150">
|
||||
<el-descriptions :column="5" class="patient-info-descriptions">
|
||||
<el-descriptions-item label="患者信息:" width="420">
|
||||
{{
|
||||
Object.keys(patientInfo).length !== 0
|
||||
? patientInfo.patientName +
|
||||
<<<<<<< HEAD
|
||||
' / ' +
|
||||
patientInfo.age +
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
patientInfo.contractName
|
||||
=======
|
||||
' / ' +
|
||||
patientInfo.age +
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
(patientInfo?.contractName ? patientInfo.contractName : '') +
|
||||
'/' +
|
||||
patientInfo.phone +
|
||||
'/' +
|
||||
patientInfo.busNo
|
||||
>>>>>>> v1.3
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="挂号时间:" width="150">
|
||||
<el-descriptions-item label="挂号时间:" width="300">
|
||||
{{ Object.keys(patientInfo).length !== 0 ? formatDate(patientInfo.registerTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<<<<<<< HEAD
|
||||
<el-descriptions-item label="医生:" width="150">{{
|
||||
userStore.name
|
||||
}}</el-descriptions-item>
|
||||
@@ -85,6 +122,12 @@
|
||||
<el-radio v-model="visitType" label="FOLLOW_UP" :disabled="visitTypeDisabled">复诊</el-radio>
|
||||
|
||||
<!-- 原有按钮 -->
|
||||
=======
|
||||
<el-descriptions-item label="医生:" width="250">
|
||||
{{ userStore.nickName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="300">
|
||||
>>>>>>> v1.3
|
||||
<el-button type="primary" plain @click.stop="handleFinish(patientInfo.encounterId)">
|
||||
完诊
|
||||
</el-button>
|
||||
@@ -97,16 +140,21 @@
|
||||
<el-button type="primary" plain @click.stop="getEnPrescription(patientInfo.encounterId)">
|
||||
处方单
|
||||
</el-button>
|
||||
<<<<<<< HEAD
|
||||
<el-button type="primary" plain @click.stop="openDialog = true">
|
||||
办理住院
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click.stop="handleCancelEncounter">
|
||||
取消接诊
|
||||
</el-button>
|
||||
=======
|
||||
<el-button type="primary" plain @click.stop="onHospitalization"> 办理住院 </el-button>
|
||||
>>>>>>> v1.3
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div style="padding: 10px">
|
||||
<<<<<<< HEAD
|
||||
<el-tabs type="card" style="width: 100%; height: 100%" v-loading="loading" v-model="activeTab"
|
||||
@tab-change="handleClick(activeTab)">
|
||||
<el-tab-pane label="病历" name="emr">
|
||||
@@ -116,6 +164,33 @@
|
||||
}
|
||||
" :visitType="visitType" :firstVisitDate="firstVisitDate" />
|
||||
</el-tab-pane>
|
||||
=======
|
||||
<el-tabs
|
||||
type="card"
|
||||
style="width: 100%; height: 100%"
|
||||
v-loading="loading"
|
||||
v-model="activeTab"
|
||||
@tab-change="handleClick(activeTab)"
|
||||
>
|
||||
<el-tab-pane label="门诊病历" name="hospitalizationEmr">
|
||||
<hospitalizationEmr
|
||||
:patientInfo="patientInfo"
|
||||
:activeTab="activeTab"
|
||||
@emrSaved="handleEmrSaved"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="病历" name="emr">
|
||||
<Emr
|
||||
:patientInfo="patientInfo"
|
||||
ref="emrRef"
|
||||
@save="
|
||||
(value) => {
|
||||
saveStatus = value;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-tab-pane> -->
|
||||
>>>>>>> v1.3
|
||||
<el-tab-pane label="诊断" name="diagnosis">
|
||||
<Diagnosis :patientInfo="patientInfo" ref="diagnosisRef" @diagnosisSave="
|
||||
(value) => {
|
||||
@@ -124,7 +199,16 @@
|
||||
" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="医嘱" name="prescription">
|
||||
<<<<<<< HEAD
|
||||
<prescriptionlist :patientInfo="patientInfo" ref="prescriptionRef" :activeTab="activeTab" />
|
||||
=======
|
||||
<prescriptionlist
|
||||
:patientInfo="patientInfo"
|
||||
ref="prescriptionRef"
|
||||
:activeTab="activeTab"
|
||||
:outpatientEmrSaved="outpatientEmrSaved"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="中医" name="tcm">
|
||||
<tcmAdvice :patientInfo="patientInfo" ref="tcmRef" />
|
||||
@@ -132,6 +216,9 @@
|
||||
<el-tab-pane label="电子处方" name="eprescription">
|
||||
<eprescriptionlist :patientInfo="patientInfo" ref="eprescriptionRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报告查询" name="reportQuery">
|
||||
<ReportQuery :patientInfo="patientInfo" ref="reportQueryRef" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="overlay" v-if="disabled"></div>
|
||||
</div>
|
||||
@@ -139,26 +226,54 @@
|
||||
<el-drawer v-model="drawer" title="患者队列" direction="ltr" @open="handleOpen">
|
||||
<PatientList ref="patientDrawerRef" @toCurrent="handleReceive" />
|
||||
</el-drawer>
|
||||
<<<<<<< HEAD
|
||||
<RefundListDialog :open="openRefundListDialog" :encounterId="currentEncounterId"
|
||||
@close="openRefundListDialog = false" />
|
||||
<HospitalizationDialog :open="openDialog" :patientInfo="patientInfo" :encounterId="currentEncounterId"
|
||||
@close="openDialog = false" />
|
||||
<PrescriptionInfo :open="openPrescriptionDialog" :precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false" />
|
||||
=======
|
||||
<RefundListDialog
|
||||
:open="openRefundListDialog"
|
||||
:encounterId="currentEncounterId"
|
||||
@close="openRefundListDialog = false"
|
||||
@refresh="() => prescriptionRef.getListInfo()"
|
||||
/>
|
||||
<HospitalizationDialog
|
||||
:open="openDialog"
|
||||
:patientInfo="patientInfo"
|
||||
:encounterId="currentEncounterId"
|
||||
:mainDiagnosis="mainDiagnosis"
|
||||
@close="openDialog = false"
|
||||
/>
|
||||
<PrescriptionInfo
|
||||
:open="openPrescriptionDialog"
|
||||
:precriptionInfo="prescriptionInfo"
|
||||
@close="openPrescriptionDialog = false"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import hospitalizationEmr from './components/hospitalizationEmr/index.vue';
|
||||
import Emr from './components/emr/emr.vue';
|
||||
import {
|
||||
getList,
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
<<<<<<< HEAD
|
||||
cancelEncounter,
|
||||
getEmrHistoryList
|
||||
=======
|
||||
isHospitalization,
|
||||
getEncounterDiagnosis,
|
||||
>>>>>>> v1.3
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
import RefundListDialog from './components/prescription/refundListDialog.vue';
|
||||
import ReportQuery from './components/reportQuery.vue';
|
||||
import PatientList from './components/patientList.vue';
|
||||
import Diagnosis from './components/diagnosis/diagnosis.vue';
|
||||
import PrescriptionInfo from './components/prescription/prescriptionInfo.vue';
|
||||
@@ -169,6 +284,8 @@ import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { nextTick } from 'vue';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
import { updatePatientInfo } from './components/store/patient.js';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
@@ -197,15 +314,18 @@ const openRefundListDialog = ref(false);
|
||||
const openDialog = ref(false);
|
||||
const openPrescriptionDialog = ref(false);
|
||||
const saveStatus = ref(false);
|
||||
const outpatientEmrSaved = ref(false); // 门诊病历保存状态
|
||||
const currentEncounterId = ref('');
|
||||
const emits = defineEmits(['click']);
|
||||
const activeTab = ref('emr');
|
||||
// const activeTab = ref('emr');
|
||||
const activeTab = ref('hospitalizationEmr');
|
||||
const mainDiagnosis = ref(null);
|
||||
const patientList = ref([]);
|
||||
const patientInfo = ref({});
|
||||
const visitTypeDisabled = ref(false);
|
||||
|
||||
const prescriptionInfo = ref([]);
|
||||
const registerTime = ref([formatDate(new Date()), formatDate(new Date())]);
|
||||
const registerTime = ref(formatDate(new Date()));
|
||||
const patientDrawerRef = ref();
|
||||
const prescriptionRef = ref();
|
||||
const tcmRef = ref();
|
||||
@@ -219,12 +339,41 @@ const firstVisitDate = ref('');
|
||||
const disabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
const shortcuts = [
|
||||
{
|
||||
text: '今天',
|
||||
value: new Date(),
|
||||
},
|
||||
{
|
||||
text: '昨天',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 1);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '三天内',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 3);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '一周内',
|
||||
value: () => {
|
||||
const date = new Date();
|
||||
date.setDate(date.getDate() - 7);
|
||||
return date;
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
const eprescriptionRef = ref();
|
||||
onMounted(() => {
|
||||
getWaitPatient();
|
||||
});
|
||||
|
||||
getPatientList();
|
||||
// 获取现诊患者列表
|
||||
function getPatientList() {
|
||||
@@ -333,6 +482,7 @@ function handleClick(tab) {
|
||||
|
||||
// 查看本次就诊处方单(从医嘱Tab页获取已开立的处方单信息)
|
||||
function getEnPrescription(encounterId) {
|
||||
<<<<<<< HEAD
|
||||
// 检查是否有选中的患者
|
||||
if (!patientInfo.value || !patientInfo.value.encounterId) {
|
||||
proxy.$modal.msgWarning('请先选择患者');
|
||||
@@ -392,6 +542,21 @@ function getEnPrescription(encounterId) {
|
||||
proxy.$modal.msgWarning('无法获取处方单信息,请稍后重试');
|
||||
}
|
||||
}
|
||||
=======
|
||||
getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => {
|
||||
console.log('处方单 res', res);
|
||||
let dataArr = res.data.records || [];
|
||||
if (dataArr.length <= 0) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '暂无处方单',
|
||||
});
|
||||
return;
|
||||
}
|
||||
prescriptionInfo.value = res.data.records;
|
||||
openPrescriptionDialog.value = true;
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
function handleRefund(encounterId) {
|
||||
@@ -410,6 +575,7 @@ function handleCardClick(item, index) {
|
||||
patient.active = patient.encounterId === item.encounterId;
|
||||
});
|
||||
patientInfo.value = item;
|
||||
<<<<<<< HEAD
|
||||
|
||||
// 优先使用数据库中保存的初复诊值
|
||||
if (item.visitType) {
|
||||
@@ -437,6 +603,17 @@ function handleCardClick(item, index) {
|
||||
console.error('emr组件未正确初始化');
|
||||
proxy.$modal.msgError('病历组件加载失败,请刷新页面重试');
|
||||
}
|
||||
=======
|
||||
// 将患者信息保存到store中,供hospitalizationEmr组件使用
|
||||
updatePatientInfo(item);
|
||||
activeTab.value = 'hospitalizationEmr';
|
||||
nextTick(() => {
|
||||
prescriptionRef.value.getListInfo();
|
||||
tcmRef.value.getListInfo();
|
||||
diagnosisRef.value.getList();
|
||||
eprescriptionRef.value.getList();
|
||||
// emrRef.value.getDetail(item.encounterId);
|
||||
>>>>>>> v1.3
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 200);
|
||||
@@ -466,8 +643,8 @@ function handleFinish(encounterId) {
|
||||
}
|
||||
|
||||
function handleTimeChange(value) {
|
||||
queryParams.value.registerTimeSTime = value[0] + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = value[1] + ' 23:59:59';
|
||||
queryParams.value.registerTimeSTime = value + ' 00:00:00';
|
||||
queryParams.value.registerTimeETime = value + ' 23:59:59';
|
||||
getPatientList();
|
||||
}
|
||||
|
||||
@@ -480,9 +657,15 @@ function handleReceive(row) {
|
||||
getWaitPatient();
|
||||
}
|
||||
|
||||
// 处理门诊病历保存成功事件
|
||||
function handleEmrSaved(isSaved) {
|
||||
outpatientEmrSaved.value = isSaved;
|
||||
}
|
||||
|
||||
function openDrawer() {
|
||||
drawer.value = true;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
function handleCancelEncounter() {
|
||||
proxy.$modal.confirm('您确定要取消病人本次的就诊记录吗?', '提示信息', {
|
||||
@@ -507,9 +690,50 @@ function handleCancelEncounter() {
|
||||
// 用户取消操作
|
||||
});
|
||||
}
|
||||
=======
|
||||
// 判断是否已经入院登记
|
||||
const onHospitalization = async () => {
|
||||
const diagnosisRes = await getEncounterDiagnosis(patientInfo.value.encounterId);
|
||||
const hasDiagnosis = diagnosisRes.data?.length > 0;
|
||||
if (!hasDiagnosis) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者暂无诊断信息,无法办理住院!',
|
||||
});
|
||||
return;
|
||||
}
|
||||
const mainDiag = diagnosisRes.data.find((item) => item.maindiseFlag === 1);
|
||||
if (!mainDiag) {
|
||||
ElMessage({ type: 'error', message: '该患者暂无主诊断信息,无法办理住院!' });
|
||||
return;
|
||||
}
|
||||
mainDiagnosis.value = mainDiag;
|
||||
const res = await isHospitalization({
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
});
|
||||
if (!res.data) {
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '该患者,已办理入院,不允许重复办理',
|
||||
});
|
||||
}
|
||||
};
|
||||
>>>>>>> v1.3
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 患者信息
|
||||
.patient-info-descriptions {
|
||||
:deep(.el-descriptions__label) {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
:deep(.el-descriptions__content) {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.patient-card {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user