Files
HealthAppRepository/suggestions/requirements-consistency-review.md
T

48 lines
7.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Requirements consistency review
Reviewed all 15 files currently under `Docs/Requirements/`, with the authentication design consulted for its explicit requirement reconciliation. Recommendations only; no authoritative documents or implementation changed.
## Conflicts and reconciliation recommendations
1. **US-13 excludes clinicians, whereas US-14 permits assigned healthcare professionals.** US-14 explicitly supplies replacement purpose and account wording but does not explicitly remove US-13's clinician exclusion. Keep US-14's assigned, read-only professional access. Amend US-13's exclusion to exclude unassigned third parties and professional writes, rather than all clinicians. Preserve its patient ownership restrictions.
2. **Account/profile cardinality is inconsistent.** US-13 says every account has exactly one patient; US-14 narrows this to patient accounts, but still requires exactly one. The authentication design allows a patient account to have no profile before US-01 creation and exactly one afterwards. Keep the design's lifecycle and US-14's professional assignments. State: a patient account has zero profiles before initial creation and exactly one afterwards; professional accounts have predefined assignments. Add US-01 scenarios for authenticated initial creation, duplicate prevention, persistent association and retry/concurrency recovery. US-13 successful login must also cover an account awaiting profile creation rather than require an existing associated patient in every case.
3. **US-11 implementation prerequisite differs.** The original story says the exact mathematical definition should be specified before implementation; the trend/interpretation addendum expressly lets implementation choose and document methods. Keep the newer permission, constrained by the full-period, reproducibility and clinical-evidence requirements. Explicitly replace the original prerequisite while retaining its invalid-period and no-data acceptance criteria.
## Missing or ambiguous requirement references
4. **US-11 context addendum references absent material.** Its scope refers to an original v4 document, temporary conventions 12 and 13, endpoint-only acceptance scenarios and an original two-observation rule. None are present in the current requirements set. Keep the new full-period and temporal-sufficiency requirements; remove those references and state the operative rules directly. Two observations at distinct timestamps may be a minimum, but sufficiency must follow the documented method. Endpoint equality alone must not establish stability.
5. **US-06 tie rule has no original definition.** The context addendum claims to preserve timestamp tie rules, but the original US-06 supplies none. The new acceptance scenario selects the observation recorded most recently. Keep that new rule and state it explicitly in US-06: select greatest measurement timestamp, then latest recording time. Define a deterministic final tie rule if recording times also match; do not reuse recording order to determine US-11 direction.
6. **US-10 refers to unspecified rounding.** The addendum says existing rounding and one-observation behaviour remain unchanged, although the original story defines neither explicitly. `125.00` in an example does not define fractional rounding. Keep original arithmetic means and extrema, including a one-observation summary; explicitly document precision/rounding after checking existing behaviour. Do not silently infer two-decimal rounding from formatting.
7. **Repeated inclusive-boundary references lack a baseline definition.** Original period examples do not state boundary inclusion, while the new US-07 boundary scenario explicitly includes both endpoints. Keep the new inclusive rule and define it once for all period-based stories: start <= measurement timestamp <= end. Preserve rejection of end before start; clarify equal-bound periods as valid if that is the intended rule.
8. **Comparability and interpretation need a clear relationship.** The US-11 context addendum correctly says broad matching categories alone do not certify identical conditions. Clarify that missing preparation details limit the claims that can be made; they do not automatically prevent every setting-appropriate reference comparison. Keep both numerical assessment with limitations and evidence-based clinical interpretation. Applicable guidance determines which details are necessary for a particular clinical claim.
9. **Guidance access is unspecified.** US-15 protects patient data but does not explicitly choose whether general guidance itself requires authentication. This is a gap, not a conflict with US-13's protected patient-data operations. Recommendation: general guidance can be read without patient-data access; any patient-specific information remains protected. Record an explicit decision before implementing its access contract.
## Compatible additions to retain
- US-04's independently recordable setting/activity extends optional context; absent context and original free text remain valid. It does not make context mandatory.
- US-05 through US-09 preserve retrieval, latest-by-measurement-time selection, chronological history, numerical validation, ownership and deletion while adding context behaviour. US-08 adds context-only partial updates; the original does not forbid them.
- US-10 context filtering is optional; unfiltered arithmetic statistics still include all eligible observations, including unknown conditions. Numerical summaries and US-11 clinical assessments have different sufficiency needs.
- US-11's two addenda complement each other: one defines assessment behaviour, the other context selection and comparability. Preserve both, with explicit precedence over the original algorithm prerequisite.
- US-12 explicitly applies context selection to insight only and leaves latest observation overall. This is compatible with the original. Keep profile/latest when a selection produces no insight; do not add a trend component implicitly.
- US-15 is an additional story, compatible with valid observations made under nonrecommended conditions. Guidance must remain optional.
- The US-10 correction is compatible with numerical requirements but prescribes the baseline architecture. Recommend locating that architectural decision under Architecture and retaining architecture-neutral functional requirements so it does not constrain every experimental variant.
- US-01 through US-03 have no new numerical/context conflict. Authentication adds access preconditions; missing-resource behaviour applies after authorization without disclosing another patient's information.
- Functional invariance remains valid once the expanded requirements are applied to every compared variant and the acceptance suite. Previously completed stories need additional work for the new addenda; an old passing suite does not establish compliance with the expanded requirements.
## Separate design alignment
The Insights class diagram currently describes one Trend direction/description and an ObservationDto without structured measurement context. The new requirements need separate measurement assessments and context transfer. This is a design-alignment issue rather than a reason to discard the new requirements. Review and approve the necessary contract/design updates before implementation under AGENTS.md; keep service/process boundaries and on-demand calculation.
The endpoint-only proposal in `suggestions/us11-trend-definition.md` is unapproved and incompatible with the new US-11. It is not an authoritative requirement conflict; retire it after the new requirements are reconciled.
## Recommended consolidation
Keep the original US-01–US-12 behaviours wherever compatible, incorporate the new context requirements and full US-11 assessment, and retain US-13–US-15. Give each story one current definition, explicitly record replaced clauses, and state common access/period/context rules once. Do not rely on absent document versions or implementation conventions as requirements.