DialysisPrintOrderSeventynine.vue 61KB

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