门诊挂号 save接口 ,收费服务管理页面名称为服务类型 + 分类 + 专业 up by dh

This commit is contained in:
duhe
2025-03-10 13:10:00 +08:00
parent 1a95e279c9
commit e2d17ce60c
3 changed files with 212 additions and 30 deletions

View File

@@ -657,6 +657,12 @@ function submitForm() {
{ required: true, message: "描述不能为空", trigger: "blur" },
];
}
// const nameData = name || chargeName;
// 服务名称
form.value.name = getName();
// 收费名称
form.value.chargeName = getName();
proxy.$refs["registrationfeeRef"].validate((valid) => {
if (valid) {
if (form.value.id != undefined) {
@@ -685,6 +691,39 @@ function submitForm() {
});
}
// 获取完整地址字符串
function getName() {
console.log(service_type_code.value, "service_type_code.value");
// 服务类型
const serviceTypeText = proxy.selectDictLabel(service_type_code.value, form.value.fwTypeCode);
// 服务分类
const categoryCodeText = proxy.selectDictLabel(category_code.value, form.value.categoryCode);
// 服务专业
const specialtyCodeText = proxy.selectDictLabel(specialty_code.value, form.value.specialtyCode);
console.log(
serviceTypeText,
"serviceTypeText",
categoryCodeText,
specialtyCodeText
);
const nameParts = [
serviceTypeText,
form.value.addressCity,
categoryCodeText,
specialtyCodeText,
];
// 使用 reduce 方法拼接地址,非空字段之间用 '-' 连接
return nameParts.reduce((acc, part) => {
if (part) {
if (acc) {
acc += ' - '; // 在非空字段之间添加 '-'
}
acc += part;
}
return acc;
}, "");
}
/** 详细按钮操作 */
function handleView(row) {
reset();

View File

@@ -63,7 +63,7 @@ export function getHealthcareMetadata(query) {
})
}
// // 门诊挂号目录分类查询
// // 门诊挂号查询
// export function getOutpatientRegistrationCategory() {
// return request({
// url: '/outpatient-service/registerinformation-init',
@@ -71,6 +71,15 @@ export function getHealthcareMetadata(query) {
// })
// }
// 新增门诊挂号信息
export function addOutpatientRegistration(data) {
return request({
url: '/outpatient-service/register/save',
method: 'post',
data: data
})
}
// 新增病人信息
export function addPatient(data) {
return request({

View File

@@ -9,7 +9,7 @@
<el-form
:model="form"
:rules="rules"
ref="medicationRef"
ref="outpatientregistrationRef"
label-width="110px"
>
<el-row :gutter="24">
@@ -59,7 +59,7 @@
</el-form-item>
</el-col>
<el-col :span="1">
<el-form-item prop="name" label-width="0px">
<el-form-item prop="allergenFlag" label-width="0px">
<el-checkbox
v-model="form.allergenFlag"
label="(终端)扫码"
@@ -138,11 +138,11 @@
<el-col :span="4">
<el-form-item
label="医保余额:"
prop="pyStr"
prop="balanceAmount"
class="custom-label-spacing"
>
<el-input
v-model="form.pyStr"
v-model="form.balanceAmount"
placeholder=""
:disabled="true"
/>
@@ -162,15 +162,61 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="5">
<el-form-item
label="医保名称:"
prop="ybName"
class="custom-label-spacing"
>
<el-input
v-model="form.ybName"
placeholder=""
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="医保区域:" prop="ybAreaNo">
<el-select
v-model="form.ybAreaNo"
placeholder="医保区域"
clearable
style="width: 240px"
:disabled="true"
>
<el-option
v-for="dict in med_chrgitm_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item
label="欠费限制额度:"
prop="limitAccount"
class="custom-label-spacing"
>
<el-input
v-model="form.limitAccount"
placeholder=""
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="5">
<el-form-item
label="费用性质:"
prop="busNo"
prop="contractNo"
class="custom-label-spacing"
>
<el-select
v-model="form.busNo"
v-model="form.contractNo"
placeholder="费用性质"
clearable
style="width: 240px"
@@ -212,7 +258,7 @@
</el-form-item>
</el-col> -->
<el-col :span="6">
<el-form-item label="就诊原因:" prop="name">
<el-form-item label="就诊原因:" prop="ybType">
<el-select
v-model="form.ybType"
placeholder="就诊原因"
@@ -240,11 +286,11 @@
<el-col :span="4">
<el-form-item
label="优先级:"
prop="priorityLevel"
prop="priorityEnum"
class="custom-label-spacing"
>
<el-select
v-model="form.priorityLevel"
v-model="form.priorityEnum"
placeholder="优先级"
clearable
style="width: 240px"
@@ -319,14 +365,15 @@
<el-col :span="6">
<el-form-item
label="挂号类型"
prop="healthcareType"
prop="serviceTypeId"
class="custom-label-spacing"
>
<el-select
v-model="form.healthcareType"
v-model="form.serviceTypeId"
placeholder="挂号类型"
clearable
style="width: 240px"
@change="setchargeItem"
>
<el-option
v-for="healthcare in healthcareList"
@@ -338,9 +385,9 @@
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="医生:" prop="doctorId">
<el-form-item label="医生:" prop="practitionerId">
<el-select
v-model="form.doctorId"
v-model="form.practitionerId"
placeholder="医生"
clearable
style="width: 240px"
@@ -436,6 +483,26 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24" justify="end">
<el-col :span="5" style="text-align: right">
<el-button
type="warning"
plain
icon="CircleClose"
@click="handleClear"
v-hasPermi="['system:user:export']"
>清空</el-button
>
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:user:add']"
>添加</el-button
>
</el-col>
</el-row>
</el-form>
</el-card>
</el-col>
@@ -459,6 +526,7 @@ import {
getLocationTree,
getPractitionerMetadata,
getHealthcareMetadata,
addOutpatientRegistration
} from "./components/outpatientregistration";
import patientInfoDialog from "./components/patientInfoDialog";
import PatientAddDialog from "./components/patientAddDialog";
@@ -555,29 +623,41 @@ function handleAddPatient() {
function setForm(formData) {
console.log(formData, "formData");
form.value = { ...form.value, ...formData };
form.value.patientId = formData.id;
}
// 设定表单
function setInfo() {
const doctorData = doctorList.value.filter(
(doctor) => doctor.id === form.value.doctorId
(doctor) => doctor.id === form.value.practitionerId
);
form.value.doctorName = doctorData.length > 0 ? doctorData[0].name : "";
console.log(doctorData, "datayisheng");
const healthcareData = healthcareList.value.filter(
(healthcare) => healthcare.id === form.value.healthcareType
(healthcare) => healthcare.id === form.value.serviceTypeId
);
form.value.locationId_dictText =
healthcareData.length > 0 ? healthcareData[0].name : "";
form.value.price = healthcareData.length > 0 ? healthcareData[0].price : "";
}
/** 查询病种目录列表 */
// 设定费用项管理表单
function setchargeItem() {
const healthcareData = healthcareList.value.filter(
(healthcare) => healthcare.id === form.value.serviceTypeId
);
form.value.definitionId =
healthcareData.length > 0 ? healthcareData[0].definitionId : "";
form.value.totalPrice =
healthcareData.length > 0 ? healthcareData[0].price : "";
}
/** 查询患者信息 */
function getList() {
loading.value = true;
getOutpatientRegistrationList(queryParams.value).then((res) => {
loading.value = false;
outpatientRegistrationList.value = res.data.records;
total.value = res.data.total;
});
// loading.value = true;
// getOutpatientRegistrationList(queryParams.value).then((res) => {
// loading.value = false;
// outpatientRegistrationList.value = res.data.records;
// total.value = res.data.total;
// });
}
/** 查询费用性质 */
@@ -631,12 +711,20 @@ function getHealthcare(data) {
const param = {
organizationId: data.organizationId,
};
// 设定表单中的机构ID
form.value.organizationId = data.organizationId;
getHealthcareMetadata(param).then((response) => {
healthcareList.value = response.data.records;
console.log("getHealthcareMetadata", "response", response.data);
});
}
/** 清空条件按钮操作 */
function handleClear() {
reset();
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNo = 1;
@@ -658,14 +746,23 @@ function reset() {
busNo: undefined,
ybType: undefined,
phone: undefined,
allergenFlag: undefined,
locationId: undefined,
healthcareType: undefined,
doctorId: undefined,
serviceTypeId: undefined,
practitionerId: undefined,
locationId_dictText: undefined,
doctorName: undefined,
price: undefined,
priorityLevel: undefined,
priorityEnum: undefined,
patientId: undefined,
organizationId: undefined,
contractNo: undefined,
typeCode: 1, // 个人现金账户 目前固定传1
ybName: undefined,
ybAreaNo: undefined,
limitAccount: undefined,
definitionId: undefined,
serviceId: undefined,
totalPrice: undefined,
};
proxy.resetForm("outpatientRegistrationRef");
}
@@ -677,9 +774,46 @@ function cancel() {
/** 新增按钮操作 */
function handleAdd() {
const transformedData = transformFormData(form.value);
console.log(transformedData, "transformedData门诊挂号");
addOutpatientRegistration(transformedData).then((response) => {
reset();
open.value = true;
title.value = "新增";
proxy.$modal.msgSuccess("新增成功");
getList();
});
}
// 设置新增参数
function transformFormData(form) {
return {
encounterFormData: {
patientId: form.patientId,
priorityEnum: form.priorityEnum,
serviceTypeId: form.serviceTypeId,
organizationId: form.organizationId,
},
encounterLocationFormData: {
locationId: form.locationId,
},
encounterParticipantFormData: {
practitionerId: form.practitionerId,
},
accountFormData: {
patientId: form.patientId,
typeCode: 1, // 默认值为 "1"
name: form.ybName,
balanceAmount: form.balanceAmount,
ybAreaNo: form.ybAreaNo,
contractNo: form.contractNo,
limitAccount: form.limitAccount,
},
chargeItemFormData: {
patientId: form.patientId,
definitionId: form.definitionId,
serviceId: form.serviceTypeId,
totalPrice: form.totalPrice, // 默认值为 99.99
},
};
}
getInitData();