import {request} from '../utils/request.js'
function getItems(id){ //获取地址
  return request('/doctor/inquiry/service/follow/item/'+id,'GET',{},true)
};
function getServiceDetail(data){
    return request('/patient/service/detail','GET',data,true)
}
function createServiceOrder(data){
    return request('/patient/service','POST',data,true)
}
function serviceList(data){ //获取患者检测订单列表
    return request('/patient/order/service','GET',data)
  };
  function serviceDetail(id){ //获取患者检测订单详情
    return request('/patient/order/service/'+id,'GET',{},true)
  };

  function cancelCheckPay(id){ //取消支付
    return request('/patient/order/cancel-pay/'+id,'PUT')
  };
  function cancelCheckOrder(id){ //取消支付
    return request('/patient/order/cancel/'+id,'PUT')
  };
  function delCheckOrder(id){
    return request('/patient/order/detection/'+id,'DELETE')
  };
  function createServiceChatOrder(id){
    return request('/patient/service/inquiry/'+id,'POST',{},true)
}
function serviceEquityDetail(id){ //获取患者服务包订单服务权益详情
    return request('/patient/order/service/detail/'+id,'GET',{},true)
  };
  function serviceSickInfo(id){ //获取服务包订单病例详情-基础益详情
    return request('/case/service/'+id,'GET',{})
  };
  function checkService(id){ //检测是否可创建服务包问诊订单
    return request('/patient/service/check/'+id,'GET',{},true)
  };
  

module.exports={
    checkService,
    serviceSickInfo,
    serviceEquityDetail,
    createServiceChatOrder,
    cancelCheckPay,
    cancelCheckOrder,
  serviceDetail,
  serviceList,
  getItems,
  getServiceDetail,
  createServiceOrder
}
