clinical-reasoning icon indicating copy to clipboard operation
clinical-reasoning copied to clipboard

passing arguments does not work in 2.4.0 release of evaluator.cli

Open revans2023 opened this issue 1 year ago • 0 comments

Using the v2.4.0 tagged production release of the evaluator.cli parameters cannot be passed when executing the CQL evaluator.

Would like to pass a Date or Interval as a parameter value and could not figure out how that works. Tried both "-p RunDate -pv 2020-06-30" and "--parameter RunDate --parameter-value @2020-06-30 but for a more simple CQL unit test tried passing a Decimal value and that does not work.

source code for command line argments: https://github.com/cqframework/clinical-reasoning/blob/master/evaluator.cli/src/main/java/org/opencds/cqf/cql/evaluator/cli/command/CqlCommand.java

command line: java -jar evaluator.cli-2.4.0.jar cql --library-url . --library-name ParameterTest --model-url .\build\input\tests\ParameterTest-1.0.0 --fhir-version R4 --terminology-url build\input\vocabulary\valueset --context Unfiltered --context-value ParameterTest -p TryThis -pv 123.45

unit test: library ParameterTest version '1.0.0' parameter TryThis Decimal default 0.0 define AssertTryThisWorks: Message(TryThis, TryThis is null or TryThis = 0.0, 'Try This test', 'Error', 'TryThis = ' & ToString(TryThis) )

error message: [main] ERROR org.opencds.cqf.cql.engine.elm.execution.MessageEvaluator - Try This test: TryThis = 0.0 org.opencds.cqf.cql.engine.exception.CqlException: Try This test: TryThis = 0.0 at org.opencds.cqf.cql.engine.elm.execution.MessageEvaluator.message(MessageEvaluator.java:47)

revans2023 avatar Jan 11 '23 22:01 revans2023