2026-08-08 10:33:59 +08:00
|
|
|
|
import { post, get } from './http'
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 就诊人相关接口统一走 xk-api(type=3)
|
|
|
|
|
|
* 取值:unwrapXkApi → code / result / message
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/** 就诊人列表 POST /patient/list → { list, latest_register_user_patient_id } */
|
|
|
|
|
|
export async function getPatientListApi(params = {}) {
|
|
|
|
|
|
return await post('/patient/list', params, 3)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 就诊人保存(新增/编辑)POST /patient/save */
|
|
|
|
|
|
export async function savePatientApi(params = {}) {
|
|
|
|
|
|
return await post('/patient/save', params, 3)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 删除就诊人 POST /patient/delete */
|
|
|
|
|
|
export async function deletePatientApi(params = {}) {
|
|
|
|
|
|
return await post('/patient/delete', params, 3)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 监护人信息 GET /patient/guardian-info */
|
|
|
|
|
|
export async function getPatientGuardianInfoApi(params = {}) {
|
|
|
|
|
|
return await get('/patient/guardian-info', params, 3)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 关系枚举 GET /patient/relation */
|
|
|
|
|
|
export async function getPatientRelationApi(params = {}) {
|
|
|
|
|
|
return await get('/patient/relation', params, 3)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 设为默认就诊人 POST /patient/change-default,传 up_id */
|
|
|
|
|
|
export async function changePatientDefaultApi(params = {}) {
|
|
|
|
|
|
return await post('/patient/change-default', params, 3)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 健康问诊详情 POST /patient/health-info,传 user_patient_id */
|
|
|
|
|
|
export async function getPatientHealthInfoApi(params = {}) {
|
|
|
|
|
|
return await post('/patient/health-info', params, 3)
|
|
|
|
|
|
}
|
2026-08-09 14:36:22 +08:00
|
|
|
|
|
|
|
|
|
|
/** 扫码认领医生创建的就诊人 POST /patient/claim,传 user_patient_id */
|
|
|
|
|
|
export async function claimPatientApi(params = {}) {
|
|
|
|
|
|
return await post('/patient/claim', params, 3)
|
|
|
|
|
|
}
|