import request from '@/utils/request'

// 查询问卷基本信息列表
export function listQuestion(query) {
    return request({
        url: '/system/question/list',
        method: 'get',
        params: query
    })
}

// 查询问卷基本信息详细
export function getQuestion(id) {
    return request({
        url: '/system/question/' + id,
        method: 'get'
    })
}

// 新增问卷基本信息
export function addQuestion(data) {
    return request({
        url: '/system/question/add',
        method: 'post',
        data: data
    })
}

// 修改问卷基本信息
export function updateQuestion(data) {
    return request({
        url: '/system/question/edit',
        method: 'post',
        data: data
    })
}

// 删除问卷基本信息
export function delQuestion(id) {
    return request({
        url: '/system/question/' + id,
        method: 'delete'
    })
}


//科室接口
export function getDepartmentList(query) {
    return request({
        url: '/system/question/departmentQuestionCount',
        method: 'get',
        params: query
    })
}

//科室
export function selectUserDepartment() {
    return request({
        url: '/system/department/selectUserDepartment',
        method: 'get',
    })
}

//病种
export function diseaseList(query) {
    return request({
        url: '/system/departmentDisease/diseaseList',
        method: 'get',
        params: query
    })
}


//分类管理确定
export function updateclassification(data) {
    return request({
        url: '/system/question/updateQuestion',
        method: 'post',
        data
    })
}