A granted waiver is never projected into an evaluated bundle, so an authored measure's exception path is shape-only
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- postgresql, typescript
- Domain
- backend, databases, testing-qa
Research direction
Start with fhir-bundle-builder.ts, measure-bindings.ts, admin/waivers.ts, and the evaluation path used by planCaseUpsert. Trace how active, unexpired waiver rows can become Conditions for the matching measure, then add tests for granted, expired, and measure-specific waivers; done means the next run changes only the intended outcome and the admin header is accurate.
Written by the indexing model from the issue text.
Description
Named in ADR-083 d2. The ADR's finding, filed so it is not mistaken for something that works.
What is true today
An authored measure reads its exception the right way round: the CQL asks for a coded FHIR Condition, and WorkWell supplies data rather than a verdict. audiogram.cql has
define "Has Active Waiver":
exists([Condition] C where exists(C.code.coding x
where x.system = 'urn:workwell:vs:audiogram-waiver' and x.code = 'audiogram-waiver'))
and measure-bindings.ts carries the per-measure waiver (and for mmr a separate refusal) code/value-set pair.
What is NOT true
Nothing turns a granted waiver into that Condition. The waivers table is record-keeping and admin/waivers.ts says so in its own header: "Granting a waiver is a record-keeping action here (the synthetic evaluation engine derives EXCLUDED from its seeded distribution, not from this table) — so a grant does not retroactively change outcomes." The only code that emits those codes is the synthetic fixture generator (fhir-bundle-builder.ts, from config.hasWaiver).
So: an admin grants a waiver, the ledger records WAIVER_GRANTED, and the next run scores the subject exactly as before. The shape is right; the wiring does not exist.
Why it is filed rather than built
ADR-083 d2: this is the one legitimately WorkWell-side exception — an authored measure whose own logic reads a WorkWell-supplied Condition — but it is TWH/occupational-content work, not pilot work. The six official pilot measures cannot use it at all: only a chart-documented exclusion counts for those, which is #565's write path.
What the fix needs
- The evaluated bundle for an authored measure includes a
Conditionper ACTIVE, unexpiredwaiversrow for that subject and measure, carrying the binding'swaiver.code/waiver.valueSet. - Expiry is honoured at evaluation time, not at grant time:
expires_atin the past must stop producing theCondition, so the case reopens on the next run (which is already whatplanCaseUpsertdoes for a system EXCLUDED closure whose waiver lapsed). - A revoke path, or an explicit decision that a waiver is never revoked and a correction is a new row.
- Tests: a granted waiver flips the next run's outcome to EXCLUDED for that measure only; an expired one does not; a grant for measure A does not exclude measure B.
Definition of done
Granting a waiver changes the next run's outcome for that subject and measure, and admin/waivers.ts's header no longer has to say it does not.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 113
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Taleef7/workwell
-
documentation owner-ops waiting
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
owner-ops waiting
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
infra maui-pilot
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
backend bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
cql-engine pilot-trust
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
All issues in Taleef7/workwell
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area:ui enhancement issue-form:feature platform:cross-platform review: high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
1lck/Lithe-IDEA#1092 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
developmentseed/deck.gl-raster#693 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Marker-Inc-Korea/AutoRAG#1801 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day