血透系统PC前端

DialysisPrescription.vue 16KB

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