AdmissVerification.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. <template>
  2. <el-container>
  3. <el-header>
  4. <el-select v-model="medType" placeholder="医疗类别" style="width: 145px" clearable>
  5. <el-option v-for="item in needVerifyMedTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
  6. </el-select>
  7. <el-select v-model="statusFlag" placeholder="审核状态" style="width: 100px" clearable>
  8. <el-option v-for="item in statusFlags" :key="item.code" :label="item.name" :value="item.code"></el-option>
  9. </el-select>
  10. <el-select v-show="injuryMode" v-model="patient.injuryArea" placeholder="工伤参保地" style="width: 120px">
  11. <el-option v-for="item in injuryAreas" :key="item.code" :label="item.name" :value="item.code"></el-option>
  12. </el-select>
  13. <el-button style="margin-left: 10px" type="primary" icon="Tickets" @click="getPsnInsuinfo(1)">待遇检查</el-button>
  14. <el-button type="primary" icon="User" @click="checkIdCard">身份信息</el-button>
  15. <ReadCard :pat-no="patient.inpatientNo" biztype="01103" @success="afterReadCard" />
  16. <el-button type="success" icon="Check" @click="beforeHandleApply(true)">审核通过</el-button>
  17. <el-button type="danger" icon="Close" @click="beforeHandleApply(false)">审核不通过</el-button>
  18. <el-button type="primary" icon="Document" @click="getRegInfo">登记信息</el-button>
  19. </el-header>
  20. <el-main>
  21. <el-container>
  22. <el-aside width="245px">
  23. <el-table :height="tableHeight" :data="cptApplies" stripe highlight-current-row @row-click="handleClickAdmissApply">
  24. <el-table-column label="姓名" width="70">
  25. <template #default="scope">
  26. <div style="display: flex; align-items: center">
  27. <img class="sex-icon" :src="scope.row.gender === 1 ? maleIcon : femaleIcon" />
  28. {{ scope.row.name }}
  29. </div>
  30. </template>
  31. </el-table-column>
  32. <el-table-column label="住院号" width="65" align="center">
  33. <template #default="scope">
  34. <span v-html="getStatusFlag(scope.row.status, scope.row.patNo)"></span>
  35. </template>
  36. </el-table-column>
  37. <el-table-column prop="wardName" label="病房" width="110"></el-table-column>
  38. </el-table>
  39. </el-aside>
  40. <el-main>
  41. <el-tag>患者基本信息</el-tag>
  42. <el-descriptions :column="4" border>
  43. <el-descriptions-item>
  44. <template #label> 住院号 </template>
  45. {{ patient.inpatientNo }}
  46. </el-descriptions-item>
  47. <el-descriptions-item>
  48. <template #label> 住院次数 </template>
  49. {{ patient.admissTimes }}
  50. </el-descriptions-item>
  51. <el-descriptions-item>
  52. <template #label> 身份证号 </template>
  53. {{ patient.socialNo }}
  54. </el-descriptions-item>
  55. <el-descriptions-item>
  56. <template #label> 姓名 </template>
  57. {{ patient.name }}
  58. </el-descriptions-item>
  59. <el-descriptions-item>
  60. <template #label> 性别 </template>
  61. {{ patient.sex === 1 ? '男' : patient.sex === 2 ? '女' : '' }}
  62. </el-descriptions-item>
  63. <el-descriptions-item>
  64. <template #label> 病区 </template>
  65. {{ patient.admissWardName }}
  66. </el-descriptions-item>
  67. <el-descriptions-item>
  68. <template #label> 小科室 </template>
  69. {{ patient.smallDeptName }}
  70. </el-descriptions-item>
  71. <el-descriptions-item>
  72. <template #label> 入院医生 </template>
  73. {{ patient.admissPhysicianName }}
  74. </el-descriptions-item>
  75. <el-descriptions-item>
  76. <template #label> 管床医生 </template>
  77. {{ patient.referPhysicianName }}
  78. </el-descriptions-item>
  79. <el-descriptions-item>
  80. <template #label> 床位 </template>
  81. {{ patient.bedNo }}
  82. </el-descriptions-item>
  83. <el-descriptions-item>
  84. <template #label> 入院日期 </template>
  85. {{ patient.admissDate }}
  86. </el-descriptions-item>
  87. </el-descriptions>
  88. <div style="margin-top: 8px">
  89. <el-tag>入院登记申请信息</el-tag>
  90. <el-descriptions :column="4" border>
  91. <el-descriptions-item>
  92. <template #label> 登记时间 </template>
  93. {{ currentApply.admissDatetime }}
  94. </el-descriptions-item>
  95. <el-descriptions-item>
  96. <template #label> 医疗类别 </template>
  97. {{ currentApply.medTypeName }}
  98. </el-descriptions-item>
  99. <el-descriptions-item>
  100. <template #label> 参保地区 </template>
  101. {{ currentApply.admdvsName }}
  102. </el-descriptions-item>
  103. <el-descriptions-item>
  104. <template #label> 申请人 </template>
  105. {{ currentApply.inputName }}
  106. </el-descriptions-item>
  107. <el-descriptions-item>
  108. <template #label> 申请时间 </template>
  109. {{ currentApply.inputDatetime }}
  110. </el-descriptions-item>
  111. <el-descriptions-item>
  112. <template #label> 申请理由 </template>
  113. {{ currentApply.inputComment }}
  114. </el-descriptions-item>
  115. <el-descriptions-item>
  116. <template #label> 处理人 </template>
  117. {{ currentApply.handleStaffName }}
  118. </el-descriptions-item>
  119. <el-descriptions-item>
  120. <template #label> 处理时间 </template>
  121. {{ currentApply.handleDatetime }}
  122. </el-descriptions-item>
  123. <el-descriptions-item>
  124. <template #label> 处理意见 </template>
  125. {{ currentApply.handleComment }}
  126. </el-descriptions-item>
  127. </el-descriptions>
  128. </div>
  129. <div style="height: 8px"></div>
  130. <el-tag>医保入院诊断</el-tag>
  131. <el-table :data="zyInYbDiags" stripe>
  132. <el-table-column prop="diagNo" label="诊断序号"></el-table-column>
  133. <el-table-column prop="property" label="诊断属性"></el-table-column>
  134. <el-table-column prop="icdCode" label="诊断编码"></el-table-column>
  135. <el-table-column prop="icdText" label="诊断名称"></el-table-column>
  136. <el-table-column label="诊断类别">
  137. <template #default="scope">
  138. {{ getDiagTypeName(scope.row.diagType) }}
  139. </template>
  140. </el-table-column>
  141. <el-table-column prop="opDate" label="诊断时间"></el-table-column>
  142. </el-table>
  143. <Insuinfo v-if="showPsnInsuinfo" :params="checkTreatmentParams" @close="showPsnInsuinfo = false" @row-click="handleClickInsuinfo" />
  144. <Treatmentinfo v-if="showTreatmentinfos" :params="checkTreatmentParams" @close="showTreatmentinfos = false" />
  145. <Registinfo v-if="showRegisterInfo" :params="patient" @close="showRegisterInfo = false"></Registinfo>
  146. <IdentifyImage v-if="showIdCardImg" :pat-no="currentApply.patNo" :times="currentApply.times" @close="showIdCardImg = false"></IdentifyImage>
  147. </el-main>
  148. </el-container>
  149. </el-main>
  150. </el-container>
  151. </template>
  152. <script>
  153. import { computed, onActivated, onMounted, ref } from 'vue'
  154. import store from '@/store'
  155. import maleIcon from '@/assets/male-icon.png'
  156. import femaleIcon from '@/assets/female-icon.png'
  157. import { ElMessage, ElMessageBox } from 'element-plus'
  158. import { getDiagTypes } from '@/api/medical-insurance/si-dict'
  159. import { checkRegisterDate } from '@/api/medical-insurance/si-query'
  160. import { admissRegistration } from '@/api/medical-insurance/si-injury'
  161. import { admissRegister } from '@/api/medical-insurance/si-inpatient'
  162. import { statusFlags, needVerifyMedTypes } from '../../../data/index'
  163. import { selectUnhandledApplies, selectPatientInfo, handleApply } from '../../../api/medical-insurance/si-admiss-apply'
  164. import Insuinfo from '../../../components/medical-insurance/insuinfo/Index.vue'
  165. import Treatmentinfo from '../../../components/medical-insurance/treatmentinfo/Index.vue'
  166. import IdentifyImage from '../../../components/inpatient/IdentifyImage.vue'
  167. import Registinfo from '../../../components/medical-insurance/registinfo/Index.vue'
  168. import ReadCard from '@/components/medical-insurance/readcard/Index.vue'
  169. export default {
  170. components: {
  171. Insuinfo,
  172. Treatmentinfo,
  173. IdentifyImage,
  174. Registinfo,
  175. ReadCard,
  176. },
  177. setup() {
  178. const patient = ref({})
  179. const windowSize = store.state.app.windowSize
  180. const tableHeight = windowSize.h - 50
  181. const psnBaseinfo = ref({})
  182. const showTreatmentinfos = ref(false)
  183. const showPsnInsuinfo = ref(false)
  184. const insuRowClickFlag = ref(null)
  185. const zyInYbDiags = ref([])
  186. const injuryinfo = ref([])
  187. const injuryAreas = initInjuryAreas()
  188. const injuryMode = computed(() => {
  189. return store.state.ptnt.injuryMode
  190. })
  191. const currentApply = ref({})
  192. const medType = ref(null)
  193. const statusFlag = ref('')
  194. const allApplies = ref([])
  195. const cptApplies = computed(() => {
  196. return allApplies.value.filter((itm) => {
  197. if ('' !== statusFlag.value) {
  198. return medType.value ? itm.medType === medType.value && itm.status === statusFlag.value : itm.status === statusFlag.value
  199. } else {
  200. return medType.value ? itm.medType === medType.value : true
  201. }
  202. })
  203. })
  204. const handleClickAdmissApply = (row) => {
  205. store.commit('ptnt/setInjuryMode', row.medType === '42')
  206. selectPatientInfo(row)
  207. .then((res) => {
  208. patient.value = res.patient
  209. currentApply.value = row
  210. zyInYbDiags.value = res.indiags
  211. })
  212. .catch(() => {
  213. patient.value = {}
  214. currentApply.value = {}
  215. zyInYbDiags.value = []
  216. })
  217. }
  218. const beforeHandleApply = (approve) => {
  219. if (!currentApply.value.patNo) {
  220. ElMessage({
  221. message: '请先选择患者',
  222. type: 'warning',
  223. duration: 2500,
  224. showClose: true,
  225. })
  226. return
  227. }
  228. if (!approve) {
  229. ElMessageBox.prompt('请输入处理意见:', '审核不通过', {
  230. confirmButtonText: '确定',
  231. cancelButtonText: '取消',
  232. inputValue: null,
  233. })
  234. .then(({ value }) => {
  235. if (value) {
  236. currentApply.value.status = 2
  237. currentApply.value.handleComment = value
  238. handleApply(currentApply.value).then((res) => {
  239. ElMessage({
  240. message: res,
  241. type: 'success',
  242. duration: 2500,
  243. showClose: true,
  244. })
  245. })
  246. } else {
  247. ElMessage({
  248. message: '处理意见不能为空',
  249. type: 'warning',
  250. duration: 2500,
  251. showClose: true,
  252. })
  253. }
  254. })
  255. .catch(() => {
  256. currentApply.value.status = 0
  257. })
  258. } else {
  259. checkRegisterDate(patient.value.inpatientNo, patient.value.admissTimes).then(() => {
  260. getPsnInsuinfo(2)
  261. })
  262. }
  263. }
  264. const getPsnInsuinfo = (flag) => {
  265. if (!currentApply.value.patNo) {
  266. ElMessage({
  267. message: '请先选择患者',
  268. type: 'warning',
  269. duration: 2500,
  270. showClose: true,
  271. })
  272. return
  273. }
  274. if (injuryMode.value) {
  275. checkTreatmentParams.value = patient.value
  276. showPsnInsuinfo.value = true
  277. } else {
  278. insuRowClickFlag.value = flag
  279. checkTreatmentParams.value = {
  280. medType: patient.value.medType,
  281. patNo: patient.value.inpatientNo,
  282. times: patient.value.admissTimes,
  283. ledgerSn: patient.value.ledgerSn,
  284. socialNo: patient.value.socialNo,
  285. name: patient.value.name,
  286. admdvs: patient.value.admdvs,
  287. needSaving: 1,
  288. }
  289. showPsnInsuinfo.value = true
  290. }
  291. }
  292. const handleClickInjuryinfo = (row) => {
  293. ElMessageBox.confirm('审核通过将直接进行医保入院登记,确定审核通过?', '提示', {
  294. type: 'warning',
  295. confirmButtonText: '确定',
  296. cancelButtonText: '取消',
  297. })
  298. .then(() => {
  299. const param = {
  300. baseinfo: patient.value,
  301. injuryinfo: row,
  302. }
  303. admissRegistration(param).then((res) => {
  304. currentApply.value.status = 1
  305. currentApply.value.handleComment = '同意办理'
  306. handleApply(currentApply.value).then((res) => {
  307. ElMessage({
  308. message: '审核已通过,医保入院登记成功。',
  309. type: 'success',
  310. duration: 2500,
  311. showClose: true,
  312. })
  313. showPsnInsuinfo.value = false
  314. })
  315. })
  316. })
  317. .catch(() => {})
  318. }
  319. const handleClickInsuinfo = (row) => {
  320. if (injuryMode.value) {
  321. handleClickInjuryinfo(row)
  322. } else {
  323. patient.value.psnNo = row.psnNo
  324. if (insuRowClickFlag.value === 1) {
  325. chkTrtmt(row)
  326. } else if (insuRowClickFlag.value === 2) {
  327. admRgstn(row)
  328. }
  329. }
  330. showPsnInsuinfo.value = false
  331. }
  332. const checkTreatmentParams = ref({})
  333. const chkTrtmt = (row) => {
  334. checkTreatmentParams.value.patNo = patient.value.inpatientNo
  335. checkTreatmentParams.value.times = patient.value.admissTimes
  336. checkTreatmentParams.value.psnNo = patient.value.psnNo
  337. checkTreatmentParams.value.medType = patient.value.medType
  338. checkTreatmentParams.value.begntime = patient.value.ybRegisterDate
  339. checkTreatmentParams.value.insutype = row.insutype
  340. showPsnInsuinfo.value = false
  341. showTreatmentinfos.value = true
  342. }
  343. const afterReadCard = (result) => {
  344. patient.value.mdtrtCertType = result.mdtrtCertType
  345. patient.value.readCardResult = result.readCardResult
  346. patient.value.readCardBizType = result.readCardBizType
  347. }
  348. const admRgstn = (row) => {
  349. ElMessageBox.confirm('审核通过将直接进行医保入院登记,确定审核通过?', '提示', {
  350. type: 'warning',
  351. confirmButtonText: '确定',
  352. cancelButtonText: '取消',
  353. })
  354. .then(() => {
  355. patient.value.insutype = row.insutype
  356. patient.value.psnType = row.psnType
  357. patient.value.insuplcAdmdvs = row.insuplcAdmdvs
  358. patient.value.empName = row.empName
  359. admissRegister(patient.value).then(() => {
  360. currentApply.value.status = 1
  361. currentApply.value.handleComment = '同意办理'
  362. handleApply(currentApply.value).then((res) => {
  363. ElMessage({
  364. message: '审核已通过,医保入院登记成功。',
  365. type: 'success',
  366. duration: 2500,
  367. showClose: true,
  368. })
  369. showPsnInsuinfo.value = false
  370. })
  371. })
  372. })
  373. .catch(() => {})
  374. }
  375. const diagTypes = ref([])
  376. const getDiagTypeName = (val) => {
  377. for (let i = 0; i < diagTypes.value.length; i++) {
  378. if (diagTypes.value[i].code === val) {
  379. return diagTypes.value[i].name
  380. }
  381. }
  382. }
  383. const showIdCardImg = ref(false)
  384. const checkIdCard = () => {
  385. if (!currentApply.value.patNo) {
  386. ElMessage({
  387. message: '请先选择患者',
  388. type: 'warning',
  389. duration: 2500,
  390. showClose: true,
  391. })
  392. } else {
  393. showIdCardImg.value = true
  394. }
  395. }
  396. const showRegisterInfo = ref(false)
  397. const getRegInfo = () => {
  398. if (!currentApply.value.patNo) {
  399. ElMessage({
  400. message: '请先选择患者',
  401. type: 'warning',
  402. duration: 2500,
  403. showClose: true,
  404. })
  405. return
  406. }
  407. showRegisterInfo.value = true
  408. }
  409. onActivated(() => {
  410. selectUnhandledApplies().then((res) => {
  411. allApplies.value = res
  412. })
  413. })
  414. onMounted(() => {
  415. getDiagTypes().then((res) => {
  416. diagTypes.value = res
  417. })
  418. })
  419. return {
  420. patient,
  421. medType,
  422. statusFlag,
  423. statusFlags,
  424. injuryAreas,
  425. zyInYbDiags,
  426. tableHeight,
  427. injuryMode,
  428. injuryinfo,
  429. maleIcon,
  430. femaleIcon,
  431. psnBaseinfo,
  432. showPsnInsuinfo,
  433. needVerifyMedTypes,
  434. checkTreatmentParams,
  435. showTreatmentinfos,
  436. getDiagTypeName,
  437. filterYesOrNo,
  438. getPsnInsuinfo,
  439. handleClickInsuinfo,
  440. getStatusFlag,
  441. cptApplies,
  442. currentApply,
  443. handleClickAdmissApply,
  444. showIdCardImg,
  445. checkIdCard,
  446. beforeHandleApply,
  447. getRegInfo,
  448. showRegisterInfo,
  449. afterReadCard,
  450. }
  451. },
  452. }
  453. function initInjuryAreas() {
  454. return [
  455. { code: 1, name: '长沙市' },
  456. { code: 4, name: '长沙县' },
  457. { code: 2, name: '望城县' },
  458. { code: 3, name: '省直' },
  459. ]
  460. }
  461. function filterYesOrNo(val) {
  462. if (val === '0') {
  463. return '否'
  464. } else if (val === '1') {
  465. return '是'
  466. }
  467. return ''
  468. }
  469. function getStatusFlag(status, patNo) {
  470. // 0:撤销-黑色,1:待审核-橙色,2:已审核-绿色,9:未通过-红色,null/-1:未提交-灰色
  471. switch (status) {
  472. case 0:
  473. return `<span style="color: gray">${patNo}</span>`
  474. case 1:
  475. return `<span style="color: green">${patNo}</span>`
  476. case 2:
  477. return `<span style="color: red">${patNo}</span>`
  478. }
  479. }
  480. </script>
  481. <style scoped>
  482. .remark {
  483. padding: 5px 10px;
  484. }
  485. .mt10 {
  486. margin-top: 10px;
  487. }
  488. .yb-tag {
  489. padding: 5px 0 0 20px;
  490. }
  491. </style>