前端最新版本同步

This commit is contained in:
Zhang.WH
2025-09-25 10:36:07 +08:00
parent a3a06d6f3c
commit 1276dc4adb
117 changed files with 11964 additions and 2466 deletions

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -0,0 +1,53 @@
/*
* @Author: sjjh
* @Date: 2025-09-07 12:09:26
* @Description:
*/
import request from '@/utils/request'
// 申请单相关接口
/**
* 查询检查申请单
*/
export function getCheck(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-check',
method: 'get',
params: queryParams
})
}
/**
* 查询检验申请单
*/
export function getInspection(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-inspection',
method: 'get',
params: queryParams
})
}
/**
* 查询输血申请单
*/
export function getBloodTransfusion(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-blood-transfusion',
method: 'get',
params: queryParams
})
}
/**
* 查询手术申请单
*/
export function getSurgery(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-surgery',
method: 'get',
params: queryParams
})
}

View File

@@ -0,0 +1,87 @@
<template>
<div class="applicationShow-container">
<div class="applicationShow-container-header">
<el-button @click="getInfo">刷新</el-button>
</div>
<div class="applicationShow-container-content">
<el-descriptions title="输血申请详情" :column="2">
<el-descriptions-item label="Username">kooriookami</el-descriptions-item>
<el-descriptions-item label="患者姓名">{{ patientInfoValue?.patientName || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者性别">{{ patientInfoValue?.patientSex || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者年龄">{{ patientInfoValue?.patientAge || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者手机号">{{ patientInfoValue?.patientPhone || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者身份证号">{{ patientInfoValue?.patientIdCard || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者地址">{{ patientInfoValue?.patientAddress || '-' }}</el-descriptions-item>
</el-descriptions>
</div>
<div class="applicationShow-container-table">
<el-table :data="dataList">
<el-table-column label="医嘱名称" prop="adviceName" />
<el-table-column label="输血数量" prop="adviceDefinitionId" />
</el-table>
</div>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref, computed } from 'vue'
import { getBloodTransfusion } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([])
const props = defineProps({
})
const state = reactive({
})
// 使用计算属性确保安全访问
const patientInfoValue = computed(() => {
return patientInfo.value || {};
});
const dataList = ref([])
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getBloodTransfusion({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
dataList.value = res.data
} else {
}
});
}
};
onBeforeMount(() => {
})
onMounted(() => {
getInfo()
})
defineExpose({ state })
</script>
<style lang="scss" scoped>
.applicationShow-container {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
.applicationShow-container-header{
height: 44px;
display: flex;
align-items: center;
gap:8px;
padding: 0 16px;
}
.applicationShow-container-content{
flex: 1;
}
.applicationShow-container-table{
height: 400px;
flex:auto
}
}
</style>

View File

@@ -0,0 +1,45 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 21:16:06
* @Description: 检查申请详情
-->
<template>
<div class="container">
<el-button @click="getInfo">查询</el-button>
</div>
</template>
<script setup >
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
import { getCheck } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([])
const props = defineProps({
})
const state = reactive({
})
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getCheck({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
} else {
}
});
}
};
onBeforeMount(() => {
})
onMounted(() => {
getInfo()
})
defineExpose({ state })
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,36 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 21:16:06
* @Description: 手术申请详情
-->
<template>
<div class="container">
<el-button @click="getInfo">查询</el-button>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { getSurgery } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getSurgery({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
} else {
}
});
}
};
onBeforeMount(() => {});
onMounted(() => {
getInfo();
});
defineExpose({ state });
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,37 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 21:16:06
* @Description: 检验申请
-->
<template>
<div class="container">
<el-button @click="getInfo">查询</el-button>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { getInspection } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getInspection({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
} else {
}
});
}
};
onBeforeMount(() => {});
onMounted(() => {
getInfo();
});
defineExpose({ state });
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,99 @@
import request from '@/utils/request'
// 申请单相关接口
//医嘱大下拉
export function getApplicationList(queryParams) {
return request({
url: '/doctor-station/advice/advice-base-info',
method: 'get',
params: queryParams
})
}
/**
* 保存检查申请单
*/
export function saveCheckd(data) {
return request({
url: '/reg-doctorstation/request-form/save-check',
method: 'post',
data: data
})
}
/**
* 保存检验申请单
*/
export function saveInspection(data) {
return request({
url: '/reg-doctorstation/request-form/save-inspection',
method: 'post',
data: data
})
}
/**
* 保存输血申请单
*/
export function saveBloodTransfusio(data) {
return request({
url: '/reg-doctorstation/request-form/save-blood-transfusio',
method: 'post',
data: data
})
}
/**
* 保存手术申请单
*/
export function saveSurgery(data) {
return request({
url: '/reg-doctorstation/request-form/save-surgery',
method: 'post',
data: data
})
}
// =====
/**
* 查询检查申请单
*/
export function getCheck(data) {
return request({
url: '/reg-doctorstation/request-form/get-check',
method: 'get',
params: data
})
}
/**
* 查询检验申请单
*/
export function getInspection(data) {
return request({
url: '/reg-doctorstation/request-form/get-inspection',
method: 'get',
params: data
})
}
/**
* 查询输血申请单
*/
export function getBloodTransfusion(data) {
return request({
url: '/reg-doctorstation/request-form/get-blood-transfusion',
method: 'get',
params: data
})
}
/**
* 查询手术申请单
*/
export function geturger(data) {
return request({
url: '/reg-doctorstation/request-form/get-surgery',
method: 'get',
params: data
})
}

View File

@@ -0,0 +1,143 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:32:17
* @Description: 申请单 检验检查输血手术
-->
<template>
<div class="applicationForm-bottom-btn">
<el-button-group>
<el-button
type="primary"
@click="showApplicationFormDialog('LaboratoryTests')"
:disabled="!patientInfo?.inHospitalOrgId"
>检验</el-button
>
<el-button
type="primary"
@click="showApplicationFormDialog('MedicalExaminations')"
:disabled="!patientInfo?.inHospitalOrgId"
>检查</el-button
>
<el-button
type="primary"
@click="showApplicationFormDialog('BloodTransfusion')"
:disabled="!patientInfo?.inHospitalOrgId"
>输血</el-button
>
<el-button
type="primary"
@click="showApplicationFormDialog('Surgery')"
:disabled="!patientInfo?.inHospitalOrgId"
>手术</el-button
>
</el-button-group>
</div>
<el-dialog
v-model="applicationFormDialogVisible"
destroy-on-close
width="1000px"
:close-on-click-modal="false"
:title="applicationFormTitle"
@close="closeDialog"
>
<component
:is="applicationFormName"
@submitOk="submitOk"
ref="applicationFormNameRef"
></component>
<template #footer>
<div class="dialog-footer">
<el-button @click="applicationFormDialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitApplicationForm"> 确认 </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref, computed } from 'vue';
import BloodTransfusion from './bloodTransfusion.vue';
import { patientInfo } from '../../../store/patient.js';
import Surgery from './surgery.vue';
import LaboratoryTests from './LaboratoryTests.vue';
import MedicalExaminations from './medicalExaminations.vue';
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
const components = ref({
BloodTransfusion,
Surgery,
LaboratoryTests,
MedicalExaminations,
});
const applicationFormName = ref(null);
const applicationFormDialogVisible = ref(false);
const applicationFormTitle = computed(() => {
const titleMap = {
BloodTransfusion: '输血申请单',
Surgery: '手术申请单',
LaboratoryTests: '检验申请单',
MedicalExaminations: '检查申请单',
};
return titleMap[applicationFormName.value?.name] || '申请单';
});
const closeDialog = () => {
applicationFormName.value = null;
applicationFormDialogVisible.value = false;
}
const showApplicationFormDialog = (name) => {
if (!components.value[name]) {
console.warn(`未找到组件: ${name}`);
return;
}
// 如果点击的是当前已打开的组件,则关闭
if (applicationFormName.value === components.value[name]) {
applicationFormDialogVisible.value = false;
applicationFormName.value = null;
return;
}
// 如果当前弹窗已打开,先关闭当前弹窗,延迟后打开新的弹窗
if (applicationFormDialogVisible.value) {
applicationFormDialogVisible.value = false;
setTimeout(() => {
applicationFormName.value = components.value[name];
applicationFormDialogVisible.value = true;
}, 150);
} else {
applicationFormName.value = components.value[name];
applicationFormDialogVisible.value = true;
}
};
onBeforeMount(() => {});
onMounted(() => {});
const applicationFormNameRef = ref();
const submitApplicationForm = () => {
console.log(applicationFormNameRef.value);
if (applicationFormNameRef.value?.submit) {
applicationFormNameRef.value.submit();
}
};
const submitOk = () => {
debugger;
applicationFormDialogVisible.value = false;
applicationFormName.value = null;
};
defineExpose({ state });
</script>
<style lang="scss" scoped>
.applicationForm-bottom-btn {
display: flex;
justify-content: center;
align-items: center;
padding: 8px 0;
.el-button-group {
.el-button {
margin: 0 2px;
}
}
}
</style>

View File

@@ -0,0 +1,170 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:37:10
* @Description: 输血申请
-->
<template>
<div class="bloodTransfusion-container">
<el-transfer v-model="transferValue" :data="applicationList" filter-placeholder="项目代码/名称" filterable
:titles="['未选择', '已选择']" />
<div class="bloodTransfusion-form">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="BloodTransfusion">
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk']);
const props = defineProps({});
import { getApplicationList, saveBloodTransfusio } from './api';
const state = reactive({});
const applicationListAll = ref();
const applicationList = ref();
const getList = () => {
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '28',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes: '3', //1 药品 2耗材 3诊疗
}).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = [];
}
});
}
};
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
});
const rules = reactive({});
onBeforeMount(() => { });
onMounted(() => {
getList();
});
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveBloodTransfusio({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '输血申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.bloodTransfusion-container {
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -0,0 +1,169 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:31:58
* @Description: 检验
-->
<template>
<div class="LaboratoryTests-container">
<el-transfer
v-model="transferValue"
:data="applicationList"
filter-placeholder="项目代码/名称"
filterable
:titles="['未选择', '已选择']"
/>
<div class="bloodTransfusion-form">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="LaboratoryTests">
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk']);
const props = defineProps({});
import { getApplicationList, saveCheckd } from './api';
const state = reactive({});
const applicationListAll = ref();
const applicationList = ref();
const getList = () => {
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '23',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes: '3', //1 药品 2耗材 3诊疗
}).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = [];
}
});
}
};
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
});
const rules = reactive({});
onBeforeMount(() => {});
onMounted(() => {
getList();
});
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveCheckd({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '检查申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.LaboratoryTests-container {
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -0,0 +1,180 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:35:29
* @Description: 检查
-->
<template>
<div class="medicalExaminations-container">
<el-transfer
v-model="transferValue"
:data="applicationList"
style="width: 100%"
filter-placeholder="项目代码/名称"
filterable
:titles="['未选择', '已选择']"
/>
<div class="bloodTransfusion-form">
<el-form
:model="form"
:rules="rules"
ref="formRef"
label-width="120px"
class="demo-ruleForm"
inline
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="MedicalExaminations">
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk']);
const props = defineProps({});
import { getApplicationList, saveInspection } from './api';
const state = reactive({});
const applicationListAll = ref();
const applicationList = ref();
const getList = () => {
// console.log(patientInfo.value);
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '23',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes: '3', //1 药品 2耗材 3诊疗
}).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = [];
}
});
}
};
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
});
const rules = reactive({});
onBeforeMount(() => {});
onMounted(() => {
getList();
});
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveInspection({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '检验申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.medicalExaminations-container {
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -0,0 +1,175 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:38:55
* @Description: 手术
-->
<template>
<div class="surgery-container">
<el-transfer v-model="value" :data="applicationList" filter-placeholder="项目代码/名称" filterable :titles="['未选择', '已选择']" />
<div class="bloodTransfusion-form">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width:100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="Surgery">
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk'])
const props = defineProps({
})
import { getApplicationList,saveSurgery } from './api'
const state = reactive({
})
const applicationListAll = ref();
const applicationList=ref()
const getList= ()=> {
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '24',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes:'3'//1 药品 2耗材 3诊疗
}
).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = []
}
})
}
}
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
})
const rules = reactive({
})
onBeforeMount(() => {
})
onMounted(() => {
getList()
})
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveSurgery({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '检验申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.surgery-container {
height: 100%;
padding: 8px;
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -100,30 +100,30 @@ const searchData = reactive({
const cardId = ref('')
// 所有卡片数据
const cardAllData = ref([
{
id: '1',
name: '张三',
sexName: '女',
bedName: '1-1床',
deptNurseName: '护士甲',
crossDeptFlag: false,
criticalCarePatientName: '危',
inpatientCode: '1212121212',
age: '30',
admittedDoctorName: '医生乙',
},
{
id: '2',
name: '李四',
sexName: '男',
bedName: '1-2床',
deptNurseName: '护士甲',
crossDeptFlag: false,
criticalCarePatientName: '重',
inpatientCode: '1212121212',
age: '30',
admittedDoctorName: '医生乙',
},
// {
// id: '1',
// name: '张三',
// sexName: '女',
// bedName: '1-1床',
// deptNurseName: '护士甲',
// crossDeptFlag: false,
// criticalCarePatientName: '危',
// inpatientCode: '1212121212',
// age: '30',
// admittedDoctorName: '医生乙',
// },
// {
// id: '2',
// name: '李四',
// sexName: '男',
// bedName: '1-2床',
// deptNurseName: '护士甲',
// crossDeptFlag: false,
// criticalCarePatientName: '重',
// inpatientCode: '1212121212',
// age: '30',
// admittedDoctorName: '医生乙',
// },
])
// 过滤后的卡片数据
const filteredCardData = computed(() => {

View File

@@ -0,0 +1,24 @@
/*
* @Author: sjjh
* @Date: 2025-09-20 17:02:37
* @Description:
*/
import request from '@/utils/request'
// 新增记录
export function addRecord(data) {
return request({
url: '/document/record/addRecord',
method: 'post',
data
})
}
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
export function getRecordByEncounterIdList(params) {
return request({
url: '/document/record/getRecordByEncounterIdList',
method: 'get',
params
})
}

View File

@@ -0,0 +1,104 @@
<template>
<div class="emr-history-container">
<div class="search-box">
<el-input placeholder="病历名称搜索..." v-model="queryParams.searchKey">
<template #append>
<el-button @click="queryList">查询</el-button>
</template>
</el-input>
</div>
<el-scrollbar class="emr-history-scrollbar-container" style="width: 100%">
<div v-for="item in historyData" :key="item.id" class="scrollbar-item">
<el-tooltip
effect="dark"
:content="`${item.definitionId}(${item.recordTime})`"
placement="bottom"
>
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
{{ item.name }}({{ item.recordTime }})
</el-text>
</el-tooltip>
</div>
</el-scrollbar>
</div>
</template>
<script setup>
import { ref, reactive, defineEmits, unref } from 'vue';
import { getRecordByEncounterIdList } from '../api';
import { ElTree } from 'element-plus';
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
import { patientInfo } from '../../store/patient.js';
const emits = defineEmits(['historyClick']);
const props = defineProps({
definitionId: {
type: String,
default: '',
},
});
const definitionId = defineModel('definitionId', {
type: String,
default: '',
});
const defaultProps = {
children: 'children',
label: 'name',
};
const queryParams = ref({
searchKey: '',
isPage: 0,
});
const historyData = ref([]);
const queryList = async () => {
try {
if (patientInfo.value.encounterId && unref(definitionId)&&unref(definitionId) !== '') {
const res = await getRecordByEncounterIdList({
...queryParams.value,
encounterId: patientInfo.value.encounterId,
patientId: patientInfo.value.patientId,
definitionId: unref(definitionId),
});
historyData.value = res.data || [];
}else{
historyData.value = [];
}
} catch (error) {
ElMessage.error('获取模板树失败');
historyData.value = [];
}
};
const handleNodeClick = (data) => {
emits('historyClick', data);
};
const currentSelectTemplate = ref({});
defineExpose({ queryList });
</script>
<style lang="scss" scoped>
.emr-history-container {
height: 100%;
// padding: 8px;
.search-box {
height: 40px;
line-height: 40px;
}
.emr-history-scrollbar-container{
padding: 8px;
height: calc(100% - 40px);
.scrollbar-item {
height: 40px;
line-height: 40px;
border-radius: 4px;
cursor: pointer;
background: var(--el-color-primary-light-9);
& + .scrollbar-item {
margin-top: 8px;
}
}
}
}
</style>

View File

@@ -0,0 +1,265 @@
<!--
* @Author: sjjh
* @Date: 2025-09-18 15:41:10
* @Description: 病历使用首页
-->
<template>
<div class="emr-use-container">
<div class="template-tree-container">
<div class="search-box">
<el-input placeholder="病历名称搜索..." v-model="queryParams.name">
<template #append>
<el-button @click="queryTemplateTree">查询</el-button>
</template>
</el-input>
</div>
<el-scrollbar class="template-tree-scrollbar">
<el-tree
ref="templateTree"
:data="templateData"
:props="defaultProps"
auto-expand-parent
node-key="id"
@node-click="handleNodeClick"
class="template-tree"
></el-tree>
</el-scrollbar>
</div>
<div class="operate-container">
<div class="operate-btns">
<el-space>
<el-button type="primary" @click="newEmr">新建</el-button>
<el-button type="primary" @click="saveAsModel">存为模版</el-button>
<el-button @click="refresh">刷新</el-button>
<el-button type="danger" @click="deleteEmr">删除</el-button>
<el-button type="primary" @click="save">保存</el-button>
</el-space>
</div>
<div class="operate-main">
<el-scrollbar class="template-tree-scrollbar">
<component :is="currentComponent" ref="emrComponentRef" @submitOk="handleSubmitOk" />
</el-scrollbar>
</div>
</div>
<div class="quickly-container">
<el-tabs v-model="quicklyactiveName" type="card">
<el-tab-pane label="历史" name="history">
<History @historyClick="handleHistoryClick" ref="historyRef" v-model:definitionId="currentSelectTemplate.id" />
</el-tab-pane>
<el-tab-pane label="模版" name="model">模版</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
import { addRecord } from './api';
import { patientInfo } from '../store/patient.js';
import dayjs from 'dayjs';
// 移除未使用的变量
// const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
import History from './components/history';
// 定义响应式变量
const templateData = ref([]);
const queryParams = ref({
name: '',
});
const currentSelectTemplate = ref({
id:''
});
const currentComponent = ref('');
const emrComponentRef = ref(null);
const quicklyactiveName = ref('history');
// 树配置(模板树)
const defaultProps = {
children: 'children',
label: 'name',
value: 'id',
};
/** 初始化病历模板树(按科室筛选) */
const queryTemplateTree = async () => {
try {
const res = await getTreeList(queryParams.value);
templateData.value = res.data || [];
} catch (error) {
ElMessage.error('获取模板树失败');
templateData.value = [];
}
};
// 处理节点点击,根据后台返回的路径加载组件
const handleNodeClick = (data, node) => {
if (node.isLeaf) {
// 存储当前节点数据
currentSelectTemplate.value = data.document;
// currentComponent.value = data.document.vueRouter || '';
} else {
currentSelectTemplate.value = {
id:''
};
// currentComponent.value = null;
}
historyRef.value?.queryList();
};
const newEmr = () => {
if (currentSelectTemplate.value) {
currentComponent.value = currentSelectTemplate.value.vueRouter || '';
return;
}
ElMessage.error('请选择模版!');
};
const saveAsModel = async () => {
try {
await emrComponentRef.value?.submit();
ElMessage.success('成功!');
} catch (error) {
ElMessage.error('存为模版失败');
}
};
const editForm = ref({
id: '',
definitionId: '',
definitionBusNo: '',
contentJson: '',
statusEnum: 1, // 0草稿/暂存 1提交 2归档 3修改
organizationId: 0,
encounterId: '',
patientId:'',
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
createBy: '',
source: '',
});
const handleSubmitOk = async (data) => {
try {
// debugger;
if (!patientInfo.value?.encounterId || !patientInfo.value?.patientId) {
ElMessage.error('请先选择患者!');
return;
}
editForm.value.definitionId = currentSelectTemplate.value.id;
editForm.value.definitionBusNo = currentSelectTemplate.value.busNo;
editForm.value.contentJson = JSON.stringify(data);
editForm.value.encounterId = patientInfo.value.encounterId;
editForm.value.patientId = patientInfo.value.patientId;
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
await addRecord(editForm.value);
ElMessage.success('提交成功');
historyRef.value?.queryList();
} catch (error) {
ElMessage.error('提交失败');
console.log(error);
}
};
const refresh = () => {
queryTemplateTree();
historyRef.value?.queryList();
};
const deleteEmr = async () => {
try {
// 这里应该添加实际的删除逻辑
ElMessage.success('删除成功!');
} catch (error) {
ElMessage.error('删除失败');
}
};
const save = async () => {
// try {
await emrComponentRef.value?.submit();
// } catch (error) {
// ElMessage.error('保存失败');
// }
};
const historyRef = ref(null);
const handleHistoryClick= (data) => {
console.log(data);
newEmr();
editForm.value= data;
nextTick(() => {
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contentJson));
})
}
// 移除空的生命周期钩子
// onBeforeMount(() => {});
onMounted(() => {
queryTemplateTree();
});
defineExpose({ state });
</script>
<style lang="scss" scoped>
.emr-use-container {
display: flex;
height: 100%;
.template-tree-container {
border-right: 1px solid #ebeef5;
width: 300px;
flex: none;
height: 100%;
padding: 0 8px 8px 0;
display: flex;
flex-direction: column;
.search-box {
height: 40px;
display: flex;
align-items: center;
flex: none;
border-bottom: 1px solid #ebeef5;
}
.template-tree-scrollbar {
height: calc(100% - 48px);
flex: auto;
}
}
.operate-container {
width: 300px;
flex: auto;
display: flex;
flex-direction: column;
padding: 0 8px 8px 8px;
.operate-btns {
height: 40px;
flex: none;
display: flex;
align-items: center;
border-bottom: 1px solid #ebeef5;
}
.operate-main {
height: calc(100% - 40px);
flex: auto;
}
}
.quickly-container {
border-left: 1px solid #ebeef5;
width: 300px;
padding: 0 8px 8px 8px;
flex: none;
.el-tabs{
height: 100%;
}
}
}
</style>

View File

@@ -7,8 +7,8 @@ import PatientList from './components/patientList.vue'
import PatientCard from './components/patientCard/index.vue'
import Advice from './components/order/index.vue'
import Diagnose from './components/diagnosis/diagnosis.vue'
import BloodTtransfusionAapplication from './components/applicationForm/bloodTtransfusionAapplication.vue'
import ExamineApplication from './components/applicationForm/examineApplication.vue'
import SurgeryApplication from './components/applicationForm/surgeryApplication.vue'
import TestApplication from './components/applicationForm/testApplication.vue'
import BloodTtransfusionAapplication from './components/applicationShow/bloodTtransfusionAapplication.vue'
import ExamineApplication from './components/applicationShow/examineApplication.vue'
import SurgeryApplication from './components/applicationShow/surgeryApplication.vue'
import TestApplication from './components/applicationShow/testApplication.vue'
export { PatientList, PatientCard, Advice,Diagnose, BloodTtransfusionAapplication, ExamineApplication, SurgeryApplication, TestApplication }

View File

@@ -21,7 +21,9 @@
<el-tab-pane label="诊断录入" name="diagnosis">
<Diagnose ref="diagnosisRef" :patientInfo="patientInfo" />
</el-tab-pane>
<el-tab-pane label="住院病历" name="emr">Role</el-tab-pane>
<el-tab-pane label="住院病历" name="emr">
<emr />
</el-tab-pane>
<el-tab-pane label="医技报告" name="fourth">Task</el-tab-pane>
<el-tab-pane label="检验申请" name="test">
<TestApplication />
@@ -46,6 +48,7 @@ import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue
// const { proxy } = getCurrentInstance()
// const emits = defineEmits([])
// const props = defineProps({})
import Emr from "./emr/index.vue";
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
import {
PatientList,