YzQueryCondition.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. <template>
  2. <div>
  3. <div>
  4. <CyDateRange v-model="queryParam" clearable />
  5. <el-button
  6. @click="queryYz"
  7. v-title="
  8. '医嘱过多导致查看医嘱困难,可选择时间范围来减少医嘱的条数,默认查询今天到90天前的数据,可通过选择日期后面的删除按钮,取消时间范围的查询'
  9. "
  10. >
  11. 查询
  12. </el-button>
  13. <el-divider direction="vertical" />
  14. <label>
  15. 显示范围:
  16. <select v-model="queryParam.displayRange" v-title="'显示范围'">
  17. <option :value="0" title="全部的医嘱">全部</option>
  18. <option :value="1" title="已经停止的医嘱">停止</option>
  19. <option :value="2" title="正在执行的长期医嘱">当前</option>
  20. <option :value="3" title="今天开的医嘱">今天</option>
  21. </select>
  22. </label>
  23. <label>
  24. 状态:
  25. <select v-model.number="queryParam.zhuangTai" v-title="`医嘱的状态`">
  26. <option :value="0">全部</option>
  27. <option :value="1">录入</option>
  28. <option :value="2">确认</option>
  29. <option :value="3">执行</option>
  30. <option :value="5">停止</option>
  31. </select>
  32. </label>
  33. <label>
  34. 药房:
  35. <select
  36. v-model="queryParam.groupNo"
  37. v-title="'在新增医嘱的时候,去指定的药房查询药品。'"
  38. >
  39. <option v-for="item in useYfGroupStore().xy" :value="item.code">
  40. {{ item.name }}
  41. </option>
  42. </select>
  43. </label>
  44. <label>
  45. 排序:
  46. <select v-model="queryParam.sort" @change="setYzOrderGroup">
  47. <option :value="OrderBy.asc">正序</option>
  48. <option :value="OrderBy.desc">反序</option>
  49. </select>
  50. </label>
  51. <el-divider direction="vertical" />
  52. <el-button-group>
  53. <el-button
  54. type="primary"
  55. @click="addYiZhuClick"
  56. v-title="'添加医嘱,快捷键 ALT+A'"
  57. >
  58. 添加
  59. </el-button>
  60. <el-button
  61. type="success"
  62. :loading="confirmLoading"
  63. @click="currentConfirmOrdersClick"
  64. v-title="'把录入状态的医嘱,变为确认状态。'"
  65. v-if="!isCydy()"
  66. >
  67. 确认
  68. </el-button>
  69. <el-button
  70. type="success"
  71. @click="confirmTheDoctorSOrderWithMedicineClick"
  72. v-else
  73. v-title="'把录入状态的医嘱,变为确认状态。'"
  74. >
  75. 确认带药
  76. </el-button>
  77. </el-button-group>
  78. <el-divider direction="vertical" />
  79. <el-dropdown
  80. split-button
  81. type="danger"
  82. @click="deleteAnOrderByOrderNo"
  83. v-title="
  84. '在表格中选中了一条医嘱后这个方法才能有效果,(这个医嘱需要在工作台显示),也可以在点击表格后面的删按钮<br /><span style=\'color:#fffe00\'>限制:</span>只能删除自己开的,只能删除(录入、确认)状态的医嘱。'
  85. "
  86. >
  87. 删除
  88. <template #dropdown>
  89. <el-dropdown-menu>
  90. <div
  91. v-title="
  92. '在表格中,点击前面的选择框,选中医嘱(多条或单挑),才能点击此按钮,限制:只能删除自己开的,只能删除(录入、确认)状态的医嘱。'
  93. "
  94. >
  95. <el-dropdown-item @click="batchDeleteOrdersClick">
  96. 批量删除
  97. </el-dropdown-item>
  98. </div>
  99. </el-dropdown-menu>
  100. </template>
  101. </el-dropdown>
  102. <el-divider direction="vertical" />
  103. <el-dropdown
  104. split-button
  105. @click="yzMitt.emit('clickOnTheOrderTemplate')"
  106. v-title="'获取医嘱的模板'"
  107. >
  108. 模板
  109. <template #dropdown>
  110. <el-dropdown-menu>
  111. <div v-title="'维护自己创建的模板'">
  112. <el-dropdown-item @click="orderTemplateClick">
  113. 维护模板
  114. </el-dropdown-item>
  115. </div>
  116. <div v-title="'选中表格中的医嘱作为模板'">
  117. <el-dropdown-item @click="orderTemplateClickCopy">
  118. 选中医嘱做模板
  119. </el-dropdown-item>
  120. </div>
  121. </el-dropdown-menu>
  122. </template>
  123. </el-dropdown>
  124. </div>
  125. <div style="border-top: 1px solid #000; margin: 5px 0" />
  126. <div>
  127. <el-dropdown
  128. split-button
  129. @click="clickToStopTheOrder"
  130. v-title="
  131. '批量停止医嘱,需要结束时间一栏的日期数据框变成红色则代表,是要停止这条医嘱。<br />' +
  132. '双击日期输入框,默认填充停止到当前时间,并选中医嘱,可点击输入框中的日历,去选择其他时间。<br />' +
  133. '鼠标右键数据框,可以取消停止。'
  134. "
  135. >
  136. 批量停止
  137. <template #dropdown>
  138. <el-dropdown-menu>
  139. <div v-title="'跳转到这个患者,修改医嘱时间的申请页面。'">
  140. <el-dropdown-item @click="clickToModifyTheDoctorSOrderTime">
  141. 修改医嘱时间
  142. </el-dropdown-item>
  143. </div>
  144. </el-dropdown-menu>
  145. </template>
  146. </el-dropdown>
  147. <el-dropdown split-button v-title="'跳转到指定患者的数据页面'">
  148. 页面跳转
  149. <template #dropdown>
  150. <el-dropdown-menu>
  151. <el-dropdown-item @click="jumpToMedicalRecord">
  152. 病案首页
  153. </el-dropdown-item>
  154. <el-dropdown-item @click="openRationalDrugUse">
  155. 合理用药
  156. </el-dropdown-item>
  157. <el-dropdown-item @click="routerBloodSugarClick">
  158. 血糖
  159. </el-dropdown-item>
  160. <el-dropdown-item @click="openNewNutrientPlus">
  161. 营养评估
  162. </el-dropdown-item>
  163. </el-dropdown-menu>
  164. </template>
  165. </el-dropdown>
  166. <el-dropdown
  167. split-button
  168. v-title="'设置选中医嘱成组。'"
  169. @click="confirmAssociationClick"
  170. >
  171. 关联
  172. <template #dropdown>
  173. <el-dropdown-menu>
  174. <el-dropdown-item @click="clearAssociate()"
  175. >取消关联
  176. </el-dropdown-item>
  177. </el-dropdown-menu>
  178. </template>
  179. </el-dropdown>
  180. <el-dropdown v-title="'患者数据维护,包含传染病、过敏源。'" split-button>
  181. 数据维护
  182. <template #dropdown>
  183. <el-dropdown-menu>
  184. <el-dropdown-item @click="yzMitt.emit('allergen')">
  185. 过敏源维护
  186. </el-dropdown-item>
  187. <el-dropdown-item @click="crbOpen"> 传染病上报</el-dropdown-item>
  188. <el-dropdown-item
  189. @click="
  190. router.push(
  191. `/outpatient/chronicDisease/chronicDiseaseRegister/${props.patientInfo.inpatientNo}`
  192. )
  193. "
  194. >
  195. 慢病登记
  196. </el-dropdown-item>
  197. </el-dropdown-menu>
  198. </template>
  199. </el-dropdown>
  200. <el-dropdown
  201. v-title="'工作台操作,录入、清空、医嘱弹窗、复制粘贴'"
  202. @click="yzMitt.emit('toAddAnOrder')"
  203. split-button
  204. >
  205. 录入医嘱
  206. <template #dropdown>
  207. <el-dropdown-menu>
  208. <div v-title="'清空,正在编辑的医嘱或者选中的医嘱。'">
  209. <el-dropdown-item @click="yzMitt.emit('emptyTheWorkbench')">
  210. 清空工作台
  211. </el-dropdown-item>
  212. </div>
  213. <div
  214. v-title="
  215. '打开医嘱弹窗,目前只有转科、抗菌药物信息、处置医嘱可以打开弹窗。'
  216. "
  217. >
  218. <el-dropdown-item @click="yzMitt.emit('openTheOrderPopUpWindow')">
  219. 医嘱弹窗
  220. </el-dropdown-item>
  221. </div>
  222. <div
  223. v-title="
  224. '复制并粘贴医嘱,如果想要分开,请在表格中鼠标右键一个医嘱,选择复制,然后在到表格中,选择粘贴医嘱。<br /><br />' +
  225. '<span style=\'color:#fffe00\'>注意:</span>如果你是在临时医嘱页面,那么长期医嘱会改为 ONCE 频率,如果在长期医嘱页面那么临时医嘱会改为 QD 频率,如果是成组的医嘱' +
  226. '复制父医嘱即可子医嘱会自动复制,目前不会提供批量复制医嘱的功能。'
  227. "
  228. >
  229. <el-dropdown-item @click="yzMitt.emit('duplicateAndPaste')">
  230. 复制并粘贴
  231. </el-dropdown-item>
  232. </div>
  233. <div
  234. v-title="
  235. '<span style=\'color:#fffe00\'>带有实验性质的功能,如果此方法出错频率高,后期可能会删除。</span>' +
  236. '<br />复制选中的医嘱并粘贴。'
  237. "
  238. >
  239. <el-dropdown-item @click="openCopyDialog">
  240. 复制选中的医嘱
  241. </el-dropdown-item>
  242. </div>
  243. </el-dropdown-menu>
  244. </template>
  245. </el-dropdown>
  246. <el-dropdown title="其他操作" split-button>
  247. 其他
  248. <template #dropdown>
  249. <el-dropdown-menu>
  250. <div
  251. v-title="
  252. '为即将出院的患者预约门诊,如果患者没有门诊号的话,需要先创建一个门诊号。'
  253. "
  254. >
  255. <el-dropdown-item @click="outPatientDialogOpen()">
  256. 门诊预约
  257. </el-dropdown-item>
  258. </div>
  259. <div
  260. v-title="
  261. '一键停止正在执行的医嘱,会生成一条医嘱,此医嘱是口头医嘱,有没任何效果。'
  262. "
  263. >
  264. <el-dropdown-item @click="oneClickStopOpen">
  265. 一键停止
  266. </el-dropdown-item>
  267. </div>
  268. <el-dropdown-item @click="clickTimeLimitReminder">
  269. 时限提示
  270. </el-dropdown-item>
  271. <el-dropdown-item @click="openSanCeDan"> 三测单</el-dropdown-item>
  272. <el-dropdown-item @click="nursingRecordForm">
  273. 护理记录单
  274. </el-dropdown-item>
  275. </el-dropdown-menu>
  276. </template>
  277. </el-dropdown>
  278. <el-button
  279. type="success"
  280. icon="RefreshRight"
  281. @click="rcvrcalcost"
  282. v-title="
  283. '如果患者费用存在问题或者有些费用看不到,<br />可以执行此操作。'
  284. "
  285. >
  286. 费用接收重算
  287. </el-button>
  288. </div>
  289. </div>
  290. <!-- 门诊预约 -->
  291. <OutpatientAppointments
  292. v-if="outPatientDialog"
  293. @closed="outPatientDialog = false"
  294. />
  295. <one-click-stop
  296. v-if="oneClickStopDialog"
  297. @closed="oneClickStopDialog = false"
  298. />
  299. <CopyTableDataOrder v-model="copyTableDialog" v-if="copyTableDialog" />
  300. </template>
  301. <script setup lang="jsx">
  302. import { MLRKON_CLIENT } from "@/api/heliyongyao/mlrkon.js";
  303. import {
  304. associateOrdersApi,
  305. confirmTheDoctorSOrderWithMedicine,
  306. stopOrder,
  307. } from "@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru";
  308. import {
  309. associateOrders,
  310. clearAssociate,
  311. clickTimeLimitReminder,
  312. confirmLoading,
  313. errorMsgFunc,
  314. huanZheXinXi,
  315. isCydy,
  316. jsQueryYzData,
  317. OrderBy,
  318. queryParam,
  319. setOrderDataAndTwinkle,
  320. setYzOrderGroup,
  321. yiZhuData,
  322. yiZhuDataInit,
  323. youWuXuanZheHuanZhe,
  324. yzMitt,
  325. } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
  326. import { BizException, ExceptionEnum } from "@/utils/BizException";
  327. import router from "@/router";
  328. import { clone } from "@/utils/clone";
  329. import { listIsBlank, stringIsBlank } from "@/utils/blank-utils";
  330. import { xcMessage } from "@/utils/xiaochan-element-plus";
  331. import { getFormatDatetime } from "@/utils/date";
  332. import { ElMessageBox } from "element-plus";
  333. import ReportOfInfectiousDiseases from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/report-of-infectious-diseases/ReportOfInfectiousDiseases.vue";
  334. import OutpatientAppointments from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/OutpatientAppointments.vue";
  335. import OneClickStop from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/OneClickStop.vue";
  336. import {
  337. getPatientInfo,
  338. receiveAndRecalculateCost,
  339. } from "@/api/inpatient/patient";
  340. import CopyTableDataOrder from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/table/CopyTableDataOrder.vue";
  341. import { CyMessageBox } from "@/utils/cy-message-box";
  342. import { useUserStore } from "@/pinia/user-store";
  343. import CyDateRange from "@/components/cy/date-range/CyDateRange.vue";
  344. import { useDialog } from "@/components/cy/CyDialog/index";
  345. import XEUtils from "xe-utils";
  346. import { useYfGroupStore } from "@/pinia/use-yf-group";
  347. import { rationalUseOfMedicine , getInfoRationalUseOfMedicine} from "@/api/heliyongyao/rational-use";
  348. import {
  349. getPatientAllergens,
  350. } from '@/api/public-api'
  351. const props = defineProps({
  352. patientInfo: {
  353. type: Object,
  354. },
  355. returnData: {
  356. type: Function,
  357. },
  358. frequCodeChange: Function,
  359. confirmOrdersClick: Function,
  360. clickOnTheOrderTemplate: Function,
  361. });
  362. const userStore = useUserStore().userInfo;
  363. const emits = defineEmits(["batchDeleteOrdersClick"]);
  364. const copyTableDialog = ref(false);
  365. const openCopyDialog = () => {
  366. if (youWuXuanZheHuanZhe()) return;
  367. copyTableDialog.value = true;
  368. };
  369. const queryYz = async (tableScrollTop = true) => {
  370. if (!props.patientInfo.inpatientNo) {
  371. BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择患者");
  372. }
  373. try {
  374. yiZhuDataInit();
  375. yzMitt.emit("clearSelected");
  376. if (tableScrollTop) {
  377. yzMitt.emit("tableScroll", 0);
  378. }
  379. await jsQueryYzData();
  380. } catch (e) {}
  381. };
  382. const addYiZhuClick = () => {
  383. yzMitt.emit("toAddAnOrder");
  384. };
  385. let yzList = ref([]);
  386. let patientAllergenData = ref([]);
  387. const currentConfirmOrdersClick = async () => {
  388. if (!props.patientInfo.inpatientNo) {
  389. BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择患者");
  390. }
  391. // console.log("patientInfo",props.patientInfo)
  392. // console.log("huanZheXinXi",huanZheXinXi)
  393. // 获取患者药品医嘱
  394. await getInfoRationalUseOfMedicine(
  395. props.patientInfo.inpatientNo,
  396. props.patientInfo.admissTimes
  397. ).then(res=>{
  398. if(res && res.list && res.list.length>0){
  399. let resultList = res.list
  400. yzList.value = resultList.map(item=> (
  401. {
  402. id : item.id ,
  403. code : item.orderCode,
  404. route : item.supplyCodeName,
  405. dose :item.dose ,
  406. doseUnit : item.doseUnitName,
  407. freq : item.frequCode,
  408. unit : item.miniUnitName ,
  409. repeat : item.frequCode ? item.frequCode == "ONCE" ? "0" : "1" : "",
  410. startDateTime : item.startTime,
  411. group : ""
  412. }
  413. )
  414. );
  415. console.log(yzList.value,"yzList")
  416. }
  417. }).catch(err=>{
  418. console.log("err",err);
  419. BizException(ExceptionEnum.MESSAGE_ERROR, "网络错误!");
  420. })
  421. // 获取患者诊断
  422. let admissDigArr = props.patientInfo.admissDiag.split(",")
  423. let admissDigNameArr = props.patientInfo.admissDiagStr.split(",")
  424. let patientDiag = ref([])
  425. for (let i = 0; i < admissDigArr.length; i++) {
  426. patientDiag.value.push({
  427. code: admissDigArr[i],
  428. name: admissDigNameArr[i]
  429. })
  430. }
  431. // 获取患者过敏史
  432. await getPatientAllergens(props.patientInfo.inpatientNo).then((res) => {
  433. patientAllergenData.value = res
  434. console.log("patientAllergenData",patientAllergenData.value);
  435. })
  436. // console.log("yiZhuData",yiZhuData);
  437. let params = {
  438. station:{
  439. "type":"1" //门诊2 住院1,工作站类型
  440. },
  441. doctor: {
  442. code: userStore.codeRs, //医生编码
  443. name: userStore.name , //医生姓名
  444. deptCode:userStore.deptCode, //科室编码
  445. },
  446. patient:{
  447. id : props.patientInfo.inpatientNo,
  448. code : props.patientInfo.patNo,
  449. visitId:"" ,
  450. name : props.patientInfo.name,
  451. chargeType : props.patientInfo.medTypeName,
  452. sex : props.patientInfo.sexName,
  453. deptCode : props.patientInfo.smallDept,
  454. birthday : props.patientInfo.birthDate,
  455. height :"",
  456. weight :"",
  457. medconds :{
  458. diag : patientDiag,
  459. allergens : patientAllergenData.value
  460. }
  461. },
  462. orders:yzList
  463. }
  464. // console.log("userStore",userStore);
  465. // console.log("MLRKON_CLIENT",MLRKON_CLIENT)
  466. console.log("MLRKON_CLIENT-params",params)
  467. const getResult = (result) => {
  468. console.log("result",result);
  469. let {bSave} = result;
  470. if(bSave){
  471. props.confirmOrdersClick();
  472. // xcMessage.error("合理用药未通过1");
  473. } else {
  474. xcMessage.error("合理用药未通过2");
  475. }
  476. }
  477. await MLRKON_CLIENT.doCall("srv_screen", params, { "api": false, "timeout": 10000}, getResult)
  478. // return
  479. };
  480. const mlrkonCallBack = (data) => {
  481. console.log("mlrkonCallBack",data);
  482. };
  483. /**
  484. * 确认医嘱
  485. */
  486. const confirmTheDoctorSOrderWithMedicineClick = () => {
  487. if (!props.patientInfo.inpatientNo) {
  488. BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择患者");
  489. }
  490. confirmLoading.value = true;
  491. confirmTheDoctorSOrderWithMedicine(
  492. props.patientInfo.inpatientNo,
  493. props.patientInfo.admissTimes
  494. ).then(res => {
  495. if (res && res?.error) {
  496. errorMsgFunc.add(res.data);
  497. } else {
  498. queryYz();
  499. confirmLoading.value = false;
  500. }
  501. });
  502. };
  503. const deleteAnOrderByOrderNo = () => {
  504. yzMitt.emit("deleteAnOrderByOrderNo", yiZhuData.value);
  505. };
  506. /**
  507. * 点击批量删除数据
  508. */
  509. const batchDeleteOrdersClick = () => {
  510. emits("batchDeleteOrdersClick");
  511. };
  512. /**
  513. * 跳转到模板页面
  514. */
  515. const orderTemplateClick = () => {
  516. router.push({
  517. name: "orderTemplateMaintenance",
  518. });
  519. };
  520. /**
  521. * 选中复制的医嘱
  522. */
  523. const orderTemplateClickCopy = () => {
  524. let temp = clone(yzMitt.emit("getSelectedData"));
  525. if (listIsBlank(temp)) {
  526. xcMessage.error("请先选中医嘱。");
  527. return;
  528. }
  529. let dept = {
  530. code: huanZheXinXi.value.zkWard,
  531. name: huanZheXinXi.value.zkWardName,
  532. };
  533. router.push({
  534. name: "orderTemplateMaintenance",
  535. params: {
  536. data: JSON.stringify(temp),
  537. dept: JSON.stringify(dept),
  538. },
  539. });
  540. };
  541. /**
  542. * 批量停止时间
  543. */
  544. const clickToStopTheOrder = async () => {
  545. const tempData = yzMitt.emit("getSelectedData");
  546. tempData.forEach(item => {
  547. // 因为前端用的是浏览器自带的 所以要删除 T
  548. item.endTime = getFormatDatetime(item.endTimeTemp);
  549. });
  550. await CyMessageBox.confirm({
  551. message: `是否批量停止时间,${tempData.length}条`,
  552. });
  553. const param = {
  554. inpatientNo: huanZheXinXi.value.inpatientNo,
  555. admissTimes: huanZheXinXi.value.admissTimes,
  556. list: tempData,
  557. };
  558. stopOrder(param)
  559. .then(() => {
  560. yzMitt.emit("queryYz");
  561. yzMitt.emit("getTableRef")?.clearCheckboxRow();
  562. })
  563. .catch(e => {
  564. const tmp = {};
  565. for (const key in e.data) {
  566. tmp[key] = { error: [e.data[key]] };
  567. }
  568. errorMsgFunc.add(tmp);
  569. });
  570. };
  571. // 点击修改医嘱时间
  572. const clickToModifyTheDoctorSOrderTime = () => {
  573. router.push({
  574. name: "yzActOrderModify",
  575. query: {
  576. patNo: huanZheXinXi.value.inpatientNo,
  577. },
  578. });
  579. };
  580. // 跳转到病案首页
  581. const jumpToMedicalRecord = () => {
  582. router.push({
  583. name: "fillCaseFrontSheet",
  584. query: {
  585. patNo: huanZheXinXi.value.inpatientNo,
  586. deptCode: huanZheXinXi.value.smallDept,
  587. },
  588. });
  589. };
  590. // 合理用药
  591. const openRationalDrugUse = () => {
  592. window.open("http://172.16.32.121:9097/index.html");
  593. };
  594. function openNewNutrientPlus() {
  595. if (youWuXuanZheHuanZhe()) return;
  596. window.open(
  597. `http://172.16.32.159/sysmgrApi/sysmgr/staff/hisToLogin?account=${userStore.codeRs}&patientHospitalNumber=${huanZheXinXi.value.inpatientNo}`
  598. );
  599. }
  600. /**
  601. * 血糖
  602. */
  603. const routerBloodSugarClick = () => {
  604. router.push({
  605. name: "bloodSugarQuery",
  606. params: {
  607. patNo: huanZheXinXi.value.inpatientNo,
  608. times: huanZheXinXi.value.admissTimes,
  609. },
  610. });
  611. };
  612. // 点击确认关联
  613. const confirmAssociationClick = () => {
  614. if (associateOrders.value.actOrderNo === null) {
  615. BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择需要关联的父医嘱");
  616. }
  617. if (associateOrders.value.associatedGroup.length === 0) {
  618. BizException(ExceptionEnum.MESSAGE_ERROR, "至少选择一个子医嘱");
  619. }
  620. ElMessageBox.confirm("请确认是否要关联这些医嘱。", "提示", {
  621. type: "warning",
  622. })
  623. .then(() => {
  624. associateOrdersApi(associateOrders.value).then(async res => {
  625. clearAssociate();
  626. await setOrderDataAndTwinkle(res[0].actOrderNo, res);
  627. });
  628. })
  629. .catch(() => {});
  630. };
  631. const crbOpen = () => {
  632. if (youWuXuanZheHuanZhe()) return;
  633. useDialog(ReportOfInfectiousDiseases, {
  634. params: {
  635. patNo: huanZheXinXi.value.inpatientNo,
  636. times: huanZheXinXi.value.admissTimes,
  637. },
  638. dialogProps: {
  639. title: "传染病上报",
  640. fullscreen: true,
  641. },
  642. confirmText: "保存",
  643. });
  644. };
  645. const outPatientDialog = ref(false);
  646. const outPatientDialogOpen = () => {
  647. if (stringIsBlank(huanZheXinXi.value.zkWard)) {
  648. BizException(ExceptionEnum.LOGICAL_ERROR, "请先选择患者。");
  649. }
  650. if (stringIsBlank(huanZheXinXi.value.mzNo)) {
  651. BizException(
  652. ExceptionEnum.LOGICAL_ERROR,
  653. "没有查询到患者门诊号,请先建档。"
  654. );
  655. }
  656. outPatientDialog.value = true;
  657. };
  658. const oneClickStopDialog = ref(false);
  659. const oneClickStopOpen = () => {
  660. if (youWuXuanZheHuanZhe()) return;
  661. oneClickStopDialog.value = true;
  662. };
  663. const rcvrcalcost = async () => {
  664. if (youWuXuanZheHuanZhe()) return;
  665. let { inpatientNo, admissTimes, ledgerSn, admissDate } = huanZheXinXi.value;
  666. await receiveAndRecalculateCost({
  667. inpatientNo,
  668. admissTimes,
  669. ledgerSn,
  670. admissDate,
  671. });
  672. huanZheXinXi.value = await getPatientInfo(inpatientNo);
  673. };
  674. const GraphicsTempalte = defineAsyncComponent(
  675. () => import("@/components/medical-advice/temperature/GraphicsTempalte")
  676. );
  677. function openSanCeDan() {
  678. if (youWuXuanZheHuanZhe()) return;
  679. const { inpatientNo, admissTimes } = huanZheXinXi.value;
  680. useDialog(GraphicsTempalte, {
  681. dialogProps: { title: "三测单", fullscreen: true },
  682. params: {
  683. patientInfo: {
  684. inpatientNo,
  685. admissTimes,
  686. },
  687. },
  688. }).catch(XEUtils.noop);
  689. }
  690. const EmrYzTemperature = defineAsyncComponent(
  691. () =>
  692. import(
  693. "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrYzTemperature.vue"
  694. )
  695. );
  696. function nursingRecordForm() {
  697. if (youWuXuanZheHuanZhe()) return;
  698. const { inpatientNo, admissTimes } = huanZheXinXi.value;
  699. useDialog(EmrYzTemperature, {
  700. dialogProps: {
  701. title: "护理记录单",
  702. fullscreen: true,
  703. },
  704. params: {
  705. patNo: inpatientNo,
  706. times: admissTimes,
  707. },
  708. });
  709. }
  710. onMounted(async () => {
  711. yzMitt.on("queryYz", val => {
  712. return queryYz(val);
  713. });
  714. yzMitt.on("confirmMedicalAdvice", () => {
  715. if (isCydy()) {
  716. confirmTheDoctorSOrderWithMedicineClick();
  717. } else {
  718. currentConfirmOrdersClick();
  719. }
  720. });
  721. });
  722. </script>
  723. <style scoped lang="scss">
  724. .status_color {
  725. width: 10px;
  726. height: 10px;
  727. }
  728. </style>