Files
FE_CPONE/test/vuex/confirm-one-result/one-result-confirm/api/patient.js
2026-04-27 10:13:31 +07:00

314 lines
7.6 KiB
JavaScript

const URL = "/one-api/confirm-result/";
export async function search(prm) {
try {
var resp = await axios.post(URL + 'confirmresult/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
};
}
}
export async function process_request_upload(prm) {
try {
var resp = await axios.post(URL + 'confirmresult/process_request_upload', 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 change_reupload(prm) {
try {
var resp = await axios.post(URL + 'confirmresult/change_reupload', 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 searchcompany(prm) {
try {
var resp = await axios.post(URL + 'confirmresult/search_company', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data.data;
return {
status: "OK",
data : data
};
} catch(e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function process_confirm(prm){
try {
var resp = await axios.post(URL + 'confirmresult/process_confirm', 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 process_reupload(prm){
try {
var resp = await axios.post(URL + 'confirmresult/process_reupload', 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 searchcompany(token,prm) {
// try {
// var resp = await axios.post(URL + 'patient/searchcompany',{token:token,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
// };
// }
// }
// export async function searchdoctor(token,prm) {
// try {
// var resp = await axios.post(URL + 'patient/searchdoctor',{token:token,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
// };
// }
// }
// export async function searchtest(token,prm) {
// try {
// var resp = await axios.post(URL + 'patient/searchtest',{token:token,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
// };
// }
// }
// export async function lookup_promises(prm) {
// try {
// var resp = await axios.post(URL + 'patient/lookup_promises', 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 getdatabarcodes(prm) {
// try {
// var resp = await axios.post(URL + 'patient/lookup_barcodes', 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 getdatadob(prm) {
// try {
// var resp = await axios.post(URL + 'patient/getdatadob', 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 updatedob(prm) {
// try {
// var resp = await axios.post(URL + 'patient/updatedob', 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 gettimelinedelivery(prm) {
// try {
// var resp = await axios.post(URL + 'patient/gettimelinedelivery', 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_promises(prm) {
// try {
// var resp = await axios.post(URL + 'patient/save_promises', 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 confirm(prm) {
// try {
// var resp = await axios.post(URL + 'patient/confirm', 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
// };
// }
// }