```
docs(release-notes): 添加住院护士站划价功能说明和发版记录 - 新增住院护士站划价服务流程说明文档,详细描述了从参数预处理到结果响应的五大阶段流程 - 包含耗材类医嘱和诊疗活动类医嘱的差异化处理逻辑 - 添加完整的发版内容记录,涵盖新增菜单功能和各模块优化点 - 记录了住院相关功能的新增和门诊业务流程的修复 ```
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
ref="registerRef"
|
||||
label-width="80px"
|
||||
:rules="rules"
|
||||
:disabled="props.isRegistered"
|
||||
>
|
||||
<el-row :gutter="8">
|
||||
<el-col :span="6">
|
||||
@@ -28,6 +29,7 @@
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="submitForm.inHospitalOrgId"
|
||||
:disabled="props.isRegistered"
|
||||
filterable
|
||||
:data="organization"
|
||||
:props="{
|
||||
@@ -47,7 +49,11 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院病区" prop="wardLocationId">
|
||||
<el-select :disabled="props.alreadyEdit" v-model="submitForm.wardLocationId">
|
||||
<el-select
|
||||
:disabled="props.isRegistered || !submitForm.inHospitalOrgId"
|
||||
v-model="submitForm.wardLocationId"
|
||||
placeholder="请先选择入院科室"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in wardListOptions"
|
||||
:key="item.id"
|
||||
@@ -74,6 +80,7 @@
|
||||
<el-form-item label="诊断类别" prop="medTypeCode">
|
||||
<el-select
|
||||
v-model="submitForm.medTypeCode"
|
||||
:disabled="props.isRegistered"
|
||||
placeholder="诊断类别"
|
||||
clearable
|
||||
filterable
|
||||
@@ -101,6 +108,7 @@
|
||||
<el-form-item label="入院诊断" prop="diagnosisDefinitionId">
|
||||
<el-select
|
||||
v-model="submitForm.diagnosisDefinitionId"
|
||||
:disabled="props.isRegistered"
|
||||
placeholder="入院诊断"
|
||||
clearable
|
||||
filterable
|
||||
@@ -124,11 +132,11 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="患者病情">
|
||||
<el-select v-model="submitForm.priorityEnum">
|
||||
<el-select v-model="submitForm.priorityEnum" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in props.initOptions.priorityEnumList"
|
||||
v-for="item in props.initOptions.priorityLevelOptionOptions"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
@@ -136,7 +144,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院类型" prop="admitSourceCode">
|
||||
<el-select v-model="submitForm.admitSourceCode">
|
||||
<el-select v-model="submitForm.admitSourceCode" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in admit_source_code"
|
||||
:key="item.value"
|
||||
@@ -148,7 +156,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入院方式" prop="inWayCode">
|
||||
<el-select v-model="submitForm.inWayCode">
|
||||
<el-select v-model="submitForm.inWayCode" :disabled="props.isRegistered">
|
||||
<el-option
|
||||
v-for="item in in_way_code"
|
||||
:key="item.value"
|
||||
@@ -164,6 +172,7 @@
|
||||
v-model="submitForm.contractNo"
|
||||
placeholder="费用性质"
|
||||
clearable
|
||||
:disabled="props.isRegistered"
|
||||
@change="getValue"
|
||||
>
|
||||
<el-option
|
||||
@@ -179,6 +188,7 @@
|
||||
<el-form-item label="入院日期" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="submitForm.startTime"
|
||||
:disabled="props.isRegistered"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="date"
|
||||
placeholder="请选择日期"
|
||||
@@ -198,6 +208,7 @@ import {
|
||||
getBedInfo,
|
||||
getContractList,
|
||||
getDiagnosisDefinitionList,
|
||||
getProvincesAndCities,
|
||||
} from './api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { in_way_code, admit_source_code, med_type } = proxy.useDict(
|
||||
@@ -224,7 +235,7 @@ const props = defineProps({
|
||||
require: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
alreadyEdit: {
|
||||
isRegistered: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
@@ -239,6 +250,7 @@ const wardListOptions = ref([]);
|
||||
const contractList = ref([]);
|
||||
const verificationStatusOptions = ref([]);
|
||||
const diagnosisDefinitionList = ref([]);
|
||||
const wardLoading = ref(false);
|
||||
const rules = reactive({
|
||||
inHospitalOrgId: [
|
||||
{
|
||||
@@ -268,15 +280,52 @@ const rules = reactive({
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
diagnosisDesc: [
|
||||
{
|
||||
required: true,
|
||||
message: '诊断描述未填写',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
// diagnosisDesc: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: '诊断描述未填写',
|
||||
// trigger: ['blur', 'change'],
|
||||
// },
|
||||
// ],
|
||||
});
|
||||
|
||||
//获取省市医保字符串
|
||||
const medicalInsuranceTitle = ref('');
|
||||
|
||||
// 暴露给父组件使用
|
||||
// defineExpose({
|
||||
// medicalInsuranceTitle,
|
||||
// });
|
||||
const getProvincesAndCitiesInfo = async () => {
|
||||
try {
|
||||
if (inHospitalInfo.encounterId) {
|
||||
const res = await getProvincesAndCities(props.inHospitalInfo.encounterId);
|
||||
// console.log('获取省市医保字符串', res);
|
||||
if (res && res.code == 200) {
|
||||
// 确保有数据时才更新
|
||||
medicalInsuranceTitle.value = res.data?.insutype || res.data || '';
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// 静默处理错误,确保页面不会显示错误信息
|
||||
console.error('获取医保省市信息失败:', error);
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
getProvincesAndCitiesInfo();
|
||||
});
|
||||
|
||||
// 监听inHospitalInfo.encounterId的变化,在弹窗打开时重新调用接口
|
||||
watch(
|
||||
() => props.inHospitalInfo.encounterId,
|
||||
(newEncounterId) => {
|
||||
if (newEncounterId) {
|
||||
getProvincesAndCitiesInfo();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
/* 提交表单 */
|
||||
const submitForm = reactive({
|
||||
inHospitalOrgId: props.inHospitalInfo.inHospitalOrgId,
|
||||
@@ -289,25 +338,50 @@ const submitForm = reactive({
|
||||
ambDiagnosisName: props.inHospitalInfo.ambDiagnosisName,
|
||||
medTypeCode: '21',
|
||||
});
|
||||
/* 科室 病区 */
|
||||
// /* 科室 病区 */
|
||||
// watch(
|
||||
// () => submitForm.inDocterWorkGroupCode,
|
||||
// (newValue) => {
|
||||
// if (newValue) {
|
||||
// if (newValue == '') {
|
||||
// submitForm.wardLocationId = '';
|
||||
// }
|
||||
// } else {
|
||||
// submitForm.wardLocationId = '';
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
// watch(
|
||||
// () => submitForm.inNurseDeptCode,
|
||||
// (newValue) => {
|
||||
// if (newValue) {
|
||||
// getBedInfo(newValue);
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
watch(
|
||||
() => submitForm.inDocterWorkGroupCode,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
if (newValue == '') {
|
||||
submitForm.wardLocationId = '';
|
||||
() => submitForm.wardLocationId,
|
||||
(newWardId) => {
|
||||
if (newWardId && wardListOptions.value.length > 0) {
|
||||
const selectedWard = wardListOptions.value.find((item) => item.id === newWardId);
|
||||
if (selectedWard) {
|
||||
handleWardClick(selectedWard);
|
||||
}
|
||||
} else {
|
||||
submitForm.wardLocationId = '';
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => submitForm.inNurseDeptCode,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
getBedInfo(newValue);
|
||||
() => props.isRegistered,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
// 已登记状态可以做一些数据锁定操作
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -315,25 +389,51 @@ watch(
|
||||
onMounted(() => {
|
||||
getInitOptions();
|
||||
setValue();
|
||||
setDefaultAdmitSource();
|
||||
if (submitForm.inHospitalOrgId) {
|
||||
handleNodeClick({ id: submitForm.inHospitalOrgId });
|
||||
}
|
||||
});
|
||||
|
||||
const setDefaultAdmitSource = () => {
|
||||
if (props.noFile) return;
|
||||
const defaultItem = admit_source_code.value.find((item) => item.value === '1');
|
||||
if (defaultItem) {
|
||||
submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode || defaultItem.value;
|
||||
}
|
||||
};
|
||||
function handleWardClick(item) {
|
||||
submitForm.wardBusNo = item.busNo;
|
||||
getBedInfo(submitForm.wardBusNo).then((res) => {
|
||||
submitForm.totalBedsNum = res.data.totalBedsNum;
|
||||
submitForm.idleBedsNum = res.data.idleBedsNum;
|
||||
});
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
getBedInfo(submitForm.wardBusNo)
|
||||
.then((res) => {
|
||||
if (res.data) {
|
||||
submitForm.totalBedsNum = res.data.totalBedsNum;
|
||||
submitForm.idleBedsNum = res.data.idleBedsNum;
|
||||
} else {
|
||||
submitForm.totalBedsNum = 0;
|
||||
submitForm.idleBedsNum = 0;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('查询病床失败:', err);
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
});
|
||||
}
|
||||
|
||||
function getInitOptions() {
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
// organization.value = res.data.records
|
||||
organization.value = res.data.records[0].children.filter(
|
||||
(record) => record.typeEnum === 2 && record.classEnum === 2
|
||||
);
|
||||
});
|
||||
if (!props.noFile) {
|
||||
wardList().then((res) => {
|
||||
wardListOptions.value = res.data;
|
||||
});
|
||||
}
|
||||
// if (!props.noFile) {
|
||||
// wardList().then((res) => {
|
||||
// wardListOptions.value = res.data;
|
||||
// });
|
||||
// }
|
||||
diagnosisInit().then((res) => {
|
||||
verificationStatusOptions.value = res.data.verificationStatusOptions;
|
||||
});
|
||||
@@ -350,15 +450,40 @@ function getDiagnosisInfo(value) {
|
||||
}
|
||||
|
||||
function handleNodeClick(orgInfo) {
|
||||
wardList({ orgId: orgInfo.id }).then((res) => {
|
||||
wardListOptions.value = res.data;
|
||||
});
|
||||
submitForm.wardLocationId = undefined; // 切换科室时,先清空原有病区
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
wardListOptions.value = []; // 先清空列表,避免旧数据残留
|
||||
wardLoading.value = true;
|
||||
wardList({ orgId: orgInfo.id })
|
||||
.then((res) => {
|
||||
wardListOptions.value = res.data || [];
|
||||
if (wardListOptions.value.length > 0 && !props.inHospitalInfo.wardLocationId) {
|
||||
submitForm.wardLocationId = wardListOptions.value[0].id;
|
||||
const defaultWard = wardListOptions.value.find(
|
||||
(item) => item.id === submitForm.wardLocationId
|
||||
);
|
||||
if (defaultWard) {
|
||||
handleWardClick(defaultWard);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('加载病区失败:', err);
|
||||
wardListOptions.value = [];
|
||||
})
|
||||
.finally(() => {
|
||||
wardLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handleChange(value) {
|
||||
if (!value) {
|
||||
wardListOptions.value = [];
|
||||
submitForm.wardLocationId = undefined;
|
||||
submitForm.totalBedsNum = undefined;
|
||||
submitForm.idleBedsNum = undefined;
|
||||
wardLoading.value = false; // 同步停止加载
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,7 +510,7 @@ function setValue() {
|
||||
submitForm.ambDiagnosisName = props.inHospitalInfo?.ambDiagnosisName;
|
||||
submitForm.priorityEnum = props.inHospitalInfo?.priorityEnum;
|
||||
submitForm.priorityEnum_enumText = props.inHospitalInfo?.priorityEnum_enumText;
|
||||
submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode;
|
||||
// submitForm.admitSourceCode = props.inHospitalInfo?.admitSourceCode;
|
||||
submitForm.admitSourceCode_dictText = props.inHospitalInfo?.admitSourceCode_dictText;
|
||||
submitForm.inWayCode = props.inHospitalInfo?.inWayCode;
|
||||
submitForm.inWayCode_dictText = props.inHospitalInfo?.inWayCode_dictText;
|
||||
@@ -406,10 +531,13 @@ const validateData = async (callback) => {
|
||||
};
|
||||
|
||||
const init = () => {
|
||||
submitForm.inDocterWorkGroupCode = '';
|
||||
submitForm.wardLocationId = '';
|
||||
if (!props.isRegistered) {
|
||||
// 只有待登记状态才重置
|
||||
submitForm.inDocterWorkGroupCode = '';
|
||||
submitForm.wardLocationId = '';
|
||||
}
|
||||
};
|
||||
defineExpose({ validateData, submitForm, init });
|
||||
defineExpose({ validateData, submitForm, init, medicalInsuranceTitle });
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.registerForm-container {
|
||||
|
||||
Reference in New Issue
Block a user