Fixing bug with outputting success to StdError
Changes unnecessary System.Error.println commands to System.out.println so that developers can easily determine if translation completed successfully.
This is linked to this issue: https://github.com/cqframework/clinical_quality_language/issues/818
posix cli conventions require such message to go to std err, while output (in this case, the actual ELM) would be written to std out:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/stdin.html
At program start-up, three streams shall be predefined and need not be opened explicitly: standard input (for reading conventional input), standard output (for writing conventional output), and standard error (for writing diagnostic output).
This allows cli commands to be composable:
// compile and run
cql -l Test.cql | cql-execute -data whatever/data -context patient=123
or:
// look for ValueSetRef nodes
cql -l Test.cql | grep 'ValueSetRef'
or:
// upload ELM to a server
cql -l Test.cql --output json | curl -X https://some.server.com/recieve-some-elm
If you write status message to std out you pollute the elm output with status messages, thus creating invalid ELM that you can't immediately consume. Granted, the current cli tooling doesn't support patterns like this but that is the intent of outputting to err rather than out. Given that we're already following the standard conventions I'd prefer to keep doing that but I could be convinced otherwise.
Closing due to inactivity.