DrgCoding.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938
  1. <template>
  2. <div class="layout_container">
  3. <header class="round-header">
  4. <el-button icon="Search" type="primary" @click="queryTermDialog = true">检索条件</el-button>
  5. <el-divider direction="vertical"></el-divider>
  6. <el-button v-if="auditQuanXian()" :disabled="queryTerm.list.length === 0" icon="Upload" type="success"
  7. @click="upldAllList"> 选中上传
  8. </el-button>
  9. <el-button v-if="auditQuanXian()" :disabled="queryTerm.list.length === 0" icon="Upload" type="warning"
  10. @click="upldSelections"> 全部上传
  11. </el-button>
  12. <el-button v-if="auditQuanXian()" :disabled="queryTerm.list.length === 0" icon="Download" type="success"
  13. @click="exportExcel">导出 Execl
  14. </el-button>
  15. <el-button icon="RefreshLeft" type="primary" @click="queryCurrentPage">刷新数据</el-button>
  16. <el-button v-if="auditQuanXian()" type="success" @click="xianZhiShiJianClick">设置限制时间</el-button>
  17. <el-button type="success" @click="toUploadInfo">上传日志</el-button>
  18. <el-button type="success" @click="toUploadDrgGroupInfo">分组信息</el-button>
  19. <el-button type="success" v-if="bmyQuaXian()" @click="openSetlDeptConfGialog">科室配置</el-button>
  20. <el-button type="success" v-if="shenHeQuanXian()" @click="auditLogDel">删除审核记录</el-button>
  21. <xian-zhi-shi-jian ref="xianZhiShiJian"></xian-zhi-shi-jian>
  22. </header>
  23. <div class="layout_main layout_el-table">
  24. <el-table
  25. ref="tableRef"
  26. :data="queryTerm.list"
  27. border
  28. highlight-current-row
  29. stripe
  30. @selection-change="handleSelectionChange">
  31. <el-table-column fixed type="selection" width="35"></el-table-column>
  32. <el-table-column fixed label="姓名" prop="psnName">
  33. <template #default="scope">
  34. <el-button text @click="jieSuanDanXinXi(scope.row)" type="primary">
  35. <span v-html="auditName(scope.row)"></span>
  36. </el-button>
  37. </template>
  38. </el-table-column>
  39. <el-table-column fixed label="审核状态" prop="auditFlagName">
  40. </el-table-column>
  41. <el-table-column fixed label="质控提醒" prop="qualityReminder" width="100">
  42. <template #default="scope">
  43. <span style="color: red">{{ scope.row.qualityReminder }}</span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column fixed label="已上传能修改提醒" prop="uploadUpdateReminder" width="110">
  47. <template #default="scope">
  48. <span style="color: red">{{ scope.row.uploadUpdateReminder }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column fixed label="上传截止日期" prop="uploadCutoffDate" width="100">
  52. <template #default="scope">
  53. <span style="color: red">{{ scope.row.uploadCutoffDate }}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column fixed label="上传状态" prop="uploadStatus"></el-table-column>
  57. <el-table-column label="出院科室" prop="outDeptName">
  58. <template #default="scope">
  59. <el-button
  60. type="primary"
  61. v-if="scope.row.outDept === dept || auditQuanXian"
  62. text
  63. @click="huoQuXiuGaiYiShen(scope.row.referPhysician, scope.row.referPhysicianName, scope.row.patNo, scope.row.times)"
  64. >
  65. {{ scope.row.outDeptName }}
  66. </el-button>
  67. <span v-else>{{ scope.row.outDeptName }}</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="住院号/门诊号" prop="patNo" width="100"></el-table-column>
  71. <el-table-column label="结算时间" prop="setlTime"></el-table-column>
  72. <el-table-column label="出院时间" prop="disDate"></el-table-column>
  73. <el-table-column label="管床医生" prop="referPhysicianName"></el-table-column>
  74. <el-table-column v-if="bmyQuaXian()" label="编码员备注" prop="bmyBz" width="150">
  75. <template #default="scope">
  76. <el-button
  77. type="primary"
  78. text
  79. @click="bianJiBmyBz(scope.row)"
  80. >
  81. {{ scope.row.bmyBz ? scope.row.bmyBz : '无' }}
  82. </el-button>
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="医疗类别" prop="iptMedType">
  86. <template #default="scope">
  87. <el-button text type="primary" @click="clickToModifyMedicalCategory(scope.row)">
  88. {{ getIptMedName(scope.row.iptMedType) }}
  89. </el-button>
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="治疗方式" prop="operationName"></el-table-column>
  93. <el-table-column label="总费用" prop="medfeeSumamt"></el-table-column>
  94. <el-table-column label="报销金额" prop="fundPaySumamt"></el-table-column>
  95. <el-table-column label="险种类型" prop="insutypeName"></el-table-column>
  96. <el-table-column label="人员类别" prop="psnTypeName"></el-table-column>
  97. <el-table-column label="性别" prop="gendName" width="40"></el-table-column>
  98. <el-table-column label="住院天数" prop="actIptDays"></el-table-column>
  99. <el-table-column label="医疗类别" prop="medTypeName"></el-table-column>
  100. <el-table-column label="清算机构" prop="clrOptinsName"></el-table-column>
  101. <el-table-column label="参保地" prop="insuplcAdmdvsName"></el-table-column>
  102. <el-table-column label="转科室" prop="zhuanKeName"></el-table-column>
  103. <el-table-column label="申请备注" prop="reqRemark"></el-table-column>
  104. <el-table-column v-if="auditQuanXian()" label="结算单" fixed="right" align="center" width="140">
  105. <template #default="scope">
  106. <el-button plain size="small" @click="jieSuanDanClick(scope.row)">查看结算单</el-button>
  107. <el-button plain size="small" @click="getUploadInfo(scope.row)">查看上传信息</el-button>
  108. <el-button plain size="small" @click="getdrgGroupResultInfo(scope.row)">查看分组信息</el-button>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <el-pagination
  113. :current-page="queryTerm.currentPage"
  114. :page-size="queryTerm.pageSize"
  115. :page-sizes="[10, 20, 30, 40, 50, 100]"
  116. :total="queryTerm.total"
  117. layout="total, sizes, prev, pager, next, jumper"
  118. @size-change="handleSizeChange"
  119. @current-change="handleCurrentChange"
  120. >
  121. </el-pagination>
  122. </div>
  123. </div>
  124. <jie-suan-dan-da-ying
  125. v-if="daYingJieSuanDanRef.dialog"
  126. :data="daYingJieSuanDanRef"
  127. @close="daYingJieSuanDanRef.dialog = false"
  128. ></jie-suan-dan-da-ying>
  129. <el-dialog v-model="queryTermDialog" title="数据筛选" width="60%">
  130. <el-form ref="queryTermRef" :model="queryTerm" label-width="120px" size="small">
  131. <el-row>
  132. <el-col :span="spanWidth">
  133. <el-form-item label="日期范围" prop="dateRange">
  134. <el-date-picker
  135. v-model="queryTerm.dateRange"
  136. :shortcuts="clockinShortcuts"
  137. end-placeholder="结束日期"
  138. placeholder="选择日期"
  139. range-separator="至"
  140. size="small"
  141. start-placeholder="开始日期"
  142. type="daterange"
  143. ></el-date-picker>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="spanWidth">
  147. <el-form-item label="结算类型" prop="clrType">
  148. <el-select v-model="queryTerm.clrType" placeholder="结算类别" style="width: 100px">
  149. <el-option v-for="item in clrTypes" :key="item.code" :label="item.name" :value="item.code">
  150. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  151. <el-divider direction="vertical"></el-divider>
  152. <span>{{ item.name }}</span>
  153. </el-option>
  154. </el-select>
  155. </el-form-item>
  156. </el-col>
  157. <el-col :span="spanWidth">
  158. <el-form-item label="住院号" prop="patNo">
  159. <el-input v-model="queryTerm.patNo" clearable placeholder="住院号" style="width: 120px"
  160. @blur="patNo = $event.target.value.trim()" @keyup.enter="query"></el-input>
  161. </el-form-item>
  162. </el-col>
  163. <el-col :span="spanWidth">
  164. <el-form-item label="住院次数" prop="times">
  165. <el-input v-model="queryTerm.times" clearable placeholder="住院次数" style="width: 120px"
  166. @blur="times = $event.target.value.trim()" @keyup.enter="query"></el-input>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :span="spanWidth">
  170. <el-form-item label="出院科室" prop="disDept">
  171. <el-select v-model="queryTerm.outDept" :collapse-tags="true" clearable filterable multiple
  172. placeholder="出院科室">
  173. <el-option v-for="item in disDepts" :key="item.code" :label="item.name" :value="item.code">
  174. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  175. <el-divider direction="vertical"></el-divider>
  176. <span>{{ item.name }}</span>
  177. </el-option>
  178. </el-select>
  179. </el-form-item>
  180. </el-col>
  181. <el-col :span="spanWidth">
  182. <el-form-item label="医疗类别" prop="medType">
  183. <el-select v-model="queryTerm.medType" :collapse-tags="true" clearable filterable multiple
  184. placeholder="医疗类别">
  185. <el-option v-for="item in medTypes" :key="item.code" :label="item.name" :value="item.code">
  186. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  187. <el-divider direction="vertical"></el-divider>
  188. <span>{{ item.name }}</span>
  189. </el-option>
  190. </el-select>
  191. </el-form-item>
  192. </el-col>
  193. <el-col :span="spanWidth">
  194. <el-form-item label="上传类型" prop="psnType">
  195. <el-select v-model="queryTerm.flag">
  196. <el-option v-for="item in flags" :key="item.code" :label="item.name" :value="item.code">
  197. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  198. <el-divider direction="vertical"></el-divider>
  199. <span>{{ item.name }}</span>
  200. </el-option>
  201. </el-select>
  202. </el-form-item>
  203. </el-col>
  204. <el-col :span="spanWidth">
  205. <el-form-item label="管床医生" prop="referPhysician">
  206. <el-select v-model="queryTerm.referPhysician" :remote-method="remoteMethod" clearable filterable
  207. placeholder="管床医生" remote reserve-keyword>
  208. <el-option v-for="item in referPhysicians" :key="item.code" :label="item.name" :value="item.code">
  209. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  210. <el-divider direction="vertical"></el-divider>
  211. <span>{{ item.name }}</span>
  212. </el-option>
  213. </el-select>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="spanWidth">
  217. <el-form-item label="险种类型" prop="insutype">
  218. <el-select v-model="queryTerm.insutype" :collapse-tags="true" clearable filterable multiple
  219. placeholder="险种类型">
  220. <el-option v-for="item in insutypes" :key="item.code" :label="item.name" :value="item.code">
  221. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  222. <el-divider direction="vertical"></el-divider>
  223. <span>{{ item.name }}</span>
  224. </el-option>
  225. </el-select>
  226. </el-form-item>
  227. </el-col>
  228. <el-col :span="spanWidth">
  229. <el-form-item label="人员类别" prop="psnType">
  230. <el-select v-model="queryTerm.psnType" :collapse-tags="true" clearable filterable multiple
  231. placeholder="人员类别">
  232. <el-option v-for="item in getPsnType" :key="item.code" :label="item.name" :value="item.code">
  233. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  234. <el-divider direction="vertical"></el-divider>
  235. <span>{{ item.name }}</span>
  236. </el-option>
  237. </el-select>
  238. </el-form-item>
  239. </el-col>
  240. <el-col :span="spanWidth">
  241. <el-form-item label="结算机构" prop="clrOptins">
  242. <el-select v-model="queryTerm.clrOptins" :collapse-tags="true" clearable filterable multiple
  243. placeholder="结算机构">
  244. <el-option v-for="item in clrOptins" :key="item.code" :label="item.name" :value="item.code">
  245. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  246. <el-divider direction="vertical"></el-divider>
  247. <span>{{ item.name }}</span>
  248. </el-option>
  249. </el-select>
  250. </el-form-item>
  251. </el-col>
  252. <el-col :span="spanWidth">
  253. <el-form-item label="参保机构" prop="insuplcAdmdvs">
  254. <el-select v-model="queryTerm.insuplcAdmdvs" :collapse-tags="true" clearable filterable multiple
  255. placeholder="参保机构">
  256. <el-option v-for="item in clrOptins" :key="item.code" :label="item.name" :value="item.code">
  257. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  258. <el-divider direction="vertical"></el-divider>
  259. <span>{{ item.name }}</span>
  260. </el-option>
  261. </el-select>
  262. </el-form-item>
  263. </el-col>
  264. <el-col :span="spanWidth">
  265. <el-form-item label="审核类型" prop="auditFlag">
  266. <el-select v-model="queryTerm.auditFlag" :collapse-tags="true" clearable filterable multiple>
  267. <el-option v-for="item in auditFlags" :key="item.code" :label="item.name" :value="item.code">
  268. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  269. <el-divider direction="vertical"></el-divider>
  270. <span>{{ item.name }}</span>
  271. </el-option>
  272. </el-select>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="spanWidth">
  276. <el-form-item label="申报类型" prop="decTypes">
  277. <el-select v-model="queryTerm.decTypes" :collapse-tags="true" clearable filterable multiple>
  278. <el-option v-for="item in decTypes" :key="item.code" :label="item.name" :value="item.code">
  279. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  280. <el-divider direction="vertical"></el-divider>
  281. <span>{{ item.name }}</span>
  282. </el-option>
  283. </el-select>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="spanWidth">
  287. <el-form-item label="支付类型" prop="hiPaymtd">
  288. <el-select v-model="queryTerm.hiPaymtd" :collapse-tags="true" clearable>
  289. <el-option v-for="item in hiPaymtdData" :key="item.code" :label="item.name" :value="item.code">
  290. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  291. <el-divider direction="vertical"></el-divider>
  292. <span>{{ item.name }}</span>
  293. </el-option>
  294. </el-select>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="spanWidth">
  298. <el-form-item label="上传截止倒数天数" prop="uploadJieZhiDay">
  299. <el-select v-model="queryTerm.uploadJieZhiDay" :collapse-tags="true" clearable filterable multiple>
  300. <el-option v-for="item in uploadJieZhiData" :key="item.code" :label="item.name" :value="item.code">
  301. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  302. <el-divider direction="vertical"></el-divider>
  303. <span>{{ item.name }}</span>
  304. </el-option>
  305. </el-select>
  306. </el-form-item>
  307. </el-col>
  308. <el-col :span="spanWidth">
  309. <el-form-item label="病人医保身份" prop="ybSf">
  310. <el-select v-model="queryTerm.ybSf" :collapse-tags="true" clearable>
  311. <el-option v-for="item in ybSfData" :key="item.code" :label="item.name" :value="item.code">
  312. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  313. <el-divider direction="vertical"></el-divider>
  314. <span>{{ item.name }}</span>
  315. </el-option>
  316. </el-select>
  317. </el-form-item>
  318. </el-col>
  319. <el-col :span="spanWidth">
  320. <el-form-item label="姓名" prop="name">
  321. <el-input v-model="queryTerm.name" clearable placeholder="姓名" style="width: 120px"
  322. @blur="patNo = $event.target.value.trim()" @keyup.enter="query"></el-input>
  323. </el-form-item>
  324. </el-col>
  325. </el-row>
  326. </el-form>
  327. <el-button icon="Search" size="small" type="primary" @click="query">查询</el-button>
  328. <el-button icon="Search" size="small" type="primary" @click="zhongKongTiaoJian">总控数据条件</el-button>
  329. <el-button icon="RefreshRight" size="small" type="warning" @click="chongZhi">重置</el-button>
  330. <el-divider direction="vertical"></el-divider>
  331. </el-dialog>
  332. <el-dialog v-model="xiuGaiYiShen" title="修改管床医生">
  333. <el-select v-model="guanChuangYiShen.yiShenCode" :remote-method="remoteMethod" clearable filterable remote
  334. reserve-keyword>
  335. <el-option v-for="item in referPhysicians" :key="item.code" :label="item.name" :value="item.code">
  336. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  337. <el-divider direction="vertical"></el-divider>
  338. <span>{{ item.name }}</span>
  339. </el-option>
  340. </el-select>
  341. <el-divider direction="vertical"></el-divider>
  342. <el-button @click="xiuGaiGuanChuangYiShenClick">修改</el-button>
  343. </el-dialog>
  344. <el-dialog v-model="xiuGaibmyBzdata.dialog" title="修改编码员备注" center>
  345. <el-input v-model="xiuGaibmyBzdata.bmyBz" clearable placeholder="编码员备注" type="textarea"
  346. ></el-input>
  347. <template #footer>
  348. <span>
  349. <el-button type="primary" @click="xiuGaibmyBzClick">保存</el-button>
  350. </span>
  351. </template>
  352. </el-dialog>
  353. <jie-suan-dan-xiang-qing v-if="jieSuanDanDataDialog" :data="jieSuanDanData" @close="jieSuanDanDataDialog = false"
  354. @queryCurrentPage="queryCurrentPage"></jie-suan-dan-xiang-qing>
  355. <Progress/>
  356. <el-dialog v-model="medType.dialog" title="修改住院医疗类别">
  357. <el-radio-group v-model="medType.iptMedType">
  358. <el-radio :label="1">住院</el-radio>
  359. <el-radio :label="2">日间手术</el-radio>
  360. </el-radio-group>
  361. <el-divider direction="vertical"></el-divider>
  362. <el-button @click="clickToSaveMedicalCategory">保存</el-button>
  363. </el-dialog>
  364. <el-dialog v-model="setlDeptConf.dialog" title="修改科室配置信息">
  365. <el-select v-model="setlDeptConf.outDept" :collapse-tags="true" clearable filterable multiple
  366. placeholder="出院科室">
  367. <el-option v-for="item in disDepts" :key="item.code" :label="item.name" :value="item.code">
  368. <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
  369. <el-divider direction="vertical"></el-divider>
  370. <span>{{ item.name }}</span>
  371. </el-option>
  372. </el-select>
  373. <el-divider direction="vertical"></el-divider>
  374. <el-button @click="clicksaveSetlDeptConfInfo">保存</el-button>
  375. </el-dialog>
  376. </template>
  377. <script setup>
  378. import {clockinShortcuts} from '@/data/shortcuts'
  379. import {onMounted, onActivated, ref, unref, watch} from 'vue'
  380. import {getClrTypes, getInsutypes} from '@/api/medical-insurance/si-dict'
  381. import {getDateRangeFormatDate} from '@/utils/date'
  382. import {
  383. getMedType,
  384. huoQuJieSuanRenYuan,
  385. jieSuanDanKeXiuGaiXinXi,
  386. modifyMedicalCategory,
  387. upldSetlList,
  388. upldSetlListTimes,
  389. xiuGaiGuanChuangYiShen,
  390. querySetlDeptConfInfo,
  391. saveSetlDeptConfInfo,
  392. getUploadMaxDay,
  393. updateBmyBz,
  394. delAuditLog
  395. } from '@/api/medical-insurance/si-setl-upload'
  396. import {clrOptinsData, decTypes, getPsnType} from '@/data'
  397. import JieSuanDanXiangQing from '@/components/si-sheet-upload/jie-suan-dan-xiu-gai/JieSuanDanXiangQing.vue'
  398. import {ElMessage, ElMessageBox} from 'element-plus'
  399. import Progress from '@/components/progress/Index.vue'
  400. import {downloadExcel} from '@/utils/excel'
  401. import {getRenYuan, getZhuYuanDept} from '@/api/public-api'
  402. import {
  403. auditFlags,
  404. auditName,
  405. huoQuZhongKongChaXunTiaoJian,
  406. shenHeQuanXian,
  407. auditQuanXian,
  408. bmyQuaXian
  409. } from '@/components/si-sheet-upload/jieSuanDanXiuGai'
  410. import XianZhiShiJian from '../../../components/si-sheet-upload/XianZhiShiJian.vue'
  411. import {stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
  412. import JieSuanDanDaYing from '../../../components/si-sheet-upload/jieSuanDanDaYing.vue'
  413. import ExportAutoUploadInfo from "@/components/si-sheet-upload/ExportAutoUploadInfo.vue";
  414. import DrgGroupResult from "@/components/si-sheet-upload/DrgGroupResult.vue";
  415. import router from "@/router";
  416. import sleep from "@/utils/sleep";
  417. import {useUserStore} from "@/pinia/user-store";
  418. import {useProgressBarStore} from "@/pinia/progress-bar-store";
  419. import useDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
  420. const queryTerm = ref({
  421. startTime: '',
  422. endTime: '',
  423. patNo: '', // 0406567
  424. referPhysician: '',
  425. insutype: [],
  426. dateRange: [clockinShortcuts[0].value[0], clockinShortcuts[0].value[1]],
  427. outDept: [],
  428. insuplcAdmdvs: [],
  429. clrType: '21',
  430. medType: [],
  431. clrOptins: [],
  432. decTypes: [],
  433. flag: 0,
  434. hiPaymtd: 0,
  435. auditFlag: [],
  436. psnType: [],
  437. currentPage: 1,
  438. pageSize: 40,
  439. total: 0,
  440. list: [],
  441. times: null,
  442. uploadJieZhiDay: [],
  443. ybSf: null,
  444. name: ''
  445. })
  446. const userInfo = useUserStore().userInfo
  447. const dept = userInfo.deptCode
  448. // 表单
  449. const queryTermRef = ref(null)
  450. // 表格的宽度
  451. const spanWidth = ref(8)
  452. // 查询的 对话框
  453. const queryTermDialog = ref(true)
  454. // 结算单信息
  455. const jieSuanDanData = ref({})
  456. // 险种类型
  457. const insutypes = ref([])
  458. // 出院科室
  459. const disDepts = ref([])
  460. // 结算类别
  461. const clrTypes = ref([])
  462. // 医疗类别
  463. const medTypes = ref([])
  464. // 结算机构
  465. const clrOptins = ref([])
  466. // 管床医生
  467. const referPhysicians = ref([])
  468. const selections = ref([])
  469. // 表格 ref
  470. const tableRef = ref(null)
  471. const jieSuanDanDataDialog = ref(false)
  472. //跳转上传日志
  473. const toUploadInfo = () => {
  474. useDialogToJs(ExportAutoUploadInfo, {})
  475. }
  476. //跳转分组信息
  477. const toUploadDrgGroupInfo = () => {
  478. useDialogToJs(DrgGroupResult, {})
  479. }
  480. //单个查询上传信息
  481. const getUploadInfo = (row) => {
  482. useDialogToJs(ExportAutoUploadInfo, {
  483. patNo: row.patNo,
  484. times: row.times,
  485. ledgerSn: row.ledgerSn
  486. })
  487. }
  488. //查询分组信息
  489. const getdrgGroupResultInfo = (row) => {
  490. useDialogToJs(DrgGroupResult, {
  491. patNo: row.patNo,
  492. times: row.times,
  493. ledgerSn: row.ledgerSn
  494. })
  495. }
  496. const handleSelectionChange = (val) => {
  497. selections.value = val
  498. }
  499. const query = async () => {
  500. let form = unref(queryTermRef)
  501. if (!form) return
  502. try {
  503. await form.validate()
  504. let dates = getDateRangeFormatDate(queryTerm.value.dateRange)
  505. queryTerm.value.startTime = dates.startTime
  506. queryTerm.value.endTime = dates.endTime
  507. queryTerm.value.total = 0
  508. queryTerm.value.currentPage = 1
  509. huoQuJieSuanRenYuan(queryTerm.value).then((res) => {
  510. queryTerm.value.list = res === null ? [] : res.records
  511. queryTerm.value.total = res.total
  512. queryTermDialog.value = false
  513. })
  514. } catch (error) {
  515. }
  516. }
  517. const queryCurrentPage = async () => {
  518. let form = unref(queryTermRef)
  519. if (!form) return
  520. try {
  521. await form.validate()
  522. let dates = getDateRangeFormatDate(queryTerm.value.dateRange)
  523. queryTerm.value.startTime = dates.startTime
  524. queryTerm.value.endTime = dates.endTime
  525. huoQuJieSuanRenYuan(queryTerm.value).then((res) => {
  526. queryTerm.value.list = res.records
  527. queryTerm.value.total = res.total
  528. })
  529. } catch (error) {
  530. }
  531. }
  532. watch(
  533. () => window.innerWidth,
  534. () => {
  535. const w = window.innerWidth
  536. if (w >= 1500) {
  537. spanWidth.value = 8
  538. } else if (w >= 1300) {
  539. spanWidth.value = 12
  540. } else {
  541. spanWidth.value = 24
  542. }
  543. }
  544. )
  545. const progressBarStore = useProgressBarStore()
  546. const upldAllList = () => {
  547. upldSetlList(selections.value).catch(() => {
  548. progressBarStore.initialize({
  549. title: '',
  550. isOpen: false,
  551. closeButton: true
  552. })
  553. })
  554. }
  555. const upldSelections = () => {
  556. if (queryTerm.value.list.length === 0) {
  557. ElMessage({
  558. message: '请先查询出数据',
  559. type: 'warning',
  560. showClose: true,
  561. })
  562. return
  563. }
  564. upldSetlListTimes(queryTerm.value)
  565. }
  566. const handleSizeChange = (val) => {
  567. queryTerm.value.pageSize = val
  568. query()
  569. }
  570. const handleCurrentChange = (val) => {
  571. queryTerm.value.currentPage = val
  572. queryCurrentPage()
  573. tableRef.value.$refs.bodyWrapper.scrollTop = 0
  574. }
  575. const chongZhi = () => {
  576. unref(queryTermRef).resetFields()
  577. }
  578. //科室配置
  579. const setlDeptConf = ref({
  580. dialog: false,
  581. outDept: [],
  582. })
  583. const openSetlDeptConfGialog = () => {
  584. let query = {
  585. code: userInfo.code,
  586. typeFlag: 1
  587. }
  588. querySetlDeptConfInfo(query).then((res) => {
  589. setlDeptConf.value.outDept = res
  590. setlDeptConf.value.dialog = true
  591. })
  592. }
  593. //删除审核记录
  594. const auditLogDel = () => {
  595. if (selections.value.length == 1) {
  596. if (selections.value[0].auditFlagName == '未申请审核') {
  597. ElMessage.error('没有审核记录,不能删除')
  598. return
  599. }
  600. ElMessageBox.confirm('删除审核记录将会删除修改的诊断和手术,审核状态还原为未审核状态,请确认是否删除', '提示', {
  601. type: 'warning',
  602. }).then(() => {
  603. let deldate = {patNo: selections.value[0].patNo, times: selections.value[0].times}
  604. delAuditLog(deldate).then((res) => {
  605. queryCurrentPage()
  606. })
  607. })
  608. } else {
  609. ElMessage.error('请选择一条数据')
  610. }
  611. }
  612. const clicksaveSetlDeptConfInfo = () => {
  613. if (setlDeptConf.value.outDept.length <= 0) {
  614. ElMessage({
  615. message: '请先选择要配置的科室数据',
  616. type: 'warning',
  617. showClose: true,
  618. })
  619. return
  620. }
  621. let list = [];
  622. for (let item of setlDeptConf.value.outDept) {
  623. let deptConf = {}
  624. deptConf['code'] = userInfo.code
  625. deptConf['name'] = userInfo.name
  626. deptConf['typeFlag'] = 1
  627. deptConf['deptCode'] = item
  628. list.push(deptConf)
  629. }
  630. saveSetlDeptConfInfo(list).then((res) => {
  631. setlDeptConf.value.dialog = false
  632. })
  633. }
  634. const jieSuanDanXinXi = (val) => {
  635. if (queryTerm.value.clrType !== '21') {
  636. ElMessage({
  637. message: '结算类别请选择为【住院】!',
  638. type: 'warning',
  639. showClose: true,
  640. })
  641. return
  642. }
  643. jieSuanDanKeXiuGaiXinXi(val.patNo, val.times, val.ledgerSn).then((res) => {
  644. jieSuanDanData.value = res
  645. jieSuanDanData.value.medType = val.medType
  646. jieSuanDanData.value.actIptDays = val.actIptDays
  647. jieSuanDanData.value.outDeptName = val.outDeptName
  648. jieSuanDanData.value.medTypeName = val.medTypeName
  649. jieSuanDanData.value.insutypeName = val.insutypeName
  650. jieSuanDanData.value.disDiag = val.disDiag
  651. jieSuanDanData.value.disDiagComment = val.disDiagComment
  652. jieSuanDanData.value.medfeeSumamt = val.medfeeSumamt
  653. jieSuanDanData.value.fundPaySumamt = val.fundPaySumamt
  654. jieSuanDanData.value.decType = val.decType
  655. jieSuanDanData.value.upload = val
  656. jieSuanDanData.value.deptList = disDepts.value
  657. jieSuanDanData.value.ledgerSn = val.ledgerSn
  658. jieSuanDanData.value.disDept = val.outDept
  659. jieSuanDanData.value.shenHeXinXi = {
  660. id: val.id,
  661. reqOpId: val.reqOpId,
  662. reqOpName: val.reqOpName,
  663. reqOpDate: val.reqOpDate,
  664. reqRemark: val.reqRemark,
  665. auditStaff: val.auditStaff,
  666. auditName: val.auditName,
  667. auditDate: val.auditDate,
  668. auditRemark: val.auditRemark,
  669. auditFlag: val.auditFlag,
  670. }
  671. jieSuanDanDataDialog.value = true
  672. })
  673. }
  674. const exportExcel = () => {
  675. if (selections.value.length > 0) {
  676. ElMessageBox.prompt('导出文件名字', '提示', {
  677. confirmButtonText: '确定',
  678. cancelButtonText: '取消',
  679. inputPattern: /\S/,
  680. inputErrorMessage: '文件名不能为空 (∩•̀ω•́)⊃-*⋆',
  681. })
  682. .then(({value}) => {
  683. const data = {
  684. param: {siSetlinfoTemps: selections.value},
  685. url: '/setlListUpld/exportExcel',
  686. fileName: `${value}.xlsx`,
  687. jdt: false,
  688. }
  689. setTimeout(() => {
  690. downloadExcel(data)
  691. }, 500)
  692. })
  693. .catch((e) => {
  694. })
  695. } else {
  696. if (queryTerm.value.total > 0) {
  697. ElMessageBox.prompt('导出文件名字', '提示', {
  698. confirmButtonText: '确定',
  699. cancelButtonText: '取消',
  700. inputPattern: /\S/,
  701. inputErrorMessage: '文件名不能为空 (∩•̀ω•́)⊃-*⋆',
  702. })
  703. .then(({value}) => {
  704. const data = {
  705. param: queryTerm.value,
  706. url: '/setlListUpld/exportExcel',
  707. fileName: `${value}.xlsx`,
  708. jdt: false,
  709. }
  710. setTimeout(() => {
  711. downloadExcel(data)
  712. }, 500)
  713. })
  714. .catch((e) => {
  715. })
  716. } else {
  717. ElMessage.error('请先查询出数据')
  718. }
  719. }
  720. }
  721. const remoteMethod = (val) => {
  722. if (val.length > 1) {
  723. getRenYuan(val).then((res) => {
  724. referPhysicians.value = res
  725. })
  726. }
  727. }
  728. /* 限制时间 */
  729. const xianZhiShiJian = ref(null)
  730. const xianZhiShiJianClick = () => {
  731. xianZhiShiJian.value.xianZhiShiJianDialog = true
  732. }
  733. /* 修改管床医生 */
  734. const guanChuangYiShen = ref({
  735. yiShenCode: '',
  736. patNo: '',
  737. times: 0,
  738. })
  739. const xiuGaiYiShen = ref(false)
  740. const huoQuXiuGaiYiShen = (code, name, patNo, times) => {
  741. if (stringNotBlank(code)) {
  742. referPhysicians.value = [{code: code, name: name}]
  743. guanChuangYiShen.value.yiShenCode = code
  744. }
  745. xiuGaiYiShen.value = true
  746. guanChuangYiShen.value.patNo = patNo
  747. guanChuangYiShen.value.times = times
  748. }
  749. const xiuGaibmyBzdata = ref({
  750. dialog: false,
  751. bmyBz: '',
  752. patNo: '',
  753. bzUpdate: '',
  754. times: null,
  755. ledgerSn: null,
  756. })
  757. //编辑编码员备注
  758. const bianJiBmyBz = (row) => {
  759. xiuGaibmyBzdata.value.dialog = true
  760. xiuGaibmyBzdata.value.bmyBz = row.bmyBz
  761. xiuGaibmyBzdata.value.patNo = row.patNo
  762. xiuGaibmyBzdata.value.bzUpdate = row.bzUpdate
  763. xiuGaibmyBzdata.value.times = row.times
  764. xiuGaibmyBzdata.value.ledgerSn = row.ledgerSn
  765. }
  766. //保存编码员备注
  767. const xiuGaibmyBzClick = () => {
  768. let updateBmyBzdata = {
  769. bmyBz: xiuGaibmyBzdata.value.bmyBz,
  770. patNo: xiuGaibmyBzdata.value.patNo,
  771. bzUpdate: xiuGaibmyBzdata.value.bzUpdate,
  772. times: xiuGaibmyBzdata.value.times,
  773. ledgerSn: xiuGaibmyBzdata.value.ledgerSn
  774. }
  775. updateBmyBz(updateBmyBzdata).then((res) => {
  776. xiuGaibmyBzdata.value.dialog = false
  777. queryCurrentPage()
  778. })
  779. }
  780. const xiuGaiGuanChuangYiShenClick = () => {
  781. xiuGaiGuanChuangYiShen(guanChuangYiShen.value.patNo, guanChuangYiShen.value.times, guanChuangYiShen.value.yiShenCode).then((res) => {
  782. xiuGaiYiShen.value = false
  783. queryCurrentPage()
  784. })
  785. }
  786. const zhongKongTiaoJian = () => {
  787. if (!auditQuanXian()) {
  788. queryTerm.value.outDept = [userInfo.deptCode]
  789. referPhysicians.value = [{code: userInfo.code, name: userInfo.name}]
  790. }
  791. queryTerm.value.medType = ['22', '2101']
  792. queryTerm.value.insutype = huoQuZhongKongChaXunTiaoJian(insutypes.value, ['340', '350', '360', '510', '410'])
  793. queryTerm.value.psnType = huoQuZhongKongChaXunTiaoJian(getPsnType, ['13'])
  794. queryTerm.value.clrOptins = huoQuZhongKongChaXunTiaoJian(clrOptins.value, ['439900', '430121'])
  795. }
  796. const daYingJieSuanDanRef = ref({
  797. dialog: false,
  798. patNo: '',
  799. times: 0,
  800. ledgerSn: 0,
  801. })
  802. const jieSuanDanClick = (val) => {
  803. daYingJieSuanDanRef.value.dialog = true
  804. daYingJieSuanDanRef.value.patNo = val.patNo
  805. daYingJieSuanDanRef.value.times = val.times
  806. daYingJieSuanDanRef.value.ledgerSn = val.ledgerSn
  807. }
  808. let medType = reactive({
  809. dialog: false,
  810. setlId: '',
  811. iptMedType: 1,
  812. })
  813. const clickToModifyMedicalCategory = ({setlId, iptMedType}) => {
  814. if (stringIsBlank(setlId)) {
  815. return ElMessage.error('该患者没有结算ID')
  816. }
  817. medType.dialog = true
  818. medType.setlId = setlId
  819. medType.iptMedType = iptMedType
  820. }
  821. const clickToSaveMedicalCategory = () => {
  822. modifyMedicalCategory(medType.iptMedType, medType.setlId)
  823. query()
  824. }
  825. function getIptMedName(val) {
  826. switch (val) {
  827. case 1:
  828. return '住院'
  829. case 2:
  830. return '日间手术'
  831. default:
  832. return ''
  833. }
  834. }
  835. // 查询自动上传
  836. const autoUploadDialog = ref(false)
  837. const uploadJieZhiData = ref([])
  838. async function checkPathParams() {
  839. const params = router.currentRoute.value.params
  840. if (params && params.patNo && params.times) {
  841. queryTerm.value.times = params.times
  842. queryTerm.value.patNo = params.patNo
  843. queryTerm.value.dateRange = []
  844. queryTerm.value.referPhysician = ''
  845. queryTermDialog.value = false
  846. await sleep(300);
  847. await queryCurrentPage()
  848. }
  849. }
  850. onMounted(() => {
  851. getInsutypes().then((res) => {
  852. insutypes.value = res
  853. getClrTypes().then((res2) => {
  854. clrTypes.value = res2
  855. })
  856. })
  857. getMedType().then((res) => {
  858. medTypes.value = res
  859. })
  860. getZhuYuanDept().then((res) => {
  861. disDepts.value = res
  862. })
  863. getUploadMaxDay().then((res => {
  864. for (let i = 1; i <= res; i++) {
  865. let temp = {
  866. code: i,
  867. name: i + '天'
  868. }
  869. uploadJieZhiData.value.push(temp)
  870. }
  871. }))
  872. clrOptins.value = clrOptinsData
  873. checkPathParams()
  874. })
  875. const ybSfData = [
  876. {code: 1, name: '省本级'},
  877. {code: 2, name: '长沙市'},
  878. {code: 3, name: '省内异地'}
  879. ]
  880. const flags = ref([
  881. {code: 0, name: '全部'},
  882. {code: 1, name: '未传'},
  883. {code: 2, name: '已传'},
  884. ])
  885. const hiPaymtdData = [
  886. {code: 1, name: '按项目'},
  887. {code: 2, name: '单病种'},
  888. {code: 3, name: '按病种分值'},
  889. {code: 4, name: '基本诊断相关分组(DRG)'},
  890. {code: 5, name: '按床日'},
  891. {code: 6, name: '按人次'},
  892. {code: 9, name: '其他'},
  893. {code: 0, name: '全部'},
  894. ]
  895. </script>