Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then((result) => {
const codes = [];
result.data.codes.forEach((code) => {
codes.push(new Code(code.code, code.codeSystemURI, code.codeSystemVersion, code.displayName));
});
const vsOID = result.data.oid;
const vsVersion = result.data.version;
vsDB[vsOID] = {};
vsDB[vsOID][vsVersion] = new ValueSet(vsOID, vsVersion, codes);
resolve(result.data);
})
.catch(error => reject(error));