import request from '@/utils/request'

export function getRoleCode() {
    return request({
        url: '/publicApi/getRoleCode',
        method: 'get',
    })
}

export function getRenYuan(code, deptCode = '') {
    return request({
        url: '/publicApi/getRenYuan',
        method: 'get',
        params: {code, deptCode},
    })
}

export function getChargeCode(pyCode) {
    return request({
        url: '/publicApi/getChargeCode',
        method: 'get',
        params: {pyCode},
    })
}

export function getDept() {
    return request({
        url: '/publicApi/getDept',
        method: 'get',
    })
}

export function getZhuYuanDept() {
    return request({
        url: '/publicApi/getZhuYuanDept',
        method: 'get',
    })
}

export function queryDept(code) {
    return request({
        url: '/publicApi/queryDept',
        method: 'get',
        params: {code}
    })
}

export function maZuiFangShi() {
    return request({
        url: '/publicApi/maZuiFangShi',
        method: 'get',
    })
}

export function getServerDateApi() {
    return request({
        url: '/publicApi/getDate',
        method: 'get',
    });
}

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

export function huoQuYuanGongXinXi(code) {
    return request({
        url: '/publicApi/huoQuYuanGongXinXi',
        method: 'get',
        params: {code}
    });
}

export function getAllergens(name) {
    return request({
        url: '/publicApi/getAllergens',
        method: 'get',
        params: {name}
    });
}

export function getPatientAllergens(patNo) {
    return request({
        url: '/publicApi/getPatientAllergens',
        method: 'get',
        params: {patNo}
    });
}

export function whetherThePatientHasAllergens(patNo) {
    return request({
        url: '/publicApi/whetherThePatientHasAllergens',
        method: 'get',
        params: {patNo}
    });
}

export function newPatientAllergens(patNo, allergenCode, allergenType) {
    return request({
        url: '/publicApi/newPatientAllergens',
        method: 'get',
        params: {patNo, allergenCode, allergenType}
    });
}

export function removePatientAllergens(id) {
    return request({
        url: '/publicApi/removePatientAllergens',
        method: 'get',
        params: {id}
    });
}

export function getDrugInfo(name) {
    return request({
        url: '/publicApi/getDrugInfo',
        method: 'get',
        params: {name}
    });
}

export function getBldCat(name) {
    return request({
        url: '/publicApi/getBldCat',
        method: 'get',
        params: {name}
    });
}

/**
 * 获取 获取转科列表
 * @returns {*}
 */
export function getTheTransferList() {
    return request({
        url: '/publicApi/getTheTransferList',
        method: 'get'
    });
}

export function getPeopleToFillInInformation() {
    return request({
        url: '/publicApi/getPeopleToFillInInformation',
        method: 'get'
    });
}

export function idVerificationApi(idCard) {
    return request({
        url: '/publicApi/idVerification',
        method: 'get',
        params: {idCard}
    });
}


export function getSystemAnnouncement() {
    return request({
        url: '/getSystemAnnouncement',
        method: 'get',
    });
}

export function getUuid() {
    return request({
        url: '/publicApi/getUuid',
        method: 'get',
    })
}

export function getOperationGuide(folderName) {
    return request({
        url: '/publicApi/getOperationGuide',
        method: 'get',
        params: {folderName}
    })
}

