import request from '@/utils/request'
import {BASE, AUTH} from "@/api/apiGateway"

export function getPatient(params){
    return request({
        url: `${BASE}/patient/getPatientById`,
        method: 'get',
        params
    })
}

export function updPatient(data){
    return request({
        url: `${BASE}/patient/updPatient`,
        method: 'post',
        data
    })
}

export function uploadStream(data){
    return request({
        url: `${BASE}/open/fileUpload/upload_stream`,
        method: 'post',
        data,
        transformRequest:[data=>data],
        processData: false,
        headers:{'Content-Type': 'multipart/form-data','cache': 'false','processData': 'false'}  
    })
}

export function updatePatientPw(data){
    return request({
        url: `${BASE}/patient/updatePatientPw`,
        method: 'post',
        data
    })
}

export function getTeacherOrgList(params){
    return request({
        url: `${BASE}/patient/getTeacherOrgList`,
        method: 'get',
        params
    })
}

export function getTeacherList(params){
    return request({
        url: `${BASE}/patient/getTeacherList`,
        method: 'get',
        params
    })
}    

export function getFamilyAllArchiveType(params){
  return request({
      url: `${BASE}/patient/getFamilyAllArchiveType`,
      method: 'get',
      params
  })
}
//获取生日祝福详情
export function getWishesById(params){
    return request({
        url: `${BASE}/patient/birthday/getWishesById`,
        method: 'get',
        params
    })
  }
//获取居民拥有的设备
export function patientIconStatus(params){
  return request({
      url: `${BASE}/patient/patientIconStatus`,
      method: 'get',
      params
  })
}
//获取居民标签及能力评估结果信息
export function findPatientLabelAndCar(params){
  return request({
      url: `${BASE}/patient/findPatientLabelAndCar`,
      method: 'get',
      params
  })
}
//查询亲属信息
export function findByPateintId(params){
  return request({
      url: `${BASE}/patient/findByPateintId`,
      method: 'get',
      params
  })
}


