import request from "@/utils/request";



export function getSchedulePatientList(params) {
  return request({
    url: "/api/hispatient/list",
    method: "get",
    params:params
  });
}


export function getPatientInfo(params) {
  return request({
    url: "/api/hispatient/get",
    method: "get",
    params:params
  });
}


export function createCaseHistory(params) {
  console.log("params",params);
  return request({
    url: "/api/doctorworkstation/casehistory/create",
    method: "get",
    params:params
  });
}







export function getInitData(params) {
  return request({
    url: "/api/hisprescription/config",
    method: "get",
    params:params
  });
}


export function getDoctors() {
  return request({
    url: "/api/admin/get",
    method: "get",
  });
}



export function createHisPrescription(data, params) {
  return request({
    url: "/api/hisprescription/create",
    method: "post",
    data:data,
    params:params,
  });
}



export function register(params) {
  return request({
    url: "/api/register/get",
    method: "get",
    params:params,
  });
}

export function upload(params) {
  return request({
    url: "/api/upload/get",
    method: "get",
    params:params,
  });
}


export function delHisPrescription(params) {
  return request({
    url: "/api/hisprescription/delete",
    method: "post",
    params:params,
  });
}

export function delHisAdvice(params) {
  return request({
    url: "/api/advice/delete",
    method: "post",
    params:params,
  });
}

export function delHisProject(params) {
  return request({
    url: "/api/project/delete",
    method: "post",
    params:params,
  });
}


export function getHisOrderList(params) {
  return request({
    url: "/api/hisorder/list",
    method: "get",
    params:params,
  });
}


export function getHisOrder(params) {
  return request({
    url: "/api/hisorder/get",
    method: "get",
    params:params,
  });
}


export function getHisPrescriptionList(params) {
  return request({
    url: "/api/hisprescription/list",
    method: "get",
    params:params,
  });
}


export function getHisPrescriptionInfo(params){
  return request({
    url:"/api/hisprescription/info",
    method:"get",
    params:params
  })
}




export function Refund(params) {
  return request({
    url: "/api/refund/post",
    method: "post",
    params:params,
  });
}


export function delHisAddition(params) {
  return request({
    url: "/api/addition_charge/delete",
    method: "post",
    params:params,
  });
}



export function getDoctorList() {
  return request({
    url: "/api/doctor/list",
    method: "get",
  });
}


export function getExportConsumeDetailList(params) {
  return request({
    url: "/api/consumedetail/export",
    method: "get",
    params:params
  });
}



export function CreateHisSingleAdviceTemplate(params) {
  return request({
    url: "/api/hisadvicetemplate/add",
    method: "post",
    params:params
  });
}





export function DeleteHisAdviceTemplate(id, template_id, parent_id) {
  return request({
    url:
      "/api/hisadvicetemplate/delete?id=" +
      id +
      "&template_id=" +
      template_id +
      "&parent_id=" +
      parent_id,
    method: "delete"
  });
}


export function postHisAdviceTemplate(params, name, advice_type) {
  return request({
    url:
      "/api/hisadvicetemplate/create?template_name=" +
      name +
      "&advice_type=" +
      advice_type,
    method: "post",
    data: params
  });
}




export function updateHisTemplateName(params) {
  return request({
    url: "/api/histemplate/modify",
    method: "post",
    params:params
  });
}


export function UpdateHisAdviceTemplate(params) {
  return request({
    url: "/api/hisadvicetemplate/update",
    method: "put",
    params:params
  });
}


export function DeleteHisParentAdviceTemplate(id) {
  return request({
    url: "/api/hisadviceparenttemplate/delete?template_id=" + id,
    method: "delete",
  });
}


export function getAllHisAdviceTemplate () {
  return request({
    url: '/api/getallhisadvicetemplate',
    method: 'get',
  })
}




export function getNextOrLastHisPrescription (params) {
  return request({
    url: '/api/hisprescription/get',
    method: 'get',
    params:params,
  })
}




export function getCallHisPrescription (params) {
  return request({
    url: '/api/callhisprescription/get',
    method: 'get',
    params:params,
  })
}



export function getDayOrMonthHisPrescription (params) {
  return request({
    url: '/api/dayprescription/get',
    method: 'get',
    params:params,
  })
}






export function editHisPrescription(data, params) {
  return request({
    url: "/api/hisprescription/edit",
    method: "post",
    data:data,
    params:params,
  });
}



export function getChargeHisPatientList (params) {
  return request({
    url: '/api/charge/list',
    method: 'get',
    params:params,
  })
}



export function getChargeHisPatientInfo (params) {
  return request({
    url: '/api/charge/info',
    method: 'get',
    params:params,
  })
}


export function getHisOrderDetail (params) {
  return request({
    url: '/api/orderdetail/get',
    method: 'get',
    params:params,
  })
}






export function getHisOrderDetailCollect (params) {
  return request({
    url: '/api/orderdetaicollect/get',
    method: 'get',
    params:params,
  })
}


export function getList (params) {
  return request({
    url: '/api/cost/compare',
    method: 'get',
    params:params,
  })
}




export function getRecordList (params) {
  return request({
    url: '/api/record/list',
    method: 'get',
    params:params,
  })
}



export function getCheckAccountFormData (params) {
  return request({
    url: '/api/comparedata/get',
    method: 'get',
    params:params,
  })
}




export function getHospitalPatientList (params) {
  return request({
    url: '/api/hishospitalpatient/list',
    method: 'get',
    params:params,
  })
}






export function GetHisHospitalChargePatientList (params) {
  return request({
    url: '/api/hospitalcharge/list',
    method: 'get',
    params:params,
  })
}



export function GetHisHospitalChargePatientInfo (params) {
  return request({
    url: '/api/hospotalcharge/info',
    method: 'get',
    params:params,
  })
}




export function getHisHospitalPrescriptionList (params) {
  return request({
    url: '/api/hospitalprescription/list',
    method: 'get',
    params:params,
  })
}












export function getIncomeStatisticsDataList(params) {
  return request({
    url: "/api/incomestatistics/get",
    method: "get",
    params:params,
  });
}






export function saveTeam(data, params) {
  return request({
    url: "/api/his/saveprojectteam",
    method: "post",
    data:data,
    params:params,
  });
}




export function editTeam(params,data) {
  return request({
    url: "/api/his/updateprojectteam",
    method: "post",
    data:data,
    params:params,
  });
}

export function createdTemplate(params,data) {
  return request({
    url: "/api/hisprescriptiontemplate/create",
    method: "post",
    data:data,
    params:params,
  });
}

export function preSettle(params) {
  return request({
    url: "/api/presettle/get",
    method: "get",
    params:params,
  });
}



export function getPrivateExpenses(params) {
  return request({
    url: "/api/privateexpenses/get",
    method: "get",
    params:params,
  });
}

export function refundNumber(params) {
  return request({
    url: "/api/refundnumber/post",
    method: "post",
    params:params,
  });
}


export function changeMedType(params) {
  return request({
    url: "/api/changemedtype/post",
    method: "post",
    params:params,
  });
}


export function refunddetail(params) {
  return request({
    url: "/api/refunddetail/post",
    method: "post",
    params:params,
  });
}




export function getPrivateExpensesOrder(params) {
  return request({
    url: "/api/privateexpensesorder/get",
    method: "get",
    params:params,
  });
}


//
export function getMonthCharge(params) {
  return request({
    url: "/api/monthcharge/info",
    method: "get",
    params:params,
  });
}

export function getMonthHisPateintInfo(params) {
  return request({
    url: "/api/monthhispatient/get",
    method: "get",
    params:params,
  });
}












