import request from '/@/utils/request';
import type { IBloodBornePathogen, IBloodBornePathogenReponse } from './types/pathogen.type';
import type { IGetPatInfoEventmonitoringDeleteDetailListParams } from './types/monitoring.type';
import type { AxiosPromise } from 'axios';


/**
 * 新增血液透析患者血源性病原体监测API
 * @param data 
 * @returns 
 */
export function addBloodBornePathogenApi(data: IBloodBornePathogen) {
    return request({
        url: '/patient/dialysis/blood/borne/pathogen/addBloodBornePathogen',
        method: 'post',
        data
    })
}

/**
 * 更新血液透析患者血源性病原体监测API
 * @param data 
 * @returns 
 */
export function updateBloodBornePathogenApi(data: IBloodBornePathogen) {
    return request({
        url: '/patient/dialysis/blood/borne/pathogen/update',
        method: 'post',
        data
    })
}

/**
 * 删除血液透析患者血源性病原体监测API
 * @param data 
 * @returns 
 */
export function delBloodBornePathogenApi(id: number) {
    return request({
        url: '/patient/dialysis/blood/borne/pathogen/delete',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        params: { id }
    })
}

/**
 * 查询血液透析患者血源性病原体监测API
 * @param params 
 * @returns 
 */
export function getBloodBornePathogenListApi(params: IGetPatInfoEventmonitoringDeleteDetailListParams): AxiosPromise<IBloodBornePathogenReponse> {
    return request({
        url: '/patient/dialysis/blood/borne/pathogen/listCondition',
        method: 'post',
        params
    })
}