Flatten nested repos
This commit is contained in:
88
test/vuex/one-sampling-verification/api/handling_patient.js
Normal file
88
test/vuex/one-sampling-verification/api/handling_patient.js
Normal file
@@ -0,0 +1,88 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/verification_2/";
|
||||
|
||||
export async function search(nolab, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'handling_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 + 'handling_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 send(ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'handling_patient/send', {
|
||||
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 + 'handling_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
|
||||
};
|
||||
}
|
||||
}
|
||||
67
test/vuex/one-sampling-verification/api/receive_patient.js
Normal file
67
test/vuex/one-sampling-verification/api/receive_patient.js
Normal file
@@ -0,0 +1,67 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/verification_2/";
|
||||
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
140
test/vuex/one-sampling-verification/api/verification_patient.js
Normal file
140
test/vuex/one-sampling-verification/api/verification_patient.js
Normal file
@@ -0,0 +1,140 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/verification_2/";
|
||||
|
||||
export async function search(nolab, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verification_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 verify(token, orderid, laststatusid, datax) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verification_patient/verify', {
|
||||
orderid: orderid,
|
||||
laststatusid: laststatusid,
|
||||
data: datax,
|
||||
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 reject(orderid, laststatusid, datax) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verification_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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function get_requirement(order_id, sample_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verification_patient/get_requirement', {
|
||||
order_id: order_id,
|
||||
sample_id: sample_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 save_requirement(token, order_id, sample_id, status, reqs) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verification_patient/save_requirement', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
sample_id: sample_id,
|
||||
status: status,
|
||||
reqs: reqs
|
||||
});
|
||||
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