feat(cdss): CDSS临床决策支持系统 — 修复API路径+新增规则管理页面
This commit is contained in:
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function evaluateRules(params) {
|
||||
return request({
|
||||
url: '/cdss/evaluate',
|
||||
url: '/infection/cdss/evaluate',
|
||||
method: 'post',
|
||||
params: params
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function evaluateRules(params) {
|
||||
|
||||
export function getAlerts(encounterId, query) {
|
||||
return request({
|
||||
url: '/cdss/alerts/' + encounterId,
|
||||
url: '/infection/cdss/alerts/' + encounterId,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function getAlerts(encounterId, query) {
|
||||
|
||||
export function acknowledgeAlert(id, data) {
|
||||
return request({
|
||||
url: '/cdss/alerts/' + id + '/acknowledge',
|
||||
url: '/infection/cdss/alerts/' + id + '/acknowledge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function getCdssRuleList(query) {
|
||||
return request({
|
||||
url: '/cdss/rules',
|
||||
url: '/infection/cdss/rules',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function getCdssRuleList(query) {
|
||||
|
||||
export function addCdssRule(data) {
|
||||
return request({
|
||||
url: '/cdss/rules',
|
||||
url: '/infection/cdss/rules',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -18,7 +18,7 @@ export function addCdssRule(data) {
|
||||
|
||||
export function updateCdssRule(data) {
|
||||
return request({
|
||||
url: '/cdss/rules',
|
||||
url: '/infection/cdss/rules',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -26,7 +26,7 @@ export function updateCdssRule(data) {
|
||||
|
||||
export function deleteCdssRule(id) {
|
||||
return request({
|
||||
url: '/cdss/rules/' + id,
|
||||
url: '/infection/cdss/rules/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
105
healthlink-his-ui/src/views/cdss/cdssRules/index.vue
Normal file
105
healthlink-his-ui/src/views/cdss/cdssRules/index.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="规则类型" prop="ruleType">
|
||||
<el-select v-model="queryParams.ruleType" placeholder="请选择" clearable style="width: 140px">
|
||||
<el-option label="药物审查" value="DRUG_REVIEW" />
|
||||
<el-option label="诊断提示" value="DIAGNOSIS" />
|
||||
<el-option label="检验预警" value="LAB_ALERT" />
|
||||
<el-option label="用药禁忌" value="CONTRAINDICATION" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="严重程度" prop="severity">
|
||||
<el-select v-model="queryParams.severity" placeholder="请选择" clearable style="width: 140px">
|
||||
<el-option label="CRITICAL" value="CRITICAL" />
|
||||
<el-option label="HIGH" value="HIGH" />
|
||||
<el-option label="MEDIUM" value="MEDIUM" />
|
||||
<el-option label="LOW" value="LOW" />
|
||||
<el-option label="INFO" value="INFO" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规则名称" prop="keyword">
|
||||
<el-input v-model="queryParams.keyword" placeholder="搜索规则名称" 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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<vxe-table :data="ruleList" :loading="loading" border stripe height="auto">
|
||||
<vxe-column type="seq" title="序号" width="70" />
|
||||
<vxe-column field="ruleCode" title="规则编码" width="120" />
|
||||
<vxe-column field="ruleName" title="规则名称" min-width="180" show-overflow />
|
||||
<vxe-column field="ruleType" title="规则类型" width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="small">{{ row.ruleType }}</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="severity" title="严重程度" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="severityTagType(row.severity)" effect="dark">{{ row.severity }}</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="conditionExpr" title="条件表达式" min-width="200" show-overflow />
|
||||
<vxe-column field="actionExpr" title="执行动作" min-width="200" show-overflow />
|
||||
<vxe-column field="status" title="状态" width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.status === 1 ? 'success' : 'info'">{{ row.status === 1 ? '启用' : '停用' }}</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="sortOrder" title="排序" width="70" align="center" />
|
||||
</vxe-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="CdssRules">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { getCdssRuleList } from '@/api/cdss/cdssRule'
|
||||
|
||||
const ruleList = ref([])
|
||||
const loading = ref(false)
|
||||
const showSearch = ref(true)
|
||||
|
||||
const queryParams = reactive({
|
||||
ruleType: '',
|
||||
severity: '',
|
||||
keyword: ''
|
||||
})
|
||||
|
||||
const severityTagType = (severity) => {
|
||||
const map = { CRITICAL: 'danger', HIGH: 'warning', MEDIUM: '', LOW: 'info', INFO: 'info' }
|
||||
return map[severity] || 'info'
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const params = {}
|
||||
if (queryParams.ruleType) params.ruleType = queryParams.ruleType
|
||||
if (queryParams.severity) params.severity = queryParams.severity
|
||||
if (queryParams.keyword) params.keyword = queryParams.keyword
|
||||
const res = await getCdssRuleList(params)
|
||||
if (res.code === 200) {
|
||||
ruleList.value = res.data || []
|
||||
}
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const handleQuery = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
const resetQuery = () => {
|
||||
queryParams.ruleType = ''
|
||||
queryParams.severity = ''
|
||||
queryParams.keyword = ''
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user