PatientBox.vue 35KB

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