血透系统pad前端

dialysisPrescription.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. <template>
  2. <div class="plate-box">
  3. <h2 class="title"><span class="line"></span><p>{{title}}</p><span class="line"></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. <!-- </ul>
  36. <ul> -->
  37. <li v-if="isShow('透析时长')">
  38. <label>透析时长 : </label>
  39. <span class="content">{{dialysis_duration != '0'?dialysis_duration:""}}</span>
  40. </li>
  41. <li v-if="isShow('透析液配方')">
  42. <label>透析液配方 : </label>
  43. <span class="content">{{dialysate_formulation}}</span>
  44. </li>
  45. <li v-if="isShow('维持')">
  46. <label>维持 : </label>
  47. <span class="content">{{anticoagulant_weichi != '0'?anticoagulant_weichi:""}}</span>
  48. <span class="unit">{{anticoagulant_weichi != '0'?"mg/h":""}}</span>
  49. </li>
  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. <!-- </ul>
  71. <ul> -->
  72. <li v-if="isShow('血流量')">
  73. <label>血流量 : </label>
  74. <span class="content">{{blood_flow_volume != '0'?blood_flow_volume:''}}</span>
  75. <span class="unit">{{blood_flow_volume != '0'?"ml/min":''}}</span>
  76. </li>
  77. <li v-if="isShow('抗凝剂')">
  78. <label>抗凝剂 : </label>
  79. <span class="content">{{anticoagulant}}</span>
  80. </li>
  81. <li v-if="isShow('总量')">
  82. <label>总量: </label>
  83. <span class="content">{{anticoagulant_zongliang != '0'?anticoagulant_zongliang:""}}</span>
  84. <span class="unit" v-if="this.prescription.anticoagulant == 2">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
  85. <span class="unit" v-if="this.prescription.anticoagulant == 3">{{anticoagulant_zongliang != '0'?"IU":""}}</span>
  86. <span class="unit" v-if="this.prescription.anticoagulant == 1">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
  87. <span class="unit" v-if="this.prescription.anticoagulant == 4">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
  88. <span class="unit" v-if="this.prescription.anticoagulant == 5">{{anticoagulant_zongliang != '0'?"mg":""}}</span>
  89. </li>
  90. <li v-if="isShow('钠')">
  91. <label>钠 : </label>
  92. <span class="content">{{sodium != '0'?sodium:""}}</span>
  93. <span class="unit">{{sodium != '0'?"mmol/L":""}}</span>
  94. </li>
  95. <li v-if="isShow('透析液流量')">
  96. <label>透析液流量 : </label>
  97. <span class="content">{{dialysate_flow != '0'?dialysate_flow:""}}</span>
  98. <span class="unit">{{dialysate_flow != '0'?"ml/min":""}}</span>
  99. </li>
  100. <!-- </ul>
  101. <ul> -->
  102. <li v-if="isShow('透析器/灌流器')">
  103. <label>透析器/灌流器 : </label>
  104. <span class="content">{{dialyzer_perfusion_apparatus}}</span>
  105. <span class="unit"></span>
  106. </li>
  107. <li v-if="isShow('体液过多症状')">
  108. <label>体液过多症状: </label>
  109. <span class="content">{{body_fluid}}</span>
  110. <span class="unit"></span>
  111. </li>
  112. <li v-if="isShow('透析前使用特殊药物')">
  113. <label>透析前使用特殊药物: </label>
  114. <span class="content">{{special_medicine}}</span>
  115. <span class="unit"></span>
  116. </li>
  117. <li v-if="isShow('透析前使用其他特殊药物')">
  118. <label>透析前使用其他特殊药物: </label>
  119. <span class="content">{{special_medicine_other}}</span>
  120. <span class="unit"></span>
  121. </li>
  122. <li v-if="isShow('置换液')">
  123. <label>置换液: </label>
  124. <span class="content">{{displace_liqui}}</span>
  125. <span class="unit"></span>
  126. </li>
  127. <li v-if="isShow('血管通路')">
  128. <label>血管通路: </label>
  129. <span class="content">{{blood_access}}</span>
  130. <span class="unit"></span>
  131. </li>
  132. <li v-if="isShow('实际超滤量')">
  133. <label>实际超滤量: </label>
  134. <span class="content">{{ultrafiltration != '0'? ultrafiltration:''}}</span>
  135. <span class="unit">{{ultrafiltration != '0'?"L":""}}</span>
  136. </li>
  137. <li v-if="isShow('目标KT/V')">
  138. <label>目标KT/V: </label>
  139. <span class="content">{{target_ktv != '0'? target_ktv:''}}</span>
  140. </li>
  141. <li v-if="isShow('电导度')">
  142. <label>电导度 : </label>
  143. <span class="content">{{conductivity != '0'?conductivity:""}}</span>
  144. <span class="unit">{{conductivity != '0'?"mS/m":""}}</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. export default {
  154. name: "DialysisPrescription",
  155. data() {
  156. return {
  157. title: "透析处方",
  158. perfusion_apparatus_map: {},
  159. dialysateFormulationMap:{},
  160. };
  161. },
  162. props: {
  163. prescription: {
  164. type: Object,
  165. },
  166. solution: {
  167. type: Object,
  168. },
  169. device_number_map: {
  170. type: Object,
  171. }
  172. },
  173. computed: {
  174. target_ultrafiltration:function(){
  175. var v = this.getValueStr("target_ultrafiltration", "target_ultrafiltration")
  176. v = this.getFloat(v)
  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. v = this.getFloat(v)
  210. return v == 0 ? "0":v
  211. },
  212. replacement_total:function(){
  213. var v = this.getValueStr("replacement_total", "replacement_total")
  214. return v.length == 0 ? "0" : v
  215. },
  216. bicarbonate: function() {
  217. var v = this.getValueStr("bicarbonate", "bicarbonate")
  218. return v.length == 0 ? "0" : v
  219. },
  220. dialysate_flow: function() {
  221. var v = this.getValueStr("dialysate_flow", "dialysate_flow")
  222. return v.length == 0 ? "0" : v
  223. },
  224. dialysis_duration: function() {
  225. var dialysis_duration_hour = (this.getValueStr("dialysis_duration_hour", "dialysis_duration_hour"))
  226. var dialysis_duration_minute = (this.getValueStr("dialysis_duration_minute", "dialysis_duration_minute"))
  227. if(dialysis_duration_hour.length == 0 && dialysis_duration_minute.length == 0){
  228. return "0"
  229. }else{
  230. var time = dialysis_duration_hour+"h"+dialysis_duration_minute+"min"
  231. return time.length == 0 ? "0" : time
  232. }
  233. },
  234. blood_flow_volume: function() {
  235. var v = this.getValueStr("blood_flow_volume", "blood_flow_volume")
  236. return v.length == 0 ? "0" : v
  237. },
  238. replacement_way: function() {
  239. return this.getValueStr("replacement_way", "replacement_way")
  240. },
  241. anticoagulant_weichi: function() {
  242. var v = this.getValueStr("anticoagulant_weichi", "anticoagulant_weichi")
  243. return v.length == 0 ? "0" : v
  244. },
  245. sodium: function() {
  246. var v = this.getValueStr("sodium", "sodium")
  247. console.log(v)
  248. v = this.getFloat(v)
  249. console.log(v)
  250. return v == 0 ? "0":v
  251. },
  252. glucose: function() {
  253. var v = this.getValueStr("glucose", "glucose")
  254. return v.length == 0 ? "0" : v
  255. },
  256. dialysate_temperature: function() {
  257. var v = this.getValueStr("dialysate_temperature", "dialysate_temperature")
  258. return v.length == 0 ? "0" : v
  259. },
  260. dialyzer: function() {
  261. var v = this.getValueStr("dialyzer", "hemodialysis_machine")
  262. if (v.length == 0) {
  263. return ""
  264. }
  265. if (this.device_number_map[v] != undefined) {
  266. return this.device_number_map[v].name
  267. }
  268. return ""
  269. },
  270. dialysate_formulation: function(){
  271. var v = this.getValueStr("dialysate_formulation", "dialysate_formulation")
  272. if (v.length == 0) {
  273. return ""
  274. }
  275. if(v in this.dialysateFormulationMap) {
  276. return this.dialysateFormulationMap[v].name;
  277. }
  278. return ""
  279. },
  280. prescription_dewatering: function() {
  281. var v = this.getValueStr("prescription_dewatering", "dewater")
  282. return v.length == 0 ? "0" : v
  283. },
  284. anticoagulant: function() {
  285. var v = this.getValueStr("anticoagulant", "anticoagulant")
  286. if (v.length == 0) {
  287. return ""
  288. }
  289. if (this.$store.getters.anticoagulants_confit[v] != undefined) {
  290. return this.$store.getters.anticoagulants_confit[v].name
  291. }
  292. return ""
  293. },
  294. anticoagulant_zongliang: function() {
  295. var v = this.getValueStr("anticoagulant_zongliang", "anticoagulant_zongliang")
  296. return v.length == 0 ? "0" : v
  297. },
  298. calcium: function() {
  299. var v = this.getValueStr("calcium", "calcium")
  300. v = this.getFloat(v)
  301. return v == 0 ? "0":v
  302. },
  303. conductivity: function() {
  304. var v = this.getValueStr("conductivity", "conductivity")
  305. return v.length == 0 ? "0" : v
  306. },
  307. dialyzer_perfusion_apparatus: function() {
  308. return this.getValueStr("dialyzer_perfusion_apparatus", "dialyzer_perfusion_apparatus")
  309. },
  310. note: function() {
  311. return this.getValueStr("remark", "remark")
  312. },body_fluid:function () {
  313. var id = this.getValueStr("body_fluid", "body_fluid")
  314. if(id == 0){
  315. return ""
  316. }
  317. var bodyFluidOptions = this.$store.getters.body_fluid;
  318. for (let i = 0; i <bodyFluidOptions.length; i++){
  319. if(bodyFluidOptions[i].id == id){
  320. return bodyFluidOptions[i].name
  321. }
  322. }
  323. },special_medicine:function () {
  324. var id = this.getValueStr("special_medicine", "special_medicine")
  325. if(id == 0){
  326. return ""
  327. }
  328. var special_medicine = this.$store.getters.special_medicine;
  329. for (let i = 0; i <special_medicine.length; i++){
  330. if(special_medicine[i].id == id){
  331. return special_medicine[i].name
  332. }
  333. }
  334. },special_medicine_other:function () {
  335. return this.getValueStr("special_medicine_other", "special_medicine_other")
  336. },blood_access:function () {
  337. var id = this.getValueStr("blood_access", "blood_access")
  338. if(id == 0){
  339. return ""
  340. }
  341. var blood_access = this.$store.getters.blood_access;
  342. for (let i = 0; i <blood_access.length; i++){
  343. if(blood_access[i].id == id){
  344. return blood_access[i].name
  345. }
  346. }
  347. },displace_liqui:function () {
  348. var id = this.getValueStr("displace_liqui_part", "displace_liqui_part")
  349. var displace_liqui_value = this.getValueStr("displace_liqui_value", "displace_liqui_value")
  350. var displace_liqui_part = ""
  351. var displace_liqui = this.$store.getters.displace_liqui;
  352. for (let i = 0; i <displace_liqui.length; i++){
  353. if(displace_liqui[i].id == id){
  354. displace_liqui_part = displace_liqui[i].name
  355. }
  356. }
  357. return displace_liqui_part + displace_liqui_value+"L"
  358. },ultrafiltration:function () {
  359. var v = this.getValueStr("ultrafiltration", "ultrafiltration")
  360. v = this.getFloat(v)
  361. return v.length == 0 ? "0" : v
  362. },target_ktv:function () {
  363. var v = this.getValueStr("target_ktv", "target_ktv")
  364. return v.length == 0 ? "0" : v
  365. }
  366. },
  367. created() {
  368. var perfusion_apparatus = this.$store.getters.perfusion_apparatus
  369. var map = {}
  370. for (let index = 0; index < perfusion_apparatus.length; index++) {
  371. const p = perfusion_apparatus[index];
  372. map[p.id] = p
  373. }
  374. this.perfusion_apparatus_map = map
  375. var dialysateFormulationOptions = getDataConfig('hemodialysis','dialysate_formulation');
  376. for(var index in dialysateFormulationOptions){
  377. this.dialysateFormulationMap[dialysateFormulationOptions[index].id] = dialysateFormulationOptions[index];
  378. }
  379. },
  380. methods: {
  381. isShow(name){
  382. var filedList = this.$store.getters.user.fileds
  383. for (let i = 0; i < filedList.length; i++){
  384. if(filedList[i].module == 1 && filedList[i].filed_name_cn == name&&filedList[i].is_show == 1){
  385. return true
  386. }
  387. }
  388. return false
  389. },
  390. getValueStr(pkey, skey) {
  391. if ((this.prescription == null || this.prescription.id == "") && (this.solution == null || this.solution.id == "")) {
  392. return ""
  393. } else if (this.prescription != null && this.prescription.id != "") {
  394. if (this.prescription[pkey] == null || this.prescription[pkey] == undefined) {
  395. return ""
  396. }
  397. return this.prescription[pkey] + ""
  398. } else {
  399. if (this.solution[skey] == null || this.solution[skey] == undefined) {
  400. return ""
  401. }
  402. return this.solution[skey] + ""
  403. }
  404. }, getFloat: function(x) {
  405. if (x != '.') {
  406. var f = Math.round(x * 100) / 100;
  407. var s = f.toString();
  408. var rs = s.indexOf('.');
  409. if (rs <= 0) {
  410. rs = s.length;
  411. s += '.';
  412. }
  413. while (s.length <= rs + 1) {
  414. s += '0';
  415. }
  416. return s;
  417. } else {
  418. return '0.0';
  419. }
  420. }
  421. }
  422. };
  423. </script>
  424. <style rel="stylesheet/scss" lang="scss" scoped>
  425. </style>