Files
FE_CPONE/test/vuex/cpone-queue-ticket/api/patient.js
2026-04-27 10:13:31 +07:00

92 lines
2.3 KiB
JavaScript

const URL = "/one-api/tools/";
export async function getListData(prm) {
try {
var resp = await axios.post(URL + 'downloadbackup/list_backup', 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 getsetup(token) {
try {
var resp = await axios.post(URL + 'patient/getsetup', { token: token });
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 getCorporate(prm) {
try {
var resp = await axios.post(URL + 'patient/getCorporate', 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 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 voidOrder(prm) {
try {
var resp = await axios.post(URL + 'patient/voidOrder', 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
};
}
}