Files

333 lines
57 KiB
Markdown
Raw Permalink 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 traceability
Architecture-level coverage, not executed application acceptance. All source criteria remain visible; US-16 incompatibilities are authorized by user option 3 and listed separately. Every result must additionally pass US-13/14 and common access rules. Specification section references below refer to [software-architecture.md](software-architecture.md).
## Story and functional-rule coverage
See [requirements register](requirements-and-constraints.md) FR01–FR16 for every story’s functional rules and [US-16 revision](us16-revision.md) for deployment clauses. The authoritative specification defines the domain, operations, ownership, interactions and error outcomes; the following register maps each acceptance scenario and named AC individually.
| Source / story | Components | Specification | Interaction / mechanism |
| --- | --- | --- | --- |
| [Common](../Docs/Requirements/00-common-requirements.md) | API/access; Observations; Analytics; Overview | §§3–6 | Shared Period/Selection validation and patient authorization; one source snapshot per result; inclusive predicates precede operation-specific sufficiency. |
| [US-01](../Docs/Requirements/us01-create-patient-profile.md) | API/access; Profile | §§3–5 | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| [US-02](../Docs/Requirements/us02-view-patient-profile.md) | API/access; Profile | §§4–5,8 | Authorize actual patient; ProfileQueries returns saved ID/name/birth/contact or authorized absence. |
| [US-03](../Docs/Requirements/us03-update-patient-profile.md) | API/access; Profile | §§4–5 | Owner-only atomic update preserves identity/association; absent row is never an insert. |
| [US-04](../Docs/Requirements/us04-record-observation.md) | API/access; Profile; Observations | §§3–5,7 | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| [US-05](../Docs/Requirements/us05-view-observation.md) | API/access; Observations | §§3–5,8 | Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text. |
| [US-06](../Docs/Requirements/us06-latest-observation.md) | API/access; Observations | §§3–5 | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
| [US-07](../Docs/Requirements/us07-observation-history.md) | API/access; Observations | §§3–5,7 | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| [US-08](../Docs/Requirements/us08-update-observation.md) | API/access; Observations | §§4–5,7 | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| [US-09](../Docs/Requirements/us09-delete-observation.md) | API/access; Observations; Analytics | §§5–8 | Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected. |
| [US-10](../Docs/Requirements/us10-calculated-insight.md) | API/access; Observations; Analytics | §§3–6 | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| [US-11](../Docs/Requirements/us11-health-trend.md) | API/access; Observations; Analytics; Guidance | §§3–6 | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| [US-12](../Docs/Requirements/us12-health-overview.md) | API/access; Profile; Observations; Analytics; Overview | §§4–6 | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| [US-13](../Docs/Requirements/us13-patient-authentication.md) | API/access; Profile | §§4–5,8 | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| [US-14](../Docs/Requirements/us14-professional-access.md) | API/access; Profile; Observations; Analytics; Overview | §§4–5,8 | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| [US-15](../Docs/Requirements/us15-measurement-guidance.md) | API/access; Guidance; Observations | §§4,6,8 | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
## Individual acceptance criteria
Outline example rows are explicitly retained. The outcome column preserves all Then/And obligations after the When. State setup is independent; architectural responsibilities do not require running another story first.
### Common period criteria
Source: [00-common-requirements.md](../Docs/Requirements/00-common-requirements.md). Responsible: **API/access; Observations; Analytics; Overview**, specification §§3–6.
Shared Period/Selection validation and patient authorization; one source snapshot per result; inclusive predicates precede operation-specific sufficiency.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 00-AC-01: Include both boundaries | both boundary observations contribute; observations outside the period do not contribute. Outline cases: operation: history, numerical insight, trend assessment, overview insight | Shared Period/Selection validation and patient authorization; one source snapshot per result; inclusive predicates precede operation-specific sufficiency. |
| 00-AC-02: Equal bounds are valid | the period is accepted; only observations at that instant are selected; the operation applies its own data-sufficiency rules. Outline cases: operation: history, numerical insight, trend assessment, overview insight | Shared Period/Selection validation and patient authorization; one source snapshot per result; inclusive predicates precede operation-specific sufficiency. |
| 00-AC-03: Reject reversed bounds | the request is rejected. Outline cases: operation: history, numerical insight, trend assessment, overview insight | Shared Period/Selection validation and patient authorization; one source snapshot per result; inclusive predicates precede operation-specific sufficiency. |
### US-01
Source: [us01-create-patient-profile.md](../Docs/Requirements/us01-create-patient-profile.md). Responsible: **API/access; Profile**, specification §§3–5.
Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 01-AC-01: Create a patient with valid information | the patient profile is created successfully; a patient identifier is assigned; the identifier is associated with the authenticated account | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-02: A patient name is required | the patient profile is rejected | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-03: A date of birth is required | the patient profile is rejected | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-04: Reject a second profile | the request reports that a profile already exists; no second profile is created and the association is unchanged | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-05: Persistent account association | the same associated profile is returned | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-06: Retry after a successful creation response was lost | the result indicates that the profile already exists; no duplicate profile or replacement association is created | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-07: Concurrent initial creation | at most one profile is created and associated with the account; no request reports a second profile as created | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-08: Recovery after interrupted creation | the operation recovers to one accessible associated profile or reports that creation remains incomplete; it neither produces duplicate profiles nor reports an inaccessible profile as successfully created | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
| 01-AC-09: Unauthenticated initial creation | the request is rejected and no profile is created | Claim-derived account; required profile fields; durable single-row transaction plus account uniqueness; existing-profile conflict and own-profile recovery. |
### US-02
Source: [us02-view-patient-profile.md](../Docs/Requirements/us02-view-patient-profile.md). Responsible: **API/access; Profile**, specification §§4–5,8.
Authorize actual patient; ProfileQueries returns saved ID/name/birth/contact or authorized absence.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 02-AC-01: Retrieve an existing patient | the patient profile is returned; the returned patient identifier matches the requested patient; the patient's name is included; the patient's date of birth is included; the patient's contact information is included | Authorize actual patient; ProfileQueries returns saved ID/name/birth/contact or authorized absence. |
| 02-AC-02: Request a patient that does not exist | the request reports that the patient does not exist | Authorize actual patient; ProfileQueries returns saved ID/name/birth/contact or authorized absence. |
### US-03
Source: [us03-update-patient-profile.md](../Docs/Requirements/us03-update-patient-profile.md). Responsible: **API/access; Profile**, specification §§4–5.
Owner-only atomic update preserves identity/association; absent row is never an insert.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 03-AC-01: Update an existing patient | the update succeeds; the patient identifier is unchanged; the patient profile contains contact information "new@example.test" | Owner-only atomic update preserves identity/association; absent row is never an insert. |
| 03-AC-02: Update a patient that does not exist | the update is rejected; no new patient is created | Owner-only atomic update preserves identity/association; absent row is never an insert. |
### US-04
Source: [us04-record-observation.md](../Docs/Requirements/us04-record-observation.md). Responsible: **API/access; Profile; Observations**, specification §§3–5,7.
Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 04-AC-01: Record a valid observation | the observation is accepted; an observation identifier is assigned; the observation is associated with the patient; the observation can be retrieved later | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-02: Record an observation without optional fields | the observation is accepted | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-03: Reject an observation containing a non-positive measured value | the observation is rejected. Outline cases: columns (systolic, diastolic, pulse); cases (0, 82, 68), (-1, 82, 68), (128, 0, 68), (128, -1, 68), (128, 82, 0), (128, 82, -1) | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-04: Reject an observation without a measurement timestamp | the observation is rejected | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-05: Record an observation for a patient that does not exist | the observation is rejected | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-06: Record setting and condition independently | observation creation succeeds | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-07: Record partial context | observation creation succeeds | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-08: Retain support for absent context | observation creation succeeds | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-09: Record departure from routine | observation creation succeeds | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-10: Reject unsupported category | the operation is rejected with an explanation of the invalid category | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-11: Retrieve previously saved context | the returned observation contains those saved details associated with that observation | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
| 04-AC-12: Reject another patient’s context submission | the operation is rejected | Validate positive required values/time/categories; verify patient; commit observation and owned context together; unknown/partial details and original text remain retrievable. |
### US-05
Source: [us05-view-observation.md](../Docs/Requirements/us05-view-observation.md). Responsible: **API/access; Observations**, specification §§3–5,8.
Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 05-AC-01: Retrieve an existing observation | the observation is returned; the systolic value is 128; the diastolic value is 82; the pulse value is 68 | Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text. |
| 05-AC-02: Retrieve an observation that does not exist | the request reports that the observation does not exist | Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text. |
| 05-AC-03: Return complete saved context | its saved context is returned with its numerical measurements and timestamp | Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text. |
| 05-AC-04: Return partial context | Clinic is returned as the setting; activity condition is represented as unknown | Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text. |
| 05-AC-05: Preserve historical free text | the original text is returned; no definite setting or activity condition is invented | Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text. |
| 05-AC-06: Protect context | access is rejected; its context is not disclosed | Resolve actual owner within snapshot; authorize before serializing current observation and attached known/unknown context; preserve legacy text. |
### US-06
Source: [us06-latest-observation.md](../Docs/Requirements/us06-latest-observation.md). Responsible: **API/access; Observations**, specification §§3–5.
LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 06-AC-01: Return the most recent observation | the observation measured at "2026-09-12T08:00:00" is returned | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
| 06-AC-02: Patient has no observations | the result indicates that no observation is available | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
| 06-AC-03: Return context of latest observation | the newer observation is returned with its after-activity context | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
| 06-AC-04: Do not substitute a more complete observation | the latest observation is returned; its context is represented as unknown | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
| 06-AC-05: Preserve timestamp tie selection | the second observation is returned with its own setting | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
| 06-AC-06: No observations | the system reports that no observation is available | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
| 06-AC-07: Resolve a complete timestamp tie reproducibly | the same observation is returned under the documented final tie rule | LatestQuery uses measurement instant, immutable original recording instant, greatest UUID-byte tie; never substitutes for context completeness; authorized absence explicit. |
### US-07
Source: [us07-observation-history.md](../Docs/Requirements/us07-observation-history.md). Responsible: **API/access; Observations**, specification §§3–5,7.
Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 07-AC-01: Retrieve observations within a period | exactly 1 observation is returned; the returned observation was measured at "2026-09-05T08:00:00" | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-02: Return observations in chronological order | the observations are returned in chronological order by measurement timestamp | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-03: No observations exist within the requested period | an empty observation collection is returned | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-04: Reject an invalid period | the request is rejected | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-05: Select home observations | only home observations within the period are returned with their context | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-06: Combine setting and activity | only home-resting observations are returned | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-07: Select unknown context | only observations with unknown setting are returned | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-08: No selection excludes nothing on context alone | all those observations are returned in ascending measurement-time order | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-09: No matching observations | an empty collection is returned | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-10: Reject unsupported selection | the request is rejected with an explanation | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
| 07-AC-11: Preserve patient and boundary rules | both boundary observations are returned; the outside-period and other-patient observations are excluded | Inclusive patient/period query with independently optional AND context predicates; explicit Unknown; ascending time/UUID and applied metadata; complete empty collection allowed. |
### US-08
Source: [us08-update-observation.md](../Docs/Requirements/us08-update-observation.md). Responsible: **API/access; Observations**, specification §§4–5,7.
Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 08-AC-01: Correct an existing observation | the update succeeds; the observation identifier is unchanged; the observation contains systolic value 128 | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-02: Reject an update containing a non-positive measured value | the update is rejected. Outline cases: columns (systolic, diastolic, pulse); cases (0, 82, 68), (128, 0, 68), (128, 82, 0) | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-03: Update an observation that does not exist | the update is rejected | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-04: Add context to historical observation | the update succeeds | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-05: Correct one context value | the update succeeds | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-06: Clear optional context | the update succeeds | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-07: Retrieve partially corrected observation | Clinic is returned; the original numerical values, timestamp, activity condition, and note are returned unchanged | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-08: Reject invalid context correction | the update is rejected | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-09: Nonexistent observation | the update is rejected | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
| 08-AC-10: Unauthorised correction | the operation is rejected | Locked atomic patch; absent/preserve versus explicit clear; validate all changes first; immutable owner/ID/original recording; current later snapshots change selection membership. |
### US-09
Source: [us09-delete-observation.md](../Docs/Requirements/us09-delete-observation.md). Responsible: **API/access; Observations; Analytics**, specification §§5–8.
Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 09-AC-01: Delete an existing observation | the deletion succeeds; the observation can no longer be retrieved; the observation no longer appears in the patient's observation history | Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected. |
| 09-AC-02: Delete an observation that does not exist | the request reports that the observation does not exist | Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected. |
| 09-AC-03: Delete contextualised observation | deletion succeeds | Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected. |
| 09-AC-04: History excludes previously deleted observation | the deleted observation and its context are absent; the remaining matching observations are returned | Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected. |
| 09-AC-05: Assessment excludes deleted data | the deleted values and context do not contribute to the result | Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected. |
| 09-AC-06: Reject unauthorised deletion | the operation is rejected | Atomic row/context deletion with actual-owner authorization; later snapshots and derived results cannot include removed data; other rows unaffected. |
### US-10
Source: [us10-calculated-insight.md](../Docs/Requirements/us10-calculated-insight.md). Responsible: **API/access; Observations; Analytics**, specification §§3–6.
Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 10-AC-01: Calculate averages for a period | the average systolic value is 125; the average diastolic value is 82; the average pulse value is 65 | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-02: Calculate minimum and maximum blood-pressure values | the minimum systolic value is 118; the maximum systolic value is 130; the minimum diastolic value is 76; the maximum diastolic value is 84 | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-03: Insight uses only observations in the requested period | only observations within the requested period contribute to the calculated values | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-04: No observations exist in the requested period | the result indicates that insufficient observation data is available for calculation | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-05: Reject an invalid insight period | the request is rejected | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-06: Calculate from selected context only | average systolic pressure is 125.00; the result identifies Home, At rest, and two contributing observations | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-07: No filter preserves pooled calculation | all eligible observations contribute to the existing numerical calculations; the mixed or unknown context is made apparent | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-08: One selected observation | each mean equals that observation’s corresponding value; each blood-pressure minimum and maximum equals its corresponding value | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-09: No matching observations | the system reports that no insight can be calculated for the selection | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-10: Correction changes membership | that observation does not contribute to the home-only calculation | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-11: Reject unsupported selection | the request is rejected with an explanation | Capture current filtered raw series; SummaryPolicy arithmetic means/final two-decimal half-up and raw BP extrema; count/selection/context explanation; one sufficient, zero no insight. |
| 10-AC-12: Round a halfway mean upwards | the average systolic value is 120.13 | SummaryPolicy uses exact raw mean and final half-up rounding: halfway 120.125 → 120.13; repeating 120⅓ → 120.33. |
| 10-AC-13: Round a repeating fractional mean | the average systolic value is 120.33 | SummaryPolicy uses exact raw mean and final half-up rounding: halfway 120.125 → 120.13; repeating 120⅓ → 120.33. |
### US-11
Source: [us11-health-trend.md](../Docs/Requirements/us11-health-trend.md). Responsible: **API/access; Observations; Analytics; Guidance**, specification §§3–6.
Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 11-AC-01: Calculate a trend from observations | a trend result is returned; the trend is derived only from observations within the requested period | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-02: No observations exist for trend calculation | the result indicates that insufficient observation data is available for trend calculation | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-03: Reject an invalid trend period | the request is rejected | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-04: Assess a comparable selection | separate systolic, diastolic, and pulse assessments are returned; the result identifies the selection, contributing count, and recorded basis for comparability | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-05: Different conditions remain visible | the result identifies the differing conditions; explains limitations on interpreting their combined trajectory | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-06: Unknown details limit comparability | the explanation identifies the known similarities and missing details; does not certify that all measurement conditions were identical | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-07: Missing context preserves numerical information | supported numerical direction and variation are returned; the limitations on clinical interpretation and comparability are explained | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-08: Conflicting descriptions | the conflict is identified; an unsupported resting interpretation is not asserted | Preserve conflicting text/categories; ComparabilityEvidence identifies contradiction and ClinicalPolicy withholds unsupported resting claims; unresolved narrative meaning disclosed. |
| 11-AC-09: Compare labelled selections | each result identifies its own selection and contributing observations; a difference between settings alone is not labelled improvement or deterioration over time | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-10: Insufficient selected series | the result reports insufficient observations for temporal direction; does not use excluded observations to manufacture a trend | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-11: No temporal separation | temporal direction is reported as unavailable | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-12: No matching data | the result reports that no matching observations are available | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-13: Updated context is used | that observation no longer contributes to the result | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-14: Reject invalid selection | the request is rejected with an explanation | Current selected full-period series; deterministic TrendPolicy with distinct-time sufficiency, raw variation and reversals; separate metric results; claim-specific ClinicalPolicy and comparability evidence. |
| 11-AC-15: AC-11-A | the result presents each measurement separately; identifies its unit, observed level, direction, and variation | Separate three MetricAssessments with units/levels/direction/variation. |
| 11-AC-16: AC-11-B | only observations for that patient within the selected period contribute to the result | Patient/period filter precedes assessment. |
| 11-AC-17: AC-11-C | the result identifies the corresponding direction; bases that assessment on measurements throughout the period | Full-period temporal policy; no endpoint-only inference. |
| 11-AC-18: AC-11-D | the result describes the intermediate variation; does not describe the period as clinically stable merely because its endpoints are similar | Retain raw intermediate extrema/variation; no arbitrary clinical stability label. |
| 11-AC-19: AC-11-E | the explanation describes the reversal or mixed development; does not imply that all measurements follow one consistent direction | Expose reversals and mixed movements independently of overall tendency. |
| 11-AC-20: AC-11-F | the explanation identifies their position relative to the reference values; does not describe them as healthy solely because their variation is limited | Clinical reference comparison considers levels; limited variation cannot imply healthy. |
| 11-AC-21: AC-11-G | the explanation describes that development and its basis; distinguishes improvement from having reached an appropriate level | Only a reviewed applicable clinical development rule permits favourable wording; distinguish trajectory from reached level. |
| 11-AC-22: AC-11-H | the explanation describes the concern and its basis; does not treat a decrease as favourable solely because the values are falling | Only applicable evidence permits concerning wording; falling is not inherently favourable. |
| 11-AC-23: AC-11-I | the result explains the interpretation of each affected measurement; does not force them into a single favourable or concerning classification | Interpret each metric separately; no forced overall good/bad. |
| 11-AC-24: AC-11-J | the result presents the supported numerical information; explains that the clinical interpretation is limited by missing context | Preserve numerical descriptions; report which clinical prerequisites are missing. |
| 11-AC-25: AC-11-K | the result explicitly reports that direction cannot be determined; does not substitute an increasing, decreasing, or unchanged conclusion | Distinct-time sufficiency; explicit unavailable direction. |
| 11-AC-26: AC-11-L | the result identifies the reference values used; does not present a general reference threshold as an individual treatment target | Claim-specific reference applicability and source; no personal target. |
| 11-AC-27: AC-11-M | the assessment remains unchanged | Timestamp grouping/order-independent policy; storage order never determines direction. |
| 11-AC-28: AC-11-N | the result reflects the current observations | Current uncached snapshot after correction/deletion. |
| 11-AC-29: Supported reference comparison despite incomplete preparation details | the supported reference comparison is provided; the explanation identifies the remaining limits without rejecting all clinical interpretation | ClinicalPolicy checks prerequisites per claim; irrelevant missing optional preparation only limits stronger claims, not supported comparison. |
### US-12
Source: [us12-health-overview.md](../Docs/Requirements/us12-health-overview.md). Responsible: **API/access; Profile; Observations; Analytics; Overview**, specification §§4–6.
Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 12-AC-01: View an overview for a patient with observations | the patient's profile is included; the latest blood-pressure observation is included; the calculated health insight is included | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| 12-AC-02: View an overview for a patient without observations | the patient's profile is included; no latest blood-pressure observation is returned; the overview indicates that no calculated health insight is available | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| 12-AC-03: Request an overview for a patient that does not exist | the request reports that the patient does not exist | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| 12-AC-04: Reject an invalid overview period | the request is rejected | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| 12-AC-05: Latest context and insight selection differ | the latest after-activity observation and its context are returned; the insight uses only matching home-resting observations; the result distinguishes their different bases | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| 12-AC-06: No matching insight observations | the profile and latest observation remain available; the absence of insight for the selection is explained | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| 12-AC-07: Unknown context remains unknown | its context is represented as unknown; no context is copied from other observations | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
| 12-AC-08: Default overview preserves context limitations | the original pooled insight is returned; its mixed-context explanation is included | Single snapshot composition; unfiltered latest overall and its own context; period/selection applies only to insight; retain profile/latest when insight absent, with distinct bases; no trend. |
### US-13
Source: [us13-patient-authentication.md](../Docs/Requirements/us13-patient-authentication.md). Responsible: **API/access; Profile**, specification §§4–5,8.
Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 13-AC-01: Successful authentication | the system recognises my account and Patient role; recognises its associated patient profile if one has been created | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-02: Access to my own information | access is permitted; the operation follows its existing acceptance criteria | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-03: Invalid credentials | authentication is rejected; the response does not reveal which part of the credentials was incorrect | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-04: Missing authentication | the request is rejected; no patient information is returned or changed | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-05: Invalid authentication information | the request is rejected; no patient information is returned or changed | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-06: Access to another patient’s information | access is rejected; none of that patient’s information is returned or changed | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-07: Own information does not yet exist | the system follows the existing behaviour for missing information; does not return another patient’s information | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-08: Login before profile creation | authentication succeeds and recognises my account and Patient role; I may create my initial profile under US-01; I gain no access to another patient’s information | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
| 13-AC-09: Expired authentication | the request is rejected; no patient information is returned or changed | Established login/token validation; generic credential failure and expiry; per-request actual-owner policy; profile-less login/create allowed; never disclose another patient. |
### US-14
Source: [us14-professional-access.md](../Docs/Requirements/us14-professional-access.md). Responsible: **API/access; Profile; Observations; Analytics; Overview**, specification §§4–5,8.
Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 14-AC-01: Successful authentication | the system recognises my identity and healthcare professional role | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-02: View assigned patients | the system returns only patients assigned to me | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-03: View an assigned patient’s information | access is permitted; the requested information is returned according to the existing retrieval requirements | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-04: No assigned patients | the system indicates that no patients are assigned; does not return other patients | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-05: Patient information does not yet exist | the system follows the existing behaviour for missing information | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-06: Access to an unassigned patient | access is rejected; no information about that patient is returned | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-07: Attempt to change patient information | the operation is rejected; the patient information remains unchanged | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-08: Invalid credentials | authentication is rejected; the response does not reveal which part of the credentials was incorrect | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-09: Missing or invalid authentication | the request is rejected; no patient information is returned | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
| 14-AC-10: Patient account attempts professional access | access is rejected; my existing access to my own information is unaffected | Trusted Professional role; own predefined assignment list; actual-owner assigned reads only; forbid every write; empty/missing and unauthorized cases remain distinct without disclosure. |
### US-15
Source: [us15-measurement-guidance.md](../Docs/Requirements/us15-measurement-guidance.md). Responsible: **API/access; Guidance; Observations**, specification §§4,6,8.
Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable.
| Local criterion ID / source title | Required outcome and cases | Design responsibility |
| --- | --- | --- |
| 15-AC-01: Access guidance before first observation | preparation, measurement, and recording instructions are available; the source, applicability, and review date are identified | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-02: Home measurement guidance | the instructions cover rest, equipment and cuff, positioning, repeated readings, and recording conditions; any numeric instructions follow the identified Danish or European guidance | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-03: Unknown setting | its supported setting is identified; no measurement setting is saved or assumed on the user’s behalf | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-04: Different measurement conditions | the guidance distinguishes it from a resting measurement; explains recording the actual conditions without relabelling the result as resting | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-05: Pulse context | it explains recording the pulse value and relevant activity condition; does not describe the single pulse value as a rhythm assessment | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-06: Guidance does not certify compliance | no observation is saved or altered; following the procedure is not recorded automatically | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-07: Guidance is optional | creation succeeds | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-08: Guidance unavailable | its unavailability is explained; unsupported instructions are not presented as verified guidance | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
| 15-AC-09: General guidance without login | the general guidance is available; no patient-specific information or assignment list is returned | Public reviewed ordered setting-labelled content with source/date and pulse limits; no observation write/certification/defaulting/submission dependency; unsupported verified content unavailable. |
## US-16 and addendum
All **AC-16-A through AC-16-I** are mapped individually with original/proposed status in [us16-revision.md](us16-revision.md). None is silently marked satisfied. The addendum’s selection/process granularity, PostgreSQL setup, generated credentials, protected secret/configuration storage, HTTPS/trust/replacement, service configuration, native registration/start, verification and same-binary deployment principle are mapped there and specified in §9. Original feature-service distribution, separate databases and internal network architecture are incompatible; automation/security/verification intent is retained for the new app unit.
## Gaps and acceptance dependencies
No US-01–US-15 or common functional behaviour has an unassigned architectural responsibility. US-16 has the explicitly authorized topology/installation gaps above. Clinical reference/rule review, general narrative conflict handling, final reproducible numerical method/fixtures and supported Linux installation proof remain future implementation acceptance obligations, tracked as R4–R6/R10. Coverage is a design allocation, not evidence that those behaviours already execute correctly.
## Coverage total
146 individually mapped scenario/outline/named AC entries from common requirements and US-01–US-15; nine US-16 ACs plus every addendum section mapped separately. Outline parameter cases remain in their rows.