YzQueryCondition.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  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. let currentGroupNo = 0
  401. resultList.forEach(item=>{
  402. if(item.parentNo) {
  403. let groupParent = resultList.find(citem => citem.actOrderNo === item.parentNo)
  404. if(groupParent){
  405. if(groupParent.group) {
  406. item.group = groupParent.group
  407. } else {
  408. item.group = currentGroupNo
  409. groupParent.group = currentGroupNo
  410. }
  411. }
  412. currentGroupNo++ ;
  413. } else if(!item.group) {
  414. item.group = currentGroupNo
  415. currentGroupNo++ ;
  416. }
  417. })
  418. console.log("resultList",resultList);
  419. yzList.value = resultList.map(item=> (
  420. {
  421. id : item.id ,
  422. code : item.orderCode,
  423. route : item.supplyCodeName,
  424. dose :item.dose ,
  425. doseUnit : item.doseUnitName,
  426. freq : item.frequCode,
  427. unit : item.miniUnitName ,
  428. repeat : item.frequCode ? item.frequCode == "ONCE" ? "0" : "1" : "",
  429. startDateTime : item.startTime,
  430. group : item.group + ""
  431. }
  432. )
  433. );
  434. console.log(yzList.value,"yzList")
  435. }
  436. }).catch(err=>{
  437. console.log("err",err);
  438. BizException(ExceptionEnum.MESSAGE_ERROR, "网络错误!");
  439. })
  440. // 获取患者诊断
  441. let admissDigArr = props.patientInfo.admissDiag.split(",")
  442. let admissDigNameArr = props.patientInfo.admissDiagStr.split(",")
  443. let patientDiag = ref([])
  444. for (let i = 0; i < admissDigArr.length; i++) {
  445. patientDiag.value.push({
  446. code: admissDigArr[i],
  447. name: admissDigNameArr[i]
  448. })
  449. }
  450. // 获取患者过敏史
  451. await getPatientAllergens(props.patientInfo.inpatientNo).then((res) => {
  452. patientAllergenData.value = res
  453. console.log("patientAllergenData",patientAllergenData.value);
  454. })
  455. // console.log("yiZhuData",yiZhuData);
  456. let params = {
  457. station:{
  458. "type":"1" //门诊2 住院1,工作站类型
  459. },
  460. doctor: {
  461. code: userStore.codeRs, //医生编码
  462. name: userStore.name , //医生姓名
  463. deptCode:userStore.deptCode, //科室编码
  464. },
  465. patient:{
  466. id : props.patientInfo.inpatientNo,
  467. code : props.patientInfo.patNo,
  468. visitId:"" ,
  469. name : props.patientInfo.name,
  470. chargeType : props.patientInfo.medTypeName,
  471. sex : props.patientInfo.sexName,
  472. deptCode : props.patientInfo.smallDept,
  473. birthday : props.patientInfo.birthDate,
  474. height :"",
  475. weight :"",
  476. medconds :{
  477. diag : patientDiag,
  478. allergens : patientAllergenData.value
  479. }
  480. },
  481. orders:yzList
  482. }
  483. // console.log("userStore",userStore);
  484. // console.log("MLRKON_CLIENT",MLRKON_CLIENT)
  485. console.log("MLRKON_CLIENT-params",params)
  486. const getResult = (result) => {
  487. console.log("result",result);
  488. let {bSave} = result;
  489. if(bSave){
  490. props.confirmOrdersClick();
  491. // xcMessage.error("合理用药未通过1");
  492. } else {
  493. xcMessage.error("合理用药未通过");
  494. }
  495. }
  496. await MLRKON_CLIENT.doCall("srv_screen", JSON.stringify(params), { "api": false, "timeout": 10000}, getResult)
  497. // return
  498. };
  499. const mlrkonCallBack = (data) => {
  500. console.log("mlrkonCallBack",data);
  501. };
  502. /**
  503. * 确认医嘱
  504. */
  505. const confirmTheDoctorSOrderWithMedicineClick = () => {
  506. if (!props.patientInfo.inpatientNo) {
  507. BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择患者");
  508. }
  509. confirmLoading.value = true;
  510. confirmTheDoctorSOrderWithMedicine(
  511. props.patientInfo.inpatientNo,
  512. props.patientInfo.admissTimes
  513. ).then(res => {
  514. if (res && res?.error) {
  515. errorMsgFunc.add(res.data);
  516. } else {
  517. queryYz();
  518. confirmLoading.value = false;
  519. }
  520. });
  521. };
  522. const deleteAnOrderByOrderNo = () => {
  523. yzMitt.emit("deleteAnOrderByOrderNo", yiZhuData.value);
  524. };
  525. /**
  526. * 点击批量删除数据
  527. */
  528. const batchDeleteOrdersClick = () => {
  529. emits("batchDeleteOrdersClick");
  530. };
  531. /**
  532. * 跳转到模板页面
  533. */
  534. const orderTemplateClick = () => {
  535. router.push({
  536. name: "orderTemplateMaintenance",
  537. });
  538. };
  539. /**
  540. * 选中复制的医嘱
  541. */
  542. const orderTemplateClickCopy = () => {
  543. let temp = clone(yzMitt.emit("getSelectedData"));
  544. if (listIsBlank(temp)) {
  545. xcMessage.error("请先选中医嘱。");
  546. return;
  547. }
  548. let dept = {
  549. code: huanZheXinXi.value.zkWard,
  550. name: huanZheXinXi.value.zkWardName,
  551. };
  552. router.push({
  553. name: "orderTemplateMaintenance",
  554. params: {
  555. data: JSON.stringify(temp),
  556. dept: JSON.stringify(dept),
  557. },
  558. });
  559. };
  560. /**
  561. * 批量停止时间
  562. */
  563. const clickToStopTheOrder = async () => {
  564. const tempData = yzMitt.emit("getSelectedData");
  565. tempData.forEach(item => {
  566. // 因为前端用的是浏览器自带的 所以要删除 T
  567. item.endTime = getFormatDatetime(item.endTimeTemp);
  568. });
  569. await CyMessageBox.confirm({
  570. message: `是否批量停止时间,${tempData.length}条`,
  571. });
  572. const param = {
  573. inpatientNo: huanZheXinXi.value.inpatientNo,
  574. admissTimes: huanZheXinXi.value.admissTimes,
  575. list: tempData,
  576. };
  577. stopOrder(param)
  578. .then(() => {
  579. yzMitt.emit("queryYz");
  580. yzMitt.emit("getTableRef")?.clearCheckboxRow();
  581. })
  582. .catch(e => {
  583. const tmp = {};
  584. for (const key in e.data) {
  585. tmp[key] = { error: [e.data[key]] };
  586. }
  587. errorMsgFunc.add(tmp);
  588. });
  589. };
  590. // 点击修改医嘱时间
  591. const clickToModifyTheDoctorSOrderTime = () => {
  592. router.push({
  593. name: "yzActOrderModify",
  594. query: {
  595. patNo: huanZheXinXi.value.inpatientNo,
  596. },
  597. });
  598. };
  599. // 跳转到病案首页
  600. const jumpToMedicalRecord = () => {
  601. router.push({
  602. name: "fillCaseFrontSheet",
  603. query: {
  604. patNo: huanZheXinXi.value.inpatientNo,
  605. deptCode: huanZheXinXi.value.smallDept,
  606. },
  607. });
  608. };
  609. // 合理用药
  610. const openRationalDrugUse = () => {
  611. window.open("http://130.150.161.153:8080");
  612. };
  613. function openNewNutrientPlus() {
  614. if (youWuXuanZheHuanZhe()) return;
  615. window.open(
  616. `http://172.16.32.159/sysmgrApi/sysmgr/staff/hisToLogin?account=${userStore.codeRs}&patientHospitalNumber=${huanZheXinXi.value.inpatientNo}`
  617. );
  618. }
  619. /**
  620. * 血糖
  621. */
  622. const routerBloodSugarClick = () => {
  623. router.push({
  624. name: "bloodSugarQuery",
  625. params: {
  626. patNo: huanZheXinXi.value.inpatientNo,
  627. times: huanZheXinXi.value.admissTimes,
  628. },
  629. });
  630. };
  631. // 点击确认关联
  632. const confirmAssociationClick = () => {
  633. if (associateOrders.value.actOrderNo === null) {
  634. BizException(ExceptionEnum.MESSAGE_ERROR, "请先选择需要关联的父医嘱");
  635. }
  636. if (associateOrders.value.associatedGroup.length === 0) {
  637. BizException(ExceptionEnum.MESSAGE_ERROR, "至少选择一个子医嘱");
  638. }
  639. ElMessageBox.confirm("请确认是否要关联这些医嘱。", "提示", {
  640. type: "warning",
  641. })
  642. .then(() => {
  643. associateOrdersApi(associateOrders.value).then(async res => {
  644. clearAssociate();
  645. await setOrderDataAndTwinkle(res[0].actOrderNo, res);
  646. });
  647. })
  648. .catch(() => {});
  649. };
  650. const crbOpen = () => {
  651. if (youWuXuanZheHuanZhe()) return;
  652. useDialog(ReportOfInfectiousDiseases, {
  653. params: {
  654. patNo: huanZheXinXi.value.inpatientNo,
  655. times: huanZheXinXi.value.admissTimes,
  656. },
  657. dialogProps: {
  658. title: "传染病上报",
  659. fullscreen: true,
  660. },
  661. confirmText: "保存",
  662. });
  663. };
  664. const outPatientDialog = ref(false);
  665. const outPatientDialogOpen = () => {
  666. if (stringIsBlank(huanZheXinXi.value.zkWard)) {
  667. BizException(ExceptionEnum.LOGICAL_ERROR, "请先选择患者。");
  668. }
  669. if (stringIsBlank(huanZheXinXi.value.mzNo)) {
  670. BizException(
  671. ExceptionEnum.LOGICAL_ERROR,
  672. "没有查询到患者门诊号,请先建档。"
  673. );
  674. }
  675. outPatientDialog.value = true;
  676. };
  677. const oneClickStopDialog = ref(false);
  678. const oneClickStopOpen = () => {
  679. if (youWuXuanZheHuanZhe()) return;
  680. oneClickStopDialog.value = true;
  681. };
  682. const rcvrcalcost = async () => {
  683. if (youWuXuanZheHuanZhe()) return;
  684. let { inpatientNo, admissTimes, ledgerSn, admissDate } = huanZheXinXi.value;
  685. await receiveAndRecalculateCost({
  686. inpatientNo,
  687. admissTimes,
  688. ledgerSn,
  689. admissDate,
  690. });
  691. huanZheXinXi.value = await getPatientInfo(inpatientNo);
  692. };
  693. const GraphicsTempalte = defineAsyncComponent(
  694. () => import("@/components/medical-advice/temperature/GraphicsTempalte")
  695. );
  696. function openSanCeDan() {
  697. if (youWuXuanZheHuanZhe()) return;
  698. const { inpatientNo, admissTimes } = huanZheXinXi.value;
  699. useDialog(GraphicsTempalte, {
  700. dialogProps: { title: "三测单", fullscreen: true },
  701. params: {
  702. patientInfo: {
  703. inpatientNo,
  704. admissTimes,
  705. },
  706. },
  707. }).catch(XEUtils.noop);
  708. }
  709. const EmrYzTemperature = defineAsyncComponent(
  710. () =>
  711. import(
  712. "@/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrYzTemperature.vue"
  713. )
  714. );
  715. function nursingRecordForm() {
  716. if (youWuXuanZheHuanZhe()) return;
  717. const { inpatientNo, admissTimes } = huanZheXinXi.value;
  718. useDialog(EmrYzTemperature, {
  719. dialogProps: {
  720. title: "护理记录单",
  721. fullscreen: true,
  722. },
  723. params: {
  724. patNo: inpatientNo,
  725. times: admissTimes,
  726. },
  727. });
  728. }
  729. onMounted(async () => {
  730. yzMitt.on("queryYz", val => {
  731. return queryYz(val);
  732. });
  733. yzMitt.on("confirmMedicalAdvice", () => {
  734. if (isCydy()) {
  735. confirmTheDoctorSOrderWithMedicineClick();
  736. } else {
  737. currentConfirmOrdersClick();
  738. }
  739. });
  740. });
  741. </script>
  742. <style scoped lang="scss">
  743. .status_color {
  744. width: 10px;
  745. height: 10px;
  746. }
  747. </style>