Flatten nested repos
This commit is contained in:
88
test/vuex/one-process-ref-internal/api/new.js
Normal file
88
test/vuex/one-process-ref-internal/api/new.js
Normal file
@@ -0,0 +1,88 @@
|
||||
const URL = "/one-api/mockup/process/refinternal/";
|
||||
|
||||
export async function search_branch(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'ri_new/search_branch', {
|
||||
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 search_worklist(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'ri_new/search_worklist', {
|
||||
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 search_patient(token, ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'ri_new/search_patient', {
|
||||
token: token,
|
||||
ids: ids
|
||||
});
|
||||
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, branchid, ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'ri_new/save', {
|
||||
token: token,
|
||||
branch_id: branchid,
|
||||
ids: ids
|
||||
});
|
||||
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