Files
FE_CPONE/test/vuex/cpone-process-resultentry-v21/api/re_px.js
2026-04-27 10:13:31 +07:00

575 lines
13 KiB
JavaScript

const URL = "/one-api/mockup/process/cpone-process-resultentry-v21/";
export async function search(token, order_id, lang_id, lang_si, group_id) {
try {
var resp = await axios.post(URL + 're_px/search', {
token: token,
order_id: order_id,
lang_id: lang_id,
lang_si: lang_si,
group_id: group_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
};
}
}
export async function save(token, lang_id, is_si, datax) {
try {
var resp = await axios.post(URL + 're_px/save', {
token: token,
lang_id: lang_id,
is_si: is_si,
data: datax
});
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 confirm(token, datax) {
try {
var resp = await axios.post(URL + 'rv_validation/confirm', {
token: token,
data: datax
});
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 unvalidate(token, id) {
try {
var resp = await axios.post(URL + 'rv_validation/unvalidate', {
token: token,
order_id: 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
};
}
}
export async function uploadimage(prm) {
try {
var resp = await axios.post(URL + 're_px/uploadimage',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 save_template(token, test_id, value) {
try {
var resp = await axios.post(URL + 're_px/save_template', {
token: token,
test_id: test_id,
value: value
});
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 savererun(prm) {
try {
var resp = await axios.post(URL + 're_px/savererun', 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 lang_export(token, order_id, lang_id, is_si) {
try {
var resp = await axios.post(URL + 're_px/export', {
token: token,
order_id: order_id,
lang_id: lang_id,
is_si: is_si
});
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_group() {
try {
var resp = await axios.post(URL + 're_px/search_group', {});
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_rerun(detail_id) {
try {
var resp = await axios.post(URL + 're_px/search_rerun', {detail_id: detail_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
};
}
}
export async function getmikroresult(prm) {
try {
var resp = await axios.post(URL + 're_px/getmikroresult', 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 getpapsmearresult(prm) {
try {
var resp = await axios.post(URL + 're_px/getpapsmearresult', 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 getantibiotics(prm) {
try {
var resp = await axios.post(URL + 're_px/getantibiotics', 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 getlcprepresult(prm) {
try {
var resp = await axios.post(URL + 're_px/getlcprepresult', 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 getfnaresult(prm) {
try {
var resp = await axios.post(URL + 're_px/getfnaresult', 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 getcytologiresult(prm) {
try {
var resp = await axios.post(URL + 're_px/getcytologiresult', 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 saveresult_mikro(prm) {
try {
var resp = await axios.post(URL + 're_px/saveresult_mikro', 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 saveresult_papsmear(prm) {
try {
var resp = await axios.post(URL + 're_px/saveresult_papsmear', 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 saveresult_lcprep(prm) {
try {
var resp = await axios.post(URL + 're_px/saveresult_lcprep', 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 get_doctors(prm) {
try {
var resp = await axios.post(URL + 're_px/getdoctorsfna', 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 saveresult_fna(prm) {
try {
var resp = await axios.post(URL + 're_px/saveresult_fna', 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 saveresult_cytologi(prm) {
try {
var resp = await axios.post(URL + 're_px/saveresult_cytologi', 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 uploadimage_preparasi_sperma(prm) {
try {
var resp = await axios.post(URL + 're_px/uploadimage_preparasi_sperma', 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 getpreparasispermaresult(prm) {
try {
var resp = await axios.post(URL + 're_px/getpreparasispermaresult', 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 saveresult_preparasi_sperma(prm) {
try {
var resp = await axios.post(URL + 're_px/saveresult_preparasi_sperma', 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 get_doctors_preparasi_sperma(prm) {
try {
var resp = await axios.post(URL + 're_px/get_doctors_preparasi_sperma', 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 getdnafragmentasiresult(prm) {
try {
var resp = await axios.post(URL + 're_px/getdnafragmentasiresult', 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 saveresult_dnafragmentasi(prm) {
try {
var resp = await axios.post(URL + 're_px/saveresult_dnafragmentasi', 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
};
}
}