From 7701c19015df22a09d8b5b891274e358256f8e2e Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Tue, 30 Jun 2026 12:33:40 -0400 Subject: [PATCH 1/9] Implement ProperContains/ProperIn for both List and Interval --- examples/browser/cql4browsers.js | 77 +- src/datatypes/interval.ts | 22 + src/elm/expressions.ts | 6 +- src/elm/interval.ts | 4 + src/elm/list.ts | 4 + src/elm/overloaded.ts | 48 + test/elm/interval/data.cql | 45 + test/elm/interval/data.js | 6022 +++++++++++++++++ test/elm/interval/interval-test.ts | 72 + test/elm/list/data.cql | 26 +- test/elm/list/data.js | 3594 +++++++++- test/elm/list/list-test.ts | 95 +- .../cql/CqlIntervalOperatorsTest.cql | 48 +- .../cql/CqlIntervalOperatorsTest.json | 2082 +++++- test/spec-tests/cql/CqlListOperatorsTest.cql | 231 +- test/spec-tests/skip-list.txt | 12 - test/spec-tests/xml/CqlListOperatorsTest.xml | 440 +- 17 files changed, 12435 insertions(+), 393 deletions(-) diff --git a/examples/browser/cql4browsers.js b/examples/browser/cql4browsers.js index 1227fe153..8e7bd7de6 100644 --- a/examples/browser/cql4browsers.js +++ b/examples/browser/cql4browsers.js @@ -1891,6 +1891,26 @@ class Interval { } return logic_1.ThreeValuedLogic.and(lowFn(this.low, item, precision), highFn(this.high, item, precision)); } + properContains(item, precision) { + if (item != null && item.isInterval) { + throw new Error('Argument to contains must be a point'); + } + let lowFn; + if (this.lowClosed && this.low == null) { + lowFn = () => true; + } + else { + lowFn = cmp.lessThan; + } + let highFn; + if (this.highClosed && this.high == null) { + highFn = () => true; + } + else { + highFn = cmp.greaterThan; + } + return logic_1.ThreeValuedLogic.and(lowFn(this.low, item, precision), highFn(this.high, item, precision)); + } properlyIncludes(other, precision) { if (other == null || !other.isInterval) { throw new Error('Argument to properlyIncludes must be an interval'); @@ -4800,7 +4820,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.doContains = exports.doExcept = exports.doIncludes = exports.doIntersect = exports.doProperIncludes = exports.doAfter = exports.doUnion = exports.doBefore = void 0; +exports.doProperContains = exports.doContains = exports.doExcept = exports.doIncludes = exports.doIntersect = exports.doProperIncludes = exports.doAfter = exports.doUnion = exports.doBefore = void 0; __exportStar(require("./expression"), exports); __exportStar(require("./aggregate"), exports); __exportStar(require("./arithmetic"), exports); @@ -4839,6 +4859,7 @@ Object.defineProperty(exports, "doIntersect", { enumerable: true, get: function Object.defineProperty(exports, "doIncludes", { enumerable: true, get: function () { return interval_1.doIncludes; } }); Object.defineProperty(exports, "doExcept", { enumerable: true, get: function () { return interval_1.doExcept; } }); Object.defineProperty(exports, "doContains", { enumerable: true, get: function () { return interval_1.doContains; } }); +Object.defineProperty(exports, "doProperContains", { enumerable: true, get: function () { return interval_1.doProperContains; } }); },{"./aggregate":15,"./arithmetic":16,"./clinical":18,"./comparison":19,"./conditional":20,"./datetime":21,"./declaration":22,"./expression":23,"./external":25,"./instance":26,"./interval":27,"./list":29,"./literal":30,"./logical":31,"./message":32,"./nullological":33,"./overloaded":34,"./parameters":35,"./quantity":36,"./query":37,"./ratio":38,"./reusable":39,"./string":40,"./structured":41,"./type":42}],25:[function(require,module,exports){ "use strict"; @@ -4991,6 +5012,7 @@ var __importStar = (this && this.__importStar) || (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.Collapse = exports.Expand = exports.Ends = exports.Starts = exports.End = exports.Start = exports.Size = exports.Width = exports.OverlapsBefore = exports.OverlapsAfter = exports.Overlaps = exports.MeetsBefore = exports.MeetsAfter = exports.Meets = exports.Interval = void 0; exports.doContains = doContains; +exports.doProperContains = doProperContains; exports.doIncludes = doIncludes; exports.doProperIncludes = doProperIncludes; exports.doAfter = doAfter; @@ -5050,6 +5072,9 @@ exports.Interval = Interval; function doContains(interval, item, precision) { return interval.contains(item, precision); } +function doProperContains(interval, item, precision) { + return interval.properContains(item, precision); +} // Delegated to by overloaded#Includes and overloaded#IncludedIn function doIncludes(interval, subinterval, precision) { return interval.includes(subinterval, precision); @@ -5861,6 +5886,7 @@ exports.doUnion = doUnion; exports.doExcept = doExcept; exports.doIntersect = doIntersect; exports.doContains = doContains; +exports.doProperContains = doProperContains; exports.doIncludes = doIncludes; exports.doProperIncludes = doProperIncludes; const immutable_1 = require("immutable"); @@ -5990,6 +6016,9 @@ exports.IndexOf = IndexOf; function doContains(container, item) { return container.some((element) => (0, comparison_1.equals)(element, item) || (element == null && item == null)); } +function doProperContains(container, item) { + return container.length > 1 && doContains(container, item); +} // Delegated to by overloaded#Includes and overloaded@IncludedIn function doIncludes(list, sublist) { if (list == null || sublist == null) { @@ -6427,7 +6456,7 @@ var __importStar = (this && this.__importStar) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -exports.Precision = exports.SameOrBefore = exports.SameOrAfter = exports.SameAs = exports.Before = exports.After = exports.Length = exports.ProperIncludedIn = exports.ProperIncludes = exports.IncludedIn = exports.Includes = exports.Contains = exports.In = exports.Indexer = exports.Intersect = exports.Except = exports.Union = exports.NotEqual = exports.Equivalent = exports.Equal = void 0; +exports.Precision = exports.SameOrBefore = exports.SameOrAfter = exports.SameAs = exports.Before = exports.After = exports.Length = exports.ProperContains = exports.ProperIn = exports.ProperIncludedIn = exports.ProperIncludes = exports.IncludedIn = exports.Includes = exports.Contains = exports.In = exports.Indexer = exports.Intersect = exports.Except = exports.Union = exports.NotEqual = exports.Equivalent = exports.Equal = void 0; /* eslint-disable @typescript-eslint/ban-ts-comment */ const expression_1 = require("./expression"); const logic_1 = require("../datatypes/logic"); @@ -6675,6 +6704,50 @@ class ProperIncludedIn extends expression_1.Expression { } } exports.ProperIncludedIn = ProperIncludedIn; +class ProperIn extends expression_1.Expression { + constructor(json) { + super(json); + this.precision = json.precision != null ? json.precision.toLowerCase() : undefined; + } + async exec(ctx) { + const [item, container] = await this.execArgs(ctx); + if (container == null) { + return false; + } + if ((0, util_1.typeIsArray)(container)) { + return LIST.doProperContains(container, item); + } + else { + if (item == null) { + return null; + } + return IVL.doProperContains(container, item, this.precision); + } + } +} +exports.ProperIn = ProperIn; +class ProperContains extends expression_1.Expression { + constructor(json) { + super(json); + this.precision = json.precision != null ? json.precision.toLowerCase() : undefined; + } + async exec(ctx) { + const [container, item] = await this.execArgs(ctx); + if (container == null) { + return false; + } + if ((0, util_1.typeIsArray)(container)) { + return LIST.doProperContains(container, item); + } + else { + if (item == null) { + return null; + } + return IVL.doProperContains(container, item, this.precision); + } + } +} +exports.ProperContains = ProperContains; class Length extends expression_1.Expression { constructor(json) { super(json); diff --git a/src/datatypes/interval.ts b/src/datatypes/interval.ts index 0c6536a11..f89b24189 100644 --- a/src/datatypes/interval.ts +++ b/src/datatypes/interval.ts @@ -114,6 +114,28 @@ export class Interval { ); } + properContains(item: any, precision?: any) { + if (item != null && item.isInterval) { + throw new Error('Argument to contains must be a point'); + } + let lowFn; + if (this.lowClosed && this.low == null) { + lowFn = () => true; + } else { + lowFn = cmp.lessThan; + } + let highFn; + if (this.highClosed && this.high == null) { + highFn = () => true; + } else { + highFn = cmp.greaterThan; + } + return ThreeValuedLogic.and( + lowFn(this.low, item, precision), + highFn(this.high, item, precision) + ); + } + properlyIncludes(other: any, precision?: any) { if (other == null || !other.isInterval) { throw new Error('Argument to properlyIncludes must be an interval'); diff --git a/src/elm/expressions.ts b/src/elm/expressions.ts index c43981727..99390bebb 100644 --- a/src/elm/expressions.ts +++ b/src/elm/expressions.ts @@ -36,7 +36,8 @@ import { doIntersect, doIncludes, doExcept, - doContains + doContains, + doProperContains } from './interval'; export { @@ -47,5 +48,6 @@ export { doIntersect, doIncludes, doExcept, - doContains + doContains, + doProperContains }; diff --git a/src/elm/interval.ts b/src/elm/interval.ts index 713493049..0d683c1a2 100644 --- a/src/elm/interval.ts +++ b/src/elm/interval.ts @@ -67,6 +67,10 @@ export function doContains(interval: any, item: any, precision?: any) { return interval.contains(item, precision); } +export function doProperContains(interval: any, item: any, precision?: any) { + return interval.properContains(item, precision); +} + // Delegated to by overloaded#Includes and overloaded#IncludedIn export function doIncludes(interval: any, subinterval: any, precision?: any) { return interval.includes(subinterval, precision); diff --git a/src/elm/list.ts b/src/elm/list.ts index d8154a8bf..8db510fbe 100644 --- a/src/elm/list.ts +++ b/src/elm/list.ts @@ -141,6 +141,10 @@ export function doContains(container: any[], item: any) { ); } +export function doProperContains(container: any[], item: any) { + return container.length > 1 && doContains(container, item); +} + // Delegated to by overloaded#Includes and overloaded@IncludedIn export function doIncludes(list: any, sublist: any) { if (list == null || sublist == null) { diff --git a/src/elm/overloaded.ts b/src/elm/overloaded.ts index 319f4cd9c..319a73b25 100644 --- a/src/elm/overloaded.ts +++ b/src/elm/overloaded.ts @@ -269,6 +269,54 @@ export class ProperIncludedIn extends Expression { } } +export class ProperIn extends Expression { + precision?: any; + + constructor(json: any) { + super(json); + this.precision = json.precision != null ? json.precision.toLowerCase() : undefined; + } + + async exec(ctx: Context) { + const [item, container] = await this.execArgs(ctx); + if (container == null) { + return false; + } + if (typeIsArray(container)) { + return LIST.doProperContains(container, item); + } else { + if (item == null) { + return null; + } + return IVL.doProperContains(container, item, this.precision); + } + } +} + +export class ProperContains extends Expression { + precision?: any; + + constructor(json: any) { + super(json); + this.precision = json.precision != null ? json.precision.toLowerCase() : undefined; + } + + async exec(ctx: Context) { + const [container, item] = await this.execArgs(ctx); + if (container == null) { + return false; + } + if (typeIsArray(container)) { + return LIST.doProperContains(container, item); + } else { + if (item == null) { + return null; + } + return IVL.doProperContains(container, item, this.precision); + } + } +} + export class Length extends Expression { constructor(json: any) { super(json); diff --git a/test/elm/interval/data.cql b/test/elm/interval/data.cql index 9dcb441ba..f93cce9a6 100644 --- a/test/elm/interval/data.cql +++ b/test/elm/interval/data.cql @@ -387,6 +387,51 @@ define MayProperlyIncludeDayOfIvlVeryImpreciseHigh: Interval[DateTime(2012, 6), define MayProperlyIncludeDayOfIvlVeryImpreciseLowAndHigh: Interval[DateTime(2012, 3), DateTime(2012, 9)] properly included in day of PrecisionDateIvl define MayProperlyIncludeDayOfIvlVeryImpreciseSurrounding: Interval[DateTime(2012), DateTime(2012)] properly included in day of PrecisionDateIvl +// @Test: ProperContains +define ProperContainsInt: Interval[1, 5] properly includes 3 +define NotProperContainsInt: Interval[1, 5] properly includes 7 +define NotProperContainsIntLowEdge: Interval[1, 5] properly includes 1 +define NotProperContainsIntHighEdge: Interval[1, 5] properly includes 5 +define ProperContainsReal: Interval[1.234, 3.456] properly includes 2.345 +define NotProperContainsReal: Interval[1.234, 3.456] properly includes 4.567 +define ProperContainsQuantity: Interval[1 'mg', 5 'mg'] properly includes 3 'mg' +define NotProperContainsQuantityEdge: Interval[1 'mg', 5 'mg'] properly includes 5 'mg' +define DateIvlHighOpen: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)) +define DateIvlHighClosed: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)] +define ProperContainsDate: DateIvlHighOpen properly includes DateTime(2012, 6, 1, 0, 0, 0, 0) +define NotProperContainsDateHighEdgeOpen: DateIvlHighOpen properly includes DateTime(2012, 9, 1, 0, 0, 0, 0) +define NotProperContainsDateHighEdgeClosed: DateIvlHighClosed properly includes DateTime(2012, 9, 1, 0, 0, 0, 0) +define ProperContainsTime: Interval[@T12:00:00.000, @T21:59:59.999] properly includes @T12:00:00.001 +define NotProperContainsTimeLowEdge: Interval[@T12:00:00.000, @T21:59:59.999] properly includes @T12:00:00.000 +define MayProperContainsTime: Interval[@T12:00:00.001, @T21:59:59.999] properly includes @T12:00:00 +define ProperContainsSecondOfTime: Interval[@T12:00:00.000, @T21:59:59.999] properly includes second of @T12:00:01 +define NotProperContainsSecondOfTime: Interval[@T12:00:00.001, @T21:59:59.999] properly includes second of @T12:00:00 +define MayProperContainsMillisecondOfTime: Interval[@T12:00:00.001, @T21:59:59.999] properly includes millisecond of @T12:00:00 +define ProperContainsNull: Interval[1, 5] properly includes null + + +// @Test: ProperIn +define ProperInInt: 3 properly included in Interval[1, 5] +define NotProperInInt: 7 properly included in Interval[1, 5] +define NotProperInIntLowEdge: 1 properly included in Interval[1, 5] +define NotProperInIntHighEdge: 5 properly included in Interval[1, 5] +define ProperInReal: 2.345 properly included in Interval[1.234, 3.456] +define NotProperInReal: 4.567 properly included in Interval[1.234, 3.456] +define ProperInQuantity: 3 'mg' properly included in Interval[1 'mg', 5 'mg'] +define NotProperInQuantityEdge: 5 'mg' properly included in Interval[1 'mg', 5 'mg'] +define DateIvlHighOpen: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)) +define DateIvlHighClosed: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)] +define ProperInDate: DateTime(2012, 6, 1, 0, 0, 0, 0) properly included in DateIvlHighOpen +define NotProperInDateHighEdgeOpen: DateTime(2012, 9, 1, 0, 0, 0, 0) properly included in DateIvlHighOpen +define NotProperInDateHighEdgeClosed: DateTime(2012, 9, 1, 0, 0, 0, 0) properly included in DateIvlHighClosed +define ProperInTime: @T12:00:00.001 properly included in Interval[@T12:00:00.000, @T21:59:59.999] +define NotProperInTimeLowEdge: @T12:00:00.000 properly included in Interval[@T12:00:00.000, @T21:59:59.999] +define MayProperInTime: @T12:00:00 properly included in Interval[@T12:00:00.001, @T21:59:59.999] +define ProperInSecondOfTime: @T12:00:01 properly included in second of Interval[@T12:00:00.000, @T21:59:59.999] +define NotProperInSecondOfTime: @T12:00:00 properly included in second of Interval[@T12:00:00.001, @T21:59:59.999] +define MayProperInMillisecondOfTime: @T12:00:00 properly included in millisecond of Interval[@T12:00:00.001, @T21:59:59.999] +define ProperInNull: null properly included in Interval[1, 5] + // @Test: After define AfterIntIvl: Interval[5, 10] after Interval[2, 4] define NotAfterIntIvl: Interval[5, 10] after Interval[2, 5] diff --git a/test/elm/interval/data.js b/test/elm/interval/data.js index 1c0ba826d..c1949a706 100644 --- a/test/elm/interval/data.js +++ b/test/elm/interval/data.js @@ -70172,6 +70172,6028 @@ module.exports['ProperlyIncludedIn'] = { } } +/* ProperContains +library TestSnippet version '1' +using Simple version '1.0.0' +context Patient +define ProperContainsInt: Interval[1, 5] properly includes 3 +define NotProperContainsInt: Interval[1, 5] properly includes 7 +define NotProperContainsIntLowEdge: Interval[1, 5] properly includes 1 +define NotProperContainsIntHighEdge: Interval[1, 5] properly includes 5 +define ProperContainsReal: Interval[1.234, 3.456] properly includes 2.345 +define NotProperContainsReal: Interval[1.234, 3.456] properly includes 4.567 +define ProperContainsQuantity: Interval[1 'mg', 5 'mg'] properly includes 3 'mg' +define NotProperContainsQuantityEdge: Interval[1 'mg', 5 'mg'] properly includes 5 'mg' +define DateIvlHighOpen: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)) +define DateIvlHighClosed: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)] +define ProperContainsDate: DateIvlHighOpen properly includes DateTime(2012, 6, 1, 0, 0, 0, 0) +define NotProperContainsDateHighEdgeOpen: DateIvlHighOpen properly includes DateTime(2012, 9, 1, 0, 0, 0, 0) +define NotProperContainsDateHighEdgeClosed: DateIvlHighClosed properly includes DateTime(2012, 9, 1, 0, 0, 0, 0) +define ProperContainsTime: Interval[@T12:00:00.000, @T21:59:59.999] properly includes @T12:00:00.001 +define NotProperContainsTimeLowEdge: Interval[@T12:00:00.000, @T21:59:59.999] properly includes @T12:00:00.000 +define MayProperContainsTime: Interval[@T12:00:00.001, @T21:59:59.999] properly includes @T12:00:00 +define ProperContainsSecondOfTime: Interval[@T12:00:00.000, @T21:59:59.999] properly includes second of @T12:00:01 +define NotProperContainsSecondOfTime: Interval[@T12:00:00.001, @T21:59:59.999] properly includes second of @T12:00:00 +define MayProperContainsMillisecondOfTime: Interval[@T12:00:00.001, @T21:59:59.999] properly includes millisecond of @T12:00:00 +define ProperContainsNull: Interval[1, 5] properly includes null +*/ + +module.exports['ProperContains'] = { + "library" : { + "localId" : "0", + "annotation" : [ { + "type" : "CqlToElmInfo", + "translatorVersion" : "4.2.0", + "translatorOptions" : "EnableDateRangeOptimization,EnableAnnotations,EnableResultTypes", + "signatureLevel" : "All" + }, { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "695", + "s" : [ { + "value" : [ "", "library TestSnippet version '1'" ] + } ] + } + } ], + "identifier" : { + "id" : "TestSnippet", + "version" : "1" + }, + "schemaIdentifier" : { + "id" : "urn:hl7-org:elm", + "version" : "r1" + }, + "usings" : { + "def" : [ { + "localId" : "1", + "localIdentifier" : "System", + "uri" : "urn:hl7-org:elm-types:r1", + "annotation" : [ ] + }, { + "localId" : "206", + "localIdentifier" : "Simple", + "uri" : "https://github.com/cqframework/cql-execution/simple", + "version" : "1.0.0", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "206", + "s" : [ { + "value" : [ "", "using " ] + }, { + "s" : [ { + "value" : [ "Simple" ] + } ] + }, { + "value" : [ " version '1.0.0'" ] + } ] + } + } ] + } ] + }, + "contexts" : { + "def" : [ { + "localId" : "211", + "name" : "Patient", + "annotation" : [ ] + } ] + }, + "statements" : { + "def" : [ { + "localId" : "209", + "name" : "Patient", + "context" : "Patient", + "annotation" : [ ], + "expression" : { + "type" : "SingletonFrom", + "localId" : "210", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Retrieve", + "localId" : "208", + "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", + "annotation" : [ ], + "include" : [ ], + "codeFilter" : [ ], + "dateFilter" : [ ], + "otherFilter" : [ ] + } + } + }, { + "localId" : "214", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperContainsInt", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "214", + "s" : [ { + "value" : [ "", "define ", "ProperContainsInt", ": " ] + }, { + "r" : "222", + "s" : [ { + "r" : "217", + "s" : [ { + "r" : "215", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + }, { + "r" : "222", + "value" : [ " ", "properly includes", " ", "3" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "222", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "223", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "224", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "225", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "217", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "218", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "219", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "215", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "216", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "220", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + } ] + } + }, { + "localId" : "228", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsInt", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "228", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsInt", ": " ] + }, { + "r" : "236", + "s" : [ { + "r" : "231", + "s" : [ { + "r" : "229", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + }, { + "r" : "236", + "value" : [ " ", "properly includes", " ", "7" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "236", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "237", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "238", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "239", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "231", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "232", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "233", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "229", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "230", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "234", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "7", + "annotation" : [ ] + } ] + } + }, { + "localId" : "242", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsIntLowEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "242", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsIntLowEdge", ": " ] + }, { + "r" : "250", + "s" : [ { + "r" : "245", + "s" : [ { + "r" : "243", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + }, { + "r" : "250", + "value" : [ " ", "properly includes", " ", "1" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "250", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "251", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "252", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "253", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "245", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "246", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "247", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "243", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "244", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "248", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } ] + } + }, { + "localId" : "256", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsIntHighEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "256", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsIntHighEdge", ": " ] + }, { + "r" : "264", + "s" : [ { + "r" : "259", + "s" : [ { + "r" : "257", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + }, { + "r" : "264", + "value" : [ " ", "properly includes", " ", "5" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "264", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "265", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "266", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "267", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "259", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "260", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "261", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "257", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "258", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "262", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } ] + } + }, { + "localId" : "270", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperContainsReal", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "270", + "s" : [ { + "value" : [ "", "define ", "ProperContainsReal", ": " ] + }, { + "r" : "278", + "s" : [ { + "r" : "273", + "s" : [ { + "r" : "271", + "value" : [ "Interval[", "1.234", ", ", "3.456", "]" ] + } ] + }, { + "r" : "278", + "value" : [ " ", "properly includes", " ", "2.345" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "278", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "279", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "280", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "281", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "273", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "274", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "275", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "271", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "1.234", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "272", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "3.456", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "276", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "2.345", + "annotation" : [ ] + } ] + } + }, { + "localId" : "284", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsReal", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "284", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsReal", ": " ] + }, { + "r" : "292", + "s" : [ { + "r" : "287", + "s" : [ { + "r" : "285", + "value" : [ "Interval[", "1.234", ", ", "3.456", "]" ] + } ] + }, { + "r" : "292", + "value" : [ " ", "properly includes", " ", "4.567" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "292", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "293", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "294", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "295", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "287", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "288", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "289", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "285", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "1.234", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "286", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "3.456", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "290", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "4.567", + "annotation" : [ ] + } ] + } + }, { + "localId" : "298", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperContainsQuantity", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "298", + "s" : [ { + "value" : [ "", "define ", "ProperContainsQuantity", ": " ] + }, { + "r" : "306", + "s" : [ { + "r" : "301", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "299", + "s" : [ { + "value" : [ "1 ", "'mg'" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "300", + "s" : [ { + "value" : [ "5 ", "'mg'" ] + } ] + }, { + "value" : [ "]" ] + } ] + }, { + "r" : "306", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "304", + "s" : [ { + "value" : [ "3 ", "'mg'" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "306", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "307", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "308", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "309", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "301", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "302", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "303", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Quantity", + "localId" : "299", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 1, + "unit" : "mg", + "annotation" : [ ] + }, + "high" : { + "type" : "Quantity", + "localId" : "300", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 5, + "unit" : "mg", + "annotation" : [ ] + } + }, { + "type" : "Quantity", + "localId" : "304", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 3, + "unit" : "mg", + "annotation" : [ ] + } ] + } + }, { + "localId" : "312", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsQuantityEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "312", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsQuantityEdge", ": " ] + }, { + "r" : "320", + "s" : [ { + "r" : "315", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "313", + "s" : [ { + "value" : [ "1 ", "'mg'" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "314", + "s" : [ { + "value" : [ "5 ", "'mg'" ] + } ] + }, { + "value" : [ "]" ] + } ] + }, { + "r" : "320", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "318", + "s" : [ { + "value" : [ "5 ", "'mg'" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "320", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "321", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "322", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "323", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "315", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "316", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "317", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Quantity", + "localId" : "313", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 1, + "unit" : "mg", + "annotation" : [ ] + }, + "high" : { + "type" : "Quantity", + "localId" : "314", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 5, + "unit" : "mg", + "annotation" : [ ] + } + }, { + "type" : "Quantity", + "localId" : "318", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 5, + "unit" : "mg", + "annotation" : [ ] + } ] + } + }, { + "localId" : "326", + "name" : "DateIvlHighOpen", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "326", + "s" : [ { + "value" : [ "", "define ", "DateIvlHighOpen", ": " ] + }, { + "r" : "375", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "343", + "s" : [ { + "r" : "327", + "value" : [ "DateTime", "(", "2012", ", ", "3", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "367", + "s" : [ { + "r" : "351", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ ")" ] + } ] + } ] + } + } ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "378", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "379", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "expression" : { + "type" : "Interval", + "localId" : "375", + "lowClosed" : true, + "highClosed" : false, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "376", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "377", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "low" : { + "type" : "DateTime", + "localId" : "343", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "344", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "345", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "346", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "347", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "348", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "349", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "350", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "327", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "328", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "329", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "330", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "331", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "332", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "333", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "DateTime", + "localId" : "367", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "368", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "369", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "370", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "371", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "372", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "373", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "374", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "351", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "352", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "353", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "354", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "355", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "356", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "357", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } + } + }, { + "localId" : "382", + "name" : "DateIvlHighClosed", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "382", + "s" : [ { + "value" : [ "", "define ", "DateIvlHighClosed", ": " ] + }, { + "r" : "431", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "399", + "s" : [ { + "r" : "383", + "value" : [ "DateTime", "(", "2012", ", ", "3", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "423", + "s" : [ { + "r" : "407", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ "]" ] + } ] + } ] + } + } ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "434", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "435", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "expression" : { + "type" : "Interval", + "localId" : "431", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "432", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "433", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "low" : { + "type" : "DateTime", + "localId" : "399", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "400", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "401", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "402", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "403", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "404", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "405", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "406", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "383", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "384", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "385", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "386", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "387", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "388", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "389", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "DateTime", + "localId" : "423", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "424", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "425", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "426", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "427", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "428", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "429", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "430", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "407", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "408", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "409", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "410", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "411", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "412", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "413", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } + } + }, { + "localId" : "438", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperContainsDate", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "438", + "s" : [ { + "value" : [ "", "define ", "ProperContainsDate", ": " ] + }, { + "r" : "467", + "s" : [ { + "r" : "439", + "s" : [ { + "value" : [ "DateIvlHighOpen" ] + } ] + }, { + "r" : "467", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "458", + "s" : [ { + "r" : "442", + "value" : [ "DateTime", "(", "2012", ", ", "6", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "467", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "468", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "469", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "470", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "ExpressionRef", + "localId" : "439", + "name" : "DateIvlHighOpen", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "440", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "441", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } + }, { + "type" : "DateTime", + "localId" : "458", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "459", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "460", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "461", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "462", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "463", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "464", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "465", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "442", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "443", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "6", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "444", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "445", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "446", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "447", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "448", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "473", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsDateHighEdgeOpen", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "473", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsDateHighEdgeOpen", ": " ] + }, { + "r" : "502", + "s" : [ { + "r" : "474", + "s" : [ { + "value" : [ "DateIvlHighOpen" ] + } ] + }, { + "r" : "502", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "493", + "s" : [ { + "r" : "477", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "502", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "503", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "504", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "505", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "ExpressionRef", + "localId" : "474", + "name" : "DateIvlHighOpen", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "475", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "476", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } + }, { + "type" : "DateTime", + "localId" : "493", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "494", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "495", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "496", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "497", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "498", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "499", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "500", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "477", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "478", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "479", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "480", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "481", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "482", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "483", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "508", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsDateHighEdgeClosed", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "508", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsDateHighEdgeClosed", ": " ] + }, { + "r" : "537", + "s" : [ { + "r" : "509", + "s" : [ { + "value" : [ "DateIvlHighClosed" ] + } ] + }, { + "r" : "537", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "528", + "s" : [ { + "r" : "512", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "537", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "538", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "539", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "540", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "ExpressionRef", + "localId" : "509", + "name" : "DateIvlHighClosed", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "510", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "511", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } + }, { + "type" : "DateTime", + "localId" : "528", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "529", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "530", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "531", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "532", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "533", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "534", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "535", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "512", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "513", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "514", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "515", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "516", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "517", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "518", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "543", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperContainsTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "543", + "s" : [ { + "value" : [ "", "define ", "ProperContainsTime", ": " ] + }, { + "r" : "563", + "s" : [ { + "r" : "554", + "s" : [ { + "r" : "544", + "value" : [ "Interval[", "@T12:00:00.000", ", ", "@T21:59:59.999", "]" ] + } ] + }, { + "r" : "563", + "value" : [ " ", "properly includes", " ", "@T12:00:00.001" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "563", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "564", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "565", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "566", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "554", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "555", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "556", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "544", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "545", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "546", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "547", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "548", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "549", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "550", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "551", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "552", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "553", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + }, { + "type" : "Time", + "localId" : "557", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "558", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "559", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "560", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "561", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "569", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsTimeLowEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "569", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsTimeLowEdge", ": " ] + }, { + "r" : "589", + "s" : [ { + "r" : "580", + "s" : [ { + "r" : "570", + "value" : [ "Interval[", "@T12:00:00.000", ", ", "@T21:59:59.999", "]" ] + } ] + }, { + "r" : "589", + "value" : [ " ", "properly includes", " ", "@T12:00:00.000" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "589", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "590", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "591", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "592", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "580", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "581", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "582", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "570", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "571", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "572", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "573", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "574", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "575", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "576", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "577", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "578", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "579", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + }, { + "type" : "Time", + "localId" : "583", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "584", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "585", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "586", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "587", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "595", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "MayProperContainsTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "595", + "s" : [ { + "value" : [ "", "define ", "MayProperContainsTime", ": " ] + }, { + "r" : "614", + "s" : [ { + "r" : "606", + "s" : [ { + "r" : "596", + "value" : [ "Interval[", "@T12:00:00.001", ", ", "@T21:59:59.999", "]" ] + } ] + }, { + "r" : "614", + "value" : [ " ", "properly includes", " ", "@T12:00:00" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "614", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "615", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "616", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "617", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "606", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "607", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "608", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "596", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "597", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "598", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "599", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "600", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "601", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "602", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "603", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "604", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "605", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + }, { + "type" : "Time", + "localId" : "609", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "610", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "611", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "612", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "620", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperContainsSecondOfTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "620", + "s" : [ { + "value" : [ "", "define ", "ProperContainsSecondOfTime", ": " ] + }, { + "r" : "639", + "s" : [ { + "r" : "631", + "s" : [ { + "r" : "621", + "value" : [ "Interval[", "@T12:00:00.000", ", ", "@T21:59:59.999", "]" ] + } ] + }, { + "r" : "639", + "value" : [ " ", "properly includes second of", " ", "@T12:00:01" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "639", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "precision" : "Second", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "640", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "641", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "642", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "631", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "632", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "633", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "621", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "622", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "623", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "624", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "625", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "626", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "627", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "628", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "629", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "630", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + }, { + "type" : "Time", + "localId" : "634", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "635", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "636", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "637", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "645", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperContainsSecondOfTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "645", + "s" : [ { + "value" : [ "", "define ", "NotProperContainsSecondOfTime", ": " ] + }, { + "r" : "664", + "s" : [ { + "r" : "656", + "s" : [ { + "r" : "646", + "value" : [ "Interval[", "@T12:00:00.001", ", ", "@T21:59:59.999", "]" ] + } ] + }, { + "r" : "664", + "value" : [ " ", "properly includes second of", " ", "@T12:00:00" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "664", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "precision" : "Second", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "665", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "666", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "667", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "656", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "657", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "658", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "646", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "647", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "648", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "649", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "650", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "651", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "652", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "653", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "654", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "655", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + }, { + "type" : "Time", + "localId" : "659", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "660", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "661", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "662", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "670", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "MayProperContainsMillisecondOfTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "670", + "s" : [ { + "value" : [ "", "define ", "MayProperContainsMillisecondOfTime", ": " ] + }, { + "r" : "689", + "s" : [ { + "r" : "681", + "s" : [ { + "r" : "671", + "value" : [ "Interval[", "@T12:00:00.001", ", ", "@T21:59:59.999", "]" ] + } ] + }, { + "r" : "689", + "value" : [ " ", "properly includes millisecond of", " ", "@T12:00:00" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "689", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "precision" : "Millisecond", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "690", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "691", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "692", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "681", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "682", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "683", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "671", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "672", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "673", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "674", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "675", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "676", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "677", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "678", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "679", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "680", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + }, { + "type" : "Time", + "localId" : "684", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "685", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "686", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "687", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "695", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperContainsNull", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "695", + "s" : [ { + "value" : [ "", "define ", "ProperContainsNull", ": " ] + }, { + "r" : "710", + "s" : [ { + "r" : "698", + "s" : [ { + "r" : "696", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + }, { + "r" : "710", + "value" : [ " ", "properly includes", " ", "null" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "710", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "IntervalTypeSpecifier", + "localId" : "712", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "713", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "714", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "Interval", + "localId" : "698", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "699", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "700", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "696", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "697", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + }, { + "type" : "As", + "localId" : "711", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "701", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + } ] + } + } ] + } + } +} + +/* ProperIn +library TestSnippet version '1' +using Simple version '1.0.0' +context Patient +define ProperInInt: 3 properly included in Interval[1, 5] +define NotProperInInt: 7 properly included in Interval[1, 5] +define NotProperInIntLowEdge: 1 properly included in Interval[1, 5] +define NotProperInIntHighEdge: 5 properly included in Interval[1, 5] +define ProperInReal: 2.345 properly included in Interval[1.234, 3.456] +define NotProperInReal: 4.567 properly included in Interval[1.234, 3.456] +define ProperInQuantity: 3 'mg' properly included in Interval[1 'mg', 5 'mg'] +define NotProperInQuantityEdge: 5 'mg' properly included in Interval[1 'mg', 5 'mg'] +define DateIvlHighOpen: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)) +define DateIvlHighClosed: Interval[DateTime(2012, 3, 1, 0, 0, 0, 0), DateTime(2012, 9, 1, 0, 0, 0, 0)] +define ProperInDate: DateTime(2012, 6, 1, 0, 0, 0, 0) properly included in DateIvlHighOpen +define NotProperInDateHighEdgeOpen: DateTime(2012, 9, 1, 0, 0, 0, 0) properly included in DateIvlHighOpen +define NotProperInDateHighEdgeClosed: DateTime(2012, 9, 1, 0, 0, 0, 0) properly included in DateIvlHighClosed +define ProperInTime: @T12:00:00.001 properly included in Interval[@T12:00:00.000, @T21:59:59.999] +define NotProperInTimeLowEdge: @T12:00:00.000 properly included in Interval[@T12:00:00.000, @T21:59:59.999] +define MayProperInTime: @T12:00:00 properly included in Interval[@T12:00:00.001, @T21:59:59.999] +define ProperInSecondOfTime: @T12:00:01 properly included in second of Interval[@T12:00:00.000, @T21:59:59.999] +define NotProperInSecondOfTime: @T12:00:00 properly included in second of Interval[@T12:00:00.001, @T21:59:59.999] +define MayProperInMillisecondOfTime: @T12:00:00 properly included in millisecond of Interval[@T12:00:00.001, @T21:59:59.999] +define ProperInNull: null properly included in Interval[1, 5] +*/ + +module.exports['ProperIn'] = { + "library" : { + "localId" : "0", + "annotation" : [ { + "type" : "CqlToElmInfo", + "translatorVersion" : "4.2.0", + "translatorOptions" : "EnableDateRangeOptimization,EnableAnnotations,EnableResultTypes", + "signatureLevel" : "All" + }, { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "695", + "s" : [ { + "value" : [ "", "library TestSnippet version '1'" ] + } ] + } + } ], + "identifier" : { + "id" : "TestSnippet", + "version" : "1" + }, + "schemaIdentifier" : { + "id" : "urn:hl7-org:elm", + "version" : "r1" + }, + "usings" : { + "def" : [ { + "localId" : "1", + "localIdentifier" : "System", + "uri" : "urn:hl7-org:elm-types:r1", + "annotation" : [ ] + }, { + "localId" : "206", + "localIdentifier" : "Simple", + "uri" : "https://github.com/cqframework/cql-execution/simple", + "version" : "1.0.0", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "206", + "s" : [ { + "value" : [ "", "using " ] + }, { + "s" : [ { + "value" : [ "Simple" ] + } ] + }, { + "value" : [ " version '1.0.0'" ] + } ] + } + } ] + } ] + }, + "contexts" : { + "def" : [ { + "localId" : "211", + "name" : "Patient", + "annotation" : [ ] + } ] + }, + "statements" : { + "def" : [ { + "localId" : "209", + "name" : "Patient", + "context" : "Patient", + "annotation" : [ ], + "expression" : { + "type" : "SingletonFrom", + "localId" : "210", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Retrieve", + "localId" : "208", + "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", + "annotation" : [ ], + "include" : [ ], + "codeFilter" : [ ], + "dateFilter" : [ ], + "otherFilter" : [ ] + } + } + }, { + "localId" : "214", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperInInt", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "214", + "s" : [ { + "value" : [ "", "define ", "ProperInInt", ": " ] + }, { + "r" : "222", + "s" : [ { + "r" : "215", + "value" : [ "3", " ", "properly included in", " " ] + }, { + "r" : "218", + "s" : [ { + "r" : "216", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "222", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "223", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "224", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "225", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "215", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "218", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "219", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "220", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "216", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "217", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "228", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInInt", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "228", + "s" : [ { + "value" : [ "", "define ", "NotProperInInt", ": " ] + }, { + "r" : "236", + "s" : [ { + "r" : "229", + "value" : [ "7", " ", "properly included in", " " ] + }, { + "r" : "232", + "s" : [ { + "r" : "230", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "236", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "237", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "238", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "239", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "229", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "7", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "232", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "233", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "234", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "230", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "231", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "242", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInIntLowEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "242", + "s" : [ { + "value" : [ "", "define ", "NotProperInIntLowEdge", ": " ] + }, { + "r" : "250", + "s" : [ { + "r" : "243", + "value" : [ "1", " ", "properly included in", " " ] + }, { + "r" : "246", + "s" : [ { + "r" : "244", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "250", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "251", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "252", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "253", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "243", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "246", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "247", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "248", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "244", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "245", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "256", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInIntHighEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "256", + "s" : [ { + "value" : [ "", "define ", "NotProperInIntHighEdge", ": " ] + }, { + "r" : "264", + "s" : [ { + "r" : "257", + "value" : [ "5", " ", "properly included in", " " ] + }, { + "r" : "260", + "s" : [ { + "r" : "258", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "264", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "265", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "266", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "267", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "257", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "260", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "261", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "262", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "258", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "259", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "270", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperInReal", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "270", + "s" : [ { + "value" : [ "", "define ", "ProperInReal", ": " ] + }, { + "r" : "278", + "s" : [ { + "r" : "271", + "value" : [ "2.345", " ", "properly included in", " " ] + }, { + "r" : "274", + "s" : [ { + "r" : "272", + "value" : [ "Interval[", "1.234", ", ", "3.456", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "278", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "279", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "280", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "281", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "271", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "2.345", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "274", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "275", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "276", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "272", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "1.234", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "273", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "3.456", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "284", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInReal", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "284", + "s" : [ { + "value" : [ "", "define ", "NotProperInReal", ": " ] + }, { + "r" : "292", + "s" : [ { + "r" : "285", + "value" : [ "4.567", " ", "properly included in", " " ] + }, { + "r" : "288", + "s" : [ { + "r" : "286", + "value" : [ "Interval[", "1.234", ", ", "3.456", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "292", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "293", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "294", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "295", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "285", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "4.567", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "288", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "289", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "290", + "name" : "{urn:hl7-org:elm-types:r1}Decimal", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "286", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "1.234", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "287", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal", + "valueType" : "{urn:hl7-org:elm-types:r1}Decimal", + "value" : "3.456", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "298", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperInQuantity", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "298", + "s" : [ { + "value" : [ "", "define ", "ProperInQuantity", ": " ] + }, { + "r" : "306", + "s" : [ { + "r" : "299", + "s" : [ { + "value" : [ "3 ", "'mg'" ] + } ] + }, { + "r" : "306", + "value" : [ " ", "properly included in", " " ] + }, { + "r" : "302", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "300", + "s" : [ { + "value" : [ "1 ", "'mg'" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "301", + "s" : [ { + "value" : [ "5 ", "'mg'" ] + } ] + }, { + "value" : [ "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "306", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "307", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "308", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "309", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Quantity", + "localId" : "299", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 3, + "unit" : "mg", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "302", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "303", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "304", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Quantity", + "localId" : "300", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 1, + "unit" : "mg", + "annotation" : [ ] + }, + "high" : { + "type" : "Quantity", + "localId" : "301", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 5, + "unit" : "mg", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "312", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInQuantityEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "312", + "s" : [ { + "value" : [ "", "define ", "NotProperInQuantityEdge", ": " ] + }, { + "r" : "320", + "s" : [ { + "r" : "313", + "s" : [ { + "value" : [ "5 ", "'mg'" ] + } ] + }, { + "r" : "320", + "value" : [ " ", "properly included in", " " ] + }, { + "r" : "316", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "314", + "s" : [ { + "value" : [ "1 ", "'mg'" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "315", + "s" : [ { + "value" : [ "5 ", "'mg'" ] + } ] + }, { + "value" : [ "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "320", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "321", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "322", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "323", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Quantity", + "localId" : "313", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 5, + "unit" : "mg", + "annotation" : [ ] + }, { + "type" : "Interval", + "localId" : "316", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "317", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "318", + "name" : "{urn:hl7-org:elm-types:r1}Quantity", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Quantity", + "localId" : "314", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 1, + "unit" : "mg", + "annotation" : [ ] + }, + "high" : { + "type" : "Quantity", + "localId" : "315", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity", + "value" : 5, + "unit" : "mg", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "326", + "name" : "DateIvlHighOpen", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "326", + "s" : [ { + "value" : [ "", "define ", "DateIvlHighOpen", ": " ] + }, { + "r" : "375", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "343", + "s" : [ { + "r" : "327", + "value" : [ "DateTime", "(", "2012", ", ", "3", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "367", + "s" : [ { + "r" : "351", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ ")" ] + } ] + } ] + } + } ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "378", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "379", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "expression" : { + "type" : "Interval", + "localId" : "375", + "lowClosed" : true, + "highClosed" : false, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "376", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "377", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "low" : { + "type" : "DateTime", + "localId" : "343", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "344", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "345", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "346", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "347", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "348", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "349", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "350", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "327", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "328", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "329", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "330", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "331", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "332", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "333", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "DateTime", + "localId" : "367", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "368", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "369", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "370", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "371", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "372", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "373", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "374", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "351", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "352", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "353", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "354", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "355", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "356", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "357", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } + } + }, { + "localId" : "382", + "name" : "DateIvlHighClosed", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "382", + "s" : [ { + "value" : [ "", "define ", "DateIvlHighClosed", ": " ] + }, { + "r" : "431", + "s" : [ { + "value" : [ "Interval[" ] + }, { + "r" : "399", + "s" : [ { + "r" : "383", + "value" : [ "DateTime", "(", "2012", ", ", "3", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "423", + "s" : [ { + "r" : "407", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "value" : [ "]" ] + } ] + } ] + } + } ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "434", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "435", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "expression" : { + "type" : "Interval", + "localId" : "431", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "432", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "433", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + }, + "low" : { + "type" : "DateTime", + "localId" : "399", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "400", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "401", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "402", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "403", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "404", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "405", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "406", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "383", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "384", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "385", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "386", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "387", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "388", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "389", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "DateTime", + "localId" : "423", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "424", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "425", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "426", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "427", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "428", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "429", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "430", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "407", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "408", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "409", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "410", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "411", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "412", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "413", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + } + } + }, { + "localId" : "438", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperInDate", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "438", + "s" : [ { + "value" : [ "", "define ", "ProperInDate", ": " ] + }, { + "r" : "467", + "s" : [ { + "r" : "455", + "s" : [ { + "r" : "439", + "value" : [ "DateTime", "(", "2012", ", ", "6", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "r" : "467", + "value" : [ " ", "properly included in", " " ] + }, { + "r" : "463", + "s" : [ { + "value" : [ "DateIvlHighOpen" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "467", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "468", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "469", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "470", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "DateTime", + "localId" : "455", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "456", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "457", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "458", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "459", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "460", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "461", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "462", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "439", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "440", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "6", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "441", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "442", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "443", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "444", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "445", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, { + "type" : "ExpressionRef", + "localId" : "463", + "name" : "DateIvlHighOpen", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "464", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "465", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "473", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInDateHighEdgeOpen", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "473", + "s" : [ { + "value" : [ "", "define ", "NotProperInDateHighEdgeOpen", ": " ] + }, { + "r" : "502", + "s" : [ { + "r" : "490", + "s" : [ { + "r" : "474", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "r" : "502", + "value" : [ " ", "properly included in", " " ] + }, { + "r" : "498", + "s" : [ { + "value" : [ "DateIvlHighOpen" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "502", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "503", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "504", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "505", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "DateTime", + "localId" : "490", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "491", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "492", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "493", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "494", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "495", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "496", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "497", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "474", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "475", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "476", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "477", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "478", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "479", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "480", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, { + "type" : "ExpressionRef", + "localId" : "498", + "name" : "DateIvlHighOpen", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "499", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "500", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "508", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInDateHighEdgeClosed", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "508", + "s" : [ { + "value" : [ "", "define ", "NotProperInDateHighEdgeClosed", ": " ] + }, { + "r" : "537", + "s" : [ { + "r" : "525", + "s" : [ { + "r" : "509", + "value" : [ "DateTime", "(", "2012", ", ", "9", ", ", "1", ", ", "0", ", ", "0", ", ", "0", ", ", "0", ")" ] + } ] + }, { + "r" : "537", + "value" : [ " ", "properly included in", " " ] + }, { + "r" : "533", + "s" : [ { + "value" : [ "DateIvlHighClosed" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "537", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "538", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "539", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "540", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "DateTime", + "localId" : "525", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "526", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "527", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "528", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "529", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "530", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "531", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "NamedTypeSpecifier", + "localId" : "532", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "year" : { + "type" : "Literal", + "localId" : "509", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2012", + "annotation" : [ ] + }, + "month" : { + "type" : "Literal", + "localId" : "510", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "9", + "annotation" : [ ] + }, + "day" : { + "type" : "Literal", + "localId" : "511", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "hour" : { + "type" : "Literal", + "localId" : "512", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "513", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "514", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "515", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, { + "type" : "ExpressionRef", + "localId" : "533", + "name" : "DateIvlHighClosed", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "534", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "535", + "name" : "{urn:hl7-org:elm-types:r1}DateTime", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "543", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperInTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "543", + "s" : [ { + "value" : [ "", "define ", "ProperInTime", ": " ] + }, { + "r" : "563", + "s" : [ { + "r" : "544", + "value" : [ "@T12:00:00.001", " ", "properly included in", " " ] + }, { + "r" : "559", + "s" : [ { + "r" : "549", + "value" : [ "Interval[", "@T12:00:00.000", ", ", "@T21:59:59.999", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "563", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "564", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "565", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "566", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Time", + "localId" : "544", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "545", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "546", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "547", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "548", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "type" : "Interval", + "localId" : "559", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "560", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "561", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "549", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "550", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "551", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "552", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "553", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "554", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "555", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "556", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "557", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "558", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "569", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInTimeLowEdge", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "569", + "s" : [ { + "value" : [ "", "define ", "NotProperInTimeLowEdge", ": " ] + }, { + "r" : "589", + "s" : [ { + "r" : "570", + "value" : [ "@T12:00:00.000", " ", "properly included in", " " ] + }, { + "r" : "585", + "s" : [ { + "r" : "575", + "value" : [ "Interval[", "@T12:00:00.000", ", ", "@T21:59:59.999", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "589", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "590", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "591", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "592", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Time", + "localId" : "570", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "571", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "572", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "573", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "574", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, { + "type" : "Interval", + "localId" : "585", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "586", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "587", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "575", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "576", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "577", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "578", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "579", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "580", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "581", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "582", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "583", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "584", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "595", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "MayProperInTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "595", + "s" : [ { + "value" : [ "", "define ", "MayProperInTime", ": " ] + }, { + "r" : "614", + "s" : [ { + "r" : "596", + "value" : [ "@T12:00:00", " ", "properly included in", " " ] + }, { + "r" : "610", + "s" : [ { + "r" : "600", + "value" : [ "Interval[", "@T12:00:00.001", ", ", "@T21:59:59.999", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "614", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "615", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "616", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "617", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Time", + "localId" : "596", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "597", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "598", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "599", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, { + "type" : "Interval", + "localId" : "610", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "611", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "612", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "600", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "601", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "602", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "603", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "604", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "605", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "606", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "607", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "608", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "609", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "620", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperInSecondOfTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "620", + "s" : [ { + "value" : [ "", "define ", "ProperInSecondOfTime", ": " ] + }, { + "r" : "639", + "s" : [ { + "r" : "621", + "value" : [ "@T12:00:01", " ", "properly included in second of", " " ] + }, { + "r" : "635", + "s" : [ { + "r" : "625", + "value" : [ "Interval[", "@T12:00:00.000", ", ", "@T21:59:59.999", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "639", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "precision" : "Second", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "640", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "641", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "642", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Time", + "localId" : "621", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "622", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "623", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "624", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "type" : "Interval", + "localId" : "635", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "636", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "637", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "625", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "626", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "627", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "628", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "629", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "630", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "631", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "632", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "633", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "634", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "645", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NotProperInSecondOfTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "645", + "s" : [ { + "value" : [ "", "define ", "NotProperInSecondOfTime", ": " ] + }, { + "r" : "664", + "s" : [ { + "r" : "646", + "value" : [ "@T12:00:00", " ", "properly included in second of", " " ] + }, { + "r" : "660", + "s" : [ { + "r" : "650", + "value" : [ "Interval[", "@T12:00:00.001", ", ", "@T21:59:59.999", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "664", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "precision" : "Second", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "665", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "666", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "667", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Time", + "localId" : "646", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "647", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "648", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "649", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, { + "type" : "Interval", + "localId" : "660", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "661", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "662", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "650", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "651", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "652", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "653", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "654", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "655", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "656", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "657", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "658", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "659", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "670", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "MayProperInMillisecondOfTime", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "670", + "s" : [ { + "value" : [ "", "define ", "MayProperInMillisecondOfTime", ": " ] + }, { + "r" : "689", + "s" : [ { + "r" : "671", + "value" : [ "@T12:00:00", " ", "properly included in millisecond of", " " ] + }, { + "r" : "685", + "s" : [ { + "r" : "675", + "value" : [ "Interval[", "@T12:00:00.001", ", ", "@T21:59:59.999", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "689", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "precision" : "Millisecond", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "690", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "691", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "692", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Time", + "localId" : "671", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "672", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "673", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "674", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + } + }, { + "type" : "Interval", + "localId" : "685", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "686", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "687", + "name" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Time", + "localId" : "675", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "676", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "12", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "677", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "678", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "0", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "679", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, + "high" : { + "type" : "Time", + "localId" : "680", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Time", + "annotation" : [ ], + "signature" : [ ], + "hour" : { + "type" : "Literal", + "localId" : "681", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "21", + "annotation" : [ ] + }, + "minute" : { + "type" : "Literal", + "localId" : "682", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "second" : { + "type" : "Literal", + "localId" : "683", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "59", + "annotation" : [ ] + }, + "millisecond" : { + "type" : "Literal", + "localId" : "684", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "999", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "695", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "ProperInNull", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "695", + "s" : [ { + "value" : [ "", "define ", "ProperInNull", ": " ] + }, { + "r" : "710", + "s" : [ { + "r" : "696", + "value" : [ "null", " ", "properly included in", " " ] + }, { + "r" : "699", + "s" : [ { + "r" : "697", + "value" : [ "Interval[", "1", ", ", "5", "]" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "710", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "712", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "713", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "714", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "As", + "localId" : "711", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "696", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + }, { + "type" : "Interval", + "localId" : "699", + "lowClosed" : true, + "highClosed" : true, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "700", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "701", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "low" : { + "type" : "Literal", + "localId" : "697", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, + "high" : { + "type" : "Literal", + "localId" : "698", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } + } ] + } + } ] + } + } +} + /* After library TestSnippet version '1' using Simple version '1.0.0' diff --git a/test/elm/interval/interval-test.ts b/test/elm/interval/interval-test.ts index 47ee113c0..07848d9cd 100644 --- a/test/elm/interval/interval-test.ts +++ b/test/elm/interval/interval-test.ts @@ -622,6 +622,78 @@ describe('ProperlyIncludedIn', () => { }); }); +describe('ProperContains', () => { + beforeEach(function () { + setup(this, data); + }); + + it('should accept properly contained items', async function () { + (await this.properContainsInt.exec(this.ctx)).should.be.true(); + (await this.properContainsReal.exec(this.ctx)).should.be.true(); + (await this.properContainsQuantity.exec(this.ctx)).should.be.true(); + (await this.properContainsDate.exec(this.ctx)).should.be.true(); + (await this.properContainsTime.exec(this.ctx)).should.be.true(); + }); + + it('should reject items outside the interval or on an edge', async function () { + (await this.notProperContainsInt.exec(this.ctx)).should.be.false(); + (await this.notProperContainsIntLowEdge.exec(this.ctx)).should.be.false(); + (await this.notProperContainsIntHighEdge.exec(this.ctx)).should.be.false(); + (await this.notProperContainsReal.exec(this.ctx)).should.be.false(); + (await this.notProperContainsQuantityEdge.exec(this.ctx)).should.be.false(); + (await this.notProperContainsDateHighEdgeOpen.exec(this.ctx)).should.be.false(); + (await this.notProperContainsDateHighEdgeClosed.exec(this.ctx)).should.be.false(); + (await this.notProperContainsTimeLowEdge.exec(this.ctx)).should.be.false(); + }); + + it('should correctly compare using the requested precision', async function () { + (await this.properContainsSecondOfTime.exec(this.ctx)).should.be.true(); + (await this.notProperContainsSecondOfTime.exec(this.ctx)).should.be.false(); + should(await this.mayProperContainsTime.exec(this.ctx)).be.null(); + should(await this.mayProperContainsMillisecondOfTime.exec(this.ctx)).be.null(); + }); + + it('should return null for a null item', async function () { + should(await this.properContainsNull.exec(this.ctx)).be.null(); + }); +}); + +describe('ProperIn', () => { + beforeEach(function () { + setup(this, data); + }); + + it('should accept properly contained items', async function () { + (await this.properInInt.exec(this.ctx)).should.be.true(); + (await this.properInReal.exec(this.ctx)).should.be.true(); + (await this.properInQuantity.exec(this.ctx)).should.be.true(); + (await this.properInDate.exec(this.ctx)).should.be.true(); + (await this.properInTime.exec(this.ctx)).should.be.true(); + }); + + it('should reject items outside the interval or on an edge', async function () { + (await this.notProperInInt.exec(this.ctx)).should.be.false(); + (await this.notProperInIntLowEdge.exec(this.ctx)).should.be.false(); + (await this.notProperInIntHighEdge.exec(this.ctx)).should.be.false(); + (await this.notProperInReal.exec(this.ctx)).should.be.false(); + (await this.notProperInQuantityEdge.exec(this.ctx)).should.be.false(); + (await this.notProperInDateHighEdgeOpen.exec(this.ctx)).should.be.false(); + (await this.notProperInDateHighEdgeClosed.exec(this.ctx)).should.be.false(); + (await this.notProperInTimeLowEdge.exec(this.ctx)).should.be.false(); + }); + + it('should correctly compare using the requested precision', async function () { + (await this.properInSecondOfTime.exec(this.ctx)).should.be.true(); + (await this.notProperInSecondOfTime.exec(this.ctx)).should.be.false(); + should(await this.mayProperInTime.exec(this.ctx)).be.null(); + should(await this.mayProperInMillisecondOfTime.exec(this.ctx)).be.null(); + }); + + it('should return null for a null item', async function () { + should(await this.properInNull.exec(this.ctx)).be.null(); + }); +}); + describe('After', () => { beforeEach(function () { setup(this, data); diff --git a/test/elm/list/data.cql b/test/elm/list/data.cql index d05729618..cce588569 100644 --- a/test/elm/list/data.cql +++ b/test/elm/list/data.cql @@ -177,7 +177,7 @@ define IsSameLong: {1L, 2L, 3L, 4L, 5L} properly includes {1L, 2L, 3L, 4L, 5L} define IsNotIncludedLong: {1L, 2L, 3L, 4L, 5L} properly includes {4L, 5L, 6L} define TuplesIncluded: {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} properly includes {Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} define TuplesNotIncluded: {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} properly includes {Tuple{a:2, b:'d'}, Tuple{a:3, b:'c'}} -define NullIncluded: {1, 2, 3, 4, 5} properly includes null +define NullIncluded: {1, 2, 3, 4, 5} properly includes (null as List) define NullIncludes: null properly includes {1, 2, 3, 4, 5} // @Test: ProperIncludedIn @@ -194,6 +194,30 @@ define TuplesNotIncluded: {Tuple{a:2, b:'d'}, Tuple{a:3, b:'c'}} properly includ define NullIncludes: {1, 2, 3, 4, 5} properly included in null as List define NullIncluded: (null as List) properly included in {1, 2, 3, 4, 5} +// @Test: ProperIn +define IsIn: 4 properly included in { 3, 4, 5 } +define IsNotIn: 4 properly included in { 3, 5, 6 } +define IsNotProperlyIn: 4 properly included in { 4 } +define IsInNotUnique: 4 properly included in { 4, 4 } +define IsInWithNull: 4 properly included in { 4, null } +define TupleIsIn: Tuple{a: 1, b: 'c'} properly included in {Tuple{a:1, b:'d'}, Tuple{a:1, b:'c'}, Tuple{a:2, b:'c'}} +define TupleIsNotIn: Tuple{a: 1, b: 'c'} properly included in {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} +define NullIn: null properly included in {1, 2, null, 3} +define InNull: 1 properly included in null +define NullNotIn: null properly included in {1, 2, 3} + +// @Test: ProperContains +define IsIn: { 3, 4, 5 } properly includes 4 +define IsNotIn: { 3, 5, 6 } properly includes 4 +define IsNotProperlyIn: { 4 } properly includes 4 +define IsInNotUnique: { 4, 4 } properly includes 4 +define IsInWithNull: { 4, null } properly includes 4 +define TupleIsIn: {Tuple{a:1, b:'d'}, Tuple{a:1, b:'c'}, Tuple{a:2, b:'c'}} properly includes Tuple{a: 1, b: 'c'} +define TupleIsNotIn: {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} properly includes Tuple{a: 1, b: 'c'} +define InNull: (null as List) properly includes 1 +define NullIn: {1, 2, null, 3} properly includes null +define NullNotIn: {1, 2, 3} properly includes null + // @Test: Flatten define ListOfLists: flatten { {1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {9, 8, 7, 6, 5}, {4}, {3, 2, 1} } define NullValue: flatten null diff --git a/test/elm/list/data.js b/test/elm/list/data.js index 0440e73cf..2bc8b542a 100644 --- a/test/elm/list/data.js +++ b/test/elm/list/data.js @@ -27425,7 +27425,7 @@ define IsSameLong: {1L, 2L, 3L, 4L, 5L} properly includes {1L, 2L, 3L, 4L, 5L} define IsNotIncludedLong: {1L, 2L, 3L, 4L, 5L} properly includes {4L, 5L, 6L} define TuplesIncluded: {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} properly includes {Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} define TuplesNotIncluded: {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} properly includes {Tuple{a:2, b:'d'}, Tuple{a:3, b:'c'}} -define NullIncluded: {1, 2, 3, 4, 5} properly includes null +define NullIncluded: {1, 2, 3, 4, 5} properly includes (null as List) define NullIncludes: null properly includes {1, 2, 3, 4, 5} */ @@ -27547,11 +27547,22 @@ module.exports['ProperIncludes'] = { "message" : "List-valued expression was demoted to a singleton.", "errorType" : "semantic", "errorSeverity" : "warning" + }, { + "type" : "CqlToElmError", + "libraryId" : "TestSnippet", + "libraryVersion" : "1", + "startLine" : 14, + "startChar" : 57, + "endLine" : 14, + "endChar" : 77, + "message" : "List-valued expression was demoted to a singleton.", + "errorType" : "semantic", + "errorSeverity" : "warning" }, { "type" : "Annotation", "t" : [ ], "s" : { - "r" : "666", + "r" : "674", "s" : [ { "value" : [ "", "library TestSnippet version '1'" ] } ] @@ -29990,7 +30001,7 @@ module.exports['ProperIncludes'] = { "s" : [ { "value" : [ "", "define ", "NullIncluded", ": " ] }, { - "r" : "659", + "r" : "660", "s" : [ { "r" : "642", "s" : [ { @@ -29998,15 +30009,40 @@ module.exports['ProperIncludes'] = { "value" : [ "{", "1", ", ", "2", ", ", "3", ", ", "4", ", ", "5", "}" ] } ] }, { - "r" : "659", - "value" : [ " ", "properly includes", " ", "null" ] + "r" : "660", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "650", + "s" : [ { + "value" : [ "(" ] + }, { + "r" : "650", + "s" : [ { + "r" : "651", + "value" : [ "null", " as " ] + }, { + "r" : "652", + "s" : [ { + "value" : [ "List<" ] + }, { + "r" : "653", + "s" : [ { + "value" : [ "Integer" ] + } ] + }, { + "value" : [ ">" ] + } ] + } ] + }, { + "value" : [ ")" ] + } ] } ] } ] } } ], "expression" : { - "type" : "ProperContains", - "localId" : "659", + "type" : "ProperIncludes", + "localId" : "660", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", "annotation" : [ ], "signature" : [ { @@ -30020,10 +30056,15 @@ module.exports['ProperIncludes'] = { "annotation" : [ ] } }, { - "type" : "NamedTypeSpecifier", + "type" : "ListTypeSpecifier", "localId" : "663", - "name" : "{urn:hl7-org:elm-types:r1}Integer", - "annotation" : [ ] + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "664", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } } ], "operand" : [ { "type" : "List", @@ -30078,20 +30119,54 @@ module.exports['ProperIncludes'] = { } ] }, { "type" : "As", - "localId" : "660", - "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "localId" : "650", + "strict" : false, "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "658", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "659", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, "signature" : [ ], "operand" : { "type" : "Null", - "localId" : "650", + "localId" : "651", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", "annotation" : [ ] + }, + "asTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "652", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "654", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "655", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "653", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } } } ] } }, { - "localId" : "666", + "localId" : "674", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", "name" : "NullIncludes", "context" : "Patient", @@ -30100,18 +30175,18 @@ module.exports['ProperIncludes'] = { "type" : "Annotation", "t" : [ ], "s" : { - "r" : "666", + "r" : "674", "s" : [ { "value" : [ "", "define ", "NullIncludes", ": " ] }, { - "r" : "676", + "r" : "684", "s" : [ { - "r" : "667", + "r" : "675", "value" : [ "null", " ", "properly includes", " " ] }, { - "r" : "668", + "r" : "676", "s" : [ { - "r" : "669", + "r" : "677", "value" : [ "{", "1", ", ", "2", ", ", "3", ", ", "4", ", ", "5", "}" ] } ] } ] @@ -30120,98 +30195,98 @@ module.exports['ProperIncludes'] = { } ], "expression" : { "type" : "ProperIncludes", - "localId" : "676", + "localId" : "684", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", "annotation" : [ ], "signature" : [ { "type" : "ListTypeSpecifier", - "localId" : "680", + "localId" : "688", "annotation" : [ ], "elementType" : { "type" : "NamedTypeSpecifier", - "localId" : "681", + "localId" : "689", "name" : "{urn:hl7-org:elm-types:r1}Integer", "annotation" : [ ] } }, { "type" : "ListTypeSpecifier", - "localId" : "682", + "localId" : "690", "annotation" : [ ], "elementType" : { "type" : "NamedTypeSpecifier", - "localId" : "683", + "localId" : "691", "name" : "{urn:hl7-org:elm-types:r1}Integer", "annotation" : [ ] } } ], "operand" : [ { "type" : "As", - "localId" : "677", + "localId" : "685", "annotation" : [ ], "signature" : [ ], "operand" : { "type" : "Null", - "localId" : "667", + "localId" : "675", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", "annotation" : [ ] }, "asTypeSpecifier" : { "type" : "ListTypeSpecifier", - "localId" : "678", + "localId" : "686", "annotation" : [ ], "elementType" : { "type" : "NamedTypeSpecifier", - "localId" : "679", + "localId" : "687", "name" : "{urn:hl7-org:elm-types:r1}Integer", "annotation" : [ ] } } }, { "type" : "List", - "localId" : "668", + "localId" : "676", "annotation" : [ ], "resultTypeSpecifier" : { "type" : "ListTypeSpecifier", - "localId" : "674", + "localId" : "682", "annotation" : [ ], "elementType" : { "type" : "NamedTypeSpecifier", - "localId" : "675", + "localId" : "683", "name" : "{urn:hl7-org:elm-types:r1}Integer", "annotation" : [ ] } }, "element" : [ { "type" : "Literal", - "localId" : "669", + "localId" : "677", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "1", "annotation" : [ ] }, { "type" : "Literal", - "localId" : "670", + "localId" : "678", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "2", "annotation" : [ ] }, { "type" : "Literal", - "localId" : "671", + "localId" : "679", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "3", "annotation" : [ ] }, { "type" : "Literal", - "localId" : "672", + "localId" : "680", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "4", "annotation" : [ ] }, { "type" : "Literal", - "localId" : "673", + "localId" : "681", "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", "valueType" : "{urn:hl7-org:elm-types:r1}Integer", "value" : "5", @@ -33144,6 +33219,3453 @@ module.exports['ProperIncludedIn'] = { } } +/* ProperIn +library TestSnippet version '1' +using Simple version '1.0.0' +context Patient +define IsIn: 4 properly included in { 3, 4, 5 } +define IsNotIn: 4 properly included in { 3, 5, 6 } +define IsNotProperlyIn: 4 properly included in { 4 } +define IsInNotUnique: 4 properly included in { 4, 4 } +define IsInWithNull: 4 properly included in { 4, null } +define TupleIsIn: Tuple{a: 1, b: 'c'} properly included in {Tuple{a:1, b:'d'}, Tuple{a:1, b:'c'}, Tuple{a:2, b:'c'}} +define TupleIsNotIn: Tuple{a: 1, b: 'c'} properly included in {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} +define NullIn: null properly included in {1, 2, null, 3} +define InNull: 1 properly included in null +define NullNotIn: null properly included in {1, 2, 3} +*/ + +module.exports['ProperIn'] = { + "library" : { + "localId" : "0", + "annotation" : [ { + "type" : "CqlToElmInfo", + "translatorVersion" : "4.2.0", + "translatorOptions" : "EnableDateRangeOptimization,EnableAnnotations,EnableResultTypes", + "signatureLevel" : "All" + }, { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "501", + "s" : [ { + "value" : [ "", "library TestSnippet version '1'" ] + } ] + } + } ], + "identifier" : { + "id" : "TestSnippet", + "version" : "1" + }, + "schemaIdentifier" : { + "id" : "urn:hl7-org:elm", + "version" : "r1" + }, + "usings" : { + "def" : [ { + "localId" : "1", + "localIdentifier" : "System", + "uri" : "urn:hl7-org:elm-types:r1", + "annotation" : [ ] + }, { + "localId" : "206", + "localIdentifier" : "Simple", + "uri" : "https://github.com/cqframework/cql-execution/simple", + "version" : "1.0.0", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "206", + "s" : [ { + "value" : [ "", "using " ] + }, { + "s" : [ { + "value" : [ "Simple" ] + } ] + }, { + "value" : [ " version '1.0.0'" ] + } ] + } + } ] + } ] + }, + "contexts" : { + "def" : [ { + "localId" : "211", + "name" : "Patient", + "annotation" : [ ] + } ] + }, + "statements" : { + "def" : [ { + "localId" : "209", + "name" : "Patient", + "context" : "Patient", + "annotation" : [ ], + "expression" : { + "type" : "SingletonFrom", + "localId" : "210", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Retrieve", + "localId" : "208", + "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", + "annotation" : [ ], + "include" : [ ], + "codeFilter" : [ ], + "dateFilter" : [ ], + "otherFilter" : [ ] + } + } + }, { + "localId" : "214", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "214", + "s" : [ { + "value" : [ "", "define ", "IsIn", ": " ] + }, { + "r" : "228", + "s" : [ { + "r" : "215", + "value" : [ "4", " ", "properly included in", " " ] + }, { + "r" : "216", + "s" : [ { + "r" : "217", + "value" : [ "{ ", "3", ", ", "4", ", ", "5", " }" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "228", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "229", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "230", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "231", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "215", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "List", + "localId" : "216", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "220", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "221", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "217", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "218", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "219", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } ] + } ] + } + }, { + "localId" : "234", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsNotIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "234", + "s" : [ { + "value" : [ "", "define ", "IsNotIn", ": " ] + }, { + "r" : "248", + "s" : [ { + "r" : "235", + "value" : [ "4", " ", "properly included in", " " ] + }, { + "r" : "236", + "s" : [ { + "r" : "237", + "value" : [ "{ ", "3", ", ", "5", ", ", "6", " }" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "248", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "249", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "250", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "251", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "235", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "List", + "localId" : "236", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "240", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "241", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "237", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "238", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "239", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "6", + "annotation" : [ ] + } ] + } ] + } + }, { + "localId" : "254", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsNotProperlyIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "254", + "s" : [ { + "value" : [ "", "define ", "IsNotProperlyIn", ": " ] + }, { + "r" : "266", + "s" : [ { + "r" : "255", + "value" : [ "4", " ", "properly included in", " " ] + }, { + "r" : "256", + "s" : [ { + "r" : "257", + "value" : [ "{ ", "4", " }" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "266", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "267", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "268", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "269", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "255", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "List", + "localId" : "256", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "258", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "259", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "257", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + } ] + } + }, { + "localId" : "272", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsInNotUnique", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "272", + "s" : [ { + "value" : [ "", "define ", "IsInNotUnique", ": " ] + }, { + "r" : "285", + "s" : [ { + "r" : "273", + "value" : [ "4", " ", "properly included in", " " ] + }, { + "r" : "274", + "s" : [ { + "r" : "275", + "value" : [ "{ ", "4", ", ", "4", " }" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "285", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "286", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "287", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "288", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "273", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "List", + "localId" : "274", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "277", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "278", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "275", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "276", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + } ] + } + }, { + "localId" : "291", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsInWithNull", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "291", + "s" : [ { + "value" : [ "", "define ", "IsInWithNull", ": " ] + }, { + "r" : "305", + "s" : [ { + "r" : "292", + "value" : [ "4", " ", "properly included in", " " ] + }, { + "r" : "293", + "s" : [ { + "r" : "294", + "value" : [ "{ ", "4", ", ", "null", " }" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "305", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "306", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "307", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "308", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "292", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "List", + "localId" : "293", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "297", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "298", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "294", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "As", + "localId" : "296", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "295", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + } ] + } ] + } + }, { + "localId" : "311", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "TupleIsIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "311", + "s" : [ { + "value" : [ "", "define ", "TupleIsIn", ": " ] + }, { + "r" : "369", + "s" : [ { + "r" : "312", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "313", + "value" : [ "a", ": ", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ": " ] + }, { + "r" : "314", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "r" : "369", + "value" : [ " ", "properly included in", " " ] + }, { + "r" : "321", + "s" : [ { + "value" : [ "{" ] + }, { + "r" : "322", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "323", + "value" : [ "a", ":", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "324", + "s" : [ { + "value" : [ "'d'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "331", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "332", + "value" : [ "a", ":", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "333", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "340", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "341", + "value" : [ "a", ":", "2" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "342", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ "}" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "369", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "TupleTypeSpecifier", + "localId" : "370", + "annotation" : [ ], + "element" : [ { + "localId" : "371", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "372", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "373", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "374", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "375", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "376", + "annotation" : [ ], + "element" : [ { + "localId" : "377", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "378", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "379", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "380", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + } ], + "operand" : [ { + "type" : "Tuple", + "localId" : "312", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "316", + "annotation" : [ ], + "element" : [ { + "localId" : "317", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "318", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "319", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "320", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "313", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "314", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + }, { + "type" : "List", + "localId" : "321", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "349", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "350", + "annotation" : [ ], + "element" : [ { + "localId" : "351", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "352", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "353", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "354", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + }, + "element" : [ { + "type" : "Tuple", + "localId" : "322", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "326", + "annotation" : [ ], + "element" : [ { + "localId" : "327", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "328", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "329", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "330", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "323", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "324", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "d", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "331", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "335", + "annotation" : [ ], + "element" : [ { + "localId" : "336", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "337", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "338", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "339", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "332", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "333", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "340", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "344", + "annotation" : [ ], + "element" : [ { + "localId" : "345", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "346", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "347", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "348", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "341", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "342", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + } ] + } ] + } + }, { + "localId" : "383", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "TupleIsNotIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "383", + "s" : [ { + "value" : [ "", "define ", "TupleIsNotIn", ": " ] + }, { + "r" : "441", + "s" : [ { + "r" : "384", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "385", + "value" : [ "a", ": ", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ": " ] + }, { + "r" : "386", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "r" : "441", + "value" : [ " ", "properly included in", " " ] + }, { + "r" : "393", + "s" : [ { + "value" : [ "{" ] + }, { + "r" : "394", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "395", + "value" : [ "a", ":", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "396", + "s" : [ { + "value" : [ "'d'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "403", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "404", + "value" : [ "a", ":", "2" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "405", + "s" : [ { + "value" : [ "'d'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "412", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "413", + "value" : [ "a", ":", "2" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "414", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ "}" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "441", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "TupleTypeSpecifier", + "localId" : "442", + "annotation" : [ ], + "element" : [ { + "localId" : "443", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "444", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "445", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "446", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "447", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "448", + "annotation" : [ ], + "element" : [ { + "localId" : "449", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "450", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "451", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "452", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + } ], + "operand" : [ { + "type" : "Tuple", + "localId" : "384", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "388", + "annotation" : [ ], + "element" : [ { + "localId" : "389", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "390", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "391", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "392", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "385", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "386", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + }, { + "type" : "List", + "localId" : "393", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "421", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "422", + "annotation" : [ ], + "element" : [ { + "localId" : "423", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "424", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "425", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "426", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + }, + "element" : [ { + "type" : "Tuple", + "localId" : "394", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "398", + "annotation" : [ ], + "element" : [ { + "localId" : "399", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "400", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "401", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "402", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "395", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "396", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "d", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "403", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "407", + "annotation" : [ ], + "element" : [ { + "localId" : "408", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "409", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "410", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "411", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "404", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "405", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "d", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "412", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "416", + "annotation" : [ ], + "element" : [ { + "localId" : "417", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "418", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "419", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "420", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "413", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "414", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + } ] + } ] + } + }, { + "localId" : "455", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NullIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "455", + "s" : [ { + "value" : [ "", "define ", "NullIn", ": " ] + }, { + "r" : "473", + "s" : [ { + "r" : "456", + "value" : [ "null", " ", "properly included in", " " ] + }, { + "r" : "457", + "s" : [ { + "r" : "458", + "value" : [ "{", "1", ", ", "2", ", ", "null", ", ", "3", "}" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "473", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "475", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "476", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "477", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "As", + "localId" : "474", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "456", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + }, { + "type" : "List", + "localId" : "457", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "463", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "464", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "458", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "459", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + }, { + "type" : "As", + "localId" : "462", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "460", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "461", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + } ] + } ] + } + }, { + "localId" : "480", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "InNull", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "480", + "s" : [ { + "value" : [ "", "define ", "InNull", ": " ] + }, { + "r" : "492", + "s" : [ { + "r" : "481", + "value" : [ "1", " ", "properly included in", " ", "null" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "492", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "496", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "IntervalTypeSpecifier", + "localId" : "497", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "498", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "Literal", + "localId" : "481", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, { + "type" : "As", + "localId" : "493", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "482", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + }, + "asTypeSpecifier" : { + "type" : "IntervalTypeSpecifier", + "localId" : "494", + "annotation" : [ ], + "pointType" : { + "type" : "NamedTypeSpecifier", + "localId" : "495", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } + } ] + } + }, { + "localId" : "501", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NullNotIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "501", + "s" : [ { + "value" : [ "", "define ", "NullNotIn", ": " ] + }, { + "r" : "517", + "s" : [ { + "r" : "502", + "value" : [ "null", " ", "properly included in", " " ] + }, { + "r" : "503", + "s" : [ { + "r" : "504", + "value" : [ "{", "1", ", ", "2", ", ", "3", "}" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperIn", + "localId" : "517", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "NamedTypeSpecifier", + "localId" : "519", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + }, { + "type" : "ListTypeSpecifier", + "localId" : "520", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "521", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } ], + "operand" : [ { + "type" : "As", + "localId" : "518", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "502", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + }, { + "type" : "List", + "localId" : "503", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "507", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "508", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "504", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "505", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "506", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + } ] + } ] + } + } ] + } + } +} + +/* ProperContains +library TestSnippet version '1' +using Simple version '1.0.0' +context Patient +define IsIn: { 3, 4, 5 } properly includes 4 +define IsNotIn: { 3, 5, 6 } properly includes 4 +define IsNotProperlyIn: { 4 } properly includes 4 +define IsInNotUnique: { 4, 4 } properly includes 4 +define IsInWithNull: { 4, null } properly includes 4 +define TupleIsIn: {Tuple{a:1, b:'d'}, Tuple{a:1, b:'c'}, Tuple{a:2, b:'c'}} properly includes Tuple{a: 1, b: 'c'} +define TupleIsNotIn: {Tuple{a:1, b:'d'}, Tuple{a:2, b:'d'}, Tuple{a:2, b:'c'}} properly includes Tuple{a: 1, b: 'c'} +define InNull: (null as List) properly includes 1 +define NullIn: {1, 2, null, 3} properly includes null +define NullNotIn: {1, 2, 3} properly includes null +*/ + +module.exports['ProperContains'] = { + "library" : { + "localId" : "0", + "annotation" : [ { + "type" : "CqlToElmInfo", + "translatorVersion" : "4.2.0", + "translatorOptions" : "EnableDateRangeOptimization,EnableAnnotations,EnableResultTypes", + "signatureLevel" : "All" + }, { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "504", + "s" : [ { + "value" : [ "", "library TestSnippet version '1'" ] + } ] + } + } ], + "identifier" : { + "id" : "TestSnippet", + "version" : "1" + }, + "schemaIdentifier" : { + "id" : "urn:hl7-org:elm", + "version" : "r1" + }, + "usings" : { + "def" : [ { + "localId" : "1", + "localIdentifier" : "System", + "uri" : "urn:hl7-org:elm-types:r1", + "annotation" : [ ] + }, { + "localId" : "206", + "localIdentifier" : "Simple", + "uri" : "https://github.com/cqframework/cql-execution/simple", + "version" : "1.0.0", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "206", + "s" : [ { + "value" : [ "", "using " ] + }, { + "s" : [ { + "value" : [ "Simple" ] + } ] + }, { + "value" : [ " version '1.0.0'" ] + } ] + } + } ] + } ] + }, + "contexts" : { + "def" : [ { + "localId" : "211", + "name" : "Patient", + "annotation" : [ ] + } ] + }, + "statements" : { + "def" : [ { + "localId" : "209", + "name" : "Patient", + "context" : "Patient", + "annotation" : [ ], + "expression" : { + "type" : "SingletonFrom", + "localId" : "210", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Retrieve", + "localId" : "208", + "dataType" : "{https://github.com/cqframework/cql-execution/simple}Patient", + "annotation" : [ ], + "include" : [ ], + "codeFilter" : [ ], + "dateFilter" : [ ], + "otherFilter" : [ ] + } + } + }, { + "localId" : "214", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "214", + "s" : [ { + "value" : [ "", "define ", "IsIn", ": " ] + }, { + "r" : "228", + "s" : [ { + "r" : "215", + "s" : [ { + "r" : "216", + "value" : [ "{ ", "3", ", ", "4", ", ", "5", " }" ] + } ] + }, { + "r" : "228", + "value" : [ " ", "properly includes", " ", "4" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "228", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "229", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "230", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "231", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "215", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "219", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "220", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "216", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "217", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "218", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + } ] + }, { + "type" : "Literal", + "localId" : "221", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + } + }, { + "localId" : "234", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsNotIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "234", + "s" : [ { + "value" : [ "", "define ", "IsNotIn", ": " ] + }, { + "r" : "248", + "s" : [ { + "r" : "235", + "s" : [ { + "r" : "236", + "value" : [ "{ ", "3", ", ", "5", ", ", "6", " }" ] + } ] + }, { + "r" : "248", + "value" : [ " ", "properly includes", " ", "4" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "248", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "249", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "250", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "251", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "235", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "239", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "240", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "236", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "237", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "5", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "238", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "6", + "annotation" : [ ] + } ] + }, { + "type" : "Literal", + "localId" : "241", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + } + }, { + "localId" : "254", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsNotProperlyIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "254", + "s" : [ { + "value" : [ "", "define ", "IsNotProperlyIn", ": " ] + }, { + "r" : "266", + "s" : [ { + "r" : "255", + "s" : [ { + "r" : "256", + "value" : [ "{ ", "4", " }" ] + } ] + }, { + "r" : "266", + "value" : [ " ", "properly includes", " ", "4" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "266", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "267", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "268", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "269", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "255", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "257", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "258", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "256", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + }, { + "type" : "Literal", + "localId" : "259", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + } + }, { + "localId" : "272", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsInNotUnique", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "272", + "s" : [ { + "value" : [ "", "define ", "IsInNotUnique", ": " ] + }, { + "r" : "285", + "s" : [ { + "r" : "273", + "s" : [ { + "r" : "274", + "value" : [ "{ ", "4", ", ", "4", " }" ] + } ] + }, { + "r" : "285", + "value" : [ " ", "properly includes", " ", "4" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "285", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "286", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "287", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "288", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "273", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "276", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "277", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "274", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "275", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + }, { + "type" : "Literal", + "localId" : "278", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + } + }, { + "localId" : "291", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "IsInWithNull", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "291", + "s" : [ { + "value" : [ "", "define ", "IsInWithNull", ": " ] + }, { + "r" : "305", + "s" : [ { + "r" : "292", + "s" : [ { + "r" : "293", + "value" : [ "{ ", "4", ", ", "null", " }" ] + } ] + }, { + "r" : "305", + "value" : [ " ", "properly includes", " ", "4" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "305", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "306", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "307", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "308", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "292", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "296", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "297", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "293", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + }, { + "type" : "As", + "localId" : "295", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "294", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + } ] + }, { + "type" : "Literal", + "localId" : "298", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "4", + "annotation" : [ ] + } ] + } + }, { + "localId" : "311", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "TupleIsIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "311", + "s" : [ { + "value" : [ "", "define ", "TupleIsIn", ": " ] + }, { + "r" : "369", + "s" : [ { + "r" : "312", + "s" : [ { + "value" : [ "{" ] + }, { + "r" : "313", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "314", + "value" : [ "a", ":", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "315", + "s" : [ { + "value" : [ "'d'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "322", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "323", + "value" : [ "a", ":", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "324", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "331", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "332", + "value" : [ "a", ":", "2" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "333", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "r" : "369", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "346", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "347", + "value" : [ "a", ": ", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ": " ] + }, { + "r" : "348", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "369", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "370", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "371", + "annotation" : [ ], + "element" : [ { + "localId" : "372", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "373", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "374", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "375", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + }, { + "type" : "TupleTypeSpecifier", + "localId" : "376", + "annotation" : [ ], + "element" : [ { + "localId" : "377", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "378", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "379", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "380", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "312", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "340", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "341", + "annotation" : [ ], + "element" : [ { + "localId" : "342", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "343", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "344", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "345", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + }, + "element" : [ { + "type" : "Tuple", + "localId" : "313", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "317", + "annotation" : [ ], + "element" : [ { + "localId" : "318", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "319", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "320", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "321", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "314", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "315", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "d", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "322", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "326", + "annotation" : [ ], + "element" : [ { + "localId" : "327", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "328", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "329", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "330", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "323", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "324", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "331", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "335", + "annotation" : [ ], + "element" : [ { + "localId" : "336", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "337", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "338", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "339", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "332", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "333", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + } ] + }, { + "type" : "Tuple", + "localId" : "346", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "350", + "annotation" : [ ], + "element" : [ { + "localId" : "351", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "352", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "353", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "354", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "347", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "348", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + } ] + } + }, { + "localId" : "383", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "TupleIsNotIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "383", + "s" : [ { + "value" : [ "", "define ", "TupleIsNotIn", ": " ] + }, { + "r" : "441", + "s" : [ { + "r" : "384", + "s" : [ { + "value" : [ "{" ] + }, { + "r" : "385", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "386", + "value" : [ "a", ":", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "387", + "s" : [ { + "value" : [ "'d'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "394", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "395", + "value" : [ "a", ":", "2" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "396", + "s" : [ { + "value" : [ "'d'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ ", " ] + }, { + "r" : "403", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "404", + "value" : [ "a", ":", "2" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ":" ] + }, { + "r" : "405", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "value" : [ "}" ] + } ] + }, { + "r" : "441", + "value" : [ " ", "properly includes", " " ] + }, { + "r" : "418", + "s" : [ { + "value" : [ "Tuple{" ] + }, { + "s" : [ { + "r" : "419", + "value" : [ "a", ": ", "1" ] + } ] + }, { + "value" : [ ", " ] + }, { + "s" : [ { + "value" : [ "b", ": " ] + }, { + "r" : "420", + "s" : [ { + "value" : [ "'c'" ] + } ] + } ] + }, { + "value" : [ "}" ] + } ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "441", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "442", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "443", + "annotation" : [ ], + "element" : [ { + "localId" : "444", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "445", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "446", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "447", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + }, { + "type" : "TupleTypeSpecifier", + "localId" : "448", + "annotation" : [ ], + "element" : [ { + "localId" : "449", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "450", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "451", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "452", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "384", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "412", + "annotation" : [ ], + "elementType" : { + "type" : "TupleTypeSpecifier", + "localId" : "413", + "annotation" : [ ], + "element" : [ { + "localId" : "414", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "415", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "416", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "417", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + } + }, + "element" : [ { + "type" : "Tuple", + "localId" : "385", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "389", + "annotation" : [ ], + "element" : [ { + "localId" : "390", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "391", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "392", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "393", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "386", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "387", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "d", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "394", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "398", + "annotation" : [ ], + "element" : [ { + "localId" : "399", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "400", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "401", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "402", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "395", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "396", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "d", + "annotation" : [ ] + } + } ] + }, { + "type" : "Tuple", + "localId" : "403", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "407", + "annotation" : [ ], + "element" : [ { + "localId" : "408", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "409", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "410", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "411", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "404", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "405", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + } ] + }, { + "type" : "Tuple", + "localId" : "418", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "TupleTypeSpecifier", + "localId" : "422", + "annotation" : [ ], + "element" : [ { + "localId" : "423", + "name" : "a", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "424", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "localId" : "425", + "name" : "b", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "426", + "name" : "{urn:hl7-org:elm-types:r1}String", + "annotation" : [ ] + } + } ] + }, + "element" : [ { + "name" : "a", + "value" : { + "type" : "Literal", + "localId" : "419", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } + }, { + "name" : "b", + "value" : { + "type" : "Literal", + "localId" : "420", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}String", + "valueType" : "{urn:hl7-org:elm-types:r1}String", + "value" : "c", + "annotation" : [ ] + } + } ] + } ] + } + }, { + "localId" : "455", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "InNull", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "455", + "s" : [ { + "value" : [ "", "define ", "InNull", ": " ] + }, { + "r" : "473", + "s" : [ { + "r" : "456", + "s" : [ { + "value" : [ "(" ] + }, { + "r" : "456", + "s" : [ { + "r" : "457", + "value" : [ "null", " as " ] + }, { + "r" : "458", + "s" : [ { + "value" : [ "List<" ] + }, { + "r" : "459", + "s" : [ { + "value" : [ "Integer" ] + } ] + }, { + "value" : [ ">" ] + } ] + } ] + }, { + "value" : [ ")" ] + } ] + }, { + "r" : "473", + "value" : [ " ", "properly includes", " ", "1" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "473", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "474", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "475", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "476", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "As", + "localId" : "456", + "strict" : false, + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "464", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "465", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "457", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + }, + "asTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "458", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "460", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "461", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "459", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + } + }, { + "type" : "Literal", + "localId" : "466", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + } ] + } + }, { + "localId" : "479", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NullIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "479", + "s" : [ { + "value" : [ "", "define ", "NullIn", ": " ] + }, { + "r" : "497", + "s" : [ { + "r" : "480", + "s" : [ { + "r" : "481", + "value" : [ "{", "1", ", ", "2", ", ", "null", ", ", "3", "}" ] + } ] + }, { + "r" : "497", + "value" : [ " ", "properly includes", " ", "null" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "497", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "499", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "500", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "501", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "480", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "486", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "487", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "481", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "482", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + }, { + "type" : "As", + "localId" : "485", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "483", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + }, { + "type" : "Literal", + "localId" : "484", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + } ] + }, { + "type" : "As", + "localId" : "498", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "488", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + } ] + } + }, { + "localId" : "504", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "name" : "NullNotIn", + "context" : "Patient", + "accessLevel" : "Public", + "annotation" : [ { + "type" : "Annotation", + "t" : [ ], + "s" : { + "r" : "504", + "s" : [ { + "value" : [ "", "define ", "NullNotIn", ": " ] + }, { + "r" : "520", + "s" : [ { + "r" : "505", + "s" : [ { + "r" : "506", + "value" : [ "{", "1", ", ", "2", ", ", "3", "}" ] + } ] + }, { + "r" : "520", + "value" : [ " ", "properly includes", " ", "null" ] + } ] + } ] + } + } ], + "expression" : { + "type" : "ProperContains", + "localId" : "520", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Boolean", + "annotation" : [ ], + "signature" : [ { + "type" : "ListTypeSpecifier", + "localId" : "522", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "523", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, { + "type" : "NamedTypeSpecifier", + "localId" : "524", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } ], + "operand" : [ { + "type" : "List", + "localId" : "505", + "annotation" : [ ], + "resultTypeSpecifier" : { + "type" : "ListTypeSpecifier", + "localId" : "509", + "annotation" : [ ], + "elementType" : { + "type" : "NamedTypeSpecifier", + "localId" : "510", + "name" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ] + } + }, + "element" : [ { + "type" : "Literal", + "localId" : "506", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "1", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "507", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "2", + "annotation" : [ ] + }, { + "type" : "Literal", + "localId" : "508", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Integer", + "valueType" : "{urn:hl7-org:elm-types:r1}Integer", + "value" : "3", + "annotation" : [ ] + } ] + }, { + "type" : "As", + "localId" : "521", + "asType" : "{urn:hl7-org:elm-types:r1}Integer", + "annotation" : [ ], + "signature" : [ ], + "operand" : { + "type" : "Null", + "localId" : "511", + "resultTypeName" : "{urn:hl7-org:elm-types:r1}Any", + "annotation" : [ ] + } + } ] + } + } ] + } + } +} + /* Flatten library TestSnippet version '1' using Simple version '1.0.0' diff --git a/test/elm/list/list-test.ts b/test/elm/list/list-test.ts index 3a0281bb3..fba739f4b 100644 --- a/test/elm/list/list-test.ts +++ b/test/elm/list/list-test.ts @@ -646,8 +646,7 @@ describe('ProperIncludes', () => { (await this.tuplesNotIncluded.exec(this.ctx)).should.be.false(); }); - // TODO: Support for ProperContains - it.skip('should return null if either arg is null', async function () { + it('should return null if either arg is null', async function () { should(await this.nullIncluded.exec(this.ctx)).be.null(); should(await this.nullIncludes.exec(this.ctx)).be.null(); }); @@ -704,6 +703,98 @@ describe('ProperIncludedIn', () => { }); }); +describe('ProperIn', () => { + beforeEach(function () { + setup(this, data); + }); + + it('should execute to true when item is in list', async function () { + (await this.isIn.exec(this.ctx)).should.be.true(); + }); + + it('should execute to false when item is not in list', async function () { + (await this.isNotIn.exec(this.ctx)).should.be.false(); + }); + + it('should execute to false when item is the only item in list', async function () { + (await this.isNotProperlyIn.exec(this.ctx)).should.be.false(); + }); + + it('should execute to true when item is in the list multiple times', async function () { + (await this.isInNotUnique.exec(this.ctx)).should.be.true(); + }); + + it('should execute to true when item is in list with null', async function () { + (await this.isInWithNull.exec(this.ctx)).should.be.true(); + }); + + it('should execute to true when tuple is in list', async function () { + (await this.tupleIsIn.exec(this.ctx)).should.be.true(); + }); + + it('should execute to false when tuple is not in list', async function () { + (await this.tupleIsNotIn.exec(this.ctx)).should.be.false(); + }); + + it('should return false if list is null', async function () { + (await this.inNull.exec(this.ctx)).should.be.false(); + }); + + it('should return true if null is in list', async function () { + (await this.nullIn.exec(this.ctx)).should.be.true(); + }); + + it('should return false if null is not in list', async function () { + (await this.nullNotIn.exec(this.ctx)).should.be.false(); + }); +}); + +describe('ProperContains', () => { + beforeEach(function () { + setup(this, data); + }); + + it('should execute to true when item is in list', async function () { + (await this.isIn.exec(this.ctx)).should.be.true(); + }); + + it('should execute to false when item is not in list', async function () { + (await this.isNotIn.exec(this.ctx)).should.be.false(); + }); + + it('should execute to false when item is the only item in list', async function () { + (await this.isNotProperlyIn.exec(this.ctx)).should.be.false(); + }); + + it('should execute to true when item is in the list multiple times', async function () { + (await this.isInNotUnique.exec(this.ctx)).should.be.true(); + }); + + it('should execute to true when item is in list with null', async function () { + (await this.isInWithNull.exec(this.ctx)).should.be.true(); + }); + + it('should execute to true when tuple is in list', async function () { + (await this.tupleIsIn.exec(this.ctx)).should.be.true(); + }); + + it('should execute to false when tuple is not in list', async function () { + (await this.tupleIsNotIn.exec(this.ctx)).should.be.false(); + }); + + it('should return true if null is contained in the list', async function () { + (await this.nullIn.exec(this.ctx)).should.be.true(); + }); + + it('should return false if null is not contained in the list', async function () { + (await this.nullNotIn.exec(this.ctx)).should.be.false(); + }); + + it('should return false if list is null', async function () { + (await this.inNull.exec(this.ctx)).should.be.false(); + }); +}); + describe('Flatten', () => { beforeEach(function () { setup(this, data); diff --git a/test/spec-tests/cql/CqlIntervalOperatorsTest.cql b/test/spec-tests/cql/CqlIntervalOperatorsTest.cql index 5a9d02bc2..9d88364c3 100644 --- a/test/spec-tests/cql/CqlIntervalOperatorsTest.cql +++ b/test/spec-tests/cql/CqlIntervalOperatorsTest.cql @@ -1430,80 +1430,56 @@ define "PointFrom": Tuple{ define "ProperContains": Tuple{ "TimeProperContainsTrue": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: Interval[@T12:00:00.000, @T21:59:59.999] properly includes @T12:00:00.001, output: true - */ }, + }, "TimeProperContainsFalse": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: Interval[@T12:00:00.000, @T21:59:59.999] properly includes @T12:00:00.000, output: false - */ }, + }, "TimeProperContainsNull": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: Interval[@T12:00:00.001, @T21:59:59.999] properly includes @T12:00:00, output: null - */ }, + }, "TimeProperContainsPrecisionTrue": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: Interval[@T12:00:00.000, @T21:59:59.999] properly includes second of @T12:00:01, output: true - */ }, + }, "TimeProperContainsPrecisionFalse": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: Interval[@T12:00:00.001, @T21:59:59.999] properly includes second of @T12:00:00, output: false - */ }, + }, "TimeProperContainsPrecisionNull": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: Interval[@T12:00:00.001, @T21:59:59.999] properly includes millisecond of @T12:00:00, output: null - */ } + } } define "ProperIn": Tuple{ "TimeProperInTrue": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T12:00:00.001 properly included in Interval[@T12:00:00.000, @T21:59:59.999], output: true - */ }, + }, "TimeProperInFalse": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T12:00:00.000 properly included in Interval[@T12:00:00.000, @T21:59:59.999], output: false - */ }, + }, "TimeProperInNull": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T12:00:00 properly included in Interval[@T12:00:00.001, @T21:59:59.999], output: null - */ }, + }, "TimeProperInPrecisionTrue": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T12:00:01 properly included in second of Interval[@T12:00:00.000, @T21:59:59.999], output: true - */ }, + }, "TimeProperInPrecisionFalse": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T12:00:00 properly included in second of Interval[@T12:00:00.001, @T21:59:59.999], output: false - */ }, + }, "TimeProperInPrecisionNull": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T12:00:00 properly included in millisecond of Interval[@T12:00:00.001, @T21:59:59.999], output: null - */ } + } } define "ProperlyIncludes": Tuple{ diff --git a/test/spec-tests/cql/CqlIntervalOperatorsTest.json b/test/spec-tests/cql/CqlIntervalOperatorsTest.json index 1fcc27897..639e38a3e 100644 --- a/test/spec-tests/cql/CqlIntervalOperatorsTest.json +++ b/test/spec-tests/cql/CqlIntervalOperatorsTest.json @@ -68324,11 +68324,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68343,11 +68352,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68362,11 +68380,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -68381,11 +68408,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68400,11 +68436,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68419,11 +68464,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -68447,11 +68501,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68466,11 +68529,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68485,11 +68557,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -68504,11 +68585,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68523,109 +68613,59 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } - } - ] - } - }, - { - "name": "TimeProperContainsPrecisionNull", - "annotation": [], - "elementType": { - "type": "TupleTypeSpecifier", - "annotation": [], - "element": [ + }, { - "name": "skipped", + "name": "output", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } ] } - } - ] - }, - "element": [ - { - "name": "TimeProperContainsTrue", - "value": { - "type": "Tuple", + }, + { + "name": "TimeProperContainsPrecisionNull", "annotation": [], - "resultTypeSpecifier": { + "elementType": { "type": "TupleTypeSpecifier", "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } - } - ] - }, - "element": [ - { - "name": "skipped", - "value": { - "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperContains not implemented", - "annotation": [] - } - } - ] - } - }, - { - "name": "TimeProperContainsFalse", - "value": { - "type": "Tuple", - "annotation": [], - "resultTypeSpecifier": { - "type": "TupleTypeSpecifier", - "annotation": [], - "element": [ + }, { - "name": "skipped", + "name": "output", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } ] - }, - "element": [ - { - "name": "skipped", - "value": { - "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperContains not implemented", - "annotation": [] - } - } - ] + } } - }, + ] + }, + "element": [ { - "name": "TimeProperContainsNull", + "name": "TimeProperContainsTrue", "value": { "type": "Tuple", "annotation": [], @@ -68634,45 +68674,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } - } - ] - }, - "element": [ - { - "name": "skipped", - "value": { - "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperContains not implemented", - "annotation": [] - } - } - ] - } - }, - { - "name": "TimeProperContainsPrecisionTrue", - "value": { - "type": "Tuple", - "annotation": [], - "resultTypeSpecifier": { - "type": "TupleTypeSpecifier", - "annotation": [], - "element": [ + }, { - "name": "skipped", + "name": "output", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68680,13 +68695,593 @@ }, "element": [ { - "name": "skipped", + "name": "expression", "value": { - "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperContains not implemented", - "annotation": [] + "type": "ProperContains", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + }, + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + } + ] + } + }, + { + "name": "output", + "value": { + "type": "Literal", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "true", + "annotation": [] + } + } + ] + } + }, + { + "name": "TimeProperContainsFalse", + "value": { + "type": "Tuple", + "annotation": [], + "resultTypeSpecifier": { + "type": "TupleTypeSpecifier", + "annotation": [], + "element": [ + { + "name": "expression", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + } + ] + }, + "element": [ + { + "name": "expression", + "value": { + "type": "ProperContains", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + }, + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + } + ] + } + }, + { + "name": "output", + "value": { + "type": "Literal", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "false", + "annotation": [] + } + } + ] + } + }, + { + "name": "TimeProperContainsNull", + "value": { + "type": "Tuple", + "annotation": [], + "resultTypeSpecifier": { + "type": "TupleTypeSpecifier", + "annotation": [], + "element": [ + { + "name": "expression", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", + "annotation": [] + } + } + ] + }, + "element": [ + { + "name": "expression", + "value": { + "type": "ProperContains", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + }, + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + } + ] + } + }, + { + "name": "output", + "value": { + "type": "Null", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Any", + "annotation": [] + } + } + ] + } + }, + { + "name": "TimeProperContainsPrecisionTrue", + "value": { + "type": "Tuple", + "annotation": [], + "resultTypeSpecifier": { + "type": "TupleTypeSpecifier", + "annotation": [], + "element": [ + { + "name": "expression", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + } + ] + }, + "element": [ + { + "name": "expression", + "value": { + "type": "ProperContains", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "precision": "Second", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + }, + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + } + ] + } + }, + { + "name": "output", + "value": { + "type": "Literal", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "true", + "annotation": [] } } ] @@ -68702,11 +69297,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68714,12 +69318,123 @@ }, "element": [ { - "name": "skipped", + "name": "expression", + "value": { + "type": "ProperContains", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "precision": "Second", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + }, + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + } + ] + } + }, + { + "name": "output", "value": { "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperContains not implemented", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "false", "annotation": [] } } @@ -68736,24 +69451,142 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } - ] - }, - "element": [ + ] + }, + "element": [ + { + "name": "expression", + "value": { + "type": "ProperContains", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "precision": "Millisecond", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + }, + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + } + ] + } + }, { - "name": "skipped", + "name": "output", "value": { - "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperContains not implemented", + "type": "Null", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -68780,11 +69613,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68799,11 +69641,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68818,11 +69669,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -68837,11 +69697,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68856,11 +69725,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68875,11 +69753,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -68903,11 +69790,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68922,11 +69818,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68941,11 +69846,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -68960,11 +69874,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68979,11 +69902,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -68998,11 +69930,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -69022,24 +69963,149 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } - ] - }, - "element": [ + ] + }, + "element": [ + { + "name": "expression", + "value": { + "type": "ProperIn", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + } + ] + } + }, { - "name": "skipped", + "name": "output", "value": { "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperIn not implemented", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "true", "annotation": [] } } @@ -69056,11 +70122,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -69068,12 +70143,128 @@ }, "element": [ { - "name": "skipped", + "name": "expression", + "value": { + "type": "ProperIn", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + } + ] + } + }, + { + "name": "output", "value": { "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperIn not implemented", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "false", "annotation": [] } } @@ -69090,11 +70281,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -69102,12 +70302,120 @@ }, "element": [ { - "name": "skipped", + "name": "expression", "value": { - "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperIn not implemented", + "type": "ProperIn", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + } + ] + } + }, + { + "name": "output", + "value": { + "type": "Null", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -69124,11 +70432,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -69136,12 +70453,123 @@ }, "element": [ { - "name": "skipped", + "name": "expression", + "value": { + "type": "ProperIn", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "precision": "Second", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + } + ] + } + }, + { + "name": "output", "value": { "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperIn not implemented", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "true", "annotation": [] } } @@ -69158,11 +70586,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", "annotation": [] } } @@ -69170,12 +70607,123 @@ }, "element": [ { - "name": "skipped", + "name": "expression", + "value": { + "type": "ProperIn", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "precision": "Second", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + } + ] + } + }, + { + "name": "output", "value": { "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperIn not implemented", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "false", "annotation": [] } } @@ -69192,11 +70740,20 @@ "annotation": [], "element": [ { - "name": "skipped", + "name": "expression", "annotation": [], "elementType": { "type": "NamedTypeSpecifier", - "name": "{urn:hl7-org:elm-types:r1}String", + "name": "{urn:hl7-org:elm-types:r1}Boolean", + "annotation": [] + } + }, + { + "name": "output", + "annotation": [], + "elementType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -69204,12 +70761,121 @@ }, "element": [ { - "name": "skipped", + "name": "expression", "value": { - "type": "Literal", - "resultTypeName": "{urn:hl7-org:elm-types:r1}String", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "ProperIn not implemented", + "type": "ProperIn", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Boolean", + "precision": "Millisecond", + "annotation": [], + "signature": [], + "operand": [ + { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + } + }, + { + "type": "Interval", + "lowClosed": true, + "highClosed": true, + "annotation": [], + "resultTypeSpecifier": { + "type": "IntervalTypeSpecifier", + "annotation": [], + "pointType": { + "type": "NamedTypeSpecifier", + "name": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [] + } + }, + "low": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "12", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "0", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "annotation": [] + } + }, + "high": { + "type": "Time", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Time", + "annotation": [], + "signature": [], + "hour": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "21", + "annotation": [] + }, + "minute": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "second": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "59", + "annotation": [] + }, + "millisecond": { + "type": "Literal", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "999", + "annotation": [] + } + } + } + ] + } + }, + { + "name": "output", + "value": { + "type": "Null", + "resultTypeName": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } } @@ -79950,11 +81616,11 @@ "annotation": [], "resultTypeSpecifier": { "type": "IntervalTypeSpecifier", - "localId": "14851", + "localId": "15143", "annotation": [], "pointType": { "type": "NamedTypeSpecifier", - "localId": "14852", + "localId": "15144", "name": "{urn:hl7-org:elm-types:r1}Any", "annotation": [] } diff --git a/test/spec-tests/cql/CqlListOperatorsTest.cql b/test/spec-tests/cql/CqlListOperatorsTest.cql index a93e2b3b8..91e1a8850 100644 --- a/test/spec-tests/cql/CqlListOperatorsTest.cql +++ b/test/spec-tests/cql/CqlListOperatorsTest.cql @@ -4,17 +4,13 @@ context Patient define "Sort": Tuple{ "simpleSortAsc": Tuple{ - skipped: 'Wrong output: Queries return distinct lists by default; need to use "all" to retain duplicates' - /* expression: ({4, 5, 1, 6, 2, 1}) sL sort asc, output: {1, 1, 2, 4, 5, 6} - */ }, + }, "simpleSortDesc": Tuple{ - skipped: 'Wrong output: Queries return distinct lists by default; need to use "all" to retain duplicates' - /* expression: ({4, 5, 1, 6, 2, 1}) sL sort desc, output: {6, 5, 4, 2, 1, 1} - */ }, + }, "simpleSortStringAsc": Tuple{ expression: ({'back', 'aardvark', 'alligator', 'zebra', 'iguana', 'Wolf', 'Armadillo'}) sls sort asc, output: {'Armadillo', 'Wolf', 'aardvark', 'alligator', 'back', 'iguana', 'zebra'} @@ -83,18 +79,16 @@ define "Contains": Tuple{ output: false }, "ContainsNullLeft": Tuple{ - expression: null contains 'a', + expression: null as List contains 'a', output: false } } define "Descendents": Tuple{ "DescendentsEmptyList": Tuple{ - skipped: 'Descendents not implemented' - /* expression: (null).descendents(), output: null - */ } + } } define "Distinct": Tuple{ @@ -138,11 +132,9 @@ define "Distinct": Tuple{ define "Equal": Tuple{ "EqualNullNull": Tuple{ - skipped: 'Wrong output: According to spec, if either list contains a null, the result is null' - /* expression: {null} = {null}, output: true - */ }, + }, "EqualEmptyListNull": Tuple{ expression: {} as List = null, output: null @@ -164,15 +156,15 @@ define "Equal": Tuple{ output: false }, "EqualABCAnd123": Tuple{ - expression: { 'a', 'b', 'c' } = { 1, 2, 3 }, + expression: { 'a', 'b', 'c' } as List ~ { 1, 2, 3 } as List, output: false }, "Equal123AndABC": Tuple{ - expression: { 1, 2, 3 } = { 'a', 'b', 'c' }, + expression: { 1, 2, 3 } as List = { 'a', 'b', 'c' } as List, output: false }, "Equal123AndString123": Tuple{ - expression: { 1, 2, 3 } = { '1', '2', '3' }, + expression: { 1, 2, 3 } as List = { '1', '2', '3' } as List, output: false }, "Equal12And123": Tuple{ @@ -323,7 +315,7 @@ define "In": Tuple{ output: true }, "In1Null": Tuple{ - expression: 1 in null, + expression: 1 in null as List, output: false }, "In1And12": Tuple{ @@ -390,15 +382,13 @@ define "Includes": Tuple{ output: false }, "IncludesNullLeft": Tuple{ - expression: null includes {2}, + expression: null as List includes {2}, output: null }, "IncludesNullRight": Tuple{ - skipped: 'Treats null as point overload, translating to "Contains" operator, which has different semantics (and different result)' - /* - expression: {'s', 'a', 'm'} includes null, + expression: {'s', 'a', 'm'} includes null as List, output: null - */ } + } } define "IncludedIn": Tuple{ @@ -439,17 +429,13 @@ define "IncludedIn": Tuple{ output: false }, "IncludedInNullLeft": Tuple{ - skipped: 'Treats null as point overload, translating to "In" operator, which has different semantics (and different result)' - /* - expression: null included in {2}, + expression: null as List included in {2}, output: null - */ }, + }, "IncludedInNullRight": Tuple{ - skipped: 'Converts included in to in, which has different semantics when second argument is null' - /* - expression: {'s', 'a', 'm'} included in null, + expression: {'s', 'a', 'm'} included in null as List, output: null - */ } + } } define "Indexer": Tuple{ @@ -613,15 +599,15 @@ define "Equivalent": Tuple{ output: false }, "EquivalentABCAnd123": Tuple{ - expression: { 'a', 'b', 'c' } ~ { 1, 2, 3 }, + expression: { 'a', 'b', 'c' } as List ~ { 1, 2, 3 } as List, output: false }, "Equivalent123AndABC": Tuple{ - expression: { 1, 2, 3 } ~ { 'a', 'b', 'c' }, + expression: { 1, 2, 3 } as List ~ { 'a', 'b', 'c' } as List, output: false }, "Equivalent123AndString123": Tuple{ - expression: { 1, 2, 3 } ~ { '1', '2', '3' }, + expression: { 1, 2, 3 } as List ~ { '1', '2', '3' } as List, output: false }, "EquivalentDateTimeTrue": Tuple{ @@ -664,15 +650,15 @@ define "NotEqual": Tuple{ output: true }, "NotEqualABCAnd123": Tuple{ - expression: { 'a', 'b', 'c' } != { 1, 2, 3 }, + expression: { 'a', 'b', 'c' } as List != { 1, 2, 3 } as List, output: true }, "NotEqual123AndABC": Tuple{ - expression: { 1, 2, 3 } != { 'a', 'b', 'c' }, + expression: { 1, 2, 3 } as List != { 'a', 'b', 'c' } as List, output: true }, "NotEqual123AndString123": Tuple{ - expression: { 1, 2, 3 } != { '1', '2', '3' }, + expression: { 1, 2, 3 } as List != { '1', '2', '3' } as List, output: true }, "NotEqualDateTimeTrue": Tuple{ @@ -694,57 +680,121 @@ define "NotEqual": Tuple{ } define "ProperContains": Tuple{ + "ProperContains1": Tuple{ + expression: null as List properly includes 'a', + output: false + }, + "ProperContains2": Tuple{ + expression: {} properly includes 'a', + output: false + }, + "ProperContains3": Tuple{ + expression: { 'a' } properly includes 'a', + output: false + }, + "ProperContains4": Tuple{ + expression: { null } properly includes null as String, + output: false + }, "ProperContainsNullRightFalse": Tuple{ - skipped: 'ProperContains not implemented' - /* - expression: {'s', 'u', 'n'} properly includes null, + expression: {'s', 'u', 'n'} properly includes null as String, output: false - */ }, + }, + "ProperContains5": Tuple{ + expression: { null, null } properly includes null as String, + output: true + }, "ProperContainsNullRightTrue": Tuple{ - skipped: 'ProperContains not implemented' - /* - expression: {'s', 'u', 'n', null} properly includes null, + expression: {'s', 'u', 'n', null} properly includes null as String, output: true - */ }, + }, + "ProperContains6": Tuple{ + expression: { 'a', 'b' } properly includes 'a', + output: true + }, + "ProperContains7": Tuple{ + expression: { 'a', 'a' } properly includes 'a', + output: true + }, + "ProperContains8": Tuple{ + expression: { 'a', 'b' } properly includes 'c', + output: false + }, + "ProperContains9": Tuple{ + expression: { 'a', null } properly includes 'a', + output: true + }, + "ProperContains10": Tuple{ + expression: { 'a', 'b', null } properly includes 'a', + output: true + }, "ProperContainsTimeTrue": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: { @T15:59:59, @T20:59:59.999, @T20:59:49.999 } properly includes @T15:59:59, output: true - */ }, + }, "ProperContainsTimeNull": Tuple{ - skipped: 'ProperContains not implemented' - /* expression: { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 } properly includes @T15:59:59, - output: null - */ } + output: false + } } define "ProperIn": Tuple{ + "ProperIn1": Tuple{ + expression: 'a' properly included in null as List, + output: false + }, + "ProperIn2": Tuple{ + expression: 'a' properly included in {}, + output: false + }, + "ProperIn3": Tuple{ + expression: 'a' properly included in { 'a' }, + output: false + }, + "ProperIn4": Tuple{ + expression: null as String properly included in { null }, + output: false + }, "ProperInNullRightFalse": Tuple{ - skipped: 'ProperIn not implemented' - /* - expression: null properly included in {'s', 'u', 'n'}, + expression: null as String properly included in {'s', 'u', 'n'}, output: false - */ }, + }, + "ProperIn5": Tuple{ + expression: null as String properly included in { null, null }, + output: true + }, "ProperInNullRightTrue": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: null properly included in {'s', 'u', 'n', null}, output: true - */ }, + }, + "ProperIn6": Tuple{ + expression: 'a' properly included in { 'a', 'b' }, + output: true + }, + "ProperIn7": Tuple{ + expression: 'a' properly included in { 'a', 'a' }, + output: true + }, + "ProperIn8": Tuple{ + expression: 'c' properly included in { 'a', 'b' }, + output: false + }, + "ProperIn9": Tuple{ + expression: 'a' properly included in { 'a', null }, + output: true + }, + "ProperIn10": Tuple{ + expression: 'a' properly included in { 'a', 'b', null }, + output: true + }, "ProperInTimeTrue": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T15:59:59 properly included in { @T15:59:59, @T20:59:59.999, @T20:59:49.999 }, output: true - */ }, + }, "ProperInTimeNull": Tuple{ - skipped: 'ProperIn not implemented' - /* expression: @T15:59:59 properly included in { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 }, - output: null - */ } + output: false + } } define "ProperlyIncludes": Tuple{ @@ -785,7 +835,7 @@ define "ProperlyIncludes": Tuple{ output: false }, "ProperlyIncludesNullLeft": Tuple{ - expression: null properly includes {2}, + expression: null as List properly includes {2}, output: null } } @@ -828,11 +878,9 @@ define "ProperlyIncludedIn": Tuple{ output: false }, "ProperlyIncludedInNulRight": Tuple{ - skipped: 'ProperIn not implemented' - /* - expression: {'s', 'u', 'n'} properly included in null, + expression: {'s', 'u', 'n'} properly included in null as List, output: null - */ } + } } define "SingletonFrom": Tuple{ @@ -885,6 +933,49 @@ define "Skip": Tuple{ } } +define "Slice": Tuple{ + "SliceAll": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }), + output: { 1, 2, 3, 4, 5 } + }, + "SliceEmpty": Tuple{ + expression: Slice({ }), + output: { } + }, + "SliceNull": Tuple{ + expression: Slice(null), + output: null + }, + "SliceStart": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }, 1), + output: { 2, 3, 4, 5 } + }, + "SliceStartNull": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }, null), + output: { 1, 2, 3, 4, 5 } + }, + "SliceEnd": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }, 1, 3), + output: { 2, 3 } + }, + "SliceEndNull": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }, 1, null), + output: { 2, 3, 4, 5 } + }, + "SliceNegative": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }, -2), + output: { 4, 5 } + }, + "SliceStartAndNegative": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }, 1, -1), + output: { 2, 3, 4 } + }, + "SlicePast": Tuple{ + expression: Slice({ 1, 2, 3, 4, 5 }, 5), + output: { } + } +} + define "Tail": Tuple{ "TailNull": Tuple{ expression: Tail(null), diff --git a/test/spec-tests/skip-list.txt b/test/spec-tests/skip-list.txt index 1eab0378d..30292a850 100644 --- a/test/spec-tests/skip-list.txt +++ b/test/spec-tests/skip-list.txt @@ -3,17 +3,11 @@ CqlIntervalOperatorsTest.Expand.ExpandPer0D1 Translation Error: Could not # Invalid Translation (translates, but translates wrong) CqlAggregateTest.AggregateTests.RolledOutIntervals CQL adds an integer to a date ("S + duration in days of X"). Should be "S + Quantity{ value: duration in days of X, unit: 'days' }". Translator translates it, but probably shouldn't. -CqlListOperatorsTest.IncludedIn.IncludedInNullRight Converts included in to in, which has different semantics when second argument is null # Potentially Invalid Translation (translates, but potentially translates wrong) -CqlListOperatorsTest.IncludedIn.IncludedInNullLeft Treats null as point overload, translating to "In" operator, which has different semantics (and different result) -CqlListOperatorsTest.Includes.IncludesNullRight Treats null as point overload, translating to "Contains" operator, which has different semantics (and different result) # Incorrect Expected Output CqlIntervalOperatorsTest.In.TestInNullBoundaries Wrong output: According to spec, comparison against null closed boundaries should result in true -CqlListOperatorsTest.Equal.EqualNullNull Wrong output: According to spec, if either list contains a null, the result is null -CqlListOperatorsTest.Sort.simpleSortAsc Wrong output: Queries return distinct lists by default; need to use "all" to retain duplicates -CqlListOperatorsTest.Sort.simpleSortDesc Wrong output: Queries return distinct lists by default; need to use "all" to retain duplicates # Potentially Incorrect Expected Output "CqlStringOperatorsTest.toString tests.DateTimeToString2" Answer does not include timezone offset, but default offset depends on test environment @@ -56,12 +50,6 @@ CqlArithmeticFunctionsTest.HighBoundary HighBoundary not impleme CqlArithmeticFunctionsTest.LowBoundary LowBoundary not implemented CqlArithmeticFunctionsTest.Precision.PrecisionDecimal Precision for Decimal not implemented CqlIntervalOperatorsTest.PointFrom PointFrom not implemented -CqlIntervalOperatorsTest.ProperContains ProperContains not implemented -CqlIntervalOperatorsTest.ProperIn ProperIn not implemented -CqlListOperatorsTest.Descendents Descendents not implemented -CqlListOperatorsTest.ProperContains ProperContains not implemented -CqlListOperatorsTest.ProperIn ProperIn not implemented -CqlListOperatorsTest.ProperlyIncludedIn.ProperlyIncludedInNulRight ProperIn not implemented # Unimplemented (New in CQL 1.5) CqlArithmeticFunctionsTest.Modulo.ModuloQuantity Modulo not implemented for Quantity diff --git a/test/spec-tests/xml/CqlListOperatorsTest.xml b/test/spec-tests/xml/CqlListOperatorsTest.xml index a6065e974..f7d63bfc7 100644 --- a/test/spec-tests/xml/CqlListOperatorsTest.xml +++ b/test/spec-tests/xml/CqlListOperatorsTest.xml @@ -1,916 +1,1308 @@ + + + ({4, 5, 1, 6, 2, 1}) sL sort asc {1, 1, 2, 4, 5, 6} + ({4, 5, 1, 6, 2, 1}) sL sort desc {6, 5, 4, 2, 1, 1} + ({'back', 'aardvark', 'alligator', 'zebra', 'iguana', 'Wolf', 'Armadillo'}) sls sort asc {'Armadillo', 'Wolf', 'aardvark', 'alligator', 'back', 'iguana', 'zebra'} + ({'back', 'aardvark', 'alligator', 'zebra', 'iguana', 'Wolf', 'Armadillo'}) sls sort desc {'zebra', 'iguana', 'back', 'alligator', 'aardvark', 'Wolf', 'Armadillo'} + ({ DateTime(2012, 10, 5, 10), DateTime(2012, 1, 1), DateTime(2012, 1, 1, 12), DateTime(2012, 10, 5) }) S sort asc { @2012-01-01T, @2012-01-01T12, @2012-10-05T, @2012-10-05T10 } + ({ DateTime(2012, 10, 5, 10), DateTime(2012, 1, 1), DateTime(2012, 1, 1, 12), DateTime(2012, 10, 5) }) S sort desc { @2012-10-05T10, @2012-10-05T, @2012-01-01T12, @2012-01-01T } + { 3, 2, 1 } {3, 2, 1} + { 3.8, 2.4, 1.9 } {3.8, 2.4, 1.9} + { 19.99 '[lb_av]', 17.33 '[lb_av]', 10.66 '[lb_av]' } {19.99 '[lb_av]', 17.33 '[lb_av]', 10.66 '[lb_av]'} + { DateTime(2016), DateTime(2015), DateTime(2010) } {@2016T, @2015T, @2010T} + { @T15:59:59.999, @T15:12:59.999, @T15:12:13.999 } {@T15:59:59.999, @T15:12:59.999, @T15:12:13.999} + + { 'a', 'b', null } contains null true + { null, 'b', 'c' } contains 'a' false + { 'a', 'b', 'c' } contains 'a' true + { DateTime(2012, 10, 5), DateTime(2012, 9, 5), DateTime(2012, 1, 1) } contains DateTime(2012, 1, 1) true + { DateTime(2012, 10, 5), DateTime(2012, 9, 5), DateTime(2012, 10, 1) } contains DateTime(2012, 1, 1) false + { @T15:59:59.999, @T05:59:59.999, @T20:59:59.999 } contains @T05:59:59.999 true + { @T15:59:59.999, @T05:59:59.999, @T20:59:59.999 } contains @T08:59:59.999 false - null contains 'a' + + null as List<String> contains 'a' false + + (null).descendents() null + + distinct {} {} + distinct { null, null, null} { null } + distinct { 'a', null, 'a', null} {'a', null} + distinct { 1, 1, 2, 2, 3, 3} {1,2,3} + distinct { 1, 2, 3, 1, 2, 3} {1,2,3} + distinct { 'a', 'a', 'b', 'b', 'c', 'c'} {'a','b','c'} + distinct { 'a', 'b', 'c', 'a', 'b', 'c'} {'a','b','c'} + distinct { DateTime(2012, 10, 5), DateTime(2012, 1, 1), DateTime(2012, 1, 1)} { @2012-10-05T, @2012-01-01T } + distinct { @T15:59:59.999, @T20:59:59.999 } { @T15:59:59.999, @T20:59:59.999 } + + {null} = {null} true + {} as List<String> = null null + null = {} as List<String> null + {} = {} true + { 'a', 'b', 'c' } = { 'a', 'b', 'c' } true + { 'a', 'b', 'c' } = { 'a', 'b' } false - { 'a', 'b', 'c' } = { 1, 2, 3 } + + { 'a', 'b', 'c' } as List<Any> ~ { 1, 2, 3 } as List<Any> false - { 1, 2, 3 } = { 'a', 'b', 'c' } + + { 1, 2, 3 } as List<Any> = { 'a', 'b', 'c' } as List<Any> false - { 1, 2, 3 } = { '1', '2', '3' } + + { 1, 2, 3 } as List<Any> = { '1', '2', '3' } as List<Any> false + { 1, 2 } = { 1, 2, 3 } false + { 1, 2, 3 } = { 1, 2 } false + { 1, 2, 3 } = { 1, 2, 3 } true + {DateTime(2012, 5, 10, 0, 0, 0, 0), DateTime(2014, 12, 10, 0, 0, 0, 0)} = {DateTime(2012, 5, 10, 0, 0, 0, 0), DateTime(2014, 12, 10, 0, 0, 0, 0)} true + {DateTime(2012, 5, 10, 0, 0, 0, 0), DateTime(2014, 12, 10, 0, 0, 0, 0)} = {DateTime(2012, 1, 10, 0, 0, 0, 0), DateTime(2014, 12, 10, 0, 0, 0, 0)} false + { @T15:59:59.999, @T20:59:59.999, @T20:59:59.999 } = { @T15:59:59.999, @T20:59:59.999, @T20:59:59.999 } true + { @T15:59:59.999, @T20:59:59.999, @T20:59:59.999 } = { @T10:59:59.999, @T20:59:59.999, @T20:59:59.999 } false + + {} except {} {} + { 1, 2, 3, 4 } except { 2, 3 } { 1, 4 } + { 2, 3 } except { 1, 2, 3, 4 } {} + { DateTime(2012, 5, 10), DateTime(2014, 12, 10), DateTime(2010, 1, 1)} except {DateTime(2014, 12, 10), DateTime(2010, 1, 1) } {@2012-05-10T} + { @T15:59:59.999, @T20:59:59.999, @T12:59:59.999 } except { @T20:59:59.999, @T12:59:59.999 } {@T15:59:59.999} + { 1, 4 } except null {1, 4} + + Exists({}) false + Exists({ null }) false + Exists({ 1 }) true + Exists({ 1, 2 }) true + Exists({ DateTime(2012, 5, 10), DateTime(2014, 12, 10) }) true + Exists({ @T15:59:59.999, @T20:59:59.999 }) true + Exists(null) false + + Flatten({{},{}}) {} + Flatten({{null}, {null}}) {null, null} + Flatten({{1,2}, {3,4}}) {1,2,3,4} + Flatten({ {DateTime(2012, 5, 10)}, {DateTime(2014, 12, 10)} }) { @2012-05-10T, @2014-12-10T } + Flatten({ {@T15:59:59.999}, {@T20:59:59.999} }) { @T15:59:59.999, @T20:59:59.999 } + + First({}) null + First({ null, 1 }) null + First({ 1, null }) 1 + First({ 1, 2 }) 1 + First({ DateTime(2012, 5, 10), DateTime(2014, 12, 10) }) @2012-05-10T + First({ @T15:59:59.999, @T20:59:59.999 }) @T15:59:59.999 + + null in {} false + null in { 1, null } true - 1 in null + + 1 in null as List<Integer> false + 1 in { 1, 2 } true + 3 in { 1, 2 } false + DateTime(2012, 5, 10) in { DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10) } true + DateTime(2012, 6, 10) in { DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10) } false + @T15:59:59.999 in { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 } true + @T16:59:59.999 in { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 } false + + {} includes {} true + {null} includes {null} true + {1, 2, 3} includes {} true + {1, 2, 3} includes {2} true + {1, 2, 3} includes {4} false + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} includes {DateTime(2012, 5, 10)} true + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} includes {DateTime(2012, 5, 11)} false + { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 } includes @T15:59:59.999 true + { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 } includes @T16:59:59.999 false - null includes {2} + + null as List<Integer> includes {2} null - - {'s', 'a', 'm'} includes null + + {'s', 'a', 'm'} includes null as List<String> null + + {} included in {} true + { null } included in { null } true + {} included in { 1, 2, 3 } true + { 2 } included in { 1, 2, 3 } true + { 4 } included in { 1, 2, 3 } false + { DateTime(2012, 5, 10)} included in {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} true + {DateTime(2012, 5, 11)} included in {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} false + @T15:59:59.999 included in { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 } true + @T16:59:59.999 included in { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 } false - - null included in {2} + + null as List<Integer> included in {2} null - {'s', 'a', 'm'} included in null + + {'s', 'a', 'm'} included in null as List<String> null + + (null as List<System.Any>)[1] null + { 1, 2 }[0] 1 + { 1, 2 }[1] 2 + { 1, 2 }[2] null + { 1, 2 }[-1] null + { DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10) }[1] @2012-05-10T + { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 }[1] @T15:59:59.999 + + IndexOf({}, null) null + IndexOf(null, {}) null + IndexOf({ 1, null }, null) null + IndexOf({ 1, 2 }, 1) 0 + IndexOf({ 1, 2 }, 2) 1 + IndexOf({ 1, 2 }, 3) -1 + IndexOf({ DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10) }, DateTime(2014, 12, 10)) 2 + IndexOf({ @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 }, @T15:59:59.999) 1 + + {} intersect {} {} + { 1, 2, 3, 4 } intersect { 2, 3 } { 2, 3 } + {2, 3} intersect { 1, 2, 3, 4 } { 2, 3 } + { DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10) } intersect { DateTime(2012, 5, 10), DateTime(2014, 12, 10), DateTime(2000, 5, 5) } {@2012-05-10T, @2014-12-10T} + { @T02:29:15.156, @T15:59:59.999, @T20:59:59.999 } intersect { @T01:29:15.156, @T15:59:59.999, @T20:59:59.999 } {@T15:59:59.999, @T20:59:59.999} + + Last({}) null + Last({null, 1}) 1 + Last({1, null}) null + Last({1, 2}) 2 + Last({DateTime(2012, 5, 10), DateTime(2014, 12, 10)}) @2014-12-10T + Last({ @T15:59:59.999, @T20:59:59.999 }) @T20:59:59.999 + + Length({}) 0 + Length({null, 1}) 2 + Length({1, null}) 2 + Length({1, 2}) 2 + Length({DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)}) 3 + Length({ @T15:59:59.999, @T20:59:59.999, @T15:59:59.999, @T20:59:59.999, @T15:59:59.999, @T20:59:59.999 }) 6 + Length(null as List<Any>) 0 + + {} ~ {} true + { 'a', 'b', 'c' } ~ { 'a', 'b', 'c' } true + { 'a', 'b', 'c' } ~ { 'a', 'b' } false - { 'a', 'b', 'c' } ~ { 1, 2, 3 } + + { 'a', 'b', 'c' } as List<Any> ~ { 1, 2, 3 } as List<Any> false - { 1, 2, 3 } ~ { 'a', 'b', 'c' } + + { 1, 2, 3 } as List<Any> ~ { 'a', 'b', 'c' } as List<Any> false - { 1, 2, 3 } ~ { '1', '2', '3' } + + { 1, 2, 3 } as List<Any> ~ { '1', '2', '3' } as List<Any> false + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10), null} ~ {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10), null} true + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} ~ {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10), null} false + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} ~ {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 1)} false + { @T15:59:59.999, @T20:59:59.999 } ~ { @T15:59:59.999, @T20:59:59.999 } true + { @T15:59:59.999, @T20:59:59.999 } ~ { @T15:59:59.999, @T20:59:59.999, null } false + { @T15:59:59.999, @T20:59:59.999 } ~ { @T15:59:59.999, @T20:59:59.995 } false + + {} != {} false + { 'a', 'b', 'c' } != { 'a', 'b', 'c' } false + { 'a', 'b', 'c' } != { 'a', 'b' } true - { 'a', 'b', 'c' } != { 1, 2, 3 } + + { 'a', 'b', 'c' } as List<Any> != { 1, 2, 3 } as List<Any> true - { 1, 2, 3 } != { 'a', 'b', 'c' } + + { 1, 2, 3 } as List<Any> != { 'a', 'b', 'c' } as List<Any> true - { 1, 2, 3 } != { '1', '2', '3' } + + { 1, 2, 3 } as List<Any> != { '1', '2', '3' } as List<Any> true + {DateTime(2001, 9, 11, 0, 0, 0, 0), DateTime(2012, 5, 10, 0, 0, 0, 0), DateTime(2014, 12, 10, 0, 0, 0, 0)} != {DateTime(2001, 9, 11, 0, 0, 0, 0), DateTime(2012, 5, 10, 0, 0, 0, 0), DateTime(2014, 12, 1, 0, 0, 0, 0)} true + {DateTime(2001, 9, 11, 0, 0, 0, 0), DateTime(2012, 5, 10, 0, 0, 0, 0), DateTime(2014, 12, 10, 0, 0, 0, 0)} != {DateTime(2001, 9, 11, 0, 0, 0, 0), DateTime(2012, 5, 10, 0, 0, 0, 0), DateTime(2014, 12, 10, 0, 0, 0, 0)} false + { @T15:59:59.999, @T20:59:59.999 } = { @T15:59:59.999, @T20:59:59.999 } true + { @T15:59:59.999, @T20:59:59.999 } = { @T15:59:59.999, @T20:59:49.999 } false + + + + null as List<String> properly includes 'a' + false + + + + {} properly includes 'a' + false + + + + { 'a' } properly includes 'a' + false + + + + { null } properly includes null as String + false + - {'s', 'u', 'n'} properly includes null + + {'s', 'u', 'n'} properly includes null as String false + + + { null, null } properly includes null as String + true + - {'s', 'u', 'n', null} properly includes null + + {'s', 'u', 'n', null} properly includes null as String + true + + + + { 'a', 'b' } properly includes 'a' + true + + + + { 'a', 'a' } properly includes 'a' + true + + + + { 'a', 'b' } properly includes 'c' + false + + + + { 'a', null } properly includes 'a' + true + + + + { 'a', 'b', null } properly includes 'a' true + { @T15:59:59, @T20:59:59.999, @T20:59:49.999 } properly includes @T15:59:59 true + { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 } properly includes @T15:59:59 - null + false + + + + 'a' properly included in null as List<String> + false + + + + 'a' properly included in {} + false + + + + 'a' properly included in { 'a' } + false + + + + null as String properly included in { null } + false + - null properly included in {'s', 'u', 'n'} + + null as String properly included in {'s', 'u', 'n'} false + + + null as String properly included in { null, null } + true + + null properly included in {'s', 'u', 'n', null} true + + + 'a' properly included in { 'a', 'b' } + true + + + + 'a' properly included in { 'a', 'a' } + true + + + + 'c' properly included in { 'a', 'b' } + false + + + + 'a' properly included in { 'a', null } + true + + + + 'a' properly included in { 'a', 'b', null } + true + + @T15:59:59 properly included in { @T15:59:59, @T20:59:59.999, @T20:59:49.999 } true + @T15:59:59 properly included in { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 } - null + false + + {} properly includes {} false + {null} properly includes {null} false + {1, 2, 3} properly includes {} true + {1, 2, 3} properly includes {2} true + {1, 2, 3} properly includes {4} false + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} properly includes {DateTime(2012, 5, 10), DateTime(2014, 12, 10)} true + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} properly includes {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} false + { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 } properly includes { @T15:59:59.999, @T20:59:59.999 } true + { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 } properly includes { @T15:59:59.999, @T20:59:59.999, @T14:59:22.999 } false - null properly includes {2} + + null as List<Integer> properly includes {2} null + + {} properly included in {} false + {null} properly included in {null} false + {} properly included in {1, 2, 3} true + {2} properly included in {1, 2, 3} true + {4} properly included in {1, 2, 3} false + {DateTime(2012, 5, 10), DateTime(2014, 12, 10)} properly included in {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} true + {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} properly included in {DateTime(2001, 9, 11), DateTime(2012, 5, 10), DateTime(2014, 12, 10)} false + { @T15:59:59.999, @T20:59:59.999 } properly included in { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 } true + { @T15:59:59.999, @T20:59:59.999, @T14:59:22.999 } properly included in { @T15:59:59.999, @T20:59:59.999, @T20:59:49.999 } false - {'s', 'u', 'n'} properly included in null + + {'s', 'u', 'n'} properly included in null as List<String> null + + singleton from {} null + singleton from {null} null + singleton from { 1 } 1 + singleton from { 1, 2 } + singleton from { DateTime(2012, 5, 10) } @2012-05-10T + singleton from { @T15:59:59.999 } @T15:59:59.999 + + Skip(null, 3) null + Skip({1,2,3,4,5}, 2) {3, 4, 5} + Skip({1,2,3,4,5}, 3) {4, 5} + Skip({1,2,3,4,5}, 0) {1,2,3,4,5} + Skip({1,2,3,4,5}, 5) {} + + + + + Slice({ 1, 2, 3, 4, 5 }) + { 1, 2, 3, 4, 5 } + + + + Slice({ }) + { } + + + + Slice(null) + null + + + + Slice({ 1, 2, 3, 4, 5 }, 1) + { 2, 3, 4, 5 } + + + + Slice({ 1, 2, 3, 4, 5 }, null) + { 1, 2, 3, 4, 5 } + + + + Slice({ 1, 2, 3, 4, 5 }, 1, 3) + { 2, 3 } + + + + Slice({ 1, 2, 3, 4, 5 }, 1, null) + { 2, 3, 4, 5 } + + + + Slice({ 1, 2, 3, 4, 5 }, -2) + { 4, 5 } + + + + Slice({ 1, 2, 3, 4, 5 }, 1, -1) + { 2, 3, 4 } + + + + Slice({ 1, 2, 3, 4, 5 }, 5) + { } + + + + Tail(null) null + Tail({1,2,3,4}) {2,3,4} + Tail({1,2,3,4,5}) {2,3,4,5} + Tail({}) {} + Tail({1}) {} + + Take(null, 3) null + Take({1,2,3}, null as Integer) {} + Take({1,2,3}, 0) {} + Take({1,2,3,4}, 2) {1, 2} + Take({1,2,3,4}, 3) {1, 2, 3} + Take({1,2,3,4}, 4) {1, 2, 3, 4} + + {} union {} {} + { null } union { null } {null} + { 1, 2, 3 } union {} {1, 2, 3} + { 1, 2, 3 } union { 2 } {1, 2, 3} + { 1, 2, 3 } union { 4 } {1, 2, 3, 4} + { DateTime(2001, 9, 11)} union {DateTime(2012, 5, 10), DateTime(2014, 12, 10) } {@2001-09-11T, @2012-05-10T, @2014-12-10T} + { @T15:59:59.999, @T20:59:59.999, @T12:59:59.999 } union { @T10:59:59.999 } {@T15:59:59.999, @T20:59:59.999, @T12:59:59.999, @T10:59:59.999} From 7f54a3765c086f11d0d28eedabb4c8cf4ecb3f0c Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Tue, 30 Jun 2026 12:47:17 -0400 Subject: [PATCH 2/9] Add a couple extra comments --- src/elm/list.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/elm/list.ts b/src/elm/list.ts index 8db510fbe..eae7018b1 100644 --- a/src/elm/list.ts +++ b/src/elm/list.ts @@ -141,7 +141,13 @@ export function doContains(container: any[], item: any) { ); } +// Delegated to by overloaded#ProperContains and overloaded#ProperIn export function doProperContains(container: any[], item: any) { + // The "proper" membership operators have list semantics, not set semantics. + // The intent here is that given list semantics and a `distinct` operator, + // one can achieve set semantics, but the reverse isn't possible. + // These proper membership operators can then be described as + // the regular membership operators, plus the list is strictly larger. return container.length > 1 && doContains(container, item); } From 2511d45950de575f67324dd87321e91f9cbef9ce Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Tue, 30 Jun 2026 12:50:06 -0400 Subject: [PATCH 3/9] One more comment, plus regenerate cql4browsers --- examples/browser/cql4browsers.js | 7 +++++++ src/elm/interval.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/examples/browser/cql4browsers.js b/examples/browser/cql4browsers.js index 8e7bd7de6..ea530f20c 100644 --- a/examples/browser/cql4browsers.js +++ b/examples/browser/cql4browsers.js @@ -5072,6 +5072,7 @@ exports.Interval = Interval; function doContains(interval, item, precision) { return interval.contains(item, precision); } +// Delegated to by overloaded#ProperContains and overloaded#ProperIn function doProperContains(interval, item, precision) { return interval.properContains(item, precision); } @@ -6016,7 +6017,13 @@ exports.IndexOf = IndexOf; function doContains(container, item) { return container.some((element) => (0, comparison_1.equals)(element, item) || (element == null && item == null)); } +// Delegated to by overloaded#ProperContains and overloaded#ProperIn function doProperContains(container, item) { + // The "proper" membership operators have list semantics, not set semantics. + // The intent here is that given list semantics and a `distinct` operator, + // one can achieve set semantics, but the reverse isn't possible. + // These proper membership operators can then be described as + // the regular membership operators, plus the list is strictly larger. return container.length > 1 && doContains(container, item); } // Delegated to by overloaded#Includes and overloaded@IncludedIn diff --git a/src/elm/interval.ts b/src/elm/interval.ts index 0d683c1a2..694d2fe94 100644 --- a/src/elm/interval.ts +++ b/src/elm/interval.ts @@ -67,6 +67,7 @@ export function doContains(interval: any, item: any, precision?: any) { return interval.contains(item, precision); } +// Delegated to by overloaded#ProperContains and overloaded#ProperIn export function doProperContains(interval: any, item: any, precision?: any) { return interval.properContains(item, precision); } From 6dd5a91396c23668de4017e795c46ceb5e3093e7 Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Tue, 30 Jun 2026 13:09:11 -0400 Subject: [PATCH 4/9] Fix Interval properContains per a closer reading of the spec --- examples/browser/cql4browsers.js | 16 +--------------- src/datatypes/interval.ts | 16 ++-------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/examples/browser/cql4browsers.js b/examples/browser/cql4browsers.js index ea530f20c..6042a9034 100644 --- a/examples/browser/cql4browsers.js +++ b/examples/browser/cql4browsers.js @@ -1895,21 +1895,7 @@ class Interval { if (item != null && item.isInterval) { throw new Error('Argument to contains must be a point'); } - let lowFn; - if (this.lowClosed && this.low == null) { - lowFn = () => true; - } - else { - lowFn = cmp.lessThan; - } - let highFn; - if (this.highClosed && this.high == null) { - highFn = () => true; - } - else { - highFn = cmp.greaterThan; - } - return logic_1.ThreeValuedLogic.and(lowFn(this.low, item, precision), highFn(this.high, item, precision)); + return logic_1.ThreeValuedLogic.and(cmp.lessThan(this.start(), item, precision), cmp.greaterThan(this.end(), item, precision)); } properlyIncludes(other, precision) { if (other == null || !other.isInterval) { diff --git a/src/datatypes/interval.ts b/src/datatypes/interval.ts index f89b24189..d8fc36ff8 100644 --- a/src/datatypes/interval.ts +++ b/src/datatypes/interval.ts @@ -118,21 +118,9 @@ export class Interval { if (item != null && item.isInterval) { throw new Error('Argument to contains must be a point'); } - let lowFn; - if (this.lowClosed && this.low == null) { - lowFn = () => true; - } else { - lowFn = cmp.lessThan; - } - let highFn; - if (this.highClosed && this.high == null) { - highFn = () => true; - } else { - highFn = cmp.greaterThan; - } return ThreeValuedLogic.and( - lowFn(this.low, item, precision), - highFn(this.high, item, precision) + cmp.lessThan(this.start(), item, precision), + cmp.greaterThan(this.end(), item, precision) ); } From aa2dcb251552839a1ed012e02839a6165de7cefb Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Tue, 30 Jun 2026 16:22:44 -0400 Subject: [PATCH 5/9] Add a bunch more tests --- test/datatypes/interval-test.ts | 159 +++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 1 deletion(-) diff --git a/test/datatypes/interval-test.ts b/test/datatypes/interval-test.ts index d6c34480c..ebe0d0cf9 100644 --- a/test/datatypes/interval-test.ts +++ b/test/datatypes/interval-test.ts @@ -1,5 +1,5 @@ import should from 'should'; -import { DateTime } from '../../src/datatypes/datetime'; +import { DateTime, MIN_DATETIME_VALUE, MAX_DATETIME_VALUE } from '../../src/datatypes/datetime'; import { Interval } from '../../src/datatypes/interval'; import { Uncertainty } from '../../src/datatypes/uncertainty'; import { ELM_DECIMAL_TYPE } from '../../src/util/elmTypes'; @@ -120,6 +120,86 @@ describe('DateTimeInterval', () => { }); }); + describe('properContains', () => { + let d: any; + beforeEach(() => { + d = data(); + }); + + it('should properly calculate dates before it', () => { + d.all2012.closed.properContains(d.bef2012.full).should.be.false(); + }); + + it('should properly calculate the left boundary date', () => { + d.all2012.closed.properContains(d.beg2012.full).should.be.false(); + d.all2012.open.properContains(d.beg2012.full).should.be.false(); + }); + + it('should properly calculate dates in the middle of it', () => { + d.all2012.closed.properContains(d.mid2012.full).should.be.true(); + }); + + it('should properly calculate the right boundary date', () => { + d.all2012.closed.properContains(d.end2012.full).should.be.false(); + d.all2012.open.properContains(d.end2012.full).should.be.false(); + }); + + it('should properly calculate dates after it', () => { + d.all2012.closed.properContains(d.aft2012.full).should.be.false(); + }); + + it('should properly handle null endpoints', () => { + const date = DateTime.parse('2012-01-01T00:00:00.0'); + const minDate = MIN_DATETIME_VALUE; + const early = DateTime.parse('2000-01-01T00:00:00.0'); + const late = DateTime.parse('2999-01-01T00:00:00.0'); + const maxDate = MAX_DATETIME_VALUE; + new Interval(null, date).properContains(minDate).should.be.false(); + new Interval(null, date).properContains(early).should.be.true(); + new Interval(null, date).properContains(late).should.be.false(); + new Interval(null, date, false, true).properContains(date).should.be.false(); + should(new Interval(null, date, false, true).properContains(early)).be.null(); + new Interval(null, date, false, true).properContains(late).should.be.false(); + new Interval(date, null).properContains(late).should.be.true(); + new Interval(date, null).properContains(early).should.be.false(); + new Interval(date, null).properContains(maxDate).should.be.false(); + new Interval(date, null, true, false).properContains(date).should.be.false(); + should(new Interval(date, null, true, false).properContains(late)).be.null(); + new Interval(date, null, true, false).properContains(early).should.be.false(); + }); + + it('should properly handle imprecision', () => { + d.all2012.closed.properContains(d.bef2012.toMonth).should.be.false(); + should.not.exist(d.all2012.closed.properContains(d.beg2012.toMonth)); + d.all2012.closed.properContains(d.mid2012.toMonth).should.be.true(); + should.not.exist(d.all2012.closed.properContains(d.end2012.toMonth)); + d.all2012.closed.properContains(d.aft2012.toMonth).should.be.false(); + + d.all2012.toMonth.properContains(d.bef2012.toMonth).should.be.false(); + d.all2012.toMonth.properContains(d.beg2012.toMonth).should.be.false(); + d.all2012.toMonth.properContains(d.mid2012.toMonth).should.be.true(); + d.all2012.toMonth.properContains(d.end2012.toMonth).should.be.false(); + d.all2012.toMonth.properContains(d.aft2012.toMonth).should.be.false(); + + d.all2012.toMonth.properContains(d.bef2012.full).should.be.false(); + should.not.exist(d.all2012.toMonth.properContains(d.beg2012.full)); + d.all2012.toMonth.properContains(d.mid2012.full).should.be.true(); + should.not.exist(d.all2012.toMonth.properContains(d.end2012.full)); + d.all2012.toMonth.properContains(d.aft2012.full).should.be.false(); + + should.not.exist(d.all2012.closed.properContains(d.mid2012.toYear)); + }); + + it('should return null when checking if interval contains null point', () => { + const date = DateTime.parse('2012-01-01T00:00:00.0'); + should(new Interval(date, null, true, false).properContains(null)).be.null(); + }); + + it('should throw when the argument is an interval', () => { + should(() => d.all2012.closed.properContains(d.all2012.open)).throw(Error); + }); + }); + describe('includes', () => { let d: any; beforeEach(() => { @@ -1902,6 +1982,83 @@ describe('IntegerInterval', () => { }); }); + describe('properContains', () => { + let d: any; + beforeEach(() => { + d = data(); + }); + + it('should properly calculate integers less than it', () => { + d.zeroToHundred.closed.properContains(-5).should.be.false(); + }); + + it('should properly calculate the left boundary integer', () => { + d.zeroToHundred.closed.properContains(0).should.be.false(); + d.zeroToHundred.open.properContains(0).should.be.false(); + }); + + it('should properly calculate integers in the middle of it', () => { + d.zeroToHundred.closed.properContains(50).should.be.true(); + }); + + it('should properly calculate the right boundary integer', () => { + d.zeroToHundred.closed.properContains(100).should.be.false(); + d.zeroToHundred.open.properContains(100).should.be.false(); + }); + + it('should properly calculate integers greater than it', () => { + d.zeroToHundred.closed.properContains(105).should.be.false(); + }); + + it('should properly handle null endpoints', () => { + new Interval(null, 0).properContains(-123456789).should.be.true(); + new Interval(null, 0).properContains(1).should.be.false(); + new Interval(null, 0, false, true).properContains(0).should.be.false(); + should(new Interval(null, 0, false, true).properContains(-123456789)).be.null(); + new Interval(null, 0, false, true).properContains(1).should.be.false(); + new Interval(0, null).properContains(123456789).should.be.true(); + new Interval(0, null).properContains(-1).should.be.false(); + new Interval(0, null, true, false).properContains(0).should.be.false(); + should(new Interval(0, null, true, false).properContains(123456789)).be.null(); + new Interval(0, null, true, false).properContains(-1).should.be.false(); + }); + + it('should properly handle imprecision', () => { + d.zeroToHundred.closed.properContains(new Uncertainty(-20, -10)).should.be.false(); + should.not.exist(d.zeroToHundred.closed.properContains(new Uncertainty(-20, 20))); + should.not.exist(d.zeroToHundred.closed.properContains(new Uncertainty(0, 100))); + d.zeroToHundred.closed.properContains(new Uncertainty(1, 99)).should.be.true(); + should.not.exist(d.zeroToHundred.closed.properContains(new Uncertainty(80, 120))); + d.zeroToHundred.closed.properContains(new Uncertainty(120, 140)).should.be.false(); + should.not.exist(d.zeroToHundred.closed.properContains(new Uncertainty(-20, 120))); + + const uIvl = new Interval(new Uncertainty(5, 10), new Uncertainty(15, 20)); + + uIvl.properContains(0).should.be.false(); + uIvl.properContains(5).should.be.false(); + should.not.exist(uIvl.properContains(6)); + should.not.exist(uIvl.properContains(10)); + uIvl.properContains(12).should.be.true(); + should.not.exist(uIvl.properContains(15)); + should.not.exist(uIvl.properContains(16)); + uIvl.properContains(20).should.be.false(); + uIvl.properContains(25).should.be.false(); + + uIvl.properContains(new Uncertainty(0, 4)).should.be.false(); + uIvl.properContains(new Uncertainty(0, 5)).should.be.false(); + should.not.exist(uIvl.properContains(new Uncertainty(5, 10))); + should.not.exist(uIvl.properContains(new Uncertainty(10, 15))); + uIvl.properContains(new Uncertainty(11, 14)).should.be.true(); + should.not.exist(uIvl.properContains(new Uncertainty(15, 20))); + uIvl.properContains(new Uncertainty(20, 25)).should.be.false(); + uIvl.properContains(new Uncertainty(25, 30)).should.be.false(); + }); + + it('should throw when the argument is an interval', () => { + should(() => d.zeroToHundred.closed.properContains(new Interval(5, 10))).throw(Error); + }); + }); + describe('includes', () => { let d: any; beforeEach(() => { From ac816342ecd24074bdfe56019ced64486edbcd2a Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Wed, 1 Jul 2026 11:15:41 -0400 Subject: [PATCH 6/9] Explicit null check --- examples/browser/cql4browsers.js | 5 ++++- src/datatypes/interval.ts | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/browser/cql4browsers.js b/examples/browser/cql4browsers.js index 6042a9034..64b341ab0 100644 --- a/examples/browser/cql4browsers.js +++ b/examples/browser/cql4browsers.js @@ -1892,7 +1892,10 @@ class Interval { return logic_1.ThreeValuedLogic.and(lowFn(this.low, item, precision), highFn(this.high, item, precision)); } properContains(item, precision) { - if (item != null && item.isInterval) { + if (item == null) { + return null; + } + else if (item.isInterval) { throw new Error('Argument to contains must be a point'); } return logic_1.ThreeValuedLogic.and(cmp.lessThan(this.start(), item, precision), cmp.greaterThan(this.end(), item, precision)); diff --git a/src/datatypes/interval.ts b/src/datatypes/interval.ts index d8fc36ff8..dde392905 100644 --- a/src/datatypes/interval.ts +++ b/src/datatypes/interval.ts @@ -115,7 +115,9 @@ export class Interval { } properContains(item: any, precision?: any) { - if (item != null && item.isInterval) { + if (item == null) { + return null; + } else if (item.isInterval) { throw new Error('Argument to contains must be a point'); } return ThreeValuedLogic.and( From 84c462c4d4b256507c7b376721af949d5fe25e2e Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Wed, 1 Jul 2026 12:25:09 -0400 Subject: [PATCH 7/9] Add additional boundary tests --- test/datatypes/interval-test.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/datatypes/interval-test.ts b/test/datatypes/interval-test.ts index ebe0d0cf9..7a6aeca41 100644 --- a/test/datatypes/interval-test.ts +++ b/test/datatypes/interval-test.ts @@ -133,6 +133,14 @@ describe('DateTimeInterval', () => { it('should properly calculate the left boundary date', () => { d.all2012.closed.properContains(d.beg2012.full).should.be.false(); d.all2012.open.properContains(d.beg2012.full).should.be.false(); + + let next = d.beg2012.full.successor(); + d.all2012.closed.properContains(next).should.be.true(); + d.all2012.open.properContains(next).should.be.false(); + + next = next.successor(); + d.all2012.closed.properContains(next).should.be.true(); + d.all2012.open.properContains(next).should.be.true(); }); it('should properly calculate dates in the middle of it', () => { @@ -142,6 +150,14 @@ describe('DateTimeInterval', () => { it('should properly calculate the right boundary date', () => { d.all2012.closed.properContains(d.end2012.full).should.be.false(); d.all2012.open.properContains(d.end2012.full).should.be.false(); + + let prev = d.end2012.full.predecessor(); + d.all2012.closed.properContains(prev).should.be.true(); + d.all2012.open.properContains(prev).should.be.false(); + + prev = prev.predecessor(); + d.all2012.closed.properContains(prev).should.be.true(); + d.all2012.open.properContains(prev).should.be.true(); }); it('should properly calculate dates after it', () => { @@ -1995,6 +2011,10 @@ describe('IntegerInterval', () => { it('should properly calculate the left boundary integer', () => { d.zeroToHundred.closed.properContains(0).should.be.false(); d.zeroToHundred.open.properContains(0).should.be.false(); + d.zeroToHundred.closed.properContains(1).should.be.true(); + d.zeroToHundred.open.properContains(1).should.be.false(); + d.zeroToHundred.closed.properContains(2).should.be.true(); + d.zeroToHundred.open.properContains(2).should.be.true(); }); it('should properly calculate integers in the middle of it', () => { @@ -2004,6 +2024,10 @@ describe('IntegerInterval', () => { it('should properly calculate the right boundary integer', () => { d.zeroToHundred.closed.properContains(100).should.be.false(); d.zeroToHundred.open.properContains(100).should.be.false(); + d.zeroToHundred.closed.properContains(99).should.be.true(); + d.zeroToHundred.open.properContains(99).should.be.false(); + d.zeroToHundred.closed.properContains(98).should.be.true(); + d.zeroToHundred.open.properContains(98).should.be.true(); }); it('should properly calculate integers greater than it', () => { From 44a25f0014fa889d6d445418e30edd6d11ada88f Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Wed, 1 Jul 2026 12:25:54 -0400 Subject: [PATCH 8/9] Add skipped tests for unbounded and unknown intervals --- test/datatypes/interval-test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/datatypes/interval-test.ts b/test/datatypes/interval-test.ts index 7a6aeca41..84857519b 100644 --- a/test/datatypes/interval-test.ts +++ b/test/datatypes/interval-test.ts @@ -184,6 +184,14 @@ describe('DateTimeInterval', () => { new Interval(date, null, true, false).properContains(early).should.be.false(); }); + it.skip('should properly handle unbounded and unknown intervals', () => { + const date = DateTime.parse('2012-01-01T00:00:00.0'); + new Interval(null, null, true, true, ELM_DATETIME_TYPE).properContains(date).should.be.true(); + should( + new Interval(null, null, false, false, ELM_DATETIME_TYPE).properContains(date) + ).be.null(); + }); + it('should properly handle imprecision', () => { d.all2012.closed.properContains(d.bef2012.toMonth).should.be.false(); should.not.exist(d.all2012.closed.properContains(d.beg2012.toMonth)); @@ -2047,6 +2055,11 @@ describe('IntegerInterval', () => { new Interval(0, null, true, false).properContains(-1).should.be.false(); }); + it.skip('should properly handle unbounded and unknown intervals', () => { + new Interval(null, null, true, true, ELM_INTEGER_TYPE).properContains(0).should.be.true(); + should(new Interval(null, null, false, false, ELM_INTEGER_TYPE).properContains(0)).be.null(); + }); + it('should properly handle imprecision', () => { d.zeroToHundred.closed.properContains(new Uncertainty(-20, -10)).should.be.false(); should.not.exist(d.zeroToHundred.closed.properContains(new Uncertainty(-20, 20))); From cb5eb5cf27105f4eb60d5937a0e08ff2a486e603 Mon Sep 17 00:00:00 2001 From: Dylan Hall Date: Wed, 1 Jul 2026 12:26:29 -0400 Subject: [PATCH 9/9] Add LongInterval.properContains tests --- test/datatypes/interval-test.ts | 97 ++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/test/datatypes/interval-test.ts b/test/datatypes/interval-test.ts index 84857519b..e73e395c1 100644 --- a/test/datatypes/interval-test.ts +++ b/test/datatypes/interval-test.ts @@ -2,7 +2,12 @@ import should from 'should'; import { DateTime, MIN_DATETIME_VALUE, MAX_DATETIME_VALUE } from '../../src/datatypes/datetime'; import { Interval } from '../../src/datatypes/interval'; import { Uncertainty } from '../../src/datatypes/uncertainty'; -import { ELM_DECIMAL_TYPE } from '../../src/util/elmTypes'; +import { + ELM_DATETIME_TYPE, + ELM_DECIMAL_TYPE, + ELM_INTEGER_TYPE, + ELM_LONG_TYPE +} from '../../src/util/elmTypes'; import data from './interval-data'; const xy = (obj: any) => [obj.x, obj.y]; @@ -3786,6 +3791,96 @@ describe('LongInterval', () => { }); }); + describe('properContains', () => { + let d: any; + beforeEach(() => { + d = data(); + }); + + it('should properly calculate longs less than it', () => { + d.zeroToHundredLong.closed.properContains(-5n).should.be.false(); + }); + + it('should properly calculate the left boundary long', () => { + d.zeroToHundredLong.closed.properContains(0n).should.be.false(); + d.zeroToHundredLong.open.properContains(0n).should.be.false(); + d.zeroToHundredLong.closed.properContains(1n).should.be.true(); + d.zeroToHundredLong.open.properContains(1n).should.be.false(); + d.zeroToHundredLong.closed.properContains(2n).should.be.true(); + d.zeroToHundredLong.open.properContains(2n).should.be.true(); + }); + + it('should properly calculate longs in the middle of it', () => { + d.zeroToHundredLong.closed.properContains(50n).should.be.true(); + }); + + it('should properly calculate the right boundary long', () => { + d.zeroToHundredLong.closed.properContains(100n).should.be.false(); + d.zeroToHundredLong.open.properContains(100n).should.be.false(); + d.zeroToHundredLong.closed.properContains(99n).should.be.true(); + d.zeroToHundredLong.open.properContains(99n).should.be.false(); + d.zeroToHundredLong.closed.properContains(98n).should.be.true(); + d.zeroToHundredLong.open.properContains(98n).should.be.true(); + }); + + it('should properly calculate longs greater than it', () => { + d.zeroToHundredLong.closed.properContains(105n).should.be.false(); + }); + + it('should properly handle null endpoints', () => { + new Interval(null, 0n).properContains(-123456789n).should.be.true(); + new Interval(null, 0n).properContains(1n).should.be.false(); + new Interval(null, 0n, false, true).properContains(0n).should.be.false(); + should(new Interval(null, 0n, false, true).properContains(-123456789n)).be.null(); + new Interval(null, 0n, false, true).properContains(1n).should.be.false(); + new Interval(0n, null).properContains(123456789n).should.be.true(); + new Interval(0n, null).properContains(-1n).should.be.false(); + new Interval(0n, null, true, false).properContains(0n).should.be.false(); + should(new Interval(0n, null, true, false).properContains(123456789n)).be.null(); + new Interval(0n, null, true, false).properContains(-1n).should.be.false(); + }); + + it.skip('should properly handle unbounded and unknown intervals', () => { + new Interval(null, null, true, true, ELM_LONG_TYPE).properContains(0).should.be.true(); + should(new Interval(null, null, false, false, ELM_LONG_TYPE).properContains(0)).be.null(); + }); + + it('should properly handle imprecision', () => { + d.zeroToHundredLong.closed.properContains(new Uncertainty(-20n, -10n)).should.be.false(); + should.not.exist(d.zeroToHundredLong.closed.properContains(new Uncertainty(-20n, 20n))); + should.not.exist(d.zeroToHundredLong.closed.properContains(new Uncertainty(0n, 100n))); + d.zeroToHundredLong.closed.properContains(new Uncertainty(1n, 99n)).should.be.true(); + should.not.exist(d.zeroToHundredLong.closed.properContains(new Uncertainty(80n, 120n))); + d.zeroToHundredLong.closed.properContains(new Uncertainty(120n, 140n)).should.be.false(); + should.not.exist(d.zeroToHundredLong.closed.properContains(new Uncertainty(-20n, 120n))); + + const uIvl = new Interval(new Uncertainty(5n, 10n), new Uncertainty(15n, 20n)); + + uIvl.properContains(0n).should.be.false(); + uIvl.properContains(5n).should.be.false(); + should.not.exist(uIvl.properContains(6n)); + should.not.exist(uIvl.properContains(10n)); + uIvl.properContains(12n).should.be.true(); + should.not.exist(uIvl.properContains(15n)); + should.not.exist(uIvl.properContains(16n)); + uIvl.properContains(20n).should.be.false(); + uIvl.properContains(25n).should.be.false(); + + uIvl.properContains(new Uncertainty(0n, 4n)).should.be.false(); + uIvl.properContains(new Uncertainty(0n, 5n)).should.be.false(); + should.not.exist(uIvl.properContains(new Uncertainty(5n, 10n))); + should.not.exist(uIvl.properContains(new Uncertainty(10n, 15n))); + uIvl.properContains(new Uncertainty(11n, 14n)).should.be.true(); + should.not.exist(uIvl.properContains(new Uncertainty(15n, 20n))); + uIvl.properContains(new Uncertainty(20n, 25n)).should.be.false(); + uIvl.properContains(new Uncertainty(25n, 30n)).should.be.false(); + }); + + it('should throw when the argument is an interval', () => { + should(() => d.zeroToHundredLong.closed.properContains(new Interval(5n, 10n))).throw(Error); + }); + }); + describe('includes', () => { let d: any; beforeEach(() => {