ykt-wxapp/api/medicine.js

50 lines
1.9 KiB
JavaScript
Raw Normal View History

2026-01-20 13:21:50 +08:00
// 患者管理模块 API 封装
import api from '../utils/http.js'
// API 基础路径
const BASE_PATH = '/medicine'
export function getDiagnosisList({ type, keyword, page, limit }) {
return api.post(`${BASE_PATH}/diagnoses/list`, { type, keyword, page, limit })
}
export function getAccountPrescriptions({ accountId: patientAccountId, doctorId, patientId, statusList, page, limit }) {
return api.post(`${BASE_PATH}/prescriptions/get-by-patient-account`, { patientAccountId, doctorId, statusList, page, limit, patientId })
}
export function getPrescriptionStats(accountId, statusList) {
return api.post(`${BASE_PATH}/prescriptions/account-stats`, { accountId, statusList })
}
export function getPrescriptionDetail(id) {
return api.post(`${BASE_PATH}/prescriptions/get-by-id`, { id })
}
export function getPrescriptionDetailWithRps(id) {
return api.post(`${BASE_PATH}/prescriptions/get-by-id-with-rps`, { id })
}
export function bindSharePrescription({ id, accountId, openId, patientId }) {
return api.post(`${BASE_PATH}/prescriptions/bind-member`, { id, accountId, openId, patientId })
}
export function getPrescriptionTradeNo({ id, openId, accountId, logistics }) {
return api.post(`${BASE_PATH}/prescriptions/get-trade-no`, { id, openId, accountId, logistics })
}
export function cancelPrescription({ accountId, id }) {
return api.post(`${BASE_PATH}/prescriptions/cancel`, { id, accountId })
}
export function applyMedicines({ id, patientAccountId, openId }) {
return api.post(`${BASE_PATH}/prescriptions/apply-represcription`, { id, patientAccountId, openId })
}
export function getCartMedicines({ accountId, ids }) {
return api.post(`${BASE_PATH}/prescriptions/get-cart-medicines`, { accountId, ids })
}
export function getMergeTradeNo({ ids, openId, accountId, logistics }) {
return api.post(`${BASE_PATH}/prescriptions/get-merge-trade-no`, { ids, openId, accountId, logistics })
}