Skip to content
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

Elm Translator: Missing localId for choice type properties #1295

Closed
birick1 opened this issue Nov 29, 2023 · 1 comment · Fixed by #1309
Closed

Elm Translator: Missing localId for choice type properties #1295

birick1 opened this issue Nov 29, 2023 · 1 comment · Fixed by #1309
Labels

Comments

@birick1
Copy link

birick1 commented Nov 29, 2023

This issue arises from ticket projecttacoma/fqm-execution#290 coming from a MADiE user issue.

For this CQL:

define "Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD":
  exists ( ["MedicationNotRequested"] NoBetaBlockerOrdered
      with AHA."Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
        such that NoBetaBlockerOrdered.authoredOn during ModerateOrSevereLVSDHFOutpatientEncounter.period
      where NoBetaBlockerOrdered.medication in "Beta Blocker Therapy for LVSD"
        and ( NoBetaBlockerOrdered.reasonCode in "Medical Reason"
            or NoBetaBlockerOrdered.reasonCode in "Patient Reason"
        )
  )

With the correct set of patients, we should see “NoBetaBlockerOrdered.medication” highlighted. However, it is not highlighted as seen below:

image

The root cause for lack of highlighting is that the ELM is missing the localId for the expression. To see this, the generated ELM for this expression is as follows:

image

With the arrows pointing at the location where a localId should be found.

What’s particularly odd is that a localId for this expression does exist in the annotations:

image

It is likely a bug that the localId exists in the annotation, but not the ELM expression. If the annotation is added to the ELM as expected:

image

Then highlighting works as expected (Note: the localId could also be placed in the “code” clause):

image

@JPercival
Copy link
Contributor

Duplicate of #1279, currently working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants