init biotest web

This commit is contained in:
2024-04-15 10:26:43 +07:00
commit d62954ab50
310 changed files with 242647 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
const URL = "/be_clinic.php";
export async function search(nik, name, dob, hp, current_page) {
try {
var resp = await axios.post(URL, {
cmd:"getpatient",
nik: nik,
name: name,
dob: dob,
hp: hp,
current_page:current_page
});
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 getcompanyclinic() {
try {
var resp = await axios.post(URL, {
cmd:"getcompany",
});
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 getnurseclinic() {
try {
var resp = await axios.post(URL, {
cmd:"getnurse",
});
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 getdoctorclinic() {
try {
var resp = await axios.post(URL, {
cmd:"getdoctor",
});
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 addclinic(prm) {
try {
var resp = await axios.post(URL, {
cmd:"add",
orderDate: prm.orderDate,
M_PatientID: prm.M_PatientID,
NurseID: prm.NurseID,
M_CompanyID: prm.M_CompanyID,
Keluhan: prm.Keluhan,
Objective: prm.Objective,
Kesimpulan: prm.Kesimpulan,
Saran: prm.Saran
});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch(e) {
return {
status: "ERR",
message: e.message
};
}
}