78 lines
2.0 KiB
JavaScript
78 lines
2.0 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)
|
||
}
|
||
|
||
/**
|
||
* 获取转诊助理配置(移动端)
|
||
* @returns {Promise<*>}
|
||
*/
|
||
export async function getTransferAssistantConfigApi() {
|
||
return await get('/transfer-assistant-config/get-config', {}, 3)
|
||
}
|
||
|
||
/**
|
||
* 获取转诊咨询协议信息(固定文案和协议列表)
|
||
* @returns {Promise<*>}
|
||
*/
|
||
export async function getTransferConsultationAgreementInfoApi() {
|
||
return await get('/transfer-consultation/get-agreement-info', {}, 3)
|
||
}
|
||
|
||
/**
|
||
* 获取协议详情(根据协议ID)
|
||
* @param {number} agreementId 协议ID
|
||
* @returns {Promise<*>}
|
||
*/
|
||
export async function getAgreementDetailApi(agreementId) {
|
||
return await get(`/agreement/get-detail?id=${agreementId}`, {}, 3)
|
||
} |