import request from '/@/utils/request';
import { AxiosPromise } from 'axios';
import type { ICommonListParams } from '../common.type';
import type { IMedEducateTempList } from './types/index.type';

export function addHealthTemplate(data: object) {
  return request({
    url: '/med/educate/template/add',
    method: 'post',
    data
  })
}
export function getHealthTemplateList(data: ICommonListParams): AxiosPromise<IMedEducateTempList> {
  data.ordercondition='sort_order'
  return request({
    url: '/med/educate/template/list',
    method: 'post',
    params:data
  })
}
// 编辑医嘱
export function updateHealthTemplate(data: object) {
  return request({
    url: '/med/educate/template/update',
    method: 'post',
    data
  })
}
// 删除模板名称
export function deleteHealthTemplate(id: number) {
  return request({
    url: '/med/educate/template/delete',
    method: 'post',
    params: {
      id
    }
  })
}
