Summary
Lenny's Measures page shows a list of measures that is decoupled from which MCS
(measure server) is currently active. Measures actually live as FHIR resources
(Measure + Library + value-sets) on a specific MCS, so a measure visible in
the UI may not be evaluable on the active MCS — $evaluate-measure will fail
late, with no UI warning beforehand.
This was a non-issue when there was effectively one canonical MCS. With
multi-MCS support shipped in #12 (PRs #283/#290/#292/#293/#294 and #5/#5a),
the assumption breaks silently.
Repro
- Use the multi-MCS UI (PR #5a) to add a second MCS connection that points to
an empty HAPI measure server (or any MCS that has not been seeded with
Lenny's connectathon measures).
- Activate the new MCS.
- Open Measures — list looks unchanged.
- Create a Job against any measure with the new MCS active.
- Job fails with
Library not found / Measure not found from the MCS.
Impact (user-facing)
- False sense of capability. UI shows N measures; only a subset is runnable
on the active MCS.
- Late failures. User picks a measure, configures groups, submits, waits.
Failure mode is post-submit instead of inline.
- No "what's where" view. A user with multiple MCSes can't see which
definitions live where.
Design question
Is the MCS the system of record for measures, or is Lenny?
The seed model treats Lenny as the seed source and the MCS as derived state.
That works for one MCS, breaks for multiple.
Options to consider
- MCS as source of truth. Query the active MCS's
/Measure endpoint and
render that as the Measures page. Cleanest mental model; biggest behavior
change; reshapes the upload-bundle workflow.
- Annotated inventory. Keep the current Measures page, decorate each row
with availability against the active MCS via cheap probe (HEAD /Measure/{id}
or extend /health with a measure manifest). User sees green/red per row.
- Push-on-activate. On MCS activation, sync Lenny's known measures to it.
Heavy, slow, needs progress UI, introduces a write surface.
- Probe-on-job-create. Validate measure presence at job-create time, fail
fast with a clear inline error. Cheapest; doesn't address discoverability.
- Per-MCS scoping. Track in Lenny's DB which measures were uploaded to
which MCS; filter the Measures page by active MCS.
Recommendation (initial, open to debate)
Short-term: option 4 (probe-on-job-create) for fast feedback + a banner on the
Measures page noting "Showing all known measures; availability on the active
MCS is not verified."
Medium-term: pick between option 1 (MCS-as-truth) and option 2 (annotated
inventory) after a /plan-eng-review. Option 2 preserves the current upload
workflow; option 1 is the cleanest model but is a UX shift.
Out of scope for this issue
References
Summary
Lenny's Measures page shows a list of measures that is decoupled from which MCS
(measure server) is currently active. Measures actually live as FHIR resources
(
Measure+Library+ value-sets) on a specific MCS, so a measure visible inthe UI may not be evaluable on the active MCS —
$evaluate-measurewill faillate, with no UI warning beforehand.
This was a non-issue when there was effectively one canonical MCS. With
multi-MCS support shipped in #12 (PRs #283/#290/#292/#293/#294 and #5/#5a),
the assumption breaks silently.
Repro
an empty HAPI measure server (or any MCS that has not been seeded with
Lenny's connectathon measures).
Library not found/Measure not foundfrom the MCS.Impact (user-facing)
on the active MCS.
Failure mode is post-submit instead of inline.
definitions live where.
Design question
Is the MCS the system of record for measures, or is Lenny?
The seed model treats Lenny as the seed source and the MCS as derived state.
That works for one MCS, breaks for multiple.
Options to consider
/Measureendpoint andrender that as the Measures page. Cleanest mental model; biggest behavior
change; reshapes the upload-bundle workflow.
with availability against the active MCS via cheap probe (
HEAD /Measure/{id}or extend
/healthwith a measure manifest). User sees green/red per row.Heavy, slow, needs progress UI, introduces a write surface.
fast with a clear inline error. Cheapest; doesn't address discoverability.
which MCS; filter the Measures page by active MCS.
Recommendation (initial, open to debate)
Short-term: option 4 (probe-on-job-create) for fast feedback + a banner on the
Measures page noting "Showing all known measures; availability on the active
MCS is not verified."
Medium-term: pick between option 1 (MCS-as-truth) and option 2 (annotated
inventory) after a
/plan-eng-review. Option 2 preserves the current uploadworkflow; option 1 is the cleanest model but is a UX shift.
Out of scope for this issue
Job.mcs_urlsnapshot)./test-connection— folded into PR #5a.References
docs/architecture.md— describes the seed-once HAPI modelthis design predates.