Files
FE_CPONE/test/vuex/one-sniper-tools/api/patient.js
2026-04-27 10:13:31 +07:00

60 lines
1.3 KiB
JavaScript

const URL = "/one-api/mockup/fo/sniper_tools/";
export async function search(prm) {
try {
var resp = await axios.post(URL + 'patient/search', prm);
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 getdataselected(prm) {
try {
var resp = await axios.post(URL + 'patient/getdataselected', prm);
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 patientcoming(prm) {
try {
var resp = await axios.post(URL + 'patient/patient_coming', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}