|
@@ -1,201 +1,174 @@
|
|
|
<template>
|
|
|
- <page-layer>
|
|
|
- <template #header>
|
|
|
- 指定入院
|
|
|
- <el-date-picker
|
|
|
- type="date"
|
|
|
- :clearable="false"
|
|
|
- style="width: 120px"
|
|
|
- v-model="date"/>
|
|
|
- 时间患者
|
|
|
- <el-button @click="confirmToModifyTheAdmissionTime">确定</el-button>
|
|
|
- <el-button type="primary" @click="queryQualityControlData">查询质控数据</el-button>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #main>
|
|
|
- <el-tabs>
|
|
|
- <el-tab-pane label="质控">
|
|
|
- <xc-dialog-v2 v-model="dialog"
|
|
|
- title="病历时效限制">
|
|
|
- <el-form :label-width="120">
|
|
|
-
|
|
|
- <el-form-item label="质控名称:">
|
|
|
- <el-input v-model="ruleForm.name"/>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="入参数据元:">
|
|
|
- <el-select v-model="ruleForm.sql" ref="selectRef">
|
|
|
- <el-option v-for="item in ruleDataElement"
|
|
|
- :label="item.name"
|
|
|
- :value="item.sql_sentence"
|
|
|
- :key="item.sql_sentence"
|
|
|
- :title="item.group_name"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="住院医师(小时):">
|
|
|
- <el-input v-model.number="ruleForm.prescription">
|
|
|
- <template #prepend>
|
|
|
- {{ selectRef?.selectedLabel + '/' }} 创建时间
|
|
|
- </template>
|
|
|
- <template #append> 小时后</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="上级医生(小时):">
|
|
|
- <el-input v-model.number="ruleForm.superiorDoctorTime">
|
|
|
- <template #prepend>
|
|
|
- {{ selectRef?.selectedLabel + '/' }} 创建时间
|
|
|
- </template>
|
|
|
- <template #append> 小时后</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="病历编码:">
|
|
|
- <el-tree-select
|
|
|
- style="width: 100%"
|
|
|
- class="tree-select"
|
|
|
- v-model="ruleForm.medicalRecordCode"
|
|
|
- :data="emrTree"
|
|
|
- multiple
|
|
|
- :props="defaultProps"
|
|
|
- check-strictly
|
|
|
- :render-after-expand="false">
|
|
|
- </el-tree-select>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="提示语:">
|
|
|
- <el-input v-model="ruleForm.promptStatement" show-word-limit maxlength="50"/>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item>
|
|
|
- <el-switch
|
|
|
- v-model="ruleForm.offOrOnRule"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
- active-text="开启"
|
|
|
- inactive-text="关闭"/>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <template #footer>
|
|
|
- <el-button @click="cancel">取消</el-button>
|
|
|
- <el-button v-if="ruleForm.id == null" @click="confirm">确认</el-button>
|
|
|
- <el-button v-else @click="modify">修改</el-button>
|
|
|
- </template>
|
|
|
-
|
|
|
- </xc-dialog-v2>
|
|
|
- <xc-table :local-data="data" :height="150">
|
|
|
- <el-table-column label="质控名称" prop="name"/>
|
|
|
- <el-table-column label="时效(小时)" prop="prescription"/>
|
|
|
- <el-table-column label="上级医生时效(小时)" prop="superiorDoctorTime"/>
|
|
|
- <el-table-column label="描述" prop="promptStatement"/>
|
|
|
- <el-table-column label="是否开启" prop="offOrOnRule">
|
|
|
- <template #default="{row}">
|
|
|
- <el-switch
|
|
|
- v-model="row.offOrOnRule"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0"
|
|
|
- @change="onOff(row.id,row.offOrOnRule)"
|
|
|
- active-text="开启"
|
|
|
- inactive-text="关闭"/>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template #default="{row}">
|
|
|
- <el-button type="danger" @click="deleteQualityControl(row.id)">删除</el-button>
|
|
|
- <el-button type="warning" @click="clickModifyButton(row)">修改</el-button>
|
|
|
- <el-button type="primary" @click="newlyAdded">新增</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </xc-table>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="质控数据">
|
|
|
- <xc-table :local-data="rulePatInfoData" :height="150">
|
|
|
- <el-table-column label="住院号" prop="inpatientNo"/>
|
|
|
- <el-table-column label="次数" prop="admissTimes"/>
|
|
|
- <el-table-column label="姓名" prop="name"/>
|
|
|
- <el-table-column label="科室名称" prop="deptName"/>
|
|
|
- <el-table-column label="管床医生" prop="tubeBedDoctorName"/>
|
|
|
- <el-table-column label="入院时间" prop="admissDate"/>
|
|
|
- <el-table-column label="入院诊断" prop="diagnosisOfAdmission"/>
|
|
|
- <el-table-column label="病室" prop="medicalHistoryTyping"/>
|
|
|
- <el-table-column label="提示语句" prop="promptStatements"/>
|
|
|
- <el-table-column label="消息" prop="message"/>
|
|
|
- </xc-table>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </template>
|
|
|
-
|
|
|
- </page-layer>
|
|
|
+ <page-layer>
|
|
|
+ <template #header>
|
|
|
+ 指定入院
|
|
|
+ <el-date-picker
|
|
|
+ type="date"
|
|
|
+ :clearable="false"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model="date"/>
|
|
|
+ 时间患者
|
|
|
+ <el-button @click="confirmToModifyTheAdmissionTime">确定</el-button>
|
|
|
+ <el-button type="primary" @click="queryQualityControlData">查询质控数据</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #main>
|
|
|
+ <el-tabs>
|
|
|
+ <el-tab-pane label="质控">
|
|
|
+ <xc-dialog-v2 v-model="dialog"
|
|
|
+ title="病历时效限制">
|
|
|
+ <el-form :label-width="120">
|
|
|
+
|
|
|
+ <el-form-item label="质控名称:">
|
|
|
+ <el-input v-model="ruleForm.name"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="入参数据元:">
|
|
|
+ <el-select v-model="ruleForm.sql" ref="selectRef">
|
|
|
+ <el-option v-for="item in ruleDataElement"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.sql_sentence"
|
|
|
+ :key="item.sql_sentence"
|
|
|
+ :title="item.group_name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="住院医师(小时):">
|
|
|
+ <el-input v-model.number="ruleForm.prescription">
|
|
|
+ <template #prepend>
|
|
|
+ {{ selectRef?.selectedLabel + '/' }} 创建时间
|
|
|
+ </template>
|
|
|
+ <template #append> 小时后</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="上级医生(小时):">
|
|
|
+ <el-input v-model.number="ruleForm.superiorDoctorTime">
|
|
|
+ <template #prepend>
|
|
|
+ {{ selectRef?.selectedLabel + '/' }} 创建时间
|
|
|
+ </template>
|
|
|
+ <template #append> 小时后</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="病历编码:">
|
|
|
+ <el-tree-select
|
|
|
+ style="width: 100%"
|
|
|
+ class="tree-select"
|
|
|
+ v-model="ruleForm.medicalRecordCode"
|
|
|
+ :data="emrTree"
|
|
|
+ multiple
|
|
|
+ :props="defaultProps"
|
|
|
+ check-strictly
|
|
|
+ :render-after-expand="false">
|
|
|
+ </el-tree-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="提示语:">
|
|
|
+ <el-input v-model="ruleForm.promptStatement" show-word-limit maxlength="50"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-switch
|
|
|
+ v-model="ruleForm.offOrOnRule"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ active-text="开启"
|
|
|
+ inactive-text="关闭"/>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="cancel">取消</el-button>
|
|
|
+ <el-button v-if="ruleForm.id == null" @click="confirm">确认</el-button>
|
|
|
+ <el-button v-else @click="modify">修改</el-button>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </xc-dialog-v2>
|
|
|
+ <xc-table :local-data="data" :height="150">
|
|
|
+ <el-table-column label="质控名称" prop="name"/>
|
|
|
+ <el-table-column label="时效(小时)" prop="prescription"/>
|
|
|
+ <el-table-column label="上级医生时效(小时)" prop="superiorDoctorTime"/>
|
|
|
+ <el-table-column label="描述" prop="promptStatement"/>
|
|
|
+ <el-table-column label="是否开启" prop="offOrOnRule">
|
|
|
+ <template #default="{row}">
|
|
|
+ <el-switch
|
|
|
+ v-model="row.offOrOnRule"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ @change="onOff(row.id,row.offOrOnRule)"
|
|
|
+ active-text="开启"
|
|
|
+ inactive-text="关闭"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template #default="{row}">
|
|
|
+ <el-button type="danger" @click="deleteQualityControl(row.id)">删除</el-button>
|
|
|
+ <el-button type="warning" @click="clickModifyButton(row)">修改</el-button>
|
|
|
+ <el-button type="primary" @click="newlyAdded">新增</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </xc-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="质控数据">
|
|
|
+ <xc-table :local-data="rulePatInfoData" :height="150">
|
|
|
+ <el-table-column label="住院号" prop="inpatientNo"/>
|
|
|
+ <el-table-column label="次数" prop="admissTimes"/>
|
|
|
+ <el-table-column label="姓名" prop="name"/>
|
|
|
+ <el-table-column label="科室名称" prop="deptName"/>
|
|
|
+ <el-table-column label="管床医生" prop="tubeBedDoctorName"/>
|
|
|
+ <el-table-column label="入院时间" prop="admissDate"/>
|
|
|
+ <el-table-column label="入院诊断" prop="diagnosisOfAdmission"/>
|
|
|
+ <el-table-column label="病室" prop="medicalHistoryTyping"/>
|
|
|
+ <el-table-column label="提示语句" prop="promptStatements"/>
|
|
|
+ <el-table-column label="消息" prop="message"/>
|
|
|
+ </xc-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </page-layer>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
-<script setup name='EmrControlRule' lang="ts">
|
|
|
+<script setup name='EmrControlRule'>
|
|
|
import XcTable from "@/components/xiao-chan/xc-table/XcTable.vue";
|
|
|
-import {nextTick, onMounted, Ref, ref} from "vue";
|
|
|
+import {onMounted, ref} from "vue";
|
|
|
import XcDialogV2 from "@/components/xiao-chan/dialog/XcDialogV2.vue";
|
|
|
import {
|
|
|
- getEmrTree,
|
|
|
+ getEmrTree,
|
|
|
} from "@/api/zhu-yuan-yi-sheng/emr-patient";
|
|
|
import {
|
|
|
- addRule,
|
|
|
- getAvailableObjects,
|
|
|
- hospitalWidePatients,
|
|
|
- getRuleList,
|
|
|
- switchQualityControl,
|
|
|
- deleteRuleById,
|
|
|
- modifyQualityControl,
|
|
|
- modifyTheAdmissionQualityControlTime,
|
|
|
- getAdmissDate
|
|
|
+ addRule,
|
|
|
+ getAvailableObjects,
|
|
|
+ hospitalWidePatients,
|
|
|
+ getRuleList,
|
|
|
+ switchQualityControl,
|
|
|
+ deleteRuleById,
|
|
|
+ modifyQualityControl,
|
|
|
+ modifyTheAdmissionQualityControlTime,
|
|
|
+ getAdmissDate
|
|
|
} from '@/api/zhu-yuan-yi-sheng/emr-control-rule'
|
|
|
import {ElMessageBox} from "element-plus";
|
|
|
import {formatDate} from "@/utils/date";
|
|
|
import PageLayer from "@/layout/PageLayer.vue";
|
|
|
|
|
|
-const data: Ref<Array<any>> = ref([])
|
|
|
-const dialog: Ref<boolean> = ref(false)
|
|
|
+const data = ref([])
|
|
|
+const dialog = ref(false)
|
|
|
const emrTree = ref([])
|
|
|
-const ruleDataElement: Ref<Array<any>> = ref([])
|
|
|
-const date: Ref<Date> = ref()
|
|
|
+const ruleDataElement = ref([])
|
|
|
+const date = ref()
|
|
|
const rulePatInfoData = ref([])
|
|
|
|
|
|
const defaultProps = {
|
|
|
- children: 'children',
|
|
|
- label: 'name',
|
|
|
- value: 'code',
|
|
|
+ children: 'children',
|
|
|
+ label: 'name',
|
|
|
+ value: 'code',
|
|
|
}
|
|
|
|
|
|
-interface ruleFormClass {
|
|
|
- id: string
|
|
|
- medicalRecordCode: Array<string>
|
|
|
- type: number
|
|
|
- offOrOnRule: number
|
|
|
- promptStatement: string
|
|
|
- name: string
|
|
|
- sql: string
|
|
|
- prescription: number
|
|
|
- superiorDoctorTime: number
|
|
|
-}
|
|
|
-
|
|
|
-const ruleForm: Ref<ruleFormClass> = ref({
|
|
|
- id: null,
|
|
|
- type: 1,
|
|
|
- medicalRecordCode: [],
|
|
|
- offOrOnRule: 1,
|
|
|
- promptStatement: '',
|
|
|
- name: '',
|
|
|
- sql: '',
|
|
|
- prescription: 24,
|
|
|
- superiorDoctorTime: 24,
|
|
|
-})
|
|
|
-
|
|
|
-const selectRef = ref(null)
|
|
|
-
|
|
|
-const cancel = () => {
|
|
|
- ruleForm.value = <ruleFormClass>{
|
|
|
+const ruleForm = ref({
|
|
|
id: null,
|
|
|
type: 1,
|
|
|
medicalRecordCode: [],
|
|
@@ -205,76 +178,88 @@ const cancel = () => {
|
|
|
sql: '',
|
|
|
prescription: 24,
|
|
|
superiorDoctorTime: 24,
|
|
|
- }
|
|
|
- dialog.value = false
|
|
|
+})
|
|
|
+
|
|
|
+const selectRef = ref(null)
|
|
|
+
|
|
|
+const cancel = () => {
|
|
|
+ ruleForm.value = {
|
|
|
+ id: null,
|
|
|
+ type: 1,
|
|
|
+ medicalRecordCode: [],
|
|
|
+ offOrOnRule: 1,
|
|
|
+ promptStatement: '',
|
|
|
+ name: '',
|
|
|
+ sql: '',
|
|
|
+ prescription: 24,
|
|
|
+ superiorDoctorTime: 24,
|
|
|
+ }
|
|
|
+ dialog.value = false
|
|
|
}
|
|
|
|
|
|
const confirm = () => {
|
|
|
- ruleForm.value.type = 1
|
|
|
- addRule(ruleForm.value)
|
|
|
+ ruleForm.value.type = 1
|
|
|
+ addRule(ruleForm.value)
|
|
|
}
|
|
|
|
|
|
const modify = async () => {
|
|
|
- await modifyQualityControl(ruleForm.value)
|
|
|
- cancel()
|
|
|
- await queryRule()
|
|
|
+ await modifyQualityControl(ruleForm.value)
|
|
|
+ cancel()
|
|
|
+ await queryRule()
|
|
|
}
|
|
|
|
|
|
const newlyAdded = () => {
|
|
|
- cancel()
|
|
|
- dialog.value = true
|
|
|
+ cancel()
|
|
|
+ dialog.value = true
|
|
|
}
|
|
|
|
|
|
const onOff = async (id, val) => {
|
|
|
- await switchQualityControl(id, val)
|
|
|
+ await switchQualityControl(id, val)
|
|
|
}
|
|
|
|
|
|
const deleteQualityControl = (val) => {
|
|
|
-
|
|
|
- ElMessageBox.confirm('是否要删除该质控!', '提示', {
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- deleteRuleById(val)
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
+ ElMessageBox.confirm('是否要删除该质控!', '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ deleteRuleById(val)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
|
|
|
const clickModifyButton = (val) => {
|
|
|
- ruleForm.value = val
|
|
|
- dialog.value = true
|
|
|
+ ruleForm.value = val
|
|
|
+ dialog.value = true
|
|
|
}
|
|
|
|
|
|
const queryRule = () => {
|
|
|
- getRuleList().then((res) => {
|
|
|
- data.value = res as any
|
|
|
- })
|
|
|
- getAdmissDate().then((res) => {
|
|
|
- date.value = res as Date
|
|
|
- })
|
|
|
+ getRuleList().then((res) => {
|
|
|
+ data.value = res
|
|
|
+ })
|
|
|
+ getAdmissDate().then((res) => {
|
|
|
+ date.value = res
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
|
|
|
const confirmToModifyTheAdmissionTime = () => {
|
|
|
- modifyTheAdmissionQualityControlTime(formatDate(date.value))
|
|
|
+ modifyTheAdmissionQualityControlTime(formatDate(date.value))
|
|
|
}
|
|
|
|
|
|
const queryQualityControlData = () => {
|
|
|
- hospitalWidePatients().then((res) => {
|
|
|
- rulePatInfoData.value = res as any
|
|
|
- })
|
|
|
+ hospitalWidePatients().then((res) => {
|
|
|
+ rulePatInfoData.value = res
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- getEmrTree('hosp').then((res) => {
|
|
|
- emrTree.value = res.all[0].children
|
|
|
- })
|
|
|
- queryRule()
|
|
|
- getAvailableObjects().then((res) => {
|
|
|
- ruleDataElement.value = res as any
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
+ getEmrTree('hosp').then((res) => {
|
|
|
+ emrTree.value = res.all[0].children
|
|
|
+ })
|
|
|
+ queryRule()
|
|
|
+ getAvailableObjects().then((res) => {
|
|
|
+ ruleDataElement.value = res
|
|
|
+ })
|
|
|
})
|
|
|
|
|
|
</script>
|