import request from '/@/utils/request';
import type { IPatInfoEventmonitoringAddDetail, IGetPatInfoEventmonitoringDeleteDetailListParams, IPatientDialysisInfectionEventMonitoringoCcurrenceRateParams, IPatientDialysisInfectionEventMonitoringoCcurrenceRate } from './types/monitoring.type';
import type { AxiosPromise } from 'axios';

/**
 * 新增血液透析感染事件接口Api
 * @param data 
 * @returns 
 */
export function patInfoEventmonitoringAddDetailAndReportApi(data: IPatInfoEventmonitoringAddDetail): AxiosPromise<IPatInfoEventmonitoringAddDetail> {
    return request({
        url: '/patient/dialysis/infection/event/monitoring/detail/addDetailAndReport',
        method: 'post',
        data
    })
}

/**
 * 删除血液透析感染事件API
 * @param id 
 * @returns 
 */
export function patInfoEventmonitoringDeleteDetailAndReportApi(id: number) {
    return request({
        url: '/patient/dialysis/infection/event/monitoring/detail/deleteDetailAndReport',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        params: { id }
    })
}

/**
 * 查询血液透析感染事件Api
 * @param params 
 * @returns 
 */
export function getPatInfoEventmonitoringDeleteDetailListApi(params: IGetPatInfoEventmonitoringDeleteDetailListParams): AxiosPromise<IPatInfoEventmonitoringAddDetail[]> {
    return request({
        url: '/patient/dialysis/infection/event/monitoring/detail/listCondition',
        method: 'post',
        params
    })
}

/**
 * 更新血液透析感染事件接口Api
 * @param data 
 * @returns 
 */
export function patInfoEventmonitoringUpdatetApi(data: IPatInfoEventmonitoringAddDetail): AxiosPromise<IPatInfoEventmonitoringAddDetail> {
    return request({
        url: '/patient/dialysis/infection/event/monitoring/detail/updateAndReport',
        method: 'post',
        data
    })
}


/**
 * 查询感染事件控制率Api
 * @param params 
 * @returns 
 */
export function patientDialysisInfectionEventMonitoringoCcurrenceRateApi(params: IPatientDialysisInfectionEventMonitoringoCcurrenceRateParams): AxiosPromise<IPatientDialysisInfectionEventMonitoringoCcurrenceRate | {}> {
    return request({
        url: '/patient/dialysis/infection/event/monitoring/detail/patientDialysisInfectionEventMonitoringoCcurrenceRate',
        method: 'post',
        params
    })
}