import request from '@/utils/request'

// 查询诊疗项目列表
export function getTreeList(queryParams) {
  return request({
    url: '/document/definition/treeList',
    method: 'get',
    params: queryParams
  })
}

// 初始化
export function init() {
  return request({
    url: '/document/definition/init',
    method: 'get'
  })
}

// 新增
export function add(data) {
  return request({
    url: '/document/definition/add',
    method: 'post',
    data
  })
}

// 修改
export function update(data) {
  return request({
    url: '/document/definition/update',
    method: 'post',
    data
  })
}

// 查询就诊科室
export function getLocationTree(query) {
  return request({
    url: '/charge-manage/register/org-list',
    method: 'get',
    params: query
  })
}
// 查询就诊科室
export function getDefinitionById(id) {
  return request({
    url: `/document/definition/${id}`,
    method: 'get'
  })
}
export function deleteDefinition(id) {
  return request({
    url: `/document/definition/delete/${id}`,
    method: 'delete'
  })
}

