| | |
| | | import { confingInfoStore } from '@/stores/StoresConfing' |
| | | import {getPatientInfo2,updatePatient} from '@/api/user/index' |
| | | import {writePatient,writeResult} from './sockteStomp' |
| | | import { ipcRenderer } from 'electron' |
| | | /** |
| | | * 发送患者卡号返回患者信息 |
| | | * @param codeStr |
| | | */ |
| | | const sendPationCodeApi=(codeStr:string)=>{ |
| | | ipcRenderer.invoke('logger', `用患者code获取患者数据 code:${codeStr}`) |
| | | const pcName= sockteStore().pcName |
| | | const mode={ |
| | | machineName:pcName, |
| | |
| | | queryCode:codeStr |
| | | } |
| | | getPatientInfo2(mode).then(re=>{ |
| | | ipcRenderer.invoke('logger', `获取患者数据成功:${JSON.stringify(re.data)}`) |
| | | writePatient(re.data) |
| | | }).catch(err=>{ |
| | | ipcRenderer.invoke('logger', `获取患者数据失败:${err}`) |
| | | }) |
| | | } |
| | | const updatePatientApi=(pam:object)=>{ |