Flatten nested repos
This commit is contained in:
48
test/vuex/one-fo-verification/api/patient.js
Normal file
48
test/vuex/one-fo-verification/api/patient.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const URL = "/one-api/mockup/fo/verification/";
|
||||
|
||||
export async function search(token, nolab, nama, status) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
token:token,
|
||||
nolab: nolab,
|
||||
nama: nama,
|
||||
status: status
|
||||
});
|
||||
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, patient, status) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/save', {
|
||||
token:token,
|
||||
patient: patient,
|
||||
status: status
|
||||
});
|
||||
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