Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/executeCql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export async function executeCQLFile(uri: Uri): Promise<void> {
window.showInformationMessage('Unable to determine version of FHIR used. Defaulting to R4.');
}

const rootDir = Utils.resolvePath(projectPath);
const optionsPath = Utils.resolvePath(libraryDirectory, 'cql-options.json');
const measurementPeriod = '';
const testPath = Utils.resolvePath(projectPath, 'input', 'tests');
Expand Down Expand Up @@ -56,6 +57,7 @@ export async function executeCQLFile(uri: Uri): Promise<void> {
terminologyPath,
p.name,
measurementPeriod,
rootDir
),
);
}
Expand Down Expand Up @@ -174,6 +176,7 @@ function getExecArgs(
terminologyPath: Uri | null,
contextValue: string | null,
measurementPeriod: string,
rootDir: Uri,
): string[] {
// TODO: One day we might support other models and contexts
const modelType = 'FHIR';
Expand Down Expand Up @@ -202,5 +205,9 @@ function getExecArgs(
args.push(`-pv=${measurementPeriod}`);
}

if (rootDir) {
args.push(`-rd=${rootDir}`);
}

return args;
}