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

export function Add(params: string) {
	return request({
		url: '/patient/hemo/med/body/state/after/add',
		method: 'post',
		data: params,
	});
}
export function update(params: string) {
	return request({
		url: '/patient/hemo/med/body/state/after/update',
		method: 'post',
		data: params,
	});
}
export function deleteId(params: string) {
	return request({
		url: '/patient/hemo/med/body/state/after/delete',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		data: params,
	});
}
/**
 * 获取透后评估
 * @param params 
 * @returns 
 */
export function list(params: ICommonListParams) :AxiosPromise<IMedAfterList> {
    return request({
		url: '/patient/hemo/med/body/state/after/list',
		method: 'post',
		headers: {
		'Content-Type': 'application/x-www-form-urlencoded'
		},
		params
    })
}


/**
 * 保存透后评估
 * @param data 
 * @returns 
 */
export function medAfterSaveApi(data) {
	return request({
		url: '/patient/hemo/med/body/state/after/save',
		method: 'post',
		// headers: {
        //     'Content-Type': 'application/x-www-form-urlencoded'
        // },
		data
	})
}