Skip to content

Commit 4919d52

Browse files
committed
More interval expand examples
1 parent 921c5c3 commit 4919d52

2 files changed

Lines changed: 226 additions & 2 deletions

File tree

test/elm/interval/data.cql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,6 +1633,7 @@ define LongNullBoth: expand { Interval[null, null] } per 1 '1'
16331633
define LongBadPerMinute: expand { Interval(2L, 4L] } per 1 minute
16341634

16351635
define LongPerDecimalMorePrecise: expand { Interval[10L, 10L] } per 0.1
1636+
define ExpandLargePositiveLongInterval: expand Interval[9007199254740993L, 9007199254740995L]
16361637

16371638
// @Test: DecimalIntervalExpand
16381639
define ClosedSingle: expand { Interval[2, 5] } per 1.5 '1'
@@ -1656,6 +1657,7 @@ define NullOpen: expand { Interval[null, 4] } per 1.5 '1'
16561657
define NullClose: expand { Interval[2, null] } per 1.5 '1'
16571658
define NullBoth: expand { Interval[null, null] } per 1.5 '1'
16581659
define BadPerMinute: expand { Interval(2.1, 4.1] } per 0.5 minute
1660+
define ExpandLargeDecimalIntervalFractionalStep: expand Interval[9007199254740993.0, 9007199254740993.3] per 0.1
16591661

16601662
// @Test: SameAs
16611663
define NullBoth: Interval[null as DateTime, null as DateTime] same as Interval[null as DateTime, null as DateTime]

test/elm/interval/data.js

Lines changed: 224 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289729,6 +289729,7 @@ define LongNullBoth: expand { Interval[null, null] } per 1 '1'
289729289729
define LongBadPerMinute: expand { Interval(2L, 4L] } per 1 minute
289730289730

289731289731
define LongPerDecimalMorePrecise: expand { Interval[10L, 10L] } per 0.1
289732+
define ExpandLargePositiveLongInterval: expand Interval[9007199254740993L, 9007199254740995L]
289732289733
*/
289733289734

289734289735
module.exports['LongIntervalExpand'] = {
@@ -289743,7 +289744,7 @@ module.exports['LongIntervalExpand'] = {
289743289744
"type" : "Annotation",
289744289745
"t" : [ ],
289745289746
"s" : {
289746-
"r" : "652",
289747+
"r" : "678",
289747289748
"s" : [ {
289748289749
"value" : [ "", "library TestSnippet version '1'" ]
289749289750
} ]
@@ -292750,6 +292751,114 @@ module.exports['LongIntervalExpand'] = {
292750292751
"annotation" : [ ]
292751292752
} ]
292752292753
}
292754+
}, {
292755+
"localId" : "678",
292756+
"name" : "ExpandLargePositiveLongInterval",
292757+
"context" : "Patient",
292758+
"accessLevel" : "Public",
292759+
"annotation" : [ {
292760+
"type" : "Annotation",
292761+
"t" : [ ],
292762+
"s" : {
292763+
"r" : "678",
292764+
"s" : [ {
292765+
"value" : [ "", "define ", "ExpandLargePositiveLongInterval", ": " ]
292766+
}, {
292767+
"r" : "685",
292768+
"s" : [ {
292769+
"value" : [ "expand " ]
292770+
}, {
292771+
"r" : "681",
292772+
"s" : [ {
292773+
"r" : "679",
292774+
"value" : [ "Interval[", "9007199254740993L", ", ", "9007199254740995L", "]" ]
292775+
} ]
292776+
} ]
292777+
} ]
292778+
}
292779+
} ],
292780+
"resultTypeSpecifier" : {
292781+
"type" : "ListTypeSpecifier",
292782+
"localId" : "691",
292783+
"annotation" : [ ],
292784+
"elementType" : {
292785+
"type" : "NamedTypeSpecifier",
292786+
"localId" : "692",
292787+
"name" : "{urn:hl7-org:elm-types:r1}Long",
292788+
"annotation" : [ ]
292789+
}
292790+
},
292791+
"expression" : {
292792+
"type" : "Expand",
292793+
"localId" : "685",
292794+
"annotation" : [ ],
292795+
"resultTypeSpecifier" : {
292796+
"type" : "ListTypeSpecifier",
292797+
"localId" : "689",
292798+
"annotation" : [ ],
292799+
"elementType" : {
292800+
"type" : "NamedTypeSpecifier",
292801+
"localId" : "690",
292802+
"name" : "{urn:hl7-org:elm-types:r1}Long",
292803+
"annotation" : [ ]
292804+
}
292805+
},
292806+
"signature" : [ {
292807+
"type" : "IntervalTypeSpecifier",
292808+
"localId" : "686",
292809+
"annotation" : [ ],
292810+
"pointType" : {
292811+
"type" : "NamedTypeSpecifier",
292812+
"localId" : "687",
292813+
"name" : "{urn:hl7-org:elm-types:r1}Long",
292814+
"annotation" : [ ]
292815+
}
292816+
}, {
292817+
"type" : "NamedTypeSpecifier",
292818+
"localId" : "688",
292819+
"name" : "{urn:hl7-org:elm-types:r1}Quantity",
292820+
"annotation" : [ ]
292821+
} ],
292822+
"operand" : [ {
292823+
"type" : "Interval",
292824+
"localId" : "681",
292825+
"lowClosed" : true,
292826+
"highClosed" : true,
292827+
"annotation" : [ ],
292828+
"resultTypeSpecifier" : {
292829+
"type" : "IntervalTypeSpecifier",
292830+
"localId" : "682",
292831+
"annotation" : [ ],
292832+
"pointType" : {
292833+
"type" : "NamedTypeSpecifier",
292834+
"localId" : "683",
292835+
"name" : "{urn:hl7-org:elm-types:r1}Long",
292836+
"annotation" : [ ]
292837+
}
292838+
},
292839+
"low" : {
292840+
"type" : "Literal",
292841+
"localId" : "679",
292842+
"resultTypeName" : "{urn:hl7-org:elm-types:r1}Long",
292843+
"valueType" : "{urn:hl7-org:elm-types:r1}Long",
292844+
"value" : "9007199254740993",
292845+
"annotation" : [ ]
292846+
},
292847+
"high" : {
292848+
"type" : "Literal",
292849+
"localId" : "680",
292850+
"resultTypeName" : "{urn:hl7-org:elm-types:r1}Long",
292851+
"valueType" : "{urn:hl7-org:elm-types:r1}Long",
292852+
"value" : "9007199254740995",
292853+
"annotation" : [ ]
292854+
}
292855+
}, {
292856+
"type" : "Null",
292857+
"localId" : "684",
292858+
"resultTypeName" : "{urn:hl7-org:elm-types:r1}Quantity",
292859+
"annotation" : [ ]
292860+
} ]
292861+
}
292753292862
} ]
292754292863
}
292755292864
}
@@ -292780,6 +292889,7 @@ define NullOpen: expand { Interval[null, 4] } per 1.5 '1'
292780292889
define NullClose: expand { Interval[2, null] } per 1.5 '1'
292781292890
define NullBoth: expand { Interval[null, null] } per 1.5 '1'
292782292891
define BadPerMinute: expand { Interval(2.1, 4.1] } per 0.5 minute
292892+
define ExpandLargeDecimalIntervalFractionalStep: expand Interval[9007199254740993.0, 9007199254740993.3] per 0.1
292783292893
*/
292784292894

292785292895
module.exports['DecimalIntervalExpand'] = {
@@ -292794,7 +292904,7 @@ module.exports['DecimalIntervalExpand'] = {
292794292904
"type" : "Annotation",
292795292905
"t" : [ ],
292796292906
"s" : {
292797-
"r" : "633",
292907+
"r" : "658",
292798292908
"s" : [ {
292799292909
"value" : [ "", "library TestSnippet version '1'" ]
292800292910
} ]
@@ -295668,6 +295778,118 @@ module.exports['DecimalIntervalExpand'] = {
295668295778
"annotation" : [ ]
295669295779
} ]
295670295780
}
295781+
}, {
295782+
"localId" : "658",
295783+
"name" : "ExpandLargeDecimalIntervalFractionalStep",
295784+
"context" : "Patient",
295785+
"accessLevel" : "Public",
295786+
"annotation" : [ {
295787+
"type" : "Annotation",
295788+
"t" : [ ],
295789+
"s" : {
295790+
"r" : "658",
295791+
"s" : [ {
295792+
"value" : [ "", "define ", "ExpandLargeDecimalIntervalFractionalStep", ": " ]
295793+
}, {
295794+
"r" : "667",
295795+
"s" : [ {
295796+
"value" : [ "expand " ]
295797+
}, {
295798+
"r" : "661",
295799+
"s" : [ {
295800+
"r" : "659",
295801+
"value" : [ "Interval[", "9007199254740993.0", ", ", "9007199254740993.3", "]" ]
295802+
} ]
295803+
}, {
295804+
"r" : "665",
295805+
"value" : [ " per ", "0.1" ]
295806+
} ]
295807+
} ]
295808+
}
295809+
} ],
295810+
"resultTypeSpecifier" : {
295811+
"type" : "ListTypeSpecifier",
295812+
"localId" : "673",
295813+
"annotation" : [ ],
295814+
"elementType" : {
295815+
"type" : "NamedTypeSpecifier",
295816+
"localId" : "674",
295817+
"name" : "{urn:hl7-org:elm-types:r1}Decimal",
295818+
"annotation" : [ ]
295819+
}
295820+
},
295821+
"expression" : {
295822+
"type" : "Expand",
295823+
"localId" : "667",
295824+
"annotation" : [ ],
295825+
"resultTypeSpecifier" : {
295826+
"type" : "ListTypeSpecifier",
295827+
"localId" : "671",
295828+
"annotation" : [ ],
295829+
"elementType" : {
295830+
"type" : "NamedTypeSpecifier",
295831+
"localId" : "672",
295832+
"name" : "{urn:hl7-org:elm-types:r1}Decimal",
295833+
"annotation" : [ ]
295834+
}
295835+
},
295836+
"signature" : [ {
295837+
"type" : "IntervalTypeSpecifier",
295838+
"localId" : "668",
295839+
"annotation" : [ ],
295840+
"pointType" : {
295841+
"type" : "NamedTypeSpecifier",
295842+
"localId" : "669",
295843+
"name" : "{urn:hl7-org:elm-types:r1}Decimal",
295844+
"annotation" : [ ]
295845+
}
295846+
}, {
295847+
"type" : "NamedTypeSpecifier",
295848+
"localId" : "670",
295849+
"name" : "{urn:hl7-org:elm-types:r1}Quantity",
295850+
"annotation" : [ ]
295851+
} ],
295852+
"operand" : [ {
295853+
"type" : "Interval",
295854+
"localId" : "661",
295855+
"lowClosed" : true,
295856+
"highClosed" : true,
295857+
"annotation" : [ ],
295858+
"resultTypeSpecifier" : {
295859+
"type" : "IntervalTypeSpecifier",
295860+
"localId" : "662",
295861+
"annotation" : [ ],
295862+
"pointType" : {
295863+
"type" : "NamedTypeSpecifier",
295864+
"localId" : "663",
295865+
"name" : "{urn:hl7-org:elm-types:r1}Decimal",
295866+
"annotation" : [ ]
295867+
}
295868+
},
295869+
"low" : {
295870+
"type" : "Literal",
295871+
"localId" : "659",
295872+
"resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal",
295873+
"valueType" : "{urn:hl7-org:elm-types:r1}Decimal",
295874+
"value" : "9007199254740993.0",
295875+
"annotation" : [ ]
295876+
},
295877+
"high" : {
295878+
"type" : "Literal",
295879+
"localId" : "660",
295880+
"resultTypeName" : "{urn:hl7-org:elm-types:r1}Decimal",
295881+
"valueType" : "{urn:hl7-org:elm-types:r1}Decimal",
295882+
"value" : "9007199254740993.3",
295883+
"annotation" : [ ]
295884+
}
295885+
}, {
295886+
"type" : "Quantity",
295887+
"localId" : "666",
295888+
"value" : 0.1,
295889+
"unit" : "1",
295890+
"annotation" : [ ]
295891+
} ]
295892+
}
295671295893
} ]
295672295894
}
295673295895
}

0 commit comments

Comments
 (0)