53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
import {post, get} from './http'
|
|
|
|
/**
|
|
* 获取转诊消息列表
|
|
* @returns {Promise<*>}
|
|
*/
|
|
export async function getTransferPrescriptionListApi() {
|
|
return await post('/transfer-prescription/list', {}, 3)
|
|
}
|
|
|
|
/**
|
|
* 获取转诊详情
|
|
* @param params { id: number }
|
|
* @returns {Promise<*>}
|
|
*/
|
|
export async function getTransferPrescriptionDetailApi(params) {
|
|
return await get('/transfer-prescription/detail', params, 3)
|
|
}
|
|
|
|
/**
|
|
* 同意转诊
|
|
* @param params { id: number }
|
|
* @returns {Promise<*>}
|
|
*/
|
|
export async function agreeTransferPrescriptionApi(params) {
|
|
return await post('/transfer-prescription/agree', params, 3)
|
|
}
|
|
|
|
/**
|
|
* 拒绝转诊
|
|
* @param params { id: number, reason?: string }
|
|
* @returns {Promise<*>}
|
|
*/
|
|
export async function rejectTransferPrescriptionApi(params) {
|
|
return await post('/transfer-prescription/reject', params, 3)
|
|
}
|
|
|
|
/**
|
|
* 获取转诊问题列表(用于咨询页面)
|
|
* @returns {Promise<*>}
|
|
*/
|
|
export async function getTransferQuestionsApi() {
|
|
return await get('/transfer-prescription/get-questions', {}, 3)
|
|
}
|
|
|
|
/**
|
|
* 提交转诊问题答案
|
|
* @param params { transfer_id: number, answers: Array<{question_id: number, answer: string}> }
|
|
* @returns {Promise<*>}
|
|
*/
|
|
export async function submitTransferQuestionsApi(params) {
|
|
return await post('/transfer-prescription/submit-questions', params, 3)
|
|
} |