prescription.vue 43KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container ">
  7. <div class="dataTitle">透析模板</div>
  8. <div
  9. class="app-container"
  10. style="margin-left: -20px;margin-top: -20px"
  11. v-loading="pageLoading"
  12. element-loading-text="拼命加载中"
  13. >
  14. <el-row :gutter="20">
  15. <el-col :span="7">
  16. <el-table
  17. :header-cell-style="{
  18. backgroundColor: 'rgb(245, 247, 250)',
  19. color: '#606266'
  20. }"
  21. height="450"
  22. :row-style="{ color: '#303133' }"
  23. :data="treatment_mode"
  24. border
  25. style="width: 100%"
  26. highlight-current-row
  27. :row-class-name="tableRows"
  28. @row-click="onRowClicks"
  29. ref="singleTable"
  30. >
  31. <el-table-column label="透析模式" align="center">
  32. <template slot-scope="scope">
  33. {{ scope.row.name }}
  34. </template>
  35. </el-table-column>
  36. <el-table-column label="状态" width="80" align="center">
  37. <template slot-scope="scope">
  38. {{ getModeStatus(scope.row.id) }}
  39. </template>
  40. </el-table-column>
  41. </el-table>
  42. </el-col>
  43. <el-col :span="17" v-loading="itemLoading">
  44. <div class="filter-container">
  45. <el-row :gutter="20">
  46. <el-col :span="16">
  47. <div>{{ mode_name }}</div>
  48. </el-col>
  49. <el-col :span="8">
  50. <el-button
  51. style="float: right;visibility: hidden"
  52. size="small"
  53. class="filter-item"
  54. type="primary"
  55. icon="el-icon-edit-outline"
  56. @click="openEdit()"
  57. >修改
  58. </el-button>
  59. </el-col>
  60. </el-row>
  61. </div>
  62. <div class="filter-container" style="float:right">
  63. <el-form
  64. ref="addPlan"
  65. :model="addPlan"
  66. label-width="160px"
  67. style="border: black"
  68. >
  69. <el-row :gutter="20">
  70. <el-col :span="8">
  71. <el-form-item label="透析时长(h):" prop="dialysis_duration">
  72. <el-time-picker
  73. v-model="dialysisTimeShow"
  74. :picker-options="{
  75. selectableRange: '00:01:00 - 23:59:00'
  76. }"
  77. placeholder="透析时长"
  78. style="width:100%;"
  79. value-format="H:m"
  80. format="H:m"
  81. @change="selectnDialysisTime"
  82. >
  83. </el-time-picker>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="8">
  87. <el-form-item
  88. label="血流量(ml/min):"
  89. prop="blood_flow_volume"
  90. >
  91. <el-input v-model="addPlan.blood_flow_volume"></el-input>
  92. </el-form-item>
  93. </el-col>
  94. <!--<el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id == 6">-->
  95. <!--<el-form-item label="目标超滤量(ml) : ">-->
  96. <!--<el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>-->
  97. <!--</el-form-item>-->
  98. <!--</el-col>-->
  99. <!--<el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id != 6">-->
  100. <!--<el-form-item label="目标超滤量(L) : ">-->
  101. <!--<el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>-->
  102. <!--</el-form-item>-->
  103. <!--</el-col>-->
  104. <el-col :span="8">
  105. <el-form-item label="透析液配方:">
  106. <el-select v-model="addPlan.dialysate_formulation">
  107. <el-option
  108. v-for="(item, index) in dialysate_formulation"
  109. :label="item.name"
  110. :key="index"
  111. :value="item.id"
  112. ></el-option>
  113. </el-select>
  114. </el-form-item>
  115. </el-col>
  116. <el-col :span="8">
  117. <el-form-item label="抗凝剂:" prop="anticoagulant">
  118. <el-select
  119. v-model="addPlan.anticoagulant"
  120. @change="changeThisAnticoagulant"
  121. >
  122. <el-option
  123. v-for="(item, index) in anticoagulantsConfit"
  124. :label="item.name"
  125. :key="index"
  126. :value="item.id"
  127. ></el-option>
  128. </el-select>
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="8" v-if="anticoagulant.shouji != -1">
  132. <el-form-item
  133. :label="'首剂(' + anticoagulant.shouji_unit + '): '"
  134. prop="anticoagulant_shouji"
  135. >
  136. <el-input
  137. v-model="addPlan.anticoagulant_shouji"
  138. :disabled="anticoagulant.shouji == 1 ? false : true"
  139. type="number"
  140. ></el-input>
  141. </el-form-item>
  142. </el-col>
  143. <el-col :span="8" v-if="anticoagulant.weichi != -1">
  144. <el-form-item
  145. :label="'维持(' + anticoagulant.weichi_unit + '): '"
  146. prop="anticoagulant_weichi"
  147. >
  148. <el-input
  149. v-model="addPlan.anticoagulant_weichi"
  150. :disabled="anticoagulant.weichi == 1 ? false : true"
  151. type="number"
  152. ></el-input>
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="8" v-if="anticoagulant.zongliang != -1">
  156. <el-form-item
  157. :label="'总量(' + anticoagulant.zongliang_unit + '): '"
  158. prop="anticoagulant_zongliang"
  159. >
  160. <el-input
  161. v-model="addPlan.anticoagulant_zongliang"
  162. :disabled="anticoagulant.zongliang == 1 ? false : true"
  163. type="number"
  164. ></el-input>
  165. </el-form-item>
  166. </el-col>
  167. <el-col :span="8" v-if="anticoagulant.gaimingcheng != -1">
  168. <el-form-item
  169. label="钙名称:"
  170. prop="anticoagulant_gaimingcheng"
  171. >
  172. <el-input
  173. v-model="addPlan.anticoagulant_gaimingcheng"
  174. :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
  175. placeholder="钙名称"
  176. ></el-input>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="8" v-if="anticoagulant.gaijiliang != -1">
  180. <el-form-item
  181. :label="
  182. '钙剂量(' + anticoagulant.gaimingcheng_unit + '): '
  183. "
  184. prop="anticoagulant_gaijiliang"
  185. >
  186. <el-input
  187. v-model="addPlan.anticoagulant_gaijiliang"
  188. :disabled="anticoagulant.gaijiliang == 1 ? false : true"
  189. placeholder="钙剂量"
  190. ></el-input>
  191. </el-form-item>
  192. </el-col>
  193. <el-col
  194. :span="8"
  195. v-if="
  196. current_select == 2 ||
  197. current_select == 5 ||
  198. current_select == 12
  199. "
  200. >
  201. <el-form-item label="置换量(L) : " prop="replacement_total">
  202. <el-input
  203. v-model="addPlan.replacement_total"
  204. type="number"
  205. ></el-input>
  206. </el-form-item>
  207. </el-col>
  208. <el-col :span="8">
  209. <el-form-item label="钾(mmol/L): " prop="kalium">
  210. <el-input v-model="addPlan.kalium"></el-input>
  211. </el-form-item>
  212. </el-col>
  213. <el-col :span="8">
  214. <el-form-item label="钠(mmol/L): " prop="sodium">
  215. <el-input v-model="addPlan.sodium"></el-input>
  216. </el-form-item>
  217. </el-col>
  218. <el-col :span="8">
  219. <el-form-item label="钙(mmol/L): " prop="calcium">
  220. <el-input v-model="addPlan.calcium"></el-input>
  221. </el-form-item>
  222. </el-col>
  223. <el-col :span="8" v-if="this.$store.getters.xt_user.template_info.org_id != 9987 && this.$store.getters.xt_user.template_info.org_id != 3877 && this.$store.getters.xt_user.template_info.org_id != 10090">
  224. <el-form-item label="透析器/灌流器:">
  225. <el-input
  226. v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
  227. </el-form-item>
  228. </el-col>
  229. <el-col :span="8" v-if="this.$store.getters.xt_user.template_info.org_id == 9987 || this.$store.getters.xt_user.template_info.org_id == 3877 || this.$store.getters.xt_user.template_info.org_id == 10090">
  230. <el-form-item label="透析器:">
  231. <el-input
  232. v-model="dialysis_dialyszers" @focus="showInnerDialog('6')"></el-input>
  233. </el-form-item>
  234. </el-col>
  235. <el-col :span="8" v-if="this.$store.getters.xt_user.template_info.org_id == 9987 || this.$store.getters.xt_user.template_info.org_id == 3877 || this.$store.getters.xt_user.template_info.org_id == 10090">
  236. <el-form-item label="灌流器:">
  237. <el-input
  238. v-model="dialysis_irrigation" @focus="showInnerDialog('7')"></el-input>
  239. </el-form-item>
  240. </el-col>
  241. <el-col :span="8">
  242. <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
  243. <el-input v-model="addPlan.bicarbonate"></el-input>
  244. </el-form-item>
  245. </el-col>
  246. <el-col :span="8">
  247. <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
  248. <el-input v-model="addPlan.glucose"></el-input>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="8">
  252. <el-form-item
  253. label="透析液流量(ml/min): "
  254. prop="dialysate_flow"
  255. >
  256. <el-input v-model="addPlan.dialysate_flow"></el-input>
  257. </el-form-item>
  258. </el-col>
  259. <el-col :span="8">
  260. <el-form-item
  261. label="透析液温度(℃): "
  262. prop="dialysate_temperature"
  263. >
  264. <el-input
  265. v-model="addPlan.dialysate_temperature"
  266. ></el-input>
  267. </el-form-item>
  268. </el-col>
  269. <el-col :span="8">
  270. <el-form-item label="电导度(mS/cm): " prop="conductivity">
  271. <el-input v-model="addPlan.conductivity"></el-input>
  272. </el-form-item>
  273. </el-col>
  274. <el-col :span="8">
  275. <el-form-item label="体液过多症状:">
  276. <el-select v-model="addPlan.body_fluid">
  277. <el-option
  278. v-for="(item, index) in body_fluid_option"
  279. :label="item.name"
  280. :key="index"
  281. :value="item.id"
  282. ></el-option>
  283. </el-select>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="8">
  287. <el-form-item label="体液过多其他症状">
  288. <el-input v-model="addPlan.body_fluid_other"></el-input>
  289. </el-form-item>
  290. </el-col>
  291. <el-col :span="8">
  292. <el-form-item label="透析前使用特殊药物">
  293. <el-select
  294. v-model="addPlan.special_medicine"
  295. placeholder="请选择"
  296. style="width:100%;"
  297. >
  298. <el-option :key="0" label="请选择" :value="0"></el-option>
  299. <el-option
  300. v-for="(item, index) in special_medicine_option"
  301. :label="item.name"
  302. :key="index"
  303. :value="item.id"
  304. ></el-option>
  305. </el-select>
  306. </el-form-item>
  307. </el-col>
  308. <el-col :span="8">
  309. <el-form-item label="使用其他特殊药物">
  310. <el-input
  311. v-model="addPlan.special_medicine_other"
  312. ></el-input>
  313. </el-form-item>
  314. </el-col>
  315. <el-col :span="8">
  316. <el-form-item
  317. label="置换液:"
  318. v-if="
  319. (current_select == 2 ||
  320. current_select == 5 ||
  321. current_select == 12) &&
  322. this.$store.getters.xt_user.template_info.template_id !=
  323. 6
  324. "
  325. >
  326. <el-select
  327. v-model="addPlan.displace_liqui_part"
  328. placeholder="请选择"
  329. >
  330. <el-option :key="0" label="请选择" :value="0"></el-option>
  331. <el-option
  332. v-for="(option, index) in displace_liqui_part_option"
  333. :key="index"
  334. :label="option.name"
  335. :value="option.id"
  336. ></el-option>
  337. </el-select>
  338. </el-form-item>
  339. <el-form-item
  340. label="置换方式:"
  341. v-if="
  342. current_select == 2 &&
  343. this.$store.getters.xt_user.template_info.template_id ==
  344. 6
  345. "
  346. >
  347. <el-select
  348. v-model="addPlan.displace_liqui_part"
  349. placeholder="请选择"
  350. >
  351. <el-option :key="0" label="请选择" :value="0"></el-option>
  352. <el-option
  353. v-for="(option, index) in displace_liqui_part_option"
  354. :key="index"
  355. :label="option.name"
  356. :value="option.id"
  357. ></el-option>
  358. </el-select>
  359. </el-form-item>
  360. </el-col>
  361. <el-col
  362. :span="8"
  363. v-if="
  364. current_select == 2 ||
  365. current_select == 5 ||
  366. current_select == 12
  367. "
  368. >
  369. <el-form-item label="置换液总量(L)">
  370. <el-input v-model="addPlan.displace_liqui_value"></el-input>
  371. </el-form-item>
  372. </el-col>
  373. <el-col :span="8">
  374. <el-form-item label="血管通路部位:">
  375. <el-select
  376. v-model="addPlan.blood_access_part_id"
  377. placeholder="请选择"
  378. >
  379. <el-option :key="1" label="请选择" :value="0"></el-option>
  380. <el-option
  381. v-for="(option, index) in blood_access_part"
  382. :key="index"
  383. :label="option.name"
  384. :value="option.name"
  385. ></el-option>
  386. </el-select>
  387. </el-form-item>
  388. </el-col>
  389. <el-col :span="8">
  390. <el-form-item label="血管通路:">
  391. <el-select
  392. v-model="addPlan.blood_access"
  393. placeholder="请选择"
  394. >
  395. <el-option :key="0" label="请选择" :value="0"></el-option>
  396. <el-option
  397. v-for="(option, index) in blood_access_option"
  398. :key="index"
  399. :label="option.name"
  400. :value="option.id"
  401. ></el-option>
  402. </el-select>
  403. </el-form-item>
  404. </el-col>
  405. <!-- </el-row>
  406. <el-row :gutter="20" > -->
  407. <el-col :span="8">
  408. <el-form-item label="实际超滤量(L)">
  409. <el-input v-model="addPlan.ultrafiltration"></el-input>
  410. </el-form-item>
  411. </el-col>
  412. <el-col :span="8">
  413. <el-form-item label="目标KT/V">
  414. <el-input v-model="addPlan.target_ktv"></el-input>
  415. </el-form-item>
  416. </el-col>
  417. </el-row>
  418. </el-form>
  419. <el-button
  420. style="float: right"
  421. size="small"
  422. class="filter-item"
  423. type="primary"
  424. icon="el-icon-edit-outline"
  425. @click="savePrescription()"
  426. >保存
  427. </el-button>
  428. </div>
  429. </el-col>
  430. </el-row>
  431. </div>
  432. <multi-select-box
  433. :propsForm="InnerDialogProps"
  434. v-on:dialog-comfirm="innerDialogComfirm"
  435. v-on:dialog-cancle="innerDialogCancle"
  436. >
  437. </multi-select-box>
  438. </div>
  439. </div>
  440. </template>
  441. <script>
  442. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  443. import { calculateAnticoagulantZL, uParseTime } from "@/utils/tools";
  444. import {
  445. getAllSystemPrescription,
  446. getSystemPrescription,
  447. postSystemPrescription,
  448. updateSystemPrescription
  449. } from "@/api/config";
  450. import { getDataConfig } from '@/utils/data'
  451. import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
  452. export default {
  453. name: "prescription",
  454. components: { MultiSelectBox,BreadCrumb },
  455. data() {
  456. return {
  457. crumbs: [
  458. { path: false, name: '配置管理' },
  459. { path: false, name: '处方模板' }
  460. ],
  461. InnerDialogProps: {
  462. values: [],
  463. visibility: false,
  464. isShowTextArea: true,
  465. customContent: '',
  466. titles: '',
  467. type: '' // 不同弹框类型,用来匹配数据
  468. },
  469. dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
  470. modeOptions: null,
  471. current_select: 0,
  472. mode_name: "HD",
  473. pageLoading: false,
  474. itemLoading: false,
  475. dialyzerPerfusionApparatus:[],
  476. treatment_mode: [
  477. // 治疗模式
  478. {
  479. id: 1,
  480. name: "HD",
  481. dialysis_duration: 1,
  482. replacement_way: 2,
  483. hemodialysis_machine: 1,
  484. blood_filter: 2,
  485. perfusion_apparatus: 2,
  486. blood_flow_volume: 1,
  487. dialysate_flow: 1,
  488. kalium: 1,
  489. sodium: 1,
  490. calcium: 1,
  491. bicarbonate: 1
  492. },
  493. {
  494. id: 2,
  495. name: "HDF",
  496. dialysis_duration: 1,
  497. replacement_way: 1,
  498. hemodialysis_machine: 2,
  499. blood_filter: 1,
  500. perfusion_apparatus: 2,
  501. blood_flow_volume: 1,
  502. dialysate_flow: 1,
  503. kalium: 1,
  504. sodium: 1,
  505. calcium: 1,
  506. bicarbonate: 1
  507. },
  508. {
  509. id: 3,
  510. name: "HD+HP",
  511. dialysis_duration: 1,
  512. replacement_way: 2,
  513. hemodialysis_machine: 1,
  514. blood_filter: 2,
  515. perfusion_apparatus: 1,
  516. blood_flow_volume: 1,
  517. dialysate_flow: 1,
  518. kalium: 1,
  519. sodium: 1,
  520. calcium: 1,
  521. bicarbonate: 1
  522. },
  523. {
  524. id: 4,
  525. name: "HP",
  526. dialysis_duration: 1,
  527. replacement_way: 2,
  528. hemodialysis_machine: 2,
  529. blood_filter: 2,
  530. perfusion_apparatus: 1,
  531. blood_flow_volume: 1,
  532. dialysate_flow: 2,
  533. kalium: 2,
  534. sodium: 2,
  535. calcium: 2,
  536. bicarbonate: 2
  537. },
  538. {
  539. id: 5,
  540. name: "HF",
  541. dialysis_duration: 1,
  542. replacement_way: 1,
  543. hemodialysis_machine: 2,
  544. blood_filter: 1,
  545. perfusion_apparatus: 2,
  546. blood_flow_volume: 1,
  547. dialysate_flow: 2,
  548. kalium: 1,
  549. sodium: 1,
  550. calcium: 1,
  551. bicarbonate: 1
  552. },
  553. {
  554. id: 6,
  555. name: "SCUF",
  556. dialysis_duration: 1,
  557. replacement_way: 2,
  558. hemodialysis_machine: 1,
  559. blood_filter: 2,
  560. perfusion_apparatus: 2,
  561. blood_flow_volume: 1,
  562. dialysate_flow: 2,
  563. kalium: 2,
  564. sodium: 2,
  565. calcium: 2,
  566. bicarbonate: 2
  567. },
  568. {
  569. id: 7,
  570. name: "IUF",
  571. dialysis_duration: 1,
  572. replacement_way: 2,
  573. hemodialysis_machine: 1,
  574. blood_filter: 2,
  575. perfusion_apparatus: 2,
  576. blood_flow_volume: 2,
  577. dialysate_flow: 2,
  578. kalium: 2,
  579. sodium: 2,
  580. calcium: 2,
  581. bicarbonate: 2
  582. },
  583. {
  584. id: 8,
  585. name: "HFHD",
  586. dialysis_duration: 1,
  587. replacement_way: 2,
  588. hemodialysis_machine: 1,
  589. blood_filter: 2,
  590. perfusion_apparatus: 2,
  591. blood_flow_volume: 1,
  592. dialysate_flow: 1,
  593. kalium: 1,
  594. sodium: 1,
  595. calcium: 1,
  596. bicarbonate: 1
  597. },
  598. {
  599. id: 9,
  600. name: "HFHD+HP",
  601. dialysis_duration: 1,
  602. replacement_way: 2,
  603. hemodialysis_machine: 1,
  604. blood_filter: 2,
  605. perfusion_apparatus: 1,
  606. blood_flow_volume: 1,
  607. dialysate_flow: 1,
  608. kalium: 1,
  609. sodium: 1,
  610. calcium: 1,
  611. bicarbonate: 1
  612. },
  613. {
  614. id: 10,
  615. name: "PHF",
  616. dialysis_duration: 1,
  617. replacement_way: 1,
  618. hemodialysis_machine: 2,
  619. blood_filter: 1,
  620. perfusion_apparatus: 2,
  621. blood_flow_volume: 1,
  622. dialysate_flow: 1,
  623. kalium: 1,
  624. sodium: 1,
  625. calcium: 1,
  626. bicarbonate: 1
  627. },
  628. {
  629. id: 11,
  630. name: "HFR",
  631. dialysis_duration: 1,
  632. replacement_way: 2,
  633. hemodialysis_machine: 2,
  634. blood_filter: 1,
  635. perfusion_apparatus: 1,
  636. blood_flow_volume: 1,
  637. dialysate_flow: 1,
  638. kalium: 1,
  639. sodium: 1,
  640. calcium: 1,
  641. bicarbonate: 1
  642. },
  643. {
  644. id: 12,
  645. name: "HDF+HP",
  646. dialysis_duration: 1,
  647. replacement_way: 1,
  648. hemodialysis_machine: 2,
  649. blood_filter: 1,
  650. perfusion_apparatus: 1,
  651. blood_flow_volume: 1,
  652. dialysate_flow: 1,
  653. kalium: 1,
  654. sodium: 1,
  655. calcium: 1,
  656. bicarbonate: 1
  657. },
  658. {
  659. id: 13,
  660. name: "CRRT",
  661. dialysis_duration: 1,
  662. replacement_way: 1,
  663. hemodialysis_machine: 2,
  664. blood_filter: 1,
  665. perfusion_apparatus: 2,
  666. blood_flow_volume: 1,
  667. dialysate_flow: 2,
  668. kalium: 1,
  669. sodium: 1,
  670. calcium: 1,
  671. bicarbonate: 1
  672. },
  673. {
  674. id: 14,
  675. name: "腹水回输",
  676. dialysis_duration: 1,
  677. replacement_way: 2,
  678. hemodialysis_machine: 1,
  679. blood_filter: 2,
  680. perfusion_apparatus: 2,
  681. blood_flow_volume: 2,
  682. dialysate_flow: 2,
  683. kalium: 2,
  684. sodium: 2,
  685. calcium: 2,
  686. bicarbonate: 2
  687. },
  688. // {
  689. // id: 15,
  690. // name: "HD前置换",
  691. // dialysis_duration: 1,
  692. // replacement_way: 2,
  693. // hemodialysis_machine: 1,
  694. // blood_filter: 2,
  695. // perfusion_apparatus: 2,
  696. // blood_flow_volume: 1,
  697. // dialysate_flow: 1,
  698. // kalium: 1,
  699. // sodium: 1,
  700. // calcium: 1,
  701. // bicarbonate: 1
  702. // },
  703. // {
  704. // id: 16,
  705. // name: "HD后置换",
  706. // dialysis_duration: 1,
  707. // replacement_way: 2,
  708. // hemodialysis_machine: 1,
  709. // blood_filter: 2,
  710. // perfusion_apparatus: 2,
  711. // blood_flow_volume: 1,
  712. // dialysate_flow: 1,
  713. // kalium: 1,
  714. // sodium: 1,
  715. // calcium: 1,
  716. // bicarbonate: 1
  717. // },
  718. // {
  719. // id: 17,
  720. // name: "HDF前置换",
  721. // dialysis_duration: 1,
  722. // replacement_way: 1,
  723. // hemodialysis_machine: 2,
  724. // blood_filter: 1,
  725. // perfusion_apparatus: 2,
  726. // blood_flow_volume: 1,
  727. // dialysate_flow: 1,
  728. // kalium: 1,
  729. // sodium: 1,
  730. // calcium: 1,
  731. // bicarbonate: 1
  732. // },
  733. // {
  734. // id: 18,
  735. // name: "HDF后置换",
  736. // dialysis_duration: 1,
  737. // replacement_way: 1,
  738. // hemodialysis_machine: 2,
  739. // blood_filter: 1,
  740. // perfusion_apparatus: 2,
  741. // blood_flow_volume: 1,
  742. // dialysate_flow: 1,
  743. // kalium: 1,
  744. // sodium: 1,
  745. // calcium: 1,
  746. // bicarbonate: 1
  747. // },
  748. {
  749. id: 19,
  750. name: "IUF+HD",
  751. dialysis_duration: 1,
  752. replacement_way: 2,
  753. hemodialysis_machine: 1,
  754. blood_filter: 2,
  755. perfusion_apparatus: 2,
  756. blood_flow_volume: 1,
  757. dialysate_flow: 1,
  758. kalium: 1,
  759. sodium: 1,
  760. calcium: 1,
  761. bicarbonate: 1
  762. },
  763. {
  764. id: 24,
  765. name: 'I-HDF',
  766. dialysis_duration: 1,
  767. replacement_way: 1,
  768. hemodialysis_machine: 2,
  769. blood_filter: 1,
  770. perfusion_apparatus: 2,
  771. blood_flow_volume: 1,
  772. dialysate_flow: 1,
  773. kalium: 1,
  774. sodium: 1,
  775. calcium: 1,
  776. bicarbonate: 1
  777. },
  778. {
  779. id: 25,
  780. name: 'HD高通',
  781. dialysis_duration: 1,
  782. replacement_way: 1,
  783. hemodialysis_machine: 2,
  784. blood_filter: 1,
  785. perfusion_apparatus: 2,
  786. blood_flow_volume: 1,
  787. dialysate_flow: 1,
  788. kalium: 1,
  789. sodium: 1,
  790. calcium: 1,
  791. bicarbonate: 1
  792. }
  793. ],
  794. addPlan: {
  795. id: 0,
  796. mode: "",
  797. dialyzer: "",
  798. dialysis_duration: "",
  799. dialysis_duration_hour: "",
  800. dialysis_duration_minute: "",
  801. hemodialysis_machine: "",
  802. perfusion_apparatus: "",
  803. dialysate_formulation: "",
  804. blood_flow_volume: "",
  805. dewater: "",
  806. displace_liqui: 0,
  807. replacement_way: "",
  808. anticoagulant: "",
  809. anticoagulant_shouji: "",
  810. anticoagulant_weichi: "",
  811. anticoagulant_zongliang: "",
  812. anticoagulant_gaimingcheng: "",
  813. anticoagulant_gaijiliang: "",
  814. kalium: "",
  815. replacement_total: "",
  816. sodium: "",
  817. calcium: "",
  818. bicarbonate: "",
  819. glucose: "",
  820. dry_weight: "",
  821. dialysate_flow: "",
  822. dialysate_temperature: "",
  823. conductivity: "",
  824. doctor: "",
  825. remark: "",
  826. target_ktv: "",
  827. target_ultrafiltration: "",
  828. dialyzer_perfusion_apparatus: "",
  829. body_fluid: "",
  830. body_fluid_other: "",
  831. special_medicine: "",
  832. special_medicine_other: "",
  833. displace_liqui_part: "",
  834. displace_liqui_value: "",
  835. ultrafiltration: "",
  836. blood_access: "",
  837. dialysis_dialyszers:"",
  838. dialysis_irrigation:"",
  839. blood_access_part_id:"",
  840. },
  841. system_prescription: [],
  842. isEdit: false,
  843. anticoagulant: {
  844. id: 0,
  845. name: "",
  846. type: 1,
  847. shouji: 1,
  848. weichi: 1,
  849. zongliang: 1,
  850. gaimingcheng: -1,
  851. gaijiliang: -1,
  852. shouji_unit: "mg",
  853. weichi_unit: "mg/h",
  854. zongliang_unit: "mg",
  855. gaimingcheng_unit: "",
  856. gaijiliang_unit: ""
  857. },
  858. anticoagulantsSet: {
  859. type: 1
  860. },
  861. replacementWays: null,
  862. anticoagulantsConfit: null,
  863. dialysate_formulation: [],
  864. body_fluid_option: [],
  865. special_medicine_option: [],
  866. displace_liqui_part_option: [],
  867. blood_access_option: [],
  868. dialysis_dialyszers:"",
  869. dialysis_irrigation:"",
  870. blood_access_part:[],
  871. };
  872. },
  873. computed: {},
  874. methods: {
  875. showInnerDialog: function(val) {
  876. this.InnerDialogProps.visibility = true
  877. switch (val) {
  878. case '5': // 透析器/灌流器
  879. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  880. this.InnerDialogProps.titles = '透析器/灌流器'
  881. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  882. this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
  883. this.InnerDialogProps.isShowTextArea = false
  884. break
  885. case '6':
  886. for(let i=0;i<this.dialyzers.length;i++){
  887. this.dialyzers[i].name = this.dialyzers[i].specification_name
  888. }
  889. this.InnerDialogProps.values = this.dialyzers
  890. this.InnerDialogProps.titles = '透析器'
  891. this.InnerDialogProps.type = 'dialyzers'
  892. this.InnerDialogProps.selected = this.dialysis_dialyszers
  893. this.InnerDialogProps.isShowTextArea = false
  894. break
  895. case '7':
  896. for(let i=0;i<this.irrigations.length;i++){
  897. this.irrigations[i].name = this.irrigations[i].specification_name
  898. }
  899. this.InnerDialogProps.values = this.irrigations
  900. this.InnerDialogProps.titles = '灌流器'
  901. this.InnerDialogProps.type = 'irrigations'
  902. this.InnerDialogProps.selected = this.dialysis_irrigation
  903. this.InnerDialogProps.isShowTextArea = false
  904. break
  905. }
  906. },
  907. innerDialogComfirm: function(val) {
  908. this.InnerDialogProps.visibility = false
  909. switch (val.type) {
  910. case 'dialyzer_perfusion_apparatus':
  911. this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
  912. break
  913. case 'dialyzers':
  914. this.dialysis_dialyszers = val.value.join(',')
  915. break
  916. case 'irrigations':
  917. this.dialysis_irrigation = val.value.join(',')
  918. break
  919. }
  920. },
  921. innerDialogCancle: function() {
  922. this.InnerDialogProps.visibility = false
  923. },
  924. openEdit() {},
  925. tableRows({ row, rowIndex }) {
  926. // 把每一行的索引放进row
  927. row.index = rowIndex;
  928. },
  929. onRowClicks(row, event, column) {
  930. this.current_select = row.id;
  931. this.mode_name = row.name;
  932. this.isEdit = false;
  933. this.addPlan.mode = row.id;
  934. this.getSystemPrescription(row.id);
  935. },
  936. getSystemPrescription(id) {
  937. var tempAddPlan = {
  938. id: 0,
  939. mode: "",
  940. dialyzer: "",
  941. dialysis_duration: "",
  942. dialysis_duration_hour: "",
  943. dialysis_duration_minute: "",
  944. hemodialysis_machine: "",
  945. dialysate_formulation: "",
  946. perfusion_apparatus: "",
  947. blood_flow_volume: "",
  948. dewater: "",
  949. displace_liqui: 0,
  950. replacement_way: "",
  951. anticoagulant: "",
  952. anticoagulant_shouji: "",
  953. anticoagulant_weichi: "",
  954. anticoagulant_zongliang: "",
  955. anticoagulant_gaimingcheng: "",
  956. anticoagulant_gaijiliang: "",
  957. kalium: "",
  958. replacement_total: "",
  959. sodium: "",
  960. calcium: "",
  961. bicarbonate: "",
  962. glucose: "",
  963. dry_weight: "",
  964. dialysate_flow: "",
  965. dialysate_temperature: "",
  966. conductivity: "",
  967. doctor: "",
  968. remark: "",
  969. target_ktv: "",
  970. target_ultrafiltration: "",
  971. dialyzer_perfusion_apparatus: "",
  972. body_fluid: "",
  973. body_fluid_other: "",
  974. special_medicine: "",
  975. special_medicine_other: "",
  976. displace_liqui_part: "",
  977. displace_liqui_value: "",
  978. ultrafiltration: "",
  979. blood_access: "",
  980. stockType:[],
  981. irrigations:[],
  982. dialyzers:[],
  983. blood_access_part_id:"",
  984. };
  985. for (const key in tempAddPlan) {
  986. this.addPlan[key] = tempAddPlan[key];
  987. }
  988. this.isEdit = false;
  989. let params = {
  990. id: id
  991. };
  992. this.dialysisTimeShow = new Date(
  993. 2018,
  994. 1,
  995. 1,
  996. this.addPlan.dialysis_duration_hour,
  997. this.addPlan.dialysis_duration_minute
  998. );
  999. getSystemPrescription(params).then(response => {
  1000. if (response.data.state == 0) {
  1001. this.$message.error(response.data.msg);
  1002. return false;
  1003. } else {
  1004. var prescription = response.data.data.prescription
  1005. console.log("prescription",prescription)
  1006. prescription.dialysis_duration = parseFloat(prescription.dialysis_duration_hour) + parseFloat((prescription.dialysis_duration_minute / 60).toFixed(2))
  1007. if(prescription.dialysate_formulation == 0){
  1008. prescription.dialysate_formulation = ""
  1009. }
  1010. if(prescription.body_fluid ==0 ){
  1011. prescription.body_fluid = ""
  1012. }
  1013. if(prescription.anticoagulant == 0){
  1014. prescription.anticoagulant = ""
  1015. }
  1016. if(prescription.anticoagulant == 3){
  1017. prescription.anticoagulant = "低分子肝素"
  1018. }
  1019. if (prescription.id > 0) {
  1020. for (const key in prescription) {
  1021. this.addPlan[key] = prescription[key];
  1022. }
  1023. this.dialysisTimeShow = new Date(
  1024. 2018,
  1025. 1,
  1026. 1,
  1027. this.addPlan.dialysis_duration_hour,
  1028. this.addPlan.dialysis_duration_minute
  1029. );
  1030. if (this.addPlan.id > 0) {
  1031. this.isEdit = true;
  1032. }
  1033. }
  1034. this.addPlan.mode = id;
  1035. this.addPlan.dialysis_dialyszers = prescription.dialysis_dialyszers
  1036. this.addPlan.dialysis_irrigation = prescription.dialysis_irrigation
  1037. this.dialysis_dialyszers = prescription.dialysis_dialyszers
  1038. this.dialysis_irrigation = prescription.dialysis_irrigation
  1039. this.addPlan.blood_access_part_id = prescription.blood_access_part_id
  1040. }
  1041. });
  1042. },
  1043. getModeStatus: function(id) {
  1044. for (let i = 0; i < this.system_prescription.length; i++) {
  1045. if (this.system_prescription[i].mode_id == id) {
  1046. return "已保存";
  1047. }
  1048. }
  1049. return "未保存";
  1050. },
  1051. getAllSystemPrescription() {
  1052. getAllSystemPrescription().then(response => {
  1053. if (response.data.state == 0) {
  1054. this.$message.error(response.data.msg);
  1055. return false;
  1056. } else {
  1057. this.system_prescription = response.data.data.prescriptions;
  1058. for (let i = 0; i < this.system_prescription.length; i++) {
  1059. if (this.system_prescription[i].mode == 1) {
  1060. this.isEdit = true;
  1061. }
  1062. }
  1063. this.stockType = response.data.data.stockType
  1064. console.log("2333555555555",this.stockType)
  1065. if(this.stockType.length >0 ){
  1066. var arr = []
  1067. var arrTwo = []
  1068. for(let i=0;i<this.stockType.length;i++){
  1069. if(this.stockType[i].stock_attribute == 2){
  1070. arr.push(this.stockType[i])
  1071. }
  1072. if(this.stockType[i].stock_attribute == 3){
  1073. arrTwo.push(this.stockType[i])
  1074. }
  1075. }
  1076. var dialyzator = []
  1077. var irrigation = []
  1078. for(let i=0;i<arr.length;i++){
  1079. for(let j=0;j<arr[i].GoodInfo.length;j++){
  1080. dialyzator.push(arr[i].GoodInfo[j])
  1081. }
  1082. }
  1083. console.log("透析器",dialyzator)
  1084. this.dialyzers = dialyzator
  1085. for(let i=0;i<arrTwo.length;i++){
  1086. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  1087. irrigation.push(arrTwo[i].GoodInfo[j])
  1088. }
  1089. }
  1090. console.log("灌流器",irrigation)
  1091. this.irrigations = irrigation
  1092. }
  1093. }
  1094. });
  1095. },
  1096. selectnDialysisTime(val) {
  1097. var valTime = val.split(":");
  1098. this.addPlan.dialysis_duration =
  1099. parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2));
  1100. this.addPlan.dialysis_duration_hour = valTime[0];
  1101. this.addPlan.dialysis_duration_minute = valTime[1];
  1102. },
  1103. changeThisAnticoagulant() {
  1104. var thismode = parseInt(this.addPlan.anticoagulant);
  1105. if (isNaN(thismode) || thismode <= 0) {
  1106. return false;
  1107. }
  1108. if (
  1109. typeof this.anticoagulantsConfit[thismode] == "undefined" ||
  1110. this.anticoagulantsConfit[thismode] == null
  1111. ) {
  1112. return false;
  1113. }
  1114. this.anticoagulant = this.anticoagulantsConfit[thismode];
  1115. },
  1116. savePrescription: function() {
  1117. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString();
  1118. if (!this.isEdit) {
  1119. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1120. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1121. postSystemPrescription(this.addPlan).then(response => {
  1122. if (response.data.state == 0) {
  1123. this.$message.error(response.data.msg);
  1124. return false;
  1125. } else {
  1126. this.$notify({
  1127. title: "成功",
  1128. message: "创建成功",
  1129. type: "success",
  1130. duration: 2000
  1131. });
  1132. this.isEdit = true;
  1133. this.system_prescription = [];
  1134. this.system_prescription = response.data.data.prescriptions;
  1135. this.addPlan.id = response.data.data.prescription.id;
  1136. return false;
  1137. }
  1138. });
  1139. } else {
  1140. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1141. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1142. updateSystemPrescription(this.addPlan.id, this.addPlan).then(
  1143. response => {
  1144. if (response.data.state == 0) {
  1145. this.$message.error(response.data.msg);
  1146. return false;
  1147. } else {
  1148. this.isEdit = true;
  1149. this.addPlan.id = response.data.data.prescription.id;
  1150. this.$notify({
  1151. title: "成功",
  1152. message: "编辑成功",
  1153. type: "success",
  1154. duration: 2000
  1155. });
  1156. return false;
  1157. }
  1158. }
  1159. );
  1160. }
  1161. }
  1162. },
  1163. mounted() {
  1164. this.$refs.singleTable.setCurrentRow(this.treatment_mode[0]);
  1165. this.mode_name = this.treatment_mode[0].name;
  1166. this.current_select = this.treatment_mode[0].id;
  1167. },
  1168. created() {
  1169. this.anticoagulantsSet = this.$store.getters.anticoagulants_set;
  1170. this.replacementWays = this.$store.getters.replacement_ways;
  1171. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  1172. this.blood_filters = this.$store.getters.blood_filters;
  1173. this.dialysate_formulation = this.$store.getters.dialysate_formulation;
  1174. this.body_fluid_option = this.$store.getters.body_fluid;
  1175. this.special_medicine_option = this.$store.getters.special_medicine;
  1176. this.displace_liqui_part_option = this.$store.getters.displace_liqui;
  1177. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  1178. console.log("列表33333333血管通路",this.blood_access_option)
  1179. this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
  1180. this.addPlan.mode = 1;
  1181. this.dialyzerPerfusionApparatus = getDataConfig(
  1182. 'hemodialysis',
  1183. 'dialyzer_perfusion_apparatus'
  1184. )
  1185. this.getAllSystemPrescription();
  1186. this.getSystemPrescription(this.addPlan.mode);
  1187. },
  1188. watch: {
  1189. "addPlan.dialysis_duration": function() {
  1190. // console.log(this.addPlan.anticoagulant_shouji);
  1191. // console.log(this.addPlan.dialysis_duration);
  1192. // console.log(this.addPlan.anticoagulant_weichi);
  1193. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1194. 1,
  1195. this.addPlan.anticoagulant_shouji,
  1196. this.addPlan.dialysis_duration,
  1197. this.addPlan.anticoagulant_weichi
  1198. );
  1199. },
  1200. "addPlan.anticoagulant_shouji": function() {
  1201. // console.log("首剂", this.addPlan.anticoagulant_shouji);
  1202. // console.log("维持", this.addPlan.anticoagulant_weichi);
  1203. // console.log("总量", this.addPlan.dialysis_duration);
  1204. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1205. 1,
  1206. this.addPlan.anticoagulant_shouji,
  1207. this.addPlan.dialysis_duration,
  1208. this.addPlan.anticoagulant_weichi
  1209. );
  1210. // console.log("总量----", this.addPlan.anticoagulant_zongliang);
  1211. },
  1212. "addPlan.anticoagulant_weichi": function() {
  1213. // console.log(this.addPlan.anticoagulant_shouji);
  1214. // console.log(this.addPlan.dialysis_duration);
  1215. // console.log(this.addPlan.anticoagulant_weichi);
  1216. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1217. 1,
  1218. this.addPlan.anticoagulant_shouji,
  1219. this.addPlan.dialysis_duration,
  1220. this.addPlan.anticoagulant_weichi
  1221. );
  1222. }
  1223. }
  1224. };
  1225. </script>
  1226. <style rel="stylesheet/scss" lang="scss" scoped></style>