Flatten nested repos
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
const URL = "/one-api/mockup/process/cpone_resultvalidation_unvalidation/";
|
||||
const URL_UPLOAD = "/one-api/tools/local/r_upload_result/";
|
||||
|
||||
export async function save_note(token, order_id, note, int_note) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'rv_patient/save_note', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
note,
|
||||
int_note
|
||||
});
|
||||
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 send_to_adm(token, order_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'rv_patient/send_to_adm', {
|
||||
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(token, sdate, search, page, company_id, validasi) {
|
||||
console.log('api search')
|
||||
try {
|
||||
var resp = await axios.post(URL + 'rv_patient/search', {
|
||||
token: token,
|
||||
start_date: sdate,
|
||||
search: search,
|
||||
company_id: company_id,
|
||||
page: page,
|
||||
status_validasi: validasi
|
||||
});
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function uploadCpone(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL_UPLOAD+'uploadResult',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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user