Comments (4)
So, this was quite the rabbit-hole :) Yes, the CQL-to-ELM translator was not correctly dealing with escape sequences in strings and identifiers, so I added logic to escape/unescape CQL literals and identifiers, and a unit test to verify it. Along the way, I found an issue with the CQL grammar itself, the way strings and identifiers are defined slightly too greedily, which results in an edge case with escape characters, specifically the backslash escape (\\
) isn't handled properly. Because that's a specification change, I can't fix that until the grammar changes in the spec, so I've submitted an STU comment to address that, and until then, I've commented out the affected tests in the unit test.
However, having fixed all that and verified that escape sequences are being handled correctly for all possible escape sequences in both strings and identifiers, the output in the XML is still Hello \'World\'
instead of the simpler Hello 'World'
. In the JSON, the value is the simpler, but apparently, the escape logic for XML escapes single-quotes.
So I'm committing the fix I have so far, but leaving this issue open until the full fix can be applied based on the spec change.
from clinical_quality_language.
That's a reasonable approach. Thanks for looking into this. If it works in JSON, I'm happy for now!
from clinical_quality_language.
Submitted CQL STU comment #1317 to address the STRING and QUOTEDIDENTIFIER lexical rules. (A similar fix was applied to the FHIRPath specification).
from clinical_quality_language.
Released in v1.1.1-SNAPSHOT
from clinical_quality_language.
Related Issues (20)
- Using VSAC FHIR as Terminology Provider HOT 1
- Header injection for terminology provider
- Question re CQL FHIR codes HOT 2
- Finish original goals of portable XML test suite
- FileBasedFhirProvider not accounting for possible Coding type during validation
- FileBasedFhirProvider logic error when including/excluding resource during code validation
- FileBasedFhirProvider code validation resulting in Error
- Evaluated Resources enhancement
- Package name not set in FileBasedFhirProvider constructor
- Add a configuration option to data providers to search using POST
- Expression caching is insufficient for population execution
- Consider running the same tests that the JavaScript engine uses HOT 2
- Migrate DateTime and Time to use Java 8 Date and Time API
- BaseDataProviderStu3 toDateTime(BaseDateTimeType value) only goes to "day" precision
- Add backwards compatibility for Timezone change HOT 1
- Automate incrementing develop version after a successful master release
- Automate creation of Github releases
- Detect and prevent duplicate release versions
- Add an engine quick start to document plugging the engine in to a project
- Expression cache is not being cleared on context change HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clinical_quality_language.