DialysisPrintOrderSeventynine.vue 59KB

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