import request from '/@/utils/request';
import type { BatchReplaceParams } from './types';

export function patientDrugSave(params: object) {
    return request({
		url: '/patient/drug/order/vs/patient/save',
		method: 'post',
		data:params
    })
}
export function patientDrugList2(params: object) {
    return request({
		url: '/patient/drug/order/vs/patient/list2',
		method: 'post',
		headers: {
		'Content-Type': 'application/x-www-form-urlencoded'
		},
		params
    })
}
export function patientDrugList3(params: object) {
    return request({
		url: '/patient/drug/order/vs/patient/list3',
		method: 'post',
		data:params
    })
}

export function calendarList(params) {
  return request({
		url: '/patient/drug/order/vs/patient/calendarList',
		method: 'post',
		data:params
  })
}

export function deleteId(params: string) {
	return request({
		url: '/patient/drug/order/vs/patient/delete',
		method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
		data: params,
	});
}
export function update(params: string) {
	return request({
		url: '/patient/drug/order/vs/patient/update',
		method: 'post',
		data: params,
	});
}
export function updatePushState(params: Object) {
	return request({
		url: '/patient/drug/order/vs/patient/updatePushState',
		method: 'post',
		headers: {
		'Content-Type': 'application/x-www-form-urlencoded'
		},
		params,
	});
}


/**
 * 医嘱替换
 * @param params 
 * @returns 
 */
export function batchReplaceApi(params: BatchReplaceParams) {
	return request({
		url: '/patient/drug/order/vs/patient/batchReplace',
		method: 'post',
		params
	})
}

/**
 * 透析方案
 * @param params 
 * @returns 
 */
export function batchReplaceApi2(params: any) {
	return request({
		url: '/patient/vs/hemo/med/scheme/batchReplace',
		method: 'post',
		params
	})
}