血透系统pad前端

dialysisPrescription.vue 14KB

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