bzkf / orwdp

Apache License 2.0
0 stars 0 forks source link

Issue CQL execution #5

Open juliangruendner opened 3 months ago

juliangruendner commented 3 months ago

The following CQL query generated by the backend

using FHIR version '4.0.0'
include FHIRHelpers version '4.0.0'

codesystem icd10: 'http://fhir.de/CodeSystem/bfarm/icd-10-gm'
codesystem loinc: 'http://loinc.org/'

context Patient

define "Histologie 59847-4":
[Observation: Code '59847-4' from loinc]

define Criterion:
exists (from [Condition: Code 'C50.8' from icd10] C
with "Histologie 59847-4" O
such that C.evidence.detail.reference = 'Observation/' + [O.id](http://o.id/))

define InInitialPopulation:
Criterion

leads to the following error in the blaze server with the production data

2024-05-29T14:24:17.538Z bzkf-fhir-blaze-0 resource-store-kv-2 WARN [blaze.handler.util:115] - {:cognitect.anomalies/message "Could not resolve identifier Histologie 59847-4 in the current library.Could not validate reference to expression Criterion because its definition contains errors.", :cognitect.anomalies/category :cognitect.anomalies/incorrect, :cql "library Retrieve version '1.0.0'\nusing FHIR version '4.0.0'\ninclude FHIRHelpers version '4.0.0'\n\ncodesystem icd10: 'http://fhir.de/CodeSystem/bfarm/icd-10-gm'\ncodesystem loinc: 'http://loinc.org'\n\ncontext Patient\n\ndefine \"Histologie 59847-4 1\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 2\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 3\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 4\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 5\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 6\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 7\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 8\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 9\":\n [Observation: Code '59847-4' from loinc]\n\ndefine \"Histologie 59847-4 10\":\n [Observation: Code '59847-4' from loinc]\n\ndefine Criterion:\n exists (from [Condition: Code 'C50' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.8' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.9' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.0' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.2' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.4' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.6' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.3' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.5' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id) or\n exists (from [Condition: Code 'C50.1' from icd10] C\n with \"Histologie 59847-4\" O\n such that C.evidence.detail.reference = 'Observation/' + O.id)\n\ndefine InInitialPopulation:\n Criterion\n", :errors (#error {

:cause "Could not resolve identifier Histologie 59847-4 in the current library."

but does not throw any errors for testdata.

both were run on blaze 0.25