Compare commits
32 Commits
3e57405631
...
88a13370cb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88a13370cb | ||
|
|
ff22b4a30b | ||
| a68ffbfec4 | |||
| 14f8a8b0a3 | |||
| 0f1e57227b | |||
|
|
98a370f3a2 | ||
| b2ce368749 | |||
| c691f82958 | |||
|
|
d2bfde7230 | ||
|
|
62a09a8b94 | ||
|
|
10b2c58a3e | ||
|
|
abc995523b | ||
|
|
c0438c0288 | ||
|
|
13731c2373 | ||
|
|
d63b00fd33 | ||
|
|
c60cd6878e | ||
|
|
cf50f8968a | ||
|
|
94fac8e257 | ||
|
|
f162134156 | ||
|
|
d866d898df | ||
|
|
6725cef643 | ||
|
|
7790a64eab | ||
|
|
49fa1c9b90 | ||
|
|
e0a035204e | ||
|
|
349b0453c8 | ||
|
|
3ddd74d679 | ||
|
|
9829843b3e | ||
|
|
0d95cc1341 | ||
|
|
1dfceeaf46 | ||
|
|
1b79df4f93 | ||
|
|
f62a280dfc | ||
|
|
e5d949a740 |
@@ -175,10 +175,10 @@ public class AdviceUtils {
|
||||
// 预减库存
|
||||
List<AdviceInventoryDto> adviceInventory
|
||||
= this.subtractInventory(adviceInventoryList, adviceDraftInventoryList);
|
||||
// 提示信息集合
|
||||
// 生命提示信息集合
|
||||
List<String> tipsList = new ArrayList<>();
|
||||
for (MedicationRequestUseExe medicationRequestUseExe : medUseExeList) {
|
||||
// 汇总同一地点该药品的所有批次库存总量
|
||||
// 聚合同一位置所有批次的库存总量
|
||||
List<AdviceInventoryDto> matchedInventories = adviceInventory.stream()
|
||||
.filter(inventoryDto -> medicationRequestUseExe.getMedicationId().equals(inventoryDto.getItemId())
|
||||
&& CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(inventoryDto.getItemTable())
|
||||
@@ -189,17 +189,15 @@ public class AdviceUtils {
|
||||
.collect(Collectors.toList());
|
||||
// 匹配到库存信息
|
||||
if (!matchedInventories.isEmpty()) {
|
||||
// 计算总可用库存
|
||||
BigDecimal totalAvailableQuantity = matchedInventories.stream()
|
||||
.map(AdviceInventoryDto::getQuantity)
|
||||
// 聚合所有批次的可用库存
|
||||
BigDecimal totalQuantity = matchedInventories.stream()
|
||||
.map(dto -> dto.getQuantity() != null ? dto.getQuantity() : BigDecimal.ZERO)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal totalRequiredQuantity = medicationRequestUseExe.getExecuteTimesNum()
|
||||
BigDecimal requestQuantity = medicationRequestUseExe.getExecuteTimesNum()
|
||||
.multiply(medicationRequestUseExe.getMinUnitQuantity());
|
||||
if (totalRequiredQuantity.compareTo(totalAvailableQuantity) > 0) {
|
||||
// 取第一个匹配的位置名称用于提示
|
||||
String locationName = matchedInventories.get(0).getLocationName();
|
||||
if (requestQuantity.compareTo(totalQuantity) > 0) {
|
||||
tipsList
|
||||
.add("【" + medicationRequestUseExe.getBusNo() + "】在" + locationName + "库存不足");
|
||||
.add("【" + medicationRequestUseExe.getBusNo() + "】在" + matchedInventories.get(0).getLocationName() + "库存不足");
|
||||
}
|
||||
} else {
|
||||
tipsList.add("【" + medicationRequestUseExe.getBusNo() + "】未匹配到库存信息");
|
||||
|
||||
@@ -38,7 +38,6 @@ export function listAdviceTypes(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
/**
|
||||
* 查询手术室详细
|
||||
|
||||
@@ -41,7 +41,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<!-- 工作单位(学校) -->
|
||||
<el-row :gutter="16" class="form-row">
|
||||
<el-col :span="12" class="form-item">
|
||||
<span class="form-label">工作单位(学校)</span>
|
||||
<el-input v-model="form.workplace" class="underline-input" />
|
||||
</el-col>
|
||||
|
||||
@@ -55,138 +55,7 @@
|
||||
|
||||
<!-- 手术等级 -->
|
||||
<el-table-column label="手术等级" align="center" prop="surgeryLevel_dictText" width="100" />
|
||||
|
||||
<!-- 手术室确认时间 -->
|
||||
<el-table-column label="手术室确认时间" align="center" prop="confirmTime" width="180">
|
||||
<template #default="scope">
|
||||
{{ scope.row.confirmTime ? parseTime(scope.row.confirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 操作列 -->
|
||||
<el-table-column label="操作" align="center" width="150" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleView(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
size="small"
|
||||
@click="handleEdit(scope.row)"
|
||||
:disabled="scope.row.status !== '0'"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { getSurgeryApplicationList, addSurgeryApplication, updateSurgeryApplication } from '@/api/doctorstation/surgery'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
const loading = ref(true)
|
||||
const surgeryList = ref([])
|
||||
|
||||
// 查询手术申请列表
|
||||
const getList = async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
const response = await getSurgeryApplicationList()
|
||||
surgeryList.value = response.data || []
|
||||
} catch (error) {
|
||||
console.warn('获取手术申请列表失败', error)
|
||||
surgeryList.value = []
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 新增手术申请
|
||||
const handleAdd = () => {
|
||||
// 跳转到新增页面或打开新增弹窗
|
||||
// 这里需要根据实际路由配置调整
|
||||
openSurgeryDialog()
|
||||
}
|
||||
|
||||
// 编辑手术申请
|
||||
const handleEdit = (row) => {
|
||||
if(row.status !== '0') {
|
||||
ElMessage.warning('该申请已提交,无法修改')
|
||||
return
|
||||
}
|
||||
openSurgeryDialog(row)
|
||||
}
|
||||
|
||||
// 查看手术申请详情
|
||||
const handleView = (row) => {
|
||||
openSurgeryDialog(row, true)
|
||||
}
|
||||
|
||||
// 刷新列表
|
||||
const handleRefresh = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
// 打开手术申请对话框
|
||||
const openSurgeryDialog = (row, isView = false) => {
|
||||
// 这里需要引入具体的对话框组件或跳转到详情页
|
||||
// 示例代码,具体实现需要根据项目实际情况调整
|
||||
console.log('打开手术申请对话框', row, isView)
|
||||
}
|
||||
|
||||
// 获取行样式
|
||||
const getRowClassName = ({ row }) => {
|
||||
if (row.status === '1') {
|
||||
return 'success-row'
|
||||
} else if (row.status === '2') {
|
||||
return 'warning-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
// 暴露方法给父组件调用,用于提交后刷新列表
|
||||
defineExpose({
|
||||
refreshList: getList
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.surgery-application-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.top-operation-bar {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.add-button,
|
||||
.refresh-button {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 表格行状态样式 */
|
||||
::v-deep(.success-row) {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
|
||||
::v-deep(.warning-row) {
|
||||
background-color: #fff7e6;
|
||||
}
|
||||
</style>
|
||||
<el-table-column label="手术室确认时间" align="center" prop="operatingRoomConfirmTime" width="180">
|
||||
<template #default="scope">
|
||||
{{ scope.row.operatingRoomConfirmTime ? parseTime(scope.row.operatingRoomConfirmTime, '{y}-{m}-{d} {h}:{i}:{s}') : '-' }}
|
||||
@@ -1258,11 +1127,14 @@ function submitForm() {
|
||||
// 新增手术
|
||||
addSurgery(form.value).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess(res.msg || '新增成功')
|
||||
proxy.$modal.msgSuccess('手术申请提交成功!')
|
||||
// 保存麻醉方式
|
||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||
open.value = false
|
||||
getList()
|
||||
// 延迟刷新列表,确保后端数据已提交
|
||||
setTimeout(() => {
|
||||
getList()
|
||||
}, 300)
|
||||
emit('saved') // 🔧 触发保存事件,通知父组件刷新医嘱列表
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '新增手术失败,请检查表单信息')
|
||||
@@ -1275,11 +1147,14 @@ function submitForm() {
|
||||
// 修改手术
|
||||
updateSurgery(form.value).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess(res.msg || '修改成功')
|
||||
proxy.$modal.msgSuccess('手术申请修改成功!')
|
||||
// 保存麻醉方式
|
||||
sessionStorage.setItem('anesthesiaType', form.value.anesthesiaTypeEnum)
|
||||
open.value = false
|
||||
getList()
|
||||
// 延迟刷新列表,确保后端数据已提交
|
||||
setTimeout(() => {
|
||||
getList()
|
||||
}, 300)
|
||||
emit('saved') // 🔧 触发保存事件,通知父组件刷新医嘱列表
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg || '更新手术失败,请检查表单信息')
|
||||
|
||||
@@ -227,6 +227,47 @@
|
||||
<el-form-item label="申请单名称">
|
||||
<el-input v-model="editForm.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发往科室">
|
||||
<el-tree-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="editForm.targetDepartment"
|
||||
filterable
|
||||
:data="orgOptions"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
}"
|
||||
value-key="id"
|
||||
check-strictly
|
||||
placeholder="请选择科室"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急程度">
|
||||
<el-select v-model="editForm.urgencyLevel" placeholder="请选择紧急程度" clearable style="width: 100%">
|
||||
<el-option label="普通" value="routine" />
|
||||
<el-option label="急诊" value="emergency" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="过敏史">
|
||||
<el-input v-model="editForm.allergyHistory" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查目的">
|
||||
<el-input v-model="editForm.examinationPurpose" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="病史摘要">
|
||||
<el-input v-model="editForm.medicalHistorySummary" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
<el-form-item label="期望检查时间">
|
||||
<el-date-picker
|
||||
v-model="editForm.expectedExaminationTime"
|
||||
type="datetime"
|
||||
placeholder="请选择期望检查时间"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="临床诊断">
|
||||
<el-input v-model="editForm.clinicalDiagnosis" type="textarea" :rows="2" />
|
||||
</el-form-item>
|
||||
@@ -428,6 +469,11 @@ const buildItemNames = (row) => {
|
||||
const labelMap = {
|
||||
categoryType: '项目类别',
|
||||
targetDepartment: '发往科室',
|
||||
urgencyLevel: '紧急程度',
|
||||
allergyHistory: '过敏史',
|
||||
examinationPurpose: '检查目的',
|
||||
medicalHistorySummary: '病史摘要',
|
||||
expectedExaminationTime: '期望检查时间',
|
||||
symptom: '症状',
|
||||
sign: '体征',
|
||||
clinicalDiagnosis: '临床诊断',
|
||||
@@ -493,6 +539,11 @@ const handleViewDetail = (row) => {
|
||||
const deptName = recursionFun(obj.targetDepartment);
|
||||
obj.targetDepartment = deptName || obj.targetDepartment;
|
||||
}
|
||||
// 紧急程度转换为显示文本
|
||||
const urgencyMap = { routine: '普通', emergency: '急诊' };
|
||||
if (obj.urgencyLevel) {
|
||||
obj.urgencyLevel = urgencyMap[obj.urgencyLevel] || obj.urgencyLevel;
|
||||
}
|
||||
descJsonData.value = obj;
|
||||
} catch (e) {
|
||||
console.error('解析 descJson 失败:', e);
|
||||
@@ -514,6 +565,12 @@ const handleEdit = (row) => {
|
||||
if (row.descJson) {
|
||||
try {
|
||||
const desc = JSON.parse(row.descJson);
|
||||
form.targetDepartment = desc.targetDepartment || '';
|
||||
form.urgencyLevel = desc.urgencyLevel || '';
|
||||
form.allergyHistory = desc.allergyHistory || '';
|
||||
form.examinationPurpose = desc.examinationPurpose || '';
|
||||
form.medicalHistorySummary = desc.medicalHistorySummary || '';
|
||||
form.expectedExaminationTime = desc.expectedExaminationTime || '';
|
||||
form.clinicalDiagnosis = desc.clinicalDiagnosis || '';
|
||||
form.attention = desc.attention || '';
|
||||
form.symptom = desc.symptom || '';
|
||||
@@ -544,6 +601,12 @@ const handleSaveEdit = async () => {
|
||||
name: editForm.value.name,
|
||||
organizationId: editDetail.value.inHospitalOrgId || patientInfo.value?.inHospitalOrgId,
|
||||
descJson: JSON.stringify({
|
||||
targetDepartment: editForm.value.targetDepartment,
|
||||
urgencyLevel: editForm.value.urgencyLevel,
|
||||
allergyHistory: editForm.value.allergyHistory,
|
||||
examinationPurpose: editForm.value.examinationPurpose,
|
||||
medicalHistorySummary: editForm.value.medicalHistorySummary,
|
||||
expectedExaminationTime: editForm.value.expectedExaminationTime,
|
||||
clinicalDiagnosis: editForm.value.clinicalDiagnosis,
|
||||
attention: editForm.value.attention,
|
||||
symptom: editForm.value.symptom,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<!--
|
||||
* 住院医生站 — 汇总发药申请:复用药房「发药汇总单」能力
|
||||
-->
|
||||
<template>
|
||||
<div class="summary-drug-application">
|
||||
<MedicationSummary />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import MedicationSummary from '@/views/drug/inpatientMedicationDispensing/components/MedicationSummary.vue';
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.summary-drug-application {
|
||||
height: 100%;
|
||||
min-height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -42,6 +42,40 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="紧急程度" prop="urgencyLevel" style="width: 100%">
|
||||
<el-select v-model="form.urgencyLevel" placeholder="请选择紧急程度" clearable style="width: 100%">
|
||||
<el-option label="普通" value="routine" />
|
||||
<el-option label="急诊" value="emergency" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="过敏史" prop="allergyHistory" style="width: 100%">
|
||||
<el-input v-model="form.allergyHistory" autocomplete="off" type="textarea" placeholder="如:造影剂过敏史等" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="检查目的" prop="examinationPurpose" style="width: 100%">
|
||||
<el-input v-model="form.examinationPurpose" autocomplete="off" type="textarea" placeholder="请说明检查目的" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="病史摘要" prop="medicalHistorySummary" style="width: 100%">
|
||||
<el-input v-model="form.medicalHistorySummary" autocomplete="off" type="textarea" placeholder="请简要描述患者病史" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="期望检查时间" prop="expectedExaminationTime" style="width: 100%">
|
||||
<el-date-picker
|
||||
v-model="form.expectedExaminationTime"
|
||||
type="datetime"
|
||||
placeholder="请选择期望检查时间"
|
||||
style="width: 100%"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="症状" prop="symptom" style="width: 100%">
|
||||
<el-input v-model="form.symptom" autocomplete="off" type="textarea" />
|
||||
@@ -145,6 +179,11 @@ const transferValue = ref([]);
|
||||
const form = reactive({
|
||||
// categoryType: '', // 项目类别
|
||||
targetDepartment: '', // 发往科室
|
||||
urgencyLevel: '', // 紧急程度
|
||||
allergyHistory: '', // 过敏史
|
||||
examinationPurpose: '', // 检查目的
|
||||
medicalHistorySummary: '', // 病史摘要
|
||||
expectedExaminationTime: '', // 期望检查时间
|
||||
symptom: '', // 症状
|
||||
sign: '', // 体征
|
||||
clinicalDiagnosis: '', // 临床诊断
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<Advice ref="adviceRef" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="医技报告" name="fourth">Task</el-tab-pane> -->
|
||||
<el-tab-pane label="检验申请" name="test">
|
||||
<el-tab-pane label="检验申请" name="test">
|
||||
<TestApplication ref="testApplicationRef" :show-status-column="false" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="检查申请" name="examine">
|
||||
@@ -44,14 +44,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {computed, onBeforeMount, onMounted, provide, reactive, ref, watch,} from 'vue';
|
||||
|
||||
import Emr from './emr/index.vue';
|
||||
import inPatientBarDoctorFold from '@/component
|
||||
```
|
||||
import { computed, onBeforeMount, onMounted, provide, reactive, ref, watch } from 'vue';
|
||||
|
||||
import Emr from './emr/index.vue';
|
||||
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
|
||||
import SummaryDrugApplication from './components/applicationShow/summaryDrugApplication.vue';
|
||||
import PatientList from '@/components/PatientList/patient-list.vue';
|
||||
import {localPatientInfo, updateLocalPatientInfo} from './store/localPatient';
|
||||
import {patientInfo, updatePatientInfo} from './store/patient';
|
||||
@@ -86,6 +83,7 @@ const currentPatientInfo = ref({});
|
||||
const testApplicationRef = ref();
|
||||
const examineApplicationRef = ref();
|
||||
const surgeryApplicationRef = ref();
|
||||
const summaryDrugApplicationRef = ref();
|
||||
const bloodTtransfusionAapplicationRef = ref();
|
||||
|
||||
// 患者列表相关逻辑
|
||||
|
||||
@@ -67,8 +67,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
<div
|
||||
style="padding: 10px; background-color: #eef9fd; height: 100%; overflow-y: auto"
|
||||
v-loading="loading"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user