输液修改,门诊管理修改

This commit is contained in:
菲菲
2025-03-19 10:00:27 +08:00
parent 2d0decb7e9
commit 3fb4cf3c11
7 changed files with 92 additions and 111 deletions

View File

@@ -1,24 +1,44 @@
import request from '@/utils/request'
// 待执行输液记录查询
export function listInfusionRecord(query) {
return request({
url: '/outpatientmanage/infusion/init',
url: '/outpatient-manage/infusion/infusion-wait-perform-record',
method: 'get',
params: query
})
}
// 病人列表
export function listPatients() {
return request({
url: '/outpatientmanage/infusion/patients',
url: '/outpatient-manage/infusion/patient-infusion',
method: 'get',
})
}
// 批量执行患者门诊输液
export function updateInfusionRecord(data) {
return request({
url: '/outpatientmanage/infusion/outpatient-record-skintest',
url: '/outpatient-manage/infusion/infusion-perform/batch',
method: 'put',
data: data
})
}
}
// 查询单个患者门诊输液记录查询
export function listPatientInfusionRecord(query) {
return request({
url: '/outpatient-manage/infusion/patient-infusion',
method: 'get',
params: query
})
}
// 门诊输液执行历史记录查询
export function listPatientInfusionPerformRecord(query) {
return request({
url: '/outpatient-manage/infusion/infusion-perform-record',
method: 'get',
params: query
})
}

View File

@@ -6,10 +6,11 @@
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期" style="width: auto;"></el-date-picker>
</el-form-item>
<el-form-item label="" prop="phone">
<el-input v-model="queryParams.phone" placeholder="门诊号/病人/ID" clearable style="width: 180px"
<el-form-item label="" prop="searchKey">
<el-input v-model="queryParams.searchKey" placeholder="门诊号/病人/ID" clearable style="width: 180px"
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
@@ -28,7 +29,7 @@
<el-table-column prop="ageString" label="年龄" width="80" />
<el-table-column prop="status" label="身份证号" width="140" />
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize" @pagination="getList" />
</div>
@@ -62,7 +63,7 @@
<el-table-column prop="speed" label="输液速度" width="80" />
<el-table-column prop="orgId_dictText" label="发放科室" width="120" />
<el-table-column prop="medicationStatusEnum_enumText" label="药品状态" width="100" />
<el-table-column prop="flagText" label="是否皮试" width="60" />
<el-table-column prop="skinTestFlag_enumText" label="是否皮试" width="60" />
<el-table-column prop="clinicalStatusEnum_enumText" label="皮试结果" width="60" />
<el-table-column label="操作" align="center" width="90" fixed="right">
<template #default="scope">
@@ -99,12 +100,13 @@
<script setup name="InfusionRecord">
import { ref, computed } from 'vue';
import { listPatients,updateInfusionRecord,listInfusionRecord } from './component/api.js';
// import prescriptioncard from '@/views/clinicmanagement/infusionrecord/component/prescription.vue'
import { listPatients,updateInfusionRecord,listInfusionRecord,
listPatientInfusionRecord,listPatientInfusionPerformRecord } from './component/api.js';
const showSearch = ref(true);
const showPrescription = ref(false);
const total = ref(1);
const selectedItems = ref(new Set());
const tableRef = ref(null);
const selectedGroupIds = ref(new Set());
@@ -113,12 +115,12 @@ const currentRow = ref(null);
const dateRange = ref([]);
const historyRecordsList = ref([])
const patientList = ref([]);
// const infusionList = ref([]);
const infusionList = ref([
{ groupId: 1, executionCount: 2, doctorId_dictText: '张三', patientName: '李四', genderEnum_enumText: '男', status: '123456789012345678', medicationInformation: '药品A', medicationAntity: 10, rateCode: '每日一次', dose: '10mg', speed: '50ml/h', orgId_dictText: '内科', medicationStatusEnum_enumText: '已发放', flagText: '是', clinicalStatusEnum_enumText: '阴性' },
{ groupId: 1, executionCount: 2, doctorId_dictText: '张三', patientName: '王五', genderEnum_enumText: '女', status: '123456789012345679', medicationInformation: '药品A', medicationAntity: 10, rateCode: '每日一次', dose: '10mg', speed: '50ml/h', orgId_dictText: '内科', medicationStatusEnum_enumText: '已发放', flagText: '是', clinicalStatusEnum_enumText: '阴性' },
{ groupId: 2, executionCount: 1, doctorId_dictText: '李六', patientName: '赵七', genderEnum_enumText: '男', status: '123456789012345680', medicationInformation: '药品B', medicationAntity: 5, rateCode: '每日两次', dose: '5mg', speed: '30ml/h', orgId_dictText: '外科', medicationStatusEnum_enumText: '已发放', flagText: '否', clinicalStatusEnum_enumText: '无' },
]);
const infusionList = ref([]);
// const infusionList = ref([
// { groupId: 1, executionCount: 2, doctorId_dictText: '张三', patientName: '李四', genderEnum_enumText: '男', status: '123456789012345678', medicationInformation: '药品A', medicationAntity: 10, rateCode: '每日一次', dose: '10mg', speed: '50ml/h', orgId_dictText: '内科', medicationStatusEnum_enumText: '已发放', skinTestFlag_enumText: '是', clinicalStatusEnum_enumText: '阴性' },
// { groupId: 1, executionCount: 2, doctorId_dictText: '张三', patientName: '王五', genderEnum_enumText: '女', status: '123456789012345679', medicationInformation: '药品A', medicationAntity: 10, rateCode: '每日一次', dose: '10mg', speed: '50ml/h', orgId_dictText: '内科', medicationStatusEnum_enumText: '已发放', skinTestFlag_enumText: '是', clinicalStatusEnum_enumText: '阴性' },
// { groupId: 2, executionCount: 1, doctorId_dictText: '李六', patientName: '赵七', genderEnum_enumText: '男', status: '123456789012345680', medicationInformation: '药品B', medicationAntity: 5, rateCode: '每日两次', dose: '5mg', speed: '30ml/h', orgId_dictText: '外科', medicationStatusEnum_enumText: '已发放', skinTestFlag_enumText: '否', clinicalStatusEnum_enumText: '无' },
// ]);
const ids = ref([]);
@@ -127,28 +129,27 @@ const { proxy } = getCurrentInstance();
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageNo: 1,
pageSize: 10,
patientname: undefined,
patientid: undefined
searchKey: undefined
},
});
const { queryParams } = toRefs(data);
/** 查询门诊输液列表 */
function getList() {
// listInfusionRecord(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
// jobLogList.value = response.rows;
// total.value = response.total;
// loading.value = false;
// });
listInfusionRecord(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
console.log('Full response:', response);
});
listPatients().then(response => {
console.log('Full response:', response); // 打印完整响应
patientList.value = response.data;
total.value = response.total;
}).catch(error => {
console.error('Error:', error); // 捕获并打印错误
});
listPatientInfusionPerformRecord().then(response => {
console.log('Full response:', response); // 打印完整响应
historyRecordsList.value = response.data;
});
}
/** 搜索按钮操作 */
@@ -166,7 +167,9 @@ function resetQuery() {
}
function handleSubmit(){
updateInfusionRecord(form.value).then(response => {
const itemsList = Array.isArray(selectedItems.value) ? selectedItems.value : [selectedItems.value];
console.log('Full response:', itemsList,selectedItems.value);
updateInfusionRecord(itemsList).then(response => {
proxy.$modal.msgSuccess("执行成功");
open.value = false;
getList();
@@ -182,33 +185,39 @@ function isEqual(set1, set2) {
}
function handleSelectionChange(selection) {
// console.log('Current selection:', selection);
// console.log('Current selectedGroupIds:', selectedGroupIds.value);
// 获取当前选中的 groupId 集合
// 清空之前选中的数据
selectedItems.value.clear();
// 将当前选中的数据存到 selectedItems 中
selection.forEach(item => {
selectedItems.value.add(item);
});
// 获取当前选中的 groupId 和 medicationId 集合
const currentGroupIds = new Set(selection.map(item => item.groupId));
// 更新 selectedGroupIds
// 如果当前选中的 groupId 已经存在,则移除它;否则添加它
// const currentMedicationIds = new Set(selection.map(item => item.medicationId));
// 更新 selectedGroupIds 和 selectedMedicationIds
selection.forEach(item => {
const groupId = item.groupId;
if (selectedGroupIds.value.has(groupId)) {
const medicationId = item.medicationId;
// 检查 groupId 和 medicationId 是否同时存在
if (selectedGroupIds.value.has(groupId) ) {
// 如果都存在,则移除它们
selectedGroupIds.value.delete(groupId);
// selectedMedicationIds.value.delete(medicationId);
} else {
// 否则添加它们
selectedGroupIds.value.add(groupId);
// selectedMedicationIds.value.add(medicationId);
}
});
// 动态更新表格行的选中状态
infusionList.value.forEach(row => {
// 如果当前行的 groupId 在 selectedGroupIds 中,则选中;否则取消选
const isSelected = selectedGroupIds.value.has(row.groupId);
// console.log('Row groupId:', row.groupId, 'isSelected:', isSelected);
// 检查当前行的 groupId 和 medicationId 是否同时在 selectedGroupIds 和 selectedMedicationIds
const isSelected = selectedGroupIds.value.has(row.groupId)
tableRef.value.toggleRowSelection(row, isSelected);
});
console.log('Current selectedGroupIds:', selectedGroupIds.value);
// console.log('Current selectedMedicationIds:', selectedMedicationIds.value);
console.log('Current selectedItems:', selectedItems.value);
}
function handleSubmitCanel(){
ids.value = []
@@ -247,7 +256,7 @@ getList();
}
.right {
margin-left: 2%;
width: 72%;
width: 70%;
}
.selected-row {
background-color: #effae8 !important;

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function listSkinRecord(query) {
return request({
url: '/outpatientmanage/skintest/outpatient-record-page',
url: '/outpatient-manage/skin-test/outpatient-record-page',
method: 'get',
params: query
})
@@ -10,7 +10,7 @@ export function listSkinRecord(query) {
export function lists() {
return request({
url: '/outpatientmanage/skintest/init',
url: '/outpatient-manage/skin-test/init',
method: 'get',
})
}
@@ -18,7 +18,7 @@ export function lists() {
export function updateSkinTestRecord(data) {
return request({
url: '/outpatientmanage/outpatient-record-skintest',
url: '/outpatient-manage/skin-test/outpatient-record-skin-test',
method: 'put',
data: data
})
@@ -27,7 +27,7 @@ export function updateSkinTestRecord(data) {
export function updateNurseSign(data) {
return request({
url: '/outpatientmanage/outpatient-record-signcheck',
url: '/outpatient-manage/skin-test/outpatient-record-sign-check',
method: 'put',
data: data
})

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function listOutpatienRecords(query) {
return request({
url: '/patientmanage/records/outpatient-record-page',
url: '/patient-manage/records/outpatient-record-page',
method: 'get',
params: query
})
@@ -10,7 +10,7 @@ export function listOutpatienRecords(query) {
export function listDoctorNames() {
return request({
url: '/patientmanage/records/init',
url: '/patient-manage/records/init',
method: 'get',
})
}

View File

@@ -87,7 +87,7 @@ function getList() {
});
listDoctorNames().then(response => {
console.log(response);
// doctorList.value = response.data;
doctorList.value = response.data;
});
}
@@ -96,7 +96,6 @@ function handleQuery() {
queryParams.value.beginTime = dateRange.value[0];
queryParams.value.endTime = dateRange.value[1];
queryParams.value.pageNo = 1;
console.log("123",queryParams.value,typeof queryParams.value.beginTime)
getList();
}
/** 重置按钮操作 */

View File

@@ -1,53 +1,9 @@
import request from '@/utils/request'
export function listmaritalstatus() {
return request({
url: '/patientmanage/information/list-maritalstatus',
method: 'get',
})
}
export function listoccupationtype() {
return request({
url: '/patientmanage/information/list-occupationtype',
method: 'get',
})
}
export function lisadministrativegender() {
return request({
url: '/patientmanage/information/list-administrativegender',
method: 'get',
})
}
export function listbloodtypeabo() {
return request({
url: '/patientmanage/information/list-bloodtypeabo',
method: 'get',
})
}
export function listbloodtypearh() {
return request({
url: '/patientmanage/information/list-bloodtypearh',
method: 'get',
})
}
export function listfamilyrelationshiptype() {
return request({
url: '/patientmanage/information/list-familyrelationshiptype',
method: 'get',
})
}
// 新增
export function addPatient(data) {
return request({
url: '/patientmanage/information/patient-information',
url: '/patient-manage/information/patient-information',
method: 'post',
data: data
})
@@ -56,14 +12,14 @@ export function addPatient(data) {
// 查询菜单列表
export function listPatient(query) {
return request({
url: '/patientmanage/information/patient-information-page',
url: '/patient-manage/information/patient-information-page',
method: 'get',
params: query
})
}
export function lists() {
return request({
url: '/patientmanage/information/init',
url: '/patient-manage/information/init',
method: 'get'
})
}
@@ -71,7 +27,7 @@ export function listPatient(query) {
// 修改
export function updatePatient(data) {
return request({
url: '/patientmanage/information/patient-information',
url: '/patient-manage/information/patient-information',
method: 'put',
data: data
})

View File

@@ -72,11 +72,6 @@
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="6">
<el-form-item label="年龄" prop="age">
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="性别" prop="genderEnum">
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
@@ -89,8 +84,8 @@
<el-col :span="7">
<el-form-item label="活动标识" prop="tempFlag">
<el-radio-group v-model="form.tempFlag" :disabled="isViewMode">
<el-radio v-for="dict in patient_temp_flag" :key="dict.value" :label="dict.value" >
{{ dict.label }}
<el-radio v-for="item in tempFlagList" :key="item.value" :label="item.value" >
{{ item.info }}
</el-radio>
</el-radio-group>
</el-form-item>
@@ -100,8 +95,7 @@
<el-col :span="7">
<el-form-item label="证件类别" prop="idType">
<el-select v-model="form.idType" placeholder="证件类别" clearable :disabled="isViewMode">
<el-option v-for="dict in sys_idtype"
:key="dict.value" :label="dict.label" :value="dict.value" />
<el-option v-for="item in idTypeList" :key="item.value" :label="item.info" />
</el-select>
</el-form-item>
</el-col>
@@ -191,7 +185,7 @@
:key="item.value" :label="item.info" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
@@ -224,8 +218,7 @@
<script setup name="patientManagement">
import pcas from 'china-division/dist/pcas-code.json';
import { ref, computed } from 'vue';
import {listmaritalstatus,listoccupationtype,lisadministrativegender,listbloodtypeabo,listbloodtypearh,listfamilyrelationshiptype,
addPatient,listPatient,updatePatient,lists} from "./component/api"
import {addPatient,listPatient,updatePatient,lists} from "./component/api"
const showSearch = ref(true);
const open = ref(false);
@@ -239,6 +232,8 @@ const bloodtypeaboList = ref([]) //血型abo
const bloodtypearhList = ref([]) //血型RH
const familyrelationshiptypeList = ref([]) //家庭关系
const addressCom = ref(""); //地址
const tempFlagList = ref([])
const idTypeList = ref([])
const options = ref(pcas); // 地区数据
const selectedOptions = ref([]); // v-model 绑定的选中值
@@ -306,6 +301,8 @@ function getList() {
bloodtypearhList.value = response.data.bloodTypeRH
familyrelationshiptypeList.value = response.data.familyRelationshipType
maritalstatusList.value = response.data.maritalStatus
tempFlagList.value = response.data.whetherStatus
idTypeList.value = response.data.identityDocumentType
});
}