PatientBox.vue 37KB

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