SettleVerification.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. <template>
  2. <div class="layout_display_flex_y">
  3. <div class="m-b_8px round-header">
  4. <el-select v-model="inOutFlag" style="width: 80px" @change="handleInOutStatusChange">
  5. <el-option :value="1" label="未结算"></el-option>
  6. <el-option :value="2" label="已结算"></el-option>
  7. </el-select>
  8. <span v-show="inOutFlag === 2">
  9. <el-date-picker type="daterange" v-model="disdateRange" style="width: 180px"
  10. @change="handleDisdateRangeChange"></el-date-picker>
  11. </span>
  12. <span v-show="inOutFlag === 1">
  13. <el-select v-model="medType" placeholder="医疗类别" style="width: 100px" clearable>
  14. <el-option v-for="item in trueMedTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
  15. </el-select>
  16. <el-select v-model="statusFlag" placeholder="审核状态" style="width: 90px" clearable>
  17. <el-option v-for="item in statusFlags" :key="item.code" :label="item.name" :value="item.code"></el-option>
  18. </el-select>
  19. </span>
  20. <el-input clearable v-model="patNo" placeholder="住院号筛选" style="width: 100px"></el-input>
  21. <el-divider direction="vertical"></el-divider>
  22. <el-button type="success" icon="Document" :disabled="currentApply.medType === '42'" @click="feeDtle">
  23. 医保费用明细
  24. </el-button>
  25. <el-button type="primary" icon="User" @click="checkIdInfo">身份信息</el-button>
  26. <el-button type="primary" icon="Tickets" :disabled="injuryMode" @click="beforeGetTreatinfo">待遇检查</el-button>
  27. <el-button type="success" icon="Check" @click="beforeHandleApply(true)">审核通过</el-button>
  28. <el-button type="danger" icon="Close" @click="beforeHandleApply(false)">审核不通过</el-button>
  29. </div>
  30. <div class="layout_display_flex">
  31. <div style="margin-right: 8px">
  32. <el-table
  33. :data="cptApplies"
  34. height="100%"
  35. stripe
  36. highlight-current-row
  37. @row-click="handleClickSettleApply">
  38. <el-table-column label="姓名" width="65">
  39. <template #default="scope">
  40. <div style="display: flex; align-items: center">
  41. <img class="sex-icon" :src="scope.row.gender === 1 ? maleIcon : femaleIcon"/>
  42. {{ scope.row.name }}
  43. </div>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="住院号" width="80" align="center">
  47. <template #default="scope">
  48. <span v-html="getStatusFlag(scope.row.status, scope.row.patNo, scope.row.times)"></span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column prop="wardName" label="病房" width="100"></el-table-column>
  52. <el-table-column label="历史" width="40">
  53. <template #default="scope">
  54. <el-button :icon="Search" circle @click.stop="getApplyHistories(scope.row)"></el-button>
  55. </template>
  56. </el-table-column>
  57. </el-table>
  58. </div>
  59. <div class="layout_display_flex_y layout_flex_1-x">
  60. <el-divider content-position="left" class="el-divider_shorter">
  61. 患者基本信息
  62. </el-divider>
  63. <div>
  64. <span v-show="currentApply.patNo" style="margin-left: 20px">
  65. <span>明细总费用:</span>
  66. <el-tag type="info" effect="dark">{{ currentApply.detailTotalCharge }}</el-tag>
  67. <span style="margin-left: 12px">账页总费用:</span>
  68. <el-tag type="info" effect="dark">{{ currentApply.ledgerTotalCharge }}</el-tag>
  69. <span style="margin-left: 12px">医保总费用:</span>
  70. <el-tag type="info" effect="dark">{{ currentApply.medinsTotalCharge }}</el-tag>
  71. <span style="margin-left: 12px">医保报销费用:</span>
  72. <el-tag type="info" effect="dark">{{ currentApply.fundpay }} , {{
  73. currentApply.fundpayPercentage
  74. }}</el-tag>
  75. </span>
  76. <el-descriptions :column="4" border>
  77. <el-descriptions-item>
  78. <template #label> 住院号</template>
  79. {{ patient.inpatientNo }}
  80. </el-descriptions-item>
  81. <el-descriptions-item>
  82. <template #label> 住院次数</template>
  83. {{ patient.admissTimes }}
  84. </el-descriptions-item>
  85. <el-descriptions-item>
  86. <template #label> 身份证号</template>
  87. {{ patient.socialNo }}
  88. </el-descriptions-item>
  89. <el-descriptions-item>
  90. <template #label> 姓名</template>
  91. {{ patient.name }}
  92. </el-descriptions-item>
  93. <el-descriptions-item>
  94. <template #label> 性别</template>
  95. {{ patient.sex ? (patient.sex === 1 ? '男' : '女') : '' }}
  96. </el-descriptions-item>
  97. <el-descriptions-item>
  98. <template #label> 病区</template>
  99. {{ patient.admissWardName }}
  100. </el-descriptions-item>
  101. <el-descriptions-item>
  102. <template #label> 小科室</template>
  103. {{ patient.smallDeptName }}
  104. </el-descriptions-item>
  105. <el-descriptions-item>
  106. <template #label> 入院医生</template>
  107. {{ patient.admissPhysicianName }}
  108. </el-descriptions-item>
  109. <el-descriptions-item>
  110. <template #label> 管床医生</template>
  111. {{ patient.referPhysicianName }}
  112. </el-descriptions-item>
  113. <el-descriptions-item>
  114. <template #label> 床位</template>
  115. {{ patient.bedNo }}
  116. </el-descriptions-item>
  117. <el-descriptions-item>
  118. <template #label> 入院日期</template>
  119. {{ patient.admissDate }}
  120. </el-descriptions-item>
  121. <el-descriptions-item>
  122. <template #label> 登记日期</template>
  123. {{ patient.ybRegisterDate }}
  124. </el-descriptions-item>
  125. </el-descriptions>
  126. </div>
  127. <el-divider content-position="left" class="el-divider_shorter">
  128. 出院结算/中间断账申请信息
  129. </el-divider>
  130. <div>
  131. <el-descriptions :column="4" border>
  132. <el-descriptions-item>
  133. <template #label> 申请类别</template>
  134. {{ currentApply.type === 1 ? '出院结算' : '中间断账' }}
  135. </el-descriptions-item>
  136. <el-descriptions-item>
  137. <template #label> {{ currentApply.type === 1 ? '出院时间' : '断账时间' }}</template>
  138. {{ currentApply.settleDatetime }}
  139. </el-descriptions-item>
  140. <el-descriptions-item>
  141. <template #label> 医疗类别</template>
  142. {{ currentApply.medTypeName }}
  143. </el-descriptions-item>
  144. <el-descriptions-item>
  145. <template #label> 险种类型</template>
  146. {{ currentApply.insutypeName }}
  147. </el-descriptions-item>
  148. <el-descriptions-item>
  149. <template #label> 参保地区</template>
  150. {{ currentApply.insuplcAdmdvsName }}
  151. </el-descriptions-item>
  152. <el-descriptions-item>
  153. <template #label> 申请人</template>
  154. {{ currentApply.inputName }}
  155. </el-descriptions-item>
  156. <el-descriptions-item>
  157. <template #label> 申请时间</template>
  158. {{ currentApply.inputDatetime }}
  159. </el-descriptions-item>
  160. <el-descriptions-item>
  161. <template #label> 申请理由</template>
  162. {{ currentApply.inputComment }}
  163. </el-descriptions-item>
  164. <el-descriptions-item>
  165. <template #label> 使用个账</template>
  166. {{ filterAcctUsedFlag(currentApply.acctUsedFlag) }}
  167. </el-descriptions-item>
  168. <el-descriptions-item>
  169. <template #label> 处理人</template>
  170. {{ currentApply.handleStaffName }}
  171. </el-descriptions-item>
  172. <el-descriptions-item>
  173. <template #label> 处理时间</template>
  174. {{ currentApply.handleDatetime }}
  175. </el-descriptions-item>
  176. <el-descriptions-item>
  177. <template #label> 处理意见</template>
  178. {{ currentApply.handleComment }}
  179. </el-descriptions-item>
  180. </el-descriptions>
  181. </div>
  182. <div class="layout_display_flex layout_flex_1-y">
  183. <div class="layout_display_flex_y layout_flex_1-x" style="margin-right: 8px">
  184. <el-divider content-position="left" class="el-divider_shorter">
  185. 医保入院诊断
  186. </el-divider>
  187. <div class="layout_flex_1-y">
  188. <el-table :data="zyInYbDiags" stripe height="100%">
  189. <el-table-column prop="diagNo" label="序号" width="35"></el-table-column>
  190. <el-table-column prop="icdCode" label="诊断编码" width="80"></el-table-column>
  191. <el-table-column prop="icdText" label="诊断名称"></el-table-column>
  192. <el-table-column prop="opDate" label="诊断时间"></el-table-column>
  193. <el-table-column prop="operName" label="录入人" width="50"></el-table-column>
  194. </el-table>
  195. </div>
  196. </div>
  197. <div class="layout_display_flex_y layout_flex_1-x">
  198. <el-divider content-position="left" class="el-divider_shorter">
  199. 医保出院诊断
  200. </el-divider>
  201. <div class="layout_flex_1-y">
  202. <el-table :data="zyDisDiags" stripe height="100%">
  203. <el-table-column prop="disDiagNo" label="序号" width="35"></el-table-column>
  204. <el-table-column prop="disDiag" label="诊断编码" width="80"></el-table-column>
  205. <el-table-column prop="disDiagComment" label="诊断名称"></el-table-column>
  206. <el-table-column prop="opDiagDate" label="诊断时间"></el-table-column>
  207. <el-table-column prop="opName" label="录入人" width="50"></el-table-column>
  208. <el-table-column prop="ssfz" label="分值"></el-table-column>
  209. </el-table>
  210. </div>
  211. </div>
  212. </div>
  213. <el-divider content-position="left" class="el-divider_shorter">
  214. 患者手术记录
  215. </el-divider>
  216. <div class="layout_flex_1-y">
  217. <el-table :data="zySurgeries" stripe height="100%">
  218. <el-table-column prop="ssxh" label="手术序号"></el-table-column>
  219. <el-table-column prop="ssbm" label="手术编码"></el-table-column>
  220. <el-table-column prop="ssmc" label="手术名称"></el-table-column>
  221. <el-table-column prop="ssrq" label="手术时间"></el-table-column>
  222. <el-table-column prop="ssysName" label="手术医师"></el-table-column>
  223. </el-table>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. <Insuinfo v-if="showPsnInsuinfo" :params="checkTreatmentParams" @close="showPsnInsuinfo = false" @row-click="checkTreatmentinfos"/>
  229. <Treatmentinfo v-if="showTreatmentinfos" :params="checkTreatmentParams" @close="showTreatmentinfos = false"/>
  230. <MedfeeAnalyse v-if="showFeeDetl" type="unsettled" :mdtrt-id="currentApply.mdtrtId" @close="showFeeDetl = false"/>
  231. <IdentifyImage v-if="showIdCardImg" :pat-no="currentApply.patNo" :times="currentApply.times" @close="showIdCardImg = false"/>
  232. <el-drawer
  233. v-model="showHistories"
  234. title="审核历史"
  235. direction="ltr"
  236. size="35%"
  237. >
  238. <el-timeline>
  239. <el-timeline-item v-for="item in histories" :timestamp="item.handleDatetime" placement="top">
  240. <el-card>
  241. <h4>{{ item.handleComment || '无' }}</h4>
  242. <p style="width: 100%; text-align: right">处理人:{{ item.handleStaffName || '未处理' }}</p>
  243. </el-card>
  244. </el-timeline-item>
  245. </el-timeline>
  246. </el-drawer>
  247. </template>
  248. <script setup>
  249. import {computed, onActivated, ref} from 'vue'
  250. import maleIcon from '@/assets/male-icon.png'
  251. import femaleIcon from '@/assets/female-icon.png'
  252. import {ElMessage, ElMessageBox} from 'element-plus'
  253. import {
  254. selectUnhandledApplies,
  255. selectPatientInfo,
  256. handleApply,
  257. selectApplyHistories,
  258. selectSettledApplies
  259. } from '@/api/medical-insurance/si-settle-apply'
  260. import {statusFlags, trueMedTypes} from '../../../data/index'
  261. import Insuinfo from '../../../components/medical-insurance/insuinfo/Index.vue'
  262. import Treatmentinfo from '../../../components/medical-insurance/treatmentinfo/Index.vue'
  263. import MedfeeAnalyse from '../../../components/medical-insurance/medfee-analyse/Index.vue'
  264. import IdentifyImage from '../../../components/inpatient/IdentifyImage.vue'
  265. import {Search} from "@element-plus/icons-vue";
  266. import {formatDate, getOneMonthOffset} from "@/utils/date";
  267. import {useMedinsStore} from "@/pinia/medins-store";
  268. const currentApply = ref({})
  269. const showFeeDetl = ref(false)
  270. const inOutFlag = ref(1)
  271. const disdateRange = ref([])
  272. const medType = ref('')
  273. const statusFlag = ref('')
  274. const patNo = ref('')
  275. const patient = ref({})
  276. const zyInYbDiags = ref([])
  277. const zyDisDiags = ref([])
  278. const zySurgeries = ref([])
  279. const allApplies = ref([])
  280. const cptApplies = computed(() => {
  281. return allApplies.value.filter((itm) => {
  282. if ('' !== statusFlag.value) {
  283. return medType.value ? (itm.medType === medType.value && itm.status === statusFlag.value && itm.patNo.indexOf(patNo.value) > -1)
  284. : (itm.status === statusFlag.value && itm.patNo.indexOf(patNo.value) > -1)
  285. } else {
  286. return medType.value ? (itm.medType === medType.value && itm.patNo.indexOf(patNo.value) > -1) : itm.patNo.indexOf(patNo.value) > -1
  287. }
  288. })
  289. })
  290. const feeDtle = () => {
  291. if (!currentApply.value.patNo) {
  292. ElMessage({
  293. message: '请先选择患者',
  294. type: 'warning',
  295. duration: 2500,
  296. showClose: true,
  297. })
  298. return
  299. }
  300. showFeeDetl.value = true
  301. }
  302. const medInsStore = useMedinsStore()
  303. const injuryMode = computed(() => {
  304. return medInsStore.isInjuryMode
  305. })
  306. const currentRow = ref({})
  307. const handleClickSettleApply = (row) => {
  308. row.inOutFlag = inOutFlag.value
  309. medInsStore.setInjuryMode(row.medType === '42')
  310. selectPatientInfo(row).then((res) => {
  311. currentRow.value = row
  312. patient.value = res.patient
  313. currentApply.value = res.apply
  314. zyInYbDiags.value = res.indiags
  315. zyDisDiags.value = res.disdiags
  316. zySurgeries.value = res.surgeries
  317. if (res.warning) {
  318. ElMessage({
  319. message: res.warning,
  320. type: 'warning',
  321. duration: 6000,
  322. showClose: true,
  323. })
  324. }
  325. }).catch(() => {
  326. patient.value = {}
  327. currentApply.value = {}
  328. zyInYbDiags.value = []
  329. zyDisDiags.value = []
  330. zySurgeries.value = []
  331. })
  332. }
  333. const beforeHandleApply = (approve) => {
  334. if (!currentApply.value.patNo) {
  335. ElMessage({
  336. message: '请先选择患者',
  337. type: 'warning',
  338. duration: 2500,
  339. showClose: true,
  340. })
  341. } else {
  342. const title = approve ? '审核通过' : '审核不通过'
  343. let inputVal = approve ? '同意办理。' : ''
  344. ElMessageBox.prompt('请输入处理意见:', title, {
  345. confirmButtonText: '确定',
  346. cancelButtonText: '取消',
  347. inputValue: inputVal,
  348. }).then(({value}) => {
  349. currentApply.value.status = approve ? 1 : 2
  350. currentApply.value.handleComment = value
  351. handleApply(currentApply.value).then((res) => {
  352. currentRow.value.status = currentApply.value.status
  353. ElMessage({
  354. message: res,
  355. type: 'success',
  356. duration: 2500,
  357. showClose: true,
  358. })
  359. })
  360. }).catch(() => {})
  361. }
  362. }
  363. const showIdCardImg = ref(false)
  364. const checkIdInfo = () => {
  365. if (!currentApply.value.patNo) {
  366. ElMessage({
  367. message: '请先选择患者',
  368. type: 'warning',
  369. duration: 2500,
  370. showClose: true,
  371. })
  372. } else {
  373. showIdCardImg.value = true
  374. }
  375. }
  376. const showPsnInsuinfo = ref(false)
  377. const showTreatmentinfos = ref(false)
  378. const checkTreatmentParams = ref({})
  379. const beforeGetTreatinfo = () => {
  380. checkTreatmentParams.value = {
  381. medType: currentApply.value.medType,
  382. patNo: currentApply.value.patNo,
  383. times: currentApply.value.times,
  384. ledgerSn: currentApply.value.ledgerSn,
  385. socialNo: patient.value.socialNo,
  386. name: patient.value.name,
  387. admdvs: patient.value.admdvs,
  388. }
  389. showPsnInsuinfo.value = true
  390. }
  391. const checkTreatmentinfos = (row) => {
  392. checkTreatmentParams.value.psnNo = row.psnNo
  393. checkTreatmentParams.value.begntime = patient.value.ybRegisterDate
  394. checkTreatmentParams.value.insutype = row.insutype
  395. showPsnInsuinfo.value = false
  396. showTreatmentinfos.value = true
  397. }
  398. const showHistories = ref(false)
  399. const histories = ref([])
  400. const getApplyHistories = (row) => {
  401. selectApplyHistories(row).then(res => {
  402. histories.value = res
  403. showHistories.value = true
  404. })
  405. }
  406. const handleInOutStatusChange = (val) => {
  407. if (val === 1) {
  408. selectUnhandledApplies().then((res) => {
  409. allApplies.value = res
  410. });
  411. } else {
  412. const params = {start: disdateRange.value[0], end: disdateRange.value[1]}
  413. selectSettledApplies(params).then(res => {
  414. allApplies.value = res
  415. })
  416. }
  417. }
  418. const handleDisdateRangeChange = (val) => {
  419. disdateRange.value[0] = formatDate(val[0])
  420. disdateRange.value[1] = formatDate(val[1])
  421. const params = {start: disdateRange.value[0], end: disdateRange.value[1]}
  422. selectSettledApplies(params).then(res => {
  423. allApplies.value = res
  424. })
  425. }
  426. onActivated(() => {
  427. selectUnhandledApplies().then((res) => {
  428. allApplies.value = res
  429. })
  430. const month = getOneMonthOffset()
  431. disdateRange.value = [month.start, month.end]
  432. })
  433. const getStatusFlag = (status, patNo, times) => {
  434. // 0:撤销-黑色,1:待审核-橙色,2:已审核-绿色,9:未通过-红色,null/-1:未提交-灰色
  435. switch (status) {
  436. case 0:
  437. return `<span style="color: gray">${patNo}_${times}</span>`
  438. case 1:
  439. return `<span style="color: green">${patNo}_${times}</span>`
  440. case 2:
  441. return `<span style="color: red">${patNo}_${times}</span>`
  442. }
  443. }
  444. function filterAcctUsedFlag(val) {
  445. if (!val) {
  446. return '';
  447. }
  448. switch (val) {
  449. case '0':
  450. return '不使用个账'
  451. case '1':
  452. return '使用本人个账'
  453. case '2':
  454. return '使用共济人个账'
  455. }
  456. }
  457. </script>