血透系统pad前端

dialysisPrescription.vue 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. <template>
  2. <div class="plate-box">
  3. <h2 class="title">
  4. <span class="line"></span>
  5. <p>{{title}}</p>
  6. <span class="line"></span>
  7. </h2>
  8. <div class="plate">
  9. <ul>
  10. <li v-if="isShow('透析模式')">
  11. <label>透析模式 :</label>
  12. <span class="content">{{dialysis_mode}}</span>
  13. </li>
  14. <li v-if="isShow('透析模式')">
  15. <label>透析模式 :</label>
  16. <span class="content">{{dialysis_mode}}</span>
  17. </li>
  18. <li v-if="isShow('目标超滤量')">
  19. <label>目标超滤量 :</label>
  20. <span class="content">{{target_ultrafiltration != '0'?target_ultrafiltration:''}}</span>
  21. <span
  22. class="unit"
  23. >{{target_ultrafiltration != '0'?"L":''}}</span>
  24. <!--<span-->
  25. <!--class="unit"-->
  26. <!--v-if="this.$store.getters.user.template_info.template_id == 6"-->
  27. <!--&gt;{{target_ultrafiltration != '0'?"ml":''}}</span>-->
  28. </li>
  29. <!--<li v-if="isShow('首剂')">-->
  30. <!--<label>首剂 :</label>-->
  31. <!--<span class="content">{{anticoagulant_shouji != '0'?anticoagulant_shouji:''}}</span>-->
  32. <!--<span class="unit">{{anticoagulant_shouji != '0'?"mg":''}}</span>-->
  33. <!--</li>-->
  34. <li v-if="isShow('钙')">
  35. <label>钙:</label>
  36. <span class="content">{{calcium != '0'?calcium:""}}</span>
  37. <span class="unit">{{calcium != '0'?"mmol/L":""}}</span>
  38. </li>
  39. <li v-if="isShow('置换量')">
  40. <label>置换量 :</label>
  41. <span class="content">{{replacement_total != '0'?replacement_total:""}}</span>
  42. <span class="unit">{{replacement_total != '0'?"L":""}}</span>
  43. </li>
  44. <li v-if="isShow('葡萄糖')">
  45. <label>葡萄糖 :</label>
  46. <span class="content">{{glucose != '0'?glucose:""}}</span>
  47. <span class="unit">{{glucose != '0'?"mmol/L":""}}</span>
  48. </li>
  49. <!-- </ul>
  50. <ul>-->
  51. <li v-if="isShow('透析时长')">
  52. <label>透析时长 : </label>
  53. <span class="content">{{dialysis_duration != '0'?dialysis_duration:""}}</span>
  54. </li>
  55. <li v-if="isShow('透析液配方')">
  56. <label>透析液配方 : </label>
  57. <span class="content">{{dialysate_formulation}}</span>
  58. </li>
  59. <li v-if="isShow('钾')">
  60. <label>钾 : </label>
  61. <span class="content">{{kalium != '0'?kalium:""}}</span>
  62. <span class="unit">{{kalium != '0'?"mmol/L":""}}</span>
  63. </li>
  64. <li v-if="isShow('碳酸氢盐')">
  65. <label>碳酸氢盐 : </label>
  66. <span class="content">{{bicarbonate != '0'?bicarbonate:""}}</span>
  67. <span class="unit">{{bicarbonate != '0'?"mmol/L":""}}</span>
  68. </li>
  69. <!-- <li>
  70. <label>干体重 : </label>
  71. <span class="content">{{dry_weight}}</span>
  72. <span class="unit">kg</span>
  73. </li> -->
  74. <li v-if="isShow('透析液温度')">
  75. <label>透析液温度 : </label>
  76. <span class="content">{{dialysate_temperature != '0'?dialysate_temperature:""}}</span>
  77. <span class="unit">{{dialysate_temperature != '0'?"℃":""}}</span>
  78. </li>
  79. <!-- </ul>
  80. <ul> -->
  81. <li v-if="isShow('血流量')">
  82. <label>血流量 : </label>
  83. <span class="content">{{blood_flow_volume != '0'?blood_flow_volume:''}}</span>
  84. <span class="unit">{{blood_flow_volume != '0'?"ml/min":''}}</span>
  85. </li>
  86. <li v-if="isShow('抗凝剂')">
  87. <label>抗凝剂 : </label>
  88. <span class="content">{{anticoagulant}}</span>
  89. </li>
  90. <li v-if="isShow('首剂')&&this.prescription.anticoagulant != 5">
  91. <label>首剂 : </label>
  92. <span class="content">{{anticoagulant_shouji != '0'?anticoagulant_shouji:''}}</span>
  93. <!--<span class="unit">{{anticoagulant_shouji != '0'?"mg":''}}</span>-->
  94. <span class="unit" v-if="this.prescription.anticoagulant == 2">{{anticoagulant_shouji != '0'?"iu":""}}</span>
  95. <span class="unit" v-if="this.prescription.anticoagulant == 3">{{anticoagulant_shouji != '0'?"iu":""}}</span>
  96. <span class="unit" v-if="this.prescription.anticoagulant == 1">{{anticoagulant_shouji != '0'?"mg":""}}</span>
  97. <span class="unit" v-if="this.prescription.anticoagulant == 4">{{anticoagulant_shouji != '0'?"mg":""}}</span>
  98. <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_shouji != '0'?"mg":""}}</span>
  99. </li>
  100. <li v-if="isShow('维持')">
  101. <label>维持 : </label>
  102. <span class="content">{{anticoagulant_weichi != '0'?anticoagulant_weichi:""}}</span>
  103. <span class="unit" v-if="this.prescription.anticoagulant == 2">{{anticoagulant_weichi != '0'?"iu":""}}</span>
  104. <span class="unit" v-if="this.prescription.anticoagulant == 3">{{anticoagulant_weichi != '0'?"iu":""}}</span>
  105. <span class="unit" v-if="this.prescription.anticoagulant == 1">{{anticoagulant_weichi != '0'?"mg":""}}</span>
  106. <span class="unit" v-if="this.prescription.anticoagulant == 4">{{anticoagulant_weichi != '0'?"mg":""}}</span>
  107. <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_weichi != '0'?"ml":""}}</span>
  108. </li>
  109. <li v-if="isShow('总量')&&this.prescription.anticoagulant != 5">
  110. <label>总量: </label>
  111. <span class="content">{{anticoagulant_zongliang != '0'?anticoagulant_zongliang:""}}</span>
  112. <span class="unit" v-if="this.prescription.anticoagulant == 2">{{anticoagulant_zongliang != '0'?"iu":""}}</span>
  113. <span class="unit" v-if="this.prescription.anticoagulant == 3">{{anticoagulant_zongliang != '0'?"iu":""}}</span>
  114. <span class="unit" v-if="this.prescription.anticoagulant == 1">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
  115. <span class="unit" v-if="this.prescription.anticoagulant == 4">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
  116. <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_zongliang != '0'?"ml":""}}</span>
  117. </li>
  118. <li v-if="isShow('钙名称')&&this.prescription.anticoagulant == 5">
  119. <label>钙名称: </label>
  120. <span class="content">{{this.prescription.anticoagulant_gaimingcheng}}</span>
  121. </li>
  122. <li v-if="isShow('钙剂量')&&this.prescription.anticoagulant == 5">
  123. <label>钙剂量: </label>
  124. <span class="content">{{this.prescription.anticoagulant_gaijiliang}}</span>
  125. <span class="unit" v-if="this.prescription.anticoagulant == 5">{{'ml'}}</span>
  126. </li>
  127. <li v-if="isShow('钠')">
  128. <label>钠 : </label>
  129. <span class="content">{{sodium != '0'?sodium:""}}</span>
  130. <span class="unit">{{sodium != '0'?"mmol/L":""}}</span>
  131. </li>
  132. <li v-if="isShow('透析液流量')">
  133. <label>透析液流量 : </label>
  134. <span class="content">{{dialysate_flow != '0'?dialysate_flow:""}}</span>
  135. <span class="unit">{{dialysate_flow != '0'?"ml/min":""}}</span>
  136. </li>
  137. <!-- </ul>
  138. <ul> -->
  139. <li v-if="isShow('透析器/灌流器')">
  140. <label>透析器/灌流器 : </label>
  141. <span class="content">{{dialyzer_perfusion_apparatus}}</span>
  142. <span class="unit"></span>
  143. </li>
  144. <li v-if="isShow('体液过多症状')">
  145. <label>体液过多症状: </label>
  146. <span class="content">{{body_fluid}}</span>
  147. <span class="unit"></span>
  148. </li>
  149. <li v-if="isShow('体液过多其他症状')">
  150. <label>体液过多其他症状: </label>
  151. <span class="content">{{this.prescription.body_fluid_other}}</span>
  152. <span class="unit"></span>
  153. </li>
  154. <li v-if="isShow('透析前使用特殊药物')">
  155. <label>透析前使用特殊药物: </label>
  156. <span class="content">{{special_medicine}}</span>
  157. <span class="unit"></span>
  158. </li>
  159. <li v-if="isShow('透析前使用其他特殊药物')">
  160. <label>透析前使用其他特殊药物: </label>
  161. <span class="content">{{special_medicine_other}}</span>
  162. <span class="unit"></span>
  163. </li>
  164. <li v-if="isShow('置换液')">
  165. <label v-if="this.$store.getters.user.template_info.template_id != 6">置换液: </label>
  166. <label v-if="this.$store.getters.user.template_info.template_id == 6">置换方式: </label>
  167. <span class="content">{{displace_liqui}}</span>
  168. <span class="unit"></span>
  169. </li>
  170. <li v-if="isShow('置换液总量')">
  171. <label>置换液总量: </label>
  172. <span class="content">{{this.prescription.displace_liqui_value ? this.prescription.displace_liqui_value:''}}</span>
  173. <span class="unit">{{this.prescription.displace_liqui_value?"L":""}}</span>
  174. </li>
  175. <li v-if="isShow('血管通路')">
  176. <label>血管通路: </label>
  177. <span class="content">{{blood_access}}</span>
  178. <span class="unit"></span>
  179. </li>
  180. <li v-if="isShow('实际超滤量')">
  181. <label>实际超滤量: </label>
  182. <span class="content">{{ultrafiltration != '0'? ultrafiltration:''}}</span>
  183. <span class="unit">{{ultrafiltration != '0'?"L":""}}</span>
  184. </li>
  185. <li v-if="isShow('目标KT/V')">
  186. <label>目标KT/V: </label>
  187. <span class="content">{{target_ktv != '0'? target_ktv:''}}</span>
  188. </li>
  189. <li v-if="isShow('电导度')">
  190. <label>电导度 : </label>
  191. <span class="content">{{conductivity != '0'?conductivity:""}}</span>
  192. <span class="unit">{{conductivity != '0'?"mS/m":""}}</span>
  193. </li>
  194. </ul>
  195. </div>
  196. <div class="note">备注 : <span>{{note}}</span></div>
  197. </div>
  198. </template>
  199. <script>
  200. import {getDataConfig} from '@/utils/data'
  201. export default {
  202. name: 'DialysisPrescription',
  203. data () {
  204. return {
  205. title: '透析处方',
  206. perfusion_apparatus_map: {},
  207. dialysateFormulationMap: {}
  208. }
  209. },
  210. props: {
  211. prescription: {
  212. type: Object
  213. },
  214. solution: {
  215. type: Object
  216. },
  217. device_number_map: {
  218. type: Object
  219. }
  220. },
  221. computed: {
  222. target_ultrafiltration: function () {
  223. var v = this.getValueStr('target_ultrafiltration', 'target_ultrafiltration')
  224. v = this.getFloat(v)
  225. return v.length == 0 ? '0' : v
  226. },
  227. dialysis_mode: function () {
  228. var mode = this.getValueStr('mode_id', 'mode_id')
  229. if (mode.length == 0) {
  230. return ''
  231. }
  232. if (this.$store.getters.treatment_mode[mode] != undefined) {
  233. return this.$store.getters.treatment_mode[mode].name
  234. }
  235. return ''
  236. },
  237. perfusion_apparatus: function () {
  238. var v = this.getValueStr('perfusion_apparatus', 'perfusion_apparatus')
  239. if (v.length == 0) {
  240. return ''
  241. }
  242. if (this.perfusion_apparatus_map[v] != undefined) {
  243. return this.perfusion_apparatus_map[v].name
  244. }
  245. return ''
  246. },
  247. displace_liqui: function () {
  248. var v = this.getValueStr('displace_liqui', 'displace_liqui')
  249. return v.length == 0 ? '0' : v
  250. },
  251. anticoagulant_shouji: function () {
  252. var v = this.getValueStr('anticoagulant_shouji', 'anticoagulant_shouji')
  253. return v.length == 0 ? '0' : v
  254. },
  255. kalium: function () {
  256. var v = this.getValueStr('kalium', 'kalium')
  257. v = this.getFloat(v)
  258. return v == 0 ? '0' : v
  259. },
  260. replacement_total: function () {
  261. var v = this.getValueStr('replacement_total', 'replacement_total')
  262. return v.length == 0 ? '0' : v
  263. },
  264. bicarbonate: function () {
  265. var v = this.getValueStr('bicarbonate', 'bicarbonate')
  266. return v.length == 0 ? '0' : v
  267. },
  268. dialysate_flow: function () {
  269. var v = this.getValueStr('dialysate_flow', 'dialysate_flow')
  270. return v.length == 0 ? '0' : v
  271. },
  272. dialysis_duration: function () {
  273. var dialysis_duration_hour = (this.getValueStr('dialysis_duration_hour', 'dialysis_duration_hour'))
  274. var dialysis_duration_minute = (this.getValueStr('dialysis_duration_minute', 'dialysis_duration_minute'))
  275. if (dialysis_duration_hour.length == 0 && dialysis_duration_minute.length == 0) {
  276. return '0'
  277. } else {
  278. var time = dialysis_duration_hour + 'h' + dialysis_duration_minute + 'min'
  279. return time.length == 0 ? '0' : time
  280. }
  281. },
  282. blood_flow_volume: function () {
  283. var v = this.getValueStr('blood_flow_volume', 'blood_flow_volume')
  284. return v.length == 0 ? '0' : v
  285. },
  286. replacement_way: function () {
  287. return this.getValueStr('replacement_way', 'replacement_way')
  288. },
  289. anticoagulant_weichi: function () {
  290. var v = this.getValueStr('anticoagulant_weichi', 'anticoagulant_weichi')
  291. return v.length == 0 ? '0' : v
  292. },
  293. sodium: function () {
  294. var v = this.getValueStr('sodium', 'sodium')
  295. console.log(v)
  296. v = this.getFloat(v)
  297. console.log(v)
  298. return v == 0 ? '0' : v
  299. },
  300. glucose: function () {
  301. var v = this.getValueStr('glucose', 'glucose')
  302. return v.length == 0 ? '0' : v
  303. },
  304. dialysate_temperature: function () {
  305. var v = this.getValueStr('dialysate_temperature', 'dialysate_temperature')
  306. return v.length == 0 ? '0' : v
  307. },
  308. dialyzer: function () {
  309. var v = this.getValueStr('dialyzer', 'hemodialysis_machine')
  310. if (v.length == 0) {
  311. return ''
  312. }
  313. if (this.device_number_map[v] != undefined) {
  314. return this.device_number_map[v].name
  315. }
  316. return ''
  317. },
  318. dialysate_formulation: function () {
  319. var v = this.getValueStr('dialysate_formulation', 'dialysate_formulation')
  320. if (v.length == 0) {
  321. return ''
  322. }
  323. if (v in this.dialysateFormulationMap) {
  324. return this.dialysateFormulationMap[v].name
  325. }
  326. return ''
  327. },
  328. prescription_dewatering: function () {
  329. var v = this.getValueStr('prescription_dewatering', 'dewater')
  330. return v.length == 0 ? '0' : v
  331. },
  332. anticoagulant: function () {
  333. var v = this.getValueStr('anticoagulant', 'anticoagulant')
  334. if (v.length == 0) {
  335. return ''
  336. }
  337. if (this.$store.getters.anticoagulants_confit[v] != undefined) {
  338. return this.$store.getters.anticoagulants_confit[v].name
  339. }
  340. return ''
  341. },
  342. anticoagulant_zongliang: function () {
  343. var v = this.getValueStr('anticoagulant_zongliang', 'anticoagulant_zongliang')
  344. return v.length == 0 ? '0' : v
  345. },
  346. calcium: function () {
  347. var v = this.getValueStr('calcium', 'calcium')
  348. v = this.getFloat(v)
  349. return v == 0 ? '0' : v
  350. },
  351. conductivity: function () {
  352. var v = this.getValueStr('conductivity', 'conductivity')
  353. return v.length == 0 ? '0' : v
  354. },
  355. dialyzer_perfusion_apparatus: function () {
  356. return this.getValueStr('dialyzer_perfusion_apparatus', 'dialyzer_perfusion_apparatus')
  357. },
  358. note: function () {
  359. return this.getValueStr('remark', 'remark')
  360. },
  361. body_fluid: function () {
  362. var id = this.getValueStr('body_fluid', 'body_fluid')
  363. if (id == 0) {
  364. return ''
  365. }
  366. var bodyFluidOptions = this.$store.getters.body_fluid
  367. for (let i = 0; i < bodyFluidOptions.length; i++) {
  368. if (bodyFluidOptions[i].id == id) {
  369. return bodyFluidOptions[i].name
  370. }
  371. }
  372. },
  373. special_medicine: function () {
  374. var id = this.getValueStr('special_medicine', 'special_medicine')
  375. if (id == 0) {
  376. return ''
  377. }
  378. var special_medicine = this.$store.getters.special_medicine
  379. for (let i = 0; i < special_medicine.length; i++) {
  380. if (special_medicine[i].id == id) {
  381. return special_medicine[i].name
  382. }
  383. }
  384. },
  385. special_medicine_other: function () {
  386. return this.getValueStr('special_medicine_other', 'special_medicine_other')
  387. },
  388. blood_access: function () {
  389. var id = this.getValueStr('blood_access', 'blood_access')
  390. if (id == 0) {
  391. return ''
  392. }
  393. var blood_access = this.$store.getters.blood_access
  394. console.log('blood_access', blood_access)
  395. for (let i = 0; i < blood_access.length; i++) {
  396. if (blood_access[i].id == id) {
  397. return blood_access[i].name
  398. }
  399. }
  400. },
  401. displace_liqui: function () {
  402. var id = this.getValueStr('displace_liqui_part', 'displace_liqui_part')
  403. var displace_liqui_value = this.getValueStr('displace_liqui_value', 'displace_liqui_value')
  404. var displace_liqui_part = ''
  405. var displace_liqui = this.$store.getters.displace_liqui
  406. for (let i = 0; i < displace_liqui.length; i++) {
  407. if (displace_liqui[i].id == id) {
  408. displace_liqui_part = displace_liqui[i].name
  409. }
  410. }
  411. return displace_liqui_part + displace_liqui_value + 'L'
  412. },
  413. ultrafiltration: function () {
  414. var v = this.getValueStr('ultrafiltration', 'ultrafiltration')
  415. v = this.getFloat(v)
  416. return v.length == 0 ? '0' : v
  417. },
  418. target_ktv: function () {
  419. var v = this.getValueStr('target_ktv', 'target_ktv')
  420. return v.length == 0 ? '0' : v
  421. }
  422. },
  423. created () {
  424. var perfusion_apparatus = this.$store.getters.perfusion_apparatus
  425. var map = {}
  426. for (let index = 0; index < perfusion_apparatus.length; index++) {
  427. const p = perfusion_apparatus[index]
  428. map[p.id] = p
  429. }
  430. this.perfusion_apparatus_map = map
  431. var dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation')
  432. for (var index in dialysateFormulationOptions) {
  433. this.dialysateFormulationMap[dialysateFormulationOptions[index].id] = dialysateFormulationOptions[index]
  434. }
  435. },
  436. methods: {
  437. isShow (name) {
  438. var filedList = this.$store.getters.user.fileds
  439. for (let i = 0; i < filedList.length; i++) {
  440. if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  441. return true
  442. }
  443. }
  444. return false
  445. },
  446. getValueStr (pkey, skey) {
  447. if ((this.prescription == null || this.prescription.id == '') && (this.solution == null || this.solution.id == '')) {
  448. return ''
  449. } else if (this.prescription != null && this.prescription.id != '') {
  450. if (this.prescription[pkey] == null || this.prescription[pkey] == undefined) {
  451. return ''
  452. }
  453. return this.prescription[pkey] + ''
  454. } else {
  455. if (this.solution[skey] == null || this.solution[skey] == undefined) {
  456. return ''
  457. }
  458. return this.solution[skey] + ''
  459. }
  460. },
  461. getFloat: function (x) {
  462. if (x != '.') {
  463. var f = Math.round(x * 100) / 100
  464. var s = f.toString()
  465. var rs = s.indexOf('.')
  466. if (rs <= 0) {
  467. rs = s.length
  468. s += '.'
  469. }
  470. while (s.length <= rs + 1) {
  471. s += '0'
  472. }
  473. return s
  474. } else {
  475. return '0.0'
  476. }
  477. }
  478. }
  479. }
  480. </script>
  481. <style rel="stylesheet/scss" lang="scss" scoped></style>