Skip to content

Commit f48beb2

Browse files
committed
Update exports and fix unnecessary constructor line
1 parent 54732f3 commit f48beb2

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

examples/browser/cql4browsers.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
246246
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
247247
};
248248
Object.defineProperty(exports, "__esModule", { value: true });
249-
exports.CQLValueSet = exports.Ratio = exports.Quantity = exports.Interval = exports.DateTime = exports.Date = exports.Concept = exports.CodeSystem = exports.Code = exports.CodeService = exports.PatientSource = exports.Patient = exports.NullMessageListener = exports.ConsoleMessageListener = exports.Results = exports.Executor = exports.UnfilteredContext = exports.PatientContext = exports.Context = exports.Expression = exports.Repository = exports.Library = exports.AnnotatedError = void 0;
249+
exports.ValueSet = exports.CQLValueSet = exports.Ratio = exports.Quantity = exports.Interval = exports.DateTime = exports.Date = exports.Concept = exports.CodeSystem = exports.Code = exports.CodeService = exports.PatientSource = exports.Patient = exports.NullMessageListener = exports.ConsoleMessageListener = exports.Results = exports.Executor = exports.UnfilteredContext = exports.PatientContext = exports.Context = exports.Expression = exports.Repository = exports.Library = exports.AnnotatedError = void 0;
250250
// Library-related classes
251251
const library_1 = require("./elm/library");
252252
Object.defineProperty(exports, "Library", { enumerable: true, get: function () { return library_1.Library; } });
@@ -284,6 +284,7 @@ Object.defineProperty(exports, "Interval", { enumerable: true, get: function ()
284284
Object.defineProperty(exports, "Quantity", { enumerable: true, get: function () { return datatypes_1.Quantity; } });
285285
Object.defineProperty(exports, "Ratio", { enumerable: true, get: function () { return datatypes_1.Ratio; } });
286286
Object.defineProperty(exports, "CQLValueSet", { enumerable: true, get: function () { return datatypes_1.CQLValueSet; } });
287+
Object.defineProperty(exports, "ValueSet", { enumerable: true, get: function () { return datatypes_1.ValueSet; } });
287288
const customErrors_1 = require("./util/customErrors");
288289
Object.defineProperty(exports, "AnnotatedError", { enumerable: true, get: function () { return customErrors_1.AnnotatedError; } });
289290
// Custom Types
@@ -311,7 +312,8 @@ exports.default = {
311312
Interval: datatypes_1.Interval,
312313
Quantity: datatypes_1.Quantity,
313314
Ratio: datatypes_1.Ratio,
314-
CQLValueSet: datatypes_1.CQLValueSet
315+
CQLValueSet: datatypes_1.CQLValueSet,
316+
ValueSet: datatypes_1.ValueSet
315317
};
316318

317319
},{"./cql-code-service":2,"./cql-patient":3,"./datatypes/datatypes":6,"./elm/expression":22,"./elm/library":27,"./runtime/context":42,"./runtime/executor":43,"./runtime/messageListeners":44,"./runtime/repository":45,"./runtime/results":46,"./types":49,"./util/customErrors":53}],5:[function(require,module,exports){
@@ -389,7 +391,6 @@ class ValueSet {
389391
this.oid = oid;
390392
this.version = version;
391393
this.codes = codes;
392-
this.codes || (this.codes = []);
393394
}
394395
/**
395396
* Determines if the provided code matches any code in the current set.

src/cql.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ import {
2525
Interval,
2626
Quantity,
2727
Ratio,
28-
CQLValueSet
28+
CQLValueSet,
29+
ValueSet
2930
} from './datatypes/datatypes';
3031

3132
import { AnnotatedError } from './util/customErrors';
@@ -56,7 +57,8 @@ export {
5657
Interval,
5758
Quantity,
5859
Ratio,
59-
CQLValueSet
60+
CQLValueSet,
61+
ValueSet
6062
};
6163

6264
export default {
@@ -82,5 +84,6 @@ export default {
8284
Interval,
8385
Quantity,
8486
Ratio,
85-
CQLValueSet
87+
CQLValueSet,
88+
ValueSet
8689
};

src/datatypes/clinical.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ export class CQLValueSet extends Vocabulary {
6262
}
6363

6464
export class ValueSet {
65-
constructor(public oid: string, public version?: string, public codes: any[] = []) {
66-
this.codes ||= [];
67-
}
65+
constructor(public oid: string, public version?: string, public codes: any[] = []) {}
6866

6967
/**
7068
* Determines if the provided code matches any code in the current set.

test/cql-exports-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ libNames.push('Context', 'Executor', 'PatientContext', 'UnfilteredContext', 'Res
99
// PatientSource-related classes
1010
libNames.push('Patient', 'PatientSource');
1111
// TerminologyService-related classes
12-
libNames.push('CodeService');
12+
libNames.push('CodeService', 'ValueSet');
1313
// DataType classes
1414
libNames.push(
1515
'Code',

test/elm/comparison/comparison-test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import should from 'should';
22
import setup from '../../setup';
3+
import sinon from 'sinon';
34
const data = require('./data');
45
const vsets = require('./valuesets');
56

0 commit comments

Comments
 (0)