import request from '@/utils/request'
import Vue from 'vue'
// 获取HIS中患者信息
export function getDictionaryByType (data) {
    return request({
        url: Vue.prototype.$api.drug.getDictionaryByType+'?page='+data.page+'&ypbz='+data.ypbz+'&sbj='+data.sbj+'&flag='+data.flag+'&yyxmbm='+data.yyxmbm+'&ylxmmc='+data.ylxmmc+'&limit='+data.limit,
        method: 'get',
        data
    })
}

// 从核心目录里面查询项目编码（东营和石油合起来）
export function getGbxmbm (data) {
    return request({
        url: Vue.prototype.$api.drug.getGbxmbm+'?sbj='+data.sbj+'&page='+data.page+'&ylxmbzmc='+data.ylxmbzmc+'&yyxmbm='+data.yyxmbm,
        method: 'get',
        data
    })
}

// 很多步骤
export function step (data) {
    return request({
        url: Vue.prototype.$api.drug.step+'?stepname='+data.stepname,
        method: 'get',
        data
    })
}

// 核心目录项目
export function hxlist (data) {
    return request({
        url: Vue.prototype.$api.drug.hxlist+'?page='+data.page+'&sbj='+data.sbj+'&ypbz='+data.ypbz+'&yyxmbm='+data.yyxmbm+'&ylxmmc='+data.ylxmmc+'&limit='+data.limit,
        method: 'get',
        data
    })
}

// 已对照列表
export function hospitallist (data) {
    return request({
        url: Vue.prototype.$api.drug.hospitallist+'?page='+data.page+'&sbj='+data.sbj+'&ypbz='+data.ypbz+'&yyxmbm='+data.yyxmbm+'&ylxmmc='+data.ylxmmc+'&limit='+data.limit,
        method: 'get',
        data
    })
}





// 从更新对照状态，区分油田和东营
export function updatestatus (data) {
    return request({
        url: Vue.prototype.$api.drug.updatestatus+'?sdj='+data.sbj+'&project_id='+data.project_id+'&center_id='+data.center_id,
        method: 'patch',
        data
    })
}



// 上传给地委进行对照，区分油田和东营
export function upload (data) {
    return request({
        url: Vue.prototype.$api.drug.upload+'?sbj='+data.sbj+'&project_id='+data.project_id,
        method: 'patch',
        data
    })
}

// 下载his项目目录,只是一个请求
export function downloadhis (data) {
    return request({
        url: Vue.prototype.$api.drug.downloadhis,
        method: 'get',
        data
    })
}

// 下载地纬项目目录,只是一个请求
export function downloaddw (data) {
    return request({
        url: Vue.prototype.$api.drug.downloaddw+'?stepname='+data.stepname,
        method: 'get',
        data
    })
}
// 下载地纬项目目录,只是一个请求
export function uploadtohis (data) {
    return request({
        url: Vue.prototype.$api.drug.uploadtohis,
        method: 'get',
        data
    })
}

// 手动对照
export function syscompare (data) {
    return request({
        url: Vue.prototype.$api.drug.syscompare,
        method: 'get',
        data
    })
}
