DialysisPrintOrderSop.vue 57KB

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