Flatten nested repos
This commit is contained in:
50
test/vuex/one-sampling-v2/api/patient.js
Normal file
50
test/vuex/one-sampling-v2/api/patient.js
Normal file
@@ -0,0 +1,50 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/sampling/";
|
||||
|
||||
export async function search(nolab, search, station, status) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient_list/search', {
|
||||
search: search,
|
||||
nolab: nolab,
|
||||
station: station,
|
||||
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 get_stations(tokenx) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient_list/get_stations',
|
||||
{token:tokenx}
|
||||
);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
52
test/vuex/one-sampling-v2/api/queue.js
Normal file
52
test/vuex/one-sampling-v2/api/queue.js
Normal file
@@ -0,0 +1,52 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/sampling/";
|
||||
|
||||
export async function call(token, order_id, station_id, act) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'queue/call_skip_process', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
station_id: station_id,
|
||||
act: act
|
||||
});
|
||||
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 recall(token, order_id, station_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'queue/recall', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
station_id: station_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
|
||||
};
|
||||
}
|
||||
}
|
||||
166
test/vuex/one-sampling-v2/api/sampling.js
Normal file
166
test/vuex/one-sampling-v2/api/sampling.js
Normal file
@@ -0,0 +1,166 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/sampling/";
|
||||
|
||||
export async function get_samples(order_id, station_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sampling/get_samples', {
|
||||
orderid: order_id,
|
||||
stationid: station_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 get_sample(order_id, sample_id, barcode) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sampling/get_sample', {
|
||||
orderid: order_id,
|
||||
sampleid: sample_id,
|
||||
barcode: barcode
|
||||
});
|
||||
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, order_id, sample_id, barcode, json_data) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sampling/save_2', {
|
||||
token: token,
|
||||
orderid: order_id,
|
||||
sampleid: sample_id,
|
||||
barcode: barcode,
|
||||
json_data: json_data
|
||||
});
|
||||
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_note_supervisor(order_id, message) {
|
||||
try {
|
||||
let token = one_token()
|
||||
var resp = await axios.post(URL + 'sampling/save_note_supervisor', {
|
||||
orderid: order_id,
|
||||
message: message,
|
||||
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 barcode_add(token, order_id, sample_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sampling/barcode_add', {
|
||||
token: token,
|
||||
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 get_requirement() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sampling/get_requirement', {});
|
||||
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, station_id, status, reqs) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sampling/save_requirement', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
station_id: station_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
|
||||
};
|
||||
}
|
||||
}
|
||||
46
test/vuex/one-sampling-v2/api/ver_patient.js
Normal file
46
test/vuex/one-sampling-v2/api/ver_patient.js
Normal file
@@ -0,0 +1,46 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/verification/";
|
||||
|
||||
export async function search(nolab, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient_list/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 + 'patient_list/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
|
||||
};
|
||||
}
|
||||
}
|
||||
47
test/vuex/one-sampling-v2/api/ver_verification.js
Normal file
47
test/vuex/one-sampling-v2/api/ver_verification.js
Normal file
@@ -0,0 +1,47 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/verification/";
|
||||
|
||||
export async function send(ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verification/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 + 'verification/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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user