The FHIRPath .join() function is not supported in the SDC Populate Operation. While the HAPI FHIRPath engine natively supports .join(), the Populate Operation evaluates FHIRPath expressions using the CQL Engine, which does not implement .join().
This leads to errors when .join() is used in FHIRPath expressions during the Populate Operation, such as:
org.opencds.cqf.cql.engine.exception.CqlException: Could not resolve call to operator join with signature (list<FHIR.string>, System.String).
Root Cause:
In the Populate Operation, FHIRPath expressions are evaluated via the ExpressionProcessor, which delegates to the LibraryEngine. The LibraryEngine converts FHIRPath expressions into CQL and evaluates them using the CQL Engine.
The CQL Engine does not support the .join() function, as it is not part of the CQL FHIRPath implementation.
In contrast, the Extract Operation uses the native HAPI FHIRPath engine FhirPathCache.cachedForContext(), which supports .join().
PR for testcase:
#833
The FHIRPath .join() function is not supported in the SDC Populate Operation. While the HAPI FHIRPath engine natively supports .join(), the Populate Operation evaluates FHIRPath expressions using the CQL Engine, which does not implement .join().
This leads to errors when .join() is used in FHIRPath expressions during the Populate Operation, such as:
org.opencds.cqf.cql.engine.exception.CqlException: Could not resolve call to operator join with signature (list<FHIR.string>, System.String).Root Cause:
In the Populate Operation, FHIRPath expressions are evaluated via the ExpressionProcessor, which delegates to the LibraryEngine. The LibraryEngine converts FHIRPath expressions into CQL and evaluates them using the CQL Engine.
The CQL Engine does not support the .join() function, as it is not part of the CQL FHIRPath implementation.
In contrast, the Extract Operation uses the native HAPI FHIRPath engine FhirPathCache.cachedForContext(), which supports .join().
PR for testcase:
#833