import request from '/@/utils/request';
import type { IExecuteOrderParams, AddDrugOrdersFromTemplateParams } from './types/patient_hemo_med_temp_drug_order.type';

export function Add(params: string) {
	return request({
		url: '/patient/hemo/med/temp/drug/order/add',
		method: 'post',
		data: params,
	});
}
export function update(params: string) {
	return request({
		url: '/patient/hemo/med/temp/drug/order/update',
		method: 'post',
		data: params,
	});
}
export function deleteId(params: string) {
	return request({
		url: '/patient/hemo/med/temp/drug/order/delete',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		data: params,
	});
}
export function list(params: object) {
    return request({
		url: '/patient/hemo/med/temp/drug/order/list',
		method: 'post',
		headers: {
		'Content-Type': 'application/x-www-form-urlencoded'
		},
		params
    })
}
export function addDrugOrdersFromTemplate(params: AddDrugOrdersFromTemplateParams) {
    return request({
		url: '/patient/hemo/med/temp/drug/order/addDrugOrdersFromTemplate',
		method: 'post',
		headers: {
		'Content-Type': 'application/x-www-form-urlencoded'
		},
		params
    })
}
export function listTodayOrder(params: Object) {
	return request({
		url: '/patient/hemo/med/record/listTodayOrder',
		method: 'post',
		data: params,
	});
}
export function listTodayOrder2(params: Object) {
	return request({
		url: '/patient/hemo/med/record/listTodayOrder2',
		method: 'post',
		data: params,
	});
}
export function confirmOrders(params: object) {
    return request({
		url: '/patient/hemo/med/temp/drug/order/confirmOrders',
		method: 'post',
		headers: {
		'Content-Type': 'application/x-www-form-urlencoded'
		},
		params
    })
}
export function listTodayTempOrderStat(params: Object) {
	return request({
		url: '/patient/hemo/med/record/listTodayTempOrderStat',
		method: 'post',
		data: params,
	});
}
export function list2(params: object) {
    return request({
        url: '/patient/drug/order/vs/patient/list2',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        params
    })
}
export function patientPush(params: Object) {
    return request({
        url: '/patient/drug/order/vs/patient/push',
        method: 'post',
        data: params,
    })
}
export function printTodyOrderPaper(params: Object) {
    return request({
        url: '/patient/hemo/med/record/printTodyOrderPaper',
        method: 'post',
		headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        params,
    })
}


/**
 * 执行医嘱
 * @param params 
 * @returns 
 */
export function executeOrderApi(params: IExecuteOrderParams) {
	return request({
		url: '/patient/hemo/med/temp/drug/order/executeOrder',
		method: 'post',
		headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        params,
	})
}