@@ -56,8 +56,7 @@ export async function executeCQLFile(uri: Uri): Promise<void> {
56
56
p . path ,
57
57
terminologyPath ,
58
58
p . name ,
59
- measurementPeriod ,
60
- rootDir
59
+ measurementPeriod
61
60
) ,
62
61
) ;
63
62
}
@@ -81,7 +80,7 @@ export async function executeCQLFile(uri: Uri): Promise<void> {
81
80
await insertLineAtEnd ( textEditor , `${ terminologyMessage } ` ) ;
82
81
await insertLineAtEnd ( textEditor , `${ testMessage } ` ) ;
83
82
84
- let operationArgs = getCqlCommandArgs ( fhirVersion , optionsPath ) ;
83
+ let operationArgs = getCqlCommandArgs ( fhirVersion , optionsPath , rootDir ) ;
85
84
operationArgs . push ( ...testCasesArgs ) ;
86
85
await executeCQL ( textEditor , operationArgs ) ;
87
86
}
@@ -157,7 +156,7 @@ async function executeCQL(textEditor: TextEditor, operationArgs: string[]) {
157
156
) ;
158
157
}
159
158
160
- function getCqlCommandArgs ( fhirVersion : string , optionsPath : Uri ) : string [ ] {
159
+ function getCqlCommandArgs ( fhirVersion : string , optionsPath : Uri , rootDir : Uri ) : string [ ] {
161
160
const args = [ 'cql' ] ;
162
161
163
162
args . push ( `-fv=${ fhirVersion } ` ) ;
@@ -166,6 +165,10 @@ function getCqlCommandArgs(fhirVersion: string, optionsPath: Uri): string[] {
166
165
args . push ( `-op=${ optionsPath } ` ) ;
167
166
}
168
167
168
+ if ( rootDir ) {
169
+ args . push ( `-rd=${ rootDir } ` ) ;
170
+ }
171
+
169
172
return args ;
170
173
}
171
174
@@ -175,8 +178,7 @@ function getExecArgs(
175
178
modelPath : Uri | null ,
176
179
terminologyPath : Uri | null ,
177
180
contextValue : string | null ,
178
- measurementPeriod : string ,
179
- rootDir : Uri ,
181
+ measurementPeriod : string
180
182
) : string [ ] {
181
183
// TODO: One day we might support other models and contexts
182
184
const modelType = 'FHIR' ;
@@ -205,9 +207,5 @@ function getExecArgs(
205
207
args . push ( `-pv=${ measurementPeriod } ` ) ;
206
208
}
207
209
208
- if ( rootDir ) {
209
- args . push ( `-rd=${ rootDir } ` ) ;
210
- }
211
-
212
210
return args ;
213
211
}
0 commit comments