Files
FE_CPONE/test/vuex/one-process-resultverification-v21/api/re_patient.js
2026-04-27 10:13:31 +07:00

50 lines
1.2 KiB
JavaScript

const URL = "/one-api/mockup/process/resultverification-v21/";
export async function search(token, sdate, search, group_id, page, company_id) {
try {
var resp = await axios.post(URL + 'rv_patient/search', {
token: token,
start_date: sdate,
search: search,
group_id: group_id,
company_id: company_id,
page: page
});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch(e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function info_req(token, order_id) {
try {
var resp = await axios.post(URL + 'rv_patient/info_req', {
token: token,
order_id: order_id
});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch(e) {
return {
status: "ERR",
message: e.message
};
}
}