clinical_quality_language
clinical_quality_language copied to clipboard
CQL-to-ELM: Annotation Parsing
When using cql-to-elm version 1.5 there are a few issues when processing annotations
1. Tag-only annotations do not appear in ELM
CQL:
/**
* Annotations for define
*
* @test
*/
ELM actual:
<annotation xsi:type="a:Annotation">
<a:s r="8">
<a:s>/**
* Annotations for define
*
* @test
*/
</a:s>
...snip...
</a:s>
</annotation>
ELM expected:
<annotation xsi:type="a:Annotation">
<a:s r="8">
<a:t name="test"/>
<a:s>/**
* Annotations for define
*
* @test
*/
</a:s>
...snip...
</a:s>
</annotation>
(There is a workaround to use @test:
, but this it not documented. Should the spec allow @test
without colon?)
2. Handling end of line / annotation
CQL
/**
* Annotations for define
*
* @test:
* @data: has-t2dm-cohort
* @context: Patient
*/
ELM acutual
<annotation xsi:type="a:Annotation">
<a:t name="test" value="*"/>
<a:t name="data" value="has-t2dm-cohort
 *"/>
<a:t name="context" value="Patient=123"/>
<a:s r="13">
<a:s>/**
* Annotations for define
*
* @test:
* @data: has-t2dm-cohort
* @context: Patient=123
*/
</a:s>
...snip...
</a:s>
</annotation>
ELM expected
<annotation xsi:type="a:Annotation">
<a:t name="test"/>
<a:t name="data" value="has-t2dm-cohort"/>
<a:t name="context" value="Patient=123"/>
<a:s r="13">
<a:s>/**
* Annotations for define
*
* @test:
* @data: has-t2dm-cohort
* @context: Patient=123
*/
</a:s>
...snip...
</a:s>
</annotation>
3. Handling annotation values with @
CQL
/**
* Annotations for define
*
* @asof: @2020-10-01
* @parameter: "Measurement Interval" [@2019,@2020]
*/
ELM actual
<annotation xsi:type="a:Annotation">
<a:t name="asof" value=""/>
<a:t name="parameter" value=""Measurement Interval" ["/>
<a:s r="8">
<a:s>/**
* Annotations for define
*
* @asof: @2020-10-01
* @parameter: "Measurement Interval" [@2019,@2020]
*/
</a:s>
...snip...
</a:s>
</annotation>
ELM expected
<annotation xsi:type="a:Annotation">
<a:t name="asof" value="@2020-10-01"/>
<a:t name="parameter" value=""Measurement Interval" [@2019,@2020]"/>
<a:s r="8">
<a:s>/**
* Annotations for define
*
* @asof: @2020-10-01
* @parameter: "Measurement Interval" [@2019,@2020]
*/
</a:s>
...snip...
</a:s>
</annotation>
Thank you for the report, we'll get this corrected
Included in v2.1.0