const URL = "/one-api/v1/preorder/home-service/"; export async function titsexreg() { try { var resp = await axios.post(URL + 'order/titsexreg'); 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(prm) { try { var resp = await axios.post(URL + 'order/searchcity',{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(prm) { try { var resp = await axios.post(URL + 'order/getdistrict',{id:prm.M_CityID}); 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(prm) { try { var resp = await axios.post(URL + 'order/getkelurahan',{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 savenewpatient(prm) { try { var resp = await axios.post(URL + 'order/savenewpatient',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 + 'order/getaddress',{id:prm.M_PatientID}); 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 searchpatient(prm) { try { var resp = await axios.post(URL + 'order/searchpatient',{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(prm) { try { var resp = await axios.post(URL + 'order/searchtest',{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 saveorder(prm) { try { var resp = await axios.post(URL + 'order/saveorder',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 updateorder(prm) { try { var resp = await axios.post(URL + 'order/updateorder',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 }; } }