clinical-reasoning
clinical-reasoning copied to clipboard
Parameters of type FHIR.Quantity are not correctly handled
When evaluating an expression that references a Quantity parameter, the code that constructs the parameter declaration does not qualify the type of the parameter, so it is incorrectly resolved to a FHIR.Quantity when the evaluator is passing a System.Quantity:
library expression version '1.0.0'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
parameter "%normalReportingDuration" Quantity
parameter "%encounter" Encounter
define "return":
%encounter.where((status = 'in-progress' and period.start + %normalReportingDuration >= Now()) or status = 'finished' and period.end <= Now() - 72 hours)
The issue is that the CqlParameterDefinition uses the unqualified type name.