Restructure project requirements and design documentation
This commit is contained in:
1 parent
fa5e20f4d6
commit
ebf50827d6
32 files changed
+2078
-485
No files matched your search
@@ -0,0 +1,80 @@
|
||||
# Common requirements
|
||||
|
||||
## Authority and scope
|
||||
|
||||
This directory contains one current definition for each user story US-01 through US-15. These files consolidate the supplied requirements and addenda. The replacement mapping is in `../requirements-reconciliation-changelog.md`; retired filenames are not additional active requirements.
|
||||
|
||||
Requirements describe observable behaviour. Baseline service decomposition, gateway routing, persistence, and token mechanism decisions belong in Architecture and Design. All compared architectural variants must satisfy the same functional requirements under equivalent data and conditions.
|
||||
|
||||
## Access and profile lifecycle
|
||||
|
||||
US-13 governs authenticated patient access and US-14 governs assigned, read-only healthcare-professional access. These rules apply to every patient-specific operation, including context, filtered statistics, trends, and overview results. Professionals may read assigned-patient information but cannot create, update, or delete it. Assignment lists remain protected. General US-15 guidance is public and discloses no patient-specific information.
|
||||
|
||||
A patient account has zero profiles before initial creation and exactly one afterwards. US-01 defines creation and retry outcomes. Accounts without profiles may authenticate and create their own initial profile; other own-data requests report that the requested information is unavailable and do not expose other patients.
|
||||
|
||||
Unless a scenario explicitly tests access rejection, it assumes an authenticated caller authorised for the operation. Missing-resource scenarios apply after access checks, without disclosing another patient's existence or information. Authentication and ownership are not established by caller-supplied patient identifiers alone.
|
||||
|
||||
## Periods and ordering
|
||||
|
||||
US-07, US-10, US-11, and the selected-period insight in US-12 use inclusive boundaries: start <= measurement timestamp <= end. An end before the start is rejected. Equal bounds are valid and include observations exactly at that instant; valid periods do not guarantee sufficient data for an assessment.
|
||||
|
||||
Times denote measurement instants. Equivalent instants expressed with different offsets are treated equally. A timestamp without an offset must have a documented interpretation; it must not change with the machine running the service. No particular wire format is prescribed.
|
||||
|
||||
Observation history is ordered by ascending measurement timestamp. US-06 separately defines latest-observation ties. Recording order never determines US-11 direction.
|
||||
|
||||
## Measurement context and selection
|
||||
|
||||
US-04 defines the recordable setting, activity condition, and optional details. Missing or ambiguous context stays unknown; original text and notes are preserved. Similar values do not prove comparable conditions.
|
||||
|
||||
US-07, US-10, US-11, and US-12 insight support setting and activity selections. When both are selected, both must match. Unknown is a selectable category distinct from known values. Without selections, context alone excludes nothing. Each result identifies applied selections. Individual stories define empty-result and sufficiency behaviour.
|
||||
|
||||
## Acceptance-test conventions
|
||||
|
||||
Each scenario can establish its own state directly. It need not run another user story for setup. Create, update, and delete success does not require returning a complete object or a particular HTTP status. Persistence and subsequent-read assertions may be verified using independent read scenarios with the required state established in Given.
|
||||
|
||||
Documented numerical methods and their concrete test fixtures must satisfy the functional criteria. No specific trend formula is prescribed. Clinical claims require applicable Danish/European guidance; mathematical-method freedom does not authorise invented clinical cutoffs.
|
||||
|
||||
## Shared period acceptance criteria
|
||||
|
||||
```gherkin
|
||||
Feature: Inclusive periods
|
||||
|
||||
Scenario Outline: Include both boundaries
|
||||
Given an authorised patient has eligible observations exactly at the start and end and outside the period
|
||||
When <operation> is requested for that period
|
||||
Then both boundary observations contribute
|
||||
And observations outside the period do not contribute
|
||||
|
||||
Examples:
|
||||
| operation |
|
||||
| history |
|
||||
| numerical insight |
|
||||
| trend assessment |
|
||||
| overview insight |
|
||||
|
||||
Scenario Outline: Equal bounds are valid
|
||||
Given eligible observations exist exactly at the selected instant and elsewhere
|
||||
When <operation> is requested with start and end equal to that instant
|
||||
Then the period is accepted
|
||||
And only observations at that instant are selected
|
||||
And the operation applies its own data-sufficiency rules
|
||||
|
||||
Examples:
|
||||
| operation |
|
||||
| history |
|
||||
| numerical insight |
|
||||
| trend assessment |
|
||||
| overview insight |
|
||||
|
||||
Scenario Outline: Reject reversed bounds
|
||||
Given the caller is authorised
|
||||
When <operation> is requested with end before start
|
||||
Then the request is rejected
|
||||
|
||||
Examples:
|
||||
| operation |
|
||||
| history |
|
||||
| numerical insight |
|
||||
| trend assessment |
|
||||
| overview insight |
|
||||
```
|
||||
Reference in new issue
Block a user