database-all
Version:
MIMS Drug Database integration
61 lines • 2.98 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const ApiUrl_1 = __importDefault(require("../helpers/ApiUrl"));
const makeRequest_1 = __importDefault(require("../helpers/makeRequest"));
//? This Feature is still under development
class ActiveCompositionGroups {
static searchACGS(searchParam) {
return __awaiter(this, void 0, void 0, function* () {
const postData = null;
const acgsList = yield makeRequest_1.default.httpRequest(ApiUrl_1.default.getACGListAPI(), "GET", postData, searchParam);
return acgsList;
});
}
static getACGDetails(acgId, searchParam = null) {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const postData = null;
let params = {};
if (searchParam) {
params = {
"fields": (_a = searchParam === null || searchParam === void 0 ? void 0 : searchParam.fields) === null || _a === void 0 ? void 0 : _a.join(', ')
};
}
;
const acgDetails = yield makeRequest_1.default.httpRequest(ApiUrl_1.default.getACGDetailAPI(acgId), "GET", postData, params);
return acgDetails;
});
}
static getACGCreatedDeltaList() {
return __awaiter(this, void 0, void 0, function* () {
const list = yield makeRequest_1.default.httpRequest(ApiUrl_1.default.getCreatedACGListAPI(), "GET", null, null);
return list;
});
}
static getACGUpdatedDeltaList() {
return __awaiter(this, void 0, void 0, function* () {
const list = yield makeRequest_1.default.httpRequest(ApiUrl_1.default.getUpdatedACGListAPI(), "GET", null, null);
return list;
});
}
static getACGDeletedDeltaList() {
return __awaiter(this, void 0, void 0, function* () {
const list = yield makeRequest_1.default.httpRequest(ApiUrl_1.default.getDeletedACGListAPI(), "GET", null, null);
return list;
});
}
}
exports.default = ActiveCompositionGroups;
//# sourceMappingURL=ActiveCompositionGroups.js.map