UNPKG

cql-execution

Version:

An execution framework for the Clinical Quality Language (CQL)

34 lines (31 loc) 640 B
/* eslint-disable no-console, */ const cql = require('../../lib/cql'); const measure = require('./age.json'); const lib = new cql.Library(measure); const executor = new cql.Executor(lib); const psource = new cql.PatientSource([ { id: '1', recordType: 'Patient', name: 'John Smith', gender: 'M', birthDate: '1980-02-17T06:15' }, { id: '2', recordType: 'Patient', name: 'Sally Smith', gender: 'F', birthDate: '2007-08-02T11:47' } ]); executor .exec(psource) .then(result => { console.log(JSON.stringify(result, undefined, 2)); }) .catch(err => { console.error(err); });