FirelyTeam / firely-cql-sdk

BSD 3-Clause "New" or "Revised" License
31 stars 17 forks source link

Bug - CQL Tag strings must be properly string escaped in C# #533

Closed baseTwo closed 2 months ago

baseTwo commented 2 months ago

The following cql generates invalid c#

/*
@description: Conditions of type 'Injury due to falling rock' within the measurement period
@fhirquery: akin to Condition?code:in=http://moh.alpha.alp/ValueSet/DiagnosisInjuryDueToFallingRock&onset-date=sa[Period-start]&onset-date=eb[Period-end]
@datarequirement: Condition http://hl7.org/fhir/StructureDefinition/Encounter ["code","onset.ofType(DateTime)","subject.ofType(Patient)"]
@coderequirement: Condition.code http://moh.alpha.alp/ValueSet/DiagnosisInjuryDueToFallingRock
*/
define "Injury due to falling rock within measurement period":
    [Condition: "Injury due to falling rock"] C
       where (C.onset.value as DateTime) during "Measurement Period"

Notice that the double-quotes are not escaped Image

test cql files.zip

Other issues created on this dataset: #533, #534