import request from "@/utils/request";

let url = '/emrControlRule'

export function addRule(data) {
    return request({
        url: url + '/addRule',
        method: 'post',
        data
    })
}

export function getAvailableObjects() {
    return request({
        url: url + '/getAvailableObjects',
        method: 'get',
    })
}



export function myPatientQualityControl() {
    return request({
        url: url + '/myPatientQualityControl',
        method: 'get',
    })
}


/// 下面是新的
export function requestToUnlockMedicalRecords(data) {
    return request({
        url: url + '/requestToUnlockMedicalRecords',
        method: 'post',
        data
    })
}

export function getApplicationData(data) {
    return request({
        url: url + '/getApplicationData',
        method: 'post',
        data
    })
}

export function reviewMedicalRecordsToUnlock(data) {
    return request({
        url: url + '/reviewMedicalRecordsToUnlock',
        method: 'post',
        data
    })
}

export function getMyUnlockByPatNo(patNo, times) {
    return request({
        url: url + '/getMyUnlockByPatNo',
        method: 'get',
        params: {patNo, times}
    })
}


export function specifyAdmissionQualityControl(start,end) {
    return request({
        url: url + '/specifyAdmissionQualityControl',
        method: 'get',
        params: {start, end}
    })
}

export function terminalPatients(data) {
    return request({
        url: url + '/terminalPatients',
        method: 'post',
        data
    })
}
