import request from '../../utils/request'

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

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

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

export function getMuBan(deptCode, currentPage, pageSize, total) {
    return request({
        url: '/xmlr/getMuBan',
        method: 'get',
        params: {deptCode, currentPage, pageSize, total},
    })
}

export function getMuBanXinXi(patternName, opIdCode) {
    return request({
        url: '/xmlr/getMuBanXinXi',
        method: 'get',
        params: {patternName, opIdCode},
    })
}

export function queryDanGeXiangMu(pyCode, xiangMuHuoYaoPinFlag) {
    return request({
        url: '/xmlr/queryXiangMu',
        method: 'get',
        params: {pyCode, xiangMuHuoYaoPinFlag},
    })
}

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

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

export function yiZhuTuiFeiPiPei(inpatientNo, admissTimes, deptCode) {
    return request({
        url: '/xmlr/yiZhuTuiFeiPiPei',
        method: 'get',
        params: {inpatientNo, admissTimes, deptCode},
    })
}

export function shanChuMuBan(patterName, opIdCode) {
    return request({
        url: '/xmlr/shanChuMuBan',
        method: 'get',
        params: {patterName, opIdCode},
    })
}

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

export function getWard() {
    return request({
        url: '/xmlr/getWard',
        method: 'get',
    })
}

export function getPyCode(inputStr) {
    return request({
        url: '/xmlr/getPyCode',
        method: 'get',
        params: {inputStr},
    })
}

export function getBingQuDuiYingKeShi(ward) {
    return request({
        url: '/xmlr/getBingQuDuiYingKeShi',
        method: 'get',
        params: {ward},
    })
}

export function weiGuiFeiYongFenXi(inpatientNo, execUnit) {
    return request({
        url: '/xmlr/weiGuiFeiYongFenXi',
        method: 'get',
        params: {inpatientNo, execUnit},
    })
}

export function huoQuZhenShuKePiPei(inpatientNo, admissTimes, ledgerSn, chargeCodeMx, execUnit, orderNo, startTime, endTime, riQiPaiXu) {
    return request({
        url: '/xmlr/huoQuZhenShuKePiPei',
        method: 'get',
        params: {inpatientNo, admissTimes, ledgerSn, chargeCodeMx, execUnit, orderNo, startTime, endTime, riQiPaiXu},
    })
}

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

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

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

export function getNoMedicineReturnOrderGenerated(startDate, endDate, groupNo) {
    return request({
        url: '/xmlr/getNoMedicineReturnOrderGenerated',
        method: 'get',
        params: {startDate, endDate, groupNo},
    })
}

export function generateMedicationList(startDate, endDate, groupNo) {
    return request({
        url: '/xmlr/generateMedicationList',
        method: 'get',
        params: {startDate, endDate, groupNo},
    })
}

export function getPrescription(startDate, endDate) {
    return request({
        url: '/xmlr/getPrescription',
        method: 'get',
        params: {startDate, endDate},
    })
}

export function getAPrescriptionByPageNo(pageNo) {
    return request({
        url: '/xmlr/getAPrescriptionByPageNo',
        method: 'get',
        params: {pageNo},
    })
}


