EXCLUDED renders as one string for three different conditions (DENEX, DENEXCEP, out-of-denominator)

Open
#576 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start in official-executor-adapter.ts at deriveCell’s EXCLUDED branch, then read fhir/measure-report.ts to see how denex and denexcep are exposed. Compare the wording in roster-vocabulary.ts and compliance/official-display.ts across the roster, case detail, CDS card and CSV. Done means tests use real populationResults evidence to distinguish exclusion, exception and out-of-denominator while preserving authored-measure waiver wording.

Written by the indexing model from the issue text.

Description

backend

Named in ADR-083 (d3 / Consequences) as a known display defect rather than left implied, and filed so the fix is specifiable.

What is wrong

official-executor-adapter.ts routes THREE distinct conditions to the workflow status EXCLUDED:

  • a denominator exclusion (DENEX) — hospice, palliative care, frailty with advanced illness, a mastectomy, a colectomy, ESRD;
  • a denominator exception (DENEXCEP) — on the pilot's six measures only cms2 has one, a medical or patient reason for not screening;
  • out of the denominator for any other reason.

Every one of them renders with the same sentence. roster-vocabulary.ts says "Documented exclusion on file" on a patient deployment and "Contraindication / exemption on file" on the occupational one; compliance/official-display.ts says "Excluded by measure logic (denominator exclusion or exception)." for five of the six measures (cms137 alone names hospice).

The adapter's own header has said this for months: the display "hardcodes 'Contraindication / exemption on file' for every EXCLUDED — but this adapter routes three distinct conditions there, and only the first is an exemption."

Why it matters now

ADR-083 makes the vocabulary explicit — INELIGIBLE (outside the initial population, ADR-078) / EXCLUDED (DENEX) / EXCEPTED (DENEXCEP) — and that is what makes a correct string writable. A coordinator looking at an excluded patient cannot currently tell whether the chart documents a clinical exclusion or somebody declined the screening, and those lead to different work: the first is nothing to do, the second may be worth a second conversation.

What the fix needs

The evidence already distinguishes them: evidence_json.official.populationResults carries denex and denexcep separately (fhir/measure-report.ts reads both). So the display can read which population fired rather than being told only the folded status, the same evidence-first rule ADR-046 applied to MeasureReport.

  • deriveCell's EXCLUDED branch reads the official populations when present.
  • Three strings, per deployment subject term, plus the existing fallback for an authored measure's waiver.
  • The roster cell, the case detail, the CDS card and the CSV all read the same one place.

Definition of done

A patient excluded by hospice and a patient excluded by a documented refusal show different text on the roster and the case page; an authored measure's waiver keeps today's wording; a test pins each of the three against real populationResults evidence rather than a status string.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
6h 6m
Merged PRs (30d)
69

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Taleef7/workwell

All issues in Taleef7/workwell

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.