How to use the cql-execution.Library function in cql-execution

To help you get started, we’ve selected a few cql-execution examples, based on popular ways it is used in public projects.

github HL7-DaVinci / dtr / src / elmExecutor / executeElm.js View on Github external
function executeElmAgainstPatientSource(executionInputs, patientSource) {
  // executionInputs.elmDependencies = [ fhirhelpersElm ]
  const repository = new cql.Repository(executionInputs.elmDependencies);
  const lib = new cql.Library(executionInputs.elm, repository);
  const codeService = new cql.CodeService(executionInputs.valueSetDB);
  const executor = new cql.Executor(lib, codeService, executionInputs.parameters);
  const results = executor.exec(patientSource);
  return results.patientResults[Object.keys(results.patientResults)[0]];
}
github HL7-DaVinci / dtr / frontend / src / elmExecutor / buildElmExecutor.js View on Github external
function executeElmAgainstPatientSource(executionInputs, patientSource) {
  executionInputs.elmDependencies = [ fhirhelpersElm ]
  const repository = new cql.Repository(executionInputs.elmDependencies);
  const lib = new cql.Library(executionInputs.elm, repository);
  const codeService = new cql.CodeService(executionInputs.valueSetDB);
  const executor = new cql.Executor(lib, codeService, executionInputs.parameters);
  const results = executor.exec(patientSource);
  return results.patientResults[Object.keys(results.patientResults)[0]];
}

cql-execution

An execution framework for the Clinical Quality Language (CQL)

Apache-2.0
Latest version published 19 days ago

Package Health Score

79 / 100
Full package analysis

Similar packages