挂号添加患者列表

This commit is contained in:
Zhang.YC
2025-03-31 09:12:27 +08:00
parent 27e33df001
commit 5283a3a927
4 changed files with 115 additions and 26 deletions

View File

@@ -15,10 +15,27 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="5"> <el-col :span="5">
<el-form-item label="病历号/姓名:" prop="searchKey"> <el-form-item label="病历号/姓名:" prop="searchKey">
<el-input <el-popover
v-model="form.searchKey" :popper-style="{ padding: '0' }"
placeholder="请输入姓名/拼音/身份证" placement="bottom-start"
/> :visible="showPopover"
trigger="manual"
:width="1200"
>
<patientList
:searchkey="patientSearchKey"
@selsectPatient="selsectPatient"
/>
<template #reference>
<el-input
@focus="handleFocus"
@blur="handleBlur"
@input="handleSearchPatient"
v-model="form.searchKey"
placeholder="请输入姓名/拼音/身份证"
/>
</template>
</el-popover>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@@ -625,6 +642,7 @@ import {
} from "./components/outpatientregistration"; } from "./components/outpatientregistration";
import patientInfoDialog from "./components/patientInfoDialog"; import patientInfoDialog from "./components/patientInfoDialog";
import PatientAddDialog from "./components/patientAddDialog"; import PatientAddDialog from "./components/patientAddDialog";
import patientList from "./components/patientList";
import { nextTick } from "vue"; import { nextTick } from "vue";
const router = useRouter(); const router = useRouter();
@@ -646,6 +664,8 @@ const total = ref(0);
const title = ref(""); const title = ref("");
const priorityLevelOptionOptions = ref(undefined); // 优先级 const priorityLevelOptionOptions = ref(undefined); // 优先级
const jzyyList = ref([{ value: "1", label: "其他" }]); const jzyyList = ref([{ value: "1", label: "其他" }]);
const showPopover = ref(false);
const patientSearchKey = ref();
// 键盘事件用 // 键盘事件用
const contractNameRef = ref(null); const contractNameRef = ref(null);
const jzyyRef = ref(null); const jzyyRef = ref(null);
@@ -967,6 +987,39 @@ function handleAdd() {
}); });
} }
/**
* 姓名表单获取焦点打开列表
*/
function handleFocus() {
showPopover.value = true;
}
/**
* 姓名表单失去焦点关闭列表
*/
function handleBlur() {
showPopover.value = false;
}
/**
* 搜索患者
*/
function handleSearchPatient(value) {
patientSearchKey.value = value;
}
/**
* 点击患者列表给表单赋值
*/
function selsectPatient(row) {
form.value.searchKey = row.name;
form.value.name = row.name;
form.value.idCard = row.idCard;
form.value.genderEnum_enumText = row.genderEnum_enumText;
form.value.phone = row.phone;
form.value.firstEnum_enumText = row.firstEnum_enumText;
form.value.age = row.age;
}
// 设置新增参数 // 设置新增参数
function transformFormData(form) { function transformFormData(form) {
return { return {

View File

@@ -31,6 +31,7 @@
</div> </div>
</div> </div>
<el-table <el-table
height="630"
ref="patientTableRef" ref="patientTableRef"
:data="patient" :data="patient"
row-key="id" row-key="id"
@@ -85,7 +86,7 @@ import { getList, receiveEncounter } from "./api";
const queryParams = ref({ const queryParams = ref({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 50,
}); });
const patient = ref([]); const patient = ref([]);
const loading = ref(false); const loading = ref(false);
@@ -134,7 +135,7 @@ function handleQuery() {
function handleSelectionChange() {} function handleSelectionChange() {}
</script> </script>
<style scoped> <style>
.custom-date-picker.el-picker__popper { .custom-date-picker.el-picker__popper {
width: 285px !important; width: 285px !important;
} }

View File

@@ -1,9 +1,21 @@
<template> <template>
<div style="width: 1250px"> <div style="width: 1250px">
<el-button type="primary" plain @click="handleAddPrescription()"> <el-button
type="primary"
plain
@click="handleAddPrescription()"
:disabled="buttonDisabled"
>
新增处方 新增处方
</el-button> </el-button>
<el-button type="primary" plain @click="handleSave()"> 发送处方 </el-button> <el-button
type="primary"
plain
@click="handleSave()"
:disabled="buttonDisabled"
>
发送处方
</el-button>
<el-table <el-table
v-horizontal-scroll v-horizontal-scroll
ref="prescriptionRef" ref="prescriptionRef"
@@ -78,10 +90,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格" align="center" prop="volume" width="180" /> <el-table-column label="规格" align="center" prop="volume" width="180" />
<el-table-column label="单价" align="center" prop="" /> <el-table-column label="单价" align="center" prop="unitPrice" />
<el-table-column label="单次计量" align="center" prop="dose"> <el-table-column label="单次计量" align="center" prop="dose">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.name" placeholder="" /> <el-input v-model="scope.row.dose" placeholder="" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -91,7 +103,7 @@
width="90" width="90"
> >
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.name" placeholder=" " > <el-select v-model="scope.row.unitCode" placeholder=" ">
<el-option <el-option
v-for="dict in unit_code" v-for="dict in unit_code"
:key="dict.value" :key="dict.value"
@@ -108,7 +120,7 @@
width="130" width="130"
> >
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.name" placeholder=" " clearable> <el-select v-model="scope.row.methodCode" placeholder=" " clearable>
<el-option <el-option
v-for="dict in method_code" v-for="dict in method_code"
:key="dict.value" :key="dict.value"
@@ -118,7 +130,7 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="组套" align="center" prop="" /> <el-table-column label="组套" align="center" prop="zt" />
<el-table-column <el-table-column
label="频次" label="频次"
align="center" align="center"
@@ -126,7 +138,7 @@
width="110" width="110"
> >
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.name" placeholder=""> <el-select v-model="scope.row.rateCode" placeholder="">
<el-option <el-option
v-for="dict in rate_code" v-for="dict in rate_code"
:key="dict.value" :key="dict.value"
@@ -137,17 +149,28 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="滴速" align="center" prop="" /> <el-table-column label="滴速" align="center" prop="" />
<el-table-column label="用药天数" align="center" prop=""> <el-table-column label="用药天数" align="center" prop="day">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.name" placeholder="" /> <el-input v-model="scope.row.day" placeholder="" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="药品总量" align="center" prop=""> <el-table-column label="药品总量" align="center" prop="quantity">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.name" placeholder="" /> <el-input v-model="scope.row.quantity" placeholder="" />
</template>
</el-table-column>
<el-table-column label="单位" align="center" prop="" width="90">
<template #default="scope">
<el-select v-model="scope.row.unitCode" placeholder=" ">
<el-option
v-for="dict in unit_code"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" align="center" prop="" />
<el-table-column label="金额" align="center" prop="" /> <el-table-column label="金额" align="center" prop="" />
<el-table-column label="皮试" align="center" prop=""> <el-table-column label="皮试" align="center" prop="">
<template #default="scope"> <template #default="scope">
@@ -180,6 +203,9 @@ const queryParams = ref({});
const prescriptionList = ref([]); const prescriptionList = ref([]);
const searchkey = ref(""); const searchkey = ref("");
const rowIndex = ref(-1); const rowIndex = ref(-1);
const buttonDisabled = computed(() => {
return !props.patientInfo;
});
const props = defineProps({ const props = defineProps({
patientInfo: { patientInfo: {
type: Object, type: Object,
@@ -232,6 +258,12 @@ function handleChange(value) {
*/ */
function selsectAdviceBase(row) { function selsectAdviceBase(row) {
prescriptionList.value[rowIndex.value] = JSON.parse(JSON.stringify(row)); prescriptionList.value[rowIndex.value] = JSON.parse(JSON.stringify(row));
prescriptionList.value[rowIndex.value].definitionId = JSON.parse(
JSON.stringify(row)
).chargeItemDefinitionId;
console.log(row, 234567890);
// 库存列表 + 价格列表拼成批次号的下拉框 // 库存列表 + 价格列表拼成批次号的下拉框
prescriptionList.value[rowIndex.value].stockList = row.inventoryList.map( prescriptionList.value[rowIndex.value].stockList = row.inventoryList.map(
(item, index) => { (item, index) => {
@@ -244,10 +276,8 @@ function handleDelete(index) {
prescriptionList.value.splice(index, 1); prescriptionList.value.splice(index, 1);
} }
function handleNumberClick(value, index) { function handleNumberClick(item, index) {
console.log(value); prescriptionList.value[index].unitPrice = item.price;
prescriptionList.value[index];
} }
/** /**
@@ -257,6 +287,8 @@ function handleSave() {
prescriptionList.value.forEach((item) => { prescriptionList.value.forEach((item) => {
item.patientId = props.patientInfo.patientId; item.patientId = props.patientInfo.patientId;
item.encounterId = props.patientInfo.encounterId; item.encounterId = props.patientInfo.encounterId;
item.accountId = props.patientInfo.accountId;
item.unitPrice = 1;
}); });
savePrescription({ adviceSaveList: prescriptionList.value }).then((res) => { savePrescription({ adviceSaveList: prescriptionList.value }).then((res) => {
if (res.code === 200) { if (res.code === 200) {

View File

@@ -334,10 +334,10 @@
</el-col> </el-col>
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<el-button type="primary" plain @click="handleAddDiagnosis()"> <el-button type="primary" plain @click="handleAddDiagnosis()" :disabled="buttonDisabled">
新增诊断 新增诊断
</el-button> </el-button>
<el-button type="primary" plain @click="handleSaveDiagnosis()"> <el-button type="primary" plain @click="handleSaveDiagnosis()" :disabled="buttonDisabled">
保存诊断 保存诊断
</el-button> </el-button>
</div> </div>
@@ -488,7 +488,6 @@ import emrhistory from "./components/emrhistory.vue";
import diagnosisdialog from "./components/diagnosisdialog.vue"; import diagnosisdialog from "./components/diagnosisdialog.vue";
import diagnosislist from "./components/diagnosislist.vue"; import diagnosislist from "./components/diagnosislist.vue";
import { computed, ref } from "vue"; import { computed, ref } from "vue";
import { data } from "province-city-china/data";
const activeTab = ref("wait"); const activeTab = ref("wait");
const form = ref({}); const form = ref({});
@@ -815,4 +814,8 @@ function toCurrent() {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.el-checkbox.is-bordered.el-checkbox--small {
background-color: #ffffff;
}
</style> </style>