Initial import
This commit is contained in:
20
one-ui/app-dokter/one-md-doctor-testv3/api/doctor.js
Normal file
20
one-ui/app-dokter/one-md-doctor-testv3/api/doctor.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = "/one-api/v1/one-doctor/doctortestv3/";
|
||||
|
||||
export async function lookup(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'lookup', 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
|
||||
};
|
||||
}
|
||||
}
|
||||
97
one-ui/app-dokter/one-md-doctor-testv3/api/doctortest.js
Normal file
97
one-ui/app-dokter/one-md-doctor-testv3/api/doctortest.js
Normal file
@@ -0,0 +1,97 @@
|
||||
const URL = "/one-api/v1/one-doctor/doctortestv3/";
|
||||
|
||||
export async function lookuptest(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'lookuptest', 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 saveeditstatus(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'saveeditstatus', 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 getstatus(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'getstatus', 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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// dropdown doctors
|
||||
export async function getdoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'getdoctor', 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 copyfromdoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'copyfromdoctor', 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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user