import request from "@/utils/request";

export function getRoomPeople(sid) {
    return request({
        url: '/emrSocket/getRoomPeople',
        method: 'get',
        params: {sid}
    })
}

export function sendAMessage(sid, key, message) {
    return request({
        url: '/emrSocket/sendAMessage',
        method: 'get',
        params: {sid, key, message}
    })
}

export function getChatHistoryBySid(sid) {
    return request({
        url: '/emrSocket/getChatHistoryBySid',
        method: 'get',
        params: {sid}
    })
}

export function isThereADoctorEditing(sid) {
    return request({
        url: '/emrSocket/isThereADoctorEditing',
        method: 'get',
        params: {sid}
    })
}

export function repeatedlyOpenTheSamePatient(sid) {
    return request({
        url: '/emrSocket/repeatedlyOpenTheSamePatient',
        method: 'get',
        params: {sid}
    })
}

export function emrSocketUnlockApi(sid, documentId) {
    return request({
        url: '/Emr/emrSocketUnlock',
        method: 'get',
        params: {sid, documentId}
    })
}

