血透系统PC前端

DialysisPrintOrderSeven.vue 54KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447
  1. <template>
  2. <div id="dialysis-print-box">
  3. <div class="dialysis-print-order">
  4. <div class="order-yy-name"></div>
  5. <div class="order-title">{{ orgname }}&nbsp;&nbsp;&nbsp;血液透析(滤过)记录表单</div>
  6. <table class="print-table" style="margin-top: 10px;" border="1">
  7. <tbody>
  8. <tr>
  9. <td>治疗日期:{{ getDatge(queryParams.xtdate) }}</td>
  10. </tr>
  11. <tr style="width:100%">
  12. <td>
  13. <div style="display:flex;">
  14. <span style="flex:1;text-align:left;margin-left:15px;"
  15. >姓名:{{ patientInfo.name }}</span
  16. >
  17. <span style="flex:1;margin-left:15px;"
  18. >年龄:{{ getAge(patientInfo) }}</span
  19. >
  20. <span style="flex:1;margin-left:15px;"
  21. >性别:{{ patientInfo.gender }}</span
  22. >
  23. <span style="flex:1;margin-left:15px;"
  24. >透析机号: {{
  25. dialysisOrder &&
  26. dialysisOrder.DeviceNumber &&
  27. dialysisOrder.DeviceNumber.number.length > 0
  28. ? dialysisOrder.DeviceNumber.number
  29. : patientInfo.DialysisSchedule.device_number.number
  30. }}</span
  31. >
  32. <span style="flex:1;margin-left:15px;">第({{total}})次透析</span>
  33. </div>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td style="text-align:left;">
  38. <span style="display:inline-block;margin-left:15px;"
  39. >上机前病情:</span
  40. >
  41. <div style="display:inline-block;">
  42. <label-box
  43. :isChecked="receiverTreatmentAccess.consciousness == 1 ? true : false"
  44. showValue="清醒"
  45. ></label-box>
  46. &nbsp;
  47. <label-box
  48. :isChecked="receiverTreatmentAccess.consciousness == 2 ? true : false"
  49. showValue="嗜睡"
  50. ></label-box>
  51. &nbsp;
  52. <label-box
  53. :isChecked="receiverTreatmentAccess.consciousness == 4 ? true : false"
  54. showValue="模糊"
  55. ></label-box>
  56. &nbsp;
  57. <label-box
  58. :isChecked="receiverTreatmentAccess.consciousness == 3 ? true : false"
  59. showValue="昏迷"
  60. ></label-box>
  61. </div>
  62. </td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. <table class="print-table" border="1">
  67. <tr>
  68. <td style="text-align:left;">
  69. <span style="display:inline-block;margin-left:15px;"
  70. >治疗方式:</span
  71. >
  72. <label-box
  73. :isChecked="schedule.mode_id == 1 ? true : false"
  74. showValue="HD"
  75. ></label-box>
  76. &nbsp;
  77. <label-box
  78. :isChecked="schedule.mode_id == 2 ? true : false"
  79. showValue="HDF"
  80. ></label-box>
  81. &nbsp;
  82. <label-box
  83. :isChecked="schedule.mode_id == 4 ? true : false"
  84. showValue="HP"
  85. ></label-box>
  86. &nbsp;
  87. <label-box
  88. :isChecked="schedule.mode_id == 3 ? true : false"
  89. showValue="HD+HP"
  90. ></label-box>
  91. &nbsp; ( &nbsp;
  92. <label-box
  93. :isChecked="displace_liqui == 1 ? true : false"
  94. showValue="前稀释"
  95. ></label-box>
  96. &nbsp;
  97. <label-box
  98. :isChecked="displace_liqui == 2 ? true : false"
  99. showValue="后稀释"
  100. ></label-box
  101. >, 置换量:{{replacement_total}}L &nbsp;
  102. <label-box
  103. :isChecked="displace_liqui == 0? true : false"
  104. showValue="其它"
  105. ></label-box>
  106. &nbsp;)
  107. </td>
  108. <td><span>治疗时间:{{actual_treatment_hour}}小时{{actual_treatment_minute}}分</span></td>
  109. </tr>
  110. </table>
  111. <table class="print-table" border="1">
  112. <tr>
  113. <td style="text-align:left;">
  114. <span style="display:inline-block;margin-left:15px;"
  115. >治疗抗凝:</span
  116. >
  117. <label-box
  118. :isChecked="anticoagulant== 3 ? true : false"
  119. showValue="低分子肝素:"
  120. ></label-box>
  121. &nbsp;
  122. <label-box
  123. :isChecked="anticoagulant==2 ? true : false"
  124. showValue="普通肝素:"
  125. ></label-box>
  126. &nbsp;首剂 {{anticoagulant_shouji}}
  127. <span v-if="anticoagulant==4">mg</span>
  128. <span v-if="anticoagulant==3">iu</span>
  129. <span v-if="anticoagulant==2">iu</span>
  130. <span v-if="anticoagulant==1">mg</span>&nbsp;
  131. 维持 {{anticoagulant_weichi}}
  132. <span v-if="anticoagulant == 5">ml/h</span>
  133. <span v-if="anticoagulant == 4">mg/h</span>
  134. <span v-if="anticoagulant == 3">iu/h</span>
  135. <span v-if="anticoagulant == 2">iu/h</span>
  136. <span v-if="anticoagulant == 1">mg/h</span>
  137. &nbsp; 总量 {{anticoagulant_zongliang}}
  138. <span v-if="anticoagulant == 4">mg</span>
  139. <span v-if="anticoagulant == 3">iu</span>
  140. <span v-if="anticoagulant == 2">iu</span>
  141. <span v-if="anticoagulant == 1">mg</span>; &nbsp;
  142. <label-box
  143. :isChecked="anticoagulant == 1 ? true : false"
  144. showValue="无肝素"
  145. ></label-box>
  146. &nbsp;
  147. <label-box
  148. :isChecked="anticoagulant == 5 ? true : false"
  149. showValue="枸橼酸钠"
  150. ></label-box>
  151. </td>
  152. </tr>
  153. </table>
  154. <table class="print-table" border="1">
  155. <tr>
  156. <td style="text-align:left;">
  157. <span style="display:inline-block;margin-left:15px;"
  158. >处方脱水量:{{target_ultrafiltration}}ml</span
  159. >&nbsp;
  160. <span style="display:inline-block;margin-left:15px;"
  161. >透析液流量:{{dialysate_flow}}ml/h</span
  162. >&nbsp;
  163. </td>
  164. <td>
  165. <span v-if="doctorForm.url === ''">
  166. 医生签名:{{doctorForm.doctor}}
  167. </span>
  168. <span v-if="doctorForm.url!==''">
  169. 医生签名:
  170. <img style="height:20px" :src="doctorForm.url">
  171. </span>
  172. </td>
  173. </tr>
  174. </table>
  175. <table class="print-table" border="1">
  176. <tr>
  177. <td style="text-align:left;"><span style="display:inline-block;margin-left:15px;"
  178. >透析机:{{bed}}</span</td>
  179. <td style="text-align:left;"><span style="display:inline-block;margin-left:15px;"
  180. >透析(滤)器:{{dialyzer_perfusion_apparatus}}</span</td></td>
  181. <td style="text-align:left;">
  182. <span style="display:inline-block;margin-left:15px;"
  183. >透析液(mmol/L):</span
  184. >
  185. <span v-if="dialysate_formulation == 1">
  186. 常规(钾:{{kalium}}&nbsp;,钙:{{calcium}}&nbsp;,钠:{{sodium}};)
  187. </span>
  188. <span v-if="dialysate_formulation == 2">
  189. 低钙(钾:{{kalium}}&nbsp;,钙:{{calcium}}&nbsp;,钠:{{sodium}};)
  190. </span>
  191. <span v-if="dialysate_formulation == 3">
  192. 高钙(钾:{{kalium}}&nbsp;,钙:{{calcium}}&nbsp;,钠:{{sodium}};)
  193. </span>
  194. <span v-if="dialysate_formulation == 4">
  195. 低钠(钾:{{kalium}}&nbsp;,钙:{{calcium}}&nbsp;,钠:{{sodium}};)
  196. </span>
  197. <span v-if="dialysate_formulation == 5">
  198. 高钠(钾:{{kalium}}&nbsp;,钙:{{calcium}}&nbsp;,钠:{{sodium}};)
  199. </span>
  200. </td>
  201. </tr>
  202. </table>
  203. <table class="print-table" border="1">
  204. <tr>
  205. <td style="text-align:left;">
  206. <span style="display:inline-block;margin-left:15px;"
  207. >血管通路:</span
  208. >
  209. &nbsp;
  210. <label-box
  211. :isChecked="blood_access_part_opera_id == '内瘘' ? true : false"
  212. showValue="内瘘"
  213. ></label-box>
  214. &nbsp;
  215. <label-box
  216. :isChecked="blood_access_part_opera_id == '长期静脉导管' ? true : false"
  217. showValue="长期静脉导管"
  218. ></label-box>
  219. </label-box>
  220. &nbsp;
  221. <label-box
  222. :isChecked="blood_access_part_opera_id == '临时颈静脉导管' ? true : false"
  223. showValue="临时颈静脉导管"
  224. ></label-box>
  225. &nbsp;
  226. <label-box
  227. :isChecked="blood_access_part_opera_id == '临时股静脉导管' ? true : false"
  228. showValue="临时股静脉导管"
  229. ></label-box>
  230. &nbsp;
  231. <label-box
  232. :isChecked="blood_access_part_opera_id != '内瘘' && blood_access_part_opera_id != '长期静脉导管' && blood_access_part_opera_id !='临时颈静脉导管' && blood_access_part_opera_id != '临时股静脉导管'? true : false"
  233. showValue="其它"
  234. ></label-box>
  235. &nbsp;&nbsp;&nbsp;&nbsp;
  236. <span v-if="PunctureNurse.url == ''">穿刺者:{{PunctureNurse.user_name}}</span>
  237. <span v-if="PunctureNurse.url !=''">穿刺者:<img :src="PunctureNurse.url" style="height:20px"></span>
  238. </td>
  239. </tr>
  240. <tr>
  241. <td>治疗过程记录</td>
  242. </tr>
  243. </table>
  244. <table class="print-table" border="1">
  245. <tr>
  246. <th rowspan="2">时间</th>
  247. <th colspan="3">透析参数</th>
  248. <th colspan="6">生命体征</th>
  249. <th>治疗中病情变化</th>
  250. </tr>
  251. <tr>
  252. <td width="60"><p style="height:20px;line-height:20px">TMP</p><p style="height:20px;line-height:20px">(mmHg)</p></td>
  253. <td width="60"><p style="height:20px;line-height:20px">静脉压</p><p style="height:20px;line-height:20px">(mmHg)</p></td>
  254. <td width="60"><p style="height:20px;line-height:20px">血流量</p><p style="height:20px;line-height:20px">(ml/min)</p></td>
  255. <td width="60"><p style="height:20px;line-height:20px">脱水量</p><p style="height:20px;line-height:20px">(ml)</p></td>
  256. <td width="50"><p style="height:20px;line-height:20px">T</p><p style="height:20px;line-height:20px">(℃)</p></td>
  257. <td width="50"><p style="height:20px;line-height:20px">HR</p><p style="height:20px;line-height:20px">(bpm)</p></td>
  258. <td width="50"><p style="height:20px;line-height:20px">R</p><p style="height:20px;line-height:20px">(bpm)</p></td>
  259. <td width="60"><p style="height:20px;line-height:20px">BP</p><p style="height:20px;line-height:20px">(mmHg)</p></td>
  260. <td width="60"><p style="height:20px;line-height:20px">SpO₂</p><p style="height:20px;line-height:20px">(%)</p></td>
  261. <td>记录</td>
  262. </tr>
  263. <tr v-for="(monitor, monindex) in monitors" :key="monindex">
  264. <td style="line-height:50px;height:30px">{{ getTime(monitor.operate_time, "{h}:{i}") }}</td>
  265. <td style="line-height:50px;height:30px">{{monitor.transmembrane_pressure?monitor.transmembrane_pressure:""}}</td>
  266. <td style="line-height:50px;height:30px">{{monitor.venous_pressure?monitor.venous_pressure:""}}</td>
  267. <td style="line-height:50px;height:30px">{{monitor.blood_flow_volume ? monitor.blood_flow_volume:""}}</td>
  268. <td style="line-height:50px:height:30px">{{monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:""}}</td>
  269. <td style="line-height:50px;height:30px"> {{
  270. monitor.temperature
  271. ? monitor.temperature
  272. : ""
  273. }}</td>
  274. <td style="line-height:50px;height:30px">{{monitor.pulse_frequency?monitor.pulse_frequency:""}}</td>
  275. <td style="line-height:50px;height:30px">{{monitor.breathing_rate?monitor.breathing_rate:""}}</td>
  276. <td style="line-height:50px;height:30px">{{
  277. monitor.systolic_blood_pressure
  278. ? monitor.systolic_blood_pressure + "/"
  279. : ""
  280. }}{{
  281. monitor.diastolic_blood_pressure
  282. ? monitor.diastolic_blood_pressure
  283. : ""
  284. }}</td>
  285. <td style="line-height:50px;height:30px">{{monitor.blood_oxygen_saturation?monitor.blood_oxygen_saturation:""}}</td>
  286. <td style="line-height:16px;padding:0px;">
  287. {{ monitor.end }}
  288. {{ monitor.symptom }} &nbsp;{{ monitor.result }}
  289. </td>
  290. </tr>
  291. </table>
  292. <table class="print-table" border="1">
  293. <tr>
  294. <td>时间</td>
  295. <td>医嘱执行记录</td>
  296. <td>执行</td>
  297. <td>核对</td>
  298. <td>上次透后体重</td>
  299. <td> {{
  300. afterWeightLast
  301. ? parseFloat(afterWeightLast).toFixed(1): "未称重"
  302. }}kg</td>
  303. </tr>
  304. <tr v-for="(advice, advice_index) in tableAdvice"
  305. :key="advice_index">
  306. <td>{{getTime(advice.start_time,'{y}-{m}-{d} {h}:{i}')}}</td>
  307. <td>
  308. <span v-if="advice.parent_id > 0">---></span>
  309. <span>{{ advice.advice_name }}</span>
  310. <span v-if="advice && advice.advice_desc"
  311. >({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
  312. <span v-if="advice.prescribing_number">
  313. &nbsp;&nbsp; {{ advice.prescribing_number}}{{ advice.prescribing_number_unit }}</span>
  314. <span v-if="advice.single_dose != 0">
  315. {{ advice.single_dose}}{{ advice.single_dose_unit }}</span>
  316. <span v-if="advice.parent_id == 0">{{advice.delivery_way}}</span>
  317. <span v-if="advice.parent_id == 0">{{advice.execution_frequency}}</span>
  318. <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span></td>
  319. <td>
  320. <span
  321. v-if="setAdminUserES(advice.execution_staff) == ''"
  322. >{{ getAdminUser(advice.execution_staff) }}</span
  323. >
  324. <img
  325. style="height:20px;"
  326. :src="setAdminUserES(advice.execution_staff)"
  327. alt=""
  328. srcset=""
  329. v-else
  330. />
  331. </td>
  332. <td>
  333. <span v-if="setAdminUserES(advice.checker) == ''">{{getAdminUser(advice.checker)}}</span>
  334. <img style="height:20px;" :src="setAdminUserES(advice.checker)" alt="" srcset="" v-else>
  335. </td>
  336. <td v-if="advice_index==0">透前体重</td>
  337. <td v-if="advice_index==0">{{weight_before}}kg</td>
  338. <td v-if="advice_index==1">体重增加量</td>
  339. <td v-if="advice_index==1">
  340. {{dryWeight_add?dryWeight_add:0}}
  341. kg</td>
  342. <td v-if="advice_index==2">干体重(DW)</td>
  343. <td v-if="advice_index==2">{{dry_weight}}kg</td>
  344. <td v-if="advice_index==3">较干体重增加量</td>
  345. <td v-if="advice_index==3">{{dryWeight_add?dryWeight_add:0}}kg</td>
  346. <td v-if="advice_index==4">净脱水量</td>
  347. <td v-if="advice_index==4">{{actual_ultrafiltration}}L</td>
  348. <td v-if="advice_index==5">透后体重</td>
  349. <td v-if="advice_index==5">{{weight_after}}kg</td>
  350. <td v-if="advice_index==6">本次透析体重下降量</td>
  351. <td v-if="advice_index==6">{{(weight_before-weightloss_after).toFixed(1)}}kg</td>
  352. </tr>
  353. <tr>
  354. <td colspan="6" style="text-align:left;min-height:20px">
  355. <span>治疗小结:{{mission}}{{dialysis_summary}}</span>
  356. </td>
  357. </tr>
  358. </table>
  359. <table class="print-table" border="1">
  360. <tr>
  361. <td style="text-align:left;">
  362. <span v-if="doctorForm.url === ''">
  363. 医生签名:{{doctorForm.doctor}}
  364. </span>
  365. <span v-if="doctorForm.url!==''">
  366. 医生签名:
  367. <img style="height:20px" :src="doctorForm.url">
  368. </span>
  369. &nbsp;&nbsp;&nbsp;&nbsp;
  370. <span v-if="orderForm.url === ''">
  371. 护士签名:{{orderForm.start_nurse}}
  372. </span>
  373. <span v-if="orderForm.url !==''" >
  374. 护士签名:<img :src="orderForm.url" style="height:20px;">
  375. </span>
  376. </td>
  377. </tr>
  378. </table>
  379. </div>
  380. </div>
  381. </template>
  382. <script>
  383. import { getDialysisRecord } from '@/api/dialysis'
  384. import { getDataConfig } from '@/utils/data'
  385. import { jsGetAge, uParseTime } from '@/utils/tools'
  386. import LabelBox from '../printItem/LabelBox'
  387. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  388. // import DialysisPrintOrderOne from './template/dialysisPrintOrderOne'
  389. // import DialysisPrintOrderTwo from './template/dialysisPrintOrderTwo'
  390. export default {
  391. name: 'dialysisPrintOrderOne',
  392. components: {
  393. // DialysisPrintOrderOne,
  394. // DialysisPrintOrderTwo,
  395. LabelBox,
  396. BreadCrumb
  397. },
  398. data() {
  399. return {
  400. crumbs: [
  401. { path: false, name: '透析管理' },
  402. { path: false, name: '打印单' }
  403. ],
  404. operators: [],
  405. adminUser: [],
  406. check: {},
  407. dialysisOrder: {
  408. DeviceNumber: []
  409. },
  410. operatorMaps: {},
  411. complications: [
  412. '低血压',
  413. '高血压',
  414. '心律失常',
  415. '头晕',
  416. '头痛',
  417. '呕吐',
  418. '抽搐',
  419. '出血',
  420. '心衰',
  421. '腹痛',
  422. '无'
  423. ],
  424. jilurow: 0,
  425. advice_jilurow: 0,
  426. loading: false,
  427. orgname: '',
  428. patientInfo_gender_1: false,
  429. patientInfo_gender_2: false,
  430. patientInfo_source_2: false,
  431. patientInfo_source_1: false,
  432. modeOptions: {},
  433. replacementWays: [],
  434. perfusionApparatus: [],
  435. anticoagulantsConfit: {},
  436. bloodAccessParOpera: {},
  437. dialysateFormulationOptions: {},
  438. queryParams: {
  439. xtdate: '',
  440. xtno: ''
  441. },
  442. patientInfo: {
  443. birth: '',
  444. age: '',
  445. DialysisSchedule: {
  446. device_number: { number: '' },
  447. device_zone: { name: '' }
  448. },
  449. gender: 0
  450. },
  451. predialysis: {
  452. score: '',
  453. internal_fistula: '',
  454. internal_fistula_skin: '',
  455. catheter: '',
  456. blood_access_part_opera_name: ''
  457. },
  458. afterdialysis: {
  459. complications_index: ''
  460. },
  461. prescription: {
  462. dialysate_formulation_name: '',
  463. device: {}
  464. },
  465. advices: [],
  466. users: [],
  467. monitors: [],
  468. summary: {},
  469. receiverTreatmentAccess: {},
  470. org_template_info: {},
  471. doctor_advices: [],
  472. advice_groups: [],
  473. schedule: [],
  474. AlPanel: {
  475. id: 0,
  476. name: '',
  477. type: 1,
  478. shouji: 2,
  479. weichi: 2,
  480. zongliang: 2,
  481. gaimingcheng: -1,
  482. gaijiliang: -1,
  483. shouji_unit: 'mg',
  484. weichi_unit: 'mg/h',
  485. zongliang_unit: 'mg',
  486. gaimingcheng_unit: '',
  487. gaijiliang_unit: ''
  488. },
  489. list: 5,
  490. replacement_total: '',
  491. actual_treatment_hour: '',
  492. actual_treatment_minute: '',
  493. anticoagulant: '',
  494. anticoagulant_shouji: '',
  495. anticoagulant_zongliang: '',
  496. prescription_dewatering: '',
  497. blood_flow_volume: '',
  498. dialysate_flow: '',
  499. bed: '',
  500. dialyzer_perfusion_apparatus: '',
  501. dialysate_formulation: '',
  502. blood_access: '',
  503. doctor: '',
  504. nurse: '',
  505. doctorAdvice: [],
  506. total: '',
  507. weight_before: '',
  508. dry_weight: '',
  509. weight_after: '',
  510. weightloss_after: '',
  511. actual_ultrafiltration: '',
  512. temperature: '',
  513. systolic_blood_pressure: '',
  514. diastolic_blood_pressure: '',
  515. mission: '',
  516. dialysis_summary: '',
  517. orderForm: {
  518. start_nurse: '',
  519. url: ''
  520. },
  521. doctorForm: {
  522. doctor: '',
  523. url: ''
  524. },
  525. tableAdvice: [],
  526. monitor: [],
  527. displace_liqui: '',
  528. kalium: '',
  529. sodium: '',
  530. calcium: '',
  531. weight_gain: '',
  532. afterWeightLast: '',
  533. anticoagulant_weichi: '',
  534. target_ultrafiltration: '',
  535. blood_access_internal_fistula: '',
  536. venous_catheterization: '',
  537. blood_access_part_opera_id: '',
  538. dryWeight_add: '',
  539. weight: '',
  540. vascularId: 0,
  541. PunctureNurse: {
  542. user_name: '',
  543. url: ''
  544. }
  545. }
  546. },
  547. methods: {
  548. getAdminUser(id) {
  549. if (id == 0) {
  550. return ''
  551. }
  552. if (id == undefined) {
  553. return ''
  554. }
  555. for (let i = 0; i < this.adminUser.length; i++) {
  556. if (this.adminUser[i].id == id) {
  557. return this.adminUser[i].name
  558. }
  559. }
  560. },
  561. getDatge(value) {
  562. var times = Date.parse(value) / 1000
  563. var timestr = uParseTime(times, '{y}年{m}月{d}日')
  564. return timestr
  565. },
  566. getTime(value, temp) {
  567. if (value == 0) {
  568. return ''
  569. }
  570. if (value != undefined) {
  571. return uParseTime(value, temp)
  572. }
  573. return ''
  574. },
  575. getTimes(time) {
  576. if (time === '') {
  577. return ''
  578. }
  579. return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
  580. },
  581. printThisPage() {
  582. var ptime = Math.round(new Date().getTime() / 1000)
  583. this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
  584. const style =
  585. '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
  586. if (this.org_template_info.template_id == 1) {
  587. printJS({
  588. printable: 'dialysis-print-box',
  589. type: 'html',
  590. style: style,
  591. scanStyles: false
  592. })
  593. } else if (
  594. this.org_template_info.template_id == 2 ||
  595. this.org_template_info.template_id == 0
  596. ) {
  597. printJS({
  598. printable: 'dialysis-print-box-1',
  599. type: 'html',
  600. style: style,
  601. scanStyles: false
  602. })
  603. }
  604. },
  605. getNumber() {
  606. if (this.dialysisOrder != null) {
  607. return (
  608. this.patientInfo.DialysisSchedule.device_zone.name +
  609. this.dialysisOrder.DeviceNumber.number
  610. )
  611. } else {
  612. return (
  613. this.patientInfo.DialysisSchedule.device_zone.name +
  614. this.patientInfo.DialysisSchedule.device_number.number
  615. )
  616. }
  617. },
  618. getXuserName(id) {
  619. if (id <= 0) {
  620. return ''
  621. }
  622. var name = ''
  623. if (this.users == null || typeof this.users.length === 'undefined') {
  624. return name
  625. }
  626. var leng = this.users.length
  627. if (leng == 0) {
  628. return name
  629. }
  630. for (let index = 0; index < leng; index++) {
  631. if (this.users[index].id == id) {
  632. name = this.users[index].name
  633. break
  634. }
  635. }
  636. return name
  637. },
  638. setAdminUserES(id) {
  639. // console.log(id)
  640. if (id == 0) {
  641. return ''
  642. }
  643. if (id in this.operatorMaps) {
  644. return this.operatorMaps[id].url
  645. } else {
  646. return ''
  647. }
  648. },
  649. modeName(mode_id) {
  650. return typeof this.modeOptions[mode_id] !== 'undefined' &&
  651. typeof this.modeOptions[mode_id].name !== 'undefined'
  652. ? this.modeOptions[mode_id].name
  653. : ''
  654. },
  655. getDialysisRecord() {
  656. this.loading = true
  657. getDialysisRecord(this.queryParams).then(response => {
  658. if (response.data.state === 1) {
  659. this.adminUser = response.data.data.users
  660. this.users = response.data.data.users
  661. var patientInfo = response.data.data.patientInfo
  662. // console.log('patientInfo', patientInfo)
  663. if (patientInfo.gender === 1) {
  664. patientInfo.gender = '男'
  665. }
  666. if (patientInfo.gender === 2) {
  667. patientInfo.gender = '女'
  668. }
  669. this.patientInfo = response.data.data.patientInfo
  670. // console.log('透析记录', this.patientInfo)
  671. this.patientInfo.birth = uParseTime(
  672. this.patientInfo.birthday,
  673. '{y}-{m}-{d}'
  674. )
  675. // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
  676. if (response.data.data.patientInfo.first_dialysis_date != 0) {
  677. this.patientInfo.first_dialysis_date = uParseTime(
  678. response.data.data.patientInfo.first_dialysis_date,
  679. '{y}-{m}-{d}'
  680. )
  681. } else {
  682. this.patientInfo.first_dialysis_date = ''
  683. }
  684. this.check = response.data.data.check
  685. var predialysis = response.data.data.PredialysisEvaluation
  686. var predialysName = response.data.data.predialysName
  687. this.blood_access_part_opera_id = predialysName.name
  688. // console.log('血管', predialysName)
  689. this.weight_before = predialysis.weight_before
  690. this.dry_weight = predialysis.dry_weight
  691. this.weight_gain = predialysis.weight_gain
  692. this.blood_access_internal_fistula = predialysis.blood_access_internal_fistula
  693. this.venous_catheterization = predialysis.venous_catheterization
  694. // this.blood_access_part_opera_id = predialysis.blood_access_part_opera_id
  695. // console.log('血管通路', this.blood_access_part_opera_id)
  696. var arry = []
  697. arry = getDataConfig('hemodialysis', 'vascular_access_desc')
  698. // console.log('arry', arry)
  699. // eslint-disable-next-line no-empty
  700. var id = 0
  701. for (let i = 0; i < arry.length; i++) {
  702. // console.log(arry[i].id)
  703. if (arry[i].id === predialysis.blood_access_part_opera_id) {
  704. id = predialysis.blood_access_part_opera_id
  705. }
  706. this.vascularId = id
  707. }
  708. this.predialysis = predialysis
  709. // console.log('透前评估', this.predialysis)
  710. this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
  711. this.predialysis.blood_access_part_opera_id
  712. )
  713. var afterdialysis = response.data.data.AssessmentAfterDislysis
  714. // eslint-disable-next-line no-undef
  715. // console.log('透后评估', afterdialysis)
  716. this.weight_after = afterdialysis.weight_after
  717. this.weightloss_after = afterdialysis.weight_after
  718. this.temperature = afterdialysis.temperature
  719. this.actual_ultrafiltration = afterdialysis.actual_ultrafiltration
  720. this.actual_treatment_hour = afterdialysis.actual_treatment_hour
  721. this.actual_treatment_minute = afterdialysis.actual_treatment_minute
  722. this.systolic_blood_pressure = afterdialysis.systolic_blood_pressure
  723. this.diastolic_blood_pressure = afterdialysis.diastolic_blood_pressure
  724. this.afterdialysis = afterdialysis
  725. var doctoradvce = response.data.data.doctorAdvice
  726. var doctorAdevieInfo = response.data.data.doctorAdevieInfo
  727. var tableAdvice = doctorAdevieInfo
  728. // console.log('医生', tableAdvice.length)
  729. if (tableAdvice.length === 0) {
  730. var obj = { 'advice_name': '', start_time: '' }
  731. var obj1 = { 'advice_name': '', start_time: '' }
  732. var obj2 = { 'advice_name': '', start_time: '' }
  733. var obj3 = { 'advice_name': '', start_time: '' }
  734. var obj4 = { 'advice_name': '', start_time: '' }
  735. var obj5 = { 'advice_name': '', start_time: '' }
  736. var obj6 = { 'advice_name': '', start_time: '' }
  737. tableAdvice.push(obj)
  738. tableAdvice.push(obj1)
  739. tableAdvice.push(obj2)
  740. tableAdvice.push(obj3)
  741. tableAdvice.push(obj4)
  742. tableAdvice.push(obj5)
  743. tableAdvice.push(obj6)
  744. this.tableAdvice = tableAdvice
  745. }
  746. if (tableAdvice.length === 1) {
  747. var obj = { 'advice_name': '', start_time: '' }
  748. var obj1 = { 'advice_name': '', start_time: '' }
  749. var obj2 = { 'advice_name': '', start_time: '' }
  750. var obj3 = { 'advice_name': '', start_time: '' }
  751. var obj4 = { 'advice_name': '', start_time: '' }
  752. var obj5 = { 'advice_name': '', start_time: '' }
  753. tableAdvice.push(obj)
  754. tableAdvice.push(obj1)
  755. tableAdvice.push(obj2)
  756. tableAdvice.push(obj3)
  757. tableAdvice.push(obj4)
  758. tableAdvice.push(obj5)
  759. this.tableAdvice = tableAdvice
  760. console.log('零食医嘱', doctorAdevieInfo)
  761. }
  762. if (tableAdvice.length === 2) {
  763. var obj = { 'advice_name': '', start_time: '' }
  764. var obj1 = { 'advice_name': '', start_time: '' }
  765. var obj2 = { 'advice_name': '', start_time: '' }
  766. var obj3 = { 'advice_name': '', start_time: '' }
  767. var obj4 = { 'advice_name': '', start_time: '' }
  768. tableAdvice.push(obj)
  769. tableAdvice.push(obj1)
  770. tableAdvice.push(obj2)
  771. tableAdvice.push(obj3)
  772. tableAdvice.push(obj4)
  773. this.tableAdvice = tableAdvice
  774. console.log('零食医嘱', doctorAdevieInfo)
  775. }
  776. if (tableAdvice.length === 3) {
  777. var obj = { 'advice_name': '', start_time: '' }
  778. var obj1 = { 'advice_name': '', start_time: '' }
  779. var obj2 = { 'advice_name': '', start_time: '' }
  780. var obj3 = { 'advice_name': '', start_time: '' }
  781. tableAdvice.push(obj)
  782. tableAdvice.push(obj1)
  783. tableAdvice.push(obj2)
  784. tableAdvice.push(obj3)
  785. this.tableAdvice = tableAdvice
  786. console.log('零食医嘱', doctorAdevieInfo)
  787. }
  788. if (tableAdvice.length === 4) {
  789. var obj = { 'advice_name': '', start_time: '' }
  790. var obj1 = { 'advice_name': '', start_time: '' }
  791. var obj2 = { 'advice_name': '', start_time: '' }
  792. tableAdvice.push(obj)
  793. tableAdvice.push(obj1)
  794. tableAdvice.push(obj2)
  795. this.tableAdvice = tableAdvice
  796. console.log('零食医嘱', doctorAdevieInfo)
  797. }
  798. if (tableAdvice.length === 5) {
  799. var obj = { 'advice_name': '', start_time: '' }
  800. var obj1 = { 'advice_name': '', start_time: '' }
  801. tableAdvice.push(obj)
  802. tableAdvice.push(obj1)
  803. this.tableAdvice = tableAdvice
  804. console.log('零食医嘱', doctorAdevieInfo)
  805. }
  806. if (tableAdvice.length === 6) {
  807. var obj = { 'advice_name': '', start_time: '' }
  808. tableAdvice.push(obj)
  809. this.tableAdvice = tableAdvice
  810. // console.log('零食医嘱', doctorAdevieInfo)
  811. }
  812. if (tableAdvice.length >= 7) {
  813. this.tableAdvice = tableAdvice
  814. }
  815. var doctor = response.data.data.doctor
  816. this.doctor = doctor.user_name
  817. // console.log('医生', doctor)
  818. this.PunctureNurse = response.data.data.nurse
  819. // console.log('穿刺护士', this.PunctureNurse)
  820. var operators = response.data.data.operators
  821. // console.log('operators', operators)
  822. var total = response.data.data.total
  823. // console.log('total', total)
  824. this.total = total
  825. this.operators = operators
  826. this.dialysisOrder =
  827. response.data.data.dialysisOrder === null
  828. ? null
  829. : response.data.data.dialysisOrder
  830. if (this.operators.length > 0) {
  831. var operatorsLen = this.operators.length
  832. for (var index = 0; index < operatorsLen; index++) {
  833. this.$set(
  834. this.operatorMaps,
  835. this.operators[index].creator,
  836. this.operators[index]
  837. )
  838. }
  839. }
  840. this.afterdialysis.txqnx = -1
  841. if (this.afterdialysis.cruor.indexOf('0度') > -1) {
  842. this.afterdialysis.txqnx = 0
  843. }
  844. if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
  845. this.afterdialysis.txqnx = 1
  846. }
  847. if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
  848. this.afterdialysis.txqnx = 2
  849. }
  850. if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
  851. this.afterdialysis.txqnx = 3
  852. }
  853. this.afterdialysis.complications = this.afterdialysis.complication.split(
  854. ','
  855. )
  856. this.afterdialysis.complications_other = []
  857. this.afterdialysis.complications_index = []
  858. var acllen = this.afterdialysis.complications.length
  859. for (let index = 0; index < acllen; index++) {
  860. if (
  861. this.complications.indexOf(
  862. this.afterdialysis.complications[index]
  863. ) >= 0
  864. ) {
  865. this.afterdialysis.complications_index.push(
  866. this.afterdialysis.complications[index]
  867. )
  868. } else if (
  869. this.complications.indexOf(
  870. this.afterdialysis.complications[index]
  871. ) < 0 &&
  872. this.afterdialysis.complications_other.indexOf(
  873. this.afterdialysis.complications[index]
  874. ) < 0
  875. ) {
  876. this.afterdialysis.complications_other.push(
  877. this.afterdialysis.complications[index]
  878. )
  879. }
  880. }
  881. this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(
  882. ','
  883. )
  884. var prescription = response.data.data.dialysisPrescription
  885. this.prescription = prescription
  886. var schedule = response.data.data.schedule
  887. // console.log('排班', schedule)
  888. this.schedule = schedule
  889. var receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
  890. // console.log('接诊评估', receiverTreatmentAccess)
  891. this.receiverTreatmentAccess = receiverTreatmentAccess
  892. var dialysisway = response.data.data.dialysisway
  893. // console.log('透析处方2', dialysisway)
  894. this.target_ultrafiltration = dialysisway.target_ultrafiltration
  895. var order = response.data.data.order
  896. // console.log('上下机', order)
  897. var start_nurse = response.data.data.startNuse
  898. // console.log('上机护士', start_nurse)
  899. this.orderForm.start_nurse = start_nurse.user_name
  900. this.orderForm.url = start_nurse.url
  901. var doctorname = response.data.data.DoctorName
  902. // console.log('医师签名', doctorname)
  903. this.doctorForm.doctor = doctorname.user_name
  904. this.doctorForm.url = doctorname.url
  905. this.bed = order.number
  906. this.replacement_total = dialysisway.replacement_total
  907. this.anticoagulant = dialysisway.anticoagulant
  908. this.anticoagulant_shouji = dialysisway.anticoagulant_shouji
  909. this.anticoagulant_zongliang = dialysisway.anticoagulant_zongliang
  910. this.prescription_dewatering = dialysisway.prescription_dewatering
  911. this.blood_flow_volume = dialysisway.blood_flow_volume
  912. this.dialysate_flow = dialysisway.dialysate_flow
  913. this.dialyzer_perfusion_apparatus = dialysisway.dialyzer_perfusion_apparatus
  914. this.dialysate_formulation = dialysisway.dialysate_formulation
  915. this.blood_access = dialysisway.blood_access
  916. this.displace_liqui = dialysisway.displace_liqui
  917. this.kalium = dialysisway.kalium
  918. this.sodium = dialysisway.sodium
  919. this.calcium = dialysisway.calcium
  920. this.anticoagulant_weichi = dialysisway.anticoagulant_weichi
  921. var afterWeightLast = response.data.data.assessmentAfterDislysis
  922. // console.log('上次透后体重', afterWeightLast.weight_after)
  923. this.afterWeightLast = afterWeightLast.weight_after
  924. // eslint-disable-next-line no-undef
  925. // console.log('透前体重', this.weight_before)
  926. // console.log('干体中', this.dry_weight)
  927. // console.log('什么体重', predialysis.additional_weight)
  928. var dryWeight_add = this.weight_before - this.dry_weight - predialysis.additional_weight
  929. if (this.afterWeightLast === 0) {
  930. this.dryWeight_add = 0
  931. } else {
  932. this.dryWeight_add = dryWeight_add.toFixed(2)
  933. }
  934. // console.log('较干体中增加量', this.dryWeight_add)
  935. // this.afterWeightLast = afterWeightLast.weight_after
  936. this.prescription.mode = this.modeName(this.prescription.mode_id)
  937. var rwLen = this.replacementWays.length
  938. this.prescription.replacement = ''
  939. for (let index = 0; index < rwLen; index++) {
  940. if (
  941. this.replacementWays[index].id ==
  942. this.prescription.replacement_way
  943. ) {
  944. this.prescription.replacement = this.replacementWays[index].name
  945. break
  946. }
  947. }
  948. this.prescription.dialysate_formulation_name = this.dialysateFormulationName(
  949. this.prescription.dialysate_formulation
  950. )
  951. var paLen = this.perfusionApparatus.length
  952. this.prescription.perfusion_apparatus_name = ''
  953. for (let index = 0; index < paLen; index++) {
  954. if (
  955. this.perfusionApparatus[index].id ==
  956. this.prescription.perfusion_apparatus
  957. ) {
  958. this.prescription.perfusion_apparatus_name = this.perfusionApparatus[
  959. index
  960. ].name
  961. break
  962. }
  963. }
  964. var acLen = this.anticoagulantsConfit.length
  965. var thisALID = this.prescription.anticoagulant
  966. this.prescription.anticoagulant_name = ''
  967. if (
  968. typeof this.anticoagulantsConfit[thisALID] !== 'undefined' &&
  969. this.anticoagulantsConfit[thisALID] != null
  970. ) {
  971. this.prescription.anticoagulant_name = this.anticoagulantsConfit[
  972. thisALID
  973. ].name
  974. this.AlPanel = this.anticoagulantsConfit[thisALID]
  975. }
  976. this.advices = response.data.data.advices
  977. var monitor = response.data.data.monitor
  978. // console.log('透析监测', monitor)
  979. this.monitor = monitor
  980. // console.log('monitor', monitor)
  981. this.monitors = response.data.data.monitors
  982. // console.log('透析监测', this.monitors)
  983. var summary = response.data.data.summary
  984. // console.log('透析小结', summary)
  985. this.mission = summary.mission
  986. this.dialysis_summary = summary.dialysis_summary
  987. this.org_template_info = response.data.data.org_template_info
  988. if (this.monitors.length < 7) {
  989. var nl = 8 - this.monitors.length
  990. for (let index = 0; index < nl; index++) {
  991. this.monitors.push([])
  992. }
  993. }
  994. this.jilurow = this.monitors.length + 1
  995. this.advice_jilurow = this.advices.length + 1
  996. var childMap = {}
  997. for (const index in this.advices) {
  998. if (this.advices[index].parent_id == 0) {
  999. continue
  1000. }
  1001. if (!(this.advices[index].parent_id in childMap)) {
  1002. childMap[this.advices[index].parent_id] = []
  1003. }
  1004. childMap[this.advices[index].parent_id].push(this.advices[index])
  1005. }
  1006. var advices = []
  1007. for (const index in this.advices) {
  1008. if (this.advices[index].parent_id > 0) {
  1009. continue
  1010. }
  1011. var item = this.advices[index]
  1012. if (item.id in childMap) {
  1013. item.children = childMap[item.id]
  1014. } else {
  1015. item.children = []
  1016. }
  1017. advices.push(item)
  1018. }
  1019. var leftAdvice = []
  1020. var rightAdvice = []
  1021. var adlen = advices.length
  1022. var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
  1023. for (var i = 0; i < halfLen; i++) {
  1024. leftAdvice.push(advices[i])
  1025. rightAdvice.push(advices[i + halfLen])
  1026. }
  1027. if (halfLen < 5) {
  1028. var nl = 5 - leftAdvice.length
  1029. for (let index = 0; index < nl; index++) {
  1030. leftAdvice.push([])
  1031. }
  1032. var nl = 5 - rightAdvice.length
  1033. for (let index = 0; index < nl; index++) {
  1034. rightAdvice.push([])
  1035. }
  1036. }
  1037. this.advices = []
  1038. for (var i = 0; i < halfLen; i++) {
  1039. var item = []
  1040. item.push(leftAdvice[i])
  1041. item.push(rightAdvice[i])
  1042. this.advices.push(item)
  1043. }
  1044. this.loading = false
  1045. this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
  1046. for (let index = 0; index < this.doctor_advices.length; index++) {
  1047. this.doctor_advices[index]['isShow'] = 2
  1048. }
  1049. if (this.doctor_advices.length > 0) {
  1050. var group = this.newAdviceGroupObject()
  1051. var initGroupBlock = function(group, advice) {
  1052. group.group_no = advice.groupno
  1053. }
  1054. for (
  1055. let index = this.doctor_advices.length - 1;
  1056. index >= 0;
  1057. index--
  1058. ) {
  1059. var new_advice_index = 0
  1060. if (
  1061. 'children' in this.doctor_advices[index] &&
  1062. this.doctor_advices[index].children.length > 0
  1063. ) {
  1064. new_advice_index =
  1065. index + this.doctor_advices[index].children.length + 1
  1066. var doctor_advice = {
  1067. delivery_way: this.doctor_advices[index].delivery_way,
  1068. execution_frequency: this.doctor_advices[index]
  1069. .execution_frequency,
  1070. groupno: this.doctor_advices[index].groupno,
  1071. id: this.doctor_advices[index].id,
  1072. parent_id: this.doctor_advices[index].parent_id,
  1073. children: this.doctor_advices[index].children,
  1074. remark: this.doctor_advices[index].remark
  1075. }
  1076. doctor_advice['isShow'] = 1
  1077. this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
  1078. // this.doctor_advices.push(doctor_advice)
  1079. }
  1080. }
  1081. for (let index = 0; index < this.doctor_advices.length; index++) {
  1082. const advice = this.doctor_advices[index]
  1083. if (advice.groupno == 0) {
  1084. // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  1085. if (advice.parent_id > 0) {
  1086. if (this.advice_groups.length > 0) {
  1087. var parent_group = this.advice_groups[
  1088. this.advice_groups.length - 1
  1089. ]
  1090. if (parent_group.advices.length > 0) {
  1091. if (parent_group.advices[0].id == advice.parent_id) {
  1092. parent_group.advices.push(advice)
  1093. }
  1094. }
  1095. }
  1096. continue
  1097. } else {
  1098. if (group.group_no > 0) {
  1099. this.advice_groups.push(group)
  1100. group = this.newAdviceGroupObject()
  1101. }
  1102. initGroupBlock(group, advice)
  1103. group.advices.push(advice)
  1104. this.advice_groups.push(group)
  1105. group = this.newAdviceGroupObject()
  1106. continue
  1107. }
  1108. }
  1109. if (group.group_no > 0 && group.group_no != advice.groupno) {
  1110. this.advice_groups.push(group)
  1111. group = this.newAdviceGroupObject()
  1112. }
  1113. if (group.group_no == 0) {
  1114. initGroupBlock(group, advice)
  1115. }
  1116. if (group.group_no == advice.groupno) {
  1117. group.advices.push(advice)
  1118. }
  1119. }
  1120. if (group.group_no > 0) {
  1121. // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  1122. this.advice_groups.push(group)
  1123. }
  1124. }
  1125. console.log(this.advice_groups)
  1126. } else {
  1127. this.loading = false
  1128. this.$message.error('请求数据失败')
  1129. return false
  1130. }
  1131. })
  1132. },
  1133. bloodAccessParOperaName(id) {
  1134. if (id in this.bloodAccessParOpera) {
  1135. return this.bloodAccessParOpera[id].name
  1136. }
  1137. return ''
  1138. },
  1139. dialysateFormulationName(id) {
  1140. if (id in this.dialysateFormulationOptions) {
  1141. return this.dialysateFormulationOptions[id].name
  1142. }
  1143. return ''
  1144. },
  1145. getAge: function(val) {
  1146. if (
  1147. this.org_template_info.template_id == 2 ||
  1148. this.org_template_info.template_id == 0
  1149. ) {
  1150. if (val.age == 0) {
  1151. return jsGetAge(val.birth, '-')
  1152. } else {
  1153. return val.age
  1154. }
  1155. } else {
  1156. return jsGetAge(val.birth, '-')
  1157. }
  1158. },
  1159. newAdviceGroupObject: function() {
  1160. return Object.assign(
  1161. {},
  1162. {
  1163. group_no: 0,
  1164. // advice_doctor: 0,
  1165. // start_time: 0,
  1166. advices: []
  1167. // exec_staff: 0,
  1168. // exec_time: 0,
  1169. // checker: 0,
  1170. }
  1171. )
  1172. }
  1173. },
  1174. watch: {
  1175. 'patientInfo.gender': function() {
  1176. if (this.patientInfo.gender == 1) {
  1177. this.patientInfo_gender_1 = true
  1178. this.patientInfo_gender_2 = false
  1179. } else if (this.patientInfo.gender == 2) {
  1180. this.patientInfo_gender_2 = true
  1181. this.patientInfo_gender_1 = false
  1182. } else {
  1183. this.patientInfo_gender_2 = false
  1184. this.patientInfo_gender_1 = false
  1185. }
  1186. },
  1187. 'patientInfo.source': function() {
  1188. if (this.patientInfo.source == 1) {
  1189. this.patientInfo_source_1 = true
  1190. this.patientInfo_source_2 = false
  1191. } else if (this.patientInfo.source == 2) {
  1192. this.patientInfo_source_2 = true
  1193. this.patientInfo_source_1 = false
  1194. } else {
  1195. this.patientInfo_source_2 = false
  1196. this.patientInfo_source_1 = false
  1197. }
  1198. }
  1199. },
  1200. created() {
  1201. var xtuser = this.$store.getters.xt_user
  1202. this.orgname = xtuser.org.org_name
  1203. // this.orgname = "遂溪方济医院";
  1204. this.modeOptions = this.$store.getters.treatment_mode
  1205. this.replacementWays = this.$store.getters.replacement_ways
  1206. this.perfusionApparatus = this.$store.getters.perfusion_apparatus
  1207. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  1208. // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
  1209. var bloodAccessParOpera = getDataConfig(
  1210. 'hemodialysis',
  1211. 'vascular_access_desc'
  1212. )
  1213. for (var key in bloodAccessParOpera) {
  1214. this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
  1215. bloodAccessParOpera[key]
  1216. }
  1217. var dialysateFormulationOptions = getDataConfig(
  1218. 'hemodialysis',
  1219. 'dialysate_formulation'
  1220. )
  1221. for (var key in dialysateFormulationOptions) {
  1222. this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
  1223. dialysateFormulationOptions[key]
  1224. }
  1225. const xtdate = this.$route.query && this.$route.query.xtdate
  1226. const xtno = this.$route.query && this.$route.query.xtno
  1227. if (
  1228. typeof xtdate === 'string' &&
  1229. xtdate.length > 0 &&
  1230. typeof xtno === 'string' &&
  1231. xtno.length > 0
  1232. ) {
  1233. this.queryParams.xtdate = xtdate
  1234. this.queryParams.xtno = xtno
  1235. this.getDialysisRecord()
  1236. } else {
  1237. this.$message.error('参数不齐')
  1238. return false
  1239. }
  1240. this.ways = getDataConfig('hemodialysis', 'way')
  1241. this.consciousnesses = getDataConfig('hemodialysis', 'consciousness')
  1242. this.appetites = getDataConfig('hemodialysis', 'appetite')
  1243. this.postures = getDataConfig('hemodialysis', 'posture')
  1244. this.sick_condition = getDataConfig('hemodialysis', 'sick_condition')
  1245. this.precautions = getDataConfig('hemodialysis', 'precaution')
  1246. this.intake = getDataConfig('hemodialysis', 'intake')
  1247. this.nutrition = getDataConfig('hemodialysis', 'nutrition')
  1248. // console.log('nutrition', this.nutrition)
  1249. }
  1250. }
  1251. </script>
  1252. <style>
  1253. .dialysis-print-order {
  1254. width: 960px;
  1255. margin: 0 auto;
  1256. }
  1257. .dialysis-print-order .order-yy-name {
  1258. margin: auto;
  1259. text-align: center;
  1260. font-size: 20px;
  1261. letter-spacing: 5px;
  1262. }
  1263. .dialysis-print-order .order-title {
  1264. margin: auto;
  1265. font-weight: 600;
  1266. text-align: center;
  1267. font-size: 22px;
  1268. padding: 10px 20px 20px 20px;
  1269. }
  1270. .dialysis-print-order .table-box {
  1271. width: 100%;
  1272. line-height: 23px;
  1273. font-size: 14px;
  1274. }
  1275. .dialysis-print-order .print-table {
  1276. width: 100%;
  1277. text-align: center;
  1278. border-collapse: collapse;
  1279. line-height: 40px;
  1280. font-size: 14px;
  1281. }
  1282. .dialysis-print-order .print-table-no {
  1283. width: 100%;
  1284. text-align: center;
  1285. border-collapse: collapse;
  1286. font-size: 14px;
  1287. }
  1288. .dialysis-print-order .under-line {
  1289. border-bottom: 1px solid #999;
  1290. width: 95%;
  1291. text-align: center;
  1292. margin-left: 2px;
  1293. }
  1294. .dialysis-print-order .title-box {
  1295. text-align: center;
  1296. font-size: 16px;
  1297. }
  1298. .dialysis-print-order .radio-lebel-box {
  1299. font-weight: 400;
  1300. cursor: pointer;
  1301. }
  1302. .dialysis-print-order .radio-no {
  1303. opacity: 0;
  1304. outline: none;
  1305. position: absolute;
  1306. margin: 0;
  1307. width: 0;
  1308. height: 0;
  1309. z-index: -1;
  1310. }
  1311. .dialysis-print-order .radio-inner {
  1312. white-space: nowrap;
  1313. cursor: pointer;
  1314. outline: none;
  1315. display: inline-block;
  1316. line-height: 1;
  1317. position: relative;
  1318. vertical-align: middle;
  1319. }
  1320. .dialysis-print-order .radio-fang {
  1321. display: inline-block;
  1322. position: relative;
  1323. border: 1px solid #000;
  1324. box-sizing: border-box;
  1325. width: 14px;
  1326. height: 14px;
  1327. background-color: #fff;
  1328. z-index: 1;
  1329. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  1330. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  1331. }
  1332. .dialysis-print-order .is-checked-radio::after {
  1333. content: "√";
  1334. font-size: 15px;
  1335. }
  1336. .dialysis-print-order .print-table-no tr td {
  1337. padding: 8px 5px;
  1338. line-height: 25px;
  1339. }
  1340. .dialysis-print-order .print-table tr td {
  1341. padding: 1px 1px;
  1342. /*line-height: 25px;*/
  1343. }
  1344. .es-img {
  1345. height: 25px;
  1346. }
  1347. .advice-name {
  1348. text-align: left;
  1349. }
  1350. .advice-children {
  1351. display: flex;
  1352. }
  1353. .title-box-pro {
  1354. border: 0 #fff;
  1355. line-height: 25px;
  1356. height: 25px;
  1357. text-align: left;
  1358. padding-left: 10px !important;
  1359. }
  1360. .title-box-pro-tr {
  1361. border: 0 #fff;
  1362. }
  1363. .text-align-left {
  1364. text-align: left !important;
  1365. padding-left: 10px !important;
  1366. font-size: 14px !important;
  1367. line-height: 25px;
  1368. }
  1369. .print-table-tr-new td {
  1370. line-height: 20px !important;
  1371. }
  1372. .border-top-solid {
  1373. border: solid 1px #000;
  1374. }
  1375. .print-template-two tr {
  1376. line-height: 30px;
  1377. }
  1378. </style>