chenyincheng
2023-01-30 47f0c0b6986b8dd423e81c77f341c829550e326d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import {sockteStore} from '@/stores/sockteInfo'
import { confingInfoStore } from '@/stores/StoresConfing'
import {getPatientInfo2,updatePatient} from '@/api/user/index'
import {writePatient,writeResult} from './sockteStomp'
/**
 * 发送患者卡号返回患者信息
 * @param codeStr 
 */
const sendPationCodeApi=(codeStr:string)=>{
    const pcName= sockteStore().pcName
    const mode={
        machineName:pcName,
        clientCode:confingInfoStore().confingInfo.clientCode,
        queryCode:codeStr
    }
    console.log('发送患者code 到http',mode)
    getPatientInfo2(mode).then(re=>{
        console.log('获取到患者信息-------')
        console.log(re)
        writePatient(re.data)
    })  
}
const updatePatientApi=(pam:object)=>{
    console.log('发送患者结果到后台 到http',pam)
    updatePatient(pam).then(re=>{
        console.log('发送患者结果到后端返回',re)
        writeResult(re.data)
    })
    
}
export {
    sendPationCodeApi,
    updatePatientApi
}