const URL = "/one-api/mockup/masterdata/"; export async function search(prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/searchhallosis", 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 searchdetail(prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/searchhalosisdetail", 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 confirmHallosis(prm) { try { var resp = await axios.post( URL + "Whatsappstatushallosis/confirmHalosis", 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 getsexreg(token) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/getsexreg", { 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 getnewcode(token) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/getnewcode", { 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 save(prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/save", 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 newdoctor(prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/newdoctor", 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 xdelete(prm) { try { var resp = await axios.post( URL + "Whatsappstatushallosis/deletedoctor", 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 getaddress(prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/getaddress", 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 searchcity(token, prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/searchcity", { 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 getdistrict(token, prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/getdistrict", { id: prm.M_CityID, 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 getkelurahan(token, prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/getkelurahan", { token: token, id: prm.M_DistrictID, }); 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 getjpa(token) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/getjpa", { 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 savenewaddress(prm) { try { var resp = await axios.post( URL + "Whatsappstatushallosis/savenewaddress", 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 saveeditaddress(prm) { try { var resp = await axios.post( URL + "Whatsappstatushallosis/saveeditaddress", 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 deleteaddress(prm) { try { var resp = await axios.post( URL + "Whatsappstatushallosis/deleteaddress", 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 confirmHallosisDetail(prm) { try { var resp = await axios.post(URL + "Whatsappstatushallosis/confirmHalosisDetail", 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 }; } }