251 lines
6.3 KiB
TypeScript
251 lines
6.3 KiB
TypeScript
import request from './request';
|
|
import type {
|
|
InputTodayExamStatisticsInfo,
|
|
TodayExamStatisticsResponse,
|
|
InputRevenueStatisticsInfo,
|
|
RevenueStatisticsResponse,
|
|
InputTodayExamProgress,
|
|
TodayExamProgressResponse,
|
|
InputPhysicalExamCustomerList,
|
|
PhysicalExamCustomerListResponse,
|
|
InputPhysicalExamProgressDetail,
|
|
PhysicalExamProgressDetailResponse,
|
|
InputCustomerDetail,
|
|
CustomerDetailResponse,
|
|
InputMedicalExamCenterSignIn,
|
|
PhysicalExamSignInResponse,
|
|
InputTongyishuInfo,
|
|
TongyishuGetResponse,
|
|
InputTongyishuSignSubmit,
|
|
TongyishuSignSubmitResponse,
|
|
InputDaojiandanSignSubmit,
|
|
DaojiandanSignSubmitResponse,
|
|
InputCustomerDetailEdit,
|
|
CustomerDetailEditResponse,
|
|
InputPhysicalExamAddItem,
|
|
PhysicalExamAddItemListResponse,
|
|
InputPhysicalExamDiningLog,
|
|
PhysicalExamDiningLogResponse,
|
|
InputTijianDiningLog,
|
|
TijianDiningLogResponse,
|
|
InputOperatorRemarkInfo,
|
|
OperatorRemarkInfoResponse,
|
|
} from './types';
|
|
|
|
/**
|
|
* 自助机HIS接口
|
|
* 基础路径: /api/his-web/medical-exam-center-app/
|
|
*/
|
|
const MEDICAL_EXAM_BASE_PATH = '/api/his-web/medical-exam-center-app';
|
|
|
|
/**
|
|
* 今日体检统计信息
|
|
* @param data 请求参数(空对象)
|
|
* @returns 今日体检统计信息
|
|
*/
|
|
export const getTodayExamStatistics = (
|
|
data: InputTodayExamStatisticsInfo = {}
|
|
): Promise<TodayExamStatisticsResponse> => {
|
|
return request.post<TodayExamStatisticsResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/today-exam-statistics`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 营收数据统计
|
|
* @param data 请求参数(空对象)
|
|
* @returns 营收数据统计信息
|
|
*/
|
|
export const getRevenueStatistics = (
|
|
data: InputRevenueStatisticsInfo = {}
|
|
): Promise<RevenueStatisticsResponse> => {
|
|
return request.post<RevenueStatisticsResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/revenue-statistics`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 今日体检进度信息
|
|
* @param data 请求参数(空对象)
|
|
* @returns 今日体检进度信息
|
|
*/
|
|
export const getTodayExamProgress = (
|
|
data: InputTodayExamProgress = {}
|
|
): Promise<TodayExamProgressResponse> => {
|
|
return request.post<TodayExamProgressResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/today-exam-progress`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 体检客户列表
|
|
*/
|
|
export const getPhysicalExamCustomerList = (
|
|
data: InputPhysicalExamCustomerList
|
|
): Promise<PhysicalExamCustomerListResponse> => {
|
|
return request.post<PhysicalExamCustomerListResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/customer-list`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 体检进度详情
|
|
*/
|
|
export const getPhysicalExamProgressDetail = (
|
|
data: InputPhysicalExamProgressDetail
|
|
): Promise<PhysicalExamProgressDetailResponse> => {
|
|
return request.post<PhysicalExamProgressDetailResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/progress`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 客户详情
|
|
*/
|
|
export const getCustomerDetail = (
|
|
data: InputCustomerDetail
|
|
): Promise<CustomerDetailResponse> => {
|
|
return request.post<CustomerDetailResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/customer-detail`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* iPad 体检中心签到
|
|
*/
|
|
export const signInMedicalExamCenter = (
|
|
data: InputMedicalExamCenterSignIn
|
|
): Promise<PhysicalExamSignInResponse> => {
|
|
const formData = new FormData();
|
|
formData.append('id_no_pic', data.id_no_pic);
|
|
|
|
return request.post<PhysicalExamSignInResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/sign-in`,
|
|
formData,
|
|
{
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data',
|
|
},
|
|
}
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 获取体检知情同意书PDF
|
|
*/
|
|
export const getTongyishuPdf = (
|
|
data: InputTongyishuInfo
|
|
): Promise<TongyishuGetResponse> => {
|
|
return request.post<TongyishuGetResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/tongyishu-get`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 提交体检知情同意书签名(上传签名图片)
|
|
*/
|
|
export const submitTongyishuSign = (
|
|
data: InputTongyishuSignSubmit
|
|
): Promise<TongyishuSignSubmitResponse> => {
|
|
const formData = new FormData();
|
|
formData.append('sign_file', data.sign_file);
|
|
|
|
return request.post<TongyishuSignSubmitResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/tongyishu-sign-submit?exam_id=${data.exam_id}&combination_code=${data.combination_code}`,
|
|
formData,
|
|
{
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data',
|
|
},
|
|
}
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 客户信息编辑
|
|
*/
|
|
export const editCustomerDetail = (
|
|
data: InputCustomerDetailEdit
|
|
): Promise<CustomerDetailEditResponse> => {
|
|
return request.post<CustomerDetailEditResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/customer-detail-edit`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 搜索体检加项
|
|
*/
|
|
export const searchPhysicalExamAddItem = (
|
|
data: InputPhysicalExamAddItem
|
|
): Promise<PhysicalExamAddItemListResponse> => {
|
|
return request.post<PhysicalExamAddItemListResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/add-item-list`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 提交体检签名生成导检单PDF
|
|
*/
|
|
export const submitDaojiandanSign = (
|
|
data: InputDaojiandanSignSubmit
|
|
): Promise<DaojiandanSignSubmitResponse> => {
|
|
const formData = new FormData();
|
|
formData.append('sign_file', data.sign_file);
|
|
|
|
return request.post<DaojiandanSignSubmitResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/daojiandan-sign-submit?exam_id=${data.exam_id}`,
|
|
formData,
|
|
{
|
|
headers: {
|
|
'Content-Type': 'multipart/form-data',
|
|
},
|
|
}
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 体检用餐登记列表
|
|
*/
|
|
export const getPhysicalExamDiningList = (
|
|
data: InputPhysicalExamDiningLog
|
|
): Promise<PhysicalExamDiningLogResponse> => {
|
|
return request.post<PhysicalExamDiningLogResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/dining-list`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 体检用餐登记
|
|
*/
|
|
export const registerPhysicalExamDining = (
|
|
data: InputTijianDiningLog
|
|
): Promise<TijianDiningLogResponse> => {
|
|
return request.post<TijianDiningLogResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/dining-register`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|
|
/**
|
|
* 获取操作员备注信息
|
|
*/
|
|
export const getOperatorRemarkInfo = (
|
|
data: InputOperatorRemarkInfo
|
|
): Promise<OperatorRemarkInfoResponse> => {
|
|
return request.post<OperatorRemarkInfoResponse>(
|
|
`${MEDICAL_EXAM_BASE_PATH}/remark-get`,
|
|
data
|
|
).then(res => res.data);
|
|
};
|
|
|