bzkf / orwdp

Apache License 2.0
0 stars 0 forks source link

More than one element in `SingletonFrom` expression #8

Open BoehmDo opened 3 months ago

BoehmDo commented 3 months ago

Blaze Error:

{:cognitect.anomalies/message "More than one element in `SingletonFrom` expression.", :cognitect.anomalies/category :cognitect.anomalies/conflict, :fhir/issue "exception", :expression-name "InInitialPopulation", :list ["Observation/9f9de0ce0f243936181f4a13362af10d2d3c1431b3dcbf204ce417974bfe8a5f" "Observation/62ff9e01e1605963d0d7ca674b244477ef2ee830969802b8872866fb847f6a0c"], :expression {:type "SingletonFrom", :operand {:resultTypeSpecifier {:type "ListTypeSpecifier", :elementType {:name "{http://hl7.org/fhir}string", :type "NamedTypeSpecifier"}}, :where {:type "Not", :operand {:type "IsNull", :operand {:path "reference", :type "Property", :source {:name "$this", :type "AliasRef"}}}}, :return {:expression {:path "reference", :type "Property", :source {:name "$this", :type "AliasRef"}}, :type "ReturnClause", :distinct false}, :type "Query", :source [{:expression {:resultTypeSpecifier {:type "ListTypeSpecifier", :elementType {:name "{http://hl7.org/fhir}Reference", :type "NamedTypeSpecifier"}}, :type "Flatten", :operand {:where {:type "Not", :operand {:type "IsNull", :operand {:path "assessment", :type "Property", :source {:name "$this", :type "AliasRef"}}}}, :return {:expression {:path "assessment", :type "Property", :source {:name "$this", :type "AliasRef"}}, :type "ReturnClause", :distinct false}, :type "Query", :source [{:expression {:path "stage", :resultTypeSpecifier {:type "ListTypeSpecifier", :elementType {:name "{http://hl7.org/fhir}Condition.Stage", :type "NamedTypeSpecifier"}}, :type "Property", :scope "C"}, :type "AliasedQuerySource", :alias "$this"}]}}, :type "AliasedQuerySource", :alias "$this"}]}}, :measure-id "DEAA2ZCUGRS6ALRH"}

CQL:

`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 "TNMp 21902-2":
  [Observation: Code '21902-2' from loinc]

define Criterion:
  exists (from [Condition: Code 'C50.0' from icd10] C
    with "TNMp 21902-2" O
      such that C.stage.assessment.reference = 'Observation/' + O.id)

define InInitialPopulation:
  Criterion`