Flatten nested repos
This commit is contained in:
133
test/vuex/one-mapping-batch-v2/api/pre_analytic.js
Normal file
133
test/vuex/one-mapping-batch-v2/api/pre_analytic.js
Normal file
@@ -0,0 +1,133 @@
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function suggest(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/suggest_v2', 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(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/save_v2', 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 receive(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/worklist_receive', 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_reject(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/save_reject', 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_confirmation(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/save_confirmation', 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(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/get_v2', 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 getrequirements(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/getrequirements', 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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
88
test/vuex/one-mapping-batch-v2/api/receive_patient.js
Normal file
88
test/vuex/one-mapping-batch-v2/api/receive_patient.js
Normal file
@@ -0,0 +1,88 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function search(nolab, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/search', {
|
||||
search: search,
|
||||
nolab: nolab
|
||||
});
|
||||
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_sent() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/search_sent', {});
|
||||
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 receive(ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/receive', {
|
||||
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 remove(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'receive_patient/remove', {
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
20
test/vuex/one-mapping-batch-v2/api/staff.js
Normal file
20
test/vuex/one-mapping-batch-v2/api/staff.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = "/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'staff/search', 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
|
||||
};
|
||||
}
|
||||
}
|
||||
161
test/vuex/one-mapping-batch-v2/api/worklist_new.js
Normal file
161
test/vuex/one-mapping-batch-v2/api/worklist_new.js
Normal file
@@ -0,0 +1,161 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
export async function search(query, chosen) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/search_v2', {
|
||||
search: query,
|
||||
chosen:chosen
|
||||
});
|
||||
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_chosen(query, worklist_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/search_chosen', {
|
||||
search: query,
|
||||
worklist_id: worklist_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_patient(worklist_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_patient/search_patient', {
|
||||
worklist_id: worklist_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_instrument(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/search_instrument', {
|
||||
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 save(name, test, rujukan, instrument) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/save', {
|
||||
name: name,
|
||||
test: test,
|
||||
rujukan: rujukan,
|
||||
instrument: instrument
|
||||
});
|
||||
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_edit(id, name, test, rujukan, instrument) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/save_edit', {
|
||||
id: id,
|
||||
name: name,
|
||||
test: test,
|
||||
rujukan: rujukan,
|
||||
instrument: instrument
|
||||
});
|
||||
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 del(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/del', {
|
||||
worklist_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
|
||||
};
|
||||
}
|
||||
}
|
||||
136
test/vuex/one-mapping-batch-v2/api/worklist_patient.js
Normal file
136
test/vuex/one-mapping-batch-v2/api/worklist_patient.js
Normal file
@@ -0,0 +1,136 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/mapping-batch-v2/";
|
||||
|
||||
|
||||
export async function search() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_patient/search');
|
||||
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_px(worklist_id, sdate, edate, racktype, curr_page) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/search_px_v3', {
|
||||
worklist_id: worklist_id,
|
||||
sdate: sdate,
|
||||
edate: edate,
|
||||
racktype: racktype,
|
||||
curr_page: curr_page
|
||||
});
|
||||
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(worklist_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'pre_analytic/search_patient_v2', {
|
||||
worklist_id: worklist_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_sent() {
|
||||
// try {
|
||||
// var resp = await axios.post(URL + 'receive_patient/search_sent', {});
|
||||
// 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 verify(orderid, laststatusid, datax) {
|
||||
// try {
|
||||
// var resp = await axios.post(URL + 'handling_patient/verify', {
|
||||
// orderid: orderid,
|
||||
// laststatusid: laststatusid,
|
||||
// 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 reject(orderid, laststatusid, datax) {
|
||||
// try {
|
||||
// var resp = await axios.post(URL + 'handling_patient/reject', {
|
||||
// orderid: orderid,
|
||||
// laststatusid: laststatusid,
|
||||
// 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
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user