63 lines
2.5 KiB
Markdown
63 lines
2.5 KiB
Markdown
# US-05 — View a specific blood-pressure observation
|
|
|
|
The [common requirements](00-common-requirements.md) apply to this story.
|
|
|
|
**User story**
|
|
|
|
> As a patient, I want to retrieve a specific blood-pressure observation so that I can review a previously recorded measurement.
|
|
|
|
## Functional requirements
|
|
|
|
The returned observation shall include its recorded setting, activity condition, optional preparation details, and existing context text and note. Unknown information shall be distinguishable from explicitly recorded values. Context shall remain attached to the correct numerical measurements and timestamp.
|
|
|
|
These details are patient observation data and receive the same access protection as the observation itself.
|
|
|
|
## Acceptance criteria
|
|
|
|
```gherkin
|
|
Feature: View specific blood-pressure observation
|
|
|
|
Scenario: Retrieve an existing observation
|
|
Given a patient has recorded a blood-pressure observation with
|
|
| systolic | 128 |
|
|
| diastolic | 82 |
|
|
| pulse | 68 |
|
|
When that observation is requested using its observation identifier
|
|
Then the observation is returned
|
|
And the systolic value is 128
|
|
And the diastolic value is 82
|
|
And the pulse value is 68
|
|
|
|
Scenario: Retrieve an observation that does not exist
|
|
Given no observation exists with the requested observation identifier
|
|
When the observation is requested
|
|
Then the request reports that the observation does not exist
|
|
```
|
|
|
|
```gherkin
|
|
Feature: US-05 — View the context of a specific observation
|
|
|
|
Scenario: Return complete saved context
|
|
Given an observation exists with Home, At rest, and preparation details
|
|
When an authorised user requests the observation
|
|
Then its saved context is returned with its numerical measurements and timestamp
|
|
|
|
Scenario: Return partial context
|
|
Given an observation exists with Clinic and an unknown activity condition
|
|
When the observation is requested by an authorised user
|
|
Then Clinic is returned as the setting
|
|
And activity condition is represented as unknown
|
|
|
|
Scenario: Preserve historical free text
|
|
Given an observation exists with only the context text "Morning reading"
|
|
When the observation is requested by an authorised user
|
|
Then the original text is returned
|
|
And no definite setting or activity condition is invented
|
|
|
|
Scenario: Protect context
|
|
Given a user is not authorised to access an observation
|
|
When that user requests the observation
|
|
Then access is rejected
|
|
And its context is not disclosed
|
|
```
|