-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CQL Library fails to execute in questionnaires #3683
Comments
This error suggests an issue with the processing of the FHIRPath expression and not specifically CQL. FHIRPath Expressions are generally handled by SDC Lib but we may need to dig deeper |
agree w/ @f-odhiambo , this looks like a problem in the expression |
So it seems like in the following examples below "extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/minValue",
"_valueDate": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue",
"valueExpression": {
"language": "text/fhirpath",
"expression": "today() - 60 days"
}
}
]
}
},
{
"url": "http://hl7.org/fhir/StructureDefinition/maxValue",
"_valueDate": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue",
"valueExpression": {
"language": "text/fhirpath",
"expression": "today()"
}
}
]
}
}
], the expression needs an explicit value with a valid datatype for the desired expression i.e. "extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/maxValue",
"valueDate": "2025-01-16"
}
] which passes but we need a calculate the value and not hardcode it and then maybe pass it in the correct format which am not sure what that is for now ... still doing some RnD |
@sharon2719 Correct me if I am wrong. The error you added above was what you got when you ran validation earlier, right? At this point, the questionnaire looked something like this. You then updated the questionnaire to add the CQL library and tried to use the functions defined in the CQL library, right? The questionnaire became something like this. So, the second version passes validation, but it doesn't work correctly on the app, at least not according to my testing. If the assumption above is correct, then I would say we have 2 issues at hand.
|
Currently, fhirPath expressions do not pass validation when running questionnaires. The next option that should work is to create a Common CQL library that can handle the expressions and pass the m as strings to solve this error.
EFSITY: :: ERROR :: Questionnaire.item[1].extension[0].value.ofType(date).extension[0] - The Extension 'http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue' definition allows for the types [string] but found type Expression EFSITY: :: ERROR :: Questionnaire.item[1].extension[0].value.ofType(date).extension[0].value.ofType(Expression).language - This element is not allowed by the profile http://hl7.org/fhir/StructureDefinition/string|4.0.1 EFSITY: :: ERROR :: Questionnaire.item[1].extension[0].value.ofType(date).extension[0].value.ofType(Expression).expression - This element is not allowed by the profile http://hl7.org/fhir/StructureDefinition/string|4.0.1 EFSITY: :: ERROR :: Questionnaire.item[1].extension[1].value.ofType(date).extension[0] - The Extension 'http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue' definition allows for the types [string] but found type Expression EFSITY: :: ERROR :: Questionnaire.item[1].extension[1].value.ofType(date).extension[0].value.ofType(Expression).language - This element is not allowed by the profile http://hl7.org/fhir/StructureDefinition/string|4.0.1 EFSITY: :: ERROR :: Questionnaire.item[1].extension[1].value.ofType(date).extension[0].value.ofType(Expression).expression - This element is not allowed by the profile http://hl7.org/fhir/StructureDefinition/string|4.0.1
When the CQL library is created it passes validation however when this is loaded into the app this does not work.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: