PatientBox.vue 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979
  1. <template>
  2. <div>
  3. <!-- <router-link to="/dialysis/details"> -->
  4. <div
  5. class="patient"
  6. v-for="schedule in schedules"
  7. v-if="schedule.patient"
  8. :class="borderColor(schedule)"
  9. @click.stop="detailAction(schedule)"
  10. :key="schedule.id"
  11. >
  12. <div class="kehu">
  13. <div class="tx">
  14. <img
  15. :src="
  16. schedule.patient.avatar.length > 0
  17. ? schedule.patient.avatar
  18. : '../../assets/home/analyze.png'
  19. "
  20. alt=""
  21. />
  22. <div>
  23. <div class="right">
  24. <h3 class="name">
  25. {{ schedule.patient.name
  26. }}<span class="yc" v-show="isAbnormal(schedule)">异常</span>
  27. </h3>
  28. <span class="num"
  29. >{{ genderText(schedule) }} | {{ getAge(schedule) }} 岁</span
  30. >
  31. <div
  32. style="
  33. margin-left: 10px;
  34. font-size: 12px;
  35. color: #34495e;
  36. margin-right: 5px;
  37. "
  38. v-if="
  39. schedule.assessment_before_dislysis && patientStateVal == 1
  40. "
  41. >
  42. 签到时间:{{
  43. getTime(schedule.assessment_before_dislysis.created_time)
  44. }}
  45. </div>
  46. </div>
  47. <div
  48. style="
  49. margin-top: 5px;
  50. text-align: left;
  51. height: 24px;
  52. min-width: 205px;
  53. "
  54. >
  55. <span
  56. class="tip1"
  57. v-if="
  58. schedule.prescription == null ||
  59. schedule.prescription.creater == 0
  60. "
  61. @click.stop="open(schedule)"
  62. >
  63. 开处方
  64. </span>
  65. <span
  66. class="tip2"
  67. v-if="
  68. schedule.treatment_summary == null ||
  69. schedule.treatment_summary.dialysis_summary == ''
  70. "
  71. @click.stop="open1(schedule)"
  72. >
  73. 开小结
  74. </span>
  75. <span class="online" v-show="computeState(schedule) != 4">
  76. <span :class="stateColor(schedule)">{{
  77. stateText(schedule)
  78. }}</span>
  79. </span>
  80. </div>
  81. </div>
  82. <!-- v-if="schedule.patient.troble_shoot == 1" -->
  83. <div class="difficult" v-if="schedule.patient.troble_shoot == 1">
  84. 疑难内瘘
  85. </div>
  86. <!-- <div style="height:24px;margin-right: 10px;">
  87. <div class="online" v-show="computeState(schedule) != 4">
  88. <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
  89. </div>
  90. </div> -->
  91. <!-- <div style="margin-top:13px;font-size:12px;color:#34495e;margin-right: 5px;" v-if="schedule.assessment_before_dislysis && patientStateVal == 1">签到时间:{{ getTime(schedule.assessment_before_dislysis.created_time) }}</div> -->
  92. </div>
  93. </div>
  94. <div class="dislysisInfo">
  95. <p>
  96. <span v-if="$store.getters.xt_user.org.id!=9671 && $store.getters.xt_user.org.id!=9675 && $store.getters.xt_user.org.id!=10340 ">
  97. 体重(前/后kg):
  98. {{schedule.assessment_before_dislysis? schedule.assessment_before_dislysis.weight_before: ""}}
  99. <span v-if="schedule.assessment_after_dislysis &&schedule.assessment_after_dislysis.weight_after > 0">/{{schedule.assessment_after_dislysis? schedule.assessment_after_dislysis.weight_after: ""}}</span>
  100. </span>
  101. <!-- <span v-if="$store.getters.xt_user.org.id==9671 || $store.getters.xt_user.org.id==9675 || $store.getters.xt_user.org.id==10340">
  102. 核酸检测日期:<span v-if="schedule.dialysis_order!=null">{{getTimeOne(schedule.dialysis_order.nuclein_date)}}</span>
  103. </span> -->
  104. </p>
  105. <p>
  106. <span v-if="$store.getters.xt_user.org.id==9671 || $store.getters.xt_user.org.id==9675 || $store.getters.xt_user.org.id==10340">
  107. 透析时长:
  108. <span v-if="schedule.prescription!=null && schedule.prescription.dialysis_duration_hour >0">{{schedule.prescription.dialysis_duration_hour}}时</span>
  109. <span v-if="schedule.prescription!=null && schedule.prescription.dialysis_duration_minute>0">{{schedule.prescription.dialysis_duration_minute}}分</span>
  110. </span>
  111. </p>
  112. <p>
  113. <span>
  114. 目标超滤量:
  115. <span v-if=" schedule.prescription && schedule.prescription.target_ultrafiltration > 0">
  116. <span v-if="$store.getters.xt_user.org.id==10340"> {{schedule.prescription? schedule.prescription.target_ultrafiltration: ""}}ml</span>
  117. <span v-if="$store.getters.xt_user.org.id!=10340"> {{schedule.prescription? schedule.prescription.target_ultrafiltration: ""}}</span>
  118. </span>
  119. </span>
  120. </p>
  121. <p>
  122. <span v-if="$store.getters.xt_user.org.id==9671 || $store.getters.xt_user.org.id==9675 || $store.getters.xt_user.org.id==10340">
  123. 抗凝剂:
  124. <span v-if="schedule.prescription!=null">
  125. <span v-if="schedule.prescription.anticoagulant == 1">无肝素</span>
  126. <span v-if="schedule.prescription.anticoagulant == 2">普通肝素</span>
  127. <span v-if="schedule.prescription.anticoagulant == 3">低分子肝素</span>
  128. <span v-if="schedule.prescription.anticoagulant == 4">阿加曲班</span>
  129. <span v-if="schedule.prescription.anticoagulant == 5">枸橼酸钠</span>
  130. <span v-if="schedule.prescription.anticoagulant == 6">低分子肝素钙</span>
  131. <span v-if="schedule.prescription.anticoagulant == 7">低分子肝素钠</span>
  132. <span v-if="schedule.prescription.anticoagulant == 8">依诺肝素</span>
  133. <span v-if="schedule.prescription.anticoagulant == 9">达肝素</span>
  134. <span v-if="schedule.prescription.anticoagulant == 10">体外抗凝</span>
  135. <span v-if="schedule.prescription.anticoagulant == 11">那屈肝素</span>
  136. <span v-if="schedule.prescription.anticoagulant == 12">无抗凝剂</span>
  137. <span v-if="schedule.prescription.anticoagulant == 13">那屈肝素钙</span>
  138. </span>
  139. </span>
  140. </p>
  141. <p v-if="$store.getters.xt_user.org.id==9671 || $store.getters.xt_user.org.id==9675 || $store.getters.xt_user.org.id==10340">
  142. 总量:
  143. <span v-if="schedule.prescription!=null">
  144. <span v-if="schedule.prescription.anticoagulant == 1">{{schedule.prescription.anticoagulant_zongliang}}mg</span>
  145. <span v-if="schedule.prescription.anticoagulant == 2">{{schedule.prescription.anticoagulant_zongliang}}mg</span>
  146. <span v-if="schedule.prescription.anticoagulant == 3">{{schedule.prescription.anticoagulant_zongliang}}iu</span>
  147. <span v-if="schedule.prescription.anticoagulant == 4">{{schedule.prescription.anticoagulant_zongliang}}mg</span>
  148. <span v-if="schedule.prescription.anticoagulant == 5">{{schedule.prescription.anticoagulant_zongliang}}mg</span>
  149. <span v-if="schedule.prescription.anticoagulant == 6">{{schedule.prescription.anticoagulant_zongliang}}iu</span>
  150. <span v-if="schedule.prescription.anticoagulant == 7">{{schedule.prescription.anticoagulant_zongliang}}iu</span>
  151. <span v-if="schedule.prescription.anticoagulant == 8">{{schedule.prescription.anticoagulant_zongliang}}iu</span>
  152. <span v-if="schedule.prescription.anticoagulant == 9">{{schedule.prescription.anticoagulant_zongliang}}iu</span>
  153. <span v-if="schedule.prescription.anticoagulant == 10">{{schedule.prescription.anticoagulant_zongliang}}iu</span>
  154. <span v-if="schedule.prescription.anticoagulant == 11">{{schedule.prescription.anticoagulant_zongliang}}mg</span>
  155. <span v-if="schedule.prescription.anticoagulant == 12">{{schedule.prescription.anticoagulant_zongliang}}iu</span>
  156. <span v-if="schedule.prescription.anticoagulant == 13">{{schedule.prescription.anticoagulant_zongliang}}mg</span>
  157. </span>
  158. </p>
  159. <p v-if="$store.getters.xt_user.org.id!=9675 && $store.getters.xt_user.org.id!=10340">
  160. 透析器/灌流器:{{schedule.prescription? schedule.prescription.dialyzer_perfusion_apparatus: ""}}
  161. <span v-if="schedule.prescription != null">{{schedule.prescription? schedule.prescription.dialysis_dialyszers: ""}}</span>
  162. <span v-if="schedule.prescription != null &&schedule.prescription.dialysis_irrigation != ''">/</span>
  163. <span v-if="schedule.prescription != null">{{schedule.prescription? schedule.prescription.dialysis_irrigation: ""}}</span>
  164. </p>
  165. <p v-if="$store.getters.xt_user.org.id==9675 || $store.getters.xt_user.org.id==10340">
  166. 透析器/灌流器:
  167. <span v-if="schedule.dialysis_order!=null">{{schedule.dialysis_order.dialysis_dialyszers}}</span>
  168. <span v-if="schedule.dialysis_order!=null">{{schedule.dialysis_order.dialysis_irrigation}}</span>
  169. </p>
  170. <p v-if="$store.getters.xt_user.org.id==9671 || $store.getters.xt_user.org.id==10445">
  171. 滤过器:
  172. <span v-if="schedule.prescription != null">{{schedule.prescription? schedule.prescription.dialysis_strainer: ""}}</span>
  173. </p>
  174. <p v-if="$store.getters.xt_user.org.id==9671 || $store.getters.xt_user.org.id==9675 || $store.getters.xt_user.org.id==10340">
  175. 排班备注:{{schedule.dialysis_order&& schedule.dialysis_order.schedule_remark?schedule.dialysis_order.schedule_remark:schedule.patient.schedule_remark}}
  176. </p>
  177. </div>
  178. <div
  179. class="function"
  180. :class="functionColor(schedule)"
  181. :id="modeColor(schedule.mode_id)"
  182. >
  183. <ul>
  184. <li>
  185. <span class="iconfont" :id="modeColor(schedule.mode_id)"
  186. >&#xe6f5;</span
  187. >班次 :
  188. {{ timeTypeText(schedule) }}
  189. </li>
  190. <li>
  191. <span class="iconfont" :id="modeColor(schedule.mode_id)"
  192. >&#xe6de;</span
  193. >床位号 :
  194. {{ schedule.device_number.number }}
  195. </li>
  196. <li>
  197. <span class="iconfont" :id="modeColor(schedule.mode_id)"
  198. >&#xe6f6;</span
  199. >透析模式 :
  200. {{
  201. schedule.mode_id &&
  202. $store.getters.treatment_mode[schedule.mode_id]
  203. ? $store.getters.treatment_mode[schedule.mode_id].name
  204. : ""
  205. }}
  206. </li>
  207. </ul>
  208. </div>
  209. </div>
  210. <!-- </router-link> -->
  211. <dialysis-prescription-dialog
  212. title="透析处方"
  213. ref="prescription"
  214. :patient="patient"
  215. :prescription="prescription"
  216. :solution="solution"
  217. @advice="adviceFunc"
  218. :niprocart_info="niprocart_info"
  219. :jms_info="jms_info"
  220. :fistula_needle_set_info="fistula_needle_set_info"
  221. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  222. :hemoperfusion_info="hemoperfusion_info"
  223. :dialyser_sterilised_info="dialyser_sterilised_info"
  224. :filtryzer_info="filtryzer_info"
  225. :dialyzers_info="dialyzers_info"
  226. :injector_info="injector_info"
  227. :bloodlines_info="bloodlines_info"
  228. :tubingHemodialysis_info="tubingHemodialysis_info"
  229. :safe_package_info="safe_package_info"
  230. :aliquid_info="aliquid_info"
  231. :config="config"
  232. :admin_users="admin_users"
  233. :targetAdvices="longAdvices"
  234. :waitUploadAdvices="waitUploadAdvices"
  235. :is_open="is_open"
  236. :predialysis="predialysis_evaluation"
  237. :last_predialysis="lastPredialysisEvaluation"
  238. :record="assessment_after_dislysis"
  239. :last_record="lastAssessmentAfterDislysis"
  240. :last_prescription="lastDialysisPrescribe"
  241. :dry_weight="lastDryWeightDislysis"
  242. :schedual="temp_schedual"
  243. :date="date"
  244. :stockType="stockType"
  245. ></dialysis-prescription-dialog>
  246. <treatment-summary-dialog
  247. title="治疗小结"
  248. ref="treatmentSummary"
  249. :patient="patient"
  250. :treatment_summary="treatment_summary"
  251. ></treatment-summary-dialog>
  252. </div>
  253. </template>
  254. <script>
  255. import { uParseTime } from '@/utils/tools'
  256. import { parseTime } from "@/utils";
  257. import { jsGetAge } from "@/utils/tools";
  258. import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPrescriptionDialog";
  259. import treatmentSummaryDialog from "../dialysis/details/dialog/treatmentSummaryDialog";
  260. import {
  261. getDialysisScheduleDetail,
  262. getLongAdviceOne,
  263. } from "@/api/dialysis_record";
  264. export default {
  265. name: "PatientBox",
  266. components: {
  267. dialysisPrescriptionDialog,
  268. treatmentSummaryDialog,
  269. },
  270. data() {
  271. return {
  272. patients: [
  273. {
  274. state: 2,
  275. yc: false,
  276. name: "张三",
  277. sex: "女",
  278. age: 90,
  279. },
  280. {
  281. state: 3,
  282. yc: true,
  283. name: "张三",
  284. sex: "女",
  285. age: 90,
  286. },
  287. {
  288. state: 4,
  289. yc: true,
  290. name: "张三",
  291. sex: "女",
  292. age: 90,
  293. },
  294. {
  295. state: 1,
  296. yc: true,
  297. name: "张三",
  298. sex: "女",
  299. age: 90,
  300. },
  301. ],
  302. //
  303. longAdvices: [],
  304. waitUploadAdvices: [],
  305. is_open: 0,
  306. targetAdvices: [],
  307. patient: { id: 0 }, // 患者信息
  308. schedual: { id: 0 }, // 患者排班信息
  309. prescription: { id: 0 }, // 透析处方
  310. solution: { id: 0 }, // 透析方案
  311. system_prescribe: { id: 0 },
  312. receiver_treatment_access: { id: 0 }, // 接诊评估
  313. predialysis_evaluation: { id: 0 }, // 透前评估
  314. doctor_advices: [], // 临时医嘱
  315. double_check: { id: 0 }, // 双人核对
  316. assessment_after_dislysis: { id: 0 }, // 透后评估
  317. treatment_summary: { id: 0 }, // 治疗小结
  318. monitor_records: [], // 透析监测
  319. dialysis_order: { id: 0 }, // 透析记录
  320. admin_users: [], // 系统用户列表
  321. devices: [], // 设备
  322. device_numbers: [], // 床位号
  323. admin_user_map: {}, // {user_id: admin_user object}
  324. device_map: {}, // {device_id: device}
  325. device_number_map: {}, // {device_number_id: device_number}
  326. niprocart_info: [],
  327. jms_info: [],
  328. fistula_needle_set_info: [],
  329. fistula_needle_set_16_info: [],
  330. hemoperfusion_info: [],
  331. dialyser_sterilised_info: [],
  332. filtryzer_info: [],
  333. dialyzers_info: [],
  334. injector_info: [],
  335. bloodlines_info: [],
  336. tubingHemodialysis_info: [],
  337. safe_package_info: [],
  338. aliquid_info: [],
  339. config: {},
  340. lastPredialysisEvaluation: { id: 0 },
  341. lastMonitorRecord: { id: 0 },
  342. lastAssessmentAfterDislysis: { id: 0 },
  343. lastDryWeightDislysis: { id: 0 },
  344. headNurses: [],
  345. lastDialysisPrescribe: { id: 0 },
  346. temp_schedual: null,
  347. date: "",
  348. modedata: 0,
  349. stockType: [],
  350. };
  351. },
  352. props: {
  353. schedules: {
  354. type: Array,
  355. },
  356. patientStateVal: Number,
  357. selected_date:String,
  358. },
  359. methods: {
  360. getTimeOne(val) {
  361. if(val == ""){
  362. return ""
  363. }else {
  364. return uParseTime(val, '{y}-{m}-{d}')
  365. }
  366. },
  367. stateColor: function (schedual) {
  368. var state = this.computeState(schedual);
  369. if (state == 1) {
  370. return "blue";
  371. } else if (state == 2) {
  372. return "gray";
  373. } else if (state == 3) {
  374. return "red";
  375. } else {
  376. return "blue";
  377. }
  378. },
  379. functionColor: function (schedual) {
  380. var state = this.computeState(schedual);
  381. if (state == 1 || state == 3) {
  382. return "blue";
  383. } else if (state == 2) {
  384. return "gray";
  385. } else {
  386. return "blue";
  387. }
  388. },
  389. borderColor: function (schedual) {
  390. var yc = this.isAbnormal(schedual);
  391. if (yc == true) {
  392. return "red";
  393. } else {
  394. return "gray";
  395. }
  396. },
  397. stateText: function (schedual) {
  398. var state = this.computeState(schedual);
  399. if (state == 1) {
  400. return "已上机";
  401. } else if (state == 2) {
  402. return "已下机";
  403. } else if (state == 3) {
  404. return "监测中";
  405. } else {
  406. // return schedual.patient.gender == 1 ? "男" : "女"
  407. return "未上机";
  408. }
  409. },
  410. computeState: function (schedual) {
  411. if (schedual.dialysis_order == null) {
  412. // 未上机
  413. return 4;
  414. } else if (schedual.dialysis_order.stage == 2) {
  415. // 已下机
  416. return 2;
  417. } else if (
  418. schedual.dialysis_order.stage == 1 &&
  419. schedual.monitoring_records != null &&
  420. schedual.monitoring_records.length > 1
  421. ) {
  422. // 监测中
  423. return 3;
  424. } else {
  425. return 1;
  426. }
  427. },
  428. orderState: function (schedual) {
  429. if (schedual.dialysis_order == null) {
  430. // 未上机
  431. return 4;
  432. } else if (schedual.dialysis_order.stage == 2) {
  433. // 已下机
  434. return 2;
  435. } else if (
  436. schedual.dialysis_order.stage == 1 &&
  437. schedual.monitoring_records != null &&
  438. schedual.monitoring_records.length > 1
  439. ) {
  440. // 监测中
  441. return 3;
  442. } else {
  443. return 1;
  444. }
  445. },
  446. isAbnormal: function (schedual) {
  447. return false; // schedual.yc;
  448. },
  449. timeTypeText: function (schedual) {
  450. if (schedual.schedule_type == 1) {
  451. return "上午";
  452. } else if (schedual.schedule_type == 2) {
  453. return "下午";
  454. } else {
  455. return "晚上";
  456. }
  457. },
  458. genderText: function (schedual) {
  459. if (schedual.patient.gender == 0) {
  460. return "未知";
  461. } else if (schedual.patient.gender == 1) {
  462. return "男";
  463. } else {
  464. return "女";
  465. }
  466. },
  467. age: function (schedual) {
  468. if (schedual.patient.birthday == 0) {
  469. return "";
  470. } else {
  471. return jsGetAge(
  472. parseTime(schedual.patient.birthday, "{y}-{m}-{d}"),
  473. "-"
  474. );
  475. }
  476. // var now = new Date()
  477. // var nowYear = parseTime(now, "{y}")
  478. // var birthdayYear = parseTime(schedual.patient.birthday, "{y}")
  479. // // console.log(nowYear)
  480. // // console.log(birthdayYear)
  481. // return nowYear - birthdayYear
  482. },
  483. getAge: function (val) {
  484. var thisLen = val.patient.id_card_no.length;
  485. var birth = "";
  486. if (thisLen == 15) {
  487. birth = "19" + val.patient.id_card_no.substr(6, 6);
  488. } else {
  489. birth = val.patient.id_card_no.substr(6, 8);
  490. }
  491. var birthtwo =
  492. birth.substr(0, 4) +
  493. "-" +
  494. birth.substr(4, 2) +
  495. "-" +
  496. birth.substr(6, 2);
  497. var age = jsGetAge(birthtwo, "-");
  498. return age;
  499. },
  500. detailAction: function (schedual) {
  501. var patient_id = schedual.patient_id;
  502. var date = schedual.schedule_date;
  503. this.$router.push({
  504. path: "/dialysis/details",
  505. query: {
  506. patient_id: patient_id,
  507. date: date,
  508. patient_name: schedual.patient.name,
  509. mode_id: schedual.mode_id,
  510. },
  511. });
  512. },
  513. //
  514. getScheduleDetail: function () {
  515. var dateStr = parseTime(this.date, "{y}-{m}-{d}");
  516. this.doctor_advices = [];
  517. getDialysisScheduleDetail(this.patient_id, dateStr).then((rs) => {
  518. var resp = rs.data;
  519. if (resp.state == 1) {
  520. var patient = resp.data.patient; // 患者信息
  521. var schedual = resp.data.schedual; // 患者排班信息
  522. var prescription = resp.data.prescription; // 透析处方
  523. if (prescription != null) {
  524. if (prescription.body_fluid == -2) {
  525. prescription.body_fluid = 0;
  526. }
  527. }
  528. console.log("透析处方323332323223323223", prescription);
  529. var solution = resp.data.solution; // 透析方案
  530. var receiver_treatment_access = resp.data.receiver_treatment_access; // 接诊评估
  531. console.log("receiver_treatment_access", receiver_treatment_access);
  532. var predialysis_evaluation = resp.data.predialysis_evaluation; // 透前评估
  533. console.log("透前评估", predialysis_evaluation);
  534. if (predialysis_evaluation != null) {
  535. if (predialysis_evaluation.blood_access_part_id == -2) {
  536. predialysis_evaluation.blood_access_part_id = 0;
  537. }
  538. }
  539. var doctor_advices = resp.data.doctor_advices; // 临时医嘱
  540. var double_check = resp.data.double_check; // 双人核对
  541. var assessment_after_dislysis = resp.data.assessment_after_dislysis; // 透后评估
  542. var treatment_summary = resp.data.treatment_summary; // 治疗小结
  543. var monitor_records = resp.data.monitor_records; // 透析监测
  544. var dialysis_order = resp.data.dialysis_order; // 透析记录
  545. var niprocart_info = resp.data.niprocart_info;
  546. var jms_info = resp.data.jms_info;
  547. var fistula_needle_set_info = resp.data.fistula_needle_set_info;
  548. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info;
  549. var hemoperfusion_info = resp.data.hemoperfusion_info;
  550. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info;
  551. var filtryzer_info = resp.data.filtryzer_info;
  552. var dialyzers_info = resp.data.dialyzers_info;
  553. var injector_info = resp.data.injector_info;
  554. var bloodlines_info = resp.data.bloodlines_info;
  555. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info;
  556. var safe_package_info = resp.data.safe_package_info;
  557. var aliquid_info = resp.data.aliquid_info;
  558. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation;
  559. console.log("上次透前评估", lastPredialysisEvaluation);
  560. if (lastPredialysisEvaluation != null) {
  561. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  562. lastPredialysisEvaluation.blood_access_part_id = 0;
  563. }
  564. }
  565. var lastMonitorRecord = resp.data.lastMonitorRecord;
  566. var lastAssessmentAfterDislysis =
  567. resp.data.lastAssessmentAfterDislysis;
  568. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe;
  569. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis;
  570. var system_prescribe = resp.data.system_prescribe;
  571. var stockType = resp.data.stockType;
  572. this.stockType = stockType;
  573. console.log("元单快乐222222", this.stockType);
  574. this.$refs.prescription.setLastRecord(
  575. schedual,
  576. lastAssessmentAfterDislysis,
  577. lastPredialysisEvaluation,
  578. lastDialysisPrescribe,
  579. lastDryWeightDislysis,
  580. system_prescribe,
  581. resp.data.doctors
  582. );
  583. var headNurses = resp.data.headNurse;
  584. var config = resp.data.config;
  585. this.lastPredialysisEvaluation = lastPredialysisEvaluation;
  586. this.lastMonitorRecord = lastMonitorRecord;
  587. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis;
  588. this.lastDialysisPrescribe = lastDialysisPrescribe;
  589. this.lastDryWeightDislysis = lastDryWeightDislysis;
  590. this.headNurses = headNurses;
  591. this.system_prescribe = system_prescribe;
  592. this.niprocart_info = niprocart_info;
  593. this.jms_info = jms_info;
  594. this.fistula_needle_set_info = fistula_needle_set_info;
  595. this.fistula_needle_set_16_info = fistula_needle_set_16_info;
  596. this.hemoperfusion_info = hemoperfusion_info;
  597. this.dialyser_sterilised_info = dialyser_sterilised_info;
  598. this.filtryzer_info = filtryzer_info;
  599. this.dialyzers_info = dialyzers_info;
  600. this.injector_info = injector_info;
  601. this.bloodlines_info = bloodlines_info;
  602. this.tubingHemodialysis_info = tubingHemodialysis_info;
  603. this.safe_package_info = safe_package_info;
  604. this.aliquid_info = aliquid_info;
  605. this.config = config;
  606. this.patient = patient;
  607. this.schedual = schedual == null ? { id: 0 } : schedual;
  608. this.prescription = prescription == null ? { id: 0 } : prescription;
  609. console.log("this.prescription", this.prescription);
  610. this.solution = solution == null ? { id: 0 } : solution;
  611. console.log("this.solution", this.solution);
  612. this.receiver_treatment_access =
  613. receiver_treatment_access == null
  614. ? { id: 0 }
  615. : receiver_treatment_access;
  616. this.predialysis_evaluation =
  617. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation;
  618. this.doctor_advices = doctor_advices == null ? [] : doctor_advices;
  619. this.double_check = double_check == null ? { id: 0 } : double_check;
  620. this.assessment_after_dislysis =
  621. assessment_after_dislysis == null
  622. ? { id: 0 }
  623. : assessment_after_dislysis;
  624. this.treatment_summary =
  625. treatment_summary == null ? { id: 0 } : treatment_summary;
  626. this.monitor_records = monitor_records == null ? [] : monitor_records;
  627. this.dialysis_order =
  628. dialysis_order == null ? { id: 0 } : dialysis_order;
  629. // this.$refs.stat_order.setAdvices(this.doctor_advices)
  630. // this.$refs.monitoring.setRecords(this.monitor_records)
  631. this.admin_users = resp.data.doctors;
  632. this.$refs.prescription.showOne(this.prescription,this.admin_users)
  633. this.devices = resp.data.devices;
  634. this.device_numbers = resp.data.device_numbers;
  635. var device_map = {};
  636. for (let index = 0; index < this.devices.length; index++) {
  637. const device = this.devices[index];
  638. device_map[device.id] = device;
  639. }
  640. this.device_map = device_map;
  641. var admin_map = {};
  642. for (let index = 0; index < this.admin_users.length; index++) {
  643. const admin = this.admin_users[index];
  644. admin_map[admin.id] = admin;
  645. }
  646. this.admin_user_map = admin_map;
  647. var device_number_map = {};
  648. for (let index = 0; index < this.device_numbers.length; index++) {
  649. const device_number = this.device_numbers[index];
  650. device_number_map[device_number.id] = device_number;
  651. }
  652. this.device_number_map = device_number_map;
  653. this.getLongAdvice();
  654. } else {
  655. this.$message.error(resp.msg);
  656. }
  657. if (this.lastDialysisPrescribe != null) {
  658. delete this.lastDialysisPrescribe.target_ultrafiltration;
  659. }
  660. if (this.solution != null) {
  661. delete this.solution.target_ultrafiltration;
  662. }
  663. });
  664. },
  665. getLongAdvice() {
  666. let params = {
  667. patient_id: this.patient_id,
  668. schedule_date:parseTime(this.selected_date, '{y}-{m}-{d}'),
  669. };
  670. getLongAdviceOne(params).then((rs) => {
  671. var resp = rs.data;
  672. if (resp.state == 1) {
  673. var status = parseInt(resp.data.status);
  674. switch (status) {
  675. case 2:
  676. var totalAdvice = resp.data.advices;
  677. var longAdvicesTwo = resp.data.advices_two;
  678. var waitUploadAdvices = [];
  679. for (let i = 0; i < totalAdvice.length; i++) {
  680. totalAdvice[i]["isCheck"] = 1;
  681. }
  682. for (let i = 0; i < totalAdvice.length; i++) {
  683. for (let a = 0; a < longAdvicesTwo.length; a++) {
  684. if (
  685. totalAdvice[i].template_id ==
  686. longAdvicesTwo[a].template_id &&
  687. totalAdvice[i].frequency_type ==
  688. longAdvicesTwo[a].frequency_type
  689. ) {
  690. totalAdvice[i]["isCheck"] = 0;
  691. }
  692. }
  693. }
  694. for (let i = 0; i < totalAdvice.length; i++) {
  695. if (totalAdvice[i].isCheck == 1) {
  696. waitUploadAdvices.push(totalAdvice[i]);
  697. }
  698. }
  699. this.is_open = resp.data.is_open_remind;
  700. this.longAdvices = totalAdvice;
  701. console.log("长期医嘱22332323232232323",this.longAdvices)
  702. this.waitUploadAdvices = waitUploadAdvices;
  703. break;
  704. }
  705. } else {
  706. this.$message.error(resp.msg);
  707. }
  708. });
  709. },
  710. adviceFunc: function () {
  711. this.$emit("advice");
  712. },
  713. open(schedual) {
  714. this.date = schedual.schedule_date;
  715. this.patient_id = schedual.patient_id;
  716. this.modedata = 1;
  717. this.getScheduleDetail();
  718. // this.getLongAdvice()
  719. this.$refs.prescription.show(this.prescription, schedual,"","","",this.admin_users);
  720. },
  721. open1(schedual) {
  722. this.date = schedual.schedule_date;
  723. this.patient_id = schedual.patient_id;
  724. this.getScheduleDetail();
  725. this.getLongAdvice();
  726. this.$refs.treatmentSummary.show(this.treatment_summary, this.date);
  727. },
  728. getTime(date) {
  729. date = new Date(date * 1000);
  730. var Y = date.getFullYear() + "-";
  731. var M =
  732. date.getMonth() + 1 < 10
  733. ? "0" + (date.getMonth() + 1)
  734. : date.getMonth() + 1;
  735. var D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
  736. var h = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  737. var m =
  738. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  739. var s =
  740. date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
  741. let strDate = h + ":" + m;
  742. return strDate;
  743. },
  744. modeColor(id) {
  745. if (id == 1) {
  746. } else if (id == 2) {
  747. return "modeRed";
  748. } else if (id == 3) {
  749. return "modePurple";
  750. }
  751. },
  752. },
  753. };
  754. </script>
  755. <style style="stylesheet/scss" lang="scss" scoped>
  756. .patient {
  757. border: 1px #e5e5ee solid;
  758. padding: 9px 0;
  759. margin: 0 15px 15px 0;
  760. float: left;
  761. width: 360px;
  762. cursor: pointer;
  763. .function {
  764. padding: 15px 5px 0 5px;
  765. color: #7b8a97;
  766. ul {
  767. @include display-flex;
  768. @include align-items-center;
  769. @include text-align;
  770. @include justify-content-between;
  771. li {
  772. font-size: 13px;
  773. @include display-flex;
  774. @include align-items-center;
  775. .iconfont {
  776. margin: 0 5px 0 0;
  777. font-size: 18px;
  778. }
  779. }
  780. }
  781. }
  782. .blue {
  783. color: $main-color;
  784. .iconfont {
  785. color: $main-color;
  786. }
  787. }
  788. .kehu {
  789. @include display-flex;
  790. // @include align-items-center;
  791. @include text-align;
  792. @include justify-content-between;
  793. // border-bottom: 1px #e5e5e5 solid;
  794. padding: 0 0 10px 20px;
  795. .tx {
  796. @include display-flex;
  797. // @include align-items-center;
  798. width: 100%;
  799. img {
  800. width: 45px;
  801. height: 45px;
  802. border-radius: 50%;
  803. float: left;
  804. margin: 0 15px 0 0;
  805. }
  806. .right {
  807. // float: left;
  808. // text-align: left;
  809. display: flex;
  810. align-items: center;
  811. margin-top: 6px;
  812. .name {
  813. font-size: 15px;
  814. color: #34495e;
  815. font-weight: bold;
  816. height: 20px;
  817. line-height: 20px;
  818. margin-right: 10px;
  819. .yc {
  820. background: #ff7979;
  821. color: #fff;
  822. height: 19px;
  823. line-height: 19px;
  824. font-size: 12px;
  825. width: 37px;
  826. border-radius: 4px;
  827. display: inline-block;
  828. text-align: center;
  829. margin-left: 6px;
  830. }
  831. }
  832. .num {
  833. font-size: 13px;
  834. color: #7b8a97;
  835. }
  836. }
  837. .tip1 {
  838. background: #4fc7cb;
  839. border-radius: 5px;
  840. text-align: center;
  841. font-size: 12px;
  842. display: inline-block;
  843. width: 60px;
  844. color: #fff;
  845. width: 65px;
  846. height: 24px;
  847. line-height: 24px;
  848. }
  849. .tip2 {
  850. background: #7bce91;
  851. border-radius: 5px;
  852. text-align: center;
  853. font-size: 12px;
  854. display: inline-block;
  855. width: 60px;
  856. color: #fff;
  857. width: 65px;
  858. height: 24px;
  859. line-height: 24px;
  860. }
  861. }
  862. .online {
  863. text-align: center;
  864. width: 30%;
  865. // border-left: 1px #e5e5e5 solid;
  866. span {
  867. background: #c6cdd2;
  868. color: #fff;
  869. width: 65px;
  870. height: 24px;
  871. line-height: 24px;
  872. border-radius: 4px;
  873. margin: 0 auto;
  874. font-size: 12px;
  875. margin-top: 4px;
  876. display: inline-block;
  877. }
  878. .blue {
  879. background: $main-color;
  880. }
  881. .red {
  882. background: #f18f68;
  883. }
  884. .green {
  885. background: #5bd18b;
  886. }
  887. .gray {
  888. background: #a8b3ba;
  889. }
  890. .lightGray {
  891. background: #c6cdd2;
  892. }
  893. .time {
  894. font-size: 26px;
  895. color: #34495e;
  896. }
  897. }
  898. }
  899. .dislysisInfo {
  900. color: rgb(123, 138, 151);
  901. border-bottom: 1px solid rgb(229, 229, 229);
  902. padding-left: 80px;
  903. > p {
  904. margin-bottom: 5px;
  905. overflow: hidden;
  906. text-overflow: ellipsis;
  907. white-space: nowrap;
  908. }
  909. }
  910. }
  911. .red {
  912. border: 1px #ff7979 solid;
  913. }
  914. #modeRed {
  915. color: #ed5555;
  916. }
  917. #modePurple {
  918. color: #53b86e;
  919. }
  920. .difficult {
  921. width: 71px;
  922. height: 25px;
  923. font-size: 12px;
  924. border-radius: 0 0 0 30px;
  925. background: #78d660;
  926. text-align: center;
  927. line-height: 25px;
  928. position: relative;
  929. bottom: 10px;
  930. left: 3px;
  931. color: white;
  932. }
  933. </style>