Flatten nested repos
This commit is contained in:
88
test/vuex/one-process-worklist/api/receive_patient.js
Normal file
88
test/vuex/one-process-worklist/api/receive_patient.js
Normal file
@@ -0,0 +1,88 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/worklist/";
|
||||
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
201
test/vuex/one-process-worklist/api/worklist_new.js
Normal file
201
test/vuex/one-process-worklist/api/worklist_new.js
Normal file
@@ -0,0 +1,201 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/worklist/";
|
||||
|
||||
export async function search(query, chosen) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/search', {
|
||||
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_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
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
|
||||
export async function save(name, test) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/save', {
|
||||
name: name,
|
||||
test: test
|
||||
});
|
||||
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) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_new/save_edit', {
|
||||
id: id,
|
||||
name: name,
|
||||
test: test
|
||||
});
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
133
test/vuex/one-process-worklist/api/worklist_patient.js
Normal file
133
test/vuex/one-process-worklist/api/worklist_patient.js
Normal file
@@ -0,0 +1,133 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/process/worklist/";
|
||||
|
||||
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) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'worklist_patient/search_px', {
|
||||
worklist_id: worklist_id,
|
||||
sdate: sdate,
|
||||
edate: edate
|
||||
});
|
||||
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_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