import request from '/@/utils/request';
import type { IListPatsParams, IListPats } from './types/index.type';
import { AxiosPromise } from 'axios';


export function getScheme(params: string) {
	return request({
		url: '/hemo/med/scheme/getScheme',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		data: params,
	});
}
export function listSchemes(params: string) {
	return request({
		url: '/hemo/med/scheme/listSchemes',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		data: params,
	});
}
export function save(data:object){
	return request({
		url: '/hemo/med/scheme/save',
		method: 'post',
		data
	})
}

/**
 * 获取排班表患者的API:
 * @param data 
 * @returns 
 */
export function listPatsApi(params: IListPatsParams) :AxiosPromise<IListPats[]> {
	return request({
		url: '/hemo/med/schedule/listPats',
		method: 'post',
		headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		params
	})
}