Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Implies Operator and update to cql2elm 3.12.0 #320

Merged
merged 12 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified CQL_Execution_Features.xlsx
Binary file not shown.
23 changes: 22 additions & 1 deletion examples/browser/cql4browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,17 @@ class ThreeValuedLogic {
return null;
}
}
static implies(left, right) {
if (left === true) {
return right;
}
else if (left === false) {
return true;
}
else {
return right === true ? true : null;
}
}
}
exports.ThreeValuedLogic = ThreeValuedLogic;

Expand Down Expand Up @@ -5805,7 +5816,7 @@ exports.StringLiteral = StringLiteral;
},{"./expression":22}],30:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IsFalse = exports.IsTrue = exports.Xor = exports.Not = exports.Or = exports.And = void 0;
exports.IsFalse = exports.IsTrue = exports.Xor = exports.Not = exports.Or = exports.Implies = exports.And = void 0;
const expression_1 = require("./expression");
const datatypes_1 = require("../datatypes/datatypes");
class And extends expression_1.Expression {
Expand All @@ -5817,6 +5828,16 @@ class And extends expression_1.Expression {
}
}
exports.And = And;
class Implies extends expression_1.Expression {
constructor(json) {
super(json);
}
async exec(ctx) {
const [left, right] = await this.execArgs(ctx);
return datatypes_1.ThreeValuedLogic.implies(left, right);
}
}
exports.Implies = Implies;
class Or extends expression_1.Expression {
constructor(json) {
super(json);
Expand Down
Loading
Loading