import request from '/@/utils/request';
import type { PatientEvaluateInfoListApiParams, PatientEvaluateInfoAddApiData } from './types';


/**
 * 获取评估历史记录数据
 * @param params 
 * @returns 
 */
export function patientEvaluateInfoListApi (params: PatientEvaluateInfoListApiParams) {
    return request({
        url: '/patient/evaluate/info/list',
        method: 'post',
        params
    })
}

/**
 * 新增评估历史记录数据
 * @param data 
 * @returns 
 */
export function patientEvaluateInfoAddApi (data: PatientEvaluateInfoAddApiData) {
    return request({
        url: '/patient/evaluate/info/add',
        method: 'post',
        data
    })
}

/**
 * 修改评估历史记录数据
 * @param data 
 * @returns 
 */
export function patientEvaluateInfoUpdateApi (data: Partial<PatientEvaluateInfoAddApiData>) {
    return request({
        url: '/patient/evaluate/info/update',
        method: 'post',
        data
    })
}

/**
 * 删除评估历史记录数据
 * @param data 
 * @returns 
 */
export function patientEvaluateInfoDeleteApi (id: number) {
    return request({
        url: '/patient/evaluate/info/delete',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        params: { id }
    })
}


/**
 * 获取指定评估记录详情
 * @param id 
 * @returns 
 */
export function patientEvaluateInfoDetailApi (id: number) {
    return request({
        url: '/patient/evaluate/info/detail',
        method: 'post',
        params: { id }
    })
}