Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

dialysisRecord.vue 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar
  4. :id="patientID"
  5. defaultActive="2-2"
  6. v-on:tran-patient="onTranPatient"
  7. ></patient-sidebar>
  8. <div class="patient-app-container app-container">
  9. <div style="clearfix">
  10. <el-button
  11. style="float:right;"
  12. size="small"
  13. @click="printThisInfo()"
  14. type="primary"
  15. icon="el-icon-printer"
  16. >打印</el-button
  17. >
  18. <el-form ref="form" :model="queryParams" label-width="80px">
  19. <!-- <el-form-item label="患者时间 : " >
  20. <el-select v-model="form.date" >
  21. <el-option v-for="item in dateOptions " :label="item.label" :value="item.value" :key="item.value" ></el-option>
  22. </el-select>
  23. </el-form-item> -->
  24. <el-col :span="20">
  25. <el-form-item label="患者时间 :">
  26. <!-- <el-col :span="11"> -->
  27. <el-date-picker
  28. size="small"
  29. type="date"
  30. format="yyyy-MM-dd"
  31. value-format="yyyy-MM-dd"
  32. placeholder="选择开始时间"
  33. style="width:150px"
  34. v-model="queryParams.start_time"
  35. @change="changeSearch"
  36. ></el-date-picker>
  37. <!-- </el-col> -->
  38. <span class="cellLine">-</span>
  39. <!-- <el-col :span="11"> -->
  40. <el-date-picker
  41. size="small"
  42. type="date"
  43. format="yyyy-MM-dd"
  44. value-format="yyyy-MM-dd"
  45. placeholder="选择结束时间"
  46. style="width:150px"
  47. v-model="queryParams.end_time"
  48. @change="changeSearch"
  49. ></el-date-picker>
  50. <!-- </el-col> -->
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="20">
  54. <el-form-item label="透析模式 : ">
  55. <el-select
  56. v-model="queryParams.mode_id"
  57. @change="changeSearch"
  58. clearable
  59. style="width:314px"
  60. size="small"
  61. >
  62. <el-option
  63. v-for="item in modeOptions"
  64. :label="item.name"
  65. :value="item.id"
  66. :key="item.id"
  67. ></el-option>
  68. </el-select>
  69. </el-form-item>
  70. </el-col>
  71. </el-form>
  72. </div>
  73. <div>
  74. <el-table
  75. id="oictable"
  76. :header-cell-style="{
  77. backgroundColor: 'rgb(245, 247, 250)',
  78. color: '#606266'
  79. }"
  80. :row-style="{ color: '#303133' }"
  81. :data="recordData"
  82. border
  83. style="width: 100%"
  84. @current-change="clickCurrent"
  85. >
  86. <el-table-column
  87. prop="dialysis_date"
  88. label="透析日期"
  89. align="center"
  90. width="110"
  91. fixed
  92. >
  93. <template slot-scope="scope"
  94. ><span style="color: #579ef8">{{
  95. scope.row.dialysis_date | parseTime("{y}-{m}-{d}")
  96. }}</span></template
  97. >
  98. </el-table-column>
  99. <el-table-column
  100. prop="schedule_type"
  101. label="班次"
  102. align="center"
  103. width="80"
  104. >
  105. <template slot-scope="scope"
  106. ><span>{{
  107. scheduleType(scope.row.schedule_type)
  108. }}</span></template
  109. >
  110. </el-table-column>
  111. <el-table-column
  112. prop="partition"
  113. width="100"
  114. align="center"
  115. label="分区 - 机号"
  116. >
  117. <template slot-scope="scope"
  118. ><span
  119. >{{ scope.row.partition_name }}-{{
  120. scope.row.device.number
  121. }}</span
  122. ></template
  123. >
  124. </el-table-column>
  125. <el-table-column
  126. prop="mode"
  127. width="90"
  128. align="center"
  129. label="透析模式"
  130. >
  131. <template slot-scope="scope">{{
  132. modeName(scope.row.prescription.mode_id)
  133. }}</template>
  134. </el-table-column>
  135. <el-table-column
  136. prop="prescription.dialysis_duration"
  137. width="100"
  138. align="center"
  139. label="透析时长(h)"
  140. >
  141. <template slot-scope="scope">
  142. <span>{{getTime(scope.row.assessment_after_dislysis)}}</span>
  143. </template>
  144. </el-table-column>
  145. <el-table-column
  146. prop="predialysis_evaluation.dry_weight"
  147. width="96"
  148. align="center"
  149. label="干体重(kg)"
  150. >
  151. </el-table-column>
  152. <el-table-column
  153. prop="predialysis_evaluation.weight_before"
  154. width="110"
  155. align="center"
  156. label="透前称重(kg)"
  157. >
  158. </el-table-column>
  159. <el-table-column
  160. prop="assessment_after_dislysis.weight_after"
  161. width="110"
  162. align="center"
  163. label="透后称重(kg)"
  164. >
  165. </el-table-column>
  166. <el-table-column
  167. prop="predialysis_evaluation"
  168. width="140"
  169. align="center"
  170. label="透前血压(mmHg)"
  171. >
  172. <template slot-scope="scope"
  173. ><span
  174. >{{
  175. scope.row.predialysis_evaluation.systolic_blood_pressure
  176. }}/{{
  177. scope.row.predialysis_evaluation.diastolic_blood_pressure
  178. }}</span
  179. ></template
  180. >
  181. </el-table-column>
  182. <el-table-column
  183. prop="assessment_after_dislysis"
  184. width="140"
  185. align="center"
  186. label="透后血压(mmHg)"
  187. >
  188. <template slot-scope="scope"
  189. ><span
  190. >{{
  191. scope.row.assessment_after_dislysis.systolic_blood_pressure
  192. }}/{{
  193. scope.row.assessment_after_dislysis.diastolic_blood_pressure
  194. }}</span
  195. ></template
  196. >
  197. </el-table-column>
  198. <!--<el-table-column-->
  199. <!--prop="access"-->
  200. <!--width="100"-->
  201. <!--align="center"-->
  202. <!--label="血管通路"-->
  203. <!--&gt;-->
  204. <!--<template slot-scope="scope"-->
  205. <!--&gt;<span>{{-->
  206. <!--setVascularAccess(scope.row.prescription)-->
  207. <!--}}</span></template-->
  208. <!--&gt;-->
  209. <!--</el-table-column>-->
  210. <el-table-column
  211. prop="type"
  212. width="200"
  213. align="center"
  214. label="抗凝剂种类 首剂/维持/总量"
  215. >
  216. <template slot-scope="scope">
  217. <span>{{ setAnticoagulantsConfit(scope.row.prescription) }}</span>
  218. </template>
  219. </el-table-column>
  220. <!--<el-table-column-->
  221. <!--prop="model"-->
  222. <!--width="100"-->
  223. <!--align="center"-->
  224. <!--label="透析器型号"-->
  225. <!--&gt;-->
  226. <!--<template slot-scope="scope"-->
  227. <!--&gt;<span>{{-->
  228. <!--setDialyzerModel(scope.row.prescription)-->
  229. <!--}}</span></template-->
  230. <!--&gt;-->
  231. <!--</el-table-column>-->
  232. <el-table-column
  233. prop="nurse"
  234. width="90"
  235. align="center"
  236. label="治疗护士"
  237. >
  238. <template slot-scope="scope"
  239. ><span>{{
  240. scope.row.role.user_name
  241. }}</span></template
  242. >
  243. </el-table-column>
  244. <el-table-column
  245. prop="doctor"
  246. width="90"
  247. align="center"
  248. label="治疗医生"
  249. >
  250. <template slot-scope="scope"
  251. ><span>{{
  252. scope.row.prescription.role.user_name
  253. }}</span></template
  254. >
  255. </el-table-column>
  256. </el-table>
  257. <el-pagination
  258. align="right"
  259. @size-change="handleSizeChange"
  260. @current-change="handleCurrentChange"
  261. :current-page="queryParams.page"
  262. :page-sizes="[10, 20, 50, 100]"
  263. :page-size="10"
  264. background
  265. style="margin-top:20px;"
  266. layout="total, sizes, prev, pager, next, jumper"
  267. :total="total"
  268. >
  269. </el-pagination>
  270. </div>
  271. <div style="display:none;">
  272. <div id="printRecord" class="record-order">
  273. <div class="rd-title">{{ orgname }}</div>
  274. <div class="rd-name">
  275. <span
  276. >姓名:<span class="item-value">{{
  277. currentPatient.name
  278. }}</span></span
  279. >
  280. <span style="margin-left:10px;"
  281. >透析号:<span class="item-value">{{
  282. currentPatient.dialysis_no
  283. }}</span></span
  284. >
  285. </div>
  286. <table
  287. cellspacing="0"
  288. cellpadding="0"
  289. border="1"
  290. class="el-table__body"
  291. style="width: 100%;"
  292. >
  293. <thead>
  294. <th>透析日期</th>
  295. <th>班次</th>
  296. <th>分区机号</th>
  297. <th>透析模式</th>
  298. <th>透析时长(h)</th>
  299. <th>干体重(kg)</th>
  300. <th>透前称重(kg)</th>
  301. <th>透后称重(kg)</th>
  302. <th>透前血压(mmhg)</th>
  303. <th>透后血压(mmhg)</th>
  304. <th>超滤总量(L)</th>
  305. <th>血管通路</th>
  306. <th>抗凝剂种类 首剂/维持/总量</th>
  307. <th>透析器型号</th>
  308. <th>治疗护士</th>
  309. <th>治疗医生</th>
  310. </thead>
  311. <tbody>
  312. <tr v-for="item in recordData" :key="item.id">
  313. <td>{{ item.dialysis_date | parseTime("{y}-{m}-{d}") }}</td>
  314. <td>{{ scheduleType(item.schedule_type) }}</td>
  315. <td>{{ item.partition_name }}-{{ item.device_number }}</td>
  316. <td>{{ modeName(item.prescription.mode_id) }}</td>
  317. <td>{{ item.prescription.dialysis_duration }}</td>
  318. <td>{{ item.predialysis_evaluation.dry_weight }}</td>
  319. <td>{{ item.predialysis_evaluation.weight_before }}</td>
  320. <td>{{ item.assessment_after_dislysis.weight_after }}</td>
  321. <td>
  322. {{ item.predialysis_evaluation.systolic_blood_pressure }}/{{
  323. item.predialysis_evaluation.diastolic_blood_pressure
  324. }}
  325. </td>
  326. <td>
  327. {{
  328. item.assessment_after_dislysis.systolic_blood_pressure
  329. }}/{{
  330. item.assessment_after_dislysis.diastolic_blood_pressure
  331. }}
  332. </td>
  333. <td>
  334. {{ item.predialysis_evaluation.ultrafiltration_amount }}
  335. </td>
  336. <td>{{ setVascularAccess(item.prescription) }}</td>
  337. <td>{{ setAnticoagulantsConfit(item.prescription) }}</td>
  338. <td>{{ item.prescription.dialyzer_perfusion_apparatus }}</td>
  339. <td>{{ getNurseName(item.start_nurse) }}</td>
  340. <td>{{ getDoctorName(item.prescription.creater) }}</td>
  341. </tr>
  342. </tbody>
  343. </table>
  344. </div>
  345. </div>
  346. </div>
  347. </div>
  348. </template>
  349. <script>
  350. import PatientSidebar from "./components/PatientSidebar";
  351. import { getPatientDialysisRecords } from "@/api/patient";
  352. import { uParseTime } from "@/utils/tools";
  353. import { fetchAllDoctorAndNurse } from "@/api/doctor";
  354. import print from "print-js";
  355. export default {
  356. name: "dialysisRecord",
  357. data() {
  358. return {
  359. orgname: "",
  360. currentPatient: {},
  361. patientID: 0,
  362. total: 0,
  363. queryParams: {
  364. // date: "",
  365. mode_id: "",
  366. start_time: "",
  367. end_time: "",
  368. page: 1,
  369. patient_id: 0,
  370. limit: 10
  371. },
  372. recordData: [],
  373. dateOptions: [
  374. { value: "0", label: "本月" },
  375. { value: "1", label: "本年" }
  376. ],
  377. modeOptions: [],
  378. anticoagulantsConfit: [],
  379. blood_filters: [],
  380. perfusion_apparatus: [],
  381. hemodialysis_machines: [],
  382. doctorOptions: [],
  383. nurseOptions: [],
  384. vascularAccess: [],
  385. vascularAccessDesc: []
  386. };
  387. },
  388. components: {
  389. PatientSidebar
  390. },
  391. methods: {
  392. getTime(record){
  393. if(record != null&&record.id > 0) {
  394. let actual_treatment_hour = 0
  395. let actual_treatment_minute = 0
  396. actual_treatment_hour = parseFloat(record.actual_treatment_hour)
  397. actual_treatment_minute = parseFloat(record.actual_treatment_minute) / 60
  398. return (actual_treatment_hour + actual_treatment_minute).toFixed(2)
  399. }
  400. },
  401. changeSearch() {
  402. this.getPatientDialysisRecords();
  403. },
  404. handleSizeChange(val) {
  405. this.queryParams.limit = val;
  406. this.getPatientDialysisRecords();
  407. },
  408. handleCurrentChange(val) {
  409. this.queryParams.page = val;
  410. this.getPatientDialysisRecords();
  411. },
  412. getPatientDialysisRecords() {
  413. console.log("prams",this.queryParams)
  414. getPatientDialysisRecords(this.queryParams).then(response => {
  415. if (response.data.state == 1) {
  416. this.total = response.data.data.total;
  417. this.recordData = response.data.data.records;
  418. }
  419. });
  420. },
  421. fetchAllDoctorAndNurse() {
  422. fetchAllDoctorAndNurse().then(response => {
  423. if (response.data.state == 1) {
  424. this.doctorOptions =
  425. response.data.data.doctors == null
  426. ? []
  427. : response.data.data.doctors;
  428. this.nurseOptions =
  429. response.data.data.nursers == null
  430. ? []
  431. : response.data.data.nursers;
  432. }
  433. });
  434. },
  435. scheduleType(schedule_type) {
  436. var typeName = "未知";
  437. switch (schedule_type) {
  438. case 1:
  439. typeName = "上午";
  440. break;
  441. case 2:
  442. typeName = "下午";
  443. break;
  444. case 3:
  445. typeName = "晚上";
  446. break;
  447. default:
  448. break;
  449. }
  450. return typeName;
  451. },
  452. modeName(mode_id) {
  453. return typeof this.modeOptions[mode_id] !== "undefined" &&
  454. typeof this.modeOptions[mode_id].name !== "undefined"
  455. ? this.modeOptions[mode_id].name
  456. : "";
  457. },
  458. setAnticoagulantsConfit(prescription) {
  459. if (
  460. typeof this.anticoagulantsConfit[prescription.anticoagulant] ===
  461. "undefined"
  462. ) {
  463. return "";
  464. } else {
  465. if (this.anticoagulantsConfit[prescription.anticoagulant].shouji != 1) {
  466. return this.anticoagulantsConfit[prescription.anticoagulant].name;
  467. } else {
  468. return (
  469. this.anticoagulantsConfit[prescription.anticoagulant].name +
  470. "/" +
  471. prescription.anticoagulant_shouji +
  472. "/" +
  473. prescription.anticoagulant_weichi +
  474. "/" +
  475. prescription.anticoagulant_zongliang
  476. );
  477. }
  478. }
  479. },
  480. setVascularAccess(prescription) {
  481. if (
  482. typeof this.vascularAccess[prescription.vascular_access_mode] ===
  483. "undefined"
  484. ) {
  485. return "";
  486. } else {
  487. if (
  488. typeof this.vascularAccessDesc[prescription.vascular_access] ===
  489. "undefined"
  490. ) {
  491. return this.vascularAccess[prescription.vascular_access_mode].name;
  492. } else {
  493. return (
  494. this.vascularAccess[prescription.vascular_access_mode].name +
  495. "-" +
  496. this.vascularAccessDesc[prescription.vascular_access].name
  497. );
  498. }
  499. }
  500. },
  501. setDialyzerModel(prescription) {
  502. var models = [];
  503. if (prescription.hemodialysis_machine > 0) {
  504. var ml = this.hemodialysis_machines.length;
  505. if (ml > 0) {
  506. for (let index = 0; index < ml; index++) {
  507. if (
  508. this.hemodialysis_machines[index].id ==
  509. prescription.hemodialysis_machine
  510. ) {
  511. models.push(this.hemodialysis_machines[index].name);
  512. }
  513. }
  514. }
  515. }
  516. if (prescription.blood_filter > 0) {
  517. var ml = this.blood_filters.length;
  518. if (ml > 0) {
  519. for (let index = 0; index < ml; index++) {
  520. if (this.blood_filters[index].id == prescription.blood_filter) {
  521. models.push(this.blood_filters[index].name);
  522. }
  523. }
  524. }
  525. }
  526. if (prescription.perfusion_apparatus > 0) {
  527. var ml = this.perfusion_apparatus.length;
  528. if (ml > 0) {
  529. for (let index = 0; index < ml; index++) {
  530. if (
  531. this.perfusion_apparatus[index].id ==
  532. prescription.perfusion_apparatus
  533. ) {
  534. models.push(this.perfusion_apparatus[index].name);
  535. }
  536. }
  537. }
  538. }
  539. return models.join(",");
  540. },
  541. getDoctorName(creater) {
  542. var dl = this.doctorOptions.length;
  543. if (dl > 0) {
  544. for (let index = 0; index < dl; index++) {
  545. if ((this.doctorOptions[index].id = creater)) {
  546. return this.doctorOptions[index].name;
  547. }
  548. }
  549. }
  550. return "";
  551. },
  552. getNurseName(start_nurse) {
  553. var dl = this.nurseOptions.length;
  554. if (dl > 0) {
  555. for (let index = 0; index < dl; index++) {
  556. if (this.nurseOptions[index].id = start_nurse) {
  557. return this.nurseOptions[index].name;
  558. }
  559. }
  560. }
  561. return "";
  562. },
  563. onTranPatient: function(tranPatient) {
  564. this.currentPatient = tranPatient;
  565. },
  566. printThisInfo() {
  567. const style =
  568. "@media print { .record-order .rd-title{ text-align: center; font-weight: 600; font-size: 30px; line-height: 80px; margin-bottom: 20px; } .record-order .rd-type{ text-align: center; margin-bottom: 20px; } .record-order .rd-name { align-items: center; justify-content: space-between; padding: 30px 2em; } .record-order .el-table__body{ border: 1px solid #333; } .record-order .el-table__body td{ border: 1px solid #333; } .record-order .item-value { border-bottom: 1px solid #333; padding: 0 20px;} .record-order th, .record-order td { padding: 5px 10px; }}";
  569. setTimeout(() => {
  570. printJS({
  571. printable: "printRecord",
  572. type: "html",
  573. style: style,
  574. scanStyles: false
  575. });
  576. }, 1);
  577. },
  578. clickCurrent(val) {
  579. this.$router.push({
  580. path: "/dialysis/details",
  581. query: { patient_id: val.patient_id, date: val.dialysis_date }
  582. });
  583. }
  584. },
  585. created() {
  586. const id = this.$route.params && this.$route.params.id;
  587. this.patientID = parseInt(id);
  588. if (isNaN(this.patientID) || this.patientID <= 0) {
  589. this.$notify.error({
  590. title: "错误",
  591. message: "无效的id"
  592. });
  593. this.$router.back(-1);
  594. }
  595. this.queryParams.patient_id = this.patientID;
  596. this.modeOptions = this.$store.getters.treatment_mode;
  597. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  598. this.blood_filters = this.$store.getters.blood_filters;
  599. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus;
  600. this.hemodialysis_machines = this.$store.getters.hemodialysis_machines;
  601. this.vascularAccess = this.$store.getters.vascular_access;
  602. this.vascularAccessDesc = this.$store.getters.vascular_access_desc;
  603. var xtuser = this.$store.getters.xt_user;
  604. this.orgname = xtuser.org.org_name;
  605. },mounted(){
  606. this.fetchAllDoctorAndNurse();
  607. this.getPatientDialysisRecords();
  608. }
  609. };
  610. </script>
  611. <style>
  612. #oictable ::-webkit-scrollbar {
  613. height: 15px;
  614. }
  615. .el-table td,
  616. .el-table th.is-leaf,
  617. .el-table--border,
  618. .el-table--group {
  619. border-color: #d0d3da;
  620. }
  621. .el-table--border::after,
  622. .el-table--group::after,
  623. .el-table::before {
  624. background-color: #d0d3da;
  625. }
  626. </style>
  627. <style rel="stylesheet/scss" lang="scss" scoped>
  628. .total {
  629. font-size: 14px;
  630. line-height: 32px;
  631. height: 32px;
  632. color: #6caef7;
  633. }
  634. .record-order .rd-title {
  635. text-align: center;
  636. font-weight: 600;
  637. font-size: 30px;
  638. line-height: 80px;
  639. margin-bottom: 20px;
  640. }
  641. .record-order .rd-type {
  642. text-align: center;
  643. margin-bottom: 20px;
  644. }
  645. .record-order .rd-name {
  646. align-items: center;
  647. justify-content: space-between;
  648. padding: 30px 2em;
  649. }
  650. .record-order .el-table__body {
  651. border: 1px solid #333;
  652. }
  653. .record-order .el-table__body td {
  654. border: 1px solid #333;
  655. }
  656. .record-order .item-value {
  657. border-bottom: 1px solid #333;
  658. padding: 0 20px;
  659. }
  660. .record-order th,
  661. .record-order td {
  662. padding: 5px 10px;
  663. }
  664. </style>