医保码:将医保码修改成诊断代码。
在诊断名称后增加两个字段诊断医生和诊断时间,诊断医生为默认开立诊断的医生,诊断时间为默认开立诊断的当前时间。
This commit is contained in:
@@ -162,10 +162,17 @@ function removeDiagnosis(row, index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
|
// 为每个诊断项添加诊断医生和诊断时间
|
||||||
|
const diagnosisChildList = tcmDiagonsisSaveList.value.map(item => ({
|
||||||
|
...item,
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || '',
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
|
}));
|
||||||
|
|
||||||
saveTcmDiagnosis({
|
saveTcmDiagnosis({
|
||||||
patientId: props.patientInfo.patientId,
|
patientId: props.patientInfo.patientId,
|
||||||
encounterId: props.patientInfo.encounterId,
|
encounterId: props.patientInfo.encounterId,
|
||||||
diagnosisChildList: tcmDiagonsisSaveList.value,
|
diagnosisChildList: diagnosisChildList,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
emit('close');
|
emit('close');
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<el-form :model="form" :rules="rules" ref="formRef">
|
<el-form :model="form" :rules="rules" ref="formRef">
|
||||||
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
|
<el-table ref="diagnosisTableRef" :data="form.diagnosisList" height="650">
|
||||||
<el-table-column label="序号" type="index" width="50" />
|
<el-table-column label="序号" type="index" width="50" />
|
||||||
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="180">
|
<el-table-column label="诊断排序" align="center" prop="diagSrtNo" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
:prop="`diagnosisList.${scope.$index}.diagSrtNo`"
|
||||||
@@ -135,7 +135,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="医保码" align="center" prop="ybNo" width="180" />
|
|
||||||
|
<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">
|
<el-table-column label="诊断类型" align="center" prop="maindiseFlag">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
@@ -192,6 +195,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getCurrentInstance } from 'vue';
|
import { getCurrentInstance } from 'vue';
|
||||||
|
import useUserStore from '@/store/modules/user';
|
||||||
import {
|
import {
|
||||||
getConditionDefinitionInfo,
|
getConditionDefinitionInfo,
|
||||||
saveDiagnosis,
|
saveDiagnosis,
|
||||||
@@ -228,6 +232,7 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
const emits = defineEmits(['diagnosisSave']);
|
const emits = defineEmits(['diagnosisSave']);
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
const userStore = useUserStore();
|
||||||
const { med_type } = proxy.useDict('med_type');
|
const { med_type } = proxy.useDict('med_type');
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||||
@@ -244,27 +249,45 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function getDetail(encounterId) {
|
function getDetail(encounterId) {
|
||||||
|
if (!encounterId) {
|
||||||
|
console.warn('未提供有效的就诊ID,无法获取病历详情');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getEmrDetail(encounterId).then((res) => {
|
getEmrDetail(encounterId).then((res) => {
|
||||||
allowAdd.value = res.data ? true : false;
|
allowAdd.value = res.data ? true : false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
|
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||||
|
console.warn('患者就诊信息不完整,无法获取诊断数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
getEncounterDiagnosis(props.patientInfo.encounterId).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
form.value.diagnosisList = res.data;
|
// 为每个诊断项添加默认的诊断医生和时间(如果不存在)
|
||||||
|
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')
|
||||||
|
}));
|
||||||
emits('diagnosisSave', false);
|
emits('diagnosisSave', false);
|
||||||
console.log(form.value.diagnosisList);
|
console.log(form.value.diagnosisList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data.illness.length > 0) {
|
if (res.data.illness && res.data.illness.length > 0 && res.data.symptom) {
|
||||||
res.data.illness.forEach((item, index) => {
|
res.data.illness.forEach((item, index) => {
|
||||||
form.value.diagnosisList.push({
|
form.value.diagnosisList.push({
|
||||||
name: item.name + '-' + res.data.symptom[index].name,
|
name: item.name + '-' + (res.data.symptom[index]?.name || ''),
|
||||||
ybNo: item.ybNo,
|
ybNo: item.ybNo,
|
||||||
medTypeCode: item.medTypeCode,
|
medTypeCode: item.medTypeCode,
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -272,6 +295,7 @@ function getList() {
|
|||||||
console.log(form.value.diagnosisList);
|
console.log(form.value.diagnosisList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
getTree();
|
getTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,10 +309,15 @@ function init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleImport() {
|
function handleImport() {
|
||||||
|
if (!props.patientInfo || !props.patientInfo.encounterId) {
|
||||||
|
console.warn('患者就诊信息不完整,无法导入慢性病信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (props.patientInfo.contractName != '自费') {
|
if (props.patientInfo.contractName != '自费') {
|
||||||
// 获取患者慢性病信息
|
// 获取患者慢性病信息
|
||||||
getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
getChronicDisease({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||||
if (res.data.length > 0) {
|
if (res.data && res.data.length > 0) {
|
||||||
res.data.forEach((item, index) => {
|
res.data.forEach((item, index) => {
|
||||||
form.value.diagnosisList.push({
|
form.value.diagnosisList.push({
|
||||||
...item,
|
...item,
|
||||||
@@ -299,6 +328,8 @@ function handleImport() {
|
|||||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||||
iptDiseTypeCode: 2,
|
iptDiseTypeCode: 2,
|
||||||
diagnosisDesc: '',
|
diagnosisDesc: '',
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -342,7 +373,8 @@ const filterNode = (value, data) => {
|
|||||||
* 获取诊断树列表
|
* 获取诊断树列表
|
||||||
*/
|
*/
|
||||||
function getTree() {
|
function getTree() {
|
||||||
getConditionDefinitionInfo(props.patientInfo ? props.patientInfo.patientId : '').then((res) => {
|
const patientId = props.patientInfo?.patientId || '';
|
||||||
|
getConditionDefinitionInfo(patientId).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let list = [];
|
let list = [];
|
||||||
list = res.data.patientHistoryList;
|
list = res.data.patientHistoryList;
|
||||||
@@ -391,6 +423,8 @@ function handleAddDiagnosis() {
|
|||||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||||
iptDiseTypeCode: 2,
|
iptDiseTypeCode: 2,
|
||||||
diagnosisDesc: '',
|
diagnosisDesc: '',
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
});
|
});
|
||||||
if (form.value.diagnosisList.length == 1) {
|
if (form.value.diagnosisList.length == 1) {
|
||||||
form.value.diagnosisList[0].maindiseFlag = 1;
|
form.value.diagnosisList[0].maindiseFlag = 1;
|
||||||
@@ -537,6 +571,8 @@ function handleNodeClick(data) {
|
|||||||
medTypeCode: '11',
|
medTypeCode: '11',
|
||||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||||
definitionId: data.definitionId,
|
definitionId: data.definitionId,
|
||||||
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
|
diagnosisTime: new Date().toLocaleString('zh-CN')
|
||||||
});
|
});
|
||||||
if (form.value.diagnosisList.length == 1) {
|
if (form.value.diagnosisList.length == 1) {
|
||||||
form.value.diagnosisList[0].maindiseFlag = 1;
|
form.value.diagnosisList[0].maindiseFlag = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user