UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

41 lines (33 loc) 1.09 kB
// Generated by CoffeeScript 1.12.7 (function() { var Repository, cql; cql = require('../cql'); module.exports.Repository = Repository = (function() { function Repository(data) { var k, v; this.data = data; this.libraries = (function() { var ref, results; ref = this.data; results = []; for (k in ref) { v = ref[k]; results.push(v); } return results; }).call(this); } Repository.prototype.resolve = function(library, version) { var i, len, lib, ref, ref1, ref2, ref3, ref4; ref = this.libraries; for (i = 0, len = ref.length; i < len; i++) { lib = ref[i]; if (((ref1 = lib.library) != null ? (ref2 = ref1.identifier) != null ? ref2.id : void 0 : void 0) === library && ((ref3 = lib.library) != null ? (ref4 = ref3.identifier) != null ? ref4.version : void 0 : void 0) === version) { return new cql.Library(lib, this); } } }; return Repository; })(); }).call(this); //# sourceMappingURL=repository.js.map