File tree 2 files changed +26
-1
lines changed
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 85
85
[1 :expression :operand 0 :operand :source :name ] := " Patient"
86
86
[1 :expression :operand 1 :type ] := " Literal" ))
87
87
88
+ (testing " Overlaps"
89
+ (given-translation
90
+ " library Test
91
+ using FHIR version '4.0.0'
92
+ include FHIRHelpers version '4.0.0'
93
+
94
+ codesystem snomed: 'http://snomed.info/sct'
95
+
96
+ define InInitialPopulation:
97
+ exists
98
+ from [Procedure: Code '431182000' from snomed] P
99
+ where P.performed overlaps Interval[@2020-02-01, @2020-06-01]"
100
+ [0 :name ] := " InInitialPopulation"
101
+ [0 :context ] := " Patient"
102
+ [0 :expression :type ] := " Exists"
103
+ [0 :expression :resultTypeName ] := " {urn:hl7-org:elm-types:r1}Boolean"
104
+ [0 :expression :operand :type ] := " Query"
105
+ [0 :expression :operand :where :type ] := " Overlaps"
106
+ [0 :expression :operand :where :operand 0 :type ] := " FunctionRef"
107
+ [0 :expression :operand :where :operand 0 :name ] := " ToInterval"
108
+ [0 :expression :operand :where :operand 0 :operand 0 :type ] := " As"
109
+ [0 :expression :operand :where :operand 0 :operand 0 :asType ] := " {http://hl7.org/fhir}Period" ))
110
+
88
111
(testing " Returns a valid :elm/library"
89
112
(are [cql] (s/valid? :elm/library (translate cql))
90
113
" library Test
Original file line number Diff line number Diff line change 432
432
:end nil }
433
433
(interval/interval
434
434
(system/date-time 2021 2 23 14 12 45 )
435
- nil )))
435
+ nil )
436
+ nil
437
+ nil ))
436
438
437
439
(testing " expression is dynamic"
438
440
(is (false ? (core/-static expr))))
You can’t perform that action at this time.
0 commit comments