DialysisPrintOrdereightyfour.vue 62KB

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