Closed rainesmoshe closed 1 year ago
The interval you pasted above is a CQL parameter named Measurement Period
. When you ran the execution, did you pass in a value for this parameter? If so, how did you construct the parameter value that you passed in?
This is How I set the Measurement Period:
let loadParameters = () => {
return {
'Measurment Period': new Interval(
new DateTime(2013, 1, 1, 0, 0, 0, 0),
new DateTime(2014, 1, 1, 0, 0, 0, 0),
true,
false
)
}
};
And this is how I pass it to the executor
let loadAllData = () => {
return {
measure: loadMeasure(),
patient: loadPatient(),
libraries: loadLibraries(),
valuesets: loadValuesets(),
parameters: loadParameters()
}
};
let{ measure, patient, libraries, valuesets, parameters} = loadAllData();
let executor = new Executor(library,codeService,parameters);
BTW, I get the same error if i do not pass the parameter:
let executor = new Executor(library,codeService);
could it be an issue with the Patient FHIR format? where can i find test data? looking to test NCQA measurements AISE, BCSE
I see a typo:
'Measurment Period': new Interval(
Note the missing e
. Can you try fixing that and see if it clears it up?
'Measurement Period': new Interval(
Hi, Yes now it is working, however not sure why it didn't work without the parameter Thank you
When you don't provide a parameter value at runtime, and the parameter does not specify a default value either, then the parameter should evaluate as null
. It seems that for some reason it might have evaluated as some other non-null value though -- so this is probably something we should look at further.
I'm glad your issue is now resolved, but I'll re-open this to reflect that we need to see why the parameter isn't null when it is not supplied. Or perhaps it is null but something else in the CQL is causing interval logic to be called on a non-interval... Is the CQL for this measure publicly available? Or can you possibly send the CQL snippet that caused this error?
I was using a licensed NCQA measure BCSE, and not sure if I can share it, will need to check with NCQA
The code used above originally came from this NCQA demo. NCQA measures are not shareable (to my knowledge) and all require a "Measurement Period" parameter.
@cmoesel - I set up some testing and am able to reproduce the behavior.
With "Measurement Period":
With "Measurment Period":
This item was resolved - closing.
Hi,
I'm getting the following error, it looks like in this code it is not creating an Interval class
this is what i have as "interval"