import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/openhis";

// 查询服务管理列表
export function getRegistrationfeeList(query) {
  return request({
    url: '/basic-service/healthcare/healthcare-service-page',
    method: 'get',
    params: query
  })
}

// 根据位置id筛选医生
export function getPractitionerMetadata(query) {
  return request({
    url: '/charge-manage/register/practitioner-metadata',
    method: 'get',
    params: query
  })
}


// 查询服务管理详细
export function getRegistrationfeeOne(id) {
  return request({
    url: '/basic-service/healthcare/healthcare-service-detail',
    method: 'get',
    params: { id }
  })
}

// 新增服务管理
export function addRegistrationfee(data) {
  return request({
    url: '/basic-service/healthcare/healthcare-service',
    method: 'post',
    data: data
  })
}

// 修改服务管理
export function editRegistrationfee(data) {
  return request({
    url: '/basic-service/healthcare/healthcare-service',
    method: 'put',
    data: data
  })
}

// 查询厂商类型
export function getInit() {
  return request({
    url: '/basic-service/healthcare/init',
    method: 'get'
  })
}

// 查询部门树形数据
export function deptTreeSelect(queryParams) {
  return request({
    url: '/base-data-manage/organization/organization',
    method: 'get',
    param: queryParams
  })
}

// 查询地点树形数据
export function locationTreeSelect(param) {
  return request({
    url: '/base-data-manage/location/location-page-tree',
    method: 'get',
    params: param
  })
}

// 删除收费挂号项目
export function delRegistrationfee(param) {
  return request({
    url: '/basic-service/healthcare/healthcare-service',
    method: 'delete',
    params: param
  })
}

// 获取诊疗项目下拉列表
export function getInitOption(param) {
  return request({
    url: '/data-dictionary/diagnosis-treatment/information-page',
    method: 'get',
    params: param
  })
}