const URL = "/one-api/one_consumable/patient/"; export async function gettest(prm) { try { var resp = await axios.post(URL + 'gettest', 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 searchconsumable(prm) { try { var resp = await axios.post(URL + 'searchconsumable',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 get_satuan(prm) { try { var resp = await axios.post(URL + 'get_satuan',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 get_item(prm) { try { var resp = await axios.post(URL + 'get_item',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 addconsumable(prm) { try { var resp = await axios.post(URL + 'addconsumable',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 reset(prm) { try { var resp = await axios.post(URL + 'reset',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 saveAllConsumable(prm) { try { var resp = await axios.post(URL + 'saveAllConsumable',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 }; } }