提交merge1.3
This commit is contained in:
@@ -211,28 +211,6 @@ watch(
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
<<<<<<< HEAD
|
||||
getList();
|
||||
// function getList() {
|
||||
// queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
// 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]);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
=======
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
@@ -253,7 +231,6 @@ function getList() {
|
||||
}
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
// 从priceList列表中获取价格
|
||||
function getPriceFromInventory(row) {
|
||||
if (row.priceList && row.priceList.length > 0) {
|
||||
|
||||
@@ -273,12 +273,7 @@ export function singOut(data) {
|
||||
url: '/doctor-station/advice/sign-off',
|
||||
method: 'post',
|
||||
data: data,
|
||||
<<<<<<< HEAD
|
||||
skipErrorMsg: true
|
||||
})
|
||||
=======
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
/**
|
||||
* 获取患者本次就诊处方
|
||||
|
||||
@@ -269,25 +269,6 @@ function removeDiagnosis(row, index) {
|
||||
}
|
||||
|
||||
function save() {
|
||||
<<<<<<< HEAD
|
||||
// 为每个诊断项添加诊断医生和诊断时间
|
||||
const diagnosisChildList = tcmDiagonsisSaveList.value.map(item => ({
|
||||
...item,
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || '',
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
}));
|
||||
|
||||
saveTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
diagnosisChildList: diagnosisChildList,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close');
|
||||
proxy.$modal.msgSuccess('诊断已保存');
|
||||
}
|
||||
});
|
||||
=======
|
||||
if(props.updateZy.length>0){
|
||||
updateTcmDiagnosis({
|
||||
patientId: props.patientInfo.patientId,
|
||||
@@ -312,7 +293,6 @@ function save() {
|
||||
});
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
function submit() {
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
<<<<<<< HEAD
|
||||
<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">
|
||||
=======
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="tree"
|
||||
@@ -24,22 +20,17 @@
|
||||
@node-click="handleNodeClick"
|
||||
max-height="650"
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
<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 != '历史'">
|
||||
<<<<<<< HEAD
|
||||
<el-button style="color: #000000" type="text" size="small" @click.stop="addChild(data)">
|
||||
=======
|
||||
<el-button
|
||||
style="color: #000000"
|
||||
type="text"
|
||||
size="small"
|
||||
@click.stop="addChild(data)"
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
@@ -48,13 +39,6 @@
|
||||
<el-popconfirm width="200" :hide-after="10" title="确认删除此常用诊断吗" placement="top-start"
|
||||
@confirm="deleteChild(data)">
|
||||
<template #reference>
|
||||
<<<<<<< HEAD
|
||||
<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-button
|
||||
style="color: #000000"
|
||||
v-if="
|
||||
@@ -66,7 +50,6 @@
|
||||
size="small"
|
||||
@click.stop=""
|
||||
>
|
||||
>>>>>>> v1.3
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
@@ -117,11 +100,6 @@
|
||||
<el-table-column label="诊断名称" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name">
|
||||
<<<<<<< HEAD
|
||||
<el-popover :popper-style="{ padding: '0' }" placement="bottom-start" :visible="scope.row.showPopover"
|
||||
trigger="manual" :width="800">
|
||||
<diagnosislist :diagnosisSearchkey="diagnosisSearchkey" @selectDiagnosis="handleSelsectDiagnosis" />
|
||||
=======
|
||||
<el-popover
|
||||
:popper-style="{ padding: '0' }"
|
||||
placement="bottom-start"
|
||||
@@ -134,7 +112,6 @@
|
||||
:diagnosisSearchkey="diagnosisSearchkey"
|
||||
@selectDiagnosis="handleSelsectDiagnosis"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
<template #reference>
|
||||
<el-input v-model="scope.row.name" placeholder="请选择诊断" @input="handleChange"
|
||||
@focus="handleFocus(scope.row, scope.$index)" @blur="handleBlur(scope.row)" />
|
||||
@@ -143,17 +120,9 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<<<<<<< HEAD
|
||||
|
||||
<el-table-column label="诊断医生" align="center" prop="diagnosisDoctor" width="120" />
|
||||
<el-table-column label="诊断时间" align="center" prop="diagnosisTime" width="150" />
|
||||
<el-table-column label="诊断代码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag" width="120">
|
||||
=======
|
||||
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
|
||||
<el-table-column label="类别" align="center" prop="typeName" width="100" />
|
||||
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
||||
>>>>>>> v1.3
|
||||
<template #default="scope">
|
||||
<div style="display:flex;flex-direction:column;align-items:center;gap:5px;">
|
||||
<el-checkbox
|
||||
@@ -192,11 +161,6 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<<<<<<< HEAD
|
||||
<diagnosisdialog :openDiagnosis="openDiagnosis" @close="closeDiagnosisDialog" :radio="orgOrUser" />
|
||||
<AddDiagnosisDialog :openAddDiagnosisDialog="openAddDiagnosisDialog" :patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog" />
|
||||
=======
|
||||
<diagnosisdialog
|
||||
:openDiagnosis="openDiagnosis"
|
||||
@close="closeDiagnosisDialog"
|
||||
@@ -208,7 +172,6 @@
|
||||
:patientInfo="props.patientInfo"
|
||||
@close="closeDiagnosisDialog"
|
||||
/>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -287,46 +250,6 @@ function refreshData() {
|
||||
}
|
||||
let maxNo = 99;
|
||||
function getList() {
|
||||
<<<<<<< HEAD
|
||||
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||
console.warn('患者就诊信息不完整,无法获取诊断数据');
|
||||
return;
|
||||
}
|
||||
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 为每个诊断项添加默认的诊断医生和时间(如果不存在)
|
||||
form.value.diagnosisList = res.data.map(item => ({
|
||||
...item,
|
||||
diagnosisDoctor: item.diagnosisDoctor || props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: item.diagnosisTime || new Date().toLocaleString('zh-CN')
|
||||
}));
|
||||
|
||||
// 获取诊断列表后按排序号排序
|
||||
form.value.diagnosisList.sort((a, b) => (a.diagSrtNo || 0) - (b.diagSrtNo || 0));
|
||||
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.illness && res.data.illness.length > 0 && res.data.symptom) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
form.value.diagnosisList.push({
|
||||
name: item.name + '-' + (res.data.symptom[index]?.name || ''),
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||
});
|
||||
});
|
||||
}
|
||||
emits('diagnosisSave', false);
|
||||
}
|
||||
});
|
||||
|
||||
=======
|
||||
getEncounterDiagnosis(props.patientInfo.encounterId)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
@@ -362,7 +285,6 @@ function getList() {
|
||||
}
|
||||
});
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
getTree();
|
||||
}
|
||||
|
||||
@@ -487,22 +409,10 @@ function getTree() {
|
||||
function handleAddDiagnosis() {
|
||||
proxy.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
<<<<<<< HEAD
|
||||
if (!allowAdd.value) {
|
||||
proxy.$modal.msgWarning('请先填写病历');
|
||||
return;
|
||||
}
|
||||
// 计算现有最大排序号
|
||||
const maxSortNo = form.value.diagnosisList.length > 0
|
||||
? Math.max(...form.value.diagnosisList.map(item => item.diagSrtNo || 0))
|
||||
: 0;
|
||||
|
||||
=======
|
||||
// if (!allowAdd.value) {
|
||||
// proxy.$modal.msgWarning('请先填写病历');
|
||||
// return;
|
||||
// }
|
||||
>>>>>>> v1.3
|
||||
form.value.diagnosisList.push({
|
||||
showPopover: false,
|
||||
name: undefined,
|
||||
@@ -717,14 +627,10 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
||||
.el-checkbox.is-bordered.el-checkbox--small {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
.tree-with-scrollbar {
|
||||
max-height: 650px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,25 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<<<<<<< HEAD
|
||||
<el-scrollbar height="200px">
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="模板名称" align="center" prop="templateName" />
|
||||
<!-- <el-table-column label="使用范围" align="center" prop="useScopeCode" /> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click.stop="handelDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-scrollbar>
|
||||
|
||||
=======
|
||||
<el-table
|
||||
ref="emrTemplateRef"
|
||||
:data="emrTemplate"
|
||||
@@ -36,7 +16,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
>>>>>>> v1.3
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
@@ -67,11 +46,7 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
getList();
|
||||
=======
|
||||
getList();
|
||||
>>>>>>> v1.3
|
||||
function getList() {
|
||||
queryParams.value.useScopeCode = 1;
|
||||
getEmrTemplateList(queryParams.value).then((res) => {
|
||||
|
||||
@@ -276,10 +276,6 @@ function getRowDisabled(row) {
|
||||
* 新增处方按钮操作
|
||||
*/
|
||||
function handleAddPrescription() {
|
||||
<<<<<<< HEAD
|
||||
console.log('新增处方按钮操作 - 打开新增处方弹窗');
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
title.value = '新增处方';
|
||||
openPrescriptionDialog();
|
||||
}
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
/*
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-20 17:02:37
|
||||
<<<<<<< HEAD
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// ====== 文书记录
|
||||
=======
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request';
|
||||
@@ -21,17 +14,11 @@ export function saveOrUpdateRecord(data) {
|
||||
data,
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
// 新增记录
|
||||
export function addRecord(data) {
|
||||
return request({
|
||||
url: '/document/record/addRecord',
|
||||
method: 'post',
|
||||
<<<<<<< HEAD
|
||||
data
|
||||
})
|
||||
}
|
||||
=======
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -69,31 +56,21 @@ export function deleteTemplate(id) {
|
||||
});
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
|
||||
|
||||
export function getRecordByEncounterIdList(params) {
|
||||
return request({
|
||||
url: '/document/record/getRecordByEncounterIdList',
|
||||
method: 'get',
|
||||
<<<<<<< HEAD
|
||||
params
|
||||
})
|
||||
=======
|
||||
params,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
// 初始化文书定义
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/document/record/init',
|
||||
method: 'get',
|
||||
<<<<<<< HEAD
|
||||
})
|
||||
=======
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
// ====== 文书模板
|
||||
@@ -102,40 +79,22 @@ export function addTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/add',
|
||||
method: 'post',
|
||||
<<<<<<< HEAD
|
||||
data
|
||||
})
|
||||
=======
|
||||
data,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
//
|
||||
export function getListByDefinitionId(definitionId) {
|
||||
return request({
|
||||
url: '/document/template/getListByDefinitionId',
|
||||
method: 'get',
|
||||
<<<<<<< HEAD
|
||||
params: {definitionId}
|
||||
})
|
||||
=======
|
||||
params: { definitionId },
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
// 更新模板
|
||||
export function updateTemplate(data) {
|
||||
return request({
|
||||
url: '/document/template/update',
|
||||
method: 'put',
|
||||
<<<<<<< HEAD
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
=======
|
||||
data,
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
@@ -7,13 +7,6 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
<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.name}(${item.recordTime})`" placement="bottom">
|
||||
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
|
||||
{{ item.name }}({{ item.recordTime }})
|
||||
=======
|
||||
<el-scrollbar
|
||||
class="emr-history-scrollbar-container"
|
||||
style="width: 100%; height: calc(100vh - 300px)"
|
||||
@@ -37,7 +30,6 @@
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
>>>>>>> v1.3
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -46,13 +38,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
<<<<<<< HEAD
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
import { getRecordByEncounterIdList } from '../api';
|
||||
=======
|
||||
import { ref, reactive, defineEmits, unref, nextTick } from 'vue';
|
||||
import { getRecordByEncounterIdList, deleteRecord } from '../api';
|
||||
>>>>>>> v1.3
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
@@ -62,13 +49,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
selectedRecordId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
const definitionId = defineModel('definitionId', {
|
||||
type: String,
|
||||
@@ -97,20 +81,13 @@ const queryList = async () => {
|
||||
historyData.value = [];
|
||||
}
|
||||
} catch (error) {
|
||||
<<<<<<< HEAD
|
||||
// ElMessage.error('获取模板树失败');
|
||||
=======
|
||||
// ElMessage.error(' 获取模板树失败 ');
|
||||
>>>>>>> v1.3
|
||||
historyData.value = [];
|
||||
}
|
||||
};
|
||||
const handleNodeClick = (data) => {
|
||||
emits('historyClick', data);
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
const currentSelectTemplate = ref({});
|
||||
=======
|
||||
// 删除历史记录
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
@@ -128,7 +105,6 @@ const handleDelete = async (item) => {
|
||||
}
|
||||
};
|
||||
|
||||
>>>>>>> v1.3
|
||||
defineExpose({ queryList });
|
||||
</script>
|
||||
|
||||
@@ -152,8 +128,6 @@ defineExpose({ queryList });
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.selected-history-item {
|
||||
@@ -164,7 +138,6 @@ defineExpose({ queryList });
|
||||
color: #d9d9d9;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,19 +9,6 @@
|
||||
</div> -->
|
||||
<el-scrollbar class="emr-template-scrollbar-container" style="width: 100%">
|
||||
<div v-for="item in templateData" :key="item.id" class="scrollbar-item">
|
||||
<<<<<<< HEAD
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="`${item.name}`"
|
||||
placement="bottom"
|
||||
>
|
||||
<el-text class="2" truncated @click="handleNodeClick(item)">
|
||||
<div class="template-item">{{ item.name }}
|
||||
<el-space>
|
||||
<el-icon><Edit @click="handleEdit(item)" /></el-icon>
|
||||
</el-space></div>
|
||||
|
||||
=======
|
||||
<el-tooltip effect="dark" :content="`${item.name}`" placement="bottom">
|
||||
<el-text class="2" truncated @click="handleNodeClick(item)">
|
||||
<div class="template-item">
|
||||
@@ -31,7 +18,6 @@
|
||||
<el-icon><Delete @click="handleDelete(item)" /></el-icon>
|
||||
</el-space>
|
||||
</div>
|
||||
>>>>>>> v1.3
|
||||
</el-text>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@@ -41,19 +27,11 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, defineEmits, unref } from 'vue';
|
||||
<<<<<<< HEAD
|
||||
import { getListByDefinitionId } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['templateClick','edit']);
|
||||
=======
|
||||
import { getListByDefinitionId, deleteTemplate } from '../api';
|
||||
import { ElTree } from 'element-plus';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { patientInfo } from '../../store/patient.js';
|
||||
const emits = defineEmits(['templateClick', 'edit']);
|
||||
>>>>>>> v1.3
|
||||
const props = defineProps({
|
||||
definitionId: {
|
||||
type: String,
|
||||
@@ -73,17 +51,6 @@ const queryParams = ref({
|
||||
isPage: 0,
|
||||
});
|
||||
const templateData = ref([]);
|
||||
<<<<<<< HEAD
|
||||
const queryList = async () => {
|
||||
try {
|
||||
if ( unref(definitionId)&&unref(definitionId) !== '') {
|
||||
const res = await getListByDefinitionId(unref(definitionId));
|
||||
templateData.value = res.data || [];
|
||||
}else{
|
||||
templateData.value = [];
|
||||
}
|
||||
|
||||
=======
|
||||
// 删除模板
|
||||
const handleDelete = async (item) => {
|
||||
try {
|
||||
@@ -102,7 +69,6 @@ const queryList = async () => {
|
||||
} else {
|
||||
templateData.value = [];
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
} catch (error) {
|
||||
ElMessage.error('获取模板失败');
|
||||
templateData.value = [];
|
||||
@@ -120,38 +86,6 @@ defineExpose({ queryList });
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.emr-template-container {
|
||||
<<<<<<< HEAD
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
.emr-template-scrollbar-container{
|
||||
padding: 8px;
|
||||
height: 100%;
|
||||
.scrollbar-item {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background: var(--el-color-primary-light-9);
|
||||
& + .scrollbar-item {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.el-text{
|
||||
width: calc(100% - 0px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.template-item{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
=======
|
||||
height: 100%;
|
||||
// padding: 8px;
|
||||
|
||||
@@ -181,5 +115,4 @@ defineExpose({ queryList });
|
||||
}
|
||||
}
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</style>
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
<<<<<<< HEAD
|
||||
<!--
|
||||
* @Author: sjjh
|
||||
* @Date: 2025-09-18 15:41:10
|
||||
* @Description: 门诊病历组件
|
||||
-->
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
<template>
|
||||
<div class="emr-use-container">
|
||||
<div
|
||||
@@ -51,26 +43,13 @@
|
||||
<!-- <el-button type="primary" @click="newEmr">新建</el-button> -->
|
||||
<el-button type="primary" @click="saveAsModel">存为模版</el-button>
|
||||
<el-button @click="refresh">刷新</el-button>
|
||||
<<<<<<< HEAD
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<!-- <el-button type="primary" @click="print">打印</el-button> -->
|
||||
=======
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button type="primary" @click="print">打印</el-button>
|
||||
>>>>>>> v1.3
|
||||
</el-space>
|
||||
</div>
|
||||
<div class="operate-main">
|
||||
<el-scrollbar class="template-tree-scrollbar">
|
||||
<<<<<<< HEAD
|
||||
<component
|
||||
:is="currentComponent"
|
||||
ref="emrComponentRef"
|
||||
:patientInfo="props.patientInfo"
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
=======
|
||||
<div v-loading="loading" class="loading-container">
|
||||
<component
|
||||
:is="currentComponent"
|
||||
@@ -79,7 +58,6 @@
|
||||
@submitOk="handleSubmitOk"
|
||||
/>
|
||||
</div>
|
||||
>>>>>>> v1.3
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,10 +70,7 @@
|
||||
@historyClick="handleHistoryClick"
|
||||
ref="historyRef"
|
||||
v-model:definitionId="currentSelectTemplate.id"
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
:selectedRecordId="selectedHistoryRecordId"
|
||||
>>>>>>> v1.3
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="模版" name="model">
|
||||
@@ -119,20 +94,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
<<<<<<< HEAD
|
||||
import { getCurrentInstance, nextTick, onBeforeMount, onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
import { addRecord, addTemplate } from './api';
|
||||
import { patientInfo } from '../store/patient.js';
|
||||
import dayjs from 'dayjs';
|
||||
// 打印工具
|
||||
// import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits(['emrSaved']);
|
||||
const props = defineProps({
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
=======
|
||||
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
|
||||
@@ -146,7 +107,6 @@ const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([]);
|
||||
const props = defineProps({
|
||||
/** 患者信息 doctorStation 传递信息*/
|
||||
>>>>>>> v1.3
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
@@ -169,10 +129,7 @@ const queryParams = ref({
|
||||
useRanges: [1, 2], // 0 暂不使用 1 全院 2 科室 3 个人
|
||||
organizationId: userStore.orgId,
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const loading = ref(false); // 数据加载状态
|
||||
>>>>>>> v1.3
|
||||
|
||||
const currentSelectTemplate = ref({
|
||||
id: '',
|
||||
@@ -182,10 +139,7 @@ const emrComponentRef = ref(null);
|
||||
const quicklyactiveName = ref('history');
|
||||
const leftShow = ref(true);
|
||||
const rightShow = ref(true);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const templateTree = ref(null);
|
||||
>>>>>>> v1.3
|
||||
|
||||
// 树配置(模板树)
|
||||
const defaultProps = {
|
||||
@@ -198,12 +152,9 @@ const queryTemplateTree = async () => {
|
||||
try {
|
||||
const res = await getTreeList(queryParams.value);
|
||||
templateData.value = res.data || [];
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
// 组件挂载后,患者信息变化时会自动调用selectDefaultTemplate
|
||||
// 这里不再重复调用,避免重复操作
|
||||
>>>>>>> v1.3
|
||||
} catch (error) {
|
||||
// ElMessage.error('获取模板树失败');
|
||||
templateData.value = [];
|
||||
@@ -223,9 +174,6 @@ const handleNodeClick = (data, node) => {
|
||||
};
|
||||
// currentComponent.value = null;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
historyRef.value?.queryList();
|
||||
=======
|
||||
|
||||
// 确保组件状态更新后再查询历史记录
|
||||
nextTick(() => {
|
||||
@@ -240,7 +188,6 @@ const handleNodeClick = (data, node) => {
|
||||
}, 100);
|
||||
});
|
||||
|
||||
>>>>>>> v1.3
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
@@ -300,14 +247,6 @@ const handleSubmitOk = async (data) => {
|
||||
editForm.value.encounterId = patientInfo.value.encounterId;
|
||||
editForm.value.patientId = patientInfo.value.patientId;
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
<<<<<<< HEAD
|
||||
await addRecord(editForm.value);
|
||||
ElMessage.success('病历保存成功');
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
// 通知父组件病历保存成功
|
||||
emits('emrSaved', true);
|
||||
=======
|
||||
// 提交病历
|
||||
await saveOrUpdateRecord(editForm.value);
|
||||
ElMessage.success('保存成功');
|
||||
@@ -320,18 +259,12 @@ const handleSubmitOk = async (data) => {
|
||||
setTimeout(() => {
|
||||
loadLatestMedicalRecord();
|
||||
}, 100);
|
||||
>>>>>>> v1.3
|
||||
} catch (error) {
|
||||
ElMessage.error('提交失败');
|
||||
console.log(error);
|
||||
}
|
||||
} else if (currentOperate.value === 'addTemplate') {
|
||||
<<<<<<< HEAD
|
||||
// 新增或者编辑模板
|
||||
// editTemplateForm.value.id=
|
||||
=======
|
||||
// 新增或修改模板
|
||||
>>>>>>> v1.3
|
||||
editTemplateForm.value.name =
|
||||
currentSelectTemplate.value.name + dayjs().format('YYYY/MM/DD HH:mm');
|
||||
editTemplateForm.value.contextJson = JSON.stringify(data);
|
||||
@@ -346,26 +279,12 @@ const refresh = () => {
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
const deleteEmr = async () => {
|
||||
try {
|
||||
// 这里应该添加实际的删除逻辑
|
||||
ElMessage.success('删除成功!');
|
||||
} catch (error) {
|
||||
ElMessage.error('删除失败');
|
||||
}
|
||||
};
|
||||
|
||||
const save = async () => {
|
||||
try {
|
||||
=======
|
||||
const save = async () => {
|
||||
try {
|
||||
if (editForm.value && editForm.value.printCount && editForm.value.printCount > 0) {
|
||||
ElMessage.warning('该病历已打印,不允许修改');
|
||||
return;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
currentOperate.value = 'add';
|
||||
await emrComponentRef.value?.submit();
|
||||
} catch (error) {
|
||||
@@ -373,8 +292,6 @@ const save = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 重置表单数据
|
||||
const resetForm = async () => {
|
||||
try {
|
||||
@@ -419,7 +336,6 @@ const resetForm = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
>>>>>>> v1.3
|
||||
const historyRef = ref(null);
|
||||
const handleHistoryClick = (data) => {
|
||||
newEmr();
|
||||
@@ -428,8 +344,6 @@ const handleHistoryClick = (data) => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contentJson));
|
||||
});
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
// 默认选中门诊病历模板
|
||||
const selectOutpatientMedicalRecordTemplate = async () => {
|
||||
@@ -532,17 +446,13 @@ const loadLatestMedicalRecord = async () => {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
>>>>>>> v1.3
|
||||
const templateRef = ref(null);
|
||||
|
||||
const handleTemplateClick = (data) => {
|
||||
newEmr();
|
||||
editForm.value = data;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
editForm.value.id = '';
|
||||
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
>>>>>>> v1.3
|
||||
nextTick(() => {
|
||||
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contextJson));
|
||||
});
|
||||
@@ -555,12 +465,6 @@ const templateEdit = (data) => {
|
||||
const templateEditVisible = ref(false);
|
||||
// const templateEditSubmitOk = () => {};
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 打印方法实现
|
||||
const print = async () => {
|
||||
try {
|
||||
// 检查是否有选中的病历模板
|
||||
=======
|
||||
// 定义病历模板类型与打印模板的映射关系
|
||||
const templateToPrintTemplateMap = {
|
||||
// 手术记录相关模板
|
||||
@@ -593,46 +497,19 @@ const getPrintTemplateByTemplateName = (templateName) => {
|
||||
// 打印
|
||||
const print = async () => {
|
||||
try {
|
||||
>>>>>>> v1.3
|
||||
if (!currentSelectTemplate.value || !currentSelectTemplate.value.id) {
|
||||
ElMessage.warning('请先选择病历模板');
|
||||
return;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 检查是否已保存
|
||||
if (!editForm.value.id || editForm.value.id === '') {
|
||||
ElMessage.warning('请先保存病历后再进行打印');
|
||||
return;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
// 获取当前病历组件的表单数据
|
||||
const formData = emrComponentRef.value?.formData || {};
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 准备打印数据(不依赖子组件的getPrintData方法)
|
||||
// const printData = {
|
||||
// // 使用当前选中的模板信息
|
||||
// templateInfo: currentSelectTemplate.value,
|
||||
// // 添加患者信息
|
||||
// patientInfo: props.patientInfo,
|
||||
// // 添加打印时间
|
||||
// printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
// // 添加基本病历信息
|
||||
// emrInfo: {
|
||||
// documentName: currentSelectTemplate.value.name || '住院病历',
|
||||
// documentId: currentSelectTemplate.value.id || '',
|
||||
// encounterId: props.patientInfo.encounterId || '',
|
||||
// patientId: props.patientInfo.patientId || '',
|
||||
// recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
// // 添加病历表单数据(包含红框内的所有字段)
|
||||
// formData: formData,
|
||||
// doctorName: userStore.nickName,
|
||||
// };
|
||||
|
||||
=======
|
||||
// 获取诊断数据
|
||||
let diagnosisList = [];
|
||||
let diagnosisText = '';
|
||||
@@ -659,7 +536,6 @@ const print = async () => {
|
||||
const selectedPrintTemplate = getPrintTemplateByTemplateName(templateName);
|
||||
|
||||
// 打印数据
|
||||
>>>>>>> v1.3
|
||||
const printData = {
|
||||
// 模板信息
|
||||
templateName: currentSelectTemplate.value.name || '住院病历',
|
||||
@@ -683,30 +559,16 @@ const print = async () => {
|
||||
department: props.patientInfo.department || '',
|
||||
attendingDoctor: props.patientInfo.attendingDoctor || '',
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 诊断信息
|
||||
diagnosisList: JSON.stringify(diagnosisList),
|
||||
diagnosisText: diagnosisText,
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 病历信息
|
||||
documentName: currentSelectTemplate.value.name || '住院病历',
|
||||
documentId: currentSelectTemplate.value.id || '',
|
||||
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
printTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 表单数据 - 需要将嵌套结构展开
|
||||
...flattenObject(formData),
|
||||
};
|
||||
|
||||
// 执行打印
|
||||
await simplePrint(PRINT_TEMPLATE.OUTPATIENT_MEDICAL_RECORD, printData);
|
||||
ElMessage.success('打印成功');
|
||||
} catch (error) {
|
||||
console.error('打印失败:', error);
|
||||
=======
|
||||
//病历号
|
||||
busNo: props.patientInfo.busNo || '',
|
||||
//费用类型
|
||||
@@ -733,7 +595,6 @@ const print = async () => {
|
||||
|
||||
ElMessage.success('打印成功');
|
||||
} catch (error) {
|
||||
>>>>>>> v1.3
|
||||
ElMessage.error('打印失败: ' + (error.message || '未知错误'));
|
||||
}
|
||||
};
|
||||
@@ -767,17 +628,6 @@ const templateEditSubmitOk = () => {
|
||||
historyRef.value?.queryList();
|
||||
templateRef.value?.queryList();
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
// onBeforeMount(() => {});
|
||||
// 刚进页面默认显示门诊病历
|
||||
const selectDefaultTemplate = () => {
|
||||
nextTick(() => {
|
||||
// 查找门诊病历(1.0.0)节点
|
||||
const findTemplate = (nodes) => {
|
||||
for (const node of nodes) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findTemplate(node.children);
|
||||
=======
|
||||
|
||||
// 选择默认模板 - 获取门诊病历分类下的第一个模板
|
||||
const selectDefaultTemplate = () => {
|
||||
@@ -805,41 +655,14 @@ const selectDefaultTemplate = () => {
|
||||
// 递归查找子节点
|
||||
if (node.children && node.children.length > 0) {
|
||||
const found = findOutpatientRecordCategoryAndFirstTemplate(node.children);
|
||||
>>>>>>> v1.3
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
// 根据ID查找门诊病历模板
|
||||
if (node.document && node.document.id === '1963474077201162242') {
|
||||
return node;
|
||||
}
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
const defaultTemplate = findTemplate(templateData.value);
|
||||
if (defaultTemplate) {
|
||||
// 模拟点击节点
|
||||
const mockNode = {
|
||||
isLeaf: true,
|
||||
};
|
||||
handleNodeClick(defaultTemplate, mockNode);
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(async () => {
|
||||
console.log('hospitalizationEmr mounted', userStore);
|
||||
await queryTemplateTree();
|
||||
selectDefaultTemplate();
|
||||
});
|
||||
|
||||
defineExpose({ state });
|
||||
=======
|
||||
const defaultTemplate = findOutpatientRecordCategoryAndFirstTemplate(templateData.value);
|
||||
if (defaultTemplate) {
|
||||
nextTick(() => {
|
||||
@@ -899,7 +722,6 @@ onMounted(async () => {
|
||||
});
|
||||
|
||||
// defineExpose({ state }); // state未使用
|
||||
>>>>>>> v1.3
|
||||
|
||||
const disNode = () => {
|
||||
leftShow.value = !leftShow.value;
|
||||
@@ -1013,14 +835,6 @@ const disNode_R = () => {
|
||||
}
|
||||
|
||||
.operate-main {
|
||||
<<<<<<< HEAD
|
||||
height: calc(100vh - 150px);
|
||||
flex: auto;
|
||||
}
|
||||
.operate-main .template-tree-scrollbar {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
=======
|
||||
flex: 1;
|
||||
min-height: 0; /* 允许flex子项高度收缩 */
|
||||
display: flex;
|
||||
@@ -1044,7 +858,6 @@ const disNode_R = () => {
|
||||
.operate-main .template-tree-scrollbar > * {
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1066,13 +879,10 @@ const disNode_R = () => {
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/* 加载状态样式 */
|
||||
.loading-container {
|
||||
min-height: 400px;
|
||||
position: relative;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</style>
|
||||
|
||||
@@ -19,11 +19,7 @@
|
||||
<span>{{ item.prescriptionNo }}</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<<<<<<< HEAD
|
||||
<h2>长春大学医院</h2>
|
||||
=======
|
||||
<h2>长春市朝阳区中医院医院</h2>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,17 +59,6 @@
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="单位" align="center" prop="unitCode_dictText" />
|
||||
<el-table-column label="收款金额" align="center" prop="totalPrice" />
|
||||
<<<<<<< HEAD
|
||||
<el-table-column label="发放状态" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.dispenseStatus != 0" type="danger">
|
||||
{{ scope.row.dispenseStatus_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="default">{{ scope.row.serviceStatus_enumText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
<el-table-column label="支付状态" align="center" prop="refundStatus_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
<div
|
||||
class="prescription-section"
|
||||
v-for="(prescription, pIndex) in tcmPrescriptionList"
|
||||
<<<<<<< HEAD
|
||||
:key="pIndex"
|
||||
=======
|
||||
:key="prescription.id"
|
||||
>>>>>>> v1.3
|
||||
>
|
||||
<div class="section-header">
|
||||
<div class="title first-prescription">
|
||||
@@ -22,20 +18,6 @@
|
||||
<plus />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
<<<<<<< HEAD
|
||||
class="delete-icon"
|
||||
title="删除处方单"
|
||||
@click="handleDeletePrescriptionClick(pIndex)"
|
||||
:class="{ 'disabled-icon': isPrescriptionDeletable(pIndex) !== true }"
|
||||
style="font-size: 20px !important; margin-left: 10px; color: #f56c6c"
|
||||
>
|
||||
<minus />
|
||||
</el-icon>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<span class="summary-item">药品数: {{ getPrescriptionMedicineCount(pIndex) }}种</span>
|
||||
<span class="summary-item">总价: ¥ {{ getPrescriptionTotalPrice(pIndex) }}</span>
|
||||
=======
|
||||
class="add-icon"
|
||||
title="删除处方"
|
||||
@click="deletePrescription(prescription)"
|
||||
@@ -50,7 +32,6 @@
|
||||
{{ prescription.prescriptionList ? prescription.prescriptionList.length : '0' }}种
|
||||
</span>
|
||||
<span class="summary-item">总价: ¥ {{ calculatePrescriptionTotal(pIndex) }}</span>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -93,15 +74,8 @@
|
||||
:value="item.accountId"
|
||||
/>
|
||||
</el-select>
|
||||
<<<<<<< HEAD
|
||||
<span class="doctor-station"> 配方名称: </span>
|
||||
<el-input v-model="formulaName" placeholder=" " style="width: 100px" />
|
||||
<span class="doctor-station"> 用药途径: </span>
|
||||
<el-select v-model="methodCode" placeholder="费用性质" style="width: 120px">
|
||||
=======
|
||||
<span class="doctor-station"> 用法: </span>
|
||||
<el-select v-model="prescription.methodCode" placeholder="用法" style="width: 120px">
|
||||
>>>>>>> v1.3
|
||||
<el-option
|
||||
v-for="dict in method_code"
|
||||
:key="dict.value"
|
||||
@@ -271,23 +245,6 @@
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
<<<<<<< HEAD
|
||||
<span class="doctor-station"> 脚注: </span>
|
||||
<el-select
|
||||
v-model="footNote"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
style="width: 120px; margin-right: 20px"
|
||||
placeholder="">
|
||||
<el-option
|
||||
v-for="dict in hjerbal_footnotes"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
=======
|
||||
<!-- 单次剂量 -->
|
||||
<el-form-item
|
||||
label="特殊煎法:"
|
||||
@@ -305,7 +262,6 @@
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
<span class="total-amount">
|
||||
总金额:{{
|
||||
@@ -474,13 +430,9 @@ import { calculateQuantityByDays, formatNumber } from '@/utils/his';
|
||||
import Decimal from 'decimal.js';
|
||||
import tcmdiagnosisDialog from './tcmdiagnosisDialog';
|
||||
import { Delete, Minus } from '@element-plus/icons-vue';
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
import { ElMessage } from 'element-plus';
|
||||
import printUtils, { PRINT_TEMPLATE } from '@/utils/printUtils';
|
||||
import { advicePrint } from '@/api/public';
|
||||
>>>>>>> v1.3
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
@@ -494,10 +446,6 @@ const encounterId = ref('');
|
||||
const accountId = ref('');
|
||||
const encounterDiagnosisId = ref('');
|
||||
|
||||
<<<<<<< HEAD
|
||||
const tcmPrescriptionList = ref([
|
||||
{
|
||||
=======
|
||||
let prescriptionIdCounter = 1;
|
||||
const generatePrescriptionId = () => {
|
||||
return `prescription_${Date.now()}_${prescriptionIdCounter++}`;
|
||||
@@ -506,7 +454,6 @@ const generatePrescriptionId = () => {
|
||||
const tcmPrescriptionList = ref([
|
||||
{
|
||||
id: generatePrescriptionId(),
|
||||
>>>>>>> v1.3
|
||||
prescriptionList: [],
|
||||
conditionDefinitionId: '',
|
||||
accountId: '',
|
||||
@@ -526,35 +473,9 @@ const tcmPrescriptionList = ref([
|
||||
const unitCodeList = ref([]);
|
||||
const adviceTableRef = ref([]);
|
||||
const organization = ref([]);
|
||||
<<<<<<< HEAD
|
||||
const conditionDefinitionId = ref('');
|
||||
const diagnosisName = ref('');
|
||||
const diagnosisInfo = ref({});
|
||||
const rateCode = ref('');
|
||||
const footNote = ref('');
|
||||
const decoctionMethod = ref('');
|
||||
const chineseHerbsDoseQuantity = ref('');
|
||||
const dispensePerDuration = ref('');
|
||||
const formulaName = ref('');
|
||||
const sufferingFlag = ref(false);
|
||||
const methodCode = ref('');
|
||||
const loading = ref(false);
|
||||
const rowRules = ref({
|
||||
conditionDefinitionId: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
minUnitQuantity: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
doseQuantity: [{ required: true, message: '请输入单次剂量单位', trigger: 'change' }],
|
||||
quantity: [{ required: true, message: '请输入数量', trigger: 'change' }],
|
||||
dispensePerDuration: [{ required: true, message: '请输入用药天数', trigger: 'change' }],
|
||||
formulaName: [{ required: true, message: '请输入配方名称', trigger: 'change' }],
|
||||
executeNum: [{ required: true, message: '请输入执行次数', trigger: 'change' }],
|
||||
rateCode: [{ required: true, message: '请选择频次', trigger: 'change' }],
|
||||
methodCode: [{ required: true, message: '请选择给药途径', trigger: 'change' }],
|
||||
orgId: [{ required: true, message: '请选择执行科室', trigger: 'change' }],
|
||||
=======
|
||||
const loading = ref(false);
|
||||
const rowRules = ref({
|
||||
minUnitQuantity: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
const unitMap = ref({
|
||||
dose: 'dose',
|
||||
@@ -584,39 +505,6 @@ const inputRefs = ref({}); // 存储输入框实例
|
||||
const requiredProps = ref([]); // 存储必填项 prop 顺序
|
||||
const totalAmount = ref(0);
|
||||
const tcmDianosis = ref();
|
||||
<<<<<<< HEAD
|
||||
const { method_code, unit_code, rate_code, method_of_decocting_medicine,hjerbal_footnotes,distribution_category_code } = proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'method_of_decocting_medicine',
|
||||
'hjerbal_footnotes',
|
||||
'distribution_category_code'
|
||||
);
|
||||
|
||||
const adviceTypeList = ref([
|
||||
{
|
||||
label: '西药',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '中成药',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '耗材',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: '诊疗',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
label: '全部',
|
||||
value: '',
|
||||
},
|
||||
]);
|
||||
=======
|
||||
const { method_code, unit_code, rate_code, distribution_category_code, dosage_instruction } =
|
||||
proxy.useDict(
|
||||
'method_code',
|
||||
@@ -626,7 +514,6 @@ const { method_code, unit_code, rate_code, distribution_category_code, dosage_in
|
||||
'dosage_instruction'
|
||||
);
|
||||
|
||||
>>>>>>> v1.3
|
||||
onMounted(() => {
|
||||
document.addEventListener('keydown', escKeyListener);
|
||||
});
|
||||
@@ -652,64 +539,6 @@ function getList() {
|
||||
});
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
function getListInfo(addNewRow) {
|
||||
// 确保isAdding变量存在
|
||||
if (typeof isAdding !== 'undefined') {
|
||||
isAdding.value = false;
|
||||
}
|
||||
|
||||
// 确保有患者信息
|
||||
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||
console.error('患者信息不完整');
|
||||
return;
|
||||
}
|
||||
|
||||
getTcmAdviceList({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res && res.data && Array.isArray(res.data)) {
|
||||
// 处理返回的数据
|
||||
if (res.data.length > 0) {
|
||||
// 如果有数据,清空当前列表并重新添加
|
||||
tcmPrescriptionList.value = [];
|
||||
|
||||
res.data.forEach((item) => {
|
||||
try {
|
||||
// 解析contentJson获取完整的医嘱数据
|
||||
const contentData = item.contentJson ? JSON.parse(item.contentJson) : {};
|
||||
|
||||
// 创建一个新的处方对象
|
||||
const newPrescription = {
|
||||
...item,
|
||||
...contentData,
|
||||
// 确保关键显示字段存在
|
||||
adviceName: contentData.adviceName || item.adviceName || '',
|
||||
quantity: contentData.quantity || item.quantity || '',
|
||||
totalPrice: contentData.totalPrice || item.totalPrice || '',
|
||||
diagnosisName: contentData.diagnosisName || item.diagnosisName || '',
|
||||
positionName: contentData.positionName || item.positionName || '',
|
||||
doseUnitCode_dictText: contentData.doseUnitCode_dictText || item.doseUnitCode_dictText || '',
|
||||
chineseHerbsDoseQuantity: contentData.chineseHerbsDoseQuantity || item.chineseHerbsDoseQuantity || '',
|
||||
prescriptionList: [contentData]
|
||||
};
|
||||
|
||||
// 添加到处方列表
|
||||
tcmPrescriptionList.value.push(newPrescription);
|
||||
} catch (error) {
|
||||
console.error('解析医嘱数据失败:', error, '数据项:', item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 重新计算总金额
|
||||
handleTotalAmount();
|
||||
|
||||
if (props.activeTab == 'prescription' && addNewRow) {
|
||||
handleAddMedicine();
|
||||
}
|
||||
} else {
|
||||
console.error('获取医嘱列表失败或数据格式错误:', res);
|
||||
// 保持当前列表不变,不要清空
|
||||
=======
|
||||
async function getListInfo(addNewRow) {
|
||||
// 重置所有处方的添加状态
|
||||
tcmPrescriptionList.value.forEach((prescription) => {
|
||||
@@ -785,28 +614,14 @@ async function getListInfo(addNewRow) {
|
||||
tcmPrescriptionList.value.accountId = contractList.value[0].accountId;
|
||||
if (props.activeTab == 'prescription' && addNewRow) {
|
||||
handleAddMedicine(0);
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取医嘱列表异常:', error);
|
||||
// 保持当前列表不变,不要清空
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
|
||||
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);
|
||||
|
||||
getContract({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
contractList.value = res?.data || [];
|
||||
}).catch(error => {
|
||||
console.error('获取合同信息失败:', error);
|
||||
});
|
||||
|
||||
accountId.value = props.patientInfo.accountId || '';
|
||||
=======
|
||||
|
||||
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);
|
||||
accountId.value = props.patientInfo.accountId;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
function getDiagnosisInfo() {
|
||||
@@ -822,11 +637,7 @@ function getDiagnosisInfo() {
|
||||
});
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
// 默认选择第一个诊断
|
||||
=======
|
||||
// 默认选择第一个诊断
|
||||
>>>>>>> v1.3
|
||||
if (diagnosisList.value.length > 0) {
|
||||
const firstDiagnosis = diagnosisList.value[0];
|
||||
tcmPrescriptionList.value.forEach((prescription) => {
|
||||
@@ -1156,18 +967,8 @@ function handleDelete(pIndex) {
|
||||
prescription.expandOrder = [];
|
||||
prescription.isAdding = false;
|
||||
adviceQueryParams.value.adviceType = undefined;
|
||||
<<<<<<< HEAD
|
||||
// 删除行会出现组号混乱的情况,所以这里重新更新标记
|
||||
const allPrescriptions = tcmPrescriptionList.value.flatMap(p => p.prescriptionList);
|
||||
groupMarkers.value = getGroupMarkers(allPrescriptions);
|
||||
}
|
||||
|
||||
|
||||
|
||||
=======
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
function handleNumberClick(item, index, pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
prescription.prescriptionList[index].unitPrice = item.price;
|
||||
@@ -1247,117 +1048,6 @@ function handleSave(pIndex) {
|
||||
}
|
||||
|
||||
// 单行处方保存
|
||||
<<<<<<< HEAD
|
||||
function handleSaveSign(row, index) {
|
||||
try {
|
||||
// 直接执行保存逻辑,不再进行表单验证
|
||||
row.isEdit = false;
|
||||
isAdding.value = false;
|
||||
expandOrder.value = [];
|
||||
|
||||
// 确保必要的字段有值
|
||||
if (props.patientInfo) {
|
||||
row.patientId = props.patientInfo.patientId;
|
||||
row.encounterId = props.patientInfo.encounterId;
|
||||
}
|
||||
|
||||
row.accountId = accountId.value || '';
|
||||
row.quantity = row.minUnitQuantity || 1; // 确保数量有值
|
||||
row.conditionId = conditionId.value || '';
|
||||
row.conditionDefinitionId = conditionDefinitionId.value || '';
|
||||
row.encounterDiagnosisId = encounterDiagnosisId.value || '';
|
||||
row.diagnosisName = diagnosisName.value || '';
|
||||
|
||||
// 计算单价
|
||||
if (row.unitCodeList && row.unitCode) {
|
||||
const unitItem = row.unitCodeList.find((item) => item.value === row.unitCode);
|
||||
if (unitItem?.type !== 'unit' && row.unitPrice) {
|
||||
row.unitPrice = new Decimal(row.unitPrice).div(row.partPercent || 1).toFixed(2);
|
||||
}
|
||||
}
|
||||
|
||||
// 计算总金额
|
||||
if (row.minUnitQuantity && row.unitPrice) {
|
||||
row.totalPrice = new Decimal(row.minUnitQuantity).mul(row.unitPrice).toFixed(2);
|
||||
}
|
||||
|
||||
// 确保显示所需的字段都有值
|
||||
row.adviceName = row.adviceName || '未命名药品';
|
||||
row.positionName = row.positionName || '默认药房';
|
||||
|
||||
// 创建要保存的数据对象,避免循环引用
|
||||
const saveData = {
|
||||
...row,
|
||||
// 排除可能导致循环引用的复杂对象
|
||||
unitCodeList: undefined,
|
||||
stockList: undefined,
|
||||
contentJson: undefined
|
||||
};
|
||||
|
||||
// 序列化数据用于存储
|
||||
saveData.contentJson = JSON.stringify(saveData);
|
||||
|
||||
// 只保存当前行的数据,而不是整个列表
|
||||
savePrescription({ adviceSaveList: [saveData] }).then((res) => {
|
||||
if (res && res.code === 200) {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
// 此处错误调用getListInfo,导致医嘱信息被覆盖,从而不显示。
|
||||
// getListInfo(true);
|
||||
nextId.value = 1;
|
||||
} else {
|
||||
proxy.$modal.msgError('保存失败,请重试');
|
||||
console.error('保存失败响应:', res);
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('保存处方失败:', error);
|
||||
proxy.$modal.msgError('保存失败,请检查网络或联系管理员');
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('处理保存时出错:', error);
|
||||
proxy.$modal.msgError('操作异常,请重试');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function handleSaveBatch() {
|
||||
// 收集所有需要保存的处方项目
|
||||
let saveList = [];
|
||||
|
||||
// 遍历所有处方
|
||||
for (const prescription of tcmPrescriptionList.value) {
|
||||
if (prescription.prescriptionList) {
|
||||
// 检查处方是否有必填的付数
|
||||
if (!prescription.chineseHerbsDoseQuantity || prescription.chineseHerbsDoseQuantity == 0) {
|
||||
proxy.$modal.msgWarning('请输入付数');
|
||||
return;
|
||||
}
|
||||
|
||||
// 收集该处方下需要保存的项目
|
||||
const itemsToSave = prescription.prescriptionList
|
||||
.filter((item) => item.statusEnum == 1)
|
||||
.map((item, index) => {
|
||||
return {
|
||||
...item,
|
||||
accountId: accountId.value,
|
||||
conditionId: prescription.conditionId,
|
||||
encounterDiagnosisId: prescription.encounterDiagnosisId,
|
||||
conditionDefinitionId: prescription.conditionDefinitionId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
patientId: props.patientInfo.patientId,
|
||||
requestId: item.requestId,
|
||||
groupId: item.groupId ? item.groupId : timestamp.toString(),
|
||||
chineseHerbsDoseQuantity: prescription.chineseHerbsDoseQuantity,
|
||||
dbOpType: item.requestId ? '2' : '1',
|
||||
};
|
||||
});
|
||||
|
||||
// 将项目添加到保存列表
|
||||
saveList = saveList.concat(itemsToSave);
|
||||
}
|
||||
}
|
||||
|
||||
// 检查是否有可保存的项目
|
||||
=======
|
||||
function handleSaveSign(row, index, pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const formRefName = 'formRef' + pIndex + '-' + index;
|
||||
@@ -1408,15 +1098,10 @@ function handleSaveBatch(pIndex) {
|
||||
dbOpType: item.requestId ? '2' : '1',
|
||||
};
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
if (saveList.length == 0) {
|
||||
proxy.$modal.msgWarning('当前没有可保存医嘱');
|
||||
return;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
// 保存处方
|
||||
=======
|
||||
if (
|
||||
prescription.chineseHerbsDoseQuantity == undefined ||
|
||||
prescription.chineseHerbsDoseQuantity == 0
|
||||
@@ -1424,22 +1109,11 @@ function handleSaveBatch(pIndex) {
|
||||
proxy.$modal.msgWarning('请输入付数');
|
||||
return;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
saveTcmAdvice({ adviceSaveList: saveList }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getListInfo(true);
|
||||
<<<<<<< HEAD
|
||||
|
||||
// 重置所有处方的nextId
|
||||
tcmPrescriptionList.value.forEach(prescription => {
|
||||
if (prescription.nextId) {
|
||||
prescription.nextId = 1;
|
||||
}
|
||||
});
|
||||
=======
|
||||
prescription.nextId = 1;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1607,21 +1281,6 @@ function validateGroups(saveList) {
|
||||
return true;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=======
|
||||
async function handlePrint(pIndex) {
|
||||
const prescription = tcmPrescriptionList.value[pIndex];
|
||||
const selectedRows = prescription.prescriptionList.filter((item) => item.check);
|
||||
@@ -1683,7 +1342,6 @@ async function handlePrint(pIndex) {
|
||||
ElMessage.error('中药处方打印失败: ' + error.message);
|
||||
}
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
</script>
|
||||
|
||||
@@ -1799,29 +1457,4 @@ defineExpose({ getListInfo, getDiagnosisInfo });
|
||||
.add-icon:hover {
|
||||
background-color: #ecf5ff;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
.delete-icon {
|
||||
cursor: pointer;
|
||||
border-radius: 50%;
|
||||
padding: 4px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.delete-icon:hover {
|
||||
background-color: #fef0f0;
|
||||
}
|
||||
|
||||
.delete-icon.disabled-icon {
|
||||
cursor: not-allowed;
|
||||
color: #c0c4cc !important;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.delete-icon.disabled-icon:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
=======
|
||||
</style>
|
||||
>>>>>>> v1.3
|
||||
|
||||
Reference in New Issue
Block a user