16 KiB
Requirements-to-implementation traceability
Authoritative scope: common requirements, numbered US-01–US-15, US-16 and installer addendum. This is a static implementation/test review, not a new acceptance-test execution report.
Implemented means required behavior is visible in source and mapped tests. Implemented with limits means mechanisms exist but some scope/operational evidence is incomplete. No whole US-01–US-15 was found absent. That does not certify every clinical statement or possible deployment/input case. Test coverage references are evidence of checks present, not a claim they passed during this task.
Story mapping
| Story | Observable implementation / acceptance behavior | Source and relevant tests | Status / limits |
|---|---|---|---|
| US-01 create profile | Authenticated initial creation; required name/birth date; generated ID and atomic account association; repeat 409; unique index handles concurrent creation; persistence/retry/DB rollback | application, repository, CreatePatientTests, PatientAuthenticationTests | Implemented. Interrupted DB writes are checked with a trigger; lost response is approximated by retry after success. No separate process-kill-at-every-write-boundary test. |
| US-02 view profile | Persisted DTO includes ID/name/date/contact; protected own/assigned reads; absent 404 | controller, CreatePatientTests, ProfessionalAccessTests | Implemented. Covered in creation/access suites rather than a separate ViewPatientTests file. |
| US-03 update profile | Update name/contact; ID/birth/account/original creation preserved; missing does not create | SQL repository, UpdatePatientTests | Implemented. Birth-date editing is not an accepted story behavior. |
| US-04 record observation | Timestamp and positive numerical values; patient lookup before own DB save; independent context dimensions, optional details, unknown defaults, legacy text retained, later read | application, mapping, RecordObservationTests, RecordMeasurementContextTests, migration test | Implemented with limits: preservation is general; narrative conflict interpretation uses US-11 finite phrases. No arbitrary-language conflict detector. |
| US-05 view observation | Read by observation ID includes current measurements/time/context/note; owner/assignment lookup before access; missing 404 | controller, ViewObservationContextTests | Implemented. Directly seeded Given states verify retrieval independently of creating a reading. |
| US-06 latest | Greatest measurement time, then original recording time, then greatest UUID; context completeness ignored; no observations 404 | repository, LatestObservationTests | Implemented, including deterministic complete ties across restart. |
| US-07 history | Inclusive/equal periods, ascending time/UUID, selected dimensions AND, explicit Unknown, no-selection includes all, empty array, metadata headers, invalid selections rejected | controller, repository, ObservationHistoryTests, ContextFilteredHistoryTests | Implemented. Full unpaginated result is actual contract; no requirement for pagination. |
| US-08 correction | Numeric PUT; partial PATCH adds/corrects/clears individual context fields; omitted fields preserved; unsupported fields/category rejected before save; current selection/calculation membership | patch, repository, UpdateObservationTests, PatchObservationTests | Implemented. No concurrent-update conflict detection, outside explicit story criteria. |
| US-09 delete | Physical row/context deletion; no later read/history/statistics contribution; unaffected remaining data; access controls | repository, DeleteObservationTests, DeleteContextualisedObservationTests | Implemented. No separate stored result/context lifecycle to clean up. |
| US-10 numerical insight | Current filtered observations; arithmetic means/final two-decimal half-up; BP extrema; single sufficient; empty insufficient 404; explicit selection/count/context limitations | calculator, HealthInsightTests, ContextSelectedInsightTests | Implemented. No stored summary per baseline correction. |
| US-11 trend | Three separate metric assessments, full-period direction/OLS/variation, reversals and timestamp ties, reference scopes/limits, context comparability, selections and unavailable parts; corrections/deletions fresh | calculator, HealthTrendTests, method documentation | Implemented with limits: finite narrative phrases and locally coded clinical inferences need separate clinical review for broader claims; not independently validated here. |
| US-12 overview | Profile + latest overall + selected-period insight; latest context distinct; no-match keeps available parts; unknown/mixed explanations; invalid period/access/failures | application, HealthOverviewTests | Implemented. No trend component and no cross-service snapshot, both documented. |
| US-13 patient authentication | Valid generic login; opaque expiry/tamper checks; own-data restrictions by actual owner; profile-less login/create; persistence/bypass protection | security, PatientAuthenticationTests, AuthenticationIntegrationTests | Implemented. Test clocks/replacement handlers are test-only; native secrets/files/network remain deployment responsibilities. |
| US-14 professional reads | Login role, own assignment list, many-to-many assignment reading including context/trends/overview; empty/missing results; unassigned concealment; all writes rejected | assignments, ProfessionalAccessTests, trend, overview | Implemented. Fresh installer professional has no assignments; configured examples/tests demonstrate assigned workflow. Assignment administration is excluded. |
| US-15 guidance | Public ordered sourced home/rest instructions, applicability/review dates, pulse/activity limits, unavailable setting explanation, no record/certification side effects; valid submission independent of viewing | controller, MeasurementGuidanceTests, record-context tests | Implemented. Clinical references are compiled metadata, not dynamically refreshed guidance or evidence of current source validation in this task. |
| US-16 independent installation plus addendum | Selected payloads/processes/config; matching keys/HTTPS trust; runtime/PostgreSQL provisioning, separate DBs/roles/migrations; colocated/distributed origins; verification | installer, provisioner, InstallationTests, BootstrapTests | Implemented with operational/verification limits detailed below. Windows/macOS extend the Linux requirement text. |
US-11 acceptance groups
| Criteria | Implementation/test basis |
|---|---|
| A/B/C: separate metrics, patient/period, direction | CalculateTrend, AssessMeasurement; separate units and all-timepoint calculations; tests Full_period_direction_and_separate_units_and_levels, Inclusive_patient_period_and_equal_offset_instants_apply_before_sufficiency |
| D/E: intermediate excursion and reversal | Raw range plus grouped adjacent absolute change/sign reversals; tests Equal_endpoints_do_not_hide_intermediate_excursion_or_reversal, Overall_decrease_can_coexist_with_reversals_and_large_variation |
| F/G/H/I: levels/interpretations/conflicting metrics | Applicable reference comparisons and separate hints; tests Low_variation_outside_reference_is_not_healthy, Favourable_pressure_decrease_can_still_be_high_while_falling_pulse_is_concerning, pulse boundary/tie excursion tests; independent clinical assessment remains unperformed |
| J/K/L: missing context, insufficiency, reference values | AssessComparability/SelectReference, explicit unavailable parts and provisional references; missing preparation/inadequate rest/setting-specific reference tests |
| M/N: ordering independence and freshness | Timestamp grouping/sorting; fresh HTTP history on each call; tests Retrieval_and_identifier_order_do_not_change_results_including_ties, Corrected_values_context_and_deletions_are_used_on_every_request_after_restart |
| Context additions | Filtered history retrieval, metadata and comparability evidence; selected Home/Clinic/Unknown, empty/single series and contradictory phrase tests |
All named tests above are in HealthTrendTests.cs.
US-16 acceptance groups and operational gaps
| Criterion | Evidence | Remaining uncertainty / incomplete verification |
|---|---|---|
| A/B/C selected/single/multiple/all | Release selection, installer selection, distinct payloads/units, direct independent processes | Normal single-node partial installation must reuse a plan with reachable remote dependencies or defer final topology check; creating a new default plan is not discovery of an existing deployment. |
| D independent config | Per-service env/JSON/certificates/origins/DB values; native configuration tests | Source templates and generated units differ; document generated behavior. |
| E separate machines | Runtime origins and HTTP are location-independent; scoped SSH/SCP distribution tests | Real separate-machine native deployment/network evidence not established by loopback/double tests. |
| F independent service management | Native registrations have no peer coupling; direct process stop/restart tests | Linux/Windows/macOS manager behavior must be demonstrated on native hosts; no new native run was performed here. |
| G persistence ownership | Separate DB/role generation, PUBLIC revocation, dedicated credential checks | Normal DB credentials own schema for migrations; mandatory encrypted DB transport is not implemented. |
| H preserve architecture | Same DLLs and Gateway-routed APIs on all layouts | No container/shared-memory/merged-service runtime path present. |
| I installation verification | Native active/PID checks (Linux/Windows), HTTPS/DB/callback probes, complete synthetic workflow | Live verifier does not explicitly stop/restart each service; macOS has no explicit distinct-PID comparison. Literal all enables complete verification in local wrappers; listing all five names does not. |
| Addendum dependencies/config | Apt ancestry/package checks; generated secrets/CA/PFX/roles/config/migration/native startup | Package doubles do not prove every distro/version/CPU; Linux automation limited to Debian/Ubuntu family; Windows/macOS packages/native execution require native evidence. |
Missing functionality versus scope exclusions
No wholly unimplemented accepted backend user story was identified by this static review. Concrete incomplete verification items are native stop/restart demonstration in the live verifier, explicit macOS PID separation, complete-workflow verification for the five-name selection form, and actual multi-machine/native-platform evidence. General narrative understanding and independent clinical applicability remain unknown, rather than established complete capabilities. See discrepancies for exact evidence.
Registration, recovery, MFA, refresh tokens, professional credential verification, consent/emergency access, professional writes, assignment administration, a product frontend, pagination, optimistic concurrency, backup/restore, HA and production hardening are not accepted features established by the inspected stories. Their absence is recorded without adding scope or treating suggestions as approved requirements.
Shared constraints
Ownership/professional access applies across all patient-specific routes; guidance alone is public. Inclusive/equal periods and offset normalization apply consistently to history, summary, trend and overview insight. Unknown is independently selectable; legacy narrative is never converted to a definite category. Persistence/restart tests and migration tests check ownership and context continuity. The snapshot is backend/source complete but not a claim that tests, external clinical sources or every deployment platform were freshly validated.