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

339 lines
8.4 KiB
JavaScript

const URL = "/one-api/confirm-result/";
export async function search(prm) {
try {
var resp = await axios.post(URL + 'confirmresult_v2/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_v2/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_v2/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 search_company(prm) {
try {
var resp = await axios.post(URL + 'confirmresult_v2/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_v2/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_v2/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 search_mou(qry, company_id) {
try {
var resp = await axios.post(URL + 'confirmresult_v2/search_mou', {
qry: qry,
company_id: company_id
});
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 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
// };
// }
// }