268 lines
5.4 KiB
JavaScript
268 lines
5.4 KiB
JavaScript
const URL = "/one-api/mockup/masterdata/one-md-pola-kelainan-summary/";
|
|
|
|
export async function save(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/addnewkelainandetail",
|
|
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(token, id) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/deletekelainandetail",
|
|
{ id: id, 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 searchkelainangroup(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/searchkelainangroup",
|
|
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 searchingkelainan(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/searchingkelainan",
|
|
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 searchdistrict(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/searchdistrict",
|
|
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 searchkelurahan(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/searchkelurahan",
|
|
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 + "polakelainansummary/searchcompany", 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 searchmou(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "polakelainansummary/searchmou", 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(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "polakelainansummary/searchdoctor", 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 lookupbyname(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/lookupkelainandetailbyname",
|
|
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 selectaddressdoctor(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/selectaddressdoctor",
|
|
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 addKelainan(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + "polakelainansummary/addKelainan", 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 deleteKelainan(prm) {
|
|
try {
|
|
var resp = await axios.post(
|
|
URL + "polakelainansummary/deleteKelainan",
|
|
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,
|
|
};
|
|
}
|
|
}
|