219 lines
4.9 KiB
JavaScript
219 lines
4.9 KiB
JavaScript
// API :
|
|
// search bank
|
|
// paramater : query , page , rowPerPage
|
|
const URL = "/one-api/mockup/process/resultverification-v13/";
|
|
|
|
export async function multi_verification(token, order_id) {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_px/multi_verification', {
|
|
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
|
|
};
|
|
}
|
|
}
|
|
|
|
export async function single_verification(token, order_id, val) {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_px/single_verification', {
|
|
token: token,
|
|
order_id: order_id,
|
|
validation: val
|
|
});
|
|
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(token, order_id, group_id) {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_px/search', {
|
|
token: token,
|
|
order_id: order_id,
|
|
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 confirm(token, datax) {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_verification/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 delta_check(token, order_id) {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_verification/delta_check', {
|
|
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
|
|
};
|
|
}
|
|
}
|
|
|
|
export async function trend_analysis(token, order_id) {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_verification/trend_analysis', {
|
|
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
|
|
};
|
|
}
|
|
}
|
|
|
|
export async function search_group() {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_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 reject(token, id, action) {
|
|
try {
|
|
var resp = await axios.post(URL + 'rv_verification/reject', {
|
|
token: token,
|
|
id: id,
|
|
action: action
|
|
});
|
|
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 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
|
|
};
|
|
}
|
|
}
|