import request from '@/utils/request'

// 查询患者信息列表
export function listPatientInfo(query) {
    return request({
        url: '/manage/preHospital/list',
        method: 'get',
        params: query
    })
}

// 查询患者信息详细
export function getPatientInfo(id) {
    return request({
        url: '/manage/preHospital/' + id,
        method: 'get'
    })
}

// 新增患者信息
export function addPatientInfo(data) {
    return request({
        url: '/manage/preHospital',
        method: 'post',
        data: data
    })
}

// 修改患者信息
export function updatePatientInfo(data) {
    return request({
        url: '/manage/preHospital',
        method: 'put',
        data: data
    })
}
// 住院
export function saveRecord(data) {
    return request({
        url: '/manage/visitRecord/saveRecord',
        method: 'post',
        data: data
    })
}


// 删除患者信息
export function delPatientInfo(id) {
    return request({
        url: '/manage/preHospital/' + id,
        method: 'delete'
    })
}
