版本更新

This commit is contained in:
Zhang.WH
2025-09-03 15:54:41 +08:00
parent 0b93d16b64
commit 8f82322d10
3290 changed files with 154339 additions and 23829 deletions

View File

@@ -0,0 +1,179 @@
<template>
<div @keyup="handleKeyDown" tabindex="0" ref="tableWrapper">
<el-table
ref="adviceBaseRef"
height="400"
:data="adviceBaseList"
highlight-current-row
@current-change="handleCurrentChange"
row-key="patientId"
@cell-click="clickRow"
>
<el-table-column label="名称" align="center" prop="adviceName" />
<el-table-column label="类型" align="center" prop="activityType_enumText" />
<el-table-column label="包装单位" align="center" prop="unitCode_dictText" />
<el-table-column label="最小单位" align="center" prop="minUnitCode_dictText" />
<el-table-column label="规格" align="center" prop="volume" />
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
<el-table-column label="库存数量" align="center">
<template #default="scope">{{ handleQuantity(scope.row) }}</template>
</el-table-column>
<el-table-column label="频次" align="center" prop="rateCode_dictText" />
<!-- <el-table-column label="单次剂量" align="center" prop="dose" /> -->
<!-- <el-table-column label="剂量单位" align="center" prop="doseUnitCode_dictText" /> -->
<el-table-column label="注射药品" align="center" prop="injectFlag_enumText" />
<el-table-column label="皮试" align="center" prop="skinTestFlag_enumText" />
<el-table-column label="医保码" align="center" prop="ybNo" />
<!-- <el-table-column label="限制使用标志" align="center" prop="useLimitFlag" /> -->
<el-table-column
label="限制使用范围"
align="center"
:show-overflow-tooltip="true"
prop="useScope"
>
<template #default="scope">
<span v-if="scope.row.useLimitFlag === 1">{{ scope.row.useScope }}</span>
<span v-else>{{ '-' }}</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script setup>
import { nextTick } from 'vue';
import { getAdviceBaseInfo } from './api';
import { throttle } from 'lodash-es';
const props = defineProps({
adviceQueryParams: {
type: Object,
default: '',
},
patientInfo: {
type: Object,
required: true,
},
});
const emit = defineEmits(['selectAdviceBase']);
const total = ref(0);
const adviceBaseRef = ref();
const tableWrapper = ref();
const currentIndex = ref(0); // 当前选中行索引
const currentSelectRow = ref({});
const queryParams = ref({
pageSize: 100,
pageNum: 1,
adviceTypes: '1,3'
});
const adviceBaseList = ref([]);
// 节流函数
const throttledGetList = throttle(
() => {
getList();
},
300,
{ leading: true, trailing: true }
);
watch(
() => props.adviceQueryParams,
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
// queryParams.value.adviceType = newValue.adviceType;
queryParams.value.adviceTypes = [newValue.adviceType].join(',');
throttledGetList();
},
{ deep: true }
);
getList();
function getList() {
queryParams.value.organizationId = props.patientInfo.inHospitalOrgId;
getAdviceBaseInfo(queryParams.value).then((res) => {
if (res.data.records.length > 0) {
adviceBaseList.value = res.data.records.filter((item) => {
if (item.adviceType == 1 || item.adviceType == 2) {
return handleQuantity(item) != 0;
} else {
return true;
}
});
total.value = res.data.total;
nextTick(() => {
currentIndex.value = 0;
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
});
}
});
}
// 处理键盘事件
const handleKeyDown = (event) => {
const key = event.key;
const data = adviceBaseList.value;
switch (key) {
case 'ArrowUp': // 上箭头
event.preventDefault(); // 阻止默认滚动行为
if (currentIndex.value > 0) {
currentIndex.value--;
setCurrentRow(data[currentIndex.value]);
}
break;
case 'ArrowDown': // 下箭头`
event.preventDefault();
if (currentIndex.value < data.length - 1) {
currentIndex.value++;
setCurrentRow(data[currentIndex.value]);
}
break;
case 'Enter': // 回车键
// const currentRow = adviceBaseRef.value.getSelectionRows();
event.preventDefault();
if (currentSelectRow.value) {
// 这里可以触发自定义逻辑,如弹窗、跳转等
emit('selectAdviceBase', currentSelectRow.value);
}
break;
}
};
function handleQuantity(row) {
if (row.inventoryList && row.inventoryList.length > 0) {
const totalQuantity = row.inventoryList.reduce((sum, item) => sum + (item.quantity || 0), 0);
return totalQuantity.toString() + row.minUnitCode_dictText;
}
return 0;
}
// 设置选中行(带滚动)
const setCurrentRow = (row) => {
adviceBaseRef.value.setCurrentRow(row);
// 滚动到选中行
const tableBody = adviceBaseRef.value.$el.querySelector('.el-table__body-wrapper');
const currentRowEl = adviceBaseRef.value.$el.querySelector('.current-row');
if (tableBody && currentRowEl) {
currentRowEl.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
};
// 当前行变化时更新索引
const handleCurrentChange = (currentRow) => {
currentIndex.value = adviceBaseList.value.findIndex((item) => item === currentRow);
currentSelectRow.value = currentRow;
};
function clickRow(row) {
emit('selectAdviceBase', row);
}
defineExpose({
handleKeyDown,
});
</script>
<style scoped>
.popover-table-wrapper:focus {
outline: 2px solid #409eff; /* 聚焦时的高亮效果 */
}
</style>

View File

@@ -0,0 +1,242 @@
import request from '@/utils/request'
export function getPatientList(queryParams) {
return request({
url: '/reg-doctorstation/advice-manage/reg-patient-zk',
method: 'get',
params: queryParams
})
}
// 诊断相关接口
/**
* 保存诊断
*/
export function saveDiagnosis(data) {
return request({
url: '/doctor-station/diagnosis/save-doctor-diagnosis',
method: 'post',
data: data
})
}
/**
* 添加诊断绑定
*/
export function saveDiagnosisBind(data) {
return request({
url: '/doctor-station/diagnosis/diagnosis-belong-binding',
method: 'post',
data: data
})
}
/**
* 删除诊断绑定
*/
export function deleteDiagnosisBind(id) {
return request({
url: '/doctor-station/diagnosis/diagnosis-belong-binding?id=' + id,
method: 'delete',
})
}
/**
* 获取诊断定义列表
*/
export function getDiagnosisDefinitionList(queryParams) {
return request({
url: '/doctor-station/diagnosis/condition-definition-metadata',
method: 'get',
params: queryParams
})
}
/**
* 获取诊断分类数据,历史诊断/个人常用诊断/科室常用诊断
*/
export function getConditionDefinitionInfo(patientId) {
return request({
url: '/doctor-station/diagnosis/get-condition-definition-class?patientId=' + patientId,
method: 'get',
})
}
/**
* 获取诊断基础下拉数据
*/
export function diagnosisInit() {
return request({
url: '/doctor-station/diagnosis/init',
method: 'get',
})
}
/**
*
* 获取诊断回显数据
*/
export function getEncounterDiagnosis(encounterId) {
return request({
url: '/doctor-station/diagnosis/get-encounter-diagnosis?encounterId=' + encounterId,
method: 'get',
})
}
/**
*
* 删除就诊诊断
*/
export function delEncounterDiagnosis(conditionId) {
return request({
url: '/doctor-station/diagnosis/encounter-diagnosis?conditionId=' + conditionId,
method: 'delete',
})
}
/**
* 获取中医诊断
*/
export function getTcmCondition(params) {
return request({
url: '/doctor-station/chinese-medical/condition-info',
method: 'get',
params: params
})
}
/**
* 获取辩证分型
*/
export function getTcmSyndrome(params) {
return request({
url: '/doctor-station/chinese-medical/syndrome-info',
method: 'get',
params: params
})
}
/**
* 获取本次就诊中医诊断
*/
export function getTcmDiagnosis(params) {
return request({
url: '/doctor-station/chinese-medical/get-tcm-encounter-diagnosis',
method: 'get',
params: params
})
}
/**
* 保存中医诊断
*/
export function saveTcmDiagnosis(data) {
return request({
url: '/doctor-station/chinese-medical/save-tcm-diagnosis',
method: 'post',
data: data
})
}
/**
* 获取人员慢性病诊断
*/
export function getChronicDisease(params) {
return request({
url: '/yb-request/getConditionDefinition',
method: 'get',
params: params
})
}
/**
* 获取药品列表
*/
export function getAdviceBaseInfo(queryParams) {
return request({
url: '/doctor-station/advice/advice-base-info',
method: 'get',
params: queryParams
})
}
/**
* 保存处方(单条)
*/
export function savePrescription(data) {
return request({
url: '/reg-doctorstation/advice-manage/save-reg-advice',
method: 'post',
data: data
})
}
/**
* 签发处方
*/
export function savePrescriptionSign(data) {
return request({
url: '/reg-doctorstation/advice-manage/sign-reg-advice',
method: 'post',
data: data
})
}
/**
* 处方签退
*/
export function singOut(data) {
return request({
url: '/reg-doctorstation/advice-manage/sign-off-reg',
method: 'post',
data: data
})
}
/**
* 停嘱
*/
export function stopAdvice(data) {
return request({
url: '/reg-doctorstation/advice-manage/stop-reg-advice',
method: 'post',
data: data
})
}
/**
* 获取患者本次就诊处方
*/
export function getPrescriptionList(encounterId) {
return request({
url: '/reg-doctorstation/advice-manage/reg-request-base-info?encounterId=' + encounterId,
method: 'get',
})
}
/**
* 获取费用性质
*/
export function getContract(params) {
return request({
url: '/doctor-station/advice/get-encounter-contract',
method: 'get',
params: params
})
}
/**
* 获取科室列表
*/
export function getOrgTree() {
return request({
url: '/base-data-manage/organization/organization',
method: 'get',
})
}
/**
* 组合/拆组
*/
export function updateGroupId(data) {
return request({
url: '/doctor-station/advice/update-groupid',
method: 'put',
data: data
})
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,421 @@
<template>
<el-dialog
title="添加中医诊断"
v-model="props.openAddDiagnosisDialog"
width="1500px"
append-to-body
destroy-on-close
@open="handleOpen"
@close="close"
>
<div class="main-content">
<!-- 左侧疾病选择区 -->
<div class="disease-section">
<div class="section-title">诊断</div>
<div class="search-box">
<el-input v-model="searchDisease" placeholder="搜索疾病名称或编码" clearable>
<template #prefix>
<el-icon><search /></el-icon>
</template>
</el-input>
</div>
<el-table
:data="conditionList"
max-height="460"
@row-click="handleClickRow"
highlight-current-row
>
<el-table-column label="疾病名称" align="center" prop="name"></el-table-column>
<el-table-column label="医保编码" align="center" prop="ybNo"></el-table-column>
</el-table>
</div>
<!-- 中间疾病-证型关系区 -->
<div class="syndrome-section">
<div class="section-title">证候</div>
<div class="search-box">
<el-input v-model="searchDisease" placeholder="搜索疾病名称或编码" clearable>
<template #prefix>
<el-icon><search /></el-icon>
</template>
</el-input>
</div>
<div v-if="selectedDisease">
<el-table
:data="syndromeList"
max-height="460"
@row-click="clickSyndromeRow"
highlight-current-row
>
<el-table-column label="证候名称" align="center" prop="name"></el-table-column>
<el-table-column label="医保编码" align="center" prop="ybNo"></el-table-column>
</el-table>
</div>
<div class="empty-state" v-else>
<el-empty description="请从左侧选择疾病" />
</div>
</div>
<!-- 右侧诊断详情区 -->
<div class="diagnosis-section">
<div class="section-title">诊断详情</div>
<div class="diagnosis-list">
<div v-for="(item, index) in tcmDiagonsisList" :key="index" class="history-item">
<div class="history-diagnosis">
<div>
<strong>{{ item.conditionName }}</strong> - {{ item.syndromeName }}
</div>
<el-button
size="small"
type="danger"
plain
icon="close"
@click="removeDiagnosis(item, index)"
/>
</div>
</div>
</div>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submit"> </el-button>
<el-button @click="close"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import {
getTcmCondition,
getTcmSyndrome,
saveTcmDiagnosis,
} from '@/views/doctorstation/components/api';
const props = defineProps({
openAddDiagnosisDialog: {
type: Boolean,
default: false,
},
patientInfo: {
type: Object,
required: true,
},
});
const conditionList = ref([]);
const syndromeList = ref([]);
const tcmDiagonsisList = ref([]);
const tcmDiagonsisSaveList = ref([]);
const syndromeSelected = ref(false); // 当前诊断是否选择对应证候
const timestamp = ref('');
const selectedDisease = ref(false);
const { proxy } = getCurrentInstance();
const emit = defineEmits(['close']);
function handleOpen() {
getTcmCondition().then((res) => {
conditionList.value = res.data.records;
});
}
// 点击诊断列表处理,点击以后才显示证候列表
function handleClickRow(row) {
if (syndromeSelected.value || tcmDiagonsisList.value == 0) {
selectedDisease.value = true;
syndromeSelected.value = false;
timestamp.value = Date.now();
getTcmSyndrome().then((res) => {
syndromeList.value = res.data.records;
});
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
verificationStatusEnum: 4,
medTypeCode: '11',
});
tcmDiagonsisList.value.push({
conditionName: row.name,
syndromeGroupNo: timestamp.value,
});
}
}
function clickSyndromeRow(row) {
tcmDiagonsisSaveList.value.push({
definitionId: row.id,
ybNo: row.ybNo,
syndromeGroupNo: timestamp.value,
});
tcmDiagonsisList.value[tcmDiagonsisList.value.length - 1].syndromeName = row.name;
syndromeSelected.value = true;
}
// 删除诊断
function removeDiagnosis(row, index) {
tcmDiagonsisList.value.splice(index, 1);
tcmDiagonsisSaveList.value = tcmDiagonsisSaveList.filter((item) => {
return item.syndromeGroupNo !== row.syndromeGroupNo;
});
}
function save() {
saveTcmDiagnosis({
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
diagnosisChildList: tcmDiagonsisSaveList.value,
}).then((res) => {
if (res.code == 200) {
emit('close');
proxy.$modal.msgSuccess('诊断已保存');
}
});
}
function submit() {
if (tcmDiagonsisSaveList.value.length > 0 && syndromeSelected.value) {
save();
} else {
proxy.$modal.msgWarning('请选择证候');
}
}
function close() {
emit('close');
}
</script>
<style scoped>
:deep(.pagination-container .el-pagination) {
right: 20px !important;
}
.app-container {
max-width: 1400px;
margin: 20px auto;
padding: 20px;
background: white;
border-radius: 12px;
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 15px;
border-bottom: 1px solid var(--el-border-color);
margin-bottom: 20px;
}
.header h1 {
color: var(--el-color-primary);
font-size: 24px;
font-weight: 600;
}
.patient-info {
background: var(--el-color-primary-light-9);
padding: 15px;
border-radius: 8px;
margin-bottom: 20px;
}
.patient-info .info-row {
display: flex;
margin-bottom: 8px;
}
.patient-info .info-label {
width: 100px;
color: var(--el-text-color-secondary);
font-weight: 500;
}
.main-content {
display: grid;
grid-template-columns: 1fr 1fr 1.2fr;
gap: 20px;
margin-bottom: 25px;
}
.disease-section,
.syndrome-section,
.diagnosis-section {
border: 1px solid var(--el-border-color);
border-radius: 8px;
padding: 20px;
background: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.section-title {
font-size: 18px;
font-weight: 600;
color: var(--el-color-primary);
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid var(--el-border-color);
}
.disease-list {
max-height: 400px;
overflow-y: auto;
}
.disease-item {
padding: 12px 15px;
border-bottom: 1px solid var(--el-border-color-lighter);
cursor: pointer;
transition: all 0.3s;
border-radius: 4px;
}
.disease-item:hover {
background-color: var(--el-color-primary-light-9);
}
.disease-item.active {
background-color: var(--el-color-primary-light-8);
border-left: 3px solid var(--el-color-primary);
}
.disease-name {
font-weight: 500;
margin-bottom: 5px;
}
.disease-code {
font-size: 12px;
color: var(--el-text-color-secondary);
}
.search-box {
margin-bottom: 15px;
}
.disease-categories {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 15px;
}
.category-tag {
cursor: pointer;
padding: 5px 12px;
border-radius: 15px;
background: var(--el-fill-color-light);
font-size: 13px;
transition: all 0.3s;
}
.category-tag.active {
background: var(--el-color-primary);
color: white;
}
.relation-container {
text-align: center;
padding: 30px 0;
border: 2px dashed var(--el-border-color);
border-radius: 8px;
margin: 20px 0;
background: var(--el-fill-color-lighter);
}
.relation-icon {
margin-bottom: 15px;
color: var(--el-color-primary);
}
.relation-text {
font-size: 18px;
font-weight: 500;
color: var(--el-text-color-primary);
}
.syndrome-details {
padding: 15px;
background: var(--el-color-primary-light-9);
border-radius: 8px;
border: 1px solid var(--el-color-primary-light-5);
}
.detail-item {
margin-bottom: 12px;
}
.detail-label {
font-weight: 500;
color: var(--el-text-color-secondary);
margin-bottom: 3px;
}
.actions {
display: flex;
justify-content: flex-end;
gap: 15px;
padding-top: 20px;
border-top: 1px solid var(--el-border-color);
}
.empty-state {
text-align: center;
padding: 40px 0;
color: var(--el-text-color-secondary);
}
.diagnosis-history {
margin-top: 20px;
border-top: 1px solid var(--el-border-color);
padding-top: 20px;
}
.history-title {
font-size: 16px;
font-weight: 500;
margin-bottom: 12px;
color: var(--el-text-color-primary);
}
.history-item {
padding: 12px;
border-left: 3px solid var(--el-border-color);
margin-bottom: 10px;
background: var(--el-fill-color-lighter);
border-radius: 0 4px 4px 0;
}
.diagnosis-list {
max-height: 520px;
overflow-y: auto;
}
.history-date {
font-size: 12px;
color: var(--el-text-color-secondary);
margin-bottom: 5px;
}
.history-diagnosis {
display: flex;
justify-content: space-between;
font-size: 14px;
margin-bottom: 5px;
}
.history-note {
font-size: 13px;
color: var(--el-text-color-secondary);
padding-top: 5px;
border-top: 1px dashed var(--el-border-color);
margin-top: 5px;
}
.empty-list {
padding: 20px 0;
text-align: center;
}
</style>

View File

@@ -0,0 +1,129 @@
<template>
<el-dialog
v-model="visible"
top="6vh"
:width="width"
title="中医诊断"
@open="openAct"
@closed="closedAct"
:z-index="20"
>
中医诊断
<template #footer>
<el-button size="fixed" class="margin-left-auto" @click="cancelAct">取消 </el-button>
<el-button size="fixed" type="primary" @click="handleSubmit(signFormRef)">保存</el-button>
</template>
</el-dialog>
</template>
<script setup>
import { reactive, ref, onMounted, inject } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
// import { IInPatient } from '@/model/IInPatient'
const currentInPatient = ref({})
const initCurrentInPatient = () => {
currentInPatient.value = {
feeType: '08',
sexName: '男',
age: '0',
}
}
/* 初始化数据 */
const init = () => {
initCurrentInPatient()
}
/* 入科 */
const signForm = ref({
visitCode: '', // 就诊流水号
height: 0, // 身高
weight: 0, // 体重
temperature: 0, // 体温
hertRate: 0, // 心率
pulse: 0, // 脉搏
highBloodPressure: 0, // 收缩压
endBloodPressure: 0, // 舒张压
loginDeptCode: '', // 当前登录科室
bingqing: '', //患者病情
inDeptDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'), //入院时间
signsId: '',
})
const rules = reactive({
admittedDoctor: [{ required: true, message: '请选择住院医生', trigger: ['blur', 'change'] }],
masterNurse: [{ required: true, message: '请选择责任护士', trigger: ['blur', 'change'] }],
})
const printWristband = ref(false)
const emits = defineEmits(['okAct'])
const visible = defineModel('visible')
const width = '920px'
/* 取消 */
const cancelAct = () => {
visible.value = false
}
/* 录入患者体征*/
const signFormRef = ref()
const handleSubmit = async (formEl) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
if (valid) {
console.log('submit!')
try {
// 录入患者体征方法(signForm.value).then((res: any) => {
// ElMessage({
// message: '登记成功!',
// type: 'success',
// grouping: true,
// showClose: true,
// })
// emits('okAct')
// })
} catch (error) {
console.log(error)
}
}
})
}
const openAct = () => {
init()
}
const closedAct = () => {
visible.value = false
}
onMounted(() => {})
</script>
<style lang="scss" scoped>
.transferIn-container {
width: 100%;
.admission-signs,
.admission-information {
width: 888px;
.unit {
display: inline-block;
margin-left: 10px;
color: #bbb;
font-weight: 400;
font-size: 14px;
font-family: '思源黑体 CN';
}
}
}
.print-wriBtn {
margin-left: 565px;
}
.w-p100 {
width: 100%;
}
.w-80 {
width: 80px;
}
.mb-90 {
margin-bottom: 90px !important;
}
</style>

View File

@@ -0,0 +1,545 @@
<template>
<div>
<el-row :gutter="24">
<el-col :span="4" :xs="24">
<div style="height: 44px; display: flex; align-items: center; flex: none">
<el-input
v-model="diagnosis"
placeholder="诊断名称"
clearable
style="width: 100%"
@keyup.enter="queryDiagnosisUse"
>
<template #append>
<el-button icon="Search" @click="queryDiagnosisUse" />
</template>
</el-input>
</div>
<el-tree
ref="treeRef"
:data="tree"
node-key="id"
:props="{ label: 'name', children: 'children' }"
highlight-current
default-expand-all
:filter-node-method="filterNode"
@node-click="handleNodeClick"
>
<template #default="{ node, data }">
<div class="custom-tree-node">
<span>{{ node.label }}</span>
<span class="tree-node-actions">
<template v-if="node.level === 1 && data.name != '常用' && data.name != '历史'">
<el-button
style="color: #000000"
type="text"
size="small"
@click.stop="addChild(data)"
>
<el-icon><Plus /></el-icon>
</el-button>
</template>
<el-popconfirm
width="200"
:hide-after="10"
title="确认删除此常用诊断吗"
placement="top-start"
@confirm="deleteChild(data)"
>
<template #reference>
<el-button
style="color: #000000"
v-if="
node.level === 2 &&
node.parent.data.name != '常用' &&
node.parent.data.name != '历史'
"
type="text"
size="small"
@click.stop=""
>
<el-icon><Minus /></el-icon>
</el-button>
</template>
</el-popconfirm>
</span>
</div>
</template>
</el-tree>
</el-col>
<el-col :span="20" :xs="24">
<div style="height: 44px; display: flex; align-items: center; flex: none">
<el-button type="primary" plain @click="handleAddDiagnosis()"> 新增诊断 </el-button>
<el-button type="primary" plain @click="handleSaveDiagnosis()"> 保存诊断 </el-button>
<el-button type="primary" plain @click="handleAddTcmDiagonsis()"> 中医诊断 </el-button>
<el-button type="primary" plain @click="handleImport()"> 导入慢性病诊断 </el-button>
</div>
<el-form :model="form" :rules="rules" ref="formRef">
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
<el-table-column label="序号" type="index" width="50" />
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="180">
<template #default="scope">
<el-form-item
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
:rules="rules.diagSrtNo"
>
<el-input-number
v-model="scope.row.diagSrtNo"
controls-position="right"
:controls="false"
style="width: 80px"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="诊断类别" align="center" prop="diagSrtNo" width="180">
<template #default="scope">
<el-form-item
:prop="`diagnosisList.${scope.$index}.medTypeCode`"
:rules="rules.medTypeCode"
>
<el-select v-model="scope.row.medTypeCode" placeholder=" " style="width: 150px">
<el-option
v-for="item in med_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="诊断名称" align="center" prop="name">
<template #default="scope">
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
<el-popover
:popper-style="{ padding: '0' }"
placement="bottom-start"
:visible="scope.row.showPopover"
trigger="manual"
:width="800"
>
<diagnosislist
:diagnosisSearchkey="diagnosisSearchkey"
@selectDiagnosis="handleSelsectDiagnosis"
/>
<template #reference>
<el-input
v-model="scope.row.name"
placeholder="请选择诊断"
@input="handleChange"
@focus="handleFocus(scope.row, scope.$index)"
@blur="handleBlur(scope.row)"
/>
</template>
</el-popover>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
<template #default="scope">
<el-checkbox
label="主诊断"
:trueLabel="1"
:falseLabel="0"
v-model="scope.row.maindiseFlag"
border
size="small"
@change="(value) => handleMaindise(value, scope.$index)"
/>
<el-select
v-model="scope.row.verificationStatusEnum"
placeholder=" "
style="width: 40%; padding-bottom: 5px; padding-left: 10px"
size="small"
>
<el-option
v-for="item in diagnosisOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="130">
<template #default="scope">
<el-button
link
type="primary"
@click="handleDeleteDiagnosis(scope.row, scope.$index)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</el-col>
</el-row>
<diagnosisdialog
:openDiagnosis="openDiagnosis"
@close="closeDiagnosisDialog"
:radio="orgOrUser"
/>
<AddDiagnosisDialog
:openAddDiagnosisDialog="openAddDiagnosisDialog"
:patientInfo="patientInfo"
@close="closeDiagnosisDialog"
/>
</div>
</template>
<script setup>
import { getCurrentInstance } from 'vue';
import {
getConditionDefinitionInfo,
saveDiagnosis,
diagnosisInit,
deleteDiagnosisBind,
getEncounterDiagnosis,
getChronicDisease,
getTcmDiagnosis,
delEncounterDiagnosis,
} from '../api';
import diagnosisdialog from '../diagnosis/diagnosisdialog.vue';
import AddDiagnosisDialog from './addDiagnosisDialog.vue';
import diagnosislist from '../diagnosis/diagnosislist.vue';
import { patientInfo } from '../../store/patient.js';
// const diagnosisList = ref([]);
const allowAdd = ref(false);
const tree = ref([]);
const openDiagnosis = ref(false);
const openAddDiagnosisDialog = ref(false);
const diagnosisSearchkey = ref('');
const diagnosisOptions = ref([]);
const rowIndex = ref();
const diagnosis = ref();
const orgOrUser = ref();
const form = ref({
diagnosisList: [],
});
const props = defineProps({
patientInfo: {
type: Object,
required: true,
},
});
const emits = defineEmits(['diagnosisSave']);
const { proxy } = getCurrentInstance();
const { med_type } = proxy.useDict('med_type');
const rules = ref({
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
diagSrtNo: [{ required: true, message: '请输入诊断序号', trigger: 'change' }],
});
watch(
() => form.value.diagnosisList,
() => {
emits('diagnosisSave', false);
},
{ deep: true }
);
// function getDetail(encounterId) {
// getEmrDetail(encounterId).then((res) => {
// allowAdd.value = res.data ? true : false;
// });
// }
function getList() {
getEncounterDiagnosis(patientInfo.value.encounterId).then((res) => {
if (res.code == 200) {
form.value.diagnosisList = res.data;
emits('diagnosisSave', false);
console.log(form.value.diagnosisList);
}
});
getTcmDiagnosis({ encounterId: patientInfo.value.encounterId }).then((res) => {
if (res.code == 200) {
if (res.data.illness.length > 0) {
res.data.illness.forEach((item, index) => {
form.value.diagnosisList.push({
name: item.name + '-' + res.data.symptom[index].name,
ybNo: item.ybNo,
medTypeCode: item.medTypeCode,
});
});
}
emits('diagnosisSave', false);
console.log(form.value.diagnosisList);
}
});
getTree();
}
init();
function init() {
diagnosisInit().then((res) => {
if (res.code == 200) {
diagnosisOptions.value = res.data.verificationStatusOptions;
}
});
}
function handleImport() {
if (patientInfo.value.contractName != '自费') {
// 获取患者慢性病信息
getChronicDisease({ encounterId: patientInfo.value.encounterId }).then((res) => {
if (res.data.length > 0) {
res.data.forEach((item, index) => {
form.value.diagnosisList.push({
...item,
...{
medTypeCode: '140104',
verificationStatusEnum: 4,
definitionId: item.id,
diagSrtNo: form.value.diagnosisList.length + 1,
},
});
});
}
});
}
}
/**
* 添加子节点
*/
function addChild(data) {
orgOrUser.value = data.name;
openDiagnosis.value = true;
}
/**
* 删除子节点
*/
function deleteChild(data) {
deleteDiagnosisBind(data.id).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('删除成功');
getTree();
}
});
}
watch(diagnosis, (val) => {
proxy.$refs['treeRef'].filter(val);
});
/** 通过条件过滤节点 */
const filterNode = (value, data) => {
console.log('filterNode', value, data);
if (!value) return true;
return data.name.indexOf(value) !== -1;
};
/**
* 获取诊断树列表
*/
function getTree() {
getConditionDefinitionInfo(patientInfo.value ? patientInfo.value.patientId : '').then((res) => {
if (res.code == 200) {
let list = [];
list = res.data.patientHistoryList;
list.children = [];
// 手动构造树列表;
tree.value[0] = {
id: '1',
name: '历史',
children: list,
};
tree.value[1] = {
id: '2',
name: '常用',
children: res.data.doctorCommonUseList,
};
tree.value[2] = {
id: '3',
name: '个人',
children: res.data.userPersonalList,
};
tree.value[3] = {
id: '4',
name: '科室',
children: res.data.organizationList,
};
console.log(tree.value);
}
});
}
/**
* 添加西医诊断
*/
function handleAddDiagnosis() {
proxy.$refs.formRef.validate((valid) => {
if (valid) {
form.value.diagnosisList.push({
showPopover: false,
name: undefined,
verificationStatusEnum: 4,
medTypeCode: '21',
diagSrtNo: form.value.diagnosisList.length + 1,
iptDiseTypeCode: 31,
diagnosisDesc: '',
});
if (form.value.diagnosisList.length == 1) {
form.value.diagnosisList[0].maindiseFlag = 1;
}
}
});
}
// 添加中医诊断
function handleAddTcmDiagonsis() {
openAddDiagnosisDialog.value = true;
}
/**
* 删除诊断
*/
function handleDeleteDiagnosis(row, index) {
if (row.conditionId) {
delEncounterDiagnosis(row.conditionId).then(() => {
getList();
getTree();
});
} else {
form.value.diagnosisList.splice(index, 1);
}
}
function handleMaindise(value, index) {
if (value == 1) {
let flag = 0;
form.value.diagnosisList.forEach((item) => {
console.log(item);
if (item.maindiseFlag == 1) {
flag++;
}
});
if (flag > 1) {
form.value.diagnosisList[index].maindiseFlag = 0;
proxy.$modal.msgWarning('只能有一条主诊断');
}
}
}
/**
* 保存诊断
*/
function handleSaveDiagnosis() {
proxy.$refs.formRef.validate((valid) => {
if (valid) {
if (form.value.diagnosisList.length == 0) {
proxy.$modal.msgWarning('诊断不能为空');
return false;
} else if (!form.value.diagnosisList.some((diagnosis) => diagnosis.maindiseFlag === 1)) {
proxy.$modal.msgWarning('至少添加一条主诊断');
} else {
saveDiagnosis({
patientId: patientInfo.value.patientId,
encounterId: patientInfo.value.encounterId,
diagnosisChildList: form.value.diagnosisList,
}).then((res) => {
if (res.code == 200) {
getTree();
getList();
emits('diagnosisSave', false);
proxy.$modal.msgSuccess('诊断已保存');
}
});
}
}
});
}
/**
* 关闭诊断弹窗
*/
function closeDiagnosisDialog(str) {
if (str === 'success') {
proxy.$modal.msgSuccess('操作成功');
}
openAddDiagnosisDialog.value = false;
openDiagnosis.value = false;
getTree();
}
function queryDiagnosisUse(value) {}
function handleChange(value) {
diagnosisSearchkey.value = value;
}
/**
* 选择诊断并赋值到列表
*/
function handleSelsectDiagnosis(row) {
console.log(row);
form.value.diagnosisList[rowIndex.value].ybNo = row.ybNo;
form.value.diagnosisList[rowIndex.value].name = row.name;
form.value.diagnosisList[rowIndex.value].definitionId = row.id;
}
/**获取焦点时 打开列表 */
function handleFocus(row, index) {
rowIndex.value = index;
row.showPopover = true;
}
/**失去焦点时 关闭列表 */
function handleBlur(row) {
row.showPopover = false;
}
function handleNodeClick(data) {
console.log(data.children);
// 检查节点是否为根节点
if (data.children != undefined) {
// 如果是根节点,不执行任何操作
return;
}
if (!allowAdd.value) {
proxy.$modal.msgWarning('请先填写病历');
return;
}
const isDuplicate = form.value.diagnosisList.some(
(diagnosis) => diagnosis.ybNo === data.ybNo || diagnosis.name === data.name
);
if (isDuplicate) {
proxy.$modal.msgWarning('该诊断项已存在');
return;
}
form.value.diagnosisList.push({
ybNo: data.ybNo,
name: data.name,
verificationStatusEnum: 4,
medTypeCode: '11',
diagSrtNo: form.value.diagnosisList.length + 1,
definitionId: data.definitionId,
});
if (form.value.diagnosisList.length == 1) {
form.value.diagnosisList[0].maindiseFlag = 1;
}
}
defineExpose({ getList, handleSaveDiagnosis });
</script>
<style lang="scss" scoped>
.el-checkbox.is-bordered.el-checkbox--small {
background-color: #ffffff;
}
.custom-tree-node {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.tree-node-actions {
display: flex;
align-items: center;
}
</style>

View File

@@ -0,0 +1,126 @@
<template>
<el-dialog
:title="title"
v-model="props.openDiagnosis"
width="1000px"
append-to-body
destroy-on-close
@close="close"
>
<div>
<el-row :gutter="24" class="mb8">
<el-col :span="12">
<el-input
v-model="queryParams.searchKey"
placeholder="诊断名称/拼音码"
clearable
style="width: 50%; margin-bottom: 10px"
@keyup.enter="queryDiagnosisUse"
>
<template #append>
<el-button icon="Search" @click="queryDiagnosisUse" />
</template>
</el-input>
</el-col>
<!-- <el-col :span="12">
<span>使用范围</span>
<el-radio-group v-model="radio">
<el-radio :label="1" size="default">个人</el-radio>
<el-radio :label="2" size="default">科室</el-radio>
</el-radio-group>
</el-col> -->
</el-row>
<el-table
ref="diagnosisDefinitionRef"
:data="diagnosisDefinitionList"
row-key="patientId"
@cell-click="clickRow"
highlight-current-row
@selection-change="handleSelectionChange"
>
<el-table-column label="诊断名称" align="center" prop="name" />
<el-table-column label="医保编码" align="center" prop="ybNo" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submit"> </el-button>
<el-button @click="close"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { computed } from "vue";
import { getDiagnosisDefinitionList, saveDiagnosisBind } from "../api";
const radio = ref(1);
const props = defineProps({
openDiagnosis: {
type: Boolean,
default: false,
},
radio: {
type: String,
default: '',
},
});
const emit = defineEmits(["close"]);
const total = ref(0);
const queryParams = ref({
pageNo: 1,
pageSize: 10,
});
const diagnosisDefinitionList = ref([]);
const selectRow = ref({});
const title = computed(() => {
return props.radio == "个人" ? "个人常用诊断" : "科室常用诊断";
});
getList();
function getList() {
getDiagnosisDefinitionList(queryParams.value).then((res) => {
diagnosisDefinitionList.value = res.data.records;
total.value = res.data.total;
});
}
function submit() {
saveDiagnosisBind({
definitionId: selectRow.value.id,
definitionName: selectRow.value.name,
bindingEnum: props.radio == "个人" ? 1 : 2,
}).then((res) => {
if (res.code == 200) {
emit("close", "success");
}
});
}
function queryDiagnosisUse() {
getList();
}
function close() {
emit("close");
}
function clickRow(row) {
selectRow.value = row;
}
</script>
<style scoped>
:deep( .pagination-container .el-pagination) {
right: 20px !important;
}
</style>

View File

@@ -0,0 +1,58 @@
<template>
<div>
<el-table
ref="diagnosisDefinitionRef"
:data="diagnosisDefinitionList"
row-key="patientId"
@cell-click="clickRow"
max-height="400"
>
<el-table-column label="诊断名称" align="center" prop="name" />
<el-table-column label="医保编码" align="center" prop="ybNo" />
<el-table-column label="诊断类型" align="center" prop="typeName" width="180"/>
</el-table>
</div>
</template>
<script setup>
import { getDiagnosisDefinitionList } from '../api';
const props = defineProps({
diagnosisSearchkey: {
type: String,
default: '',
},
});
const emit = defineEmits(['selectDiagnosis']);
const total = ref(0);
const queryParams = ref({
pageSize: 1000,
pageNo: 1,
// typeCode: 1,
});
const diagnosisDefinitionList = ref([]);
watch(
() => props.diagnosisSearchkey,
(newValue) => {
queryParams.value.searchKey = newValue;
getList();
},
{ immdiate: true }
);
getList();
function getList() {
getDiagnosisDefinitionList(queryParams.value).then((res) => {
diagnosisDefinitionList.value = res.data.records;
total.value = res.data.total;
});
}
function clickRow(row) {
emit('selectDiagnosis', row);
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,278 @@
<template>
<div class="diagnose-container">
<!-- 常用诊断个人诊断科室诊断历史诊断 -->
<diagnose-folder :folder="mockData" :level="0" />
<div class="diagnose-main">
<div class="operate-btns">
<el-space>
<el-button type="primary" @click="addNewWestern">开立诊断</el-button>
<el-button type="primary">既往诊断</el-button>
<!-- 患者诊断 -->
<el-button type="danger" @click="addNewChinese">中医诊断</el-button>
</el-space>
</div>
<div class="diagnoseData-container">
<el-table
:data="diagnoseData"
border
row-key="id"
style="width: 100%; height: 100%"
highlight-current-row
>
<el-table-column type="selection" fixed="left" width="40" />
<el-table-column prop="date" label="诊断类型" width="180" sortable />
<el-table-column prop="name" label="诊断名称" width="180" />
<el-table-column prop="address" label="主诊" />
<el-table-column prop="address" label="复诊" />
<el-table-column prop="address" label="疑似" />
<el-table-column prop="address" label="传染" />
<el-table-column prop="address" label="入院病情" width="180" />
<el-table-column prop="address" label="转归" width="180" />
<el-table-column prop="address" label="转归日期" width="180" />
<el-table-column prop="address" label="诊断科室" width="180" />
<el-table-column prop="address" label="诊断医师" width="180" />
<el-table-column prop="address" label="诊断日期" width="180" />
<el-table-column fixed="right" label="操作" width="120">
<template #default="props">
<el-space>
<el-tooltip content="删除" placement="bottom">
<el-icon @click="deleteDiagnose(row)"><Delete /></el-icon>
</el-tooltip>
<el-tooltip
content="下移"
placement="bottom"
v-if="props.$index !== diagnoseData.length - 1"
>
<el-icon @click="download(props.row)"><Download /></el-icon>
</el-tooltip>
<el-tooltip content="上移" placement="bottom" v-if="props.$index !== 0">
<el-icon @click="upload(props.row)"><Upload /></el-icon>
</el-tooltip>
<el-tooltip content="置顶" placement="bottom" v-if="props.$index !== 0">
<el-icon @click="top(props.row)"><Top /></el-icon>
</el-tooltip>
<el-tooltip
content="置底"
placement="bottom"
v-if="props.$index !== diagnoseData.length - 1"
>
<el-icon @click="bottom(props.row)"><Bottom /></el-icon>
</el-tooltip>
</el-space>
</template>
</el-table-column>
</el-table>
</div>
</div>
<WesternMedicineDialog v-model:visible="WesternMedicineDialogVisible" />
<ChineseMedicineDialog v-model:visible="ChineseMedicineDialogVisible" />
</div>
</template>
<script setup >
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue'
// const { proxy } = getCurrentInstance()
// const emits = defineEmits([])
// const props = defineProps({})
// import DiagnoseFolder from './diagnoseFolder.vue'
import WesternMedicineDialog from './westernMedicineDialog.vue'
import ChineseMedicineDialog from './chineseMedicineDialog.vue'
const diagnoseData = ref([
{
id: 1,
sort: 1,
name: '新冠',
},
{
id: 2,
sort: 2,
name: '新冠as',
},
{
id: 3,
sort: 3,
name: '新冠12',
},
{
id: 4,
sort: 4,
name: '新冠2121',
},
{
id: 5,
sort: 5,
name: '新冠12',
},
{
id: 6,
sort: 6,
name: '新冠21',
},
])
// 模拟数据
const mockData = ref([
{
name: '常用',
children: [
{
name: '文件夹 1',
children: [
{
name: '霍乱',
},
{
name: '新型冠状病毒新型冠状病毒新型冠状病毒',
},
],
},
{
name: '文件夹 2',
children: [
{
name: '普外科',
},
{
name: '骨科',
},
],
},
{
name: '新型冠状病毒',
},
],
},
{
name: '科室',
children: [
{
name: '内科',
children: [
{
name: '呼吸内科',
},
{
name: '消化内科',
},
],
},
{
name: '外科',
children: [
{
name: '普外科',
},
{
name: '骨科',
},
],
},
{
name: '儿科',
},
],
},
{
name: '个人',
children: [
{
name: '内科',
children: [
{
name: '呼吸内科',
},
{
name: '消化内科',
},
],
},
{
name: '外科',
children: [
{
name: '普外科',
},
{
name: '骨科',
},
],
},
{
name: '儿科',
},
],
},
{
name: '历史',
children: [
{
name: '心率失常',
},
{
name: '心率失常',
},
{
name: '心率失常',
},
],
},
])
const state = reactive({})
onBeforeMount(() => {})
onMounted(() => {})
defineExpose({ state })
// const deleteDiagnose = (row: any) => {
// // TODO 删除
// console.log(row)
// }
// const download = (row: any) => {
// // TODO 删除
// }
// const upload = (row: any) => {
// // TODO 删除
// }
// const top = (row: any) => {
// // TODO 删除
// }
// const bottom = (row: any) => {
// // TODO 删除
// }
const addNewWestern = () => {
WesternMedicineDialogVisible.value = true
}
const addNewChinese = () => {
ChineseMedicineDialogVisible.value = true
}
const WesternMedicineDialogVisible = ref(false)
const ChineseMedicineDialogVisible = ref(false)
</script>
<style lang="scss" scoped>
.diagnose-container {
height: 100%;
display: flex;
.folder-container {
width: 200px;
flex: none;
}
.diagnose-main {
width: 300px;
flex: auto;
display: flex;
flex-direction: column;
.operate-btns {
height: 44px;
display: flex;
align-items: center;
flex: none;
}
.diagnoseData-container {
flex: auto;
}
}
}
</style>

View File

@@ -0,0 +1,222 @@
<template>
<el-dialog
v-model="visible"
:width="width"
title="西医诊断"
@open="openAct"
@closed="closedAct"
:z-index="20"
>
<el-form :inline="true" :model="diagnoseform" class="demo-form-inline" label-width="auto">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="诊断名称" style="width: 100%">
<el-input v-model="diagnoseform.user" placeholder="诊断名称" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="诊断类型" style="width: 100%">
<el-select
v-model="diagnoseform.user"
placeholder="诊断类型"
clearable
style="width: 100%"
>
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="前缀" style="width: 100%">
<el-select v-model="diagnoseform.user" placeholder="前缀" clearable style="width: 100%">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="后缀" style="width: 100%">
<el-select v-model="diagnoseform.user" placeholder="后缀" clearable style="width: 100%">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="ICD" style="width: 100%">
<el-input v-model="diagnoseform.user" placeholder="ICD" clearable style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" style="width: 100%">
<el-input
v-model="diagnoseform.user"
placeholder="备注"
clearable
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入院病情" style="width: 100%">
<el-select
v-model="diagnoseform.user"
placeholder="入院病情"
clearable
style="width: 100%"
>
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="转归" style="width: 100%">
<el-select v-model="diagnoseform.user" placeholder="转归" clearable style="width: 100%">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="转归日期" style="width: 100%">
<el-date-picker
v-model="diagnoseform.user"
type="date"
placeholder="转归日期"
clearable
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="12"> </el-col>
<el-col :span="6">
<el-form-item label="主诊断" style="width: 100%">
<el-checkbox v-model="diagnoseform.checked1" label="" size="large" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="疑似诊断">
<el-checkbox v-model="diagnoseform.checked1" label="" size="large" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="复诊">
<el-checkbox v-model="diagnoseform.checked1" label="" size="large" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="子诊断">
<el-checkbox v-model="diagnoseform.checked1" label="" size="large" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button size="fixed" class="margin-left-auto" @click="cancelAct">取消 </el-button>
<el-button size="fixed" type="primary" @click="handleSubmit(signFormRef)">保存</el-button>
</template>
</el-dialog>
</template>
<script setup>
import { reactive, ref, onMounted, inject } from 'vue'
import { dayjs, ElMessage } from 'element-plus'
const currentInPatient = ref({})
const initCurrentInPatient = () => {
currentInPatient.value = {
feeType: '08',
sexName: '男',
age: '0',
}
}
/* 初始化数据 */
const init = () => {
initCurrentInPatient()
}
/* 入科 */
const diagnoseform = ref({
user: '',
checked1: '',
})
const rules = reactive({
admittedDoctor: [{ required: true, message: '请选择住院医生', trigger: ['blur', 'change'] }],
masterNurse: [{ required: true, message: '请选择责任护士', trigger: ['blur', 'change'] }],
})
const printWristband = ref(false)
const emits = defineEmits(['okAct'])
const visible = defineModel('visible')
const width = '600px'
/* 取消 */
const cancelAct = () => {
visible.value = false
}
/* 录入患者体征*/
const signFormRef = ref()
const handleSubmit = async (formEl) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
if (valid) {
console.log('submit!')
try {
// 录入患者体征方法(signForm.value).then((res: any) => {
// ElMessage({
// message: '登记成功!',
// type: 'success',
// grouping: true,
// showClose: true,
// })
// emits('okAct')
// })
} catch (error) {
console.log(error)
}
}
})
}
const openAct = () => {
init()
}
const closedAct = () => {
visible.value = false
}
onMounted(() => {})
</script>
<style lang="scss" scoped>
.transferIn-container {
width: 100%;
.admission-signs,
.admission-information {
width: 888px;
.unit {
display: inline-block;
margin-left: 10px;
color: #bbb;
font-weight: 400;
font-size: 14px;
font-family: '思源黑体 CN';
}
}
}
.print-wriBtn {
margin-left: 565px;
}
.w-p100 {
width: 100%;
}
.w-80 {
width: 80px;
}
.mb-90 {
margin-bottom: 90px !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,187 @@
<!--
* @Author: sjjh
* @Date: 2025-04-07 23:47:54
* @Description:
-->
<template>
<div class="advice-container">
<div class="operate-btns">
<el-space>
<el-button type="primary" @click="addNew">新增</el-button>
<el-button type="primary">签发</el-button>
<el-button type="danger">撤回</el-button>
<el-button type="danger">作废</el-button>
<el-button type="danger">停止</el-button>
<el-button>复制</el-button>
<el-button>粘贴</el-button>
</el-space>
</div>
<div class="operate-btns">
<el-space>
<el-radio-group v-model="searchForm.orderType">
<el-radio-button label="全部" value="New York" />
<el-radio-button label="长期" value="Washington" />
<el-radio-button label="临时" value="Los Angeles" />
</el-radio-group>
<el-select v-model="searchForm.orderClassCode" placeholder="医嘱类型" style="width: 240px">
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-model="searchForm.orderStatus" placeholder="医嘱状态" style="width: 240px">
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-space>
</div>
<div class="orderTableData-container">
<el-table
:data="orderTableData"
border
row-key="id"
style="width: 100%; height: 100%"
highlight-current-row
:expand-row-keys="expandOrder"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="date" label="状态" width="180" sortable />
<el-table-column prop="orderTypeName" label="类型" width="180" />
<el-table-column prop="address" label="医嘱内容" />
<el-table-column prop="address" label="时间" />
<el-table-column prop="address" label="执行科室" />
<el-table-column prop="address" label="停止、作废人/时间" width="180" />
<el-table-column fixed="right" label="操作" width="120">
<template #default="props">
<el-button link type="primary" size="small" @click="editRow(props.row)">
查看
</el-button>
<el-button link type="primary" size="small">编辑</el-button>
</template>
</el-table-column>
<el-table-column type="expand" width="1" style="width: 0">
<template #default="props">
<div m="4">
<p m="t-0 b-2">State: {{ props.row.state }}</p>
<p m="t-0 b-2">City: {{ props.row.city }}</p>
<p m="t-0 b-2">Address: {{ props.row.address }}</p>
<p m="t-0 b-2">Zip: {{ props.row.zip }}</p>
<h3>Family</h3>
<el-button type="primary" @click="save">保存</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script setup >
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue'
// const { proxy } = getCurrentInstance()
// const emits = defineEmits([])
// const props = defineProps({})
import { orderTableData } from './useOrder'
import { ElMessage } from 'element-plus'
const state = reactive({})
onBeforeMount(() => {})
onMounted(() => {})
defineExpose({ state })
const typeOptions = [
{
value: 'Option1',
label: '中药',
},
{
value: 'Option2',
label: '西药',
},
{
value: 'Option3',
label: '检查',
},
{
value: 'Option4',
label: '检验',
},
{
value: 'Option5',
label: '处置',
},
]
const statusOptions = [
{
value: 'Option1',
label: '暂存',
},
{
value: 'Option2',
label: '签署',
},
{
value: 'Option3',
label: '回退',
},
{
value: 'Option4',
label: '停止',
},
{
value: 'Option5',
label: '作废',
},
]
const searchForm = reactive({
orderType: '',
orderClassCode: '',
orderStatus: '',
})
const expandOrder = ref([]) //目前的展开行
const newId = ref('')
/* ==== 操作 */
// 新增
const addNew = () => {
if (!newId.value) {
newId.value = '1111112222'
orderTableData.unshift({ id: '1111112222' })
expandOrder.value = ['1111112222']
} else {
ElMessage({
message: '请先操作当前编辑的医嘱!',
type: 'warning',
})
}
}
// 新增
const editRow = (row) => {
expandOrder.value = [row.id]
}
const save = (row) => {
expandOrder.value = []
newId.value = undefined
}
</script>
<style lang="scss" scoped>
.advice-container {
height: 100%;
display: flex;
flex-direction: column;
.operate-btns {
height: 44px;
display: flex;
align-items: center;
flex: none;
}
.orderTableData-container {
flex: auto;
height: calc(100% - 88px);
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,108 @@
<!--
* @Author: sjjh
* @Date: 2025-04-09 17:55:05
* @Description:
-->
<template>
<div class="patient-card" v-for="item in data" :key="item.encounterId" :id="item.encounterId">
<patient-parent-card :activeId="modelValue" :type="type" :data="item" @click="parentClick">
</patient-parent-card>
<!-- // TODO 是否考虑孩子 -->
<!-- <div v-if="item.children">
<div
style="margin-top: 8px"
v-for="citem in item.children"
:key="citem.id"
:id="citem.id"
>
<patient-child-card
:active-id="modelValue"
:data="citem"
:parentData="item"
@click="childClick"
>
</patient-child-card>
</div>
</div> -->
</div>
</template>
<script setup>
import { ref, watch } from 'vue';
import PatientParentCard from './patientParentCard.vue';
// import PatientChildCard from './PatientChildCard.vue'
defineOptions({
name: 'PatientCard',
});
const props = defineProps({
modelValue: '',
data: [],
type: 0,
keyChild: '',
auto: true,
});
const value = ref(props.modelValue);
// const childClick = (node: any, parentVal: any) => {
// if (props.auto) {
// value.value = node.id
// }
// emits('click', value.value, node, parentVal)
// }
const diagnosisInit = inject('diagnosisInit')
const getAdviceList = inject('getAdviceList')
const adviceDiagnoInit = inject('adviceDiagnoInit')
// 调用方法
const parentClick = (node) => {
value.value = node.encounterId;
emits('click', value.value, node, null);
setTimeout(() => {
diagnosisInit()
getAdviceList()
adviceDiagnoInit()
}, 0);
};
const parentNode = ref();
const getItem = (val) => {
parentNode.value = null;
const re = props.data.find((item) => {
return item.encounterId === val;
});
if (re) return re;
else {
let rec;
props.data.forEach((item) => {
if (item.children) {
item.children.find((citem) => {
if (citem.encounterId === val) {
parentNode.value = item;
rec = citem;
}
});
}
});
return rec;
}
};
const emits = defineEmits(['click', 'change', 'update:modelValue']);
watch(props, (newValue) => {
value.value = newValue.modelValue;
});
watch(value, (val) => {
emits('update:modelValue', val);
emits('change', val, getItem(val), parentNode.value);
});
</script>
<style lang="scss" scoped>
.patient-card {
user-select: none;
& + .patient-card {
margin-top: 8px;
}
}
</style>

View File

@@ -0,0 +1,107 @@
<!--
* @Author: yangbo@bjgoodwill.com
* @Date: 2024-10-23 09:37:17
* @Description: 患者卡片-孩子节点
-->
<template>
<div @click="clickAct" style="display: flex">
<div class="patient-child_broken"></div>
<div
class="child-card"
:style="{
backgroundColor:
activeId === data.id ? 'rgba(19,192,179,0.05)' : '#ffffff',
borderColor: activeId === data.id ? '#13C0B3' : '#eeeeee',
}"
>
<div class="child-bed">
{{ data.bedName }}
</div>
<div class="child-line"></div>
<div class="child-name">
{{ data.name }}
<div class="child-age">{{ data.sexName }}/{{ data.age }}</div>
</div>
</div>
</div>
</template>
<script setup>
defineOptions({
name: 'PatientChildCard',
});
const props = defineProps({
data: {},
activeId: '',
parentData: {}
});
const emits = defineEmits(['click']);
const clickAct = () => {
emits('click', props.data, props.parentData);
};
</script>
<style lang="scss" scoped>
// 孩子节点
.child-card {
position: relative;
width: 214px;
height: 80px;
margin-left: 4px;
border: 1px solid;
border-radius: 4px;
box-shadow: 0 2px 2px 0 rgba(57.55, 69.04, 86.28, 20%);
cursor: pointer;
.child-bed {
position: absolute;
top: 8px;
left: 16px;
display: flex;
color: #333;
font-weight: 600;
font-size: 16px;
}
.child-line {
position: absolute;
top: 38px;
left: 16px;
width: 182px;
border-bottom: 1px dashed #ddd;
}
.child-num {
position: absolute;
top: 9px;
right: 16px;
color: #666;
font-size: 14px;
}
.child-name {
position: absolute;
top: 48px;
left: 16px;
display: flex;
color: #333;
font-size: 16px;
.child-age {
margin-top: 2.5px;
margin-left: 16px;
color: #666;
font-size: 14px;
}
}
}
// 折线
.patient-child_broken {
width: 17px;
height: 21px;
margin-top: 18px;
border-bottom: 1px solid #ddd;
border-left: 1px solid #ddd;
}
</style>

View File

@@ -0,0 +1,243 @@
<!--
* @Author: yangbo@bjgoodwill.com
* @Date: 2024-10-23 09:39:24
* @Description: 患者卡片-父节点
-->
<template>
<div
@click="clickAct"
class="patient-card"
:class="{
actived: activeId === data.encounterId,
}"
>
<!-- //跨科 考虑不考虑 -->
<div class="main-info-container">
<div class="bed-container">
<!-- 患者床号 -->
<div class="bed">
<el-text truncated :tclass="bedfont" width="auto">{{ data.bedName }}</el-text>
</div>
<!-- 新入院患者标志 -->
<!-- <div class="bed_new" /> -->
</div>
<div class="indepatient-code-container">
<!-- 患者重/危标识符 -->
<!-- <div
class="sign"
:style="{
backgroundColor: data?.criticalCarePatientName === '危' ? '#BA7BC8' : '#E95657',
}"
>
{{ data.criticalCarePatientName }}
</div> -->
<!-- 住院号 -->
<span style="margin-left: 4px"> {{ data.busNo }} </span>
</div>
</div>
<div class="doctor-parent-line" />
<div class="personal-info-container">
<div class="name-container">
<!-- 患者姓名 -->
<div class="name" style="max-width: 70px">
<el-text :text="data.patientName" tclass="name" width="auto">
{{ data.patientName }}
</el-text>
</div>
<!-- 患者性别/年龄 -->
<div class="age">{{ data.genderEnum_enumText }}/{{ data.age }}</div>
</div>
</div>
<div class="dept">
<div class="doctor">
<el-icon size="20px">
<UserFilled />
</el-icon>
<!-- // TODO 医生图标 -->
<div class="doctor_name">{{ data.admittedDoctorName }}</div>
</div>
<div class="deptNurseName">
<el-icon size="20px">
<Avatar />
</el-icon>
<!-- // TODO 护士图标 -->
{{ data.deptNurseName }}
</div>
</div>
</div>
</template>
<script setup>
defineOptions({
name: 'PatientParentCard',
})
const bedfont = 'bed-font'
const props = defineProps({
data: {},
// type0:在科、1:出院、2:转科、3:会诊、
type: 0,
activeId: ''
})
const emits = defineEmits(['click'])
const clickAct = () => {
emits('click', props.data)
}
</script>
<style lang="scss" scoped>
.patient-card {
width: 100%;
overflow: hidden;
background-color: #fff;
border: 1px solid;
border-color: #eee;
border-radius: 4px;
box-shadow: 0 2px 2px 0 rgba(57.55, 69.04, 86.28, 20%);
cursor: pointer;
&.actived {
background-color: rgb(7, 155, 140, 5%);
border-color: var(--el-color-primary);
}
.cross-dept {
height: 24px;
padding: 0 16px;
color: #fff;
font-size: 14px;
line-height: 24px;
background-color: #256d95;
}
.main-info-container {
display: flex;
align-items: center;
justify-content: space-between;
height: 24px;
margin: 7px 0;
padding: 0 16px;
.bed-container {
display: flex;
flex: 1;
align-items: center;
min-width: 0;
.bed {
flex-grow: 0;
flex-shrink: 1;
min-width: 0;
:deep(.bed-font) {
color: #333;
font-weight: 600;
font-size: 16px;
}
}
.bed_new {
flex-shrink: 0;
width: 10px;
height: 10px;
margin-left: 4px;
background: #29af6f;
border-radius: 50%;
}
}
.indepatient-code-container {
display: flex;
flex-shrink: 0;
align-items: center;
padding-left: 6px;
color: #666;
font-size: 14px;
.sign {
width: 24px;
height: 24px;
color: white;
line-height: 24px;
text-align: center;
border-radius: 50%;
user-select: none;
}
}
}
.doctor-parent-line {
margin: 0 16px;
border-bottom: 1px dashed #ddd;
}
.personal-info-container {
display: flex;
align-items: center;
justify-content: space-between;
margin: 10px 0;
padding: 0 16px;
.name-container {
display: flex;
align-items: center;
height: 24px;
.name {
color: #333;
font-size: 16px;
}
.age {
margin-left: 10px;
color: #666;
font-size: 14px;
}
}
.change-department {
width: 58px;
height: 24px;
color: #5585e3;
font-size: 14px;
line-height: 24px;
text-align: center;
background: #e6edfb;
border-radius: 4px;
}
}
.dept {
margin-bottom: 4px;
padding: 0 16px;
display: flex;
justify-content: space-between;
align-items: center;
.doctor {
display: flex;
align-items: center;
height: 32px;
line-height: 32px;
.doctor_name {
display: flex;
align-items: center;
margin-left: 4px;
color: #333;
}
}
.deptNurseName {
display: flex;
align-items: center;
height: 32px;
color: #256d95;
line-height: 32px;
}
}
}
</style>

View File

@@ -0,0 +1,385 @@
<!--
* @Author:
* @Description: 患者列表
-->
<template>
<div class="patientList-container">
<div class="patientList-operate" :class="{ 'patientList-operate-unexpand': !expand }">
<el-space>
<el-icon icon-class="Refresh" size="24" @click="getList">
<Refresh />
</el-icon>
<el-icon class="svg-sty-menu" size="24" @click="updateExpand">
<Expand v-if="!expand" />
<Fold v-if="expand" />
</el-icon>
</el-space>
</div>
<div class="patientList-list" v-if="expand">
<div class="search-operate">
<!-- 在科 -->
<el-input
placeholder="床号/住院号/姓名"
v-model="searchData.keyword"
@keyup.enter="queryPatientData"
:prefix-icon="Search"
>
</el-input>
</div>
<div class="patient-cards" v-loading="queryloading">
<template v-if="filteredCardData.length > 0">
<el-scrollbar ref="expandScrollbarRef" class="patient-cards-scrollbar">
<patient-card
v-model="cardId"
:data="filteredCardData"
:type="active"
@change="cardChange"
>
</patient-card>
</el-scrollbar>
</template>
<el-empty v-else description="暂无数据" />
</div>
</div>
<div class="patientList-list" v-loading="queryloading" v-else>
<el-scrollbar ref="contractScrollbarRef" class="patient-cards-scrollbar">
<el-tooltip
v-for="item in filteredCardData"
:show-after="200"
:key="item.encounterId"
:show-arrow="true"
placement="right"
effect="light"
:offset="4"
>
<template #content>
<div class="card-tooltip">
<span class="f-16">{{ item.bedName }}</span>
<span class="f-14">{{ item.name }}</span>
<el-icon v-if="item.sexName === '女'" :size="24"> <Female /></el-icon>
<el-icon v-else icon-class="headMale" :size="24"><Male /></el-icon>
</div>
</template>
<div>
<div
class="card-small"
:class="{ 'patient-active': cardId === item.encounterId }"
@click="smallCardClick(item)"
:key="item.encounterId"
>
{{ item.bedName }}
</div>
<div class="patient-card-small-border"></div>
</div>
</el-tooltip>
</el-scrollbar>
</div>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, computed } from 'vue'
// import { store } from '@hip/portal'
import { patientInfo, updatePatientInfo } from '../store/patient'
import PatientCard from './patientCard/index.vue'
import { Search } from '@element-plus/icons-vue'
import { getPatientList } from './api'
// const props = defineProps({
// })
const expand = defineModel('expand')
// const emit = defineEmits(['update:expand'])
const active = ref(0)
const searchData = reactive({
keyword: '',
patientType: 1,
type: 1,
timeLimit: 3,
})
// const { userInfo } = store.useGlobalStore()
// 卡片
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: '医生乙',
},
])
// 过滤后的卡片数据
const filteredCardData = computed(() => {
// switch (active.value) {
// case 0:
// return cardAllData.value.filter((item: IInPatient) => {
// // const staffId = userInfo?.staffId
// // 在科患者-我的患者 住院/主治/主任医生只要有一个对应即可显示
// if (searchData.patientType === 1) {
// if (
// staffId !== item.directorDoctor &&
// staffId !== item.masterDoctor &&
// staffId !== item.admittedDoctor
// ) {
// return false
// }
// }
// // 在科患者-科室患者 全部/婴儿/非婴儿
// if (searchData.type === 2) {
// // 婴儿
// if (!(item.children && item.children.length > 0)) {
// return false
// }
// } else if (searchData.type === 3) {
// // 非婴儿
// if (item.children && item.children.length > 0) {
// return false
// }
// }
// // 关键字
// if (
// searchData.keyword &&
// !(
// item.bedName.includes(searchData.keyword) ||
// item.name.includes(searchData.keyword) ||
// item.inpatientCode.includes(searchData.keyword)
// )
// ) {
// return false
// }
// return true
// })
// default:
// return cardAllData.value
// }
return cardAllData.value
})
// 是否初始化激活状态
const isInitActive = ref(true)
// 展开患者列表Ref
const expandScrollbarRef = ref()
// 收缩患者列表Ref
const contractScrollbarRef = ref()
const queryloading = ref(false)
onMounted(() => {
cardId.value = patientInfo.value?.encounterId || ''
queryPatientData()
})
const getList = () => {
getPatientList({ status: 5 }).then((res) => {
cardAllData.value = res.data.records
})
}
/**
* 滚动到选中位置
* @param {*} value
*/
const scrollToSelected = () => {
// 如果不是第一次定位,则不进行滚动
if (!isInitActive.value) return
const currentRef = props.expand === true ? expandScrollbarRef : contractScrollbarRef
if (!currentRef.value) return
const value = getSelectedOffsetTop(currentRef)
currentRef.value.setScrollTop(value || 0)
isInitActive.value = false
}
/**
* 获取选中元素位置
* @param {*} ref
*/
const getSelectedOffsetTop = (ref) => {
const childrenNodeArray = ref?.value?.wrapRef?.children[0]?.children
if (!childrenNodeArray?.length) return 0
// TODO 当有子元素时候需要优化
const targetNode = Array.from(childrenNodeArray).find((childrenNode) => {
return childrenNode?.__vnode?.key === cardId.value
})
return targetNode?.offsetTop || 0
}
/**
* 更新展开状态
*/
const updateExpand = () => {
// emit('update:expand', !props.expand)
expand.value = !expand.value
}
const cardChange = (val, node, parent) => {
updatePatientInfo(node)
}
const smallCardClick = (val) => {
cardId.value = val.encounterId
updatePatientInfo(val)
}
// TODO 从后端获取数据
const queryPatientData = async () => {
if (queryloading.value) return
try {
// queryloading.value = true
// const res: IInPatient[] = []
// // TODO 获取患者列表
// // 设置patMiCode和patCode实际是同一字段
// res.forEach((item: IInPatient) => {
// item.patMiCode = item.patCode
// })
// cardAllData.value = res
// scrollToSelected()
} catch (error) {
cardAllData.value = []
} finally {
queryloading.value = false
}
}
getList()
</script>
<style lang="scss" scoped>
.patientList-container {
height: 100%;
display: flex;
flex-direction: column;
height: 100%;
border-right: 1px solid #ebeef5;
background-color: #ffffff;
.patientList-operate {
display: flex;
align-items: center;
justify-content: flex-end;
height: 44px;
padding: 0 8px;
border-bottom: 1px solid #ebeef5;
flex: none;
&-unexpand {
justify-content: space-around;
padding: 0 8px;
}
}
.patientList-list {
display: flex;
flex: 1;
flex-direction: column;
height: 0;
.search-operate {
padding: 0 8px;
height: 48px;
display: flex;
align-items: center;
flex: none;
}
.patient-cards {
flex: 1;
padding: 0 8px;
overflow: hidden;
:deep(.patient-cards-scrollbar) {
width: 100%;
height: 100%;
.el-scrollbar__bar {
width: 0;
}
}
}
.patient-active {
background-color: var(--el-color-primary);
}
.card-small {
height: 44px;
padding-right: 4px;
padding-left: 12px;
overflow: hidden;
font-size: 16px;
line-height: 44px;
white-space: nowrap;
text-overflow: ellipsis;
border-right: none;
cursor: pointer;
&-active {
background-color: rgb(243, 252, 251);
}
// &:hover {
// background-color: #f8f8f8;
// }
}
.patient-card-small-border {
display: block;
width: 100%;
height: 2px;
background-color: #f1faff;
}
}
}
.card-tooltip {
display: inline-flex;
align-items: center;
height: 45px;
padding: 0 10px;
}
.svg-gray {
fill: var(--hip-color-text-unit);
}
:deep(.scrollbar) {
width: 100%;
height: 100%;
.el-scrollbar__bar {
width: 0;
}
}
.f-16 {
font-weight: 600;
font-size: 16px;
}
.f-14 {
font-size: 14px;
}
.empty-wrap {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
.empty-text-sty {
margin-top: 0;
}
}
</style>

View File

@@ -0,0 +1,14 @@
/*
* @Author: sjjh
* @Date: 2025-04-07 12:58:22
* @Description:
*/
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'
export { PatientList, PatientCard, Advice,Diagnose, BloodTtransfusionAapplication, ExamineApplication, SurgeryApplication, TestApplication }

View File

@@ -0,0 +1,112 @@
<!--
* @Author: sjjh
* @Date: 2025-04-07 11:49:37
* @Description:
-->
<template>
<div class="inpatientDoctor-home-container">
<el-container>
<!-- 患者列表 -->
<el-aside minWidth="83px" :width="`${patientAside ? '254px' : '83px'}`">
<PatientList v-model:expand="patientAside" />
</el-aside>
<!-- main-->
<el-container class="inpatientDoctor-home-main">
<el-header height="auto"><inPatientBarDoctorFold /></el-header>
<el-main>
<el-tabs v-model="activeTabName" type="card" class="patient-tabs">
<el-tab-pane label="临床医嘱" name="prescription">
<Advice ref="adviceRef" />
</el-tab-pane>
<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="fourth">Task</el-tab-pane>
<el-tab-pane label="检验申请" name="test">
<TestApplication />
</el-tab-pane>
<el-tab-pane label="检查申请" name="examine">
<ExamineApplication />
</el-tab-pane>
<el-tab-pane label="手术申请" name="surgery">
<SurgeryApplication />
</el-tab-pane>
<el-tab-pane label="输血申请" name="blood">
<BloodTtransfusionAapplication />
</el-tab-pane>
</el-tabs>
</el-main>
</el-container>
</el-container>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
// const { proxy } = getCurrentInstance()
// const emits = defineEmits([])
// const props = defineProps({})
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
import {
PatientList,
Advice,
Diagnose,
BloodTtransfusionAapplication,
ExamineApplication,
SurgeryApplication,
TestApplication,
} from './index.js';
const state = reactive({});
onBeforeMount(() => {});
onMounted(() => {});
defineExpose({ state });
const activeTabName = ref('prescription');
const diagnosisRef = ref();
const adviceRef = ref();
const patientAside = ref(true);
const patientInfo = ref({});
provide('diagnosisInit', (value) => {
patientInfo.value = value;
diagnosisRef.value.getList();
});
provide('getAdviceList', (value) => {
adviceRef.value.getListInfo();
});
provide('adviceDiagnoInit', (value) => {
adviceRef.value.getDiagnosisInfo();
});
</script>
<style lang="scss" scoped>
.inpatientDoctor-home-container {
height: 100%;
height: calc(100vh - 84px);
.el-container {
height: 100%;
}
:deep(.el-aside) {
padding: 0;
}
.inpatientDoctor-home-main {
background-color: #ffffff;
:deep(.el-header) {
padding: 0px;
margin-bottom: 0px;
}
.el-main {
padding: 0px 8px;
}
:deep(.patient-tabs) {
height: 100%;
.el-tabs__header {
margin: 0;
}
.el-tabs__content {
height: calc(100% - 40px);
}
.el-tab-pane {
height: 100%;
}
}
}
}
</style>

View File

@@ -0,0 +1,23 @@
/*
* @Author: sjjh
* @Date: 2025-04-09 17:55:05
* @Description:
*/
// import { IInPatient } from '@/model/IInPatient'
import { ref } from 'vue'
// 定义护士等级(没接口前mock)
export const nursingLevel = ref('0')
export function updateNursingLevel(level) {
nursingLevel.value = level
}
// 选择患者信息
export const patientInfo = ref()
export function updatePatientInfo(info) {
console.log(123111);
patientInfo.value = info
}

View File

@@ -0,0 +1,2 @@
## inpatientDoctor 住院医生
### home 住院医生站