import request from '/@/utils/request';
import { AxiosPromise } from 'axios';
import type { IGetStatDataInfoParams, IStatDataInfo } from './types/signln.type';

//溶栓
export function thrombolysis(recordCode: string) {
	return request({
		url: '/patient/hemo/med/record/startTslProcess',
		method: 'post',
		params: {
			recordCode: recordCode,
		},
	});
}
//停止溶栓
export function stopTslProcess(recordCode: string) {
	return request({
		url: '/patient/hemo/med/record/stopTslProcess',
		method: 'post',
		params: {
			recordCode: recordCode,
		},
	});
}
//取消溶栓
export function cancelTslProcess(recordCode: string) {
	return request({
		url: '/patient/hemo/med/record/cancelTslProcess',
		method: 'post',
		params: {
			recordCode: recordCode,
		},
	});
}

// 添加透前
export function addPreSignIn(data: object) {
	return request({
		url: '/patient/hemo/med/body/state/pre/add',
		method: 'post',
		data,
	});
}

// 添加透后
export function addAfterSignIn(data: object) {
	return request({
		url: '/patient/hemo/med/body/state/after/add',
		method: 'post',
		data,
	});
}
// 修改透前
export function updatePreSignIn(data: object) {
	return request({
		url: '/patient/hemo/med/body/state/pre/update',
		method: 'post',
		data,
	});
}
// 修改透后
export function updateAfterSignIn(data: object) {
	return request({
		url: '/patient/hemo/med/body/state/after/update',
		method: 'post',
		data,
	});
}
// 患者信息回显
export function getPatientContent(recordCode: string) {
	return request({
		url: '/patient/hemo/med/record/getMedBodyStateInfo',
		method: 'post',
		params: {
			recordCode: recordCode,
		},
	});
}
// 修改签到状态
export function updateRecord(data: object) {
	return request({
		url: '/patient/hemo/med/record/update',
		method: 'post',
		data,
	});
}

/**
 * 获取排班列表
 * @param params
 * @returns
 */
export function getSchedule(params: IGetStatDataInfoParams): AxiosPromise<IStatDataInfo[]> {
	return request({
		url: '/patient/hemo/med/record/getStatDataInfo',
		method: 'post',
		params,
	});
}
